希望在Eclipse插件中保存 *** 作

希望在Eclipse插件中保存 *** 作,第1张

希望在Eclipse插件中保存 *** 作

从这里回答http://www.eclipse.org/forums/index.php/t/362425/

解决方案是将代码放入激活器并摆脱

MinifiedJavascriptUpdater

package closure_compiler_save;import org.eclipse.ui.plugin.AbstractUIPlugin;import org.osgi.framework.BundleContext;public class Activator extends AbstractUIPlugin {    // The plug-in ID    public static final String PLUGIN_ID = "closure-compiler-save"; //$NON-NLS-1$    // The shared instance    private static Activator plugin;        public Activator() {    } //gets here    @Override    public void start(BundleContext context) throws Exception {        super.start(context);        Activator.plugin = this;        ResourcesPlugin.getWorkspace().addResourceChangeListener(new IResourceChangeListener() { public void resourceChanged(IResourceChangeEvent event) {     System.out.println("Something changed!"); }        });    }    @Override    public void stop(BundleContext context) throws Exception {        Activator.plugin = null;        super.stop(context);    }        public static Activator getDefault() {        return plugin;    }}


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5561704.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-14
下一篇 2022-12-14

发表评论

登录后才能评论

评论列表(0条)

保存