Java 类org.eclipse.ui.part.IPageBookViewPage 实例源码

项目:google-cloud-eclipse    文件:DeployConsolePageParticipant.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {
  Preconditions.checkArgument(console instanceof DeployConsole,
                              "console should be instance of %s",
                              DeployConsole.class.getName());
  this.console = (DeployConsole) console;

  console.addPropertyChangeListener(new IPropertyChangeListener() {
    @Override
    public void propertyChange(PropertyChangeEvent event) {
      if (event.getProperty().equals(DeployConsole.PROPERTY_JOB)) {
        // keep the order of adding a listener and then calling update() to ensure update
        // is called regardless of when the job finishes
        addJobChangeListener();
        update();
      }
    }
  });
  IActionBars actionBars = page.getSite().getActionBars();
  configureToolBar(actionBars.getToolBarManager());
  // keep the order of adding a listener and then calling update() to ensure update
  // is called regardless of when the job finishes
  addJobChangeListener();
  update();
}
项目:HMM    文件:ConsolePageParticipant.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {
    IPageSite pageSite = page.getSite();
    IWorkbenchPage workbenchPage = pageSite.getPage();
    IViewPart viewPart = workbenchPage.findView(IConsoleConstants.ID_CONSOLE_VIEW);
    IViewSite viewSite = viewPart.getViewSite();
    IActionBars actionBars = viewSite.getActionBars();
    IToolBarManager toolBarManager = actionBars.getToolBarManager();
    IContributionItem[] items = toolBarManager.getItems();
    for(int i = 0; i < items.length; ++i) {
        IContributionItem item = items[i];
        if(item instanceof ActionContributionItem) {
            IAction action = ((ActionContributionItem) item).getAction();
            String text = action.getText();
            if(text.equals("Pi&n Console") || text.equals("Open Console"))
                toolBarManager.remove(item);
        }
    }
}
项目:birt    文件:MultiPageReportEditor.java   
private void updateOutLineView( IFormPage activePageInstance )
{
    if ( outlinePage == null )
    {
        return;
    }

    if ( reloadOutlinePage( ) )
    {
        return;
    }
    Object designOutLinePage = activePageInstance.getAdapter( IContentOutlinePage.class );
    if ( designOutLinePage instanceof DesignerOutlinePage )
    {
        ( (DesignerOutlinePage) designOutLinePage ).setBackupState( outlineBackup );
    }
    outlinePage.setActivePage( (IPageBookViewPage) designOutLinePage );
}
项目:birt    文件:MultiPageReportEditor.java   
public void outlineSwitch( )
{
    if ( !getActivePageInstance( ).getId( ).equals( XMLSourcePage_ID )
            || outlinePage == null )
    {
        return;
    }

    if ( outlinePage.getCurrentPage( ) instanceof DesignerOutlinePage )
    {
        outlinePage.setActivePage( (IPageBookViewPage) getActivePageInstance( ).getAdapter( ContentOutlinePage.class ) );
    }
    else
    {
        outlinePage.setActivePage( (IPageBookViewPage) getActivePageInstance( ).getAdapter( IContentOutlinePage.class ) );
    }
    outlinePage.getSite( ).getActionBars( ).updateActionBars( );
}
项目:birt    文件:MultiPageReportEditor.java   
public boolean reloadOutlinePage( )
{
    if ( !getActivePageInstance( ).getId( ).equals( XMLSourcePage_ID )
            || outlinePage == null
            || !getCurrentPageInstance( ).getId( )
                    .equals( XMLSourcePage_ID ) )
    {
        return false;
    }

    if ( outlinePage.getCurrentPage( ) instanceof DesignerOutlinePage
            || outlinePage.getCurrentPage( ) == null
            || outlinePage.getCurrentPage( ) instanceof EmptyPage )
    {
        outlinePage.setActivePage( (IPageBookViewPage) getActivePageInstance( ).getAdapter( IContentOutlinePage.class ) );
    }
    else
    {
        outlinePage.setActivePage( (IPageBookViewPage) getActivePageInstance( ).getAdapter( ContentOutlinePage.class ) );
    }
    if ( outlinePage.getSite( ) != null )
    {
        outlinePage.getSite( ).getActionBars( ).updateActionBars( );
    }
    return true;
}
项目:eclipse-debug-console-history    文件:StyledTextConsolePage.java   
@Override
public void init(IPageBookViewPage viewPage, IConsole console) {
    Control control = viewPage.getControl();
    String consoleName = console.getName();

    if (control instanceof StyledText) {
        this.tc = (StyledText) control;
        util = new TextUtil(tc);

        boolean gdbConsole = consoleName.endsWith(" gdb");

        // For now, only support the gdb console
        if (gdbConsole) {
            tc.addVerifyKeyListener(this);
            tc.addMouseListener(this);
            tc.addLineStyleListener(this);
        }
    } else {
        String exception = "This plugin requires that the ProcessConsole "
                + "is using a StyledText control";
        throw new IllegalStateException(exception);
    }
}
项目:eclipse-debug-console-history    文件:GdbCompletionConsolePage.java   
@Override
public void init(IPageBookViewPage viewPage, IConsole console) {
    super.init(viewPage, console);

    SimpleContentProposalProvider proposalsProvider = new SimpleContentProposalProvider(
            proposals);
    proposalsProvider.setFiltering(true);
    KeyStroke ctrlSpace = null;
    try {
        ctrlSpace = KeyStroke.getInstance("Ctrl+Space");
    } catch (ParseException e) {
        e.printStackTrace();
    }
    ContentProposalAdapter adapter = new ContentProposalAdapter(tc,
            new StyledTextContentAdapter(util), proposalsProvider,
            ctrlSpace, null);
    adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);        
}
项目:Pydev    文件:PromptOverlayConsolePageParticipant.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {
    if (!(console instanceof ProcessConsole)) {
        return;
    }
    ProcessConsole processConsole = (ProcessConsole) console;
    IProcess process = processConsole.getProcess();
    if (process == null) {
        return;
    }

    String attribute = process.getAttribute(Constants.PYDEV_DEBUG_IPROCESS_ATTR);
    if (!Constants.PYDEV_DEBUG_IPROCESS_ATTR_TRUE.equals(attribute)) {
        //Only provide the console page
        return;
    }
    if (page instanceof IOConsolePage) {
        final CurrentPyStackFrameForConsole currentPyStackFrameForConsole = new CurrentPyStackFrameForConsole(
                console);
        IOConsolePage consolePage = (IOConsolePage) page;
        this.promptOverlay = new PromptOverlay(consolePage, processConsole, currentPyStackFrameForConsole);
    }

}
项目:neoscada    文件:ItemTraceConsolePageParticipant.java   
@Override
public void init ( final IPageBookViewPage page, final IConsole console )
{
    final ItemTraceIOConsole traceConsole = (ItemTraceIOConsole)console;

    this.mgr = page.getSite ().getActionBars ().getToolBarManager ();
    this.mgr.appendToGroup ( IConsoleConstants.OUTPUT_GROUP, new StopAction ( traceConsole ) );
    this.mgr.appendToGroup ( IConsoleConstants.OUTPUT_GROUP, new CloseAction ( traceConsole ) );
}
项目:pgcodekeeper    文件:ShowConsoleParticipant.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {
    action = new ShowConsoleAction();
    page.getSite().getActionBars().getToolBarManager()
    .appendToGroup(IConsoleConstants.OUTPUT_GROUP, action);
    pageControl = page.getControl();
    prefs.addPropertyChangeListener(action);
}
项目:egradle    文件:EGradleConsolePageParticipant.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {
    Control control = page.getControl();
    if (control instanceof StyledText) {
        /* connect only to EGRADLE consoles */

        /*
         * only process consoles with EGradle in name are handled or the
         * dedicated EGradle console
         */
        String type = console.getType();
        String name = console.getName();

        boolean needsEGradleStyling = false;
        needsEGradleStyling = needsEGradleStyling || console instanceof EGradleSystemConsole;
        needsEGradleStyling = needsEGradleStyling
                || ("org.eclipse.debug.ui.ProcessConsoleType".equals(type) && name.indexOf("EGradle") != -1);

        if (!needsEGradleStyling) {
            return;
        }
        /* Add EGradle process style listener to viewer */
        StyledText viewer = (StyledText) control;
        EGradleConsoleStyleListener myListener = new EGradleConsoleStyleListener();
        viewer.addLineStyleListener(myListener);

        IDEActivator.getDefault().addViewer(viewer, this);
    }
}
项目:team-explorer-everywhere    文件:TFSMessageConsolePageParticipant.java   
@Override
public void init(final IPageBookViewPage page, final IConsole console) {
    menuAction = new ShowConsoleMenuAction(
        Messages.getString("TFSMessageConsolePageParticipant.ShowConsoleMenu"), //$NON-NLS-1$
        imageHelper.getImageDescriptor("/images/common/console_showmessages.gif")); //$NON-NLS-1$

    messageAction =
        new ShowConsoleAction(
            Messages.getString("TFSMessageConsolePageParticipant.ShowConsoleForNewMessage"), //$NON-NLS-1$
            UIPreferenceConstants.CONSOLE_SHOW_ON_NEW_MESSAGE,
            null);

    warningAction =
        new ShowConsoleAction(
            Messages.getString("TFSMessageConsolePageParticipant.ShowConsoleForNewWarning"), //$NON-NLS-1$
            UIPreferenceConstants.CONSOLE_SHOW_ON_NEW_WARNING,
            null);

    errorAction =
        new ShowConsoleAction(
            Messages.getString("TFSMessageConsolePageParticipant.ShowConsoleForNewError"), //$NON-NLS-1$
            UIPreferenceConstants.CONSOLE_SHOW_ON_NEW_ERROR,
            null);

    // contribute to menubar
    menuAction.addAction(messageAction);
    menuAction.addAction(warningAction);
    menuAction.addAction(errorAction);

    // contribute to toolbar
    final IActionBars actionBars = page.getSite().getActionBars();

    actionBars.getToolBarManager().appendToGroup(IConsoleConstants.OUTPUT_GROUP, menuAction);
}
项目:google-cloud-eclipse    文件:LocalAppEngineConsolePageParticipant.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {
  this.console = (LocalAppEngineConsole) console;

  // contribute to toolbar
  IActionBars actionBars = page.getSite().getActionBars();
  configureToolBar(actionBars.getToolBarManager());

  LocalAppEngineServerBehaviour serverBehaviour = this.console.getServerBehaviourDelegate();
  if (serverBehaviour != null) {
    serverBehaviour.getServer().addServerListener(serverStateListener);
  }
}
项目:typescript.java    文件:TypeScriptConsolePageParticipant.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {
    this.fConsole = (TypeScriptConsole) console;
    this.fTerminate = new ConsoleTerminateAction(fConsole.getProject());
    IActionBars actionBars = page.getSite().getActionBars();
    configureToolBar(actionBars.getToolBarManager());
}
项目:cft    文件:CloudFoundryConsolePageParticipant.java   
public void init(IPageBookViewPage page, IConsole console) {
    if (isCloudFoundryConsole(console)) {
        CloseConsoleAction closeAction = new CloseConsoleAction(console);
        closeAction.setImageDescriptor(CloudFoundryImages.CLOSE_CONSOLE);
        IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
        manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
    }
}
项目:LogViewer    文件:ConsolePageParticipant.java   
public void init(IPageBookViewPage myPage, IConsole console) {
       page = myPage;
       IToolBarManager toolBarManager = page.getSite().getActionBars()
       .getToolBarManager();
       toolBarManager.appendToGroup(IConsoleConstants.OUTPUT_GROUP, new Separator());
       toolBarManager.appendToGroup(IConsoleConstants.OUTPUT_GROUP, new Action(
            LogViewerPlugin.getResourceString("logviewer.action.openwith.name"),
            UIImages.getImageDescriptor(ILogViewerConstants.IMG_LOG_VIEWER)) {
           public void run() {
            ConsolePageParticipant.this.run();
           }
       });
}
项目:jdepend4eclipse    文件:JDependConsole.java   
@Override
public void init(IPageBookViewPage page, IConsole console1) {
    removeAction = new RemoveAction();
    xmlAction = new ToggleXmlAction();
    IActionBars bars = page.getSite().getActionBars();
    bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP,
            removeAction);
    bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP,
            xmlAction);
}
项目:APICloud-Studio    文件:ConsoleThemePageParticipant.java   
@SuppressWarnings({ "unchecked", "rawtypes" })
public void init(IPageBookViewPage page, IConsole console)
{
    if (console instanceof TextConsole)
    {
        TextConsole textConsole = (TextConsole) console;
        Object themeConsoleStreamToColor = textConsole.getAttribute(THEME_CONSOLE_STREAM_TO_COLOR_ATTRIBUTE);
        if (themeConsoleStreamToColor instanceof Map<?, ?>)
        {
            Map m = (Map) themeConsoleStreamToColor;
            Set<Map.Entry> entrySet = m.entrySet();
            for (Map.Entry entry : entrySet)
            {
                if (!(entry.getKey() instanceof IOConsoleOutputStream) || !(entry.getValue() instanceof String))
                {
                    return; // Cannot handle it.
                }
            }
            this.extension = new ConsoleThemer(textConsole, (Map) themeConsoleStreamToColor);
        }
        if (page instanceof TextConsolePage)
        {
            TextConsolePage tcp = (TextConsolePage) page;
            TextViewerThemer themer = new TextViewerThemer(tcp.getViewer());
            themer.apply();
        }
    }
    this.page = page;
}
项目:gef-gwt    文件:PaletteView.java   
/**
 * @see org.eclipse.ui.part.PageBookView#doCreatePage(org.eclipse.ui.IWorkbenchPart)
 */
protected PageRec doCreatePage(IWorkbenchPart part) {
    // Try to get a custom palette page
    Object obj = part.getAdapter(PalettePage.class);

    if (obj != null && obj instanceof IPage) {
        IPage page = (IPage) obj;
        page.createControl(getPageBook());
        initPage((IPageBookViewPage) page);
        return new PageRec(part, page);
    }
    // Use the default page by returning null
    return null;
}
项目:ant-ivyde    文件:IvyConsolePageParticipant.java   
public void init(IPageBookViewPage page, IConsole console) {
    IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();

    closeAction = new IvyConsoleRemoveAction(console);
    manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);

    filterLogAction = new IvyConsoleFilterAction((IvyConsole) console);
    manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, filterLogAction);
}
项目:birt    文件:MultiPageReportEditor.java   
private void updateAttributeView( IFormPage activePageInstance )
{
    if ( attributePage == null )
    {
        return;
    }

    Object adapter = activePageInstance.getAdapter( IAttributeViewPage.class );
    attributePage.setActivePage( (IPageBookViewPage) adapter );
}
项目:birt    文件:MultiPageReportEditor.java   
private void updateDateView( IFormPage activePageInstance )
{
    if ( dataPage == null )
    {
        return;
    }

    Object adapter = activePageInstance.getAdapter( IDataViewPage.class );
    if ( adapter instanceof DataViewTreeViewerPage )
    {
        ( (DataViewTreeViewerPage) adapter ).setBackupState( dataBackup );
    }
    dataPage.setActivePage( (IPageBookViewPage) adapter );
}
项目:birt    文件:MultiPageReportEditor.java   
private void updatePaletteView( IFormPage activePageInstance )
{

    if ( fPalettePage == null )
    {
        return;
    }

    Object palette = activePageInstance.getAdapter( PalettePage.class );
    fPalettePage.setActivePage( (IPageBookViewPage) palette );
}
项目:birt    文件:ReportMultiBookPage.java   
public void selectionChanged( SelectionChangedEvent event )
{
    setSelection( event.getSelection( ) );
    StructuredSelection selection = (StructuredSelection) event.getSelection( );
    Object obj = selection.getFirstElement( );
    if ( obj instanceof IFormPage )
    {
        Object palette = ( (IFormPage) obj ).getAdapter( PalettePage.class );
        setActivePage( (IPageBookViewPage) palette );
    }
}
项目:birt    文件:AttributeView.java   
/**
 * Creates a new page in the pagebook for a particular part. This page will
 * be made visible whenever the part is active, and will be destroyed with a
 * call to <code>doDestroyPage</code>.
 * 
 * @param part
 *            the input part
 * @return the record describing a new page for this view
 * @see #doDestroyPage
 */
protected PageRec doCreatePage( IWorkbenchPart part )
{
    Object page = part.getAdapter( IAttributeViewPage.class );
    if ( page instanceof IPageBookViewPage )
    {
        initPage( (IPageBookViewPage) page );

        ( (IPageBookViewPage) page ).createControl( getPageBook( ) );

        return new PageRec( part, (IPageBookViewPage) page );
    }
    return null;
}
项目:e4macs    文件:EmacsPlusConsole.java   
/**
    * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView)
    */
public IPageBookViewPage createPage(IConsoleView view) {
    IPageBookViewPage page = super.createPage(view);
       if (page instanceof TextConsolePage) {
        myPage = (TextConsolePage)page;
       }
       return page;
   }
项目:Pydev    文件:ConsoleActivateDebugContext.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {
    this.page = page;
    this.console = (PydevConsole) console;

    view = (IConsoleView) page.getSite().getPage().findView(IConsoleConstants.ID_CONSOLE_VIEW);
    DebugUITools.getDebugContextManager().getContextService(page.getSite().getWorkbenchWindow())
            .addDebugContextListener(this);
}
项目:Pydev    文件:RestartLaunchAction.java   
public RestartLaunchAction(IPageBookViewPage page, ProcessConsole console) {
    this.page = page;
    this.console = console;
    launch = this.console.getProcess().getLaunch();
    launchConfiguration = launch.getLaunchConfiguration();

    lastLaunch = launch;
    lastConfig = launch.getLaunchConfiguration();

    update();
}
项目:Pydev    文件:ConsoleRestartLaunchPageParticipant.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {
    try {
        if (!(console instanceof ProcessConsole)) {
            return;
        }
        ProcessConsole processConsole = (ProcessConsole) console;
        IProcess process = processConsole.getProcess();
        if (process == null) {
            return;
        }
        String attribute = process.getAttribute(RelaunchConstants.PYDEV_ADD_RELAUNCH_IPROCESS_ATTR);
        if (!RelaunchConstants.PYDEV_ADD_RELAUNCH_IPROCESS_ATTR_TRUE.equals(attribute)) {
            //Only provide relaunch if specified
            return;
        }
        this.fConsole = processConsole;
        DebugPlugin.getDefault().addDebugEventListener(this);

        IActionBars bars = page.getSite().getActionBars();

        IToolBarManager toolbarManager = bars.getToolBarManager();

        restartLaunchAction = new RestartLaunchAction(page, processConsole);
        terminateAllLaunchesAction = new TerminateAllLaunchesAction();

        toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, restartLaunchAction);
        toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, terminateAllLaunchesAction);

        bars.updateActionBars();
    } catch (Exception e) {
        Log.log(e);
    }

}
项目:gradle4eclipse    文件:GradlePageParticipant.java   
public void init(IPageBookViewPage page, IConsole console) {
    if (page.getControl() instanceof StyledText) {
        StyledText styledText = (StyledText) (page.getControl());

        GradleLineStyleListener gradleLineStyleListener = new GradleLineStyleListener();
        styledText.addLineStyleListener(gradleLineStyleListener);
    }

}
项目:subclipse    文件:SVNConsolePageParticipant.java   
public void init(IPageBookViewPage page, IConsole console) {
    this.consoleRemoveAction = new ConsoleRemoveAction();
    IActionBars bars = page.getSite().getActionBars();
    bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, consoleRemoveAction);
}
项目:dockerfoundry    文件:DockerFoundryConsolePageParticipant.java   
public void init(IPageBookViewPage page, IConsole console) {
    closeAction = new CloseConsoleAction(console);

    IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
    manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
}
项目:eclox    文件:Console.java   
/**
 * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView)
 */
public IPageBookViewPage createPage(IConsoleView view) {
    return new ConsolePage(this);
}
项目:gwt-eclipse-plugin    文件:CustomMessageConsole.java   
public void init(IPageBookViewPage page, IConsole console) {
  if (console instanceof CustomMessageConsole) {
    ((CustomMessageConsole) console).setActiveToolbarManager(page.getSite().getActionBars().getToolBarManager());
  }
}
项目:APICloud-Studio    文件:SVNConsolePageParticipant.java   
public void init(IPageBookViewPage page, IConsole console) {
    this.consoleRemoveAction = new ConsoleRemoveAction();
    IActionBars bars = page.getSite().getActionBars();
    bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, consoleRemoveAction);
}
项目:APICloud-Studio    文件:ConsoleAutoScrollPageParticipant.java   
public void init(IPageBookViewPage page, IConsole console)
{
    if (console.getType() != IDebugUIConstants.ID_PROCESS_CONSOLE_TYPE || !(page instanceof TextConsolePage))
    {
        return;
    }
    TextConsolePage consolePage = (TextConsolePage) page;
    TextConsoleViewer textViewer = consolePage.getViewer();
    if (!(textViewer instanceof IOConsoleViewer))
    {
        return;
    }
    final IOConsoleViewer viewer = (IOConsoleViewer) textViewer;
    scrollActionEnabled = viewer.isAutoScroll();
    final IToolBarManager toolBarManager = consolePage.getSite().getActionBars().getToolBarManager();
    IAction slAction = null;
    // Look for the ScrollLockAction
    for (IContributionItem item : toolBarManager.getItems())
    {
        if (item instanceof ActionContributionItem)
        {
            IAction action = ((ActionContributionItem) item).getAction();
            if (action instanceof ScrollLockAction)
            {
                slAction = action;
                break;
            }
        }
    }
    textWidget = viewer.getTextWidget();
    listener = new ConsoleListener(viewer, toolBarManager, slAction);

    // Based on Eclipse Snippet191 - Detects scrolling that were initiated by the user.
    textWidget.addListener(SWT.MouseDown, listener);
    textWidget.addListener(SWT.MouseMove, listener);
    textWidget.addListener(SWT.MouseUp, listener);
    textWidget.addListener(SWT.KeyDown, listener);
    textWidget.addListener(SWT.KeyUp, listener);
    ScrollBar vBar = textWidget.getVerticalBar();
    if (vBar != null)
    {
        vBar.addListener(SWT.Selection, listener);
    }
}
项目:plugindependencies    文件:PluginDependenciesConsole.java   
@Override
public void init(IPageBookViewPage page, IConsole console1) {
    removeAction = new RemoveAction();
    IActionBars bars = page.getSite().getActionBars();
    bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, removeAction);
}
项目:tesb-studio-se    文件:ESBRuntimeConsolePageParticipant.java   
@Override
public void init(IPageBookViewPage page, IConsole console) {

    if (page.getControl() instanceof StyledText) {
        StyledText viewer = (StyledText) page.getControl();
        AnsiConsoleStyleListener myListener = new AnsiConsoleStyleListener();
        viewer.addLineStyleListener(myListener);
        ESBRunContainerPlugin.getDefault().addViewer(viewer, this);
    }

    startRuntimeAction = new StartRuntimeAction(true, page.getControl().getShell());
    haltRuntimeAction = new StopRuntimeAction(page.getControl().getShell());
    openRuntimeInfoAction = new OpenRuntimeInfoAction();
    openRuntimePrefsAction = new OpenRuntimePrefsAction();
    serverListener = new RuntimeStatusChangeListener() {

        @Override
        public void stopRunning() {
            Display.getDefault().asyncExec(new Runnable() {

                @Override
                public void run() {
                    startRuntimeAction.setEnabled(true);
                    haltRuntimeAction.setEnabled(false);
                    openRuntimeInfoAction.setEnabled(false);
                }
            });
        }

        @Override
        public void startRunning() {
            Display.getDefault().asyncExec(new Runnable() {

                @Override
                public void run() {
                    startRuntimeAction.setEnabled(false);
                    haltRuntimeAction.setEnabled(true);
                    openRuntimeInfoAction.setEnabled(true);
                }
            });
        }

        @Override
        public void featureUninstalled(int id) {

        }

        @Override
        public void featureInstalled(int id) {

        }
    };
    RuntimeServerController.getInstance().addStatusChangeListener(serverListener);

    IActionBars actionBars = page.getSite().getActionBars();
    configureToolBar(actionBars.getToolBarManager());
}
项目:eclipsensis    文件:NSISConsole.java   
@Override
public IPageBookViewPage createPage(IConsoleView view)
{
    return new NSISConsolePage(this, view);
}
项目:CppStyle    文件:CppStyleMessageConsole.java   
@Override
public IPageBookViewPage createPage(IConsoleView view) {
    page = new CppStyleConsolePage(this, view);
    return page;
}