當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。