Java Code Examples for org.eclipse.jface.action.Separator

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project acceleo-modules, under directory /psm-gen-scala/plugins/com.github.sbegaudeau.acceleo.modules.psm.gen.scala.editor/src-gen/com/github/sbegaudeau/acceleo/modules/psm/gen/scala/model/scala/presentation/.

Source file: ScalaActionBarContributor.java

  21 
vote

/** 
 * 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);
}
 

Example 2

From project acceleo-webapp-generator, under directory /plugins/org.eclipse.acceleo.tutorial.webapp.editor/src-gen/org/eclipse/acceleo/tutorial/webapp/presentation/.

Source file: WebappActionBarContributor.java

  21 
vote

/** 
 * 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);
}
 

Example 3

From project aws-toolkit-for-eclipse, under directory /com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/actions/.

Source file: ConfigurationActionProvider.java

  21 
vote

@Override public void fillContextMenu(IMenuManager menu){
  StructuredSelection selection=(StructuredSelection)getActionSite().getStructuredViewer().getSelection();
  if (selection.getFirstElement() instanceof ExplorerNode && selection.size() == 1) {
    ExplorerNode node=(ExplorerNode)selection.getFirstElement();
    if (node.getOpenAction() != null) {
      menu.add(node.getOpenAction());
      menu.add(new Separator());
    }
  }
}
 

Example 4

From project bel-editor, under directory /org.openbel.editor.ui/src/org/openbel/editor/ui/views/.

Source file: ResourceView.java

  21 
vote

private void fillContextMenu(IMenuManager manager){
  manager.add(action1);
  manager.add(action2);
  manager.add(new Separator());
  drillDownAdapter.addNavigationActions(manager);
  manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
 

Example 5

From project Bio-PEPA, under directory /uk.ac.ed.inf.common.ui.plotview/src/uk/ac/ed/inf/common/ui/plotview/views/.

Source file: PlotView.java

  21 
vote

private void fillLocalToolBar(IToolBarManager manager){
  manager.add(renameTabAction);
  manager.add(detachAction);
  manager.add(closeTabAction);
  manager.add(new Separator());
  manager.add(saveToPNGAction);
  manager.add(saveToCSVAction);
}
 

Example 6

From project bioclipse.speclipse, under directory /plugins/net.bioclipse.specmol/src/net/bioclipse/specmol/editor/.

Source file: SpecMolEditorContributor.java

  21 
vote

@Override public void contributeToToolBar(IToolBarManager toolBarManager){
  toolBarManager.add(new Separator());
  toolBarManager.add(assignAction);
  toolBarManager.add(switchModeAction);
  super.contributeToToolBar(toolBarManager);
}
 

Example 7

From project bndtools, under directory /bndtools.core/src/bndtools/views/.

Source file: RepositoriesView.java

  21 
vote

private void fillToolBar(IToolBarManager toolBar){
  toolBar.add(refreshAction);
  toolBar.add(collapseAllAction);
  toolBar.add(addBundlesAction);
  toolBar.add(new Separator());
}
 

Example 8

From project bpelunit, under directory /tycho/net.bpelunit.framework.client.eclipse/src/net/bpelunit/framework/client/eclipse/views/.

Source file: BPELUnitView.java

  21 
vote

private void fillLocalToolBar(IToolBarManager manager){
  manager.add(fStopTestAction);
  manager.add(fReRunAction);
  manager.add(new Separator());
  drillDownAdapter.addNavigationActions(manager);
}
 

Example 9

From project BPMN2-Editor-for-Eclipse, under directory /org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/.

Source file: ImprovedAdvancedPropertiesComposite.java

  21 
vote

protected void buildMenu(MenuManager manager){
  EObject selectedElem=getSelectedBaseElement();
  createElementProperties(manager,selectedElem);
  manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  if (selectedElem != null) {
    manager.add(createRemoveAction(selectedElem));
  }
  manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  createRootProperties(manager);
}
 

Example 10

From project ceylon-ide-eclipse, under directory /plugins/com.redhat.ceylon.eclipse.ui/src/com/redhat/ceylon/eclipse/code/editor/.

Source file: CeylonEditor.java

  21 
vote

protected void rulerContextMenuAboutToShow(IMenuManager menu){
  addDebugActions(menu);
  super.rulerContextMenuAboutToShow(menu);
  menu.appendToGroup(GROUP_RULERS,new Separator());
  IAction action;
  action=getAction("FoldingExpandAll");
  menu.appendToGroup(GROUP_RULERS,action);
  action=getAction("FoldingCollapseAll");
  menu.appendToGroup(GROUP_RULERS,action);
}
 

Example 11

From project CIShell, under directory /clients/gui/org.cishell.reference.gui.workspace/src/org/cishell/reference/gui/workspace/.

Source file: ApplicationActionBarAdvisor.java

  21 
vote

protected void fillMenuBar(IMenuManager menuBar){
  CIShellApplication.setMenuManager(menuBar);
  MenuManager fileMenu=new MenuManager("&File",IWorkbenchActionConstants.M_FILE);
  menuBar.add(fileMenu);
  MenuManager helpMenu=createMenu("&Help",IWorkbenchActionConstants.M_HELP);
  helpMenu.add(new Separator());
  helpMenu.appendToGroup("end",aboutAction);
  menuBar.add(new GroupMarker("start"));
  menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
  menuBar.add(new GroupMarker("end"));
  menuBar.add(helpMenu);
}
 

Example 12

From project Database-Designer, under directory /plugins/org.obeonetwork.dsl.database.editor/src/org/obeonetwork/dsl/database/presentation/.

Source file: DatabaseActionBarContributor.java

  21 
vote

/** 
 * 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);
}
 

Example 13

From project dawn-isenciaui, under directory /com.isencia.passerelle.workbench.model.editor.ui/src/main/java/com/isencia/passerelle/workbench/model/editor/ui/views/.

Source file: ActorTreeMenuProvider.java

  21 
vote

/** 
 * Builds the context menu. Single selection menu and multiple selection menu are created while selecting just single element or multiple elements
 * @param menu the menu
 */
public void buildContextMenu(IMenuManager menu){
  menu.add(new Separator(GEFActionConstants.GROUP_EDIT));
  TreeViewer tree=(TreeViewer)getViewer();
  TreeSelection treeSelection=(TreeSelection)tree.getSelection();
  Object element=treeSelection.getFirstElement();
  if (element instanceof SubModelPaletteItemDefinition) {
    createCompositeMenu(menu,element);
  }
 else   if (element instanceof PaletteGroup) {
    if (((PaletteGroup)element).getName().equals("Composites")) {
      createCompositeMenu(menu,element);
    }
  }
}
 

Example 14

From project dawn-tango, under directory /org.dawb.tango.extensions/src/org/dawb/tango/extensions/editors/.

Source file: SharedMemoryEditor.java

  21 
vote

/** 
 * Override to provide extra content.
 * @param toolMan
 */
protected void createCustomToolbarActionsRight(final ToolBarManager toolMan){
  toolMan.add(new Separator(getClass().getName() + "Separator1"));
  final Action tableColumns=new Action("Open editor preferences.",IAction.AS_PUSH_BUTTON){
    @Override public void run(){
      PreferenceDialog pref=PreferencesUtil.createPreferenceDialogOn(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),"org.edna.workbench.editors.preferencePage",null,null);
      if (pref != null)       pref.open();
    }
  }
;
  tableColumns.setChecked(false);
  tableColumns.setImageDescriptor(Activator.getImageDescriptor("icons/application_view_columns.png"));
  toolMan.add(tableColumns);
}
 

Example 15

From project dawn-ui, under directory /org.dawb.workbench.plotting/src/org/dawb/workbench/plotting/system/.

Source file: LightWeightActionBarsManager.java

  21 
vote

public void init(){
  xyMenu=new MenuAction("X/Y Plot");
  system.getActionBars().getMenuManager().add(xyMenu);
  system.getActionBars().getMenuManager().add(new Separator());
  imageMenu=new MenuAction("Image");
  system.getActionBars().getMenuManager().add(imageMenu);
  system.getActionBars().getMenuManager().add(new Separator());
}
 

Example 16

From project dawn-workflow, under directory /org.dawb.passerelle.actors/src/org/dawb/passerelle/editors/.

Source file: EdnaActorActions.java

  21 
vote

public static void createOutputActions(final IContributionManager toolMan){
  toolMan.add(addXPath);
  toolMan.add(deleteXPath);
  toolMan.add(new Separator(EdnaActorActions.class.getName() + ".output.sep3"));
  toolMan.add(revertOutput);
}
 

Example 17

From project droolsjbpm-tools, under directory /drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/.

Source file: RepositoryView.java

  21 
vote

private void fillLocalPullDown(IMenuManager manager){
  manager.add(deleteRepositoryLocAction);
  manager.add(new Separator());
  manager.add(addRepositoryLocAction);
  manager.add(new Separator());
  manager.add(refreshAction);
}
 

Example 18

From project eclipse-integration-cloudfoundry, under directory /org.cloudfoundry.ide.eclipse.server.ui/src/org/cloudfoundry/ide/eclipse/internal/server/ui/editor/.

Source file: CloudFoundryApplicationsEditorPage.java

  21 
vote

private void createRefreshAction(){
  IToolBarManager toolBarManager=sform.getToolBarManager();
  if (toolBarManager.getItems().length > 0) {
    toolBarManager.add(new Separator());
  }
  toolBarManager.add(new RefreshApplicationEditorAction(this));
  toolBarManager.update(true);
}
 

Example 19

From project eclipse-integration-commons, under directory /org.springsource.ide.eclipse.dashboard.ui/src/org/springsource/ide/eclipse/dashboard/internal/ui/editors/.

Source file: StsTaskEditorActionContributor.java

  21 
vote

public void addClipboardActions(IMenuManager manager){
  manager.add(undoAction);
  manager.add(redoAction);
  manager.add(new Separator());
  manager.add(cutAction);
  manager.add(copyAction);
  manager.add(pasteAction);
  manager.add(selectAllAction);
  manager.add(new Separator());
}
 

Example 20

From project eclipse-task-editor, under directory /plugins/de.sebastianbenz.task.application/src/de/sebastianbenz/task/app/actions/.

Source file: TaskEditorActionBarAdvisor.java

  21 
vote

protected void fillCoolBar(ICoolBarManager cbManager){
  cbManager.add(new GroupMarker("group.file"));
{
    IToolBarManager fileToolBar=new ToolBarManager(cbManager.getStyle());
    fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP));
    fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT));
    fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_GROUP));
    fileToolBar.add(getAction(ActionFactory.SAVE.getId()));
    cbManager.add(new ToolBarContributionItem(fileToolBar,IWorkbenchActionConstants.TOOLBAR_FILE));
  }
  cbManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
  cbManager.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR));
}
 

Example 21

From project Eclipse-Terminal, under directory /com.randomwalking.eclipse.console.terminal/src/com/randomwalking/eclipse/console/terminal/.

Source file: TerminalConsolePage.java

  21 
vote

protected void createActions(){
  final IActionBars actionBars=getSite().getActionBars();
  clearConsoleAction=new ClearTerminalConsoleAction(terminal,"Clear","Clear Console");
  closeConsoleAction=new CloseTerminalConsoleAction((TerminalConsole)getConsole(),"Close","Close Terminal");
  final IActionBars bars=getSite().getActionBars();
  final IToolBarManager toolbarManager=bars.getToolBarManager();
  toolbarManager.prependToGroup(IConsoleConstants.LAUNCH_GROUP,new GroupMarker(SCRIPT_GROUP));
  toolbarManager.appendToGroup(SCRIPT_GROUP,new Separator());
  toolbarManager.appendToGroup(SCRIPT_GROUP,closeConsoleAction);
  toolbarManager.appendToGroup(SCRIPT_GROUP,new Separator());
  toolbarManager.appendToGroup(SCRIPT_GROUP,clearConsoleAction);
  actionBars.updateActionBars();
}
 

Example 22

From project eclipsefp, under directory /net.sf.eclipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/editors/haskell/.

Source file: HaskellEditor.java

  21 
vote

@Override public void editorContextMenuAboutToShow(final IMenuManager menu){
  super.editorContextMenuAboutToShow(menu);
  if (isEditable()) {
    IMenuManager mmSource=new MenuManager("Source","source");
    menu.prependToGroup(ITextEditorActionConstants.GROUP_EDIT,mmSource);
    mmSource.add(new Separator("comments"));
    mmSource.add(new Separator("formatting"));
    mmSource.add(new Separator("organize"));
    addAction(mmSource,"comments","Comment");
    addAction(mmSource,"comments","Uncomment");
  }
}
 

Example 23

From project EMF-IncQuery, under directory /tests/org.eclipse.viatra2.emf.incquery.snapshot.editor/src/org/eclipse/viatra2/emf/incquery/snapshot/EIQSnapshot/presentation/.

Source file: EIQSnapshotActionBarContributor.java

  21 
vote

/** 
 * 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);
}
 

Example 24

From project Extensions2Services, under directory /eu.wwuk.eclipse.extsvcs.examples.client/src/eu/wwuk/eclipse/extsvcs/examples/client/.

Source file: ApplicationActionBarAdvisor.java

  21 
vote

protected void fillMenuBar(IMenuManager menuBar){
  MenuManager windowMenu=new MenuManager("Window");
  menuBar.add(windowMenu);
  windowMenu.add(viewsShortlist);
  windowMenu.add(new Separator());
  windowMenu.add(openPrefs);
}
 

Example 25

From project fr.obeo.performance, under directory /fr.obeo.performance.editor/src-gen/fr/obeo/performance/presentation/.

Source file: PerformanceActionBarContributor.java

  21 
vote

/** 
 * 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);
}
 

Example 26

From project gmc, under directory /src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/.

Source file: ApplicationActionBarAdvisor.java

  21 
vote

protected void fillMenuBar(IMenuManager menuBar){
  MenuManager fileMenu=new MenuManager("&File",IWorkbenchActionConstants.M_FILE);
  fileMenu.add(new Separator());
  fileMenu.add(exitAction);
  MenuManager helpMenu=new MenuManager("&Help",IWorkbenchActionConstants.M_HELP);
  helpMenu.add(helpContentsAction);
  helpMenu.add(aboutAction);
  menuBar.add(fileMenu);
  menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
  menuBar.add(helpMenu);
}
 

Example 27

From project grails-ide, under directory /org.grails.ide.eclipse.ui/src/org/grails/ide/eclipse/ui/internal/inplace/.

Source file: GrailsInplaceDialog.java

  21 
vote

private void fillViewMenu(IMenuManager viewMenu){
  viewMenu.add(new GroupMarker("SystemMenuStart"));
  viewMenu.add(new MoveAction());
  viewMenu.add(new ResizeAction());
  viewMenu.add(new PinDownAction());
  viewMenu.add(new RememberBoundsAction());
  viewMenu.add(new Separator("SystemMenuEnd"));
}
 

Example 28

From project incubator, under directory /net.karlmartens.ui/src/net/karlmartens/ui/widget/.

Source file: SortColumnsContribution.java

  21 
vote

@Override protected IContributionItem[] getContributionItems(){
  if (!_manager.isSortEnabled() || _columnIndex < 0 || _columnIndex >= _table.getColumnCount())   return new IContributionItem[0];
  final IContributionItem[] items=new IContributionItem[3];
  items[0]=new ActionContributionItem(new SortColumnAction(_table,_columnIndex,Table.SORT_ASCENDING,_bundle.getString("SortColumnAction.Ascending.TEXT")));
  items[1]=new ActionContributionItem(new SortColumnAction(_table,_columnIndex,Table.SORT_DESCENDING,_bundle.getString("SortColumnAction.Descending.TEXT")));
  items[2]=new Separator();
  return items;
}
 

Example 29

From project ivyde, under directory /org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/.

Source file: ResolveVisualizerView.java

  21 
vote

private void fillLocalToolBar(IToolBarManager toolBarManager){
  toolBarManager.add(refreshAction);
  toolBarManager.add(focusDialogActionToolbar);
  toolBarManager.add(new Separator());
  toolBarManager.add(historyAction);
  toolBarManager.add(forwardAction);
}
 

Example 30

From project JGit, under directory /org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/.

Source file: GitHistoryPage.java

  21 
vote

private void finishContextMenu(){
  popupMgr.add(new Separator());
  popupMgr.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  getSite().registerContextMenu(POPUP_ID,popupMgr,revObjectSelectionProvider);
  getHistoryPageSite().getPart().getSite().setSelectionProvider(revObjectSelectionProvider);
}
 

Example 31

From project m2eclipse-hudson, under directory /org.sonatype.m2e.hudson.ui/src/main/java/com/sonatype/buildserver/eclipse/ui/view/.

Source file: JobView.java

  21 
vote

private void populateToolbar(){
  IActionBars bars=getViewSite().getActionBars();
  IToolBarManager toolbarManager=bars.getToolBarManager();
  toolbarManager.add(buildNowAction);
  toolbarManager.add(new Separator());
  toolbarManager.add(addAction);
  toolbarManager.add(refreshAction);
  toolbarManager.add(removeAction);
  toolbarManager.add(new Separator());
  bars.getMenuManager().add(hideServerAction);
  bars.getMenuManager().add(hideLastBuildAction);
}
 

Example 32

From project m2eclipse-webby, under directory /org.sonatype.m2e.webby/src/org/sonatype/m2e/webby/internal/view/.

Source file: WebbyView.java

  21 
vote

private void createToolbar(){
  IToolBarManager mgr=getViewSite().getActionBars().getToolBarManager();
  mgr.add(browse);
  mgr.add(new Separator());
  mgr.add(stop);
}
 

Example 33

From project mwe, under directory /plugins/org.eclipse.emf.mwe.ewm.editor/src/org/eclipse/emf/mwe/ewm/orchestration/presentation/.

Source file: OrchestrationActionBarContributor.java

  21 
vote

/** 
 * 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);
}
 

Example 34

From project mylyn.builds, under directory /org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/view/.

Source file: BuildsView.java

  21 
vote

protected void createPopupMenu(Composite parent){
  MenuManager menuManager=new MenuManager();
  menuManager.add(new GroupMarker("group.open"));
  menuManager.add(new Separator("group.edit"));
  menuManager.add(new Separator("group.file"));
  menuManager.add(new Separator("group.run"));
  menuManager.add(new Separator("group.refresh"));
  menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  menuManager.add(new Separator(BuildsUiConstants.GROUP_PROPERTIES));
  Menu contextMenu=menuManager.createContextMenu(parent);
  viewer.getTree().setMenu(contextMenu);
  getSite().registerContextMenu(menuManager,viewer);
}
 

Example 35

From project mylyn.docs, under directory /org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/wikitext/ui/editor/.

Source file: DefaultWikiTextSourceEditorOutline.java

  21 
vote

private void contextMenuAboutToShow(IMenuManager menuManager){
  menuManager.add(new Separator(ITextEditorActionConstants.GROUP_UNDO));
  menuManager.add(new GroupMarker(ITextEditorActionConstants.GROUP_SAVE));
  menuManager.add(new Separator(ITextEditorActionConstants.GROUP_COPY));
  menuManager.add(new Separator(ITextEditorActionConstants.GROUP_PRINT));
  menuManager.add(new Separator(ITextEditorActionConstants.GROUP_EDIT));
  menuManager.add(new Separator(ITextEditorActionConstants.GROUP_FIND));
  menuManager.add(new Separator(IWorkbenchActionConstants.GROUP_ADD));
  menuManager.add(new Separator(IWorkbenchActionConstants.GROUP_SHOW_IN));
  menuManager.add(new Separator(IWorkbenchActionConstants.GROUP_REORGANIZE));
  menuManager.add(new Separator(ITextEditorActionConstants.GROUP_REST));
  menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
 

Example 36

From project mylyn.incubator, under directory /org.eclipse.mylyn.sandbox.dev/src/org/eclipse/mylyn/internal/sandbox/dev/views/.

Source file: RepositorySpyView.java

  21 
vote

private void fillContextMenu(IMenuManager manager){
  manager.add(refreshViewAction);
  manager.add(clearConfigLastUpdateAction);
  manager.add(new Separator());
  drillDownAdapter.addNavigationActions(manager);
  manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
 

Example 37

From project neoclipse, under directory /org.neo4j.neoclipse/src/main/java/org/neo4j/neoclipse/reltype/.

Source file: RelationshipTypeView.java

  21 
vote

/** 
 * Add actions to the context menu.
 * @param manager contect menu manager
 */
private void fillContextMenu(final IMenuManager manager){
  manager.add(addOutgoingIcon);
  manager.add(addIncomingIcon);
  manager.add(deleteOutgoingIcon);
  manager.add(deleteIncomingIcon);
  manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
 

Example 38

From project netifera, under directory /platform/com.netifera.platform.host/com.netifera.platform.host.filesystem.ui/src/com/netifera/platform/host/filesystem/ui/.

Source file: FileSystemView.java

  21 
vote

/** 
 * Called just before right-click context menu is displayed. This is where the menu is dynamically built depending on the current selection and other state information.
 * @param menuManager menu for adding actions to.
 */
private void fillContextMenu(IMenuManager menuManager){
  IStructuredSelection selection=(IStructuredSelection)viewer.getSelection();
  if (selection.size() != 1)   return;
  Object obj=selection.getFirstElement();
  if (obj instanceof File) {
    if (((File)obj).isDirectory())     menuManager.add(refreshAction);
    menuManager.add(renameAction);
    menuManager.add(deleteAction);
  }
  menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
 

Example 39

From project org.openscada.dakara, under directory /org.openscada.vi.model.editor/src/org/openscada/vi/model/VisualInterface/presentation/.

Source file: VisualInterfaceActionBarContributor.java

  21 
vote

/** 
 * 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);
}
 

Example 40

From project phing-eclipse, under directory /org.ganoro.phing.ui/src/org/ganoro/phing/ui/editors/.

Source file: AntEditorActionContributor.java

  21 
vote

public void init(IActionBars bars){
  super.init(bars);
  IMenuManager menuManager=bars.getMenuManager();
  IMenuManager editMenu=menuManager.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
  if (editMenu != null) {
    editMenu.add(new Separator());
    editMenu.add(fContentAssistProposal);
    editMenu.add(fContentFormat);
  }
}
 

Example 41

From project radrails, under directory /plugins/com.aptana.ide.editor.erb/src/com/aptana/ide/editor/erb/actions/.

Source file: ERBActionContributor.java

  21 
vote

public void init(IActionBars bars){
  super.init(bars);
  IMenuManager menuManager=bars.getMenuManager();
  IMenuManager editMenu=menuManager.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
  if (editMenu != null) {
    editMenu.add(new Separator());
    editMenu.add(extractPartial);
  }
}
 

Example 42

From project rcputils, under directory /de.ralfebert.rcputils/src/de/ralfebert/rcputils/menus/.

Source file: ContextMenu.java

  21 
vote

/** 
 * Creates an empty context menu for a structured viewer and registers it for the given workbench part site. The created menu is intended to be filled using contributions to "org.eclipse.ui.menus" with locationURI "popup:<viewid>". If defaultItemHandling = true,
 */
public ContextMenu(StructuredViewer viewer,final IWorkbenchPartSite site){
  this.viewer=viewer;
  this.site=site;
  MenuManager menuManager=new MenuManager();
  menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  this.menu=menuManager.createContextMenu(viewer.getControl());
  viewer.getControl().setMenu(menu);
  site.registerContextMenu(menuManager,viewer);
  site.setSelectionProvider(viewer);
}
 

Example 43

From project rj-client, under directory /de.walware.rj.eclient.graphics/src/de/walware/rj/eclient/graphics/.

Source file: RGraphicCompositeActionSet.java

  21 
vote

public void contributeToActionsBars(final IServiceLocator serviceLocator,final IActionBars actionBars){
  fActionBars.add(actionBars);
  final IToolBarManager toolBar=actionBars.getToolBarManager();
  if (toolBar.find(CONTEXT_MENU_GROUP_ID) == null) {
    toolBar.insertBefore(SharedUIResources.ADDITIONS_MENU_ID,new Separator(CONTEXT_MENU_GROUP_ID));
  }
  if (toolBar.find(SIZE_MENU_GROUP_ID) == null) {
    toolBar.insertBefore(SharedUIResources.ADDITIONS_MENU_ID,new Separator(SIZE_MENU_GROUP_ID));
  }
  final ImageRegistry rGraphicsImageRegistry=RGraphicsPlugin.getDefault().getImageRegistry();
  toolBar.appendToGroup(CONTEXT_MENU_GROUP_ID,new HandlerContributionItem(new CommandContributionItemParameter(serviceLocator,null,HandlerContributionItem.NO_COMMAND_ID,null,rGraphicsImageRegistry.getDescriptor(RGraphicsPlugin.IMG_LOCTOOL_LOCATOR_DONE),null,null,"Stop Locator",null,null,HandlerContributionItem.STYLE_PUSH,null,true),fHandlerCollection.get(LOCATOR_DONE_COMMAND_ID)));
  toolBar.appendToGroup(CONTEXT_MENU_GROUP_ID,new HandlerContributionItem(new CommandContributionItemParameter(serviceLocator,null,HandlerContributionItem.NO_COMMAND_ID,null,rGraphicsImageRegistry.getDescriptor(RGraphicsPlugin.IMG_LOCTOOL_LOCATOR_CANCEL),null,null,"Cancel Locator",null,null,HandlerContributionItem.STYLE_PUSH,null,true),fHandlerCollection.get(LOCATOR_CANCEL_COMMAND_ID)));
}
 

Example 44

From project rj-servi, under directory /de.walware.rj.servi.rcpdemo2/src/de/walware/rj/servi/internal/rcpdemo/views/.

Source file: GraphDemoView.java

  21 
vote

protected void contributeToActionsBars(final IServiceLocator serviceLocator,final IActionBars actionBars){
  final IToolBarManager toolBar=actionBars.getToolBarManager();
  toolBar.add(new Separator("additions"));
  toolBar.insertBefore("additions",new Separator(CONTEXT_MENU_GROUP_ID));
  toolBar.insertBefore("additions",new Separator(SIZE_MENU_GROUP_ID));
  this.actionSet.contributeToActionsBars(serviceLocator,actionBars);
}
 

Example 45

From project sandbox, under directory /xeclipse/org.xwiki.eclipse.ui/src/main/java/org/xwiki/eclipse/ui/actions/.

Source file: DataManagerActionProvider.java

  21 
vote

public void fillContextMenu(IMenuManager menu){
  super.fillContextMenu(menu);
  menu.appendToGroup(ICommonMenuConstants.GROUP_ADDITIONS,connect);
  menu.appendToGroup(ICommonMenuConstants.GROUP_ADDITIONS,disconnect);
  menu.appendToGroup(ICommonMenuConstants.GROUP_ADDITIONS,new Separator());
  menu.appendToGroup(ICommonMenuConstants.GROUP_ADDITIONS,newSpace);
  menu.appendToGroup(ICommonMenuConstants.GROUP_ADDITIONS,newPage);
}
 

Example 46

From project savara-tools-eclipse, under directory /plugins/org.savara.tools.scenario/src/main/java/org/savara/tools/scenario/designer/editor/.

Source file: DesignerActionBarContributor.java

  21 
vote

public void contributeToToolBar(IToolBarManager toolBarManager){
  super.contributeToToolBar(toolBarManager);
  toolBarManager.add(getAction(org.eclipse.ui.actions.ActionFactory.UNDO.getId()));
  toolBarManager.add(getAction(org.eclipse.ui.actions.ActionFactory.REDO.getId()));
  toolBarManager.add(getAction(org.eclipse.ui.actions.ActionFactory.COPY.getId()));
  toolBarManager.add(getAction(org.eclipse.ui.actions.ActionFactory.PASTE.getId()));
  toolBarManager.add(new Separator());
  toolBarManager.add(new ZoomComboContributionItem(getPage()));
  toolBarManager.add(new Separator());
  toolBarManager.add(getAction(org.savara.tools.scenario.designer.editor.SimulateScenarioAction.ID));
  toolBarManager.add(getAction(org.savara.tools.scenario.designer.editor.ResetSimulationAction.ID));
  toolBarManager.add(getAction(org.savara.tools.scenario.designer.editor.GenerateImageAction.ID));
}
 

Example 47

From project scisoft-ui, under directory /uk.ac.diamond.scisoft.analysis.rcp/src/uk/ac/diamond/scisoft/analysis/rcp/plotting/.

Source file: Plot1DUIAdapter.java

  21 
vote

/** 
 * Please implement to setup the actions. @see Plot1DUIComplete
 * @param manager
 */
public void buildToolActions(IToolBarManager manager){
  manager.add(activateRegionZoom);
  manager.add(activateAreaZoom);
  manager.add(zoomAction);
  manager.add(changeColour);
  manager.add(activateXgrid);
  manager.add(activateYgrid);
  manager.add(new Separator(getClass().getName() + printButtonText));
  manager.add(saveGraph);
  manager.add(copyGraph);
  manager.add(printGraph);
}
 

Example 48

From project dawn-common, under directory /org.dawb.common.ui/src/org/dawb/common/ui/views/.

Source file: ImageMonitorView.java

  20 
vote

/** 
 * Create the actions.
 */
private void createActions(){
  final MenuManager menuManager=new MenuManager();
  gallery.setMenu(menuManager.createContextMenu(gallery));
  getSite().registerContextMenu(menuManager,null);
  final IToolBarManager man=getViewSite().getActionBars().getToolBarManager();
  final CheckableActionGroup grp=new CheckableActionGroup();
  final Action byDate=new Action("Sort by date, newest at the bottom",IAction.AS_CHECK_BOX){
    public void run(){
      currentComparitor=SortingUtils.DATE_SORT_BACKWARDS;
      refreshAll();
    }
  }
;
  byDate.setImageDescriptor(Activator.getImageDescriptor("icons/sortByDate.gif"));
  grp.add(byDate);
  man.add(byDate);
  byDate.setChecked(true);
  final Action byName=new Action("Sort by name",IAction.AS_CHECK_BOX){
    public void run(){
      currentComparitor=SortingUtils.NATURAL_SORT_CASE_INSENSITIVE;
      refreshAll();
    }
  }
;
  byName.setImageDescriptor(Activator.getImageDescriptor("icons/sortByName.gif"));
  grp.add(byName);
  man.add(byName);
  man.add(new Separator());
}
 

Example 49

From project dawn-product, under directory /org.dawb.workbench.application/src/org/edna/workbench/application/.

Source file: ApplicationActionBarAdvisor.java

  20 
vote

protected void fillCoolBar(final ICoolBarManager coolBar){
  IToolBarManager fileToolbar=new ToolBarManager(SWT.FLAT | SWT.RIGHT);
  fileToolbar.add(saveAction);
  fileToolbar.add(saveAllAction);
  coolBar.add(new ToolBarContributionItem(fileToolbar,"file"));
  IToolBarManager editToolbar=new ToolBarManager(SWT.FLAT | SWT.RIGHT);
  editToolbar.add(undoAction);
  editToolbar.add(redoAction);
  editToolbar.add(new Separator());
  editToolbar.add(cutAction);
  editToolbar.add(copyAction);
  editToolbar.add(pasteAction);
  editToolbar.add(new Separator());
  editToolbar.add(deleteAction);
  coolBar.add(new ToolBarContributionItem(editToolbar,"edit"));
  coolBar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  coolBar.add(new Separator("workbenchAdditions"));
}
 

Example 50

From project dozer, under directory /eclipse-plugin/net.sf.dozer.eclipse.plugin/src/org/dozer/eclipse/plugin/editorpage/pages/.

Source file: MappingMasterPage.java

  20 
vote

protected void fillContextMenu(IMenuManager manager){
  manager.removeAll();
  TreeSelection selection=(TreeSelection)filteredTree.getViewer().getSelection();
  Action fRemoveAction=new Action("Remove Class-Mapping"){
    @Override public void run(){
      StructuredSelection structuredSelection=(StructuredSelection)mappings.getSelection();
      Element selected=(Element)structuredSelection.getFirstElement();
      if ("mapping".equals(selected.getNodeName())) {
        deleteItem();
      }
 else       if ("field".equals(selected.getNodeName()) || "field-exclude".equals(selected.getNodeName())) {
        Element parentNode=(Element)selected.getParentNode();
        parentNode.getParentNode().removeChild(parentNode);
        mappings.refresh();
      }
    }
  }
;
  Action fFieldRemoveAction=new Action("Remove Field-Mapping"){
    @Override public void run(){
      deleteItem();
    }
  }
;
  if (!selection.isEmpty()) {
    manager.add(fAddClassMappingAction);
    manager.add(fRemoveAction);
    manager.add(new Separator());
    manager.add(fAddFieldMappingAction);
    manager.add(fAddFieldExcludeMappingAction);
    Element element=(Element)selection.getFirstElement();
    if ("field".equals(element.getNodeName()) || "field-exclude".equals(element.getNodeName())) {
      manager.add(fFieldRemoveAction);
    }
  }
}
 

Example 51

From project Eclipse, under directory /com.mobilesorcery.sdk.testing/src/com/mobilesorcery/sdk/testing/internal/ui/.

Source file: UnittestView.java

  20 
vote

void handleMenuAboutToShow(IMenuManager manager){
  IStructuredSelection selection=(IStructuredSelection)testRun.getSelectionProvider().getSelection();
  ITestSession session=testRun.getTestSession();
  if (session instanceof IRelaunchableTestSession) {
    manager.add(new RerunAction());
    manager.add(new Separator());
  }
  if (!selection.isEmpty()) {
    ITest testElement=(ITest)selection.getFirstElement();
    gotoLineAction.setSelection(selection);
    manager.add(gotoLineAction);
    if (session.getTestCount() > 0) {
      manager.add(new ExpandAllAction());
    }
  }
  manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS + "-end"));
}
 

Example 52

From project interactive-self-assessment, under directory /org.eclipse.ui.examples.javaeditor/javaeditorexamplesrc/org/eclipse/ui/examples/javaeditor/.

Source file: JavaActionContributor.java

  20 
vote

public void init(IActionBars bars){
  super.init(bars);
  IMenuManager menuManager=bars.getMenuManager();
  IMenuManager editMenu=menuManager.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
  if (editMenu != null) {
    editMenu.add(new Separator());
    editMenu.add(fContentAssistProposal);
    editMenu.add(fContentAssistTip);
  }
  IToolBarManager toolBarManager=bars.getToolBarManager();
  if (toolBarManager != null) {
    toolBarManager.add(new Separator());
    toolBarManager.add(fTogglePresentation);
  }
}
 

Example 53

From project libra, under directory /plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/.

Source file: BundleDependencyEditorPage.java

  20 
vote

void fillContextMenu(IMenuManager manager){
  manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  if (!viewer.getSelection().isEmpty()) {
    manager.add(new Action("Show Bundle Overview"){
      @Override public void run(){
        Object obj=((IStructuredSelection)viewer.getSelection()).getFirstElement();
        if (obj instanceof IBundle) {
          openDependencyPage((IBundle)obj);
        }
      }
    }
);
    manager.add(new Separator());
  }
  manager.add(zoomContributionItem);
}
 

Example 54

From project org.openscada.othala, under directory /org.openscada.othala.application/src/org/openscada/othala/application/.

Source file: ApplicationActionBarAdvisor.java

  20 
vote

@Override protected void fillMenuBar(final IMenuManager menuBar){
  final MenuManager fileMenu=new MenuManager("&File",IWorkbenchActionConstants.M_FILE);
  final MenuManager windowMenu=new MenuManager("&Window",IWorkbenchActionConstants.M_WINDOW);
  final MenuManager helpMenu=new MenuManager("&Help",IWorkbenchActionConstants.M_HELP);
  final MenuManager fileNewMenu=new MenuManager("&New",IWorkbenchActionConstants.NEW_EXT);
  final MenuManager windowNewMenu=new MenuManager("Show &View",IWorkbenchActionConstants.SHOW_EXT);
  menuBar.add(fileMenu);
  menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
  menuBar.add(windowMenu);
  menuBar.add(helpMenu);
  fileMenu.add(this.newWindowAction);
  fileMenu.add(new Separator());
  fileMenu.add(fileNewMenu);
  fileMenu.add(getAction(ActionFactory.SAVE.getId()));
  fileMenu.add(getAction(ActionFactory.NEW_EDITOR.getId()));
  fileMenu.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT));
  fileMenu.add(new Separator());
  fileMenu.add(this.exitAction);
  fileNewMenu.add(this.newWizards);
  windowNewMenu.add(this.showViews);
  windowMenu.add(windowNewMenu);
  windowMenu.add(getAction(ActionFactory.PREFERENCES.getId()));
  helpMenu.add(this.aboutAction);
  helpMenu.add(getAction(ActionFactory.INTRO.getId()));
}
 

Example 55

From project rascal-eclipse, under directory /src/org/rascalmpl/eclipse/terms/.

Source file: ActionContributor.java

  20 
vote

private void contribute(IMenuManager menuManager,final UniversalEditor editor,IConstructor menu){
  String label=((IString)menu.get("label")).getValue();
  if (menu.getName().equals("action") || menu.getName().equals("toggle") || menu.getName().equals("edit")) {
    contributeAction(menuManager,editor,menu,label);
  }
 else   if (menu.getName().equals("group")) {
    menuManager.add(new Separator(label));
    for (    IValue member : (IList)menu.get("members")) {
      contribute(menuManager,editor,(IConstructor)member);
    }
  }
 else   if (menu.getName().equals("menu")) {
    MenuManager sub=new MenuManager(label);
    menuManager.add(sub);
    for (    IValue member : (IList)menu.get("members")) {
      contribute(sub,editor,(IConstructor)member);
    }
  }
}
 

Example 56

From project samolisov-demo, under directory /Eclipse/RCP/Hyperbola/org.rcpbook.hyperbola.ui/src/org/rcpbook/hyperbola/ui/.

Source file: ApplicationActionBarAdvisor.java

  20 
vote

protected void fillMenuBar(IMenuManager menuBar){
  MenuManager layoutMenu=new MenuManager("Switch layout","layout");
  layoutMenu.add(perspectivesMenu);
  MenuManager hyperbolaMenu=new MenuManager("&Hyperbola","hyperbola");
  hyperbolaMenu.add(addContactAction);
  hyperbolaMenu.add(chatAction);
  hyperbolaMenu.add(new Separator());
  hyperbolaMenu.add(layoutMenu);
  hyperbolaMenu.add(new Separator());
  hyperbolaMenu.add(preferencesAction);
  hyperbolaMenu.add(new Separator());
  hyperbolaMenu.add(exitAction);
  MenuManager helpMenu=new MenuManager("&Help","help");
  helpMenu.add(helpAction);
  helpMenu.add(helpSearchAction);
  helpMenu.add(new Separator());
  helpMenu.add(aboutAction);
  menuBar.add(hyperbolaMenu);
  menuBar.add(helpMenu);
}
 

Example 57

From project eik, under directory /plugins/info.evanchik.eclipse.karaf.workbench/src/main/java/info/evanchik/eclipse/karaf/workbench/ui/views/bundle/.

Source file: BundlesView.java

  19 
vote

protected void initContextMenu(){
  final MenuManager menuMgr=new MenuManager("#PopupMenu");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    final IMenuManager manager){
      menuMgr.add(propertiesAction);
      menuMgr.add(new Separator());
      menuMgr.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    }
  }
);
  final Menu menu=menuMgr.createContextMenu(treeTableViewer.getControl());
  treeTableViewer.getControl().setMenu(menu);
  getSite().registerContextMenu(menuMgr,treeTableViewer);
}
 

Example 58

From project logsaw-app, under directory /net.sf.logsaw.ui/src/net/sf/logsaw/ui/editors/.

Source file: LogViewEditor.java

  19 
vote

private void hookContextMenu(){
  MenuManager menuMgr=new MenuManager("#PopupMenu");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    IMenuManager manager){
      manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    }
  }
);
  Menu menu=menuMgr.createContextMenu(viewer.getControl());
  viewer.getControl().setMenu(menu);
  getSite().registerContextMenu(menuMgr,viewer);
}