tmf/lttng: Remove unneeded (non-Javadoc) comments
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.kernel.ui / src / org / eclipse / linuxtools / internal / lttng2 / kernel / ui / views / PerspectiveFactory.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views;
14
15 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView;
16 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView;
17 import org.eclipse.linuxtools.internal.lttng2.ui.views.control.ControlView;
18 import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
19 import org.eclipse.linuxtools.tmf.ui.views.statistics.TmfStatisticsView;
20 import org.eclipse.ui.IFolderLayout;
21 import org.eclipse.ui.IPageLayout;
22 import org.eclipse.ui.IPerspectiveFactory;
23
24 /**
25 * The default LTTng perspective.
26 */
27 public class PerspectiveFactory implements IPerspectiveFactory {
28
29 /** Perspective ID */
30 public static final String ID = "org.eclipse.linuxtools.lttng2.ui.perspective"; //$NON-NLS-1$
31
32 // LTTng views
33 private static final String HISTOGRAM_VIEW_ID = HistogramView.ID;
34 private static final String CONTROL_VIEW_ID = ControlView.ID;
35 private static final String CONTROLFLOW_VIEW_ID = ControlFlowView.ID;
36 private static final String RESOURCES_VIEW_ID = ResourcesView.ID;
37 private static final String STATISTICS_VIEW_ID = TmfStatisticsView.ID;
38
39 // Standard Eclipse views
40 private static final String PROJECT_VIEW_ID = IPageLayout.ID_PROJECT_EXPLORER;
41 private static final String PROPERTIES_VIEW_ID = IPageLayout.ID_PROP_SHEET;
42 private static final String BOOKMARKS_VIEW_ID = IPageLayout.ID_BOOKMARKS;
43
44 @Override
45 public void createInitialLayout(IPageLayout layout) {
46
47 layout.setEditorAreaVisible(true);
48
49 addFastViews(layout);
50 addViewShortcuts(layout);
51 addPerspectiveShortcuts(layout);
52
53 // Create the top left folder
54 IFolderLayout topLeftFolder = layout.createFolder(
55 "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
56 topLeftFolder.addView(PROJECT_VIEW_ID);
57
58 // Create the bottom left folder
59 IFolderLayout bottomLeftFolder = layout.createFolder(
60 "bottomLeftFolder", IPageLayout.BOTTOM, 0.70f, "topLeftFolder"); //$NON-NLS-1$ //$NON-NLS-2$
61 bottomLeftFolder.addView(CONTROL_VIEW_ID);
62
63 // Create the top right folder
64 IFolderLayout topRightFolder = layout.createFolder(
65 "topRightFolder", IPageLayout.TOP, 0.40f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
66 topRightFolder.addView(CONTROLFLOW_VIEW_ID);
67 topRightFolder.addView(RESOURCES_VIEW_ID);
68 topRightFolder.addView(STATISTICS_VIEW_ID);
69
70 // Create the bottom right folder
71 IFolderLayout bottomRightFolder = layout.createFolder(
72 "bottomRightFolder", IPageLayout.BOTTOM, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
73 bottomRightFolder.addView(HISTOGRAM_VIEW_ID);
74 bottomRightFolder.addView(PROPERTIES_VIEW_ID);
75 bottomRightFolder.addView(BOOKMARKS_VIEW_ID);
76 }
77
78 /**
79 * Add fast views to the perspective
80 *
81 * @param layout
82 */
83 private void addFastViews(IPageLayout layout) {
84 }
85
86 /**
87 * Add view shortcuts to the perspective
88 *
89 * @param layout
90 */
91 private void addViewShortcuts(IPageLayout layout) {
92 }
93
94 /**
95 * Add perspective shortcuts to the perspective
96 *
97 * @param layout
98 */
99 private void addPerspectiveShortcuts(IPageLayout layout) {
100 }
101
102 }
This page took 0.032194 seconds and 5 git commands to generate.