Author: fbricon
Date: 2011-11-30 11:06:16 -0500 (Wed, 30 Nov 2011)
New Revision: 36789
Added:
trunk/central/plugins/org.jboss.tools.central/icons/ear-wiz-icon.gif
trunk/central/plugins/org.jboss.tools.central/icons/html5.png
trunk/central/plugins/org.jboss.tools.central/icons/newprj_wiz.gif
trunk/central/plugins/org.jboss.tools.central/icons/newwebprj_wiz.gif
trunk/central/plugins/org.jboss.tools.central/icons/rf_logo.png
trunk/central/plugins/org.jboss.tools.central/icons/spring_wiz.gif
trunk/central/plugins/org.jboss.tools.central/icons/web_application.gif
Modified:
trunk/central/plugins/org.jboss.tools.central/plugin.xml
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
trunk/central/plugins/org.jboss.tools.community.central/plugin.xml
trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.xml
trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
Log:
JBIDE-10053 : Move current JavaEE 6 archetypes in JBoss Central to the create Project
section. This is a bad hack which consists in using a hardcoded Tutorial collection and
add it directly in the "Create Project" section. Hopefully, once JBIDE-10264
(wizardify project examples) is done, we'll be able to use wizard ids directly and
remove the current hack.
Added: trunk/central/plugins/org.jboss.tools.central/icons/ear-wiz-icon.gif
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/ear-wiz-icon.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central/icons/html5.png
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/html5.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central/icons/newprj_wiz.gif
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/newprj_wiz.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central/icons/newwebprj_wiz.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/central/plugins/org.jboss.tools.central/icons/newwebprj_wiz.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central/icons/rf_logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/rf_logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central/icons/spring_wiz.gif
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/spring_wiz.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/central/plugins/org.jboss.tools.central/icons/web_application.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/central/plugins/org.jboss.tools.central/icons/web_application.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/central/plugins/org.jboss.tools.central/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-11-30 15:46:51 UTC (rev
36788)
+++ trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-11-30 16:06:16 UTC (rev
36789)
@@ -208,4 +208,56 @@
</image>
</extension>
+ <extension
+ point="org.jboss.tools.central.tutorials">
+ <category
+ id="org.jboss.tools.central.javaee6.quickstart"
+ name="Java EE Archetypes"
+ priority="1" />
+ <tutorial
+ id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6Webapp"
+ categoryId="org.jboss.tools.central.javaee6.quickstart"
+ name="Java EE Web Project"
+ type="projectExample"
+ priority="1"
+ icon="icons/newwebprj_wiz.gif"
+ reference="Java EE 6 Quickstarts::jboss-javaee6-webapp"/>
+
+ <tutorial
+ id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6Ear"
+ categoryId="org.jboss.tools.central.javaee6.quickstart"
+ name="Java EE Project"
+ type="projectExample"
+ priority="2"
+ icon="icons/ear-wiz-icon.gif"
+ reference="Java EE 6 Quickstarts::multi-javaee6-archetype"/>
+
+ <tutorial
+ id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6Poh5"
+ categoryId="org.jboss.tools.central.javaee6.quickstart"
+ name="HTML5 Project"
+ type="projectExample"
+ priority="3"
+ icon="icons/html5.png"
+ reference="Java EE 6
Quickstarts::jboss-javaee6-poh5-archetype"/>
+
+ <tutorial
+
id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6SpringMvc"
+ categoryId="org.jboss.tools.central.javaee6.quickstart"
+ name="Spring MVC Project"
+ type="projectExample"
+ priority="4"
+ icon="icons/spring_wiz.gif"
+ reference="Java EE 6 Quickstarts::spring-mvc-webapp"/>
+
+ <tutorial
+
id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6Richfaces"
+ categoryId="org.jboss.tools.central.javaee6.quickstart"
+ name="RichFaces Project"
+ type="projectExample"
+ priority="5"
+ icon="icons/rf_logo.png"
+ reference="Java EE 6
Quickstarts::richfaces-archetype-simpleapp"/>
+ </extension>
+
</plugin>
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java 2011-11-30
15:46:51 UTC (rev 36788)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java 2011-11-30
16:06:16 UTC (rev 36789)
@@ -66,9 +66,10 @@
List<String> wizardIds = new ArrayList<String>();
//wizardIDs.add("org.jboss.ide.eclipse.as.openshift.express.ui.wizard.NewServerAdapter");
wizardIds.add("org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard");
- wizardIds.add("org.jboss.tools.seam.ui.wizards.SeamProjectWizard");
- wizardIds.add("org.eclipse.m2e.core.wizards.Maven2ProjectWizard");
- wizardIds.add(JBossCentralActivator.NEW_PROJECT_EXAMPLES_WIZARD_ID);
+ //wizardIds.add("org.jboss.tools.seam.ui.wizards.SeamProjectWizard");
+ //wizardIds.add("org.eclipse.m2e.core.wizards.Maven2ProjectWizard");
+ //wizardIds.add(JBossCentralActivator.NEW_PROJECT_EXAMPLES_WIZARD_ID);
+
wizardIds.add("org.jboss.ide.eclipse.as.openshift.express.ui.wizard.NewServerAdapter");
return wizardIds;
}
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-11-30
15:46:51 UTC (rev 36788)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-11-30
16:06:16 UTC (rev 36789)
@@ -39,7 +39,6 @@
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceColors;
import org.eclipse.jface.resource.JFaceResources;
@@ -72,7 +71,6 @@
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
@@ -115,6 +113,7 @@
*/
public class GettingStartedPage extends AbstractJBossCentralPage {
+ private static final String ORG_JBOSS_TOOLS_CENTRAL_JAVAEE6_QUICKSTART =
"org.jboss.tools.central.javaee6.quickstart";
private static final String NEWS_WARNING_ID =
"org.jboss.tools.central.newsWarning";
private static final String BLOGS_WARNING_ID =
"org.jboss.tools.central.blogsWarning";
@@ -163,6 +162,7 @@
private ToolBarManager newsToolBarManager;
private ToolBarManager blogsToolBarManager;
private Action blogsWarning;
+ private boolean newProjectsInitialized;
public GettingStartedPage(FormEditor editor) {
super(editor, ID, "Getting Started");
@@ -658,7 +658,22 @@
IStatus.ERROR, "Cannot create extension" ,e));
}
}
-
+
+ private void displayTutorialLinks(final TutorialCategory category, final Composite
composite, boolean addTooltips) {
+ for (final Tutorial tutorial:category.getTutorials()) {
+ Project project = tutorial.getProjectExamples();
+ if (project == null) {
+ continue;
+ }
+
+ FormText tutorialText = toolkit.createFormText(composite, true);
+ configureTutorialText(tutorialText, tutorial);
+ if (addTooltips) {
+ hookTooltip(tutorialText, tutorial);
+ }
+ }
+ }
+
private static boolean isActive(Bundle bundle) {
if (bundle == null) {
return false;
@@ -875,13 +890,28 @@
showTutorials(categories);
}
+ @Deprecated
+ //This method should be removed once the EE6 archetypes are wizardified
+ private void updateNewProjects(TutorialCategory tutorialCategory) {
+ if (!newProjectsInitialized) {
+ if (tutorialCategory != null) {
+ newProjectsInitialized = true;
+ displayTutorialLinks(tutorialCategory, projectsComposite, false);
+ resize(true);
+ }
+ }
+ }
+
private void showTutorials(Map<String, TutorialCategory> categories) {
disposeChildren(tutorialsComposite);
- Collection<TutorialCategory> tempCategories = categories.values();
- List<TutorialCategory> sortedCategories = new
ArrayList<TutorialCategory>();
- sortedCategories.addAll(tempCategories);
- Collections.sort(sortedCategories);
+ List<TutorialCategory> sortedCategories = getSortedCategories(categories);
for (final TutorialCategory category:sortedCategories) {
+ //TEMPORARY HACK FOR JBIDE-10053 (Java EE6 archetypes in the project section)
+ //Should be removed once these archetype tutorials are changed to use wizards as per
JBIDE-10264
+ if (ORG_JBOSS_TOOLS_CENTRAL_JAVAEE6_QUICKSTART.equals(category.getId())) {
+ //bail
+ continue;
+ }
int style = ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE;
if (expandedCategories.contains(category)) {
style|=ExpandableComposite.EXPANDED;
@@ -914,15 +944,7 @@
}
});
- for (final Tutorial tutorial:category.getTutorials()) {
- Project project = tutorial.getProjectExamples();
- if (project == null) {
- continue;
- }
- FormText tutorialText = toolkit.createFormText(composite, true);
- configureTutorialText(tutorialText, tutorial);
- hookTooltip(tutorialText, tutorial);
- }
+ displayTutorialLinks(category, composite, true);
categoryComposite.setClient(composite);
String description = category.getDescription();
if (description != null && !description.isEmpty() &&
categoryComposite.getControl() != null) {
@@ -939,6 +961,15 @@
//recomputeScrollComposite(tutorialScrollComposite, tutorialPageBook);
}
+ private List<TutorialCategory> getSortedCategories(
+ Map<String, TutorialCategory> categories) {
+ Collection<TutorialCategory> tempCategories = categories.values();
+ List<TutorialCategory> sortedCategories = new
ArrayList<TutorialCategory>();
+ sortedCategories.addAll(tempCategories);
+ Collections.sort(sortedCategories);
+ return sortedCategories;
+ }
+
private Font getBoldFont(Font font) {
if (categoryFont != null) {
return categoryFont;
@@ -1258,6 +1289,14 @@
public void run() {
setBusyIndicator(tutorialsLoadingComposite, false);
refreshTutorials();
+
+ //TEMPORARY HACK FOR JBIDE-10053 (Java EE6 archetypes in the project section)
+ //Should be removed once these archetype tutorials are changed to use wizards as per
JBIDE-10264
+ RefreshTutorialsJob job = RefreshTutorialsJob.INSTANCE;
+ Map<String, TutorialCategory> categories = job.getTutorialCategories();
+ if (categories != null){
+ updateNewProjects(categories.get(ORG_JBOSS_TOOLS_CENTRAL_JAVAEE6_QUICKSTART));
+ }
}
});
Modified: trunk/central/plugins/org.jboss.tools.community.central/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.community.central/plugin.xml 2011-11-30 15:46:51
UTC (rev 36788)
+++ trunk/central/plugins/org.jboss.tools.community.central/plugin.xml 2011-11-30 16:06:16
UTC (rev 36789)
@@ -4,10 +4,6 @@
<extension
point="org.jboss.tools.central.tutorials">
<category
- id="org.jboss.tools.central.javaee6.quickstart"
- name="Java EE 6 Template Projects"
- priority="1" />
- <category
id="org.jboss.tools.central.jbossas.quickstart"
name="JBoss AS 7 Quickstarts"
description="These quickstarts are aimed to get you up to writing
applications with minimal fuss. We recommend that you work through the quickstarts in the
order they are presented in this guide, however if you have previous experience with Java
EE 6, you may wish to skip some or all of the quickstarts."
@@ -53,51 +49,6 @@
priority="4"
icon="icons/jbossas7.png"
reference="JBoss AS 7 Quickstarts::kitchensink"/>
-
- <tutorial
- id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6Webapp"
- categoryId="org.jboss.tools.central.javaee6.quickstart"
- name="Java EE 6 WAR"
- type="projectExample"
- priority="1"
- icon="icons/jbossas7.png"
- reference="Java EE 6 Quickstarts::jboss-javaee6-webapp"/>
-
- <tutorial
- id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6Ear"
- categoryId="org.jboss.tools.central.javaee6.quickstart"
- name="Java EE 6 EAR"
- type="projectExample"
- priority="2"
- icon="icons/jbossas7.png"
- reference="Java EE 6 Quickstarts::multi-javaee6-archetype"/>
-
- <tutorial
- id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6Poh5"
- categoryId="org.jboss.tools.central.javaee6.quickstart"
- name="HTML5 Project"
- type="projectExample"
- priority="3"
- icon="icons/jbossas7.png"
- reference="Java EE 6
Quickstarts::jboss-javaee6-poh5-archetype"/>
-
- <tutorial
-
id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6SpringMvc"
- categoryId="org.jboss.tools.central.javaee6.quickstart"
- name="Spring MVC"
- type="projectExample"
- priority="4"
- icon="icons/jbossas7.png"
- reference="Java EE 6 Quickstarts::spring-mvc-webapp"/>
-
- <tutorial
-
id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6Richfaces"
- categoryId="org.jboss.tools.central.javaee6.quickstart"
- name="Richfaces Project"
- type="projectExample"
- priority="5"
- icon="icons/jbossas7.png"
- reference="Java EE 6
Quickstarts::richfaces-archetype-simpleapp"/>
<!--
<tutorial
id="org.jboss.tools.central.Seam.registration2"
Modified: trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.xml
===================================================================
---
trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.xml 2011-11-30
15:46:51 UTC (rev 36788)
+++
trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.xml 2011-11-30
16:06:16 UTC (rev 36789)
@@ -33,7 +33,8 @@
<extension
point="org.jboss.tools.project.examples.projectExamplesXml"
name="%JBoss_Tools_33_Community_Maven_Examples">
-
<
url>http://download.jboss.org/jbosstools/examples/project-examples-mav...
+ <!-- TODO : rename to project-examples-maven-3.3.xml once M5 is out the door
-->
+
<
url>http://download.jboss.org/jbosstools/examples/project-examples-mav...
<experimental>false</experimental>
</extension>
</plugin>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2011-11-30 15:46:51
UTC (rev 36788)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2011-11-30 16:06:16
UTC (rev 36789)
@@ -69,4 +69,11 @@
<initializer
class="org.jboss.tools.project.examples.preferences.ProjectExamplesPreferencesInitializer"/>
</extension>
+ <extension
+ point="org.jboss.tools.project.examples.projectExamplesXml"
+ name="Java EE Archetypes">
+
<
url>http://download.jboss.org/jbosstools/examples/project-examples-sha...
+ <experimental>false</experimental>
+ </extension>
+
</plugin>