Refactor TmfTrace and dependencies - remove indexTrace()
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / TracingPerspectiveFactory.java
CommitLineData
12c155f5
FC
1/*******************************************************************************
2 * Copyright (c) 2010, 2011 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.tmf.ui.views;
14
15import org.eclipse.linuxtools.tmf.ui.views.events.TmfEventsView;
16import org.eclipse.ui.IFolderLayout;
17import org.eclipse.ui.IPageLayout;
18import org.eclipse.ui.IPerspectiveFactory;
19
20/**
21 * <b><u>TracingPerspectiveFactory</u></b>
22 * <p>
23 * TODO: Implement me. Please.
24 */
25public class TracingPerspectiveFactory implements IPerspectiveFactory {
26
27 // ------------------------------------------------------------------------
28 // Constants
29 // ------------------------------------------------------------------------
30
31 // Perspective ID
32 public static final String ID = "org.eclipse.linuxtools.tmf.ui.perspective.tracing"; //$NON-NLS-1$
33
34 // Standard TMF views
35 private static final String EVENTS_VIEW_ID = TmfEventsView.ID;
36
37 // Standard Eclipse views
38 private static final String PROJECT_VIEW_ID = IPageLayout.ID_PROJECT_EXPLORER;
39 private static final String PROPERTIES_VIEW_ID = IPageLayout.ID_PROP_SHEET;
40
41 // ------------------------------------------------------------------------
42 // IPerspectiveFactory
43 // ------------------------------------------------------------------------
44
45 @Override
46 public void createInitialLayout(IPageLayout layout) {
47
48 // No editor part
49 layout.setEditorAreaVisible(false);
50
51 // Goodies
52 addFastViews(layout);
53 addViewShortcuts(layout);
54 addPerspectiveShortcuts(layout);
55
56 // Create the top left folder
57 IFolderLayout topLeftFolder = layout.createFolder(
58 "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
59 topLeftFolder.addView(PROJECT_VIEW_ID);
60
61// // Create the bottom left folder
62// @SuppressWarnings("unused")
63// IFolderLayout bottomLeftFolder = layout.createFolder(
64// "bottomLeftFolder", IPageLayout.BOTTOM, 0.50f, "topLeftFolder"); //$NON-NLS-1$//$NON-NLS-2$
65
66 // Create the top right folder
67 IFolderLayout topRightFolder = layout.createFolder(
68 "topRightFolder", IPageLayout.TOP, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
69 topRightFolder.addView(EVENTS_VIEW_ID);
70
71 // Create the middle right folder
72 @SuppressWarnings("unused")
73 IFolderLayout middleRightFolder = layout.createFolder(
74 "middleRightFolder", IPageLayout.BOTTOM, 0.50f, "topRightFolder"); //$NON-NLS-1$//$NON-NLS-2$
75
76 // Create the bottom right folder
77 IFolderLayout bottomRightFolder = layout.createFolder(
78 "bottomRightFolder", IPageLayout.BOTTOM, 0.65f, "middleRightFolder"); //$NON-NLS-1$ //$NON-NLS-2$
79 bottomRightFolder.addView(PROPERTIES_VIEW_ID);
80
81 }
82
83 // ------------------------------------------------------------------------
84 // Helper functions
85 // ------------------------------------------------------------------------
86
87 private void addFastViews(IPageLayout layout) {
88 }
89
90 private void addViewShortcuts(IPageLayout layout) {
91 }
92
93 private void addPerspectiveShortcuts(IPageLayout layout) {
94 }
95
96}
This page took 0.034313 seconds and 5 git commands to generate.