/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.jbpm.gd.jpdl; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.ui.IFolderLayout; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; import org.eclipse.ui.progress.IProgressConstants; public class JpdlPerspectiveFactory implements IPerspectiveFactory { public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.20, editorArea); //$NON-NLS-1$ folder.addView("org.eclipse.ui.navigator.ProjectExplorer"); folder.addPlaceholder(JavaUI.ID_PACKAGES); folder.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY); folder.addPlaceholder("org.eclipse.ui.views.ResourceNavigator"); IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.70, editorArea); //$NON-NLS-1$ outputfolder.addView(IPageLayout.ID_PROP_SHEET); outputfolder.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW); outputfolder.addPlaceholder(JavaUI.ID_JAVADOC_VIEW); outputfolder.addPlaceholder(JavaUI.ID_SOURCE_VIEW); outputfolder.addPlaceholder("org.eclipse.search.ui.views.SearchView"); outputfolder.addPlaceholder("org.eclipse.ui.console.ConsoleView"); outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.BOTTOM, (float)0.70, "left"); layout.addView("org.jbpm.gd.jpdl.overview", IPageLayout.BOTTOM, (float)0.65, "left"); layout.addActionSet("org.eclipse.debug.ui.launchActionSet"); 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("org.eclipse.search.ui.views.SearchView"); // views - debugging layout.addShowViewShortcut("org.eclipse.ui.console.ConsoleView"); // views - standard workbench layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET); layout.addShowViewShortcut("org.jbpm.gd.jpdl.overview"); 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.jbpm.ui.wizard.new.file"); //$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$ } }