本文整理匯總了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);
}
示例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 );
}
示例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);
}
示例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 );
}
示例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);
}
示例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 );
}