GladeForrestPlugin/src/java/org/metamorphosis/glade ForrestStarterPlugin.java,NONE,1.1
Nick Chalko <[email protected]> Mon, 19 Jul 2004 05:43:54 +0000
| Newsgroups | gmane.comp.krysalis.metamorphosis.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/metamorphosis/GladeForrestPlugin/src/java/org/metamorphosis/glade
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28611/src/java/org/metamorphosis/glade
Added Files:
ForrestStarterPlugin.java
Log Message:
Playing with an eclipse plugin for forrest.
--- NEW FILE: ForrestStarterPlugin.java ---
package org.metamorphosis.glade;
import org.eclipse.ui.plugin.*;
import org.osgi.framework.BundleContext;
import java.util.*;
/**
* The main plugin class to be used in the desktop.
*/
public class ForrestStarterPlugin extends AbstractUIPlugin {
//The shared instance.
private static ForrestStarterPlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
/**
* The constructor.
*/
public ForrestStarterPlugin() {
super();
plugin = this;
try {
resourceBundle = ResourceBundle.getBundle("org.metamorphosis.glade.ForrestStarterPluginResources");
} 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);
}
/**
* Returns the shared instance.
*/
public static ForrestStarterPlugin getDefault() {
return plugin;
}
/**
* Returns the string from the plugin's resource bundle,
* or 'key' if not found.
*/
public static String getResourceString(String key) {
ResourceBundle bundle = ForrestStarterPlugin.getDefault().getResourceBundle();
try {
return (bundle != null) ? bundle.getString(key) : key;
} catch (MissingResourceException e) {
return key;
}
}
/**
* Returns the plugin's resource bundle,
*/
public ResourceBundle getResourceBundle() {
return resourceBundle;
}
}
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click