/**
 * 
 */
package org.mwc.asset.core;

import org.eclipse.ui.*;
import org.mwc.cmap.core.CorePlugin;

/**
 * @author ian.mayo
 * 
 */
public class ASSETPerspectiveFactory implements IPerspectiveFactory
{

	/**
	 * @param layout
	 */
	@SuppressWarnings("deprecation")
	public void createInitialLayout(IPageLayout layout)
	{
		// Get the editor area.
		String editorArea = layout.getEditorArea();

		// Top left: Resource Navigator view and Bookmarks view placeholder
		IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT,
				0.25f, editorArea);
		topLeft.addView(IPageLayout.ID_RES_NAV);
		topLeft.addView(CorePlugin.TIME_CONTROLLER);

		
		// split the time one - so we can insert the track tote
		// Top left: Resource Navigator view and Bookmarks view placeholder
		IFolderLayout midLeft = layout.createFolder("midLeft", IPageLayout.BOTTOM,
				0.2f, "topLeft");
		midLeft.addPlaceholder(CorePlugin.OVERVIEW_PLOT);
		midLeft.addPlaceholder(CorePlugin.POLYGON_EDITOR);
		midLeft.addView(ASSETPlugin.VESSEL_MONITOR);
		midLeft.addPlaceholder(ASSETPlugin.SENSOR_MONITOR);

		// Bottom left: Outline view and Property Sheet view
		IFolderLayout upperMidLeft = layout.createFolder("upperMidLeft",
				IPageLayout.TOP, 0.3f, "midLeft");
		upperMidLeft.addView(ASSETPlugin.SCENARIO_CONTROLLER2);
		upperMidLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);
		
		// Bottom left: Outline view and Property Sheet view
		IFolderLayout bottomLeft = layout.createFolder("bottomLeft",
				IPageLayout.BOTTOM, 0.5f, "midLeft");
		bottomLeft.addView(CorePlugin.LAYER_MANAGER);
		bottomLeft.addView(IPageLayout.ID_PROP_SHEET);

		// bottom: placeholder for the xyplot
		IPlaceholderFolderLayout bottomPanel = layout.createPlaceholderFolder(
				"bottom", IPageLayout.BOTTOM, 0.6f, editorArea);
		bottomPanel.addPlaceholder(CorePlugin.XY_PLOT + ":*");
		bottomPanel.addPlaceholder(CorePlugin.PLOT_3d + ":*");
		bottomPanel.addPlaceholder(CorePlugin.LIVE_DATA_MONITOR);
		bottomPanel.addPlaceholder(IPageLayout.ID_TASK_LIST);
		// bottomPanel.addPlaceholder(CorePlugin.NARRATIVES);

		// and our view shortcuts
		layout.addShowViewShortcut(CorePlugin.LAYER_MANAGER);
		layout.addShowViewShortcut(CorePlugin.NARRATIVES);
		layout.addShowViewShortcut(CorePlugin.TIME_CONTROLLER);
		layout.addShowViewShortcut(CorePlugin.OVERVIEW_PLOT);
		layout.addShowViewShortcut(ASSETPlugin.SCENARIO_CONTROLLER2);
		layout.addShowViewShortcut(ASSETPlugin.VESSEL_MONITOR);
		layout.addShowViewShortcut(ASSETPlugin.SENSOR_MONITOR);

		layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
		layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
		layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
		layout.addShowViewShortcut(CorePlugin.LIVE_DATA_MONITOR);
		
		// and the error log
		layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView");

		// hey - try to add the 'new plot' to the New menu
		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");
		// layout.addNewWizardShortcut("org.mwc.debrief.core.wizards.NewPlotWizard");

		// ok - make sure the debrief action sets are visible
		layout.addActionSet("org.mwc.debrief.core");
		layout.addActionSet("org.mwc.cmap.plot3d");
		// layout.addActionSet("org.mwc.debrief.track_shift");
	}

}

@@ -546,10 +546,9 @@
 %09%090.
-25
+4
 f, e
@@ -785,310 +785,32 @@
 der%0A
-%09%09IFolderLayout midLeft = layout.createFolder(%22midLeft%22, IPageLayout.BOTTOM,%0A%09%09%09%090.2f, %22topLeft%22);%0A%09%09midLeft.addPlaceholder(CorePlugin.OVERVIEW_PLOT);%0A%09%09midLeft.addPlaceholder(CorePlugin.POLYGON_EDITOR);%0A%09%09midLeft.addView(ASSETPlugin.VESSEL_MONITOR);%0A%09%09midLeft.addPlaceholder(ASSETPlugin.SENSOR_MONITOR
+//%09//%09%09%09%090.2f, %22topLeft%22
 );%0A%0A
@@ -951,23 +951,26 @@
 out.
+BOT
 TO
-P
+M
 , 0.
-3
+2
 f, %22
-mid
+top
 Left
@@ -1088,16 +1088,190 @@
 MARKS);%0A
+%09%09upperMidLeft.addPlaceholder(CorePlugin.OVERVIEW_PLOT);%0A%09%09upperMidLeft.addPlaceholder(CorePlugin.POLYGON_EDITOR);%0A%09%09upperMidLeft.addPlaceholder(ASSETPlugin.SENSOR_MONITOR);%0A
 %09%09%0A%09%09// 
@@ -1413,14 +1413,19 @@
 , 0.
-5
+6
 f, %22
-m
+upperM
 idLe
@@ -2061,24 +2061,24 @@
 R_MANAGER);%0A
+
 %09%09layout.add
@@ -2122,66 +2122,8 @@
 S);%0A
-%09%09layout.addShowViewShortcut(CorePlugin.TIME_CONTROLLER);%0A
 %09%09la

improve default window layout (ditch time controller, give scenario controller more space)