Author: akazakov
Date: 2011-11-09 19:17:15 -0500 (Wed, 09 Nov 2011)
New Revision: 36255
Added:
trunk/common/plugins/org.jboss.tools.common.ui/icons/
trunk/common/plugins/org.jboss.tools.common.ui/icons/jboss16.gif
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.ui/build.properties
trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties
trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-10140 JBoss Perspective
Modified: trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2011-11-09
20:33:25 UTC (rev 36254)
+++ trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2011-11-10
00:17:15 UTC (rev 36255)
@@ -18,7 +18,10 @@
org.eclipse.core.databinding;bundle-version="1.4.0",
org.eclipse.jface.databinding;bundle-version="1.5.0",
org.eclipse.core.databinding.property;bundle-version="1.4.0",
- org.eclipse.core.databinding.beans;bundle-version="1.2.100"
+ org.eclipse.core.databinding.beans;bundle-version="1.2.100",
+ org.eclipse.ui.navigator;bundle-version="3.5.100",
+ org.eclipse.ui.navigator.resources;bundle-version="3.4.300",
+ org.eclipse.debug.ui;bundle-version="3.7.0"
Export-Package: org.jboss.tools.common.ui,
org.jboss.tools.common.ui.databinding,
org.jboss.tools.common.ui.preferences,
Modified: trunk/common/plugins/org.jboss.tools.common.ui/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/build.properties 2011-11-09 20:33:25
UTC (rev 36254)
+++ trunk/common/plugins/org.jboss.tools.common.ui/build.properties 2011-11-10 00:17:15
UTC (rev 36255)
@@ -1,6 +1,8 @@
-source.. = src/
+source.. = icons/,\
+ src/
bin.includes = META-INF/,\
plugin.properties,\
+ icons/,\
.,\
about.html,\
plugin.xml
Added: trunk/common/plugins/org.jboss.tools.common.ui/icons/jboss16.gif
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/icons/jboss16.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties 2011-11-09 20:33:25
UTC (rev 36254)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.properties 2011-11-10 00:17:15
UTC (rev 36255)
@@ -3,3 +3,4 @@
Bundle-Name.0 = JBoss Tools Common UI Plug-in
command.newEditor.sidebyside.name=New Editor (Side by Side)
command.newEditor.sidebyside.description=Open New Editor Side by Side to active Editor
+perspective.name=JBoss
Modified: trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2011-11-09 20:33:25 UTC (rev
36254)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2011-11-10 00:17:15 UTC (rev
36255)
@@ -46,4 +46,13 @@
</command>
</menuContribution>
</extension>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ class="org.jboss.tools.common.ui.JBossPerspectiveFactory"
+ icon="$nl$/icons/jboss16.gif"
+ id="org.jboss.tools.common.ui.JBossPerspective"
+ name="%perspective.name">
+ </perspective>
+ </extension>
</plugin>
Added:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java 2011-11-10
00:17:15 UTC (rev 36255)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.ui;
+
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.navigator.resources.ProjectExplorer;
+import org.eclipse.ui.progress.IProgressConstants;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class JBossPerspectiveFactory implements IPerspectiveFactory {
+
+ public static final String PERSPECTIVE_ID =
"org.jboss.tools.common.ui.JBossPerspective"; //$NON-NLS-1$
+
+ protected static final String ID_SERVERS_VIEW =
"org.eclipse.wst.server.ui.ServersView"; //$NON-NLS-1$
+ protected static final String ID_SEARCH_VIEW =
"org.eclipse.search.ui.views.SearchView"; //$NON-NLS-1$
+ protected static final String ID_CONSOLE_VIEW =
"org.eclipse.ui.console.ConsoleView"; //$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
+ */
+ @Override
+ public void createInitialLayout(IPageLayout layout) {
+ layout.addActionSet("org.eclipse.jst.j2ee.J2eeMainActionSet"); //$NON-NLS-1$
+ layout.addActionSet(JavaUI.ID_ACTION_SET);
+
+ layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
+ layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);
+
+ layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
+
+ layout.addShowViewShortcut(ProjectExplorer.VIEW_ID);
+ layout.addShowViewShortcut(ID_SERVERS_VIEW);
+ layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
+ layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
+ layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
+ layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
+ layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
+
+ // views - search
+ layout.addShowViewShortcut(ID_SEARCH_VIEW);
+ // views - debugging
+ layout.addShowViewShortcut(ID_CONSOLE_VIEW);
+
+ layout.addShowInPart(ProjectExplorer.VIEW_ID);
+
+ String editorArea = layout.getEditorArea();
+
+ // Top left.
+ IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT,
0.25f, editorArea);//$NON-NLS-1$
+ topLeft.addView(ProjectExplorer.VIEW_ID);
+ topLeft.addPlaceholder(IPageLayout.ID_RES_NAV);
+ topLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
+ topLeft.addPlaceholder(JavaUI.ID_PACKAGES_VIEW);
+
+ // Bottom right.
+ IFolderLayout bottomRight = layout.createFolder("bottomRight",
IPageLayout.BOTTOM, 0.7f, editorArea);//$NON-NLS-1$
+ bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW);
+ bottomRight.addView(IPageLayout.ID_PROP_SHEET);
+ bottomRight.addView(ID_SERVERS_VIEW);
+
+ bottomRight.addPlaceholder(IPageLayout.ID_TASK_LIST);
+ bottomRight.addPlaceholder(ID_CONSOLE_VIEW);
+ bottomRight.addPlaceholder(IPageLayout.ID_BOOKMARKS);
+ bottomRight.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
+ bottomRight.addPlaceholder(ID_SEARCH_VIEW);
+
+ // Top right.
+ IFolderLayout topRight = layout.createFolder("topRight", IPageLayout.RIGHT,
0.7f, editorArea);//$NON-NLS-1$
+ topRight.addView(IPageLayout.ID_OUTLINE);
+ }
+}
\ No newline at end of file
Property changes on:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain