Package org.eclipse.ui.contexts

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


            {
                if ( partRef.getPart( false ) == view )
                {
                    IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                        IContextService.class );
                    contextActivation = contextService.activateContext( PluginConstants.CONTEXT_SCHEMA_VIEW );

                    ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
                        ICommandService.class );
                    if ( commandService != null )
                    {
View Full Code Here


            {
                if ( partRef.getPart( false ) == view )
                {
                    IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                        IContextService.class );
                    contextActivation = contextService.activateContext( PluginConstants.CONTEXT_PROJECTS_VIEW );

                    ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
                        ICommandService.class );
                    if ( commandService != null )
                    {
View Full Code Here

        final IPageSite site = fPage.getSite();
        final IHandlerService handlerService = (IHandlerService) site
                .getService(IHandlerService.class);
        final IContextService contextService = (IContextService) site
                .getService(IContextService.class);
        fActivatedContext = contextService.activateContext(fContextId);
        fActivatedHandler = handlerService.activateHandler(
                "org.eclipse.debug.ui.commands.eof", fEOFHandler); //$NON-NLS-1$
    }

    @Override
View Full Code Here

        final IPageSite site = getSite();
        fLinkHelper = new LinkingHelper();

        final IContextService service = (IContextService) site
                .getService(IContextService.class);
        service.activateContext("org.erlide.ui.erlangOutlineAndNavigatorScope");

        final MenuManager manager = new MenuManager();
        manager.setRemoveAllWhenShown(true);
        manager.addMenuListener(new IMenuListener() {
            @Override
View Full Code Here

            final IWorkbenchPartSite site = workbenchSite.getSite();
            openAction = new OpenErlangAction(aSite, workbenchSite.getSelectionProvider());
            searchActionGroup = new ErlangSearchActionGroup(site);
            final IContextService service = (IContextService) site
                    .getService(IContextService.class);
            service.activateContext("org.erlide.ui.erlangOutlineAndNavigatorScope");
        }
    }

    @Override
    public void fillActionBars(final IActionBars actionBars) {
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();

            // hack to activate the action handlers when changing the selection
            mainWidget.getViewer().addSelectionChangedListener( new ISelectionChangedListener()
            {
View Full Code Here

    {
        if ( partRef.getPart( false ) == this )
        {
            IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                IContextService.class );
            contextActivation = contextService.activateContext( BrowserCommonConstants.CONTEXT_WINDOWS );

            activateGlobalActionHandlers();
        }
    }
View Full Code Here

      // Update action sets

      IContextService service = (IContextService) window
          .getService(IContextService.class);
      try {
        service.activateContext(ContextAuthority.DEFER_EVENTS);
        if (newPersp != null) {
          IActionSetDescriptor[] newAlwaysOn = newPersp
              .getAlwaysOnActionSets();
          for (int i = 0; i < newAlwaysOn.length; i++) {
            IActionSetDescriptor descriptor = newAlwaysOn[i];
View Full Code Here

            actionSets.unmaskAction(descriptor);
          }
        }
      } finally {
        service.activateContext(ContextAuthority.SEND_EVENTS);
      }
    }
    }

    // for dynamic UI
View Full Code Here

      }

      IContextService service = (IContextService) window
          .getService(IContextService.class);
      try {
        service.activateContext(ContextAuthority.DEFER_EVENTS);

        // show the new
        for (int i = 0; i < newActionSets.size(); i++) {
          actionSets.showAction((IActionSetDescriptor) newActionSets
              .get(i));
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.