Package org.eclipse.ui.contexts

Examples of org.eclipse.ui.contexts.IContextService.activateContext()


        this.actionGroup.fillToolBar( this.mainWidget.getToolBarManager() );
        this.actionGroup.fillMenu( this.mainWidget.getMenuManager() );
        this.actionGroup.fillContextMenu( this.mainWidget.getContextMenuManager() );
        IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
            IContextService.class );
        contextActivation = contextService.activateContext( BrowserCommonConstants.CONTEXT_DIALOGS );
        actionGroup.activateGlobalActionHandlers();

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


  }

  private void activateContext() {
    IContextService service = (IContextService) getSite().getService(
        IContextService.class);
    service.activateContext(CONTEXT_ID);
  }

  /**
   * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createActions()
   */
 
View Full Code Here

        this.actionGroup.fillToolBar( this.mainWidget.getToolBarManager() );
        this.actionGroup.fillMenu( this.mainWidget.getMenuManager() );
        this.actionGroup.fillContextMenu( this.mainWidget.getContextMenuManager() );
        IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
            IContextService.class );
        contextActivation = contextService.activateContext( BrowserCommonConstants.CONTEXT_DIALOGS );
        actionGroup.activateGlobalActionHandlers();       

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

        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 EntryEditorWidgetUniversalListener( mainWidget.getViewer(), actionGroup
            .getOpenDefaultEditorAction() );
View Full Code Here

      service = (IContextService) page.getWorkbenchWindow().getService(
          IContextService.class);
    }
        try {
          if (service!=null) {
            service.activateContext(ContextAuthority.DEFER_EVENTS);
          }
      for (Iterator iter = temp.iterator(); iter.hasNext();) {
        IActionSetDescriptor descriptor = (IActionSetDescriptor) iter
            .next();
        addAlwaysOn(descriptor);
View Full Code Here

            .next();
        addAlwaysOn(descriptor);
      }
    } finally {
      if (service!=null) {
        service.activateContext(ContextAuthority.SEND_EVENTS);
      }
        }
        newWizardShortcuts = layout.getNewWizardShortcuts();
        showViewShortcuts = layout.getShowViewShortcuts();
        perspectiveShortcuts = layout.getPerspectiveShortcuts();
View Full Code Here

        final IContextService service = (IContextService)page.getWorkbenchWindow().getService(IContextService.class);
        try { // one big try block, don't kill me here
      // defer context events
      if (service != null) {
        service.activateContext(ContextAuthority.DEFER_EVENTS);
      }

      HashSet knownActionSetIds = new HashSet();

      // Load the always on action sets.
View Full Code Here

    } finally {
          // restart context changes
          if (service != null) {
        StartupThreading.runWithoutExceptions(new StartupRunnable() {
          public void runWithException() throws Throwable {
            service.activateContext(ContextAuthority.SEND_EVENTS);
          }
        });
      }
        }
View Full Code Here

    //for dynamic UI
    /* package */void addActionSet(IActionSetDescriptor newDesc) {
      IContextService service = (IContextService)page.getWorkbenchWindow().getService(IContextService.class);
      try {
      service.activateContext(ContextAuthority.DEFER_EVENTS);
      for (int i = 0; i < alwaysOnActionSets.size(); i++) {
        IActionSetDescriptor desc = (IActionSetDescriptor) alwaysOnActionSets
            .get(i);
        if (desc.getId().equals(newDesc.getId())) {
          removeAlwaysOn(desc);
View Full Code Here

          break;
        }
      }
      addAlwaysOn(newDesc);
    } finally {
        service.activateContext(ContextAuthority.SEND_EVENTS);
      }
    }

    // for dynamic UI
    /* package */void removeActionSet(String id) {
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.