本文整理匯總了Java中org.eclipse.ui.internal.presentations.SystemMenuRestore類的典型用法代碼示例。如果您正苦於以下問題:Java SystemMenuRestore類的具體用法?Java SystemMenuRestore怎麽用?Java SystemMenuRestore使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
SystemMenuRestore類屬於org.eclipse.ui.internal.presentations包,在下文中一共展示了SystemMenuRestore類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: StandardEditorSystemMenu
import org.eclipse.ui.internal.presentations.SystemMenuRestore; //導入依賴的package包/類
/**
* Create the standard view menu
*
* @param site the site to associate the view with
*/
public StandardEditorSystemMenu(IStackPresentationSite site) {
restore = new SystemMenuRestore(site);
move = new SystemMenuMove(site, getMoveMenuText(), false);
minimize = new SystemMenuMinimize(site);
maximize = new SystemMenuMaximize(site);
close = new SystemMenuClose(site);
closeOthers = new SystemMenuCloseOthers(site);
closeAll = new SystemMenuCloseAll(site);
{ // Initialize system menu
menuManager.add(new GroupMarker("misc")); //$NON-NLS-1$
menuManager.add(new GroupMarker("restore")); //$NON-NLS-1$
menuManager.add(new UpdatingActionContributionItem(restore));
menuManager.add(move);
menuManager.add(new GroupMarker("size")); //$NON-NLS-1$
menuManager.add(new GroupMarker("state")); //$NON-NLS-1$
menuManager.add(new UpdatingActionContributionItem(minimize));
menuManager.add(new UpdatingActionContributionItem(maximize));
menuManager.add(new Separator("close")); //$NON-NLS-1$
menuManager.add(close);
menuManager.add(closeOthers);
menuManager.add(closeAll);
site.addSystemActions(menuManager);
} // End of system menu initialization
}
示例2: StandardViewMenu
import org.eclipse.ui.internal.presentations.SystemMenuRestore; //導入依賴的package包/類
public StandardViewMenu(VSStackPresentation presentation, boolean addSystemActions) {
menuManager = new MenuManager();
IStackPresentationSite site = presentation.getSite();
restore = new SystemMenuRestore(site);
restore.setId("restore");
UIUtils.initAction(restore);
move = new SystemMenuMove(site, WorkbenchMessages.ViewPane_moveView, false);
minimize = new SystemMenuMinimize(site);
minimize.setId("minimize");
UIUtils.initAction(minimize);
maximize = new SystemMenuMaximize(site);
maximize.setId("maximize");
UIUtils.initAction(maximize);
close = new SystemMenuClose(presentation);
UIUtils.initAction(close);
SystemMenuToggleTabs toggleTabs = new SystemMenuToggleTabs(presentation, isViewMenu());
UIUtils.initAction(toggleTabs);
SystemMenuToggleToolbar toggleToolbar = null;
if(isViewMenu()){
toggleToolbar = new SystemMenuToggleToolbar(presentation);
UIUtils.initAction(toggleToolbar);
showView = new SystemMenuShowView(presentation);
}
{ // Initialize system menu
menuManager.add(new Separator("misc"));
menuManager.add(new Separator("restore"));
menuManager.add(new UpdatingActionContributionItem(restore));
menuManager.add(move);
menuManager.add(new GroupMarker("size"));
menuManager.add(new GroupMarker("state"));
menuManager.add(new UpdatingActionContributionItem(minimize));
menuManager.add(new UpdatingActionContributionItem(maximize));
menuManager.add(new Separator("toggle"));
menuManager.add(toggleTabs);
if(isViewMenu()){
menuManager.add(toggleToolbar);
}
if(isViewMenu()){
menuManager.add(showView);
}
menuManager.add(new Separator("list"));
menuManager.add(new Separator("close"));
menuManager.appendToGroup("close", close);
if(addSystemActions) {
site.addSystemActions(menuManager);
}
} // End of system menu initialization
if(isViewMenu()){
sortEditorList = new SystemMenuSortTabs(presentation);
UIUtils.initAction(sortEditorList);
menuManager.appendToGroup("list", sortEditorList);
}
}