fornwall / eclipsescript

Eclipse plugin for scripting using javascript
https://fornwall.github.io/eclipsescript/
29 stars 5 forks source link

PreBuild step #5

Open Eduardo-Lopes opened 13 years ago

Eduardo-Lopes commented 13 years ago

Hi, I want know if that is a way to make a script execute before the build.

Thanks

fornwall commented 13 years ago

Hi! Not at the moment, there is only support for invoking scripts directly.

However, I'm very interested in that capability (and how to hook scripts to events in general), do you have any suggestion for how you would want it to work?

I'm more inclined to a declarative approach with the hook information being either inside the filename (something like "myscript@prebuild.eclipse.js") or embedded in a comment (like "// @run-at prebuild") rather than an api approach (such as "eclipse.at('prebuild', function(e) {...})") since it's non-obvious how programmatically added listeners would work when running the script multiple times or while editing, copying or moving of the script file.

SamHasler commented 11 years ago

Another use-case to consider: I'd like to be able to run a script on opening a file to trigger Team > Show Annotations