Author: sdzmitrovich
Date: 2009-08-07 09:35:56 -0400 (Fri, 07 Aug 2009)
New Revision: 17013
Added:
trunk/jst/plugins/org.jboss.tools.jst.css/resources/icons/css_prespective_icon.gif
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CSSPerspective.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.css/plugin.properties
trunk/jst/plugins/org.jboss.tools.jst.css/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4598
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/META-INF/MANIFEST.MF 2009-08-07 13:33:35 UTC
(rev 17012)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/META-INF/MANIFEST.MF 2009-08-07 13:35:56 UTC
(rev 17013)
@@ -10,7 +10,9 @@
org.jboss.tools.jst.jsp,
org.eclipse.ui.views.properties.tabbed,
org.eclipse.core.databinding,
- org.eclipse.wst.css.core
+ org.eclipse.wst.css.core,
+ org.eclipse.jdt.ui,
+ org.eclipse.debug.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.jst.css,
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/plugin.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/plugin.properties 2009-08-07 13:33:35 UTC
(rev 17012)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/plugin.properties 2009-08-07 13:35:56 UTC
(rev 17013)
@@ -6,4 +6,5 @@
css.tabs.property.label=Property Sheet
css.tabs.quickEdit.label=Edited Properties
css.editor_name=CSS Properties
-css.preview_name=CSS Preview
\ No newline at end of file
+css.preview_name=CSS Preview
+css.perspective_name=CSS Editing
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/plugin.xml 2009-08-07 13:33:35 UTC (rev
17012)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/plugin.xml 2009-08-07 13:35:56 UTC (rev
17013)
@@ -105,4 +105,13 @@
restorable="true" category="web.views.category.id">
</view>
</extension>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ class="org.jboss.tools.jst.css.CSSPerspective"
+ icon="resources/icons/css_prespective_icon.gif"
+ id="org.jboss.tools.jst.cssPerspective"
+ name="%css.perspective_name">
+ </perspective>
+ </extension>
</plugin>
Added: trunk/jst/plugins/org.jboss.tools.jst.css/resources/icons/css_prespective_icon.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/jst/plugins/org.jboss.tools.jst.css/resources/icons/css_prespective_icon.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CSSPerspective.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CSSPerspective.java
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CSSPerspective.java 2009-08-07
13:35:56 UTC (rev 17013)
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.css;
+
+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;
+
+/**
+ * @author Sergey Dzmitrovich
+ *
+ */
+public class CSSPerspective implements IPerspectiveFactory {
+
+ public static final String CSS_EDITOR_VIEW =
"org.jboss.tools.jst.css.view.editor"; //$NON-NLS-1$
+ public static final String CSS_PREVIEW_VIEW =
"org.jboss.tools.jst.css.view.preview"; //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui
+ * .IPageLayout)
+ */
+ public void createInitialLayout(IPageLayout layout) {
+
+ String editorArea = layout.getEditorArea();
+
+ IFolderLayout leftTop = layout.createFolder(
+ "leftTop", IPageLayout.LEFT, (float) 0.2, editorArea); //$NON-NLS-1$
+ leftTop.addView(JavaUI.ID_PACKAGES);
+ leftTop.addView("org.jboss.tools.jst.web.ui.navigator.WebProjectsView");
//$NON-NLS-1$
+ leftTop
+ .addView("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
//$NON-NLS-1$
+ leftTop.addPlaceholder(IPageLayout.ID_RES_NAV);
+
+ IFolderLayout leftBottom = layout.createFolder(
+ "leftBottom", IPageLayout.BOTTOM, (float) 0.64, "leftTop");
//$NON-NLS-1$ //$NON-NLS-2$
+ leftBottom.addView(IPageLayout.ID_PROP_SHEET);
+
+ IFolderLayout bottomCenter = layout.createFolder(
+ "bottomCenter", IPageLayout.BOTTOM, (float) 0.64, editorArea);
//$NON-NLS-1$
+ bottomCenter.addView(CSS_EDITOR_VIEW);
+
+ IFolderLayout bottomRight = layout.createFolder(
+ "bottomRight", IPageLayout.RIGHT, (float) 0.7, "bottomCenter");
//$NON-NLS-1$ //$NON-NLS-2$
+ bottomRight.addView(CSS_PREVIEW_VIEW);
+
+ IFolderLayout rightTop = layout.createFolder(
+ "right", IPageLayout.RIGHT, (float) 0.8, editorArea); //$NON-NLS-1$
+ rightTop.addView(IPageLayout.ID_OUTLINE);
+
+ layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
+ layout.addActionSet(JavaUI.ID_ACTION_SET);
+ layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);
+ layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
+
+ // views - seam
+ layout
+ .addShowViewShortcut("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
//$NON-NLS-1$
+
+ // views - java
+ layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
+ layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY);
+ layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW);
+
+ // views - standard workbench
+ layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
+ layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
+ layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
+
+ // new actions - Java project creation wizard
+ layout
+ .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard");
//$NON-NLS-1$
+ layout
+ .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard");
//$NON-NLS-1$
+ layout
+ .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard");
//$NON-NLS-1$
+ layout
+ .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard");
//$NON-NLS-1$
+ layout
+ .addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard");
//$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
+ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
+
+ }
+
+}
Property changes on:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CSSPerspective.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native