| Summary: | ServerActionProvider removes all other contribution from the Servers view toolbar | ||
|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Tim deBoer <deboer> |
| Component: | wst.server | Assignee: | Angel Vera <arvera> |
| Status: | CLOSED DUPLICATE | QA Contact: | Angel Vera <arvera> |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.2 | ||
| Target Milestone: | 3.2.4 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | plan_draft_324 | ||
*** This bug has been marked as a duplicate of bug 291664 *** |
The ServerActionProvider removes all contributions from the Servers view toolbar. This includes the 'collapse all' button that's available in every other common navigator view, as well as any buttons added by adopters. The problem is in method fillActionBars(IActionBars), which contains the line: IContributionManager cm = actionBars.getToolBarManager(); cm.removeAll(); which removes any contributions from other sources. This method is called every time the user makes a selection in the view, so we can't simply remove the removeAll(), which would repeatedly add the server view's actions to the toolbar. Instead, it could be changed to something like: IContributionManager cm = actionBars.getToolBarManager(); IContributionItem[] cis = cm.getItems(); List<IAction> existingActions = new ArrayList<IAction>(); for (IContributionItem ci : cis) { if (ci instanceof ActionContributionItem) { ActionContributionItem aci = (ActionContributionItem) ci; existingActions.add(aci.getAction()); } } for (int i = 0; i < actions.length - 1; i++) if (!existingActions.contains(actions[i])) cm.add(actions[i]);