818 module structure how to ...

I thought that having multiple version of a sourcefile for a given class
in the same project was something to avoid ... but now I have to :

I have a project with a few sourceroots
one is a true sourceroot, another can contain sources that have been
preprocessed (basically inserting tracing etc)

what I would like to achieve is:

if there is a source file com/foo/MyClass.java in the _preproc root,
that is the one that should be picked up by the compiler

if it is missing instead, then the compiler should pick up the same-name
java file from the normal source root.

can I achieve this within IDEA now ?

I expect to manually (well, via ANT) delete/keep up to date
the _preproc source

Edo

3 comments
Comment actions Permalink

I thought that having multiple version of a sourcefile for a given class
in the same project was something to avoid ... but now I have to :


You are right in thinking that, and I pity you :)

can I achieve this within IDEA now ?


No. No support for that.

I expect to manually (well, via ANT) delete/keep up to date
the _preproc source


Can't the same manual/ANT process remove/rename/move the file in the other
sourcepath?

It would greatly reduce your problems.


Carlos


0
Comment actions Permalink

Carlos Costa e Silva wrote:

Can't the same manual/ANT process remove/rename/move the file in the other
sourcepath?

It would greatly reduce your problems.

>
my problems would be reduced if there was less C++ thinking around me ;)

i can't because the non-preproc sources are the normal java sources that
i write, compile, and checkin in the repository (VSS BTW ;)


Carlos

Edo

0
Comment actions Permalink

my problems would be reduced if there was less C++ thinking around me ;)


I'm shuddering even more now ;)

i can't because the non-preproc sources are the normal java sources that
i write, compile, and checkin in the repository (VSS BTW ;)


I don't really have a workaround for this.
I don't even really know if the javac compiler spec supports multiple
classes with the same name in the sourcepath.

It seems a most dangerous option to take.

You could put a new usecase at
http://www.intellij.net/tracker/idea/viewSCR?publicId=12634 (which I'm
against by the way :-).




0

Please sign in to leave a comment.