From 3378036197e605c666225201ab9a8a5ccf15f214 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Thu, 10 Dec 2015 16:23:06 +0300 Subject: [PATCH 1/2] IDEA-144668 Ability to disable "Run config" and "test indicator" gutters: external annotations icon --- .../codeInsight/ExternalAnnotationsLineMarkerProvider.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsLineMarkerProvider.java b/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsLineMarkerProvider.java index 4e73dcf47fe7..3b7268500687 100644 --- a/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsLineMarkerProvider.java +++ b/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsLineMarkerProvider.java @@ -47,6 +47,7 @@ import com.intellij.xml.util.XmlStringUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import javax.swing.*; import java.awt.event.MouseEvent; import java.util.Collection; import java.util.List; @@ -160,6 +161,12 @@ public class ExternalAnnotationsLineMarkerProvider extends LineMarkerProviderDes return "External annotations"; } + @Nullable + @Override + public Icon getIcon() { + return AllIcons.Gutter.ExtAnnotation; + } + private static class MyIconGutterHandler implements GutterIconNavigationHandler { static final MyIconGutterHandler INSTANCE = new MyIconGutterHandler(); From 72dfc245069d85353109d772b25609ad4bc440b4 Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Thu, 10 Dec 2015 16:24:02 +0300 Subject: [PATCH 2/2] EA-75142 - NPE: ToggleReadOnlyAttributePanel.selectionChanged --- .../wm/impl/status/ToggleReadOnlyAttributePanel.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/ToggleReadOnlyAttributePanel.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/ToggleReadOnlyAttributePanel.java index 98c5aee6653d..3087c4611497 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/ToggleReadOnlyAttributePanel.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/ToggleReadOnlyAttributePanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -131,6 +131,8 @@ public class ToggleReadOnlyAttributePanel extends FileEditorManagerAdapter imple @Override public void selectionChanged(@NotNull FileEditorManagerEvent event) { - myStatusBar.updateWidget(ID()); + if (myStatusBar != null) { + myStatusBar.updateWidget(ID()); + } } }