org.eclipse.ui.IPageLayout#createFolder ( )源码实例Demo

下面列出了org.eclipse.ui.IPageLayout#createFolder ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: lapse-plus   文件: PerspectiveFactory.java
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);
}
 
源代码2 项目: neoscada   文件: ScadaPerspectiveFactory.java
@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$
}
 
源代码3 项目: elexis-3-core   文件: AbrechnungsPerspektive.java
public void createInitialLayout(IPageLayout layout){
	layout.setEditorAreaVisible(false);
	layout.setFixed(false);
	IFolderLayout fld = layout.createFolder("AbrechnungsFolder", IPageLayout.LEFT, 0.6f, IPageLayout.ID_EDITOR_AREA);
	IFolderLayout frd = layout.createFolder("Detailfolder", IPageLayout.LEFT, 0.4f, IPageLayout.ID_EDITOR_AREA);
	fld.addView(PatHeuteView.ID);
	fld.addView(KonsZumVerrechnenView.ID);
	fld.addView(RechnungsListeView.ID);
	frd.addView(RnDetailView.ID);
	frd.addView(KonsDetailView.ID);
	frd.addPlaceholder(FallDetailView.ID);
	frd.addPlaceholder(UiResourceConstants.PatientDetailView2_ID);
	layout.addShowViewShortcut(PatHeuteView.ID);
	layout.addShowViewShortcut(KonsZumVerrechnenView.ID);
	layout.addShowViewShortcut(RnDetailView.ID);
	layout.addShowViewShortcut(KonsDetailView.ID);
	layout.addShowViewShortcut(RechnungsListeView.ID);
}
 
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(final IPageLayout layout) {
    final String editorArea = layout.getEditorArea();

    final IFolderLayout leftView = layout.createFolder(
            "leftView", IPageLayout.LEFT, getExplorerViewRatio(), editorArea);
    leftView.addView("org.bonitasoft.studio.application.project.explorer");

    
    final IFolderLayout bottomfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.75f, editorArea); //$NON-NLS-1$
    if (RepositoryManager.getInstance().getCurrentRepository().isShared("org.eclipse.egit.core.GitProvider")) {
        bottomfolder.addView("org.eclipse.egit.ui.StagingView");
        bottomfolder.addPlaceholder("org.eclipse.team.ui.GenericHistoryView");
    }
    bottomfolder.addView("org.eclipse.ui.views.ProblemView");
    
    
    final IFolderLayout rightFolder = layout.createFolder("right", IPageLayout.RIGHT, 0.85f, editorArea); //$NON-NLS-1$
    rightFolder.addView(IPageLayout.ID_OUTLINE);
    
    IFolderLayout htmlViewFolder = layout.createFolder("right", IPageLayout.RIGHT, 0.5f, editorArea); //$NON-NLS-1$
    htmlViewFolder.addView("code.satyagraha.gfm.viewer.views.GfmView");
}
 
源代码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 项目: birt   文件: ReportRCPPerspective.java
/**
 * Defines the initial layout for a page.
 */
private void defineLayout( IPageLayout layout )
{
	// Editors are placed for free.
	String editorArea = layout.getEditorArea( );

	// Top left.
	IFolderLayout topLeft = layout.createFolder( "topLeft", IPageLayout.LEFT, (float) 0.26, editorArea );//$NON-NLS-1$
	topLeft.addView( PaletteView.ID );
	topLeft.addView( DataView.ID );
	topLeft.addView( LibraryExplorerView.ID );

	// Bottom left.
	IFolderLayout bottomLeft = layout.createFolder( "bottomLeft", IPageLayout.BOTTOM, (float) 0.50,//$NON-NLS-1$
			"topLeft" );//$NON-NLS-1$
	bottomLeft.addView( IPageLayout.ID_OUTLINE );

	// Bottom right.
	IFolderLayout bootomRight = layout.createFolder( "bootomRight", IPageLayout.BOTTOM, (float) 0.66, editorArea );//$NON-NLS-1$
	bootomRight.addView( AttributeView.ID );
}
 
源代码8 项目: tracecompass   文件: ControlPerspectiveFactory.java
@Override
public void createInitialLayout(IPageLayout layout) {
    layout.setEditorAreaVisible(true);

    // Create the top left folder
    IFolderLayout topLeftFolder = layout.createFolder(
            "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    topLeftFolder.addView(PROJECT_VIEW_ID);

    // Create the bottom left folder
    IFolderLayout bottomLeftFolder = layout.createFolder(
            "bottomLeftFolder", IPageLayout.BOTTOM, 0.70f, "topLeftFolder"); //$NON-NLS-1$ //$NON-NLS-2$
    bottomLeftFolder.addView(CONTROL_VIEW_ID);

    // Create the bottom right folder
    IFolderLayout bottomRightFolder = layout.createFolder(
            "bottomRightFolder", IPageLayout.BOTTOM, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    bottomRightFolder.addView(PROPERTIES_VIEW_ID);
}
 
源代码9 项目: 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);
    }
}
 
源代码10 项目: elexis-3-core   文件: AdressPerspektive.java
public void createInitialLayout(IPageLayout layout){
	layout.setEditorAreaVisible(false);
	layout.setFixed(false);
	
	IFolderLayout oben =
		layout.createFolder("oben", IPageLayout.TOP, 0.5f, IPageLayout.ID_EDITOR_AREA);
	IFolderLayout details =
		layout.createFolder("details", IPageLayout.TOP, 1.0f, IPageLayout.ID_EDITOR_AREA);
	oben.addView(KontakteView.ID);
	details.addView(KontaktDetailView.ID);
}
 
源代码11 项目: bonita-studio   文件: BdmPerspectiveFactory.java
@Override
public void createInitialLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();
    final IFolderLayout leftFolder = layout.createFolder(
            "leftFolder", IPageLayout.LEFT, 0.2f, editorArea);
    leftFolder.addView("org.bonitasoft.studio.application.project.explorer");
    if (RepositoryManager.getInstance().getCurrentRepository().isShared("org.eclipse.egit.core.GitProvider")) {
        leftFolder.addView("org.eclipse.egit.ui.StagingView");
        leftFolder.addPlaceholder("org.eclipse.team.ui.GenericHistoryView");
    }
}
 
源代码12 项目: elexis-3-core   文件: BestellPerspektive.java
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);
}
 
源代码13 项目: tracecompass   文件: TmfAlignTimeAxisTest.java
@Override
public void createInitialLayout(IPageLayout layout) {
    if (layout == null) {
        return;
    }

    // Editor area
    layout.setEditorAreaVisible(true);

    // Editor area
    layout.setEditorAreaVisible(true);

    // Create the top left folder
    IFolderLayout topLeftFolder = layout.createFolder("topLeftFolder", IPageLayout.LEFT, 0.4f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    topLeftFolder.addView(IPageLayout.ID_PROJECT_EXPLORER);

    // Create the top right folder
    IFolderLayout topRightFolder = layout.createFolder("topRightFolder", IPageLayout.BOTTOM, EDITOR_AREA_RATIO, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    topRightFolder.addView(HistogramView.ID);

    // Create the middle right folder
    IFolderLayout middleRightFolder = layout.createFolder("middleRightFolder", IPageLayout.BOTTOM, 0.50f, "topRightFolder"); //$NON-NLS-1$
    middleRightFolder.addView(TimeGraphViewStub.ID);

    // Create the bottom right folder
    IFolderLayout bottomRightFolder = layout.createFolder("bottomRightFolder", IPageLayout.BOTTOM, 0.65f, "middleRightFolder"); //$NON-NLS-1$ //$NON-NLS-2$
    bottomRightFolder.addView(TimeChartView.ID);

    // Populate menus, etc
    layout.addPerspectiveShortcut(ID);
    layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
}
 
源代码14 项目: bonita-studio   文件: PerspectiveProcessFactory.java
@Override
public void createInitialLayout(final IPageLayout layout) {
    // Editors are placed for free.
    final String editorArea = layout.getEditorArea();

    final IFolderLayout left = layout.createFolder(
            "left",
            IPageLayout.LEFT,
            getExplorerViewRatio(),
            editorArea);
    left.addView("org.bonitasoft.studio.application.project.explorer");
    left.addView("org.bonitasoft.studio.views.overview.tree");

    layout.createFolder("right", IPageLayout.RIGHT, 100, editorArea);
    // Bottom right.
    final IFolderLayout bottomRight = layout.createFolder("bottom", IPageLayout.BOTTOM, //$NON-NLS-1$
            (float) 0.7, editorArea);
    bottomRight.addView("org.bonitasoft.studio.views.properties.process.general");
    bottomRight.addView("org.bonitasoft.studio.views.properties.process.data");
    bottomRight.addView("org.bonitasoft.studio.views.properties.process.execution");
    bottomRight.addView("org.bonitasoft.studio.views.properties.process.appearance");

    for (final String viewId : BonitaPerspectivesUtils.getContributedPropertiesViews(PROCESS_PERSPECTIVE_ID)) {
        bottomRight.addView(viewId);
    }
    bottomRight.addView("org.bonitasoft.studio.validation.view");
    bottomRight.addView("org.bonitasoft.studio.views.overview");
    if (RepositoryManager.getInstance().getCurrentRepository().isShared("org.eclipse.egit.core.GitProvider")) {
        bottomRight.addView("org.eclipse.egit.ui.StagingView");
        bottomRight.addPlaceholder("org.eclipse.team.ui.GenericHistoryView");
    }

}
 
@Override
public void createInitialLayout(IPageLayout layout) {

    layout.setEditorAreaVisible(true);

    // Create the top left folder
    IFolderLayout topLeftFolder = layout.createFolder(
            "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    topLeftFolder.addView(PROJECT_VIEW_ID);

    // Create the top right folder
    IFolderLayout topFolders[] = new IFolderLayout[3];
    topFolders[0] = layout.createFolder(
            "topFolder1", IPageLayout.TOP, 1.0f/5.0f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    topFolders[0].addView(CPU_VIEW_ID);
    // Create the top right folder
    topFolders[1] = layout.createFolder(
            "topFolder2", IPageLayout.TOP, 1.0f/4.0f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    topFolders[1].addView(DISK_VIEW_ID);
    // Create the top right folder
    topFolders[2] = layout.createFolder(
            "topFolders3", IPageLayout.TOP, 1.0f/3.0f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    topFolders[2].addView(MEMORY_VIEW_ID);

    // Create the bottom right folder
    IFolderLayout bottomRightFolder = layout.createFolder(
            "bottomRightFolder", IPageLayout.BOTTOM, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    bottomRightFolder.addView(HISTOGRAM_VIEW_ID);
    bottomRightFolder.addView(BOOKMARKS_VIEW_ID);

    layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
}
 
源代码16 项目: tracecompass   文件: PerspectiveFactory.java
@Override
public void createInitialLayout(IPageLayout layout) {

    layout.setEditorAreaVisible(true);

    addFastViews(layout);
    addViewShortcuts(layout);
    addPerspectiveShortcuts(layout);

    // Create the top left folder
    IFolderLayout topLeftFolder = layout.createFolder(
            "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    topLeftFolder.addView(PROJECT_VIEW_ID);

    // Create the bottom left folder
    IFolderLayout bottomLeftFolder = layout.createFolder(
            "bottomLeftFolder", IPageLayout.BOTTOM, 0.70f, "topLeftFolder"); //$NON-NLS-1$ //$NON-NLS-2$
    bottomLeftFolder.addView(CONTROL_VIEW_ID);

    // Create the top right folder
    IFolderLayout topRightFolder = layout.createFolder(
            "topRightFolder", IPageLayout.TOP, 0.40f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    topRightFolder.addView(RESOURCES_VIEW_ID);
    topRightFolder.addView(CONTROLFLOW_VIEW_ID);
    topRightFolder.addView(STATISTICS_VIEW_ID);

    // Create the bottom right folder
    IFolderLayout bottomRightFolder = layout.createFolder(
            "bottomRightFolder", IPageLayout.BOTTOM, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
    bottomRightFolder.addView(HISTOGRAM_VIEW_ID);
    bottomRightFolder.addView(PROPERTIES_VIEW_ID);
    bottomRightFolder.addView(BOOKMARKS_VIEW_ID);

    layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
}
 
public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();

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

	IPlaceholderFolderLayout outputfolder= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$
	outputfolder.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
	outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
	outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
	outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
	outputfolder.addPlaceholder(JavaUI.ID_SOURCE_VIEW);
	outputfolder.addPlaceholder(JavaUI.ID_JAVADOC_VIEW);
	outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);

	layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
	layout.addActionSet(JavaUI.ID_ACTION_SET);
	layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);

	// views - java
	layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
	layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY);

	layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);

	// views - debugging
	layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);

	// views - standard workbench
	layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
	layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
	layout.addShowViewShortcut(JavaPlugin.ID_RES_NAV);
	layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
	layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
	layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
	layout.addShowViewShortcut(TemplatesView.ID);
	layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$

	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard");	 //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"); //$NON-NLS-1$
	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$

	// 'Window' > 'Open Perspective' contributions
	layout.addPerspectiveShortcut(JavaUI.ID_PERSPECTIVE);
	layout.addPerspectiveShortcut(JavaUI.ID_BROWSING_PERSPECTIVE);
	layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);

}
 
源代码18 项目: RDFS   文件: HadoopPerspectiveFactory.java
public void createInitialLayout(IPageLayout layout) {
  layout.addNewWizardShortcut("org.apache.hadoop.eclipse.NewDriverWizard");
  layout.addNewWizardShortcut("org.apache.hadoop.eclipse.NewMapperWizard");
  layout
      .addNewWizardShortcut("org.apache.hadoop.eclipse.NewReducerWizard");

  IFolderLayout left =
      layout.createFolder("org.apache.hadoop.eclipse.perspective.left",
          IPageLayout.LEFT, 0.2f, layout.getEditorArea());
  left.addView("org.eclipse.ui.navigator.ProjectExplorer");

  IFolderLayout bottom =
      layout.createFolder("org.apache.hadoop.eclipse.perspective.bottom",
          IPageLayout.BOTTOM, 0.7f, layout.getEditorArea());
  bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
  bottom.addView(IPageLayout.ID_TASK_LIST);
  bottom.addView(JavaUI.ID_JAVADOC_VIEW);
  bottom.addView("org.apache.hadoop.eclipse.view.servers");
  bottom.addPlaceholder(JavaUI.ID_SOURCE_VIEW);
  bottom.addPlaceholder(IPageLayout.ID_PROGRESS_VIEW);
  bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
  bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);

  IFolderLayout right =
      layout.createFolder("org.apache.hadoop.eclipse.perspective.right",
          IPageLayout.RIGHT, 0.8f, layout.getEditorArea());
  right.addView(IPageLayout.ID_OUTLINE);
  right.addView("org.eclipse.ui.cheatsheets.views.CheatSheetView");
  // right.addView(layout.ID); .. cheat sheet here

  layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
  layout.addActionSet(JavaUI.ID_ACTION_SET);
  layout.addActionSet(JavaUI.ID_CODING_ACTION_SET);
  layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);
  layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
  layout.addActionSet(JavaUI.ID_SEARCH_ACTION_SET);

  layout
      .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard");
  layout
      .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard");
  layout
      .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard");
  layout
      .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard");
  layout
      .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard");
  layout
      .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard");
  layout
      .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard");
  layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");
  layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");
  layout
      .addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");

  // CheatSheetViewerFactory.createCheatSheetView().setInput("org.apache.hadoop.eclipse.cheatsheet");
}
 
public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();

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

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

	IFolderLayout outlineFolder = layout.createFolder("right", IPageLayout.RIGHT, (float)0.75, editorArea); //$NON-NLS-1$
	outlineFolder.addView(IPageLayout.ID_OUTLINE);

	outlineFolder.addPlaceholder(TemplatesView.ID);

	layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
	layout.addActionSet(JavaUI.ID_ACTION_SET);
	layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);
	layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);

	// views - java
	layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
	layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY);
	layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW);
	layout.addShowViewShortcut(JavaUI.ID_JAVADOC_VIEW);


	// views - search
	layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);

	// views - debugging
	layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);

	// views - standard workbench
	layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
	layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
	layout.addShowViewShortcut(JavaPlugin.ID_RES_NAV);
	layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
	layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
	layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
	layout.addShowViewShortcut(TemplatesView.ID);
	layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$

	// new actions - Java project creation wizard
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard");	 //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"); //$NON-NLS-1$
	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$

	// 'Window' > 'Open Perspective' contributions
	layout.addPerspectiveShortcut(JavaUI.ID_BROWSING_PERSPECTIVE);
	layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);

}
 
源代码20 项目: sarl   文件: SARLPerspectiveFactory.java
@Override
public void createInitialLayout(IPageLayout layout) {
	final String editorArea = layout.getEditorArea();

	final IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, //$NON-NLS-1$
			LEFT_PANEL_RATIO, editorArea);
	//folder.addView(JavaUI.ID_PACKAGES);
	folder.addView(SARLPackageExplorerPart.ID_PACKAGES);
	folder.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
	folder.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);

	final IFolderLayout outputfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, //$NON-NLS-1$
			BOTTOM_PANEL_RATIO, editorArea);
	outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
	outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
	outputfolder.addView(IPageLayout.ID_TASK_LIST);
	outputfolder.addPlaceholder(JavaUI.ID_JAVADOC_VIEW);
	outputfolder.addPlaceholder(JavaUI.ID_SOURCE_VIEW);
	outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
	outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
	outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);

	final IFolderLayout outlineFolder = layout.createFolder("right", IPageLayout.RIGHT, //$NON-NLS-1$
			RIGHT_PANEL_RATIO, editorArea);
	outlineFolder.addView(IPageLayout.ID_OUTLINE);

	layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
	layout.addActionSet(JavaUI.ID_ACTION_SET);
	layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);
	layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);

	// views - java
	layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
	layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY);
	layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW);


	// views - search
	layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);

	// views - debugging
	layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);

	// views - standard workbench
	layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
	layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
	layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
	layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
	layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
	layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$

	// new actions - Java project creation wizard
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlProject"); //$NON-NLS-1$
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlScript"); //$NON-NLS-1$
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlAgent"); //$NON-NLS-1$
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlBehavior"); //$NON-NLS-1$
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlCapacity"); //$NON-NLS-1$
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlEvent"); //$NON-NLS-1$
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlSkill"); //$NON-NLS-1$

	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlClass"); //$NON-NLS-1$
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlInterface"); //$NON-NLS-1$
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlEnumeration"); //$NON-NLS-1$
	layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlAnnotation"); //$NON-NLS-1$

	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$

	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$
	layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard");	 //$NON-NLS-1$
	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$

	// 'Window' > 'Open Perspective' contributions
	//--- Add the SARL debug perspective
	layout.addPerspectiveShortcut(SARLEclipseConfig.ID_SARL_DEBUG_PERSPECTIVE);
	//--- Add the Java perspectives
	layout.addPerspectiveShortcut(JavaUI.ID_PERSPECTIVE);
	layout.addPerspectiveShortcut(JavaUI.ID_BROWSING_PERSPECTIVE);
	//--- Add the Debug perspectives
	layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
}