Java Code Examples for org.eclipse.ui.IWorkbenchActionConstants#M_EDIT

The following examples show how to use org.eclipse.ui.IWorkbenchActionConstants#M_EDIT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GamaActionBarAdvisor.java    From gama with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Creates and returns the Edit menu.
 */
private MenuManager createEditMenu() {
	final MenuManager menu = new MenuManager(IDEWorkbenchMessages.Workbench_edit, IWorkbenchActionConstants.M_EDIT);
	menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START));
	menu.add(undoAction);
	menu.add(redoAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));
	menu.add(new Separator());
	menu.add(getCutItem());
	menu.add(getCopyItem());
	menu.add(getPasteItem());
	menu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));
	menu.add(new Separator());
	menu.add(getDeleteItem());
	menu.add(getSelectAllItem());
	menu.add(new Separator());
	menu.add(getFindItem());
	menu.add(new GroupMarker(IWorkbenchActionConstants.FIND_EXT));
	menu.add(new Separator());
	menu.add(new GroupMarker(IWorkbenchActionConstants.ADD_EXT));
	menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END));
	menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
	return menu;
}
 
Example 2
Source File: ApplicationActionBarAdvisor.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 创建编辑菜单
 * @return 返回编辑菜单的 menu manager;
 */
private MenuManager createEditMenu() {
	MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.edit"),
			IWorkbenchActionConstants.M_EDIT); // &Edit
	menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START));
	// menu.add(undoAction);
	// menu.add(redoAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));
	menu.add(new Separator());
	menu.add(cutAction);
	menu.add(copyAction);
	menu.add(pasteAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));
	// menu.add(deleteAction);
	menu.add(renameAction);
	menu.add(new Separator());
	menu.add(findAction);
	menu.add(selectAllAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.FIND_EXT));
	// menu.add(new Separator());
	// menu.add(preferenceAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END));
	return menu;
}
 
Example 3
Source File: ApplicationActionBarAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 创建编辑菜单
 * @return 返回编辑菜单的 menu manager;
 */
private MenuManager createEditMenu() {
	MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.edit"),
			IWorkbenchActionConstants.M_EDIT); // &Edit
	menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START));
	menu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));
	menu.add(new Separator());
	menu.add(cutAction);
	menu.add(copyAction);
	menu.add(pasteAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));
	menu.add(new Separator());
	menu.add(findAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.FIND_EXT));
	menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END));
	menu.add(new Separator());
	menu.add(new GroupMarker("taskEdit"));
	return menu;
}
 
Example 4
Source File: ApplicationActionBarAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 创建编辑菜单
 * @return 返回编辑菜单的 menu manager;
 */
private MenuManager createEditMenu() {
	MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.edit"),
			IWorkbenchActionConstants.M_EDIT); // &Edit
	menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START));
	// menu.add(undoAction);
	// menu.add(redoAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));
	menu.add(new Separator());
	menu.add(cutAction);
	menu.add(copyAction);
	menu.add(pasteAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));
	menu.add(new Separator());
	menu.add(findAction);
	menu.add(new GroupMarker(IWorkbenchActionConstants.FIND_EXT));
	menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END));
	return menu;
}
 
Example 5
Source File: ApplicationActionBarAdvisor.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
protected void fillMenuBar(IMenuManager menuBar) {
	MenuManager fileMenu = new MenuManager("&File",
			IWorkbenchActionConstants.M_FILE);
	menuBar.add(fileMenu);
	fileMenu.add(exitAction);
	
	MenuManager editMenu = new MenuManager("&Edit",
			IWorkbenchActionConstants.M_EDIT);
	menuBar.add(editMenu);
	editMenu.add(preferenceAction);
}
 
Example 6
Source File: ApplicationActionBarAdvisor.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void fillMenuBar(IMenuManager menuBar) {
	MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
	menuBar.add(fileMenu);
	fileMenu.add(exitAction);

	MenuManager editMenu = new MenuManager("&Edit", IWorkbenchActionConstants.M_EDIT);
	menuBar.add(editMenu);
	editMenu.add(preferenceAction);
}
 
Example 7
Source File: ApplicationActionBarAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
protected void fillMenuBar(IMenuManager menuBar) {
	MenuManager fileMenu = new MenuManager("&File",
			IWorkbenchActionConstants.M_FILE);
	menuBar.add(fileMenu);
	fileMenu.add(exitAction);
	
	MenuManager editMenu = new MenuManager("&Edit",
			IWorkbenchActionConstants.M_EDIT);
	menuBar.add(editMenu);
	editMenu.add(preferenceAction);
}
 
Example 8
Source File: ApplicationActionBarAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void fillMenuBar(IMenuManager menuBar) {
	MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
	menuBar.add(fileMenu);
	fileMenu.add(exitAction);

	MenuManager editMenu = new MenuManager("&Edit", IWorkbenchActionConstants.M_EDIT);
	menuBar.add(editMenu);
	editMenu.add(preferenceAction);
}
 
Example 9
Source File: DesignerActionBarAdvisor.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates and returns the Edit menu.
 */
private MenuManager createEditMenu( )
{
	MenuManager menu = new MenuManager( DesignerWorkbenchMessages.Workbench_edit,
			IWorkbenchActionConstants.M_EDIT );
	menu.add( new GroupMarker( IWorkbenchActionConstants.EDIT_START ) );

	menu.add( undoAction );
	menu.add( redoAction );
	menu.add( new GroupMarker( IWorkbenchActionConstants.UNDO_EXT ) );
	menu.add( new Separator( ) );

	menu.add( cutAction );
	menu.add( copyAction );
	menu.add( pasteAction );
	menu.add( new GroupMarker( IWorkbenchActionConstants.CUT_EXT ) );
	menu.add( new Separator( ) );

	menu.add( deleteAction );
	menu.add( selectAllAction );
	menu.add( new Separator( ) );

	menu.add( findAction );
	menu.add( new GroupMarker( IWorkbenchActionConstants.FIND_EXT ) );
	menu.add( new Separator( ) );

	menu.add( new GroupMarker( IWorkbenchActionConstants.EDIT_END ) );
	menu.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
	return menu;
}
 
Example 10
Source File: ApplicationActionBarAdvisor.java    From elexis-3-core with Eclipse Public License 1.0 4 votes vote down vote up
protected void fillMenuBar(IMenuManager menuBar){
	
	fileMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_3,
			IWorkbenchActionConstants.M_FILE);
	fileMenu.addMenuListener(reflectRightsListener);
	editMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_4,
			IWorkbenchActionConstants.M_EDIT);
	editMenu.addMenuListener(reflectRightsListener);
	windowMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_5,
			IWorkbenchActionConstants.M_WINDOW);
	helpMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_6,
			IWorkbenchActionConstants.M_HELP);
	helpMenu.addMenuListener(reflectRightsListener);
	menuBar.add(fileMenu);
	menuBar.add(editMenu);
	menuBar.add(windowMenu);
	menuBar.add(helpMenu);
	
	fileMenu.add(GlobalActions.loginAction);
	fileMenu.add(GlobalActions.changeMandantAction);
	fileMenu.add(GlobalActions.connectWizardAction);
	fileMenu.add(GlobalActions.prefsAction);
	fileMenu.add(new Separator());
	fileMenu.add(GlobalActions.importAction);
	fileMenu.add(new GroupMarker(IMPORTER_GROUP));
	fileMenu.add(new Separator());
	// fileMenu.add(GlobalActions.updateAction);
	fileMenu.add(new GroupMarker(ADDITIONS));
	fileMenu.add(new Separator());
	fileMenu.add(GlobalActions.exitAction);
	
	editMenu.add(GlobalActions.copyAction);
	editMenu.add(GlobalActions.cutAction);
	editMenu.add(GlobalActions.pasteAction);

	
	GlobalActions.perspectiveMenu =
		new MenuManager(Messages.ApplicationActionBarAdvisor_7, "openPerspective"); //$NON-NLS-1$
	perspectiveMenu.add(resetPerspectiveAction);
	windowMenu.add(perspectiveMenu);
	
	GlobalActions.viewMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_9);
	GlobalActions.viewList = ContributionItemFactory.VIEWS_SHORTLIST.create(window);
	GlobalActions.viewMenu.add(GlobalActions.viewList);
	windowMenu.add(GlobalActions.viewMenu);
	windowMenu.addMenuListener(new IMenuListener() {
		
		@Override
		public void menuAboutToShow(IMenuManager manager){
			IContributionItem[] items = manager.getItems();
			for (IContributionItem iContributionItem : items) {
				if( "viewsShortlist".equals(iContributionItem.getId())) {
					iContributionItem.setVisible(CoreHub.acl.request(AC_SHOWVIEW));
				}
			}
		}
	});
	
	/* helpMenu.add(testAction); */
	helpMenu.add(GlobalActions.helpAction);
	helpMenu.add(new Separator("additions"));
	helpMenu.add(new Separator());
	helpMenu.add(GlobalActions.aboutAction);
}