当前位置: 首页>>代码示例>>Java>>正文


Java IMenuManager.add方法代码示例

本文整理汇总了Java中org.eclipse.jface.action.IMenuManager.add方法的典型用法代码示例。如果您正苦于以下问题:Java IMenuManager.add方法的具体用法?Java IMenuManager.add怎么用?Java IMenuManager.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.action.IMenuManager的用法示例。


在下文中一共展示了IMenuManager.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fillDialogMenu

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
/**
 * Fill the dialog's menu. Subclasses may extend or override.
 * 
 * @param dialogMenu
 *            The dialog's menu.
 */
protected void fillDialogMenu(IMenuManager dialogMenu) {
	dialogMenu.add(new GroupMarker("SystemMenuStart")); //$NON-NLS-1$
	// RAP [bm]: Tracker
	// dialogMenu.add(new MoveAction());
	// dialogMenu.add(new ResizeAction());
	if (showPersistActions) {
		if (isUsing34API) {
			dialogMenu.add(new PersistLocationAction());
			dialogMenu.add(new PersistSizeAction());
		} else {
			dialogMenu.add(new PersistBoundsAction());
		}
	}
	dialogMenu.add(new Separator("SystemMenuEnd")); //$NON-NLS-1$
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:22,代码来源:PopupDialog.java

示例2: fillContextMenu

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void fillContextMenu(IMenuManager manager) {

    ZooKeeperOpenAction openAction = getOpenAction();
    if (openAction != null && openAction.isEnabled()) {
        manager.add(openAction);
    }

    ZooKeeperDeleteAction deleteAction = getDeleteAction();
    if (deleteAction != null && deleteAction.isEnabled()) {
        manager.add(new Separator());
        manager.add(deleteAction);
    }

    RefreshAction refreshAction = getRefreshAction();
    if (refreshAction != null && refreshAction.isEnabled()) {
        manager.add(new Separator());
        manager.add(refreshAction);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:21,代码来源:AbstractZooKeeperDataModelElementType.java

示例3: fillLocalPullDown

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
private void fillLocalPullDown(IMenuManager manager) {
	manager.add(actionRelaunch);
	manager.add(actionRelaunchFailed);
	manager.add(actionStop);
	manager.add(new Separator());
	manager.add(actionLock);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:TestResultsView.java

示例4: createMenu

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
private void createMenu() {
	IMenuManager manager = getViewSite().getActionBars().getMenuManager();
	manager.add(selectColumnsAction);
	manager.add(restoreDefaultsAction);
	manager.add(new Separator());
	manager.add(limitLogCharsAction);
	manager.add(activateOnNewEventsAction);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:9,代码来源:EngineLogView.java

示例5: createControl

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
public void createControl(Composite parent) {
	super.createControl(parent);

	labelProvider = new BatchEditorOutlineLabelProvider();

	TreeViewer viewer = getTreeViewer();
	viewer.setContentProvider(contentProvider);
	viewer.addDoubleClickListener(this);
	viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(labelProvider));
	viewer.addSelectionChangedListener(this);

	/* it can happen that input is already updated before control created */
	if (input != null) {
		viewer.setInput(input);
	}
	toggleLinkingAction = new ToggleLinkingAction();
	toggleLinkingAction.setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR);
	
	IActionBars actionBars = getSite().getActionBars();
	
	IToolBarManager toolBarManager = actionBars.getToolBarManager();
	toolBarManager.add(toggleLinkingAction);
	
	IMenuManager viewMenuManager = actionBars.getMenuManager();
	viewMenuManager.add(new Separator("EndFilterGroup")); //$NON-NLS-1$

	viewMenuManager.add(new Separator("treeGroup")); //$NON-NLS-1$
	viewMenuManager.add(toggleLinkingAction);
	
	
	/*
	 * when no input is set on init state - let the editor rebuild outline
	 * (async)
	 */
	if (input == null && editor != null) {
		editor.rebuildOutline();
	}

}
 
开发者ID:de-jcup,项目名称:eclipse-batch-editor,代码行数:40,代码来源:BatchEditorContentOutlinePage.java

示例6: fillPopupMenu

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void fillPopupMenu(IMenuManager manager, SchemaViewer viewer) {
	for (String section : ORDERED_SECTIONS) {
           manager.add(new Separator(section));
       }
	IMenuService service = serviceProvider.getMenuService();
       service.populateContributionManager((ContributionManager) manager, getPopupMenuId());
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:9,代码来源:SchemaPopupMenuConfigurationImpl.java

示例7: addToolbarAction

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
private void addToolbarAction(String name, boolean toggle, String imageName, String description, Action action) {
	IMenuManager menuManager = getViewSite().getActionBars().getMenuManager();
	action.setImageDescriptor(ImageDescriptor.createFromImage(PandionJUI.getImage(imageName)));
	String tooltip = name;
	if(description != null)
		tooltip += "\n" + description;
	action.setToolTipText(tooltip);
	menuManager.add(action);
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:10,代码来源:PandionJView.java

示例8: fillContextMenu

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void fillContextMenu(IMenuManager manager) {

    BaseOpenAction openAction = getOpenAction();
    if (openAction != null && !openAction.getSelectionProvider().getSelection().isEmpty()) {
        manager.add(openAction);
    }

    RefreshAction refreshAction = getRefreshAction();
    if (refreshAction != null && !refreshAction.getSelectionProvider().getSelection().isEmpty()) {
        manager.add(new Separator());
        manager.add(refreshAction);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:15,代码来源:AbstractJmxDataModelElementType.java

示例9: fillLocalPullDown

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
private void fillLocalPullDown(IMenuManager manager) {
	manager.add(collapseAllAction);
	Action[] enabledActions = new Action[] {chooseFolderAction, showReadOnlyAction, copyPathAction};
	for (Action action : enabledActions) {
		if (action.isEnabled()) {
			manager.add(action);
		}
		
	}

	manager.add(new Separator());
	manager.add(viewModeAction);
	manager.add(addAction);
	manager.add(trackAction);
}
 
开发者ID:32kda,项目名称:com.onpositive.prefeditor,代码行数:16,代码来源:PreferenceView.java

示例10: fillContextMenu

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
private void fillContextMenu ( final IMenuManager manager )
{
    // Other plug-ins can contribute there actions here

    manager.add ( this.deleteAction );
    manager.add ( new Separator () );
    manager.add ( new Separator ( IWorkbenchActionConstants.MB_ADDITIONS ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:9,代码来源:FactoryEditor.java

示例11: fillLocalPullDown

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
private void fillLocalPullDown(IMenuManager manager) {
	manager.add(actionUpdate);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:4,代码来源:ApiCompareView.java

示例12: fillContextMenu

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
private void fillContextMenu(IMenuManager manager) {
	// Other plug-ins can contribute there actions here
	manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:5,代码来源:ProjectExplorerView.java

示例13: contributeToMenu

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
public void contributeToMenu(IMenuManager manager) {
	IMenuManager menu = new MenuManager("Editor &Menu");
	manager.prependToGroup(IWorkbenchActionConstants.MB_ADDITIONS, menu);
	menu.add(sampleAction);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:6,代码来源:CompDefEditorContributor.java

示例14: fillContextMenu

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
private void fillContextMenu ( final IMenuManager manager )
{
    manager.add ( new Separator ( IWorkbenchActionConstants.MB_ADDITIONS ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:5,代码来源:ServersViewer.java

示例15: fillMenuBar

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
protected void fillMenuBar ( final IMenuManager menuBar )
{
    final MenuManager fileMenu = new MenuManager ( "&File", IWorkbenchActionConstants.M_FILE );
    final MenuManager windowMenu = new MenuManager ( "&Window", IWorkbenchActionConstants.M_WINDOW );
    final MenuManager helpMenu = new MenuManager ( "&Help", IWorkbenchActionConstants.M_HELP );
    final MenuManager fileNewMenu = new MenuManager ( "&New", IWorkbenchActionConstants.NEW_EXT );
    final MenuManager windowNewMenu = new MenuManager ( "Show &View", IWorkbenchActionConstants.SHOW_EXT );

    // Main

    menuBar.add ( fileMenu );
    menuBar.add ( new GroupMarker ( IWorkbenchActionConstants.MB_ADDITIONS ) );
    menuBar.add ( windowMenu );
    menuBar.add ( helpMenu );

    // File
    fileMenu.add ( this.newWindowAction );
    fileMenu.add ( new Separator () );
    fileMenu.add ( fileNewMenu );
    fileMenu.add ( getAction ( ActionFactory.SAVE.getId () ) );
    fileMenu.add ( getAction ( ActionFactory.NEW_EDITOR.getId () ) );
    fileMenu.add ( new GroupMarker ( IWorkbenchActionConstants.OPEN_EXT ) );

    fileMenu.add ( new Separator () );
    fileMenu.add ( this.exitAction );

    fileNewMenu.add ( this.newWizards );

    // Window
    windowNewMenu.add ( this.showViews );
    windowMenu.add ( windowNewMenu );
    windowMenu.add ( getAction ( ActionFactory.PREFERENCES.getId () ) );

    // Help
    helpMenu.add ( getAction ( ActionFactory.INTRO.getId () ) );
    helpMenu.add ( this.showHelpAction ); // NEW
    helpMenu.add ( this.searchHelpAction ); // NEW
    helpMenu.add ( this.dynamicHelpAction ); // NEW
    helpMenu.add ( new GroupMarker ( IWorkbenchActionConstants.MB_ADDITIONS ) );
    helpMenu.add ( new Separator () );
    helpMenu.add ( this.aboutAction );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:44,代码来源:ApplicationActionBarAdvisor.java


注:本文中的org.eclipse.jface.action.IMenuManager.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。