Author: scabanovich
Date: 2012-01-24 18:29:53 -0500 (Tue, 24 Jan 2012)
New Revision: 38134
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/CDIXMLImages.java
trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/CDIXMLPlugin.java
Log:
JBIDE-10703
https://issues.jboss.org/browse/JBIDE-10703
CDIXMLPlugin is modified to follow the common pattern.
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/CDIXMLImages.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/CDIXMLImages.java 2012-01-24
23:26:19 UTC (rev 38133)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/CDIXMLImages.java 2012-01-24
23:29:53 UTC (rev 38134)
@@ -25,7 +25,7 @@
try {
INSTANCE = new CDIXMLImages(new
URL(CDIXMLPlugin.getDefault().getBundle().getEntry("/"), "images/"));
//$NON-NLS-1$ //$NON-NLS-2$
} catch (MalformedURLException e) {
- CDIXMLPlugin.log(e);
+ CDIXMLPlugin.getDefault().logError(e);
}
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/CDIXMLPlugin.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/CDIXMLPlugin.java 2012-01-24
23:26:19 UTC (rev 38133)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.xml/src/org/jboss/tools/cdi/xml/CDIXMLPlugin.java 2012-01-24
23:29:53 UTC (rev 38134)
@@ -10,43 +10,22 @@
******************************************************************************/
package org.jboss.tools.cdi.xml;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.common.log.BaseUIPlugin;
/**
*/
-public class CDIXMLPlugin extends AbstractUIPlugin {
+public class CDIXMLPlugin extends BaseUIPlugin {
public static final String PLUGIN_ID = "org.jboss.tools.cdi.xml";
//$NON-NLS-1$
+ private static CDIXMLPlugin plugin = null;
+
public CDIXMLPlugin() {
super();
- INSTANCE = this;
+ plugin = this;
}
- 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 void log(Exception ex) {
- INSTANCE.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK,
CDIXMLMessages.SEAM_XML_PLUGIN_NO_MESSAGE, ex));
- }
-
- public static boolean isDebugEnabled() {
- return INSTANCE.isDebugging();
- }
-
public static CDIXMLPlugin getDefault() {
- return INSTANCE;
+ return plugin;
}
- static CDIXMLPlugin INSTANCE = null;
}