We are using a custom "eclipse builder" that generates output class files in the project classes folder (Those are some automatic utility classes).
We are not able to tell eclipse to take these automatically generated classes into consideration to help with our coding. The classes remain invisible to eclipse.
We also tried to manually edit the .classpath
file. Even this did not work (only when we renamed the classes folder to something else).
It sounds like this is a scenario that is not uncommon: have custom builders generate some extra code/classes in the classes directory, and then include this into the normal coding process. Btw: in our case there is also a normal build step (outside of eclipse) where the automatic classes are generated with no problems here.
Why eclipse does not see those classes? How can we tell eclipse to include this in its class resolution?
Update: Further context and information
Goal: How to use auto-generated classes (bytecode) without generating source-code (in eclipse)
Description: We are trying to use classes for coding, which do not exist as sources, but whose bytecode is auto-generated (similar to how Lombok generates new methods).
This didn't work:
We use a custom builder that runs before the java builder, and let it write the .class files to the default output folder. But the java builder doesn't consider these classes at all and complains that the referenced class cannot be found.
Apparently the default output folder for java builder (typically "classes") cannot be at the same time input for the java builder. Thus, the solution is to have another folder like "classes_generated", and mark this a library input for the java builder. This can also be exported to be visible to other projects.
Thus, the "problem" is simply that the default output folder for the java builder cannot be used as input for the java builder. Maybe even for a good reason? But, there are workarounds for this.
