Author: scabanovich
Date: 2012-01-24 18:58:38 -0500 (Tue, 24 Jan 2012)
New Revision: 38139
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/FaceletsExtensionsPlugin.java
Log:
JBIDE-10703
https://issues.jboss.org/browse/JBIDE-10703
FaceletsExtensionsPlugin is modified to follow the common pattern.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/META-INF/MANIFEST.MF
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/META-INF/MANIFEST.MF 2012-01-24
23:54:39 UTC (rev 38138)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/META-INF/MANIFEST.MF 2012-01-24
23:58:38 UTC (rev 38139)
@@ -9,6 +9,7 @@
Require-Bundle:
org.eclipse.ui,org.eclipse.core.runtime,
org.eclipse.core.resources,org.eclipse.jface.text,
+ org.jboss.tools.common,
org.jboss.tools.common.text.ext,
org.jboss.tools.jst.text.ext,
org.jboss.tools.jsf.text.ext
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/FaceletsExtensionsPlugin.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/FaceletsExtensionsPlugin.java 2012-01-24
23:54:39 UTC (rev 38138)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/FaceletsExtensionsPlugin.java 2012-01-24
23:58:38 UTC (rev 38139)
@@ -10,56 +10,28 @@
******************************************************************************/
package org.jboss.tools.jsf.text.ext.facelets;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.ui.plugin.*;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.common.log.BaseUIPlugin;
/**
* The main plugin class to be used in the desktop.
*/
-public class FaceletsExtensionsPlugin extends AbstractUIPlugin {
+public class FaceletsExtensionsPlugin extends BaseUIPlugin {
//The shared instance.
private static FaceletsExtensionsPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
public static final String PLUGIN_ID =
"org.jboss.tools.jsf.text.ext.facelets"; //$NON-NLS-1$
-
/**
* The constructor.
*/
public FaceletsExtensionsPlugin() {
plugin = this;
- try {
- resourceBundle=
ResourceBundle.getBundle("org.jboss.tools.jsf.text.ext.facelets.FaceletsExtensionsPlugin");
//$NON-NLS-1$
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
}
/**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
* Returns the shared instance.
*/
public static FaceletsExtensionsPlugin getDefault() {
@@ -77,31 +49,4 @@
return
AbstractUIPlugin.imageDescriptorFromPlugin("org.jboss.tools.jsf.text.ext.facelets",
path); //$NON-NLS-1$
}
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle= FaceletsExtensionsPlugin.getDefault().getResourceBundle();
- try {
- return bundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
}