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


Java IMenuManager.insertAfter方法代码示例

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


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

示例1: addGlobalActions

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
/**
 * This inserts global actions before the "additions-end" separator.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void addGlobalActions(IMenuManager menuManager) {
	menuManager.insertAfter("additions-end", new Separator("ui-actions"));
	menuManager.insertAfter("ui-actions", showPropertiesViewAction);

	refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());		
	menuManager.insertAfter("ui-actions", refreshViewerAction);

	super.addGlobalActions(menuManager);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:17,代码来源:HrmActionBarContributor.java

示例2: addGlobalActions

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
/**
 * This inserts global actions before the "additions-end" separator.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void addGlobalActions ( IMenuManager menuManager )
{
    menuManager.insertAfter ( "additions-end", new Separator ( "ui-actions" ) ); //$NON-NLS-1$ //$NON-NLS-2$
    menuManager.insertAfter ( "ui-actions", showPropertiesViewAction ); //$NON-NLS-1$

    refreshViewerAction.setEnabled ( refreshViewerAction.isEnabled () );
    menuManager.insertAfter ( "ui-actions", refreshViewerAction ); //$NON-NLS-1$

    super.addGlobalActions ( menuManager );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:ProtocolActionBarContributor.java

示例3: addGlobalActions

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
/**
 * This inserts global actions before the "additions-end" separator.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void addGlobalActions(IMenuManager menuManager) {
	menuManager.insertAfter("additions-end", new Separator("ui-actions")); //$NON-NLS-1$ //$NON-NLS-2$
	menuManager.insertAfter("ui-actions", showPropertiesViewAction); //$NON-NLS-1$

	refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
	menuManager.insertAfter("ui-actions", refreshViewerAction); //$NON-NLS-1$

	super.addGlobalActions(menuManager);
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:17,代码来源:ChartActionBarContributor.java

示例4: addGlobalActions

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
/**
 * This inserts global actions before the "additions-end" separator. <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
@Override
protected void addGlobalActions ( final IMenuManager menuManager )
{
    menuManager.insertAfter ( "additions-end", new Separator ( "ui-actions" ) );
    menuManager.insertAfter ( "ui-actions", this.showPropertiesViewAction );

    this.refreshViewerAction.setEnabled ( this.refreshViewerAction.isEnabled () );
    menuManager.insertAfter ( "ui-actions", this.refreshViewerAction );
    menuManager.insertAfter ( "ui-actions", this.saveAsAction );

    super.addGlobalActions ( menuManager );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:ChartActionBarContributor.java

示例5: fillContextMenu

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

	ActionContributionItem pasteContribution = getPasteContribution(menu.getItems());
	menu.remove(pasteContribution);
	IAction pasteAction = new Action(PASTE_ACTION_TEXT) {
		@Override
		public void run() {
			IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench()
					.getService(IHandlerService.class);
			try {
				JobCopyParticipant.setCopiedFileList(new ArrayList<>());
				handlerService.executeCommand(PASTE_COMMAND_ID, null);
			} catch (Exception exception) {
				logger.warn("Error while pasting job files :: {}",exception.getMessage());
			}
		}
	};
	pasteAction.setAccelerator(SWT.MOD1 | 'v');
	Bundle bundle = Platform.getBundle(MENU_PLUGIN_NAME);
	URL imagePath = BundleUtility.find(bundle,ImagePathConstant.PASTE_IMAGE_PATH.getValue());
	ImageDescriptor imageDescriptor = ImageDescriptor.createFromURL(imagePath);
	pasteAction.setImageDescriptor(imageDescriptor);
	menu.insertAfter(COPY_ACTION_ID, pasteAction);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:28,代码来源:CustomEditActionProvider.java

示例6: addGlobalActions

import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
/**
 * This inserts global actions before the "additions-end" separator.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected void addGlobalActions ( IMenuManager menuManager )
{
    menuManager.insertAfter ( "additions-end", new Separator ( "ui-actions" ) );
    menuManager.insertAfter ( "ui-actions", showPropertiesViewAction );

    refreshViewerAction.setEnabled ( refreshViewerAction.isEnabled () );
    menuManager.insertAfter ( "ui-actions", refreshViewerAction );

    super.addGlobalActions ( menuManager );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:MemoryActionBarContributor.java


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