类org.eclipse.ui.console.IConsoleConstants源码实例Demo

下面列出了怎么用org.eclipse.ui.console.IConsoleConstants的API类实例代码及写法,或者点击链接到github查看源代码。

private void configureToolBar(IToolBarManager toolbarManager) {
  terminateAction = new Action(Messages.actionStop) {
    @Override
    public void run() {
      //code to execute when button is pressed
      LocalAppEngineServerBehaviour serverBehaviour = console.getServerBehaviourDelegate();
      if (serverBehaviour != null) {
        // try to initiate a nice shutdown
        boolean force = serverBehaviour.getServer().getServerState() == IServer.STATE_STOPPING;
        serverBehaviour.stop(force);
      }
      update();
    }
  };
  terminateAction.setToolTipText(Messages.actionStopToolTip);
  terminateAction.setImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_ELCL_STOP));
  terminateAction.setHoverImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_STOP));
  terminateAction.setDisabledImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_DLCL_STOP));

  toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, terminateAction);
}
 
源代码2 项目: xds-ide   文件: XdsPerspectiveFactory.java
@Override
    public void createInitialLayout(IPageLayout layout) {
        layout.addNewWizardShortcut("com.excelsior.xds.ui.project.NewProjectFromScratchWizard"); //$NON-NLS-1$
        layout.addNewWizardShortcut("com.excelsior.xds.ui.project.NewProjectFromSourcesWizard"); //$NON-NLS-1$
        
        String editorArea = layout.getEditorArea();
        
        layout.addView(IPageLayout.ID_PROJECT_EXPLORER, IPageLayout.LEFT, 0.20f, editorArea);
        
        // the Tasks view.
        IFolderLayout bottom =
              layout.createFolder("bottom", IPageLayout.BOTTOM, 0.80f, editorArea); //$NON-NLS-1$
        bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
        bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
        
        IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, 0.80f, editorArea); //$NON-NLS-1$
        right.addView(IPageLayout.ID_OUTLINE);

        layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
        layout.addActionSet("org.eclipse.debug.ui.profileActionSet"); //Bug: not included in IDebugUIConstants  //$NON-NLS-1$ 
        
        // Put the Outline view on the left.
//        layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, 0.01f, editorArea);
    }
 
private void defineActions(IPageLayout layout) {
    String editorArea = layout.getEditorArea();

    IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.26,
            editorArea);
    left.addView(IPageLayout.ID_PROJECT_EXPLORER);

    IFolderLayout middleLeft = layout.createFolder("middleLeft", IPageLayout.BOTTOM, (float)
            0.33, "left");
    middleLeft.addView(ReportListView.ID);
    middleLeft.addView(ReportListViewProject.ID);
    
    IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, (float) 0.8,
            editorArea);
    right.addView(IConsoleConstants.ID_CONSOLE_VIEW);
    right.addView(IPageLayout.ID_OUTLINE);
    right.addView(IPageLayout.ID_TASK_LIST);

    IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.8,
            editorArea);
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
}
 
@Override
public void createInitialLayout(IPageLayout layout) {
	String editorArea = layout.getEditorArea();

	IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
	left.addView(IPageLayout.ID_PROJECT_EXPLORER);
	left.addPlaceholder(IPageLayout.ID_RES_NAV);

	IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
	bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView");
	bottom.addView(IPageLayout.ID_PROBLEM_VIEW);

	bottom.addPlaceholder(TemplatesView.ID);
	bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
	bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
	bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
	bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
	bottom.addPlaceholder(IPageLayout.ID_TASK_LIST);
	bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET);

	layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);

}
 
源代码5 项目: cppcheclipse   文件: Console.java
public void show() {
	
	Runnable runnable = new Runnable() {
		public void run() {
			// this should only be called from GUI thread
			IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
			if (window == null) {
				CppcheclipsePlugin.logError("Could not show console because there is no active workbench window");
				return;
			}
			IWorkbenchPage page = window.getActivePage();
			if (page == null) {
				CppcheclipsePlugin.logError("Could not show console because there is no active page");
				return;
			}
			try {
				IConsoleView view = (IConsoleView) page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
				view.display(messageConsole);
			} catch (PartInitException e) {
				CppcheclipsePlugin.logError("Could not show console", e);
			}
			
		}
	};
	Display.getDefault().asyncExec(runnable);
}
 
源代码6 项目: APICloud-Studio   文件: WebPerspectiveFactory.java
public void createInitialLayout(IPageLayout layout)
{
	// Get the editor area
	String editorArea = layout.getEditorArea();

	// Left
	IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.20f, editorArea); //$NON-NLS-1$
	left.addView(IPageLayout.ID_PROJECT_EXPLORER);
	left.addPlaceholder(APP_EXPLORER_ID);
	left.addPlaceholder("com.aptana.ui.io.remoteview"); //$NON-NLS-1$

	// Bottom right: Console. Had to leave this programmatic to get the Console appear in bottom right
	IFolderLayout bottomArea = layout.createFolder("terminalArea", IPageLayout.BOTTOM, 0.75f, //$NON-NLS-1$
			editorArea);
	bottomArea.addView(IConsoleConstants.ID_CONSOLE_VIEW);
	bottomArea.addPlaceholder("com.aptana.terminal.views.terminal:*"); //$NON-NLS-1$

	UIUtils.setCoolBarVisibility(true);
}
 
源代码7 项目: Pydev   文件: PythonPerspectiveFactory.java
/**
 * @param layout
 * @param editorArea
 */
public void defineLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();
    IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, (float) 0.26, editorArea); //$NON-NLS-1$
    topLeft.addView("org.python.pydev.navigator.view");

    IFolderLayout outputfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
    //outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
    outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
    outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
    outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
    outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);

    //Add the outline only if we're not using the minimap.
    if (!MinimapOverviewRulerPreferencesPage.getShowMinimapContents()) {
        layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
    }
}
 
源代码8 项目: Pydev   文件: PythonPerspectiveFactory.java
/**
 * @param layout
 */
public void defineActions(IPageLayout layout) {
    layout.addNewWizardShortcut(PythonProjectWizard.WIZARD_ID);
    layout.addNewWizardShortcut(PythonSourceFolderWizard.WIZARD_ID);
    layout.addNewWizardShortcut(PythonPackageWizard.WIZARD_ID);
    layout.addNewWizardShortcut(PythonModuleWizard.WIZARD_ID);
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$

    layout.addShowViewShortcut("org.python.pydev.navigator.view");
    layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
    layout.addShowViewShortcut("org.python.pydev.debug.pyunit.pyUnitView");
    layout.addShowViewShortcut("org.python.pydev.debug.profile.ProfileView");
    layout.addShowViewShortcut("org.python.pydev.views.PyCodeCoverageView");
    layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
    //layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);-- Navigator no longer supported
    layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView");
    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);

    layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
    layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);

}
 
源代码9 项目: Pydev   文件: ScriptConsole.java
/**
 * @param page the page where the console view is
 * @param restore whether we should try to restore it
 * @return a list with the parts containing the console
 */
private static List<IViewPart> getConsoleParts(IWorkbenchPage page, boolean restore) {
    List<IViewPart> consoleParts = new ArrayList<IViewPart>();

    IViewReference[] viewReferences = page.getViewReferences();
    for (IViewReference ref : viewReferences) {
        if (ref.getId().equals(IConsoleConstants.ID_CONSOLE_VIEW)) {
            IViewPart part = ref.getView(restore);
            if (part != null) {
                consoleParts.add(part);
                if (restore) {
                    return consoleParts;
                }
            }
        }
    }
    return consoleParts;
}
 
源代码10 项目: goclipse   文件: LangPerspective.java
protected void addViewStructure(IPageLayout layout) {
	String editorArea = layout.getEditorArea();
	
	IFolderLayout leftFolder = layout.createFolder("leftPane", IPageLayout.LEFT, 0.25f, editorArea);
	leftFolder.addView(IPageLayout.ID_PROJECT_EXPLORER);
	
	IFolderLayout bottomFolder = layout.createFolder("bottomPane", IPageLayout.BOTTOM, 0.75f, editorArea);
	
	bottomFolder.addView(IPageLayout.ID_PROBLEM_VIEW);
	bottomFolder.addView(IPageLayout.ID_TASK_LIST);
	bottomFolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
	bottomFolder.addView(IPageLayout.ID_PROGRESS_VIEW);
	bottomFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
	
	// Create outline after bottom pane
	layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, 0.75f, editorArea);
}
 
@Override
public void init(IPageBookViewPage page, IConsole console) {
	if (console instanceof SocketConsole) {
		ShowOnContentChangeAction contentChange = new ShowOnContentChangeAction((SocketConsole)console);
		
		// Contribute to the toolbar
        IActionBars actionBars = page.getSite().getActionBars();
        IToolBarManager mgr = actionBars.getToolBarManager();
        mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, contentChange);
	}
}
 
源代码12 项目: n4js   文件: EclipseUtils.java
/**
 * Reveal the given console. If necessary, this will open the console view, bring it to the front, and reveal the
 * given console inside the console view.
 */
public static void revealConsole(IConsole console) {
	PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
		@Override
		public void run() {
			final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
			try {
				final IConsoleView view = (IConsoleView) page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
				view.display(console);
			} catch (PartInitException e) {
				// ignore
			}
		}
	});
}
 
源代码13 项目: n4js   文件: N4JSStackTracePageParticipant.java
@Override
public void init(IPageBookViewPage page, IConsole console) {
	closeAction = new CloseConsoleAction(console);

	IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
	manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
}
 
源代码14 项目: 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 ) );
}
 
源代码15 项目: orion.server   文件: OrionConsoleView.java
protected void configureToolBar(IToolBarManager mgr) {
	super.configureToolBar(mgr);

	mgr.remove(IConsoleConstants.LAUNCH_GROUP);
	IContributionItem[] items = mgr.getItems();
	if (items.length >= 3) {
		mgr.remove(items[items.length - 1]);
		mgr.remove(items[items.length - 2]);
		mgr.remove(items[items.length - 3]);
	}
}
 
源代码16 项目: corrosion   文件: TestDebugConfiguration.java
@After
@Before
public void stopLaunchesAndCloseConsoles() throws DebugException {
	for (ILaunch launch : DebugPlugin.getDefault().getLaunchManager().getLaunches()) {
		launch.terminate();
	}
	IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
	consoleManager.removeConsoles(consoleManager.getConsoles());
	IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
	for (IViewReference view : activePage.getViewReferences()) {
		if (IConsoleConstants.ID_CONSOLE_VIEW.equals(view.getId())) {
			activePage.hideView(view);
		}
	}
}
 
private void configureToolBar(IToolBarManager toolbarManager) {
  terminateAction = createTerminateAction();
  toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, terminateAction);

  closeAction = createCloseAction();
  toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
}
 
@Override
public void init(IPageBookViewPage page, IConsole console) {
	fCloseAction = new CloseConsoleAction(console);
	
	IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
	manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, fCloseAction);
}
 
源代码19 项目: texlipse   文件: TexPerspectiveFactory.java
public void createInitialLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();
            
    //Navigator view left
    layout.addView(IPageLayout.ID_PROJECT_EXPLORER, IPageLayout.LEFT, 0.25f, editorArea);
    
    //Outline view on the left
    IFolderLayout left = layout.createFolder("left", IPageLayout.BOTTOM, 0.50f, 
            IPageLayout.ID_PROJECT_EXPLORER);
    left.addView(IPageLayout.ID_OUTLINE);
    left.addView(ID_FULL_OUTLINE);
    
    IFolderLayout bottom =
       layout.createFolder(
          "bottom",
          IPageLayout.BOTTOM,
          0.70f,
          editorArea);
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
    bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
    bottom.addView(IPageLayout.ID_TASK_LIST);
    bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
    bottom.addView(ID_TABLE_VIEW);
    
    layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
    layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(ID_FULL_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
    layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
    layout.addShowViewShortcut(ID_TABLE_VIEW);

    //Add project and Latex file creation wizards to menu
    layout.addNewWizardShortcut(ID_PROJECT_WIZARD);
    layout.addNewWizardShortcut(ID_LATEX_FILE_WIZARD);
}
 
源代码20 项目: xds-ide   文件: XdsConsolePage.java
public XdsConsolePage(TextConsole console, IConsoleView view) {
    super(console, view);

    fPropertyChangeListener = new IPropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent event) {
            String property = event.getProperty();
            if (property.equals(IConsoleConstants.P_CONSOLE_OUTPUT_COMPLETE)) {
                setReadOnly();
            }
        }
    };
    console.addPropertyChangeListener(fPropertyChangeListener);
}
 
源代码21 项目: tlaplus   文件: ConsoleFactory.java
public void openConsole()
{
    IWorkbenchPage activePage = UIHelper.getActivePage();
    if (activePage != null)
    {
        try
        {
            activePage.showView(IConsoleConstants.ID_CONSOLE_VIEW, TLC_ID, IWorkbenchPage.VIEW_ACTIVATE);
        } catch (PartInitException e)
        {
            ConsolePlugin.log(e);
        }
    }
}
 
源代码22 项目: tlaplus   文件: TLAPMConsoleFactory.java
/**
 * Opens a generic console view using {@link TLAPMConsoleFactory#TLAPM_CONSOLE_ID} as the
 * console name so that it can be found later.
 */
public void openConsole()
{
    IWorkbenchPage activePage = UIHelper.getActivePage();
    if (activePage != null)
    {
        try
        {
            activePage.showView(IConsoleConstants.ID_CONSOLE_VIEW, TLAPM_CONSOLE_ID, IWorkbenchPage.VIEW_ACTIVATE);
        } catch (PartInitException e)
        {
            ConsolePlugin.log(e);
        }
    }
}
 
源代码23 项目: 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();
           }
       });
}
 
源代码24 项目: gwt-eclipse-plugin   文件: CustomMessageConsole.java
/**
 * Sets the terminate action which affects the visibility of the terminate
 * button.
 * 
 * @param terminateAction the action to invoke when the terminate button is
 *          clicked, or null to remove the terminate button
 */
public synchronized void setTerminateAction(TerminateAction terminateAction) {
  TerminateAction oldTerminateAction = this.terminateAction;
  this.terminateAction = terminateAction;

  updateToolbarAction(oldTerminateAction, terminateAction,
      IConsoleConstants.LAUNCH_GROUP);
}
 
private void createVerticalLayout(IPageLayout layout) {
	String relativePartId= IPageLayout.ID_EDITOR_AREA;
	int relativePos= IPageLayout.LEFT;

	IPlaceholderFolderLayout placeHolderLeft= layout.createPlaceholderFolder("left", IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
	placeHolderLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
	placeHolderLeft.addPlaceholder(IPageLayout.ID_OUTLINE);
	placeHolderLeft.addPlaceholder(JavaUI.ID_PACKAGES);
	placeHolderLeft.addPlaceholder(JavaPlugin.ID_RES_NAV);
	placeHolderLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);

	if (shouldShowProjectsView()) {
		layout.addView(JavaUI.ID_PROJECTS_VIEW, IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA);
		relativePartId= JavaUI.ID_PROJECTS_VIEW;
		relativePos= IPageLayout.BOTTOM;
	}
	if (shouldShowPackagesView()) {
		layout.addView(JavaUI.ID_PACKAGES_VIEW, relativePos, (float)0.25, relativePartId);
		relativePartId= JavaUI.ID_PACKAGES_VIEW;
		relativePos= IPageLayout.BOTTOM;
	}
	layout.addView(JavaUI.ID_TYPES_VIEW, relativePos, (float)0.33, relativePartId);
	layout.addView(JavaUI.ID_MEMBERS_VIEW, IPageLayout.BOTTOM, (float)0.50, JavaUI.ID_TYPES_VIEW);

	IPlaceholderFolderLayout placeHolderBottom= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
	placeHolderBottom.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
	placeHolderBottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
	placeHolderBottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
	placeHolderBottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
	placeHolderBottom.addPlaceholder(JavaUI.ID_SOURCE_VIEW);
	placeHolderBottom.addPlaceholder(JavaUI.ID_JAVADOC_VIEW);
	placeHolderBottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
}
 
private void createHorizontalLayout(IPageLayout layout) {
	String relativePartId= IPageLayout.ID_EDITOR_AREA;
	int relativePos= IPageLayout.TOP;

	if (shouldShowProjectsView()) {
		layout.addView(JavaUI.ID_PROJECTS_VIEW, IPageLayout.TOP, (float)0.25, IPageLayout.ID_EDITOR_AREA);
		relativePartId= JavaUI.ID_PROJECTS_VIEW;
		relativePos= IPageLayout.RIGHT;
	}
	if (shouldShowPackagesView()) {
		layout.addView(JavaUI.ID_PACKAGES_VIEW, relativePos, (float)0.25, relativePartId);
		relativePartId= JavaUI.ID_PACKAGES_VIEW;
		relativePos= IPageLayout.RIGHT;
	}
	layout.addView(JavaUI.ID_TYPES_VIEW, relativePos, (float)0.33, relativePartId);
	layout.addView(JavaUI.ID_MEMBERS_VIEW, IPageLayout.RIGHT, (float)0.50, JavaUI.ID_TYPES_VIEW);

	IPlaceholderFolderLayout placeHolderLeft= layout.createPlaceholderFolder("left", IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
	placeHolderLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
	placeHolderLeft.addPlaceholder(IPageLayout.ID_OUTLINE);
	placeHolderLeft.addPlaceholder(JavaUI.ID_PACKAGES);
	placeHolderLeft.addPlaceholder(JavaPlugin.ID_RES_NAV);
	placeHolderLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);


	IPlaceholderFolderLayout placeHolderBottom= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
	placeHolderBottom.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
	placeHolderBottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
	placeHolderBottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
	placeHolderBottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
	placeHolderBottom.addPlaceholder(JavaUI.ID_SOURCE_VIEW);
	placeHolderBottom.addPlaceholder(JavaUI.ID_JAVADOC_VIEW);
	placeHolderBottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
}
 
private void addViewShortcuts() {
	factory.addShowViewShortcut("org.eclipse.ant.ui.views.AntView"); //NON-NLS-1
	factory.addShowViewShortcut("org.eclipse.team.ccvs.ui.AnnotateView"); //NON-NLS-1
	factory.addShowViewShortcut("org.eclipse.pde.ui.DependenciesView"); //NON-NLS-1
	factory.addShowViewShortcut("org.eclipse.jdt.junit.ResultView"); //NON-NLS-1
	factory.addShowViewShortcut("org.eclipse.team.ui.GenericHistoryView"); //NON-NLS-1
	factory.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
	factory.addShowViewShortcut(JavaUI.ID_PACKAGES);
	factory.addShowViewShortcut(IPageLayout.ID_RES_NAV);
	factory.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
	factory.addShowViewShortcut(IPageLayout.ID_OUTLINE);
}
 
源代码28 项目: CppStyle   文件: CppStyleConsolePage.java
@Override
protected void configureToolBar(IToolBarManager mgr) {
	super.configureToolBar(mgr);
	fStdOut = new ShowStandardOutAction();
	fStdErr = new ShowStandardErrorAction();
	mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fStdOut);
	mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fStdErr);
}
 
源代码29 项目: ice   文件: EclipseStreamingTextWidget.java
/**
 * (non-Javadoc)
 * 
 * @see IStreamingTextWidget#display()
 */
@Override
public void display() {

	// Must sync with the display thread
	Display.getDefault().asyncExec(new Runnable() {
		@Override
		public void run() {
			// Get the currently active page
			IWorkbenchPage page = PlatformUI.getWorkbench()
					.getActiveWorkbenchWindow().getActivePage();
			try {
				// Load the console view
				consoleView = (IConsoleView) page
						.showView(IConsoleConstants.ID_CONSOLE_VIEW);
				// Create the console instance that will be used to display
				// text from this widget.
				console = new MessageConsole("CLI", null);
				// Add the console to the console manager
				ConsolePlugin.getDefault().getConsoleManager()
						.addConsoles(new IConsole[] { console });
				// Show the console in the view
				consoleView.display(console);
				console.activate();
				// Get an output stream for the console
				msgStream = console.newMessageStream();
				msgStream.setActivateOnWrite(true);
				msgStream.println("Streaming output console activated.");
			} catch (PartInitException e) {
				// Complain
				logger.error("EclipseStreamingTextWidget Message: "
						+ "Unable to stream text!");
				logger.error(getClass().getName() + " Exception!", e);
			}

		}
	});

	return;
}
 
源代码30 项目: ice   文件: Perspective.java
@Override
public void createInitialLayout(IPageLayout layout) {

	// Setup the perspective shortcut button in the top right corner
	layout.addPerspectiveShortcut(Perspective.ID);

	// Reserve space for the Console and Properties
	IFolderLayout bottomRight = layout.createFolder("bottomRight",
			IPageLayout.BOTTOM, 0.70f, layout.getEditorArea());
	bottomRight.addView(IConsoleConstants.ID_CONSOLE_VIEW);
	bottomRight.addView(IPageLayout.ID_PROP_SHEET);

	return;
}
 
 类所在包
 同包方法