From 6749e8ba941aba0b1ca64cb4e0854a2ccd622d52 Mon Sep 17 00:00:00 2001 From: Dennis Ushakov Date: Tue, 30 Jan 2018 19:03:04 +0300 Subject: [PATCH] fix NPE in embedded mode --- .../codeInsight/documentation/DocumentationComponent.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java index 2b57cf81d8fe..eee656c335b2 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java @@ -1559,6 +1559,11 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr super("Open as Tool Window"); } + @Override + public void update(AnActionEvent e) { + e.getPresentation().setEnabledAndVisible(myToolwindowCallback != null); + } + @Override public void actionPerformed(AnActionEvent e) { myToolwindowCallback.run();