本文整理汇总了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 );
}