I want to create a Google Closure Compiler plugin for Eclipse. I already have a popup menu entry for compiling a JavaScript file into its shortened version. But it would be more useful if every time you save *.js , this mini-version will be generated automatically. I read / heard about nature and builders, extension points and IResourceChangeListener . But I was not able to figure out what I should use, and especially how to make it work.
Is there a working example of a plugin that does the โsame thingโ, so I can work with this or a tutorial to write one?
With the answer below, I searched for projects that use IResourceChangeListener , and came up with this code:
Manifesto: http://codepaste.net/3yahwe
plugin.xml : http://codepaste.net/qek3rw
Activator: http://codepaste.net/s7xowm
DummyStartup: http://codepaste.net/rkub82
MinifiedJavascriptUpdater: http://codepaste.net/koweuh
In MinifiedJavascriptUpdater.java , which contains the code for IResourceChangeListener , the resourceChanged() function will never be reached.
source share