Examples of IContextService


Examples of org.eclipse.ui.contexts.IContextService

        // create actions
        actionGroup = new EntryEditorWidgetActionGroup( mainWidget, configuration );
        actionGroup.fillToolBar( mainWidget.getToolBarManager() );
        actionGroup.fillMenu( mainWidget.getMenuManager() );
        actionGroup.fillContextMenu( mainWidget.getContextMenuManager() );
        IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
            IContextService.class );
        contextActivation = contextService.activateContext( BrowserCommonConstants.CONTEXT_DIALOGS );
        actionGroup.activateGlobalActionHandlers();

        // create the listener
        universalListener = new MultiValuedEntryEditorUniversalListener( mainWidget.getViewer(), configuration,
            actionGroup, actionGroup.getOpenDefaultEditorAction() );
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

     *
     * @param manager
     */
    public void contribute( IMenuManager manager ) {
        IWorkbench workbench = PlatformUI.getWorkbench();
        IContextService contextService = (IContextService) workbench.getService(IContextService.class);
        Collection<String> active = (Collection<String> )contextService.getActiveContextIds();
       
        MenuManager actionMenu = new MenuManager(name, id);
        final String actionExt = "action.ext";
    actionMenu.add(new GroupMarker(actionExt)); //$NON-NLS-1$
        actionMenu.add(new GroupMarker("modal.ext")); //$NON-NLS-1$
        for( ModalItem item : this ) {
            ToolProxy tool = (ToolProxy) item;
            String categoryId = tool.getCategoryId();
            if( contextService.getDefinedContextIds().contains(categoryId)){
                // we have an context for this tool category
                if( !active.contains( categoryId )){
                    continue; // skip this category please!
                }               
            }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

      if (actionSets[i].getId().equals(actionSetId))
        continue;
      IExtension ext = actionSets[i].getConfigurationElement().getDeclaringExtension();
      reg.removeExtension(ext, new Object[] { actionSets[i] });
    }
        IContextService contextService = (IContextService) PlatformUI.getWorkbench().getService(IContextService.class);
        contextService.activateContext("ru.runa.jbpm.ui.context");
  }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

    activateHandler(pasteAction.getId());
        activateHandler(ActionFactory.SELECT_ALL.getId());
    activateHandler(ActionFactory.UNDO.getId());
    activateHandler(ActionFactory.REDO.getId());
   
        IContextService ctx = (IContextService) getSite().getService(IContextService.class);
        ctx.activateContext("gefEditor.context");
  }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

      activateContext();
      activateHandlers();
  }
 
  private void activateContext() {
        IContextService contextService = (IContextService)getSite().getService(IContextService.class);
        contextService.activateContext(EDITOR_CONTEXT_ID);
  }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

      window.getPartService().addPartListener(_partListener);
      window.getShell().addShellListener(_partListener);
     
      // TODO: is this the right place to do this?
      // enable our editor context
      IContextService contextService = (IContextService) getSite()
        .getService(IContextService.class);
      contextService.activateContext("org.eclipse.jst.pagedesigner.editorContext"); //$NON-NLS-1$

    } catch (Exception e) {
      // Error in editor initialization
      _log.error("Error.HTMLEditor.5", e); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

   * </p>
   *
   * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createPartControl(org.eclipse.swt.widgets.Composite)
   */
  public void createPartControl(Composite parent) {
    IContextService contextService = (IContextService) getSite().getService(IContextService.class);
    if (contextService != null)
      contextService.activateContext(EDITOR_KEYBINDING_SCOPE_ID);

    if (getSourceViewerConfiguration() == null) {
      ConfigurationAndTarget cat = createSourceViewerConfiguration();
      fViewerConfigurationTargetId = cat.getTargetId();
      StructuredTextViewerConfiguration newViewerConfiguration = cat.getConfiguration();
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

   * </p>
   *
   * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createPartControl(org.eclipse.swt.widgets.Composite)
   */
  public void createPartControl(Composite parent) {
    IContextService contextService = (IContextService) getSite().getService(IContextService.class);
    if (contextService != null)
      contextService.activateContext(EDITOR_KEYBINDING_SCOPE_ID);

    if (getSourceViewerConfiguration() == null) {
      ConfigurationAndTarget cat = createSourceViewerConfiguration();
      fViewerConfigurationTargetId = cat.getTargetId();
      StructuredTextViewerConfiguration newViewerConfiguration = cat.getConfiguration();
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

      window.getPartService().addPartListener(_partListener);
      window.getShell().addShellListener(_partListener);
     
      // TODO: is this the right place to do this?
      // enable our editor context
      IContextService contextService = (IContextService) getSite()
        .getService(IContextService.class);
      contextService.activateContext("org.eclipse.jst.pagedesigner.editorContext"); //$NON-NLS-1$

    } catch (Exception e) {
      // Error in editor initialization
      _log.error("Error.HTMLEditor.5", e); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

        if ( partRef.getPart( false ) == this && contextActivation != null )
        {

            this.deactivateGlobalActionHandlers();

            IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                IContextService.class );
            contextService.deactivateContext( contextActivation );
            contextActivation = null;
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.