views:

26

answers:

1

I have an Eclipse Plug-in that contains two source folders:

  • src/
  • src-gen/

The reason is that, as the name implies, the second folder is filled with the results of code generation.

However, when I try an Eclipse PDE build, or even a single export of the plugin, the code in src/ that refers to generated classes will not compile. It seems the classes in src-gen are not used during the build, even though they are used in the IDE.

What could be the reason for this issue?

+1  A: 

I found the reason for the problem.

In the build.properties file that must be present on every plugin, there is a section called source and in this case it must be as follows:

source.. = src/,\
           src-gen/

The reason for the discrepancy is that the java build path was taking both of these folders in consideration, but not the build system.

Normally Eclipse keeps both of these files synchronized, but it is not always the case.

After making this change I am able to build the plugin.

Mario Ortegón