Tuesday, September 6, 2016

Eclipse: Setting "derived" folders - AutoDeriv plugin

Using Eclipse with Java or Android projects you may notice that "Open Resource" (CTRL+SHIFT+R on Windows) is showing files from bin (or gen or other) folders, that were copied or generated by the build process, that you really don't want to edit as they will get overwritten on next build, resulting only in frustration and wasted time if you do.


Eclipse documentation for Derived resources:
Many resources get created in the course of translating, compiling, copying, or otherwise processing files that the user creates and edits. Derived resources are resources that are not original data, and can be recreated from their source files.  It is common for derived files to be excluded from certain kinds of processing.
You can manually update derived the flag on each resource in Properties page but as the resource will not be persisted in a source repository the flag won't as well. So that when you are checking out or downloading the project it will not be set, or when manually removing and recreating the particular resource in the case of a folder.


AutoDeriv plugin comes to help as it relies on configuration stored in a .derived file in your project that can be commited in a source repository. When the project is created the plugin will automatically mark as derived the resources matched in the configuration file.



The plugin also has a preferences page where you can change certain things like presentation.


References:

No comments :

Post a Comment