summaryrefslogtreecommitdiffstats
path: root/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/perspectives/BitbakeCommanderPerspective.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/perspectives/BitbakeCommanderPerspective.java')
-rw-r--r--plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/perspectives/BitbakeCommanderPerspective.java89
1 files changed, 89 insertions, 0 deletions
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/perspectives/BitbakeCommanderPerspective.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/perspectives/BitbakeCommanderPerspective.java
new file mode 100644
index 0000000..b9ddcb6
--- /dev/null
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/perspectives/BitbakeCommanderPerspective.java
@@ -0,0 +1,89 @@
1/*****************************************************************************
2 * Copyright (c) 2009 Ken Gilmer
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Ken Gilmer - initial API and implementation
10 *******************************************************************************/
11package org.yocto.bc.ui.perspectives;
12
13import org.eclipse.ui.IFolderLayout;
14import org.eclipse.ui.IPageLayout;
15import org.eclipse.ui.IPerspectiveFactory;
16import org.eclipse.ui.console.IConsoleConstants;
17
18import org.yocto.bc.ui.views.RecipeView;
19
20public class BitbakeCommanderPerspective implements IPerspectiveFactory {
21
22 private IPageLayout factory;
23
24 public BitbakeCommanderPerspective() {
25 super();
26 }
27
28 private void addActionSets() {
29 factory.addActionSet("org.yocto.bc.ui.actionSet");
30 factory.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); // NON-NLS-1
31 }
32
33 private void addNewWizardShortcuts() {
34 factory.addNewWizardShortcut("org.yocto.bc.ui.wizards.NewRecipeWizard");// NON-NLS-1
35 //factory.addNewWizardShortcut("org.yocto.bc.ui.wizards.newproject.NewBBCProjectWizard");// NON-NLS-1
36 factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");// NON-NLS-1
37 }
38
39 private void addPerspectiveShortcuts() {
40 // factory.addPerspectiveShortcut("org.eclipse.team.ui.TeamSynchronizingPerspective");
41 // //NON-NLS-1
42 // factory.addPerspectiveShortcut("org.eclipse.team.cvs.ui.cvsPerspective");
43 // //NON-NLS-1
44 factory.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); // NON-NLS-1
45 }
46
47 private void addViews() {
48 IFolderLayout bottom = factory.createFolder("bottomRight", // NON-NLS-1
49 IPageLayout.BOTTOM, 0.75f, factory.getEditorArea());
50
51 bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
52 bottom.addView("org.eclipse.team.ui.GenericHistoryView"); // NON-NLS-1
53 bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
54
55 IFolderLayout topLeft = factory.createFolder("topLeft", // NON-NLS-1
56 IPageLayout.LEFT, 0.25f, factory.getEditorArea());
57 topLeft.addView(IPageLayout.ID_RES_NAV);
58 //llu detach RecipeView
59 //topLeft.addView(RecipeView.ID_VIEW); // NON-NLS-1
60
61 }
62
63 private void addViewShortcuts() {
64 // factory.addShowViewShortcut("org.eclipse.ant.ui.views.AntView");
65 // //NON-NLS-1
66 // factory.addShowViewShortcut("org.eclipse.team.ccvs.ui.AnnotateView");
67 // //NON-NLS-1
68 // factory.addShowViewShortcut("org.eclipse.pde.ui.DependenciesView");
69 // //NON-NLS-1
70 // factory.addShowViewShortcut("org.eclipse.jdt.junit.ResultView");
71 // //NON-NLS-1
72 factory.addShowViewShortcut("org.eclipse.team.ui.GenericHistoryView"); // NON-NLS-1
73 factory.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
74 // factory.addShowViewShortcut(JavaUI.ID_PACKAGES);
75 factory.addShowViewShortcut(IPageLayout.ID_RES_NAV);
76 // factory.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
77 // factory.addShowViewShortcut(IPageLayout.ID_OUTLINE);
78 }
79
80 public void createInitialLayout(IPageLayout factory) {
81 this.factory = factory;
82 addViews();
83 addActionSets();
84 addNewWizardShortcuts();
85 addPerspectiveShortcuts();
86 addViewShortcuts();
87 }
88
89}