Java Code Examples for org.eclipse.ui.IPageLayout#addView()

The following examples show how to use org.eclipse.ui.IPageLayout#addView() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScadaPerspectiveFactory.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
@SuppressWarnings ( "deprecation" )
@Override
public void createInitialLayout ( final IPageLayout factory )
{
    final IFolderLayout topLeft = factory.createFolder ( "topLeft", IPageLayout.LEFT, 0.25f, factory.getEditorArea () );
    topLeft.addPlaceholder ( IPageLayout.ID_RES_NAV );
    topLeft.addView ( JavaUI.ID_PACKAGES );
    topLeft.addPlaceholder ( JavaUI.ID_TYPE_HIERARCHY );
    topLeft.addView ( "org.eclipse.scada.core.ui.connection.ConnectionView" ); //$NON-NLS-1$

    final IFolderLayout bottom = factory.createFolder ( "bottomRight", IPageLayout.BOTTOM, 0.75f, factory.getEditorArea () );
    bottom.addView ( "org.eclipse.pde.runtime.LogView" ); //$NON-NLS-1$
    bottom.addView ( IPageLayout.ID_TASK_LIST );
    bottom.addView ( IPageLayout.ID_PROBLEM_VIEW );

    factory.addView ( IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, 0.75f, factory.getEditorArea () );

    factory.addNewWizardShortcut ( "org.eclipse.pde.ui.NewProjectWizard" ); //$NON-NLS-1$
    factory.addNewWizardShortcut ( "org.eclipse.pde.ui.NewFeatureProjectWizard" ); //$NON-NLS-1$
}
 
Example 2
Source File: XdsPerspectiveFactory.java    From xds-ide with Eclipse Public License 1.0 6 votes vote down vote up
@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);
    }
 
Example 3
Source File: TypeScriptPerspectiveFactory.java    From typescript.java with MIT License 6 votes vote down vote up
@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);

}
 
Example 4
Source File: PerspectiveFactory.java    From lapse-plus with GNU General Public License v3.0 6 votes vote down vote up
public void createInitialLayout(IPageLayout layout) {
	 // Get the editor area.
	  String editorArea = layout.getEditorArea();
	  
	  IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.75f, editorArea);
	  bottom.addView(PROVENANCE_TRACKER_VIEW_ID);
	  bottom.addView(SOURCE_VIEW_ID);
	  bottom.addView(SINK_VIEW_ID);
	  //bottom.addView(MARKER_VIEW_ID);
	  bottom.addView(IPageLayout.ID_TASK_LIST);
	  bottom.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
     
	  // Add the favorites action set
	  //layout.addActionSet(FAVORITES_ACTION_ID);	
	  
	  layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, 0.85f, editorArea);
}
 
Example 5
Source File: PythonPerspectiveFactory.java    From Pydev with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * @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);
    }
}
 
Example 6
Source File: LangPerspective.java    From goclipse with Eclipse Public License 1.0 6 votes vote down vote up
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);
}
 
Example 7
Source File: JavaBrowsingPerspectiveFactory.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
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);
}
 
Example 8
Source File: StockManagementPerspective.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates the initial layout for a page.
 */
public void createInitialLayout(IPageLayout layout){
	layout.setEditorAreaVisible(false);
	addFastViews(layout);
	addViewShortcuts(layout);
	addPerspectiveShortcuts(layout);
	
	layout.addView(BestellView.ID, IPageLayout.RIGHT, 0.5f, IPageLayout.ID_EDITOR_AREA);
	layout.addView(ArtikelSelektor.ID, IPageLayout.TOP, 0.5f, IPageLayout.ID_EDITOR_AREA);
	layout.addView(StockView.ID, IPageLayout.BOTTOM, 0.5f, IPageLayout.ID_EDITOR_AREA);
}
 
Example 9
Source File: LeistungPerspektive.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
public void createInitialLayout(IPageLayout layout){
	layout.setEditorAreaVisible(false);
	layout.setFixed(false);
	layout.addPlaceholder(LeistungenView.ID, IPageLayout.LEFT, 0.3f,
		IPageLayout.ID_EDITOR_AREA);
	layout.addView(CodeDetailView.ID, IPageLayout.LEFT, 0.8f, IPageLayout.ID_EDITOR_AREA);
	layout.addShowViewShortcut(CodeDetailView.ID);
	
}
 
Example 10
Source File: BBSPerspective.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
public void createInitialLayout(IPageLayout layout){
	String editorArea = layout.getEditorArea();
	layout.setEditorAreaVisible(false);
	layout.setFixed(true);
	layout.addView(BBSView.ID,  IPageLayout.RIGHT, 0.9f, editorArea);

	
}
 
Example 11
Source File: BestellPerspektive.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
public void createInitialLayout(IPageLayout layout){
	layout.setEditorAreaVisible(false);
	layout.setFixed(false);
	
	layout.addView(ArtikelSelektor.ID, SWT.LEFT, 0.4f, IPageLayout.ID_EDITOR_AREA);
	IFolderLayout ifl =
		layout.createFolder("iflRight", SWT.RIGHT, 0.6f, IPageLayout.ID_EDITOR_AREA);
	ifl.addView(BestellView.ID);
}
 
Example 12
Source File: JavaBrowsingPerspectiveFactory.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
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);
}
 
Example 13
Source File: SVNPerspective.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Defines the initial layout for a page.  
 */
public void defineLayout(IPageLayout layout) {
	String editorArea = layout.getEditorArea();
	IFolderLayout top =
		layout.createFolder("top", IPageLayout.LEFT, 0.40f, editorArea);	//$NON-NLS-1$
	top.addView(RepositoriesView.VIEW_ID);
	layout.addView(ISVNUIConstants.HISTORY_VIEW_ID, IPageLayout.BOTTOM, 0.70f, editorArea);
	layout.setEditorAreaVisible(true);
}
 
Example 14
Source File: TexPerspectiveFactory.java    From texlipse with Eclipse Public License 1.0 5 votes vote down vote up
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);
}
 
Example 15
Source File: Perspective.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void createInitialLayout ( final IPageLayout layout )
{
    layout.setEditorAreaVisible ( false );
    layout.addView ( "org.eclipse.scada.core.ui.connection.ConnectionView", IPageLayout.LEFT, 0.25f, IPageLayout.ID_EDITOR_AREA );
    final IFolderLayout folder = layout.createFolder ( "org.eclipse.scada.hmi.app.adminclient", IPageLayout.RIGHT, 0.4f, IPageLayout.ID_EDITOR_AREA ); //$NON-NLS-1$
    folder.addPlaceholder ( "*" );
}
 
Example 16
Source File: ReminderPerspektive.java    From elexis-3-core with Eclipse Public License 1.0 4 votes vote down vote up
public void createInitialLayout(IPageLayout layout){
	layout.setEditorAreaVisible(false);
	layout.setFixed(false);
	layout.addView(ReminderView.ID, IPageLayout.LEFT, 0.8f, IPageLayout.ID_EDITOR_AREA);
}
 
Example 17
Source File: Perspective.java    From jbt with Apache License 2.0 3 votes vote down vote up
public void createInitialLayout(IPageLayout layout) {
	layout.setEditorAreaVisible(true);

	layout.addView(NodesNavigator.ID, IPageLayout.LEFT, 0.3f, layout.getEditorArea());

	IFolderLayout rightFolderLayout = layout.createFolder(RIGHT_FOLDER_ID, IPageLayout.RIGHT,
			0.6f, layout.getEditorArea());
	
	IFolderLayout bottomRightFolderLayout=layout.createFolder(BOTTOM_RIGHT_FOLDER_ID, IPageLayout.BOTTOM, 0.5f, RIGHT_FOLDER_ID);
	
	rightFolderLayout.addView(NodeInfo.ID);
	bottomRightFolderLayout.addView(NodesSearcher.ID);
}