use of org.eclipse.wst.xsd.ui.internal.refactor.actions.SelectionDispatchAction in project webtools.sourceediting by eclipse.
the class RefactorActionGroup method refactorMenuHidden.
private void refactorMenuHidden(IMenuManager manager) {
for (Iterator iter = fEditorActions.iterator(); iter.hasNext(); ) {
Action action = (Action) iter.next();
if (action instanceof SelectionDispatchAction) {
SelectionDispatchAction selectionAction = (SelectionDispatchAction) action;
selectionAction.update(selection);
}
}
}
use of org.eclipse.wst.xsd.ui.internal.refactor.actions.SelectionDispatchAction in project webtools.sourceediting by eclipse.
the class RefactorActionGroup method refactorMenuShown.
private void refactorMenuShown(final IMenuManager refactorSubmenu) {
// we know that we have an MenuManager since we created it in
// addRefactorSubmenu.
Menu menu = ((MenuManager) refactorSubmenu).getMenu();
menu.addMenuListener(new MenuAdapter() {
public void menuHidden(MenuEvent e) {
refactorMenuHidden(refactorSubmenu);
}
});
for (Iterator iter = fEditorActions.iterator(); iter.hasNext(); ) {
Action action = (Action) iter.next();
if (action instanceof SelectionDispatchAction) {
SelectionDispatchAction selectionAction = (SelectionDispatchAction) action;
selectionAction.update(selection);
}
}
refactorSubmenu.removeAll();
if (fillRefactorMenu(refactorSubmenu) == 0)
refactorSubmenu.add(fNoActionAvailable);
}
use of org.eclipse.wst.xsd.ui.internal.refactor.actions.SelectionDispatchAction in project webtools.sourceediting by eclipse.
the class RefactorActionGroup method fillActions.
public void fillActions(List enabledActions) {
if (selection != null && fEditorActions != null) {
for (Iterator iter = fEditorActions.iterator(); iter.hasNext(); ) {
Action action = (Action) iter.next();
if (action instanceof SelectionDispatchAction) {
SelectionDispatchAction selectionAction = (SelectionDispatchAction) action;
selectionAction.update(selection);
}
}
for (Iterator iter = fEditorActions.iterator(); iter.hasNext(); ) {
Action action = (Action) iter.next();
if (action != null) {
enabledActions.add(action);
}
}
}
}
Aggregations