Examples of IContextService


Examples of org.eclipse.ui.contexts.IContextService

        // create actions
        actionGroup = new EntryEditorWidgetActionGroupWithAttribute( 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();

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

Examples of org.eclipse.ui.contexts.IContextService

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

            IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                IContextService.class );
            contextService.deactivateContext( contextActivation );
            contextActivation = null;
        }
    }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

     */
    public void partActivated( IWorkbenchPartReference partRef )
    {
        if ( partRef.getPart( false ) == this )
        {
            IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                IContextService.class );
            contextActivation = contextService
                .activateContext( BrowserCommonConstants.CONTEXT_WINDOWS );

            activateGlobalActionHandlers();
        }
    }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

                        commandService.getCommand( run.getActionDefinitionId() ).setHandler( null );
                        commandService.getCommand( stop.getActionDefinitionId() ).setHandler( null );
                        commandService.getCommand( properties.getActionDefinitionId() ).setHandler( null );
                    }

                    IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                        IContextService.class );
                    contextService.deactivateContext( contextActivation );
                    contextActivation = null;
                }
            }


            /**
             * This implementation activates the shortcuts when the part is activated.
             */
            public void partActivated( IWorkbenchPartReference partRef )
            {
                if ( partRef.getPart( false ) == instance )
                {
                    IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                        IContextService.class );
                    contextActivation = contextService.activateContext( ApacheDsPluginConstants.CONTEXTS_SERVERS_VIEW );

                    ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
                        ICommandService.class );
                    if ( commandService != null )
                    {
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

Examples of org.eclipse.ui.contexts.IContextService

     */
    public void partActivated( IWorkbenchPartReference partRef )
    {
        if ( partRef.getPart( false ) == this )
        {
            IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                IContextService.class );
            contextActivation = contextService
                .activateContext( BrowserCommonConstants.CONTEXT_WINDOWS );

            this.activateGlobalActionHandlers();
        }
    }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

            this.configuration.dispose();
            this.configuration = null;

            if ( contextActivation != null )
            {
                IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                    IContextService.class );
                contextService.deactivateContext( contextActivation );
                contextActivation = null;
            }
        }
    }
View Full Code Here

Examples of org.eclipse.ui.contexts.IContextService

        // create actions
        this.actionGroup = new EntryEditorWidgetActionGroupWithAttribute( this.mainWidget, this.configuration );
        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

Examples of org.eclipse.ui.contexts.IContextService

    syntaxManager.addPropertyChangedListener(new PCListener());
    fAtgAstManager = new AtgAstManager(this);
  }

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

Examples of org.eclipse.ui.contexts.IContextService

            this.configuration.dispose();
            this.configuration = null;

            if ( contextActivation != null )
            {
                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.