inspection toolwindow: when quick fixes are shown on popup action can't find view...
[idea/community.git] / 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);