Author: scabanovich
Date: 2012-01-24 19:43:48 -0500 (Tue, 24 Jan 2012)
New Revision: 38149
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/SeamPagesXMLPlugin.java
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesEntityRecognizer.java
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
Log:
JBIDE-10703
https://issues.jboss.org/browse/JBIDE-10703
SeamPagesEntityRecognizer is modified to follow the common pattern.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/SeamPagesXMLPlugin.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/SeamPagesXMLPlugin.java 2012-01-25
00:24:32 UTC (rev 38148)
+++
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/SeamPagesXMLPlugin.java 2012-01-25
00:43:48 UTC (rev 38149)
@@ -10,43 +10,20 @@
******************************************************************************/
package org.jboss.tools.seam.pages.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 SeamPagesXMLPlugin extends AbstractUIPlugin {
+public class SeamPagesXMLPlugin extends BaseUIPlugin {
public static final String PLUGIN_ID = "org.jboss.tools.seam.xml";
//$NON-NLS-1$
public SeamPagesXMLPlugin() {
- 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,
SeamPagesXMLMessages.SEAM_PAGES_XML_PLUGIN_NO_MESSAGE, ex));
- }
-
- public static boolean isDebugEnabled() {
- return INSTANCE.isDebugging();
- }
-
public static SeamPagesXMLPlugin getDefault() {
- return INSTANCE;
+ return plugin;
}
- static SeamPagesXMLPlugin INSTANCE = null;
+ private static SeamPagesXMLPlugin plugin = null;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesEntityRecognizer.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesEntityRecognizer.java 2012-01-25
00:24:32 UTC (rev 38148)
+++
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesEntityRecognizer.java 2012-01-25
00:43:48 UTC (rev 38149)
@@ -25,7 +25,7 @@
Class<?> c = SeamPagesEntityRecognizer.class;
XMLEntityResolver.registerPublicEntity(PUBLIC_ID_12, c,
"/meta/pages-1.2.dtd"); //$NON-NLS-1$
} catch (IOException e) {
- SeamPagesXMLPlugin.log(e);
+ SeamPagesXMLPlugin.getDefault().logError(e);
}
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2012-01-25
00:24:32 UTC (rev 38148)
+++
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2012-01-25
00:43:48 UTC (rev 38149)
@@ -95,7 +95,7 @@
templateString = buffer.getString();
}
catch (Exception e) {
- SeamPagesXMLPlugin.log("Could not create template for new html", e);
//$NON-NLS-1$
+ SeamPagesXMLPlugin.getDefault().logError("Could not create template for new
html", e); //$NON-NLS-1$
}
}