From bdfdcc0a7ac131708193be1fe748df013d85adbb Mon Sep 17 00:00:00 2001 From: "Anton.Makeev" Date: Mon, 8 Feb 2010 15:22:27 +0300 Subject: [PATCH] Maven: do not disable 'run goal' action when leaving maven tool window --- .../idea/maven/navigator/MavenProjectsNavigatorPanel.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorPanel.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorPanel.java index 533ccd919b..8266dba43e 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorPanel.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorPanel.java @@ -16,10 +16,7 @@ package org.jetbrains.idea.maven.navigator; import com.intellij.execution.Location; -import com.intellij.openapi.actionSystem.ActionGroup; -import com.intellij.openapi.actionSystem.ActionManager; -import com.intellij.openapi.actionSystem.DataProvider; -import com.intellij.openapi.actionSystem.PlatformDataKeys; +import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.SimpleToolWindowPanel; import com.intellij.openapi.util.text.StringUtil; @@ -59,9 +56,11 @@ public class MavenProjectsNavigatorPanel extends SimpleToolWindowPanel implement myTree = tree; final ActionManager actionManager = ActionManager.getInstance(); - JComponent toolbar = actionManager.createActionToolbar("New Maven Toolbar", - (ActionGroup)actionManager.getAction("Maven.NavigatorToolbar"), - true).getComponent(); + ActionToolbar actionToolbar = actionManager.createActionToolbar("New Maven Toolbar", + (ActionGroup)actionManager.getAction("Maven.NavigatorToolbar"), + true); + actionToolbar.setTargetComponent(tree); + JComponent toolbar = actionToolbar.getComponent(); setToolbar(toolbar); setContent(new JScrollPane(myTree)); -- 2.11.4.GIT