Add a "Clear Tracing Views" command
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / TracingPerspectiveFactory.java
index b1aba0dfaf198eadd7fd67115bd4235f91e48c6b..90f458c44a8254257a5f36fba3a1f6fc8d2d3188 100644 (file)
@@ -1,6 +1,6 @@
 /*******************************************************************************
  * Copyright (c) 2010, 2011, 2012 Ericsson
- * 
+ *
  * 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
@@ -12,6 +12,7 @@
 
 package org.eclipse.linuxtools.tmf.ui.views;
 
+import org.eclipse.linuxtools.tmf.ui.project.wizards.NewTmfProjectWizard;
 import org.eclipse.linuxtools.tmf.ui.views.events.TmfEventsView;
 import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.TmfStatisticsView;
@@ -21,7 +22,7 @@ import org.eclipse.ui.IPerspectiveFactory;
 
 /**
  * The tracing perspective definition.
- * 
+ *
  * @version 1.0
  * @author Francois Chouinard
  */
@@ -32,7 +33,7 @@ public class TracingPerspectiveFactory implements IPerspectiveFactory {
     // ------------------------------------------------------------------------
 
     /** The Perspective ID */
-    public static final String ID = "org.eclipse.linuxtools.tmf.ui.perspective.tracing"; //$NON-NLS-1$
+    public static final String ID = "org.eclipse.linuxtools.tmf.ui.perspective"; //$NON-NLS-1$
 
     // Standard TMF views
     private static final String EVENTS_VIEW_ID = TmfEventsView.ID;
@@ -55,11 +56,6 @@ public class TracingPerspectiveFactory implements IPerspectiveFactory {
         // No editor part
         layout.setEditorAreaVisible(false);
 
-        // Goodies
-        addFastViews(layout);
-        addViewShortcuts(layout);
-        addPerspectiveShortcuts(layout);
-
         // Create the top left folder
         IFolderLayout topLeftFolder = layout.createFolder(
                 "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
@@ -67,33 +63,24 @@ public class TracingPerspectiveFactory implements IPerspectiveFactory {
 
         // Create the top right folder
         IFolderLayout topRightFolder = layout.createFolder(
-                "topRightFolder", IPageLayout.TOP, 0.40f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+                "topRightFolder", IPageLayout.TOP, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
         topRightFolder.addView(EVENTS_VIEW_ID);
 
         // Create the middle right folder
         IFolderLayout middleRightFolder = layout.createFolder(
-                "middleRightFolder", IPageLayout.BOTTOM, 0.40f, "topRightFolder"); //$NON-NLS-1$//$NON-NLS-2$
+                "middleRightFolder", IPageLayout.BOTTOM, 0.50f, "topRightFolder"); //$NON-NLS-1$//$NON-NLS-2$
         middleRightFolder.addView(STATISTICS_VIEW_ID);
 
         // Create the bottom right folder
         IFolderLayout bottomRightFolder = layout.createFolder(
-                "bottomRightFolder", IPageLayout.BOTTOM, 0.50f, "middleRightFolder"); //$NON-NLS-1$ //$NON-NLS-2$
+                "bottomRightFolder", IPageLayout.BOTTOM, 0.55f, "middleRightFolder"); //$NON-NLS-1$ //$NON-NLS-2$
         bottomRightFolder.addView(HISTOGRAM_VIEW_ID);
         bottomRightFolder.addView(PROPERTIES_VIEW_ID);
         bottomRightFolder.addView(BOOKMARKS_VIEW_ID);
-    }
-
-    // ------------------------------------------------------------------------
-    // Helper functions
-    // ------------------------------------------------------------------------
-
-    private void addFastViews(IPageLayout layout) {
-    }
-
-    private void addViewShortcuts(IPageLayout layout) {
-    }
 
-    private void addPerspectiveShortcuts(IPageLayout layout) {
+        // Populate menus, etc
+        layout.addPerspectiveShortcut(ID);
+        layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
     }
 
 }
This page took 0.025303 seconds and 5 git commands to generate.