Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse - marking 10 projects 'target' folder as derived

Tags:

eclipse

I would like to mark all of my 'target' directories as 'derived' in Eclipse. However I have about 10 projects and have to repeat the same process 10 times, is there any quick way of marking all 10 'target' folders as derived?

like image 269
Kamilski81 Avatar asked Aug 01 '11 19:08

Kamilski81


3 Answers

I wrote the AutoDeriv plugin to handle this specific task easily and efficiently. The short story:

  1. list the resources you want to set as derived on a simple .derived text file
  2. There is no 2.

Enjoy your clean workspace as resources are now correctly marked as 'derived'. The syntax is trivial, just like a .gitignore file.

For your specific case, create a .derived file at workspace root, write target in it, and your done.

I hope you will like it =)

like image 133
johan d Avatar answered Nov 11 '22 05:11

johan d


Not sure what you mean by 'derived'. However, Eclipse writes most settings to an XML file. Figure out which config file (e.g. .classpath) gets altered and then run sed over all your config files at once.

like image 37
hoipolloi Avatar answered Nov 11 '22 07:11

hoipolloi


It is not easy to set the Derived flag automatically, see Where does Eclipse store information about which files are "Derived"?

This is sad as I have to mark 20 subfolders as "Derived" each time I clone my project on a new machine. If you do it manually too, use the keyboard:

  • Alt-Enter
  • Alt-v
  • Enter
  • Cursor down
  • repeat
like image 39
Janning Avatar answered Nov 11 '22 05:11

Janning