mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-60364 IDEA-235533 rename @Progress annotations
GitOrigin-RevId: 27a59481c795b31486b988a231ec5d6bbe3808e6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
78da869a04
commit
4d7b01e91c
@@ -20,8 +20,8 @@ import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import static com.intellij.openapi.util.NlsProgress.ProgressIndicatorTextAbove;
|
||||
import static com.intellij.openapi.util.NlsProgress.ProgressIndicatorTextBelow;
|
||||
import static com.intellij.openapi.util.NlsProgress.ProgressText;
|
||||
import static com.intellij.openapi.util.NlsProgress.ProgressDetails;
|
||||
|
||||
/**
|
||||
* An object accompanying a computation, usually in a background thread. It allows to display process status to the user
|
||||
@@ -98,7 +98,7 @@ public interface ProgressIndicator {
|
||||
* @param text Text to set
|
||||
* @see #setText2(String)
|
||||
*/
|
||||
void setText(@Nls @ProgressIndicatorTextAbove String text);
|
||||
void setText(@Nls @ProgressText String text);
|
||||
|
||||
/**
|
||||
* @return text above the progress bar, set by {@link #setText(String)}
|
||||
@@ -110,7 +110,7 @@ public interface ProgressIndicator {
|
||||
* @param text Text to set
|
||||
* @see #setText(String)
|
||||
*/
|
||||
void setText2(@Nls @ProgressIndicatorTextBelow String text);
|
||||
void setText2(@Nls @ProgressDetails String text);
|
||||
|
||||
/**
|
||||
* @return text under the progress bar, set by {@link #setText2(String)}
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.CachedSingletonsRegistry;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.NlsProgress.ProgressIndicatorTextAbove;
|
||||
import com.intellij.openapi.util.NlsProgress.ProgressIndicatorTextBelow;
|
||||
import com.intellij.openapi.util.NlsProgress.ProgressText;
|
||||
import com.intellij.openapi.util.NlsProgress.ProgressDetails;
|
||||
import com.intellij.openapi.util.NlsProgress.ProgressTitle;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.ThrowableComputable;
|
||||
@@ -61,11 +61,11 @@ public abstract class ProgressManager extends ProgressIndicatorProvider {
|
||||
@Override
|
||||
public abstract ProgressIndicator getProgressIndicator();
|
||||
|
||||
public static void progress(@NotNull @Nls @ProgressIndicatorTextAbove String text) throws ProcessCanceledException {
|
||||
public static void progress(@NotNull @Nls @ProgressText String text) throws ProcessCanceledException {
|
||||
progress(text, "");
|
||||
}
|
||||
|
||||
public static void progress2(@NotNull @Nls @ProgressIndicatorTextBelow String text) throws ProcessCanceledException {
|
||||
public static void progress2(@NotNull @Nls @ProgressDetails String text) throws ProcessCanceledException {
|
||||
final ProgressIndicator pi = getInstance().getProgressIndicator();
|
||||
if (pi != null) {
|
||||
pi.checkCanceled();
|
||||
@@ -73,8 +73,8 @@ public abstract class ProgressManager extends ProgressIndicatorProvider {
|
||||
}
|
||||
}
|
||||
|
||||
public static void progress(@NotNull @Nls @ProgressIndicatorTextAbove String text,
|
||||
@Nullable @Nls @ProgressIndicatorTextBelow String text2) throws ProcessCanceledException {
|
||||
public static void progress(@NotNull @Nls @ProgressText String text,
|
||||
@Nullable @Nls @ProgressDetails String text2) throws ProcessCanceledException {
|
||||
final ProgressIndicator pi = getInstance().getProgressIndicator();
|
||||
if (pi != null) {
|
||||
pi.checkCanceled();
|
||||
|
||||
@@ -6,8 +6,9 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.EdtReplacementThread;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.NlsUI;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.SystemNotificationText;
|
||||
import com.intellij.openapi.util.SystemNotificationTitle;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.ExceptionUtil;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
|
||||
@@ -7,16 +7,16 @@ import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
public class NlsProgress {
|
||||
@NlsContext(prefix = "progress.indicator.text.above")
|
||||
@NlsContext(prefix = "progress.text")
|
||||
@Nls(capitalization = Nls.Capitalization.Sentence)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @interface ProgressIndicatorTextAbove {
|
||||
public @interface ProgressText {
|
||||
}
|
||||
|
||||
@NlsContext(prefix = "progress.indicator.text.below")
|
||||
@NlsContext(prefix = "progress.details")
|
||||
@Nls(capitalization = Nls.Capitalization.Sentence)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @interface ProgressIndicatorTextBelow {
|
||||
public @interface ProgressDetails {
|
||||
}
|
||||
|
||||
@NlsContext(prefix = "progress.title")
|
||||
@@ -24,20 +24,4 @@ public class NlsProgress {
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @interface ProgressTitle {
|
||||
}
|
||||
|
||||
/**
|
||||
* System notifications
|
||||
*/
|
||||
|
||||
@NlsContext(prefix = "system.notification.title")
|
||||
@Nls(capitalization = Nls.Capitalization.Title)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @interface SystemNotificationTitle {
|
||||
}
|
||||
|
||||
@NlsContext(prefix = "system.notification.text")
|
||||
@Nls(capitalization = Nls.Capitalization.Sentence)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @interface SystemNotificationText {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.openapi.util;
|
||||
|
||||
import org.jetbrains.annotations.Nls;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@NlsContext(prefix = "system.notification.text")
|
||||
@Nls(capitalization = Nls.Capitalization.Sentence)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @interface SystemNotificationText {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.openapi.util;
|
||||
|
||||
import org.jetbrains.annotations.Nls;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@NlsContext(prefix = "system.notification.title")
|
||||
@Nls(capitalization = Nls.Capitalization.Title)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @interface SystemNotificationTitle {
|
||||
}
|
||||
@@ -4,11 +4,11 @@ package com.intellij.ui;
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.util.NlsProgress.SystemNotificationText;
|
||||
import com.intellij.openapi.util.SystemNotificationText;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static com.intellij.openapi.util.NlsProgress.SystemNotificationTitle;
|
||||
import com.intellij.openapi.util.SystemNotificationTitle;
|
||||
|
||||
public abstract class SystemNotifications {
|
||||
private static final SystemNotifications NULL = new SystemNotifications() {
|
||||
|
||||
Reference in New Issue
Block a user