mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 354777 - New C/C++ wizard toolbar dropdown should be refreshed on
every click
This commit is contained in:
parent
e0b1937020
commit
5e895042d5
1 changed files with 12 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 IBM Corporation and others.
|
* Copyright (c) 2000, 2011 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -71,13 +71,11 @@ public abstract class AbstractWizardDropDownAction extends Action implements IMe
|
||||||
|
|
||||||
public Menu getMenu(Control parent) {
|
public Menu getMenu(Control parent) {
|
||||||
synchronized(fLock) {
|
synchronized(fLock) {
|
||||||
if (fMenu == null) {
|
fMenu= new Menu(parent);
|
||||||
fMenu= new Menu(parent);
|
IAction[] actions= getActions();
|
||||||
IAction[] actions= getActions();
|
for (int i= 0; i < actions.length; i++) {
|
||||||
for (int i= 0; i < actions.length; i++) {
|
ActionContributionItem item= new ActionContributionItem(actions[i]);
|
||||||
ActionContributionItem item= new ActionContributionItem(actions[i]);
|
item.fill(fMenu, -1);
|
||||||
item.fill(fMenu, -1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return fMenu;
|
return fMenu;
|
||||||
}
|
}
|
||||||
|
@ -110,13 +108,12 @@ public abstract class AbstractWizardDropDownAction extends Action implements IMe
|
||||||
|
|
||||||
private IAction[] getActions() {
|
private IAction[] getActions() {
|
||||||
synchronized(fLock) {
|
synchronized(fLock) {
|
||||||
if (fActions == null) {
|
fActions = getWizardActions();
|
||||||
fActions = getWizardActions();
|
if (fActions == null)
|
||||||
if (fActions == null)
|
fActions = NO_ACTIONS;
|
||||||
fActions = NO_ACTIONS;
|
|
||||||
|
//TODO provide a way to sort the actions
|
||||||
|
|
||||||
//TODO provide a way to sort the actions
|
|
||||||
}
|
|
||||||
return fActions;
|
return fActions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue