Fix for Bug 1870 - By default Preview should be shown above the outline
authorEugene Ostroukhov <eugeneo@symbian.org>
Thu, 11 Feb 2010 17:28:43 -0800
changeset 140 63dff67c87d1
parent 139 f0a865ead60b
child 141 f711e4ac391d
Fix for Bug 1870 - By default Preview should be shown above the outline
org.symbian.tools.wrttools.previewer/plugin.xml
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/PreviewerPlugin.java
org.symbian.tools.wrttools.product/META-INF/MANIFEST.MF
org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/perspective/WRTPerspective.java
--- a/org.symbian.tools.wrttools.previewer/plugin.xml	Thu Feb 11 16:56:30 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/plugin.xml	Thu Feb 11 17:28:43 2010 -0800
@@ -21,19 +21,4 @@
             name="WRT">
       </page>
    </extension>
-   <extension
-         point="org.eclipse.ui.perspectiveExtensions">
-      <perspectiveExtension
-            targetID="org.symbian.tools.wrttools.mainPerspective">
-         <viewShortcut
-               id="org.symbian.tools.wrttools.editing.wrtpreview">
-         </viewShortcut>
-         <view
-               id="org.symbian.tools.wrttools.editing.wrtpreview"
-               minimized="false"
-               relationship="stack"
-               relative="org.eclipse.ui.views.ContentOutline">
-         </view>
-      </perspectiveExtension>
-   </extension>
   </plugin>
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/PreviewerPlugin.java	Thu Feb 11 16:56:30 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/PreviewerPlugin.java	Thu Feb 11 17:28:43 2010 -0800
@@ -36,6 +36,7 @@
 
 	// The plug-in ID
 	public static final String PLUGIN_ID = "org.symbian.tools.wrttools.previewer";
+	public static final String PREVIEW_VIEW = "org.symbian.tools.wrttools.editing.wrtpreview";
 
 	public static final boolean DEBUG = Platform.inDebugMode()
 			&& Boolean.parseBoolean(Platform.getDebugOption(PLUGIN_ID + "/debug"));
--- a/org.symbian.tools.wrttools.product/META-INF/MANIFEST.MF	Thu Feb 11 16:56:30 2010 -0800
+++ b/org.symbian.tools.wrttools.product/META-INF/MANIFEST.MF	Thu Feb 11 17:28:43 2010 -0800
@@ -14,7 +14,8 @@
  org.symbian.tools.wrttools;bundle-version="1.0.0",
  org.eclipse.wst.css.ui;bundle-version="1.0.400",
  org.eclipse.wst.html.ui;bundle-version="1.0.400",
- org.eclipse.wst.xml.ui;bundle-version="1.1.0"
+ org.eclipse.wst.xml.ui;bundle-version="1.1.0",
+ org.symbian.tools.wrttools.previewer;bundle-version="1.0.0"
 Bundle-RequiredExecutionEnvironment: J2SE-1.5,
  JavaSE-1.6
 Bundle-ActivationPolicy: lazy
--- a/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/perspective/WRTPerspective.java	Thu Feb 11 16:56:30 2010 -0800
+++ b/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/perspective/WRTPerspective.java	Thu Feb 11 17:28:43 2010 -0800
@@ -9,13 +9,14 @@
 import org.eclipse.ui.progress.IProgressConstants;
 import org.eclipse.wst.jsdt.ui.JavaScriptUI;
 import org.symbian.tools.wrttools.Activator;
+import org.symbian.tools.wrttools.previewer.PreviewerPlugin;
 
 public class WRTPerspective implements IPerspectiveFactory {
 
 	public void createInitialLayout(IPageLayout layout) {
  		String editorArea = layout.getEditorArea();
 		
-		IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$
+		IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.15, editorArea); //$NON-NLS-1$
 		folder.addView(Activator.NAVIGATOR_ID);
 		folder.addView(JavaScriptUI.ID_TYPE_HIERARCHY);
 		
@@ -28,7 +29,9 @@
 		outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
 		outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
 		
-		layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float)0.75, editorArea);
+		IFolderLayout helpersFolder = layout.createFolder("right", IPageLayout.RIGHT, (float) 0.60, editorArea);
+		helpersFolder.addView(PreviewerPlugin.PREVIEW_VIEW);
+		helpersFolder.addView(IPageLayout.ID_OUTLINE);
 		
 		layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
 		layout.addActionSet(JavaScriptUI.ID_ACTION_SET);
@@ -50,6 +53,7 @@
 		layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
 		layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
 		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
+		layout.addShowViewShortcut(PreviewerPlugin.PREVIEW_VIEW);
 				
 		// new actions - Java project creation wizard
 		layout.addNewWizardShortcut("org.symbian.tools.wrttools.core.wrtwidgetwizard"); //$NON-NLS-1$