hook to save action in eclipse plugin

Posted by 4485670 on Stack Overflow See other posts from Stack Overflow or by 4485670
Published on 2012-06-01T13:33:16Z Indexed on 2012/06/15 15:16 UTC
Read the original article Hit count: 144

Filed under:
|
|
|

I want to create a Google Closure Compiler plugin for eclipse. I already have a popup menu entry to compile a Javascript file to its minified version. But it would be more than helpful if every time you save a *.js that minified version would be generated automatically. I read/heard about natures and builders, extension points and IResourceChangeListener. But I did not manage to figure out what I should use and especially how to get it to work.

Is there a working example of a plugin that does "the same kind of thing" so I can work from that or a tutorial to write such?

With the answer below I searched for projects that use the IResourceChangeListener and came up with this code:

manifest: 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

There in the MinifiedJavascriptUpdater.java which holds the code for the IResourceChangeListener the "resourceChanged" function is never reached.

© Stack Overflow or respective owner

Related posts about eclipse

Related posts about plugins