diff options
author | ustieber | 2011-05-23 13:52:00 +0000 |
---|---|---|
committer | ustieber | 2011-05-23 13:52:00 +0000 |
commit | c27b35ce63b8e661e5669b76e1390aeb30a99fe7 (patch) | |
tree | a08bf01620c84a6216e662b2e0d188ad5721f9dc | |
parent | 289b34da122ffe093d07d99da56bb3cc7ffe526e (diff) | |
download | org.eclipse.tcf-c27b35ce63b8e661e5669b76e1390aeb30a99fe7.tar.gz org.eclipse.tcf-c27b35ce63b8e661e5669b76e1390aeb30a99fe7.tar.xz org.eclipse.tcf-c27b35ce63b8e661e5669b76e1390aeb30a99fe7.zip |
Target Explorer: Fix issues with keep adding new wizard toolbar buttons on each selection change
-rw-r--r-- | target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/actions/NewActionProvider.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/actions/NewActionProvider.java b/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/actions/NewActionProvider.java index 641025ba5..5ddfd2b04 100644 --- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/actions/NewActionProvider.java +++ b/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/actions/NewActionProvider.java @@ -127,11 +127,22 @@ public class NewActionProvider extends CommonActionProvider { */
@Override
public void fillActionBars(IActionBars actionBars) {
+ // If none of the actions got created, there is nothing to do here
if (newWizardCommandActionToolbar == null) {
return;
}
+ // Get the toolbar manager
IToolBarManager toolbar = actionBars.getToolBarManager();
+
+ // Check for the newWizard action in the toolbar. If found,
+ // drop out immediately to avoid adding the items to the toolbar
+ // again and again
+ if (toolbar.find("org.eclipse.tm.te.ui.command.newWizards") != null) { //$NON-NLS-1$
+ return;
+ }
+
+ // Add the items to the toolbar
toolbar.insertAfter(ICommonMenuConstants.GROUP_NEW, newWizardCommandActionToolbar);
}
}
|