org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/perspective/WRTPerspective.java
author Eugene Ostroukhov <eugeneo@symbian.org>
Thu, 11 Feb 2010 16:56:30 -0800
changeset 139 f0a865ead60b
parent 56 22f918ed49f7
child 140 63dff67c87d1
permissions -rw-r--r--
Fixed Bug 1869 - Open index file and select it in navigator after the project is created/imported
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;
139
f0a865ead60b Fixed Bug 1869 - Open index file and select it in navigator after the project is created/imported
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 56
diff changeset
    11
import org.symbian.tools.wrttools.Activator;
39
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    12
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    13
public class WRTPerspective implements IPerspectiveFactory {
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    14
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    15
	public void createInitialLayout(IPageLayout layout) {
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    16
 		String editorArea = layout.getEditorArea();
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    17
		
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    18
		IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$
139
f0a865ead60b Fixed Bug 1869 - Open index file and select it in navigator after the project is created/imported
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 56
diff changeset
    19
		folder.addView(Activator.NAVIGATOR_ID);
39
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    20
		folder.addView(JavaScriptUI.ID_TYPE_HIERARCHY);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    21
		
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    22
		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
    23
		outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    24
		outputfolder.addView(JavaScriptUI.ID_JAVADOC_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    25
		outputfolder.addView(JavaScriptUI.ID_SOURCE_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    26
		outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    27
		outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    28
		outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    29
		outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    30
		
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    31
		layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float)0.75, editorArea);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    32
		
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    33
		layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    34
		layout.addActionSet(JavaScriptUI.ID_ACTION_SET);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    35
		layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    36
		layout.addActionSet("org.symbian.tools.wrttools.product.creationActionSet");
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
		// views - java
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    39
		layout.addShowViewShortcut(JavaScriptUI.ID_TYPE_HIERARCHY);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    40
		layout.addShowViewShortcut(JavaScriptUI.ID_SOURCE_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    41
		layout.addShowViewShortcut(JavaScriptUI.ID_JAVADOC_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    42
		layout.addShowViewShortcut("org.symbian.tools.wrttools.wrtnavigator");
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    43
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    44
		layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    45
		
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    46
		// views - search
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    47
		layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
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
		// views - standard workbench
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    50
		layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    51
		layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    52
		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
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
		// new actions - Java project creation wizard
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    55
		layout.addNewWizardShortcut("org.symbian.tools.wrttools.core.wrtwidgetwizard"); //$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    56
		layout.addNewWizardShortcut("org.eclipse.wst.jsdt.ui.NewJSWizard"); //$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    57
		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
    58
		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
    59
		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
    60
		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
    61
		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    62
		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    63
		layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    64
	}
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    65
eb7d9e33e288 Integration with previewer code
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff changeset
    66
}