I don't know if this is a bug or expected behavior. It is how things appear
to work in both 2.5 and 612.
We generate java code from a special format. We actually generate two
versions of the code, one that is actually compiled and used and one that is
used to generate javadoc and is slightly different (different type names on
some members, etc). The details of why we do this are pretty much
irrelevant so I won't bore you all with those details, suffice it to say
that if IDEA were to use these version generated for javadoc, it would find
lots of type mismatch errors in other classes.
Our directory structure ends up looking something like this
<root>/net/comanage/Blah.java
<root>/schemadoc/net/comanage/Blah.java
This means my source path it set to <root>. Another class might look
something like this:
import net.comanage.Blah
class Cow {
Cow(){
Blah b = new Blah();
b.prop = new ObjectRef(); //(1)
}
}
Now in the schemadoc version of Blah.java prop might be of type SpecialInfo,
while in the real version of Blah.java prop
is of type ObjectRef. Yet IDEA highlights line (1) as a type mismatch error
saying that a SpecialInfo was expected where there was an ObjectRef. So
IDEA is actually search the subdirectories of the src directory to find
net/comanage/Blah.java before it is searching the root directory.
It seems like a bug that it recursively searches this way. It isn't the way
one would expect a classpath search to work. Perhaps there is a good reason
for a sourcepath search to do it, though I haven't thought of one yet, but
if there is a good reason, perhaps there needs to be a way to specify if
recursion should be done or a way to exclude certain subdirectories.
-Tom
--
[EMAIL PROTECTED]
"But we don't talk about it
we just become shadows of ourselves"
-Duncan Sheik, In the Absence of Sun
_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list