I'm wondering if I just wasn't clear enough in my e-mail or if things work
the way everyone expects them too and you all think I'm crazy.
To sum up the problem:
You have a packaged names my.package
You have a class in that packaged named Foo (i.e. my.package.Foo)
Your sourcepath is some directory call it <root>.
You have the following files on your disk:
<root>/my/package/Foo.java
<root>/old/my/package/Foo.java
IDEA uses <root>/old/my/package/Foo.java when doing its analysis of the
code, so if that file doesn't match <root>/my/package/Foo.java lots of
incorrect errors will be reported.
At the very least, it seems wrong to me that IDEA would prefer the file
which is rooted in a subdirectory of the sourcepath. It actually seems
wrong to me that IDEA would search in subdirectories this way at all.
-Tom
--
[EMAIL PROTECTED]
"But we don't talk about it
we just become shadows of ourselves"
-Duncan Sheik, In the Absence of Sun
>-----Original Message-----
>From: Tom Wagner [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, March 30, 2002 5:17 PM
>To: '[EMAIL PROTECTED]'
>Subject: [Eap-list] adding directory to src path adds all
>subdirectories...
>
>
>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
>
_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list