Author: snjeza
Date: 2011-11-24 17:22:55 -0500 (Thu, 24 Nov 2011)
New Revision: 36635
Added:
trunk/central/plugins/org.jboss.tools.central/schema/configurators.exsd
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/
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/IJBossCentralConfigurator.java
Modified:
trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF
trunk/central/plugins/org.jboss.tools.central/plugin.xml
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossBlogsHandler.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossNewsHandler.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossToolsTwitterHandler.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java
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/JBossCentralEditor.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/SoftwarePage.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshBlogsJob.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java
Log:
JBIDE-10223 Create separate JBoss Central tutorials for JBDS and JBoss Tools
Modified: trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF 2011-11-24 22:22:40
UTC (rev 36634)
+++ trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF 2011-11-24 22:22:55
UTC (rev 36635)
@@ -31,3 +31,12 @@
Bundle-Vendor: %BundleVendor
Bundle-ClassPath: lib/ocpsoft-pretty-time-1.0.7.jar,
.
+Export-Package: org.jboss.tools.central,
+ org.jboss.tools.central.actions,
+ org.jboss.tools.central.configurators,
+ org.jboss.tools.central.dialogs,
+ org.jboss.tools.central.editors,
+ org.jboss.tools.central.editors.xpl,
+ org.jboss.tools.central.jobs,
+ org.jboss.tools.central.model,
+ org.jboss.tools.central.preferences
Modified: trunk/central/plugins/org.jboss.tools.central/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-11-24 22:22:40 UTC (rev
36634)
+++ trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-11-24 22:22:55 UTC (rev
36635)
@@ -3,6 +3,7 @@
<plugin>
<extension-point id="tutorials" name="%Tutorials"
schema="schema/tutorials.exsd"/>
+ <extension-point id="configurators" name="JBoss Central
Configurator" schema="schema/configurators.exsd"/>
<extension
point="org.eclipse.ui.editors">
@@ -206,144 +207,5 @@
icon="icons/examples_wiz.gif">
</image>
</extension>
-
- <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."
- priority="2" />
- <category
- id="org.jboss.tools.central.seam2"
- name="Seam 2 Tutorials"
- description="These tutorials are intended to help you develop Seam 2
applications."
- priority="5" />
- <tutorial
- id="org.jboss.tools.central.jbossas.quickstart.helloworld"
- categoryId="org.jboss.tools.central.jbossas.quickstart"
- name="Helloworld quickstart"
- type="projectExample"
- priority="1"
- icon="icons/jbossas7.png"
- reference="JBoss AS 7 Quickstarts::helloworld"/>
- <tutorial
- id="org.jboss.tools.central.jbossas.quickstart.numberguess"
- categoryId="org.jboss.tools.central.jbossas.quickstart"
- name="Numberguess quickstart"
- type="projectExample"
- priority="2"
- icon="icons/jbossas7.png"
- reference="JBoss AS 7 Quickstarts::numberguess"/>
-
- <tutorial
- id="org.jboss.tools.central.jbossas.quickstart.login"
- categoryId="org.jboss.tools.central.jbossas.quickstart"
- name="Login quickstart"
- type="projectExample"
- priority="3"
- icon="icons/jbossas7.png"
- reference="JBoss AS 7 Quickstarts::login"/>
-
- <tutorial
- id="org.jboss.tools.central.jbossas.quickstart.kitchensink"
- categoryId="org.jboss.tools.central.jbossas.quickstart"
- name="Kitchensink quickstart"
- type="projectExample"
- 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"
- categoryId="org.jboss.tools.central.seam2"
- name="Registration Example"
- type="projectExample"
- priority="1"
- icon="icons/seam16.png"
- reference="Seam::registration2"/>
- <tutorial
- id="org.jboss.tools.central.Seam.messages"
- categoryId="org.jboss.tools.central.seam2"
- name="Message Example"
- type="projectExample"
- priority="2"
- icon="icons/seam16.png"
- reference="Seam::messages"/>
- <tutorial
- id="org.jboss.tools.central.Seam.todo"
- categoryId="org.jboss.tools.central.seam2"
- name="Todo Example"
- type="projectExample"
- priority="3"
- icon="icons/seam16.png"
- reference="Seam::todo"/>
- <tutorial
- id="org.jboss.tools.central.Seam.numberguess"
- categoryId="org.jboss.tools.central.seam2"
- name="Numberguess Example"
- type="projectExample"
- priority="4"
- icon="icons/seam16.png"
- reference="Seam::numberguess"/>
- <tutorial
- id="org.jboss.tools.central.Seam.booking22"
- categoryId="org.jboss.tools.central.seam2"
- name="Boooking Example"
- type="projectExample"
- priority="5"
- icon="icons/seam16.png"
- reference="Seam::booking22"/>
-
- </extension>
</plugin>
Added: trunk/central/plugins/org.jboss.tools.central/schema/configurators.exsd
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/schema/configurators.exsd
(rev 0)
+++ trunk/central/plugins/org.jboss.tools.central/schema/configurators.exsd 2011-11-24
22:22:55 UTC (rev 36635)
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.central"
xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.jboss.tools.central"
id="configurators" name="JBoss Central Configurator"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="configurator"/>
+ </sequence>
+ <attribute name="point" type="string"
use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="configurator">
+ <complexType>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java"
basedOn=":org.jboss.tools.central.configurators.IJBossCentralConfigurator"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-11-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -19,6 +19,7 @@
import java.util.List;
import java.util.Map;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
@@ -48,6 +49,8 @@
import org.eclipse.ui.menus.CommandContributionItemParameter;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.services.IServiceLocator;
+import org.jboss.tools.central.configurators.DefaultJBossCentralConfigurator;
+import org.jboss.tools.central.configurators.IJBossCentralConfigurator;
import org.jboss.tools.central.editors.JBossCentralEditor;
import org.jboss.tools.central.editors.JBossCentralEditorInput;
import org.jboss.tools.central.model.Tutorial;
@@ -67,8 +70,7 @@
private static final String JBOSS_DISCOVERY_DIRECTORY =
"jboss.discovery.directory.url";
//public static final String JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML =
"http://download.jboss.org/jbosstools/updates/development/indigo/jbosstools-directory.xml";
- public static final String JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML =
"http://download.jboss.org/jbosstools/updates/nightly/trunk/jbosstools-directory.xml";
-
+
public static final String ICON = "icon";
private static final String DESCRIPTION = "description";
@@ -104,10 +106,6 @@
public static final String NEW_PROJECT_EXAMPLES_WIZARD_ID =
"org.jboss.tools.project.examples.wizard.NewProjectExamplesWizard";
- public static final String BLOGS_URL = "http://planet.jboss.org/feeds/blogs";
-
- public static final String NEWS_URL = "http://planet.jboss.org/feeds/news";
-
public static final String FORM_END_TAG = "</p></form>";
public static final String FORM_START_TAG = "<form><p>";
public static final String CANCELED = FORM_START_TAG + "<span
color=\"header\" font=\"header\">Canceled.</span>" +
FORM_END_TAG;
@@ -115,6 +113,10 @@
public static final String TUTORIALS_EXTENSION_ID =
"org.jboss.tools.central.tutorials";
+ public static final String CONFIGURATORS_EXTENSION_ID =
"org.jboss.tools.central.configurators";
+
+ private IJBossCentralConfigurator configurator;
+
//public static final String SEARCH_PROJECT_PAGES = "Search Project Pages";
public static final String SEARCH_THE_COMMUNITY = "Search JBoss Community";
@@ -126,6 +128,8 @@
private BundleContext bundleContext;
public static final int MAX_FEEDS = 100;
+
+ private static final Object CONFIGURATOR = "configurator";
// The shared instance
private static JBossCentralActivator plugin;
@@ -298,6 +302,37 @@
return null;
}
+ public IJBossCentralConfigurator getConfigurator() {
+ if (configurator == null) {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry
+ .getExtensionPoint(CONFIGURATORS_EXTENSION_ID);
+ IExtension[] extensions = extensionPoint.getExtensions();
+ if (extensions.length > 0) {
+ IExtension extension = extensions[0];
+ IConfigurationElement[] configurationElements = extension
+ .getConfigurationElements();
+ for (int j = 0; j < configurationElements.length; j++) {
+ IConfigurationElement configurationElement = configurationElements[j];
+ if (CONFIGURATOR.equals(configurationElement.getName())) {
+ try {
+ configurator = (IJBossCentralConfigurator)
configurationElement.createExecutableExtension("class");
+ } catch (CoreException e) {
+ JBossCentralActivator.log(e);
+ continue;
+ }
+ break;
+ }
+ }
+
+ }
+ if (configurator == null) {
+ configurator = new DefaultJBossCentralConfigurator();
+ }
+ }
+ return configurator;
+ }
+
public Map<String, TutorialCategory> getTutorialCategories() {
if (tutorialCategories == null) {
tutorialCategories = new HashMap<String, TutorialCategory>();
@@ -433,10 +468,10 @@
return bundleContext;
}
- public static String getJBossDiscoveryDirectory() {
+ public String getJBossDiscoveryDirectory() {
String directory = System.getProperty(JBOSS_DISCOVERY_DIRECTORY, null);
if (directory == null) {
- return JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML;
+ return getConfigurator().getJBossDiscoveryDirectory();
}
return directory;
}
@@ -465,4 +500,5 @@
shell.dispose();
}
}
+
}
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossBlogsHandler.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossBlogsHandler.java 2011-11-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossBlogsHandler.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -22,7 +22,7 @@
@Override
public String getLocation() {
- return JBossCentralActivator.BLOGS_URL;
+ return JBossCentralActivator.getDefault().getConfigurator().getBlogsUrl();
}
}
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossNewsHandler.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossNewsHandler.java 2011-11-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossNewsHandler.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -22,7 +22,7 @@
@Override
public String getLocation() {
- return JBossCentralActivator.NEWS_URL;
+ return JBossCentralActivator.getDefault().getConfigurator().getNewsUrl();
}
}
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossToolsTwitterHandler.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossToolsTwitterHandler.java 2011-11-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossToolsTwitterHandler.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -11,6 +11,8 @@
package org.jboss.tools.central.actions;
+import org.jboss.tools.central.JBossCentralActivator;
+
/**
*
* @author snjeza
@@ -20,7 +22,7 @@
@Override
public String getLocation() {
- return "http://twitter.com/#!/jbosstools";
+ return JBossCentralActivator.getDefault().getConfigurator().getTwitterLink();
}
@Override
Added:
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
(rev 0)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -0,0 +1,82 @@
+/*************************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.central.configurators;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.central.JBossCentralActivator;
+
+/**
+ *
+ * @author snjeza
+ *
+ */
+public class DefaultJBossCentralConfigurator implements
+ IJBossCentralConfigurator {
+
+ private static final String JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML =
"http://download.jboss.org/jbosstools/updates/nightly/trunk/jbosstools-directory.xml";
+
+ private static final String TWITTER_LINK ="http://twitter.com/#!/jbosstools";
+
+ private static final String BLOGS_URL =
"http://planet.jboss.org/feeds/blogs";
+
+ private static final String NEWS_URL = "http://planet.jboss.org/feeds/news";
+
+ private Image headerImage;
+
+ @Override
+ public String[] getMainToolbarCommandIds() {
+ return new String[] {"org.jboss.tools.central.openJBossToolsHome",
+ "org.jboss.tools.central.favoriteAtEclipseMarketplace",
+ "org.jboss.tools.central.preferences"};
+ }
+
+ @Override
+ public String getJBossDiscoveryDirectory() {
+ return JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML;
+ }
+
+ @Override
+ public String getTwitterLink() {
+ return TWITTER_LINK;
+ }
+
+ @Override
+ public String getBlogsUrl() {
+ return BLOGS_URL;
+ }
+
+ @Override
+ public String getNewsUrl() {
+ return NEWS_URL;
+ }
+
+ @Override
+ public List<String> getWizardIds() {
+ 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);
+ return wizardIds;
+ }
+
+ @Override
+ public Image getHeaderImage() {
+ if (headerImage == null) {
+ headerImage =
JBossCentralActivator.getDefault().getImage("/icons/jboss.gif");
+ }
+ return headerImage;
+ }
+}
Added:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/IJBossCentralConfigurator.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/IJBossCentralConfigurator.java
(rev 0)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/IJBossCentralConfigurator.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -0,0 +1,32 @@
+/*************************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.central.configurators;
+
+import java.util.List;
+
+import org.eclipse.swt.graphics.Image;
+
+/**
+ *
+ * @author snjeza
+ *
+ */
+public interface IJBossCentralConfigurator {
+
+ String[] getMainToolbarCommandIds();
+ String getJBossDiscoveryDirectory();
+ String getTwitterLink();
+ String getBlogsUrl();
+ String getNewsUrl();
+ List<String> getWizardIds();
+ Image getHeaderImage();
+
+}
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java 2011-11-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -318,7 +318,7 @@
connectorDiscovery.getDiscoveryStrategies().add(new BundleDiscoveryStrategy());
RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new
RemoteBundleDiscoveryStrategy();
- remoteDiscoveryStrategy.setDirectoryUrl(JBossCentralActivator.getJBossDiscoveryDirectory());
+ remoteDiscoveryStrategy.setDirectoryUrl(JBossCentralActivator.getDefault().getJBossDiscoveryDirectory());
connectorDiscovery.getDiscoveryStrategies().add(remoteDiscoveryStrategy);
connectorDiscovery.setEnvironment(JBossCentralActivator.getEnvironment());
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-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -573,12 +573,7 @@
IExtensionPoint extensionPoint =
extensionRegistry.getExtensionPoint("org.eclipse.ui.newWizards");
IExtension[] extensions = extensionPoint.getExtensions();
- 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);
+ List<String> wizardIDs =
JBossCentralActivator.getDefault().getConfigurator().getWizardIds();
List<String> createdIDs = new ArrayList<String>();
for (IExtension extension : extensions) {
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java 2011-11-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -121,13 +121,16 @@
}
setPageImage(index, gettingStartedImage);
- softwarePage = new SoftwarePage(this);
- index = addPage(softwarePage);
- if (softwareImage == null) {
- softwareImage =
JBossCentralActivator.getImageDescriptor("/icons/software.png").createImage();
+ if (JBossCentralActivator.getDefault().getConfigurator()
+ .getJBossDiscoveryDirectory() != null) {
+ softwarePage = new SoftwarePage(this);
+ index = addPage(softwarePage);
+ if (softwareImage == null) {
+ softwareImage = JBossCentralActivator.getImageDescriptor(
+ "/icons/software.png").createImage();
+ }
+ setPageImage(index, softwareImage);
}
- setPageImage(index, softwareImage);
-
} catch (PartInitException e) {
JBossCentralActivator.log(e, "Error adding page");
}
@@ -151,22 +154,6 @@
headerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
headerComposite.setLayout(new GridLayout(2, false));
headerComposite.setBackground(null);
-
-// Button showOnStartup = getToolkit().createButton(headerComposite, "Show on
Startup", SWT.CHECK);
-// showOnStartup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
-// showOnStartup.setBackground(null);
-// showOnStartup.setSelection(JBossCentralActivator.getDefault().showJBossCentralOnStartup());
-// showOnStartup.addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// IEclipsePreferences preferences =
JBossCentralActivator.getDefault().getPreferences();
-// boolean showOnStartup =
preferences.getBoolean(JBossCentralActivator.SHOW_JBOSS_CENTRAL_ON_STARTUP,
JBossCentralActivator.SHOW_JBOSS_CENTRAL_ON_STARTUP_DEFAULT_VALUE);
-// preferences.putBoolean(JBossCentralActivator.SHOW_JBOSS_CENTRAL_ON_STARTUP,
!showOnStartup);
-// JBossCentralActivator.getDefault().savePreferences();
-// }
-//
-// });
Composite searchComposite = getToolkit().createComposite(headerComposite);
GridData gd = new GridData(SWT.BEGINNING, SWT.FILL, true, true);
@@ -282,15 +269,13 @@
//form.getForm().setToolBarVerticalAlignment(SWT.BOTTOM);
IToolBarManager toolbar = form.getToolBarManager();
- CommandContributionItem item = JBossCentralActivator.createContributionItem(getSite(),
"org.jboss.tools.central.openJBossToolsHome");
- toolbar.add(item);
+ String[] commandIds =
JBossCentralActivator.getDefault().getConfigurator().getMainToolbarCommandIds();
+ for (String commandId:commandIds) {
+ CommandContributionItem item = JBossCentralActivator.createContributionItem(getSite(),
commandId);
+ toolbar.add(item);
+ }
- item = JBossCentralActivator.createContributionItem(getSite(),
"org.jboss.tools.central.favoriteAtEclipseMarketplace");
- toolbar.add(item);
- item = JBossCentralActivator.createContributionItem(getSite(),
"org.jboss.tools.central.preferences");
- toolbar.add(item);
-
//item = JBossCentralActivator.createContributionItem(getSite(),
"org.jboss.tools.central.openJBossToolsTwitter");
//toolbar.add(item);
@@ -298,10 +283,7 @@
}
private Image getHeaderImage() {
- if (headerImage == null) {
- headerImage =
JBossCentralActivator.getImageDescriptor("/icons/jboss.gif").createImage();
- }
- return headerImage;
+ return JBossCentralActivator.getDefault().getConfigurator().getHeaderImage();
}
public AbstractJBossCentralPage getGettingStartedPage() {
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/SoftwarePage.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/SoftwarePage.java 2011-11-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/SoftwarePage.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -128,7 +128,7 @@
discoveryViewer = new DiscoveryViewer(getSite(), this);
discoveryViewer.setShowConnectorDescriptorKindFilter(false);
discoveryViewer.setShowInstalledFilterEnabled(true);
- discoveryViewer.setDirectoryUrl(JBossCentralActivator.getJBossDiscoveryDirectory());
+ discoveryViewer.setDirectoryUrl(JBossCentralActivator.getDefault().getJBossDiscoveryDirectory());
discoveryViewer.createControl(pageBook);
discoveryViewer.setEnvironment(getEnvironment());
discoveryViewer.addFilter(new ViewerFilter() {
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshBlogsJob.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshBlogsJob.java 2011-11-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshBlogsJob.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -26,7 +26,7 @@
public static RefreshBlogsJob INSTANCE = new RefreshBlogsJob();
private RefreshBlogsJob() {
- super("Refreshing JBoss Blogs...", JBossCentralActivator.BLOGS_URL);
+ super("Refreshing JBoss Blogs...",
JBossCentralActivator.getDefault().getConfigurator().getBlogsUrl());
}
@Override
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java
===================================================================
---
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java 2011-11-24
22:22:40 UTC (rev 36634)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java 2011-11-24
22:22:55 UTC (rev 36635)
@@ -27,7 +27,7 @@
private RefreshNewsJob() {
- super("Refreshing JBoss News...", JBossCentralActivator.NEWS_URL);
+ super("Refreshing JBoss News...",
JBossCentralActivator.getDefault().getConfigurator().getNewsUrl());
}
@Override