Module wont resolve classes

Don't know whats going. I've got a module, sources set up properly. But class Foo extends Bar has "Bar" in red -i.e. doesn't resolve even if Bar is sitting right there next to Foo. And I can't select "Compile Foo" from the context menu - just "Compile module X". Its like it doesn't recognize the files under the src/java directory. Tearing my hair out here. Any idea? I'm on v 11.1.2.

2 comments
Comment actions Permalink

are your directories marked as (java) sources?

0
Comment actions Permalink

So here's the answer:

Module B had some libraries.
The Library B1 in module B had a sources path set up.
One of those paths was "$MODULE/../ModuleA/src/java/"

This broke IntelliJ completely. Module A couldn't compile, inspect, nothing.

Made a bug for it: http://youtrack.jetbrains.com/issue/IDEA-87130

0

Please sign in to leave a comment.