Fix for bug 371528: Updates for bookmarks, editor for experiments, accelerators,...
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui / src / org / eclipse / linuxtools / lttng / ui / views / PerspectiveFactory.java
CommitLineData
6e512b93
ASL
1/*******************************************************************************
2 * Copyright (c) 2009 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
13package org.eclipse.linuxtools.lttng.ui.views;
14
62d1696a 15import org.eclipse.linuxtools.lttng.ui.views.controlflow.ControlFlowView;
62d1696a 16import org.eclipse.linuxtools.lttng.ui.views.histogram.HistogramView;
62d1696a
FC
17import org.eclipse.linuxtools.lttng.ui.views.resources.ResourcesView;
18import org.eclipse.linuxtools.lttng.ui.views.statistics.StatisticsView;
6e512b93
ASL
19import org.eclipse.ui.IFolderLayout;
20import org.eclipse.ui.IPageLayout;
21import org.eclipse.ui.IPerspectiveFactory;
22
23/**
24 * <b><u>PerspectiveFactory</u></b>
25 * <p>
26 * TODO: Implement me. Please.
27 */
28public class PerspectiveFactory implements IPerspectiveFactory {
29
12c155f5 30 // Perspective ID
3b38ea61 31 public static final String ID = "org.eclipse.linuxtools.lttng.ui.perspective"; //$NON-NLS-1$
12c155f5 32
6e512b93 33 // LTTng views
62d1696a 34 private static final String CONTROL_FLOW_VIEW_ID = ControlFlowView.ID;
12c155f5
FC
35 private static final String RESOURCES_VIEW_ID = ResourcesView.ID;
36 private static final String STATISTICS_VIEW_ID = StatisticsView.ID;
37 private static final String HISTOGRAM_VIEW_ID = HistogramView.ID;
6e512b93
ASL
38
39 // Standard Eclipse views
12c155f5
FC
40 private static final String PROJECT_VIEW_ID = IPageLayout.ID_PROJECT_EXPLORER;
41 private static final String PROPERTIES_VIEW_ID = IPageLayout.ID_PROP_SHEET;
828e5592 42 private static final String BOOKMARKS_VIEW_ID = IPageLayout.ID_BOOKMARKS;
6e512b93 43
12c155f5
FC
44 /*
45 * (non-Javadoc)
46 *
47 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
48 */
49 @Override
50 public void createInitialLayout(IPageLayout layout) {
6e512b93 51
828e5592 52 layout.setEditorAreaVisible(true);
6e512b93
ASL
53
54 addFastViews(layout);
55 addViewShortcuts(layout);
56 addPerspectiveShortcuts(layout);
57
58 // Create the top left folder
12c155f5
FC
59 IFolderLayout topLeftFolder = layout.createFolder(
60 "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
6e512b93 61 topLeftFolder.addView(PROJECT_VIEW_ID);
6e512b93 62
828e5592 63 // Create the top right folder
12c155f5
FC
64 IFolderLayout topRightFolder = layout.createFolder(
65 "topRightFolder", IPageLayout.TOP, 0.30f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
6e512b93
ASL
66 topRightFolder.addView(CONTROL_FLOW_VIEW_ID);
67 topRightFolder.addView(RESOURCES_VIEW_ID);
68 topRightFolder.addView(STATISTICS_VIEW_ID);
69
6e512b93 70 // Create the bottom right folder
12c155f5 71 IFolderLayout bottomRightFolder = layout.createFolder(
828e5592 72 "bottomRightFolder", IPageLayout.BOTTOM, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
6e512b93 73 bottomRightFolder.addView(HISTOGRAM_VIEW_ID);
12c155f5 74 bottomRightFolder.addView(PROPERTIES_VIEW_ID);
828e5592 75 bottomRightFolder.addView(BOOKMARKS_VIEW_ID);
12c155f5 76 }
6e512b93
ASL
77
78 /**
79 * Add fast views to the perspective
80 *
81 * @param layout
82 */
83 private void addFastViews(IPageLayout layout) {
84 // TODO Auto-generated method stub
85 }
86
87 /**
88 * Add view shortcuts to the perspective
89 *
90 * @param layout
91 */
92 private void addViewShortcuts(IPageLayout layout) {
93 // TODO Auto-generated method stub
94 }
95
96 /**
97 * Add perspective shortcuts to the perspective
98 *
99 * @param layout
100 */
101 private void addPerspectiveShortcuts(IPageLayout layout) {
102 // TODO Auto-generated method stub
103 }
104
105}
This page took 0.033835 seconds and 5 git commands to generate.