docsplugin.java
来自「eclipseme的最新版本的source,欢迎j2me程序员使用」· Java 代码 · 共 86 行
JAVA
86 行
/**
* Copyright (c) 2004 Craig Setera
* All Rights Reserved.
* Licensed under the Eclipse Public License - v 1.0
* For more information see http://www.eclipse.org/legal/epl-v10.html
*/
package eclipseme.docs;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
import java.util.*;
/**
* The plugin implementation class.
* <p />
* Copyright (c) 2003 Craig Setera<br>
* All Rights Reserved.<br>
* Licensed under the Eclipse Public License - v 1.0<p/>
* <br>
* $Revision: 1.4 $
* <br>
* $Date: 2004/11/22 02:10:31 $
* <br>
* @author Craig Setera
*/
public class DocsPlugin extends Plugin {
//The shared instance.
private static DocsPlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
/**
* The constructor.
*/
public DocsPlugin() {
super();
plugin = this;
try {
resourceBundle = ResourceBundle.getBundle("eclipseme.docs.DocsPluginResources");
} 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 DocsPlugin 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 = DocsPlugin.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;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?