Author: snjeza
Date: 2012-02-15 17:44:23 -0500 (Wed, 15 Feb 2012)
New Revision: 38785
Removed:
trunk/central/plugins/org.jboss.tools.central/schema/configurators.exsd
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
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java
Modified:
trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF
trunk/central/plugins/org.jboss.tools.central/build.properties
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/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-10264 Wizard-ify the project examples
Modified: trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF 2012-02-15 22:40:09
UTC (rev 38784)
+++ trunk/central/plugins/org.jboss.tools.central/META-INF/MANIFEST.MF 2012-02-15 22:44:23
UTC (rev 38785)
@@ -15,9 +15,7 @@
com.sun.syndication;bundle-version="0.9.0",
org.jdom;bundle-version="1.0.0",
org.apache.commons.lang;bundle-version="2.4.0",
- org.jboss.tools.project.examples,
- org.jboss.tools.runtime.core,
- org.jboss.tools.runtime.ui,
+ org.jboss.tools.project.examples;visibility:=reexport,
org.eclipse.mylyn.commons.core;bundle-version="3.6.0",
org.eclipse.mylyn.discovery.ui;bundle-version="3.6.0",
org.eclipse.mylyn.discovery.core;bundle-version="3.6.0",
@@ -33,8 +31,6 @@
.
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,
Modified: trunk/central/plugins/org.jboss.tools.central/build.properties
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/build.properties 2012-02-15 22:40:09 UTC
(rev 38784)
+++ trunk/central/plugins/org.jboss.tools.central/build.properties 2012-02-15 22:44:23 UTC
(rev 38785)
@@ -5,7 +5,6 @@
.,\
icons/,\
plugin.properties,\
- schema/,\
about.html,\
about.ini,\
about.mappings,\
Modified: trunk/central/plugins/org.jboss.tools.central/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/plugin.xml 2012-02-15 22:40:09 UTC (rev
38784)
+++ trunk/central/plugins/org.jboss.tools.central/plugin.xml 2012-02-15 22:44:23 UTC (rev
38785)
@@ -2,8 +2,6 @@
<?eclipse version="3.4"?>
<plugin>
- <extension-point id="configurators" name="JBoss Central
Configurator" schema="schema/configurators.exsd"/>
-
<extension
point="org.eclipse.ui.editors">
<editor
Deleted: trunk/central/plugins/org.jboss.tools.central/schema/configurators.exsd
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/schema/configurators.exsd 2012-02-15
22:40:09 UTC (rev 38784)
+++ trunk/central/plugins/org.jboss.tools.central/schema/configurators.exsd 2012-02-15
22:44:23 UTC (rev 38785)
@@ -1,109 +0,0 @@
-<?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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -14,14 +14,7 @@
import java.net.URL;
import java.util.Dictionary;
import java.util.Hashtable;
-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;
-import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
@@ -53,11 +46,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.project.examples.model.ProjectExampleCategory;
import org.jboss.tools.project.examples.model.ProjectExample;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -72,22 +62,20 @@
public static final Object JBOSS_CENTRAL_FAMILY = new Object();
- public static final String JBOSS_DISCOVERY_DIRECTORY =
"jboss.discovery.directory.url";
-
- public static final String ICON = "icon";
+// public static final String ICON = "icon";
+//
+// private static final String DESCRIPTION = "description";
+//
+// private static final String TUTORIAL = "tutorial";
+//
+// public static final String CATEGORY_ID = "categoryId";
+//
+// public static final String REFERENCE = "reference";
+//
+// public static final String TYPE = "type";
+//
+// public static final String PRIORITY = "priority";
- private static final String DESCRIPTION = "description";
-
- private static final String TUTORIAL = "tutorial";
-
- public static final String CATEGORY_ID = "categoryId";
-
- public static final String REFERENCE = "reference";
-
- public static final String TYPE = "type";
-
- public static final String PRIORITY = "priority";
-
public static final String ID = "id";
public static final String NAME = "name";
@@ -118,12 +106,8 @@
+ "<span color=\"header\"
font=\"header\">Loading...</span>"
+ FORM_END_TAG;
- public static final String TUTORIALS_EXTENSION_ID =
"org.jboss.tools.central.tutorials";
+ //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";
@@ -132,12 +116,8 @@
private BundleContext bundleContext;
- private Map<ProjectExampleCategory, List<ProjectExample>>
tutorialCategories;
-
public static final int MAX_FEEDS = 100;
- private static final Object CONFIGURATOR = "configurator";
-
private static final String ORG_ECLIPSE_UI_INTERNAL_INTROVIEW =
"org.eclipse.ui.internal.introview";
// The shared instance
@@ -369,38 +349,7 @@
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 Image getImage(String imagePath) {
ImageRegistry registry = getImageRegistry();
Image image = registry.get(imagePath);
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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossBlogsHandler.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -11,7 +11,7 @@
package org.jboss.tools.central.actions;
-import org.jboss.tools.central.JBossCentralActivator;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
/**
*
@@ -22,7 +22,7 @@
@Override
public String getLocation() {
- return JBossCentralActivator.getDefault().getConfigurator().getBlogsUrl();
+ return ProjectExamplesActivator.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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossNewsHandler.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -11,7 +11,7 @@
package org.jboss.tools.central.actions;
-import org.jboss.tools.central.JBossCentralActivator;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
/**
*
@@ -22,7 +22,7 @@
@Override
public String getLocation() {
- return JBossCentralActivator.getDefault().getConfigurator().getNewsUrl();
+ return ProjectExamplesActivator.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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/actions/OpenJBossToolsTwitterHandler.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -11,7 +11,7 @@
package org.jboss.tools.central.actions;
-import org.jboss.tools.central.JBossCentralActivator;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
/**
*
@@ -22,7 +22,7 @@
@Override
public String getLocation() {
- return JBossCentralActivator.getDefault().getConfigurator().getTwitterLink();
+ return ProjectExamplesActivator.getDefault().getConfigurator().getTwitterLink();
}
@Override
Deleted:
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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -1,89 +0,0 @@
-/*************************************************************************************
- * 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, nboldt
- *
- */
-public class DefaultJBossCentralConfigurator implements
- IJBossCentralConfigurator {
-
- // TODO: for GA, change this from /development/indigo/ to /stable/indigo/
- private static final String JBOSS_DIRECTORY_URL_DEFAULT =
"http://download.jboss.org/jbosstools/updates/development/indigo/jbosstools-directory.xml";
-
- // see pom.xml for actual value -- this is passed it at build-time via Maven
- private static final String JBOSS_DIRECTORY_URL =
"${jboss.discovery.directory.url}";
-
- 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() {
- // use commandline override -Djboss.discovery.directory.url
- String directory = System.getProperty(JBossCentralActivator.JBOSS_DISCOVERY_DIRECTORY,
null);
- if (directory == null) {
- // else use Maven-generated value; fall back to default
- return JBOSS_DIRECTORY_URL.equals("${" +
"jboss.discovery.directory.url" + "}") ? JBOSS_DIRECTORY_URL_DEFAULT :
JBOSS_DIRECTORY_URL;
- }
- return directory;
- }
-
- @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.eclipse.jst.servlet.ui.project.facet.WebProjectWizard");
-
wizardIds.add("org.jboss.ide.eclipse.as.openshift.express.ui.wizard.createNewApplicationWizard");
- return wizardIds;
- }
-
- @Override
- public Image getHeaderImage() {
- if (headerImage == null) {
- headerImage =
JBossCentralActivator.getDefault().getImage("/icons/jboss.png");
- }
- return headerImage;
- }
-}
Deleted:
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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/IJBossCentralConfigurator.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -1,32 +0,0 @@
-/*************************************************************************************
- * 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();
-
-}
Deleted:
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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/dialogs/ProjectExamplesDialog.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -1,516 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2010-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.dialogs;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.lang.StringEscapeUtils;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.jface.window.ToolTip;
-import org.eclipse.jface.wizard.ProgressMonitorPart;
-import org.eclipse.mylyn.internal.discovery.core.model.BundleDiscoveryStrategy;
-import org.eclipse.mylyn.internal.discovery.core.model.ConnectorDescriptor;
-import org.eclipse.mylyn.internal.discovery.core.model.ConnectorDiscovery;
-import org.eclipse.mylyn.internal.discovery.core.model.DiscoveryConnector;
-import org.eclipse.mylyn.internal.discovery.core.model.RemoteBundleDiscoveryStrategy;
-import org.eclipse.mylyn.internal.discovery.ui.DiscoveryUi;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.FormDialog;
-import org.eclipse.ui.forms.HyperlinkSettings;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormText;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.jboss.tools.central.JBossCentralActivator;
-import org.jboss.tools.central.actions.JBossRuntimeDetectionPreferencesHandler;
-import org.jboss.tools.central.editors.DescriptionToolTip;
-import org.jboss.tools.project.examples.ProjectExamplesActivator;
-import org.jboss.tools.project.examples.model.ProjectExample;
-import org.jboss.tools.project.examples.model.ProjectFix;
-import org.jboss.tools.runtime.core.RuntimeCoreActivator;
-import org.jboss.tools.runtime.core.model.DownloadRuntime;
-import org.jboss.tools.runtime.ui.actions.DownloadRuntimeAction;
-
-/**
- * @author snjeza
- *
- */
-public class ProjectExamplesDialog extends FormDialog implements IRunnableContext {
-
- private ProjectExample tutorial;
- private FormToolkit toolkit;
- private ScrolledForm form;
- private Composite fixesComposite;
- private Section reqSection;
- private ProgressMonitorPart fProgressMonitorPart;
- private Control fLastControl;
- private Set<Button> controls = new HashSet<Button>();
-
- public ProjectExamplesDialog(Shell parentShell, ProjectExample project) {
- super(parentShell);
- setShellStyle(SWT.CLOSE | SWT.MAX | SWT.TITLE | SWT.BORDER
- | SWT.RESIZE | getDefaultOrientation());
- this.tutorial = project;
- //setHelpAvailable(false);
- }
-
- @Override
- protected void createFormContent(IManagedForm mform) {
- mform.getForm().setText(tutorial.getDescription());
- form = mform.getForm();
- toolkit = mform.getToolkit();
- toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
- form.getBody().setLayout(new GridLayout());
- form.setText(tutorial.getShortDescription());
- Section descSection = toolkit.createSection(form.getBody(),
ExpandableComposite.TITLE_BAR|ExpandableComposite.EXPANDED);
- descSection.setText("Description");
- descSection.setLayout(new GridLayout());
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- descSection.setLayoutData(gd);
- Text text = new Text(descSection, SWT.READ_ONLY | SWT.WRAP);
- text.setText(JBossCentralActivator.getDefault().getDescription(tutorial));
- toolkit.adapt(text, false, false);
- gd = new GridData(GridData.FILL, GridData.FILL, false, false);
- text.setLayoutData(gd);
- descSection.setClient(text);
-
- reqSection = toolkit.createSection(form.getBody(),
ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
- reqSection.setText("Requirements");
- reqSection.setLayout(new GridLayout());
- gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- reqSection.setLayoutData(gd);
-
- fixesComposite = toolkit.createComposite(reqSection);
- fixesComposite.setLayout(new GridLayout(3, false));
- fixesComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- reqSection.setClient(fixesComposite);
-
- refreshFixes();
-
- mform.getForm().setBackgroundImage(null);
- mform.getToolkit().decorateFormHeading(mform.getForm().getForm());
- mform.getForm().setImage(
- JBossCentralActivator.getDefault().getImage(
- "/icons/examples_wiz.gif"));
- getShell().setText("Project Example");
- form.getBody().pack();
- }
-
- protected void refreshFixes() {
- controls.clear();
- addButtons();
-
- List<ProjectFix> fixes = tutorial.getFixes();
- List<ProjectFix> unsatisfiedFixes = new ArrayList<ProjectFix>();
- tutorial.setUnsatisfiedFixes(unsatisfiedFixes);
- for (ProjectFix fix:fixes) {
- if (!ProjectExamplesActivator.canFix(tutorial, fix)) {
- unsatisfiedFixes.add(fix);
- }
- }
- fixes = tutorial.getUnsatisfiedFixes();
- disposeChildren(fixesComposite);
- reqSection.setVisible(fixes.size() > 0);
- if (fixes.size() > 0) {
- for (ProjectFix projectFix : fixes) {
- if (ProjectFix.WTP_RUNTIME.equals(projectFix.getType())
- || ProjectFix.SEAM_RUNTIME.equals(projectFix.getType())) {
- addDescription(projectFix);
- addRuntimeFixActions(projectFix);
- }
- }
- Set<String> connectorIds = new HashSet<String>();
- boolean havePluginFix = false;
- for (ProjectFix projectFix : fixes) {
- if (ProjectFix.PLUGIN_TYPE.equals(projectFix.getType())) {
- if (havePluginFix) {
- new Label(fixesComposite, SWT.NONE);
- new Label(fixesComposite, SWT.NONE);
- }
- addDescription(projectFix);
- havePluginFix = true;
- String connectorId = projectFix.getProperties().get(ProjectFix.CONNECTOR_ID);
- if (connectorId != null) {
- String[] ids = connectorId.split(",");
- for (String id:ids) {
- if (id != null && !id.trim().isEmpty()) {
- connectorIds.add(id.trim());
- }
- }
- }
- }
- }
- if (havePluginFix) {
- addPluginFixActions(connectorIds);
- } else {
- new Label(fixesComposite, SWT.NONE);
- new Label(fixesComposite, SWT.NONE);
- }
- }
- }
-
- protected void addButtons() {
- Button cancelButton = getButton(IDialogConstants.CANCEL_ID);
- if (getButton(IDialogConstants.CANCEL_ID) != null) {
- controls.add(cancelButton);
- controls.add(getButton(IDialogConstants.OK_ID));
- }
- }
-
- private void disposeChildren(Composite composite) {
- Control[] children = composite.getChildren();
- for (Control child : children) {
- if (child instanceof Composite) {
- disposeChildren((Composite) child);
- child.dispose();
- } else {
- child.dispose();
- }
- }
- }
-
- private void addDescription(ProjectFix projectFix) {
- FormText fixDescriptionText = toolkit.createFormText(fixesComposite, true);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- fixDescriptionText.setLayoutData(gd);
- StringBuffer buffer = new StringBuffer();
- buffer.append(JBossCentralActivator.FORM_START_TAG);
- buffer.append("<img href=\"image\"/> ");
- String description = projectFix.getProperties().get(ProjectFix.DESCRIPTION);
- description = StringEscapeUtils.escapeHtml(description);
- buffer.append(description);
- buffer.append(JBossCentralActivator.FORM_END_TAG);
- fixDescriptionText.setText(buffer.toString(), true, false);
- if (ProjectFix.WTP_RUNTIME.equals(projectFix.getType())) {
- fixDescriptionText.setImage("image",
JBossCentralActivator.getDefault().getImage("/icons/wtp_server.gif"));
- } else if (ProjectFix.SEAM_RUNTIME.equals(projectFix.getType())) {
- fixDescriptionText.setImage("image",
JBossCentralActivator.getDefault().getImage("/icons/seam16.png"));
- } if (ProjectFix.PLUGIN_TYPE.equals(projectFix.getType())) {
- fixDescriptionText.setImage("image",
JBossCentralActivator.getDefault().getImage("/icons/software.png"));
- }
- }
-
- protected void addRuntimeFixActions(ProjectFix projectFix) {
- Button install = toolkit.createButton(fixesComposite, "Install", SWT.PUSH);
- GridData gd = new GridData(SWT.FILL, SWT.END, false, false);
- install.setLayoutData(gd);
- ToolTip tooltip = new DescriptionToolTip(install, "JBoss Runtime
Detection");
- tooltip.activate();
- //install.setImage(JBossCentralActivator.getDefault().getImage("/icons/search_local.png"));
- install.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- try {
- new JBossRuntimeDetectionPreferencesHandler().execute(new ExecutionEvent());
- } catch (ExecutionException e1) {
- JBossCentralActivator.log(e1);
- }
- refresh();
- }
- });
- controls.add(install);
- final String downloadId = projectFix.getProperties().get(ProjectFix.DOWNLOAD_ID);
- boolean haveDownloadId = false;
- if (downloadId != null) {
- DownloadRuntime downloadRuntime =
RuntimeCoreActivator.getDefault().getDownloadRuntimes().get(downloadId);
- if (downloadRuntime != null) {
- haveDownloadId = true;
- Button download = toolkit.createButton(fixesComposite, "Download and
Install...", SWT.PUSH);
- gd = new GridData(SWT.FILL, SWT.END, false, false);
- download.setLayoutData(gd);
- ToolTip tip = new DescriptionToolTip(download, "Download and install " +
downloadRuntime.getName());
- tip.activate();
- //download.setImage(JBossCentralActivator.getDefault().getImage("/icons/repository-submit.gif"));
- controls.add(download);
- download.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- new DownloadRuntimeAction(downloadId).run();
- refresh();
- }
- });
-
- }
- }
- if (!haveDownloadId) {
- new Label(fixesComposite, SWT.NONE);
- }
- }
-
- protected void addPluginFixActions(final Set<String> connectorIds) {
- if (connectorIds.size() > 0) {
- Button install = toolkit.createButton(fixesComposite, "Install", SWT.PUSH);
- ToolTip tooltip = new DescriptionToolTip(install, "Install required
feature(s)");
- tooltip.activate();
- //install.setImage(JBossCentralActivator.getDefault().getImage("/icons/software.png"));
- install.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- try {
- install(connectorIds);
- } catch (Exception e1) {
- // FIXME
- JBossCentralActivator.log(e1);
- }
- refresh();
- }
- });
- controls.add(install);
- }
- Button p2install = toolkit.createButton(fixesComposite, "Install New
Software", SWT.PUSH);
- ToolTip tip = new DescriptionToolTip(p2install, "P2 Install New Software");
- tip.activate();
- //p2install.setImage(JBossCentralActivator.getDefault().getImage("/icons/update.gif"));
-
- p2install.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- IHandlerService handlerService = (IHandlerService)
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IHandlerService.class);
- try {
-
handlerService.executeCommand("org.eclipse.equinox.p2.ui.sdk.install", new
Event());
- }
- catch (Exception e1) {
- JBossCentralActivator.log(e1);
- }
- refresh();
- }
- });
- controls.add(p2install);
- if (connectorIds.size() == 0) {
- new Label(fixesComposite, SWT.NONE);
- }
- }
-
- protected void install(final Set<String> connectorIds) throws
InvocationTargetException, InterruptedException {
- final IStatus[] results = new IStatus[1];
- final ConnectorDiscovery[] connectorDiscoveries = new ConnectorDiscovery[1];
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
- connectorDiscoveries[0] = new ConnectorDiscovery();
-
- // look for descriptors from installed bundles
- connectorDiscoveries[0].getDiscoveryStrategies().add(new BundleDiscoveryStrategy());
-
- RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new
RemoteBundleDiscoveryStrategy();
- remoteDiscoveryStrategy.setDirectoryUrl(JBossCentralActivator.getDefault().getConfigurator().getJBossDiscoveryDirectory());
- connectorDiscoveries[0].getDiscoveryStrategies().add(remoteDiscoveryStrategy);
-
- connectorDiscoveries[0].setEnvironment(JBossCentralActivator.getEnvironment());
- connectorDiscoveries[0].setVerifyUpdateSiteAvailability(true);
- results[0] = connectorDiscoveries[0].performDiscovery(monitor);
- if (monitor.isCanceled()) {
- results[0] = Status.CANCEL_STATUS;
- }
- }
- };
- run(true, true, runnable);
- if (results[0] == null) {
- return;
- }
- if (results[0].isOK()) {
- List<DiscoveryConnector> connectors = connectorDiscoveries[0].getConnectors();
- List<ConnectorDescriptor> installableConnectors = new
ArrayList<ConnectorDescriptor>();
- for (DiscoveryConnector connector:connectors) {
- if (connectorIds.contains(connector.getId())) {
- installableConnectors.add(connector);
- }
- }
- DiscoveryUi.install(installableConnectors, ProjectExamplesDialog.this);
- } else {
- String message = results[0].toString();
- switch (results[0].getSeverity()) {
- case IStatus.ERROR:
- MessageDialog.openError(getShell(), "Error", message);
- break;
- case IStatus.WARNING:
- MessageDialog.openWarning(getShell(), "Warning", message);
- break;
- case IStatus.INFO:
- MessageDialog.openInformation(getShell(), "Information", message);
- break;
- }
- }
-
- }
-
- @Override
- public void run(boolean fork, boolean cancelable,
- IRunnableWithProgress runnable) throws InvocationTargetException,
- InterruptedException {
- //ModalContext.run(runnable, cancelable, monitor, getDisplay());
- if (getShell() != null && getShell().isVisible()) {
- // Save focus control
- fLastControl = getShell().getDisplay().getFocusControl();
- if (fLastControl != null && fLastControl.getShell() != getShell()) {
- fLastControl = null;
- }
- // Attach the progress monitor part to the cancel button
- fProgressMonitorPart.attachToCancelComponent(null);
- fProgressMonitorPart.getParent().setVisible(true);
-
- try {
- updateControls(false);
- ModalContext.run(runnable, fork, fProgressMonitorPart, getShell().getDisplay());
- }
- finally {
- updateControls(true);
- if (getShell() != null) {
- fProgressMonitorPart.getParent().setVisible(false);
- fProgressMonitorPart.removeFromCancelComponent(null);
- if (fLastControl != null) {
- fLastControl.setFocus();
- }
- }
- }
- }
- else {
- PlatformUI.getWorkbench().getProgressService().run(fork, cancelable, runnable);
- }
- }
-
- private void updateControls(boolean enabled) {
- for (Button control:controls) {
- control.setEnabled(enabled);
- }
- }
-
- protected Display getDisplay() {
- Display display = Display.getCurrent();
- if (display == null) {
- display = Display.getDefault();
- }
- return display;
- }
-
- /* (non-Javadoc)
- * @see
org.eclipse.jface.dialogs.Dialog#createButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected Control createButtonBar(Composite parent) {
- Font font = parent.getFont();
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- layout.marginLeft = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- composite.setFont(font);
- Label sep = new Label(composite, SWT.HORIZONTAL|SWT.SEPARATOR);
- sep.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Composite buttonComposite = new Composite(composite, SWT.NULL);
- layout = new GridLayout();
- if (isHelpAvailable()) {
- layout.numColumns = 3;
- } else {
- layout.numColumns = 2;
- }
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- layout.marginLeft = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- buttonComposite.setLayout(layout);
- buttonComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- buttonComposite.setFont(font);
-
- if (isHelpAvailable()) {
- createHelpControl(buttonComposite);
- }
- Composite monitorComposite = new Composite(buttonComposite, SWT.NULL);
- layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 2;
- monitorComposite.setLayout(layout);
- monitorComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- GridLayout pmLayout = new GridLayout();
- fProgressMonitorPart= new ProgressMonitorPart(monitorComposite, pmLayout, true);
- fProgressMonitorPart.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fProgressMonitorPart.setFont(font);
- monitorComposite.setVisible(false);
-
- boolean helpAvailable = isHelpAvailable();
- setHelpAvailable(false);
- super.createButtonBar(buttonComposite);
- Control[] children = buttonComposite.getChildren();
- for (Control child:children) {
- if (child instanceof Label) {
- child.setVisible(false);
- child.dispose();
- }
- }
- setHelpAvailable(helpAvailable);
- return composite;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.OK_ID, "Start",
- true);
- createButton(parent, IDialogConstants.CANCEL_ID,
- IDialogConstants.CANCEL_LABEL, false);
- addButtons();
- }
-
- protected void refresh() {
- if (form == null || form.isDisposed()) {
- return;
- }
- refreshFixes();
- fixesComposite.pack();
- form.reflow(true);
- form.redraw();
- form.layout(true, true);
- getShell().pack();
- }
-
- @Override
- protected void okPressed() {
- super.okPressed();
- ProjectExamplesActivator.importProjectExamples(Arrays.asList(tutorial), true);
- }
-
-}
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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -93,14 +93,15 @@
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.jboss.tools.central.JBossCentralActivator;
-import org.jboss.tools.central.dialogs.ProjectExamplesDialog;
import org.jboss.tools.central.jobs.AbstractRefreshJob;
import org.jboss.tools.central.jobs.RefreshBlogsJob;
import org.jboss.tools.central.jobs.RefreshNewsJob;
import org.jboss.tools.central.jobs.RefreshTutorialsJob;
import org.jboss.tools.central.model.FeedsEntry;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.model.ProjectExample;
import org.jboss.tools.project.examples.model.ProjectExampleCategory;
+import org.jboss.tools.project.examples.wizard.NewProjectExamplesWizard2;
import org.osgi.framework.Bundle;
/**
@@ -552,7 +553,7 @@
IExtensionPoint extensionPoint =
extensionRegistry.getExtensionPoint("org.eclipse.ui.newWizards");
IExtension[] extensions = extensionPoint.getExtensions();
- List<String> wizardIDs =
JBossCentralActivator.getDefault().getConfigurator().getWizardIds();
+ List<String> wizardIDs =
ProjectExamplesActivator.getDefault().getConfigurator().getWizardIds();
List<String> createdIDs = new ArrayList<String>();
for (IExtension extension : extensions) {
@@ -985,8 +986,11 @@
public void linkActivated(HyperlinkEvent e) {
Object object = e.data;
if (object instanceof String) {
- ProjectExamplesDialog dialog = new ProjectExamplesDialog(getSite().getShell(),
tutorial);
+ NewProjectExamplesWizard2 wizard = new NewProjectExamplesWizard2(tutorial);
+ WizardDialog dialog = new WizardDialog(getSite().getShell(), wizard);
dialog.open();
+ //ProjectExamplesDialog dialog = new ProjectExamplesDialog(getSite().getShell(),
tutorial);
+ //dialog.open();
refreshTutorials();
}
}
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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -47,6 +47,7 @@
import org.jboss.tools.central.JBossCentralActivator;
import org.jboss.tools.central.actions.OpenJBossBlogsHandler;
import org.jboss.tools.central.editors.xpl.TextSearchControl;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
/**
*
@@ -137,7 +138,7 @@
}
setPageImage(index, gettingStartedImage);
- if (JBossCentralActivator.getDefault().getConfigurator()
+ if (ProjectExamplesActivator.getDefault().getConfigurator()
.getJBossDiscoveryDirectory() != null) {
softwarePage = new SoftwarePage(this);
index = addPage(softwarePage);
@@ -174,7 +175,7 @@
};
toolbar.add(searchControl);
toolbar.add(new GroupMarker(COMMANDS_GROUP));
- String[] commandIds = JBossCentralActivator.getDefault()
+ String[] commandIds = ProjectExamplesActivator.getDefault()
.getConfigurator().getMainToolbarCommandIds();
for (String commandId : commandIds) {
CommandContributionItem item = JBossCentralActivator
@@ -323,7 +324,7 @@
}
private Image getHeaderImage() {
- return JBossCentralActivator.getDefault().getConfigurator()
+ return ProjectExamplesActivator.getDefault().getConfigurator()
.getHeaderImage();
}
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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/SoftwarePage.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -44,7 +44,6 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
@@ -57,6 +56,7 @@
import org.jboss.tools.central.JBossCentralActivator;
import org.jboss.tools.central.editors.xpl.DiscoveryViewer;
import org.jboss.tools.central.jobs.RefreshDiscoveryJob;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
/**
*
@@ -131,7 +131,7 @@
discoveryViewer = new DiscoveryViewer(getSite(), this);
discoveryViewer.setShowConnectorDescriptorKindFilter(false);
discoveryViewer.setShowInstalledFilterEnabled(true);
- discoveryViewer.setDirectoryUrl(JBossCentralActivator.getDefault().getConfigurator().getJBossDiscoveryDirectory());
+ discoveryViewer.setDirectoryUrl(ProjectExamplesActivator.getDefault().getConfigurator().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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshBlogsJob.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -14,6 +14,7 @@
import org.eclipse.core.runtime.IPath;
import org.jboss.tools.central.JBossCentralActivator;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
/**
*
@@ -26,7 +27,7 @@
public static RefreshBlogsJob INSTANCE = new RefreshBlogsJob();
private RefreshBlogsJob() {
- super("Refreshing JBoss Blogs...",
JBossCentralActivator.getDefault().getConfigurator().getBlogsUrl());
+ super("Refreshing JBoss Blogs...",
ProjectExamplesActivator.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 2012-02-15
22:40:09 UTC (rev 38784)
+++
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/jobs/RefreshNewsJob.java 2012-02-15
22:44:23 UTC (rev 38785)
@@ -14,6 +14,7 @@
import org.eclipse.core.runtime.IPath;
import org.jboss.tools.central.JBossCentralActivator;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
/**
*
@@ -27,7 +28,7 @@
private RefreshNewsJob() {
- super("Refreshing JBoss News...",
JBossCentralActivator.getDefault().getConfigurator().getNewsUrl());
+ super("Refreshing JBoss News...",
ProjectExamplesActivator.getDefault().getConfigurator().getNewsUrl());
}
@Override