plugins/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/perspective/WRTPerspective.java
author Eugene Ostroukhov <eugeneo@symbian.org>
Mon, 23 Aug 2010 17:45:32 -0700
changeset 475 77edd0cbdfe0
parent 470 d4809db37847
child 484 f5df819c1852
permissions -rw-r--r--
Removed old new project wizard
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     1
package org.symbian.tools.wrttools.product.perspective;
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     2
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     3
import org.eclipse.debug.ui.IDebugUIConstants;
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     4
import org.eclipse.search.ui.NewSearchUI;
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     5
import org.eclipse.ui.IFolderLayout;
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     6
import org.eclipse.ui.IPageLayout;
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     7
import org.eclipse.ui.IPerspectiveFactory;
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     8
import org.eclipse.ui.console.IConsoleConstants;
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
     9
import org.eclipse.ui.progress.IProgressConstants;
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    10
import org.eclipse.wst.jsdt.ui.JavaScriptUI;
470
d4809db37847 Changed repository layout and renamed project files. This revision is untested and may not run.
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 454
diff changeset
    11
import org.symbian.tools.tmw.previewer.PreviewerPlugin;
475
77edd0cbdfe0 Removed old new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 470
diff changeset
    12
import org.symbian.tools.tmw.ui.project.NewApplicationWizard;
39
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    13
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    14
public class WRTPerspective implements IPerspectiveFactory {
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    15
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    16
	public void createInitialLayout(IPageLayout layout) {
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    17
 		String editorArea = layout.getEditorArea();
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    18
		
140
63dff67c87d1 Fix for Bug 1870 - By default Preview should be shown above the outline
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 139
diff changeset
    19
		IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.15, editorArea); //$NON-NLS-1$
454
38d6944cff88 Bug 3352 - Replace our Navigator View with the JSDT one
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 433
diff changeset
    20
        folder.addView(IPageLayout.ID_PROJECT_EXPLORER);
373
85c2a2a29aad Snippets support introduced
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 140
diff changeset
    21
85c2a2a29aad Snippets support introduced
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 140
diff changeset
    22
        IFolderLayout snippetsFolder = layout.createFolder("snippets", IPageLayout.BOTTOM, (float) 0.5, "left"); //$NON-NLS-1$
85c2a2a29aad Snippets support introduced
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 140
diff changeset
    23
        snippetsFolder.addView("org.eclipse.wst.common.snippets.internal.ui.SnippetsView");
39
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    24
		
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    25
		IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    26
		outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    27
		outputfolder.addView(JavaScriptUI.ID_JAVADOC_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    28
		outputfolder.addView(JavaScriptUI.ID_SOURCE_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    29
		outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    30
		outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    31
		outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    32
		outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    33
		
140
63dff67c87d1 Fix for Bug 1870 - By default Preview should be shown above the outline
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 139
diff changeset
    34
		IFolderLayout helpersFolder = layout.createFolder("right", IPageLayout.RIGHT, (float) 0.60, editorArea);
63dff67c87d1 Fix for Bug 1870 - By default Preview should be shown above the outline
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 139
diff changeset
    35
		helpersFolder.addView(PreviewerPlugin.PREVIEW_VIEW);
63dff67c87d1 Fix for Bug 1870 - By default Preview should be shown above the outline
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 139
diff changeset
    36
		helpersFolder.addView(IPageLayout.ID_OUTLINE);
39
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    37
		
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    38
		layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    39
		layout.addActionSet(JavaScriptUI.ID_ACTION_SET);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    40
		layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    41
		layout.addActionSet("org.symbian.tools.wrttools.product.creationActionSet");
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    42
		
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    43
		// views - java
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    44
		layout.addShowViewShortcut(JavaScriptUI.ID_TYPE_HIERARCHY);
454
38d6944cff88 Bug 3352 - Replace our Navigator View with the JSDT one
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 433
diff changeset
    45
        layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
39
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    46
		layout.addShowViewShortcut(JavaScriptUI.ID_SOURCE_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    47
		layout.addShowViewShortcut(JavaScriptUI.ID_JAVADOC_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    48
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    49
		layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    50
		
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    51
		// views - search
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    52
		layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    53
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    54
		// views - standard workbench
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    55
		layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    56
		layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    57
		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
140
63dff67c87d1 Fix for Bug 1870 - By default Preview should be shown above the outline
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 139
diff changeset
    58
		layout.addShowViewShortcut(PreviewerPlugin.PREVIEW_VIEW);
373
85c2a2a29aad Snippets support introduced
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 140
diff changeset
    59
        layout.addShowViewShortcut("org.eclipse.wst.common.snippets.internal.ui.SnippetsView");
39
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    60
				
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    61
		// new actions - Java project creation wizard
475
77edd0cbdfe0 Removed old new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 470
diff changeset
    62
        layout.addNewWizardShortcut(NewApplicationWizard.ID);
39
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    63
		layout.addNewWizardShortcut("org.eclipse.wst.jsdt.ui.NewJSWizard"); //$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    64
		layout.addNewWizardShortcut("org.eclipse.wst.html.ui.internal.wizard.NewHTMLWizard"); //$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    65
		layout.addNewWizardShortcut("org.eclipse.wst.css.ui.internal.wizard.NewCSSWizard"); //$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    66
		layout.addNewWizardShortcut("org.eclipse.wst.xml.ui.internal.wizards.NewXMLWizard"); //$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    67
		layout.addNewWizardShortcut("org.eclipse.wst.jsdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    68
		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    69
		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    70
		layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    71
	}
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    72
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    73
}