mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
simplify toolWindowGroup constructor — the same as in case of balloonGroup, don't require to pass logByDefault
This commit is contained in:
@@ -38,7 +38,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class HotSwapProgressImpl extends HotSwapProgress{
|
||||
static final NotificationGroup NOTIFICATION_GROUP = NotificationGroup.toolWindowGroup("HotSwap", ToolWindowId.DEBUG, true);
|
||||
static final NotificationGroup NOTIFICATION_GROUP = NotificationGroup.toolWindowGroup("HotSwap", ToolWindowId.DEBUG);
|
||||
|
||||
TIntObjectHashMap<List<String>> myMessages = new TIntObjectHashMap<List<String>>();
|
||||
private final ProgressWindow myProgressWindow;
|
||||
|
||||
+4
-3
@@ -28,6 +28,8 @@ import com.intellij.ui.content.ContentManager;
|
||||
import com.intellij.ui.content.impl.ContentImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* @author Denis Zhdanov
|
||||
* @since 5/13/13 4:15 PM
|
||||
@@ -39,9 +41,8 @@ public abstract class AbstractExternalSystemToolWindowFactory implements ToolWin
|
||||
|
||||
protected AbstractExternalSystemToolWindowFactory(@NotNull ProjectSystemId id) {
|
||||
myExternalSystemId = id;
|
||||
myNotificationGroup = NotificationGroup.toolWindowGroup("notification.group.id." + id.toString().toLowerCase(),
|
||||
myExternalSystemId.getReadableName(),
|
||||
true);
|
||||
myNotificationGroup = NotificationGroup.toolWindowGroup("notification.group.id." + id.toString().toLowerCase(Locale.ENGLISH),
|
||||
myExternalSystemId.getReadableName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ import java.util.*;
|
||||
|
||||
public class GlobalInspectionContextImpl extends GlobalInspectionContextBase implements GlobalInspectionContext {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.ex.GlobalInspectionContextImpl");
|
||||
private static final NotificationGroup NOTIFICATION_GROUP = NotificationGroup.toolWindowGroup("Inspection Results", ToolWindowId.INSPECTION, true);
|
||||
private static final NotificationGroup NOTIFICATION_GROUP = NotificationGroup.toolWindowGroup("Inspection Results", ToolWindowId.INSPECTION);
|
||||
private final NotNullLazyValue<ContentManager> myContentManager;
|
||||
private InspectionResultsView myView = null;
|
||||
private Content myContent = null;
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ import java.util.*;
|
||||
*/
|
||||
public class AnalyzeDependenciesOnSpecifiedTargetHandler extends DependenciesHandlerBase {
|
||||
private static final NotificationGroup NOTIFICATION_GROUP =
|
||||
NotificationGroup.toolWindowGroup("Dependencies", ToolWindowId.DEPENDENCIES, true);
|
||||
NotificationGroup.toolWindowGroup("Dependencies", ToolWindowId.DEPENDENCIES);
|
||||
private final GlobalSearchScope myTargetScope;
|
||||
|
||||
public AnalyzeDependenciesOnSpecifiedTargetHandler(@NotNull Project project, @NotNull AnalysisScope scope, @NotNull GlobalSearchScope targetScope) {
|
||||
|
||||
@@ -66,6 +66,10 @@ public final class NotificationGroup {
|
||||
return new NotificationGroup(displayId, NotificationDisplayType.TOOL_WINDOW, logByDefault, toolWindowId);
|
||||
}
|
||||
|
||||
public static NotificationGroup toolWindowGroup(@NotNull String displayId, @NotNull String toolWindowId) {
|
||||
return toolWindowGroup(displayId, toolWindowId, true);
|
||||
}
|
||||
|
||||
public String getDisplayId() {
|
||||
return myDisplayId;
|
||||
}
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ public class SearchCommand {
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
NotificationGroup.toolWindowGroup("Structural Search", ToolWindowId.FIND, true)
|
||||
NotificationGroup.toolWindowGroup("Structural Search", ToolWindowId.FIND)
|
||||
.createNotification(SSRBundle.message("problem", e.getMessage()), MessageType.ERROR).notify(project);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class VcsNotifier {
|
||||
|
||||
private static final NotificationGroup NOTIFICATION_GROUP_ID = NotificationGroup.toolWindowGroup(
|
||||
"Vcs Messages", ChangesViewContentManager.TOOLWINDOW_ID, true);
|
||||
"Vcs Messages", ChangesViewContentManager.TOOLWINDOW_ID);
|
||||
private static final NotificationGroup IMPORTANT_ERROR_NOTIFICATION = new NotificationGroup(
|
||||
"Vcs Important Messages", NotificationDisplayType.STICKY_BALLOON, true);
|
||||
private static final NotificationGroup MINOR_NOTIFICATION = new NotificationGroup(
|
||||
|
||||
@@ -37,7 +37,7 @@ import javax.swing.event.HyperlinkEvent;
|
||||
*/
|
||||
public class VcsBalloonProblemNotifier implements Runnable {
|
||||
public static final NotificationGroup
|
||||
NOTIFICATION_GROUP = NotificationGroup.toolWindowGroup("Common Version Control Messages", ChangesViewContentManager.TOOLWINDOW_ID, true);
|
||||
NOTIFICATION_GROUP = NotificationGroup.toolWindowGroup("Common Version Control Messages", ChangesViewContentManager.TOOLWINDOW_ID);
|
||||
private final Project myProject;
|
||||
private final String myMessage;
|
||||
private final MessageType myMessageType;
|
||||
|
||||
Reference in New Issue
Block a user