You will of course need Monkey installed, point Eclipse at http://download.eclipse.org/technology/dash/update/. Then copy the above script (including the funky separator lines) and select the Scripts->Paste New Script menu item.
--- Came wiffling through the eclipsey wood ---
/*
* Menu: Maven > Make Maven Targets Derived
* Kudos: Donnchadh Ó Donnabháin
* License: EPL 1.0
* DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
*/
function main() {
var files = resources.filesMatching(".*/pom\\.xml");
var targetFolder;
for each( file in files ) {
if (targetFolder = file.eclipseObject.parent.findMember("target")) {
targetFolder.setDerived(true);
}
}
}
--- And burbled as it ran! ---
Why would you want to do this? Well, if you (like me) are tired of Eclipse suggesting stuff in the target directory when you do "Open Resource", this is for you.
No comments:
Post a Comment