inspection toolwindow: when quick fixes are shown on popup action can't find view...
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Tue, 24 May 2016 11:50:57 +0000 (14:50 +0300)
committerDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Tue, 24 May 2016 12:30:22 +0000 (15:30 +0300)
platform/lang-impl/src/com/intellij/codeInspection/ex/QuickFixAction.java

index 507c561ecba76374218a1c9dee87038259f35354..bbce736a05f01daebbf62229ab61c49a1d8d3cbe 100644 (file)
@@ -48,6 +48,7 @@ import com.intellij.psi.PsiFile;
 import com.intellij.ui.ClickListener;
 import com.intellij.ui.IdeBorderFactory;
 import com.intellij.util.SequentialModalProgressTask;
+import com.intellij.util.ui.UIUtil;
 import gnu.trove.THashSet;
 import org.jetbrains.annotations.NotNull;
 
@@ -307,10 +308,11 @@ public class QuickFixAction extends AnAction implements CustomComponentAction {
     new ClickListener() {
       @Override
       public boolean onClick(@NotNull MouseEvent event, int clickCount) {
+        final ActionToolbar toolbar = UIUtil.getParentOfType(ActionToolbar.class, button);
         actionPerformed(AnActionEvent.createFromAnAction(QuickFixAction.this,
                                                          event,
                                                          ActionPlaces.UNKNOWN,
-                                                         DataManager.getInstance().getDataContext(button)));
+                                                         toolbar == null ? DataManager.getInstance().getDataContext(button) : toolbar.getToolbarDataContext()));
         return true;
       }
     }.installOn(button);