(
Activator
【代碼
public class Activator extends AbstractUIPlugin {
// The plug
public static final String PLUGIN_ID =
// The shared instance
private static Activator plugin;
public Activator() {
plugin = this;
}
public void start(BundleContext context) throws Exception {
super
}
public void stop(BundleContext context) throws Exception {
plugin = null;
super
}
/**
* Returns the shared instance
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
/**
* Returns an image descriptor for the image file at the given
* plug
*
* @param path the path
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID
}
}
在Eclipse
類中還定義了一個靜態方法getImageDescriptor
在Activator的父類中還定義了很多有用的方法
l getDialogSettings
l getPreferenceStore
l getWorkbench
l getLog
(
這個兩個文件是向導界面的實現代碼
EnumGeneratorNewWizard是維護所有界面的向導類
插件模板向導生成的EnumGeneratorNewWizard
[http://develop
From:http://tw.wingwit.com/Article/program/Java/ky/201311/29053.html