/**
   * Creates the initial layout for a page.
   *
   * <p>Implementors of this method may add additional views to a perspective. The perspective
   * already contains an editor folder identified by the result of <code>IPageLayout.getEditorArea()
   * </code>. Additional views should be added to the layout using this value as the initial point
   * of reference.
   *
   * @param layout the page layout
   */
  public void createInitialLayout(IPageLayout layout) {
    // Get the editor area.
    String editorArea = layout.getEditorArea();

    layout.addView(
        "net.refractions.udig.project.ui.projectExplorer",
        IPageLayout.LEFT,
        0.25f,
        editorArea); //$NON-NLS-1$
    // layout.addView( "net.refractions.udig.project.ui.layerManager", IPageLayout.BOTTOM, 0.25f,
    // //$NON-NLS-1$
    //        "net.refractions.udig.project.ui.projectExplorer" ); //$NON-NLS-1$

    IFolderLayout folder =
        layout.createFolder(
            "net.refractions.udig.mapPerspective.selection",
            IPageLayout.BOTTOM,
            0.25f, //$NON-NLS-1$
            "net.refractions.udig.project.ui.projectExplorer");
    folder.addView("net.refractions.udig.project.ui.layerManager");
    folder.addView("net.refractions.udig.ui.aoiView");

    layout.addView(
        "net.refractions.udig.catalog.ui.CatalogView",
        IPageLayout.BOTTOM,
        0.65f,
        editorArea); //$NON-NLS-1$
    layout.addActionSet("net.refractions.udig.helpMenuItems");
    layout.addActionSet("net.refractions.udig.ui.default");
    layout.addPerspectiveShortcut(StylePerspective.ID_PERSPECTIVE);
  }
  /**
   * Defines the ATL perspective layout.
   *
   * @param layout the given layout
   */
  public void defineLayout(IPageLayout layout) {
    // editors are placed for free.
    String editorArea = layout.getEditorArea();

    // place navigator to the left (of editor area)
    IFolderLayout left =
        layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); // $NON-NLS-1$

    // fix: IPageLayout.ID_PROJECT_EXPLORER missing in eclipse < 3.5
    left.addView("org.eclipse.ui.navigator.ProjectExplorer"); // $NON-NLS-1$

    // problem view at the bottom (of editor area)
    IFolderLayout bottom =
        layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); // $NON-NLS-1$
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
    bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
    bottom.addView("org.eclipse.pde.runtime.LogView"); // $NON-NLS-1$

    // outline view to right (of editor area)
    IFolderLayout right =
        layout.createFolder("right", IPageLayout.RIGHT, (float) 0.75, editorArea); // $NON-NLS-1$
    right.addView(IPageLayout.ID_OUTLINE);

    // add shortcuts
    layout.addNewWizardShortcut("atlProjectWizard"); // $NON-NLS-1$
    layout.addNewWizardShortcut("atlPluginWizard"); // $NON-NLS-1$
    layout.addNewWizardShortcut("atlFileWizard"); // $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.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);

    layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);

    layout.addPerspectiveShortcut("org.eclipse.m2m.atl.adt.atlPerspective"); // $NON-NLS-1$
  }
  public void createInitialLayout(IPageLayout layout) {

    String editorArea = layout.getEditorArea();

    // New wizards
    layout.addNewWizardShortcut(ID_NEW_BPEL_PROJECT_WIZARD);
    layout.addNewWizardShortcut(ID_NEW_BPEL_FILE_WIZARD);
    layout.addNewWizardShortcut(ID_NEW_BPEL_DEPLOY_WIZARD);

    // view shortcuts
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
    layout.addShowViewShortcut(ID_PALETTE_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
    layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
    layout.addShowViewShortcut(ID_SERVERS_VIEW);

    // views
    IFolderLayout leftTop =
        layout.createFolder("leftTop", IPageLayout.LEFT, 0.2f, editorArea); // $NON-NLS-1$
    leftTop.addView(IPageLayout.ID_PROJECT_EXPLORER);
    leftTop.addPlaceholder(IPageLayout.ID_RES_NAV);

    IFolderLayout leftBottom =
        layout.createFolder(
            "leftBottom", IPageLayout.BOTTOM, 0.7f, "leftTop"); // $NON-NLS-1$ //$NON-NLS-2$
    leftBottom.addView(ID_SERVERS_VIEW);

    IFolderLayout bottom =
        layout.createFolder("bottom", IPageLayout.BOTTOM, 0.7f, editorArea); // $NON-NLS-1$
    bottom.addView(IPageLayout.ID_PROP_SHEET);
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
    bottom.addView(IPageLayout.ID_TASK_LIST);
    bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);

    IFolderLayout rightTop =
        layout.createFolder("rightTop", IPageLayout.RIGHT, 0.8f, editorArea); // $NON-NLS-1$
    rightTop.addView(IPageLayout.ID_OUTLINE);

    IFolderLayout rightBottom =
        layout.createFolder(
            "rightBottom", IPageLayout.BOTTOM, 0.4f, "rightTop"); // $NON-NLS-1$ //$NON-NLS-2$
    rightBottom.addView(ID_PALETTE_VIEW);

    // action sets
    layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
    // layout.addActionSet(ID_SERVERS_ACTION_SET);

  }
  /**
   * Defines the initial actions for a page.
   *
   * @param layout The layout we are filling
   */
  private void defineActions(IPageLayout layout) {
    // Add "new wizards".
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); // $NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); // $NON-NLS-1$

    // Add "show views".
    layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
    layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_PROGRESS_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);

    layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
  }
  /**
   * Defines the initial actions for a page.
   *
   * @param layout The layout we are filling
   */
  public void defineActions(IPageLayout layout) {
    // Add "new wizards".
    layout.addNewWizardShortcut(BasicNewFolderResourceWizard.WIZARD_ID);
    layout.addNewWizardShortcut(BasicNewFileResourceWizard.WIZARD_ID);

    // Add "show views".
    layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
    layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_PROGRESS_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);

    layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
  }
  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.addView(IPageLayout.ID_RES_NAV);

    IFolderLayout outputfolder =
        layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); // $NON-NLS-1$
    outputfolder.addView(IPageLayout.ID_PROP_SHEET);
    outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
    outputfolder.addView("org.jbpm.eclipse.task.views.TaskView");
    outputfolder.addView("org.drools.eclipse.debug.AuditView");
    //        outputfolder.addView("org.guvnor.tools.views.RepositoryView");
    outputfolder.addPlaceholder(JavaUI.ID_JAVADOC_VIEW);
    outputfolder.addPlaceholder(JavaUI.ID_SOURCE_VIEW);
    outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
    outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);

    layout.addNewWizardShortcut(IKieConstants.BPMN2_MODELER_JBPM_WIZARD);
    layout.addNewWizardShortcut("org.jbpm.eclipse.new.project");

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

    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 - standard workbench
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
    layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);

    // new actions - Java project creation wizard
    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.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$
  }
  /* (non-Javadoc)
   * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
   */
  public void createInitialLayout(IPageLayout layout) {
    layout.addNewWizardShortcut("org.cubictest.ui.wizards.NewTestWizard");
    layout.addNewWizardShortcut("org.cubictest.ui.wizards.NewSubTestWizard");
    layout.addNewWizardShortcut("org.cubictest.ui.wizards.NewTestSuiteWizard");
    layout.addNewWizardShortcut("org.cubictest.ui.wizards.NewCubicTestProjectWizard");
    layout.addNewWizardShortcut("org.cubictest.ui.wizards.NewParamWizard");
    layout.addNewWizardShortcut("org.cubictest.ui.wizards.NewPropertiesWizard");
    layout.addNewWizardShortcut("org.cubictest.ui.wizards.NewCustomTestStepWizard");
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");
    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.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(JavaUI.ID_PACKAGES); // package explorer
    layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
    layout.addShowViewShortcut(LOG_VIEW_ID);
    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
    layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);

    layout.addPerspectiveShortcut(JavaUI.ID_PERSPECTIVE);
    layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);

    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);

    String editorArea = layout.getEditorArea();

    // Top left: Package explorer view and Bookmarks view placeholder
    String topLeftId = "topLeft";
    IFolderLayout topLeft = layout.createFolder(topLeftId, IPageLayout.LEFT, 0.20f, editorArea);
    topLeft.addView(JavaUI.ID_PACKAGES);
    topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);

    // Bottom left: Outline view
    IFolderLayout bottomLeft =
        layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.50f, topLeftId);
    bottomLeft.addView(IPageLayout.ID_OUTLINE);

    // Bottom right: Property Sheet view and Log view
    IFolderLayout bottomRight =
        layout.createFolder("bottomRight", IPageLayout.BOTTOM, 0.66f, editorArea);
    bottomRight.addView(IPageLayout.ID_PROP_SHEET);
    bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW);
    bottomRight.addView(LOG_VIEW_ID);
    bottomRight.addView(IProgressConstants.PROGRESS_VIEW_ID);

    layout.addPerspectiveShortcut("cubicTestPlugin.CubicTest");

    try {
      // Set "activate on errors" property to false on logview (only works if it's hidden)
      Preferences preferences = PDERuntimePlugin.getDefault().getPluginPreferences();
      preferences.setValue("activate", false);
      PDERuntimePlugin.getDefault().savePluginPreferences();
    } catch (Throwable t) {
      t.printStackTrace();
    }
  }
  public void createInitialLayout(IPageLayout layout) {
    if (stackBrowsingViewsVertically()) createVerticalLayout(layout);
    else createHorizontalLayout(layout);

    // action sets
    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_TYPE_HIERARCHY);
    layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
    layout.addShowViewShortcut(JavaUI.ID_PROJECTS_VIEW);
    layout.addShowViewShortcut(JavaUI.ID_PACKAGES_VIEW);
    layout.addShowViewShortcut(JavaUI.ID_TYPES_VIEW);
    layout.addShowViewShortcut(JavaUI.ID_MEMBERS_VIEW);
    layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW);
    layout.addShowViewShortcut(JavaUI.ID_JAVADOC_VIEW);
    layout.addShowViewShortcut(TemplatesView.ID);

    // 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("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_PERSPECTIVE);
    layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
  }