Author: akazakov
Date: 2009-12-07 17:25:46 -0500 (Mon, 07 Dec 2009)
New Revision: 19085
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/images/
trunk/cdi/plugins/org.jboss.tools.cdi.core/images/ca/
trunk/cdi/plugins/org.jboss.tools.cdi.core/images/ca/icons_CDI_EL.gif
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICorePlugin.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIPlugin.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELCorePlugin.java
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ElUiPlugin.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaUIPlugin.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIPlugin.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPlugin.java
trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferencePlugin.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/ExtensionsPlugin.java
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XmlEditorPlugin.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIPlugin.java
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/XStudioVerificationPlugin.java
trunk/common/plugins/org.jboss.tools.common.verification/src/org/jboss/tools/common/verification/vrules/plugin/VerificationPlugin.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/BpmnToPlugin.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUiPlugin.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfTemplatePlugin.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/src/org/jboss/tools/jsf/vpe/myfaces/MyFacesTemplatesPlugin.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/RichFacesTemplatesActivator.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/SeamTemplatesActivator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFModelPlugin.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsTestPlugin.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfTestPlugin.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesTestPlugin.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamTestPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/JSTExtensionsPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/WebKbPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/TilesUIPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebModelPlugin.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCorePlugin.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtPlugin.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/SeamUiPagesPlugin.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamGuiPlugin.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/StrutsExtensionsPlugin.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/StrutsUIPlugin.java
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/XStudioValidatorPlugin.java
trunk/struts/plugins/org.jboss.tools.struts.verification/src/org/jboss/tools/struts/verification/StrutsVerificationPlugin.java
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsModelPlugin.java
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsTestPlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/HtmlTemplatePlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/src/org/jboss/tools/vpe/jsp/JspTemplatePluign.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/Activator.java
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PalettePlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/src/org/jboss/tools/vpe/jsp/test/JSPTestPlugin.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VPETestPlugin.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5383
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/images/ca/icons_CDI_EL.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/cdi/plugins/org.jboss.tools.cdi.core/images/ca/icons_CDI_EL.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICorePlugin.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICorePlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICorePlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -90,4 +90,12 @@
return n;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIPlugin.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -57,4 +57,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -7,11 +7,15 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.common.log;
+import java.util.HashMap;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -20,15 +24,16 @@
/**
* Provides an easy way to log status of events.
*
- * NOTE: It is useful to make the static method getPluginLog()
- * which provides the interface IPluginLog for using it in your code
- * in future
- *
+ * NOTE: It is useful to make the static method getPluginLog() which provides
+ * the interface IPluginLog for using it in your code in future
+ *
* @author Sergey Vasilyev
- *
*/
+public abstract class BaseUIPlugin extends AbstractUIPlugin implements
+ IPluginLog {
-public class BaseUIPlugin extends AbstractUIPlugin implements IPluginLog {
+ // A Map to save a descriptor for each image
+ private HashMap<String, ImageDescriptor> fImageDescRegistry = null;
public void logError(String message, Throwable t) {
LogHelper.logError(this, message, t);
@@ -45,7 +50,7 @@
public void logInfo(String message, Throwable t) {
LogHelper.logInfo(this, message, t);
}
-
+
public void logInfo(String message) {
LogHelper.logInfo(this, message);
}
@@ -65,7 +70,114 @@
public void showError(String message, Throwable t) {
logError(message, t);
Shell shell = Display.getDefault().getActiveShell();
- IStatus s = StatusFactory.getInstance(IStatus.ERROR,
this.getBundle().getSymbolicName(), message, t);
- ErrorDialog.openError(shell, Messages.BaseUIPlugin_ErrorDialogTitle, message, s);
+ IStatus s = StatusFactory.getInstance(IStatus.ERROR, this.getBundle()
+ .getSymbolicName(), message, t);
+ ErrorDialog.openError(shell, Messages.BaseUIPlugin_ErrorDialogTitle,
+ message, s);
}
+
+ /**
+ * Retrieves the image associated with resource from the image registry. If
+ * the image cannot be retrieved, attempt to find and load the image at the
+ * location specified in resource.
+ *
+ * @param resource
+ * the image to retrieve
+ * @return Image the image associated with resource or null if one could not
+ * be found
+ */
+ public Image getImage(String resource) {
+ Image image = getImageRegistry().get(resource);
+ if (image == null) {
+ // create an image
+ image = createImage(resource);
+ }
+ return image;
+ }
+
+ /**
+ * Creates an image from the given resource and adds the image to the image
+ * registry.
+ *
+ * @param resource
+ * @return Image
+ */
+ private Image createImage(String resource) {
+ ImageDescriptor desc = getImageDescriptorFromRegistry(resource);
+ Image image = null;
+
+ if (desc != null) {
+ image = desc.createImage();
+ // dont add the missing image descriptor image to the image
+ // registry
+ if (!desc.equals(ImageDescriptor.getMissingImageDescriptor())) {
+ getImageRegistry().put(resource, image);
+ }
+ }
+ return image;
+ }
+
+ /**
+ * Retrieves the image descriptor associated with resource from the image
+ * descriptor registry. If the image descriptor cannot be retrieved, attempt
+ * to find and load the image descriptor at the location specified in
+ * resource.
+ *
+ * @param resource
+ * the image descriptor to retrieve
+ * @return ImageDescriptor the image descriptor assocated with resource or
+ * the default "missing" image descriptor if one could not be found
+ */
+ public ImageDescriptor getImageDescriptorFromRegistry(String resource) {
+ ImageDescriptor imageDescriptor = null;
+ ImageDescriptor o = getImageDescriptorRegistry().get(resource);
+ if (o == null) {
+ // create a descriptor
+ imageDescriptor = createImageDescriptor(resource);
+ } else {
+ imageDescriptor = o;
+ }
+ return imageDescriptor;
+ }
+
+ /**
+ * Returns the image descriptor registry for this plugin.
+ *
+ * @return HashMap - image descriptor registry for this plugin
+ */
+ private HashMap<String, ImageDescriptor> getImageDescriptorRegistry() {
+ if (fImageDescRegistry == null) {
+ fImageDescRegistry = new HashMap<String, ImageDescriptor>();
+ }
+ return fImageDescRegistry;
+ }
+
+ /**
+ * Creates an image descriptor from the given imageFilePath and adds the
+ * image descriptor to the image descriptor registry. If an image descriptor
+ * could not be created, the default "missing" image descriptor is returned
+ * but not added to the image descriptor registry.
+ *
+ * @param imageFilePath
+ * @return ImageDescriptor image descriptor for imageFilePath or default
+ * "missing" image descriptor if resource could not be found
+ */
+ private ImageDescriptor createImageDescriptor(String imageFilePath) {
+ ImageDescriptor imageDescriptor = AbstractUIPlugin
+ .imageDescriptorFromPlugin(getId(), imageFilePath);
+ if (imageDescriptor != null) {
+ getImageDescriptorRegistry().put(imageFilePath, imageDescriptor);
+ } else {
+ imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
+ }
+
+ return imageDescriptor;
+ }
+
+ /**
+ * Returns ID of the plug-in.
+ *
+ * @return
+ */
+ public abstract String getId();
}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELCorePlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELCorePlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELCorePlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -62,4 +62,12 @@
return getDefault();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ElUiPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ElUiPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ElUiPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -58,4 +58,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaUIPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaUIPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaUIPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -35,4 +35,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return "org.jboss.tools.common.meta.ui";
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -185,4 +185,12 @@
}
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -80,4 +80,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferencePlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferencePlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferencePlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -54,4 +54,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/ExtensionsPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/ExtensionsPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/ExtensionsPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -11,12 +11,10 @@
package org.jboss.tools.common.text.ext;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkDetector;
-import org.osgi.framework.BundleContext;
/**
@@ -53,7 +51,6 @@
return null;
}
-
/**
* @return IPluginLog object
*/
@@ -61,4 +58,12 @@
return getDefault();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XmlEditorPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XmlEditorPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XmlEditorPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -19,8 +19,6 @@
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -172,4 +170,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -58,4 +58,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.verification/src/org/jboss/tools/common/verification/vrules/plugin/VerificationPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.verification/src/org/jboss/tools/common/verification/vrules/plugin/VerificationPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.verification/src/org/jboss/tools/common/verification/vrules/plugin/VerificationPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -37,4 +37,12 @@
return getDefault();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/XStudioVerificationPlugin.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/XStudioVerificationPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/XStudioVerificationPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -45,4 +45,12 @@
return getDefault();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/BpmnToPlugin.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/BpmnToPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/BpmnToPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -11,7 +11,6 @@
package org.jboss.tools.jbpm.convert.bpmnto;
-import org.jboss.tools.jbpm.convert.bpmnto.BpmnToPlugin;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.osgi.framework.BundleContext;
@@ -61,4 +60,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFModelPlugin.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFModelPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/JSFModelPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -6,14 +6,10 @@
*/
package org.jboss.tools.jsf;
-import java.util.HashMap;
import java.util.Properties;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.model.XModel;
@@ -34,14 +30,11 @@
public static final String CA_JSF_EL_IMAGE_PATH =
"images/ca/icons_JSF_EL.gif"; //$NON-NLS-1$
public static final String CA_JSF_MESSAGES_IMAGE_PATH =
"images/ca/icons_Message_Bundles.gif"; //$NON-NLS-1$
- // A Map to save a descriptor for each image
- private HashMap fImageDescRegistry = null;
-
public JSFModelPlugin() {
super();
INSTANCE = this;
}
-
+
protected void initializeDefaultPluginPreferences()
{
super.initializeDefaultPluginPreferences();
@@ -64,23 +57,23 @@
} catch (XModelException e) {
ModelPlugin.getPluginLog().logError(e);
}
-
+
PreferenceModelUtilities.getPreferenceModel().save();
}
}
-
+
public static void log(String msg) {
if(isDebugEnabled()) INSTANCE.getLog().log(new Status(Status.INFO, PLUGIN_ID,
Status.OK, msg, null));
}
-
+
public static void log(IStatus status) {
if(isDebugEnabled() || !status.isOK()) INSTANCE.getLog().log(status);
}
-
+
public static void log(String message, Throwable exception) {
INSTANCE.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, message,
exception));
}
-
+
public static boolean isDebugEnabled() {
return INSTANCE.isDebugging();
}
@@ -88,9 +81,9 @@
public static JSFModelPlugin getDefault() {
return INSTANCE;
}
-
+
static JSFModelPlugin INSTANCE = null;
-
+
/**
* @return IPluginLog object
*/
@@ -98,104 +91,12 @@
return getDefault();
}
- /**
- * Creates an image from the given resource and adds the image to the
- * image registry.
- *
- * @param resource
- * @return Image
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
*/
- private Image createImage(String resource) {
- ImageDescriptor desc = getImageDescriptorFromRegistry(resource);
- Image image = null;
-
- if (desc != null) {
- image = desc.createImage();
- // dont add the missing image descriptor image to the image
- // registry
- if (!desc.equals(ImageDescriptor.getMissingImageDescriptor())) {
- getImageRegistry().put(resource, image);
- }
- }
- return image;
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
}
-
- /**
- * Creates an image descriptor from the given imageFilePath and adds the
- * image descriptor to the image descriptor registry. If an image
- * descriptor could not be created, the default "missing" image descriptor
- * is returned but not added to the image descriptor registry.
- *
- * @param imageFilePath
- * @return ImageDescriptor image descriptor for imageFilePath or default
- * "missing" image descriptor if resource could not be found
- */
- private ImageDescriptor createImageDescriptor(String imageFilePath) {
- ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID,
imageFilePath);
- if (imageDescriptor != null) {
- getImageDescriptorRegistry().put(imageFilePath, imageDescriptor);
- }
- else {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
-
- return imageDescriptor;
- }
-
- /**
- * Retrieves the image associated with resource from the image registry.
- * If the image cannot be retrieved, attempt to find and load the image at
- * the location specified in resource.
- *
- * @param resource
- * the image to retrieve
- * @return Image the image associated with resource or null if one could
- * not be found
- */
- public Image getImage(String resource) {
- Image image = getImageRegistry().get(resource);
- if (image == null) {
- // create an image
- image = createImage(resource);
- }
- return image;
- }
-
- /**
- * Retrieves the image descriptor associated with resource from the image
- * descriptor registry. If the image descriptor cannot be retrieved,
- * attempt to find and load the image descriptor at the location specified
- * in resource.
- *
- * @param resource
- * the image descriptor to retrieve
- * @return ImageDescriptor the image descriptor assocated with resource or
- * the default "missing" image descriptor if one could not be
- * found
- */
- public ImageDescriptor getImageDescriptorFromRegistry(String resource) {
- ImageDescriptor imageDescriptor = null;
- Object o = getImageDescriptorRegistry().get(resource);
- if (o == null) {
- // create a descriptor
- imageDescriptor = createImageDescriptor(resource);
- }
- else {
- imageDescriptor = (ImageDescriptor) o;
- }
- return imageDescriptor;
- }
-
- /**
- * Returns the image descriptor registry for this plugin.
- *
- * @return HashMap - image descriptor registry for this plugin
- */
- private HashMap getImageDescriptorRegistry() {
- if (fImageDescRegistry == null) {
- fImageDescRegistry = new HashMap();
- }
- return fImageDescRegistry;
- }
-
-}
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUiPlugin.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUiPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUiPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -22,11 +22,11 @@
public JsfUiPlugin() {
}
-
+
public void start(BundleContext context) throws Exception {
super.start(context);
}
-
+
public static JsfUiPlugin getDefault() {
return PluginHolder.INSTANCE;
}
@@ -34,20 +34,28 @@
public static boolean isDebugEnabled() {
return PluginHolder.INSTANCE.isDebugging();
}
-
+
static class PluginHolder {
static JsfUiPlugin INSTANCE = (JsfUiPlugin)Platform.getPlugin(PLUGIN_ID);
}
-
public static Shell getShell() {
return PluginHolder.INSTANCE.getWorkbench().getActiveWorkbenchWindow().getShell();
}
-
+
/**
* @return IPluginLog object
*/
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfTemplatePlugin.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfTemplatePlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfTemplatePlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -54,4 +54,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/src/org/jboss/tools/jsf/vpe/myfaces/MyFacesTemplatesPlugin.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/src/org/jboss/tools/jsf/vpe/myfaces/MyFacesTemplatesPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/src/org/jboss/tools/jsf/vpe/myfaces/MyFacesTemplatesPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -47,4 +47,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/RichFacesTemplatesActivator.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/RichFacesTemplatesActivator.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/RichFacesTemplatesActivator.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -78,4 +78,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/SeamTemplatesActivator.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/SeamTemplatesActivator.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/SeamTemplatesActivator.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -80,5 +80,13 @@
}
return (url == null) ? null : url.getPath();
}
-
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsTestPlugin.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsTestPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsTestPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -81,4 +81,12 @@
return (url == null) ? null : url.getPath();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfTestPlugin.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfTestPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfTestPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -82,4 +82,12 @@
return (url == null) ? null : url.getPath();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesTestPlugin.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesTestPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesTestPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -80,4 +80,13 @@
}
return (url == null) ? null : url.getPath();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamTestPlugin.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamTestPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamTestPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -81,4 +81,12 @@
return (url == null) ? null : url.getPath();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JspEditorPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -280,4 +280,12 @@
return fImageDescRegistry;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/JSTExtensionsPlugin.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/JSTExtensionsPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/JSTExtensionsPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -11,12 +11,10 @@
package org.jboss.tools.jst.text.ext;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkDetector;
-import org.osgi.framework.BundleContext;
/**
@@ -53,7 +51,6 @@
return null;
}
-
/**
* @return IPluginLog object
*/
@@ -61,4 +58,12 @@
return getDefault();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebModelPlugin.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebModelPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebModelPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -116,4 +116,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/WebKbPlugin.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/WebKbPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/WebKbPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -46,4 +46,13 @@
public static WebKbPlugin getDefault() {
return plugin;
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/TilesUIPlugin.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/TilesUIPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/TilesUIPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -52,4 +52,12 @@
return getDefault();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -50,5 +50,12 @@
return getDefault();
}
-
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCorePlugin.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCorePlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCorePlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -12,7 +12,6 @@
import java.io.File;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
import org.eclipse.core.resources.IProject;
@@ -27,9 +26,6 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
@@ -48,15 +44,12 @@
// The shared instance
private static SeamCorePlugin plugin;
-
- // A Map to save a descriptor for each image
- private HashMap fImageDescRegistry = null;
-
public static final String CA_SEAM_EL_IMAGE_PATH =
"images/ca/icons_Seam_EL.gif";
public static final String CA_SEAM_MESSAGES_IMAGE_PATH =
"images/ca/icons_Message_Bundles.gif";
-
+
static final String M2_FACET_ID = "jboss.m2"; //$NON-NLS-1$
+
/**
* The constructor
*/
@@ -73,7 +66,7 @@
cleanCachedProjects();
ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener);
}
-
+
static void cleanCachedProjects() {
IPath path = SeamCorePlugin.getDefault().getStateLocation();
File file = new File(path.toFile(), "projects"); //$NON-NLS-1$
@@ -90,7 +83,6 @@
}
}
}
-
}
IResourceChangeListener resourceChangeListener = new RCL();
@@ -109,9 +101,7 @@
}
}
}
-
}
-
}
/*
@@ -134,23 +124,12 @@
}
/**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
* @return IPluginLog object
*/
public static IPluginLog getPluginLog() {
return getDefault();
}
-
+
/**
* Factory method creating seam project instance by project resource.
* Returns null if
@@ -171,14 +150,14 @@
return null;
}
- ISeamProject seamProject;
- try {
- seamProject = (ISeamProject)project.getNature(ISeamProject.NATURE_ID);
- if(resolve) seamProject.resolve();
- return seamProject;
- } catch (CoreException e) {
- getPluginLog().logError(e);
- }
+ ISeamProject seamProject;
+ try {
+ seamProject = (ISeamProject)project.getNature(ISeamProject.NATURE_ID);
+ if(resolve) seamProject.resolve();
+ return seamProject;
+ } catch (CoreException e) {
+ getPluginLog().logError(e);
+ }
return null;
}
@@ -186,7 +165,7 @@
IScopeContext projectScope = new ProjectScope(project);
return projectScope.getNode(PLUGIN_ID);
}
-
+
/**
* @param string
* @return
@@ -194,9 +173,9 @@
public static IStatus createErrorStatus(String message, Throwable exception) {
return new Status(IStatus.ERROR, PLUGIN_ID, -1, message, exception);
}
-
+
private static List<ISeamProjectChangeListener> listeners = new
ArrayList<ISeamProjectChangeListener>();
-
+
/**
*
*/
@@ -215,7 +194,7 @@
listeners.remove(listener);
}
}
-
+
public static void fire(SeamProjectChangeEvent event) {
ISeamProjectChangeListener[] ls = null;
synchronized(listeners) {
@@ -228,106 +207,6 @@
}
}
- /**
- * Creates an image from the given resource and adds the image to the
- * image registry.
- *
- * @param resource
- * @return Image
- */
- private Image createImage(String resource) {
- ImageDescriptor desc = getImageDescriptorFromRegistry(resource);
- Image image = null;
-
- if (desc != null) {
- image = desc.createImage();
- // dont add the missing image descriptor image to the image
- // registry
- if (!desc.equals(ImageDescriptor.getMissingImageDescriptor())) {
- getImageRegistry().put(resource, image);
- }
- }
- return image;
- }
-
- /**
- * Creates an image descriptor from the given imageFilePath and adds the
- * image descriptor to the image descriptor registry. If an image
- * descriptor could not be created, the default "missing" image descriptor
- * is returned but not added to the image descriptor registry.
- *
- * @param imageFilePath
- * @return ImageDescriptor image descriptor for imageFilePath or default
- * "missing" image descriptor if resource could not be found
- */
- private ImageDescriptor createImageDescriptor(String imageFilePath) {
- ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID,
imageFilePath);
- if (imageDescriptor != null) {
- getImageDescriptorRegistry().put(imageFilePath, imageDescriptor);
- }
- else {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
-
- return imageDescriptor;
- }
-
- /**
- * Retrieves the image associated with resource from the image registry.
- * If the image cannot be retrieved, attempt to find and load the image at
- * the location specified in resource.
- *
- * @param resource
- * the image to retrieve
- * @return Image the image associated with resource or null if one could
- * not be found
- */
- public Image getImage(String resource) {
- Image image = getImageRegistry().get(resource);
- if (image == null) {
- // create an image
- image = createImage(resource);
- }
- return image;
- }
-
- /**
- * Retrieves the image descriptor associated with resource from the image
- * descriptor registry. If the image descriptor cannot be retrieved,
- * attempt to find and load the image descriptor at the location specified
- * in resource.
- *
- * @param resource
- * the image descriptor to retrieve
- * @return ImageDescriptor the image descriptor assocated with resource or
- * the default "missing" image descriptor if one could not be
- * found
- */
- public ImageDescriptor getImageDescriptorFromRegistry(String resource) {
- ImageDescriptor imageDescriptor = null;
- Object o = getImageDescriptorRegistry().get(resource);
- if (o == null) {
- // create a descriptor
- imageDescriptor = createImageDescriptor(resource);
- }
- else {
- imageDescriptor = (ImageDescriptor) o;
- }
- return imageDescriptor;
- }
-
- /**
- * Returns the image descriptor registry for this plugin.
- *
- * @return HashMap - image descriptor registry for this plugin
- */
- private HashMap getImageDescriptorRegistry() {
- if (fImageDescRegistry == null) {
- fImageDescRegistry = new HashMap();
- }
- return fImageDescRegistry;
- }
-
public boolean hasM2Facet(IProject project) {
try {
return FacetedProjectFramework.hasProjectFacet(project, M2_FACET_ID);
@@ -336,4 +215,12 @@
}
}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtPlugin.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/SeamExtPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -54,4 +54,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamGuiPlugin.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamGuiPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamGuiPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -82,4 +82,13 @@
}
});
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/SeamUiPagesPlugin.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/SeamUiPagesPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/SeamUiPagesPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -13,7 +13,6 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.osgi.framework.BundleContext;
@@ -56,4 +55,13 @@
public static Shell getShell() {
return INSTANCE.getWorkbench().getActiveWorkbenchWindow().getShell();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsModelPlugin.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsModelPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsModelPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -67,4 +67,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/StrutsExtensionsPlugin.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/StrutsExtensionsPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/StrutsExtensionsPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -77,9 +77,17 @@
public ResourceBundle getResourceBundle() {
return resourceBundle;
}
-
+
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/StrutsUIPlugin.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/StrutsUIPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/StrutsUIPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -43,4 +43,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/XStudioValidatorPlugin.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/XStudioValidatorPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/XStudioValidatorPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -29,4 +29,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/struts/plugins/org.jboss.tools.struts.verification/src/org/jboss/tools/struts/verification/StrutsVerificationPlugin.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.verification/src/org/jboss/tools/struts/verification/StrutsVerificationPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/struts/plugins/org.jboss.tools.struts.verification/src/org/jboss/tools/struts/verification/StrutsVerificationPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -7,17 +7,17 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.struts.verification;
+
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
-
public class StrutsVerificationPlugin extends BaseUIPlugin {
public static final String PLUGIN_ID = "org.jboss.tools.struts.verification";
-
+
private static StrutsVerificationPlugin plugin = null;
-
+
public StrutsVerificationPlugin() {
plugin = this;
}
@@ -25,7 +25,18 @@
public static StrutsVerificationPlugin getDefault() {
return plugin;
}
-
+
public static IPluginLog getPluginLog() {
return getDefault();
- }}
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsTestPlugin.java
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsTestPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsTestPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -84,4 +84,12 @@
return (url == null) ? null : url.getPath();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -116,6 +116,13 @@
}
return (url == null) ? null : url.getPath();
}
-
-
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/HtmlTemplatePlugin.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/HtmlTemplatePlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/HtmlTemplatePlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -47,4 +47,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/src/org/jboss/tools/vpe/jsp/JspTemplatePluign.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/src/org/jboss/tools/vpe/jsp/JspTemplatePluign.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/src/org/jboss/tools/vpe/jsp/JspTemplatePluign.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -47,4 +47,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/Activator.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/Activator.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/Activator.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -47,4 +47,12 @@
return plugin;
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PalettePlugin.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PalettePlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PalettePlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -38,4 +38,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -74,4 +74,13 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/src/org/jboss/tools/vpe/jsp/test/JSPTestPlugin.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/src/org/jboss/tools/vpe/jsp/test/JSPTestPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/src/org/jboss/tools/vpe/jsp/test/JSPTestPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -76,4 +76,12 @@
return (url == null) ? null : url.getPath();
}
-}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VPETestPlugin.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VPETestPlugin.java 2009-12-07
22:21:00 UTC (rev 19084)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VPETestPlugin.java 2009-12-07
22:25:46 UTC (rev 19085)
@@ -73,4 +73,13 @@
}
return (url == null) ? null : url.getPath();
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.log.BaseUIPlugin#getId()
+ */
+ @Override
+ public String getId() {
+ return PLUGIN_ID;
+ }
+}
\ No newline at end of file