my project structure looks like this:
src/main/java
src/main/resources
src/main/generated
....
in the generated folder I place a files which are generated by external software (for example classes generated by JAXB).
In Eclipse all mentioned folders are marked as Source folders.
Is is somehow possible to mark the file in src/main/generated as 'generated' or lock them in another way so that the developer in eclipse is unable to change them?
I don't know if it is possible to do this via the Eclipse UI, but there are APIs that allow a plug-in to mark something as a "derived resource".
Reference:
You can't prevent the user from editing a derived resource, but he / she does get a warning.