Package org.eclipse.ui.contexts

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


        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


        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(), configuration, actionGroup,
            actionGroup.getOpenDefaultEditorAction() );
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

            {
                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

        IContextService contextService = (IContextService) PlatformUI.getWorkbench().getService(IContextService.class);
        //May be null on shutdown on Eclipse 4.
        if (contextService != null) {
            if (isActive) {
                if (activateContext == null) {
                    activateContext = contextService.activateContext("com.python.pydev.contexts.window");
                }
            } else {
                if (activateContext != null) {
                    contextService.deactivateContext(activateContext);
                }
View Full Code Here

  }

  private void activateContextService() {
    IContextService contextService = CommonUtils.getService(getSite(), IContextService.class);
    if (contextService != null)
      contextService.activateContext(VIEW_ID);

  }

  @Override
  public void dispose() {
View Full Code Here

  }

  private void activateContextService() {
    IContextService contextService = CommonUtils.getService(getSite(), IContextService.class);
    if (contextService != null)
      contextService.activateContext(VIEW_ID);

  }

  private void initRepositoriesAndListeners() {
    synchronized (repositories) {
View Full Code Here

      protected Control createDialogArea(Composite parent) {
        Control result = super.createDialogArea(parent);
        if (fTextEditor != null) {
          IContextService contextService = (IContextService) fTextEditor
              .getSite().getService(IContextService.class);
          contextActivation = contextService
              .activateContext("org.eclipse.php.debug.ui.xdebug"); //$NON-NLS-1$
        }
        return result;
      }
View Full Code Here

   * activation events and will be removed when the view is disposed.
   */
  private void activateContext() {
    IContextService contextService = (IContextService) getSite()
        .getService(IContextService.class);
    contextService.activateContext("org.eclipse.php.ui.contexts.window"); //$NON-NLS-1$
  }

  @Override
  protected void setComparator() {
    getTreeViewer().setComparator(new ModelElementSorter());
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.