Module not finding classes in same package...

I have a multi-module project and I'm getting some very strange behaviour with intellij. In one of my modules, the classes are unable to recognize each other. So those class declarations and usages are all red in the editor.

Has anyone else had this issue? I can't see what I could be doing wrong and I'm not an intellij newbie. Though that doesn't preclude me from making rookie mistakes...

alan

3 comments

alan brown wrote:

I have a multi-module project and I'm getting some very strange behaviour with intellij. In one of my modules, the classes are unable to recognize each other. So those class declarations and usages are all red in the editor.

Has anyone else had this issue? I can't see what I could be doing wrong and I'm not an intellij newbie. Though that doesn't preclude me from making rookie mistakes...

alan


You mean both usage place and class being used reside in the same
module? The only idea comes then into my mind is you're probably trying
to use classes that reside in the test source root in the production
root which is prohibited.

--
Maxim Shafirov
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Alan, the first thing you may try is to clean up your system
area (caches, compiler, jars directories).
Recreating your modules is the next try but much more difficult.
I suspect there are some issues somewhere in IDEA (had similar
problems - not exactly same, though)...

r.

alan brown wrote:

I have a multi-module project and I'm getting some very strange behaviour
with intellij. In one of my modules, the classes are unable to recognize
each other. So those class declarations and usages are all red in the
editor.

Has anyone else had this issue? I can't see what I could be doing wrong and
I'm not an intellij newbie. Though that doesn't preclude me from making
rookie mistakes...

alan

0

yes, both class and referenced class are in the same package in the same module. The packages are both in the source tree.

I tried creating a project with just this module and it worked fine. This problem is a function of my multi-module environment.

I'm going to try deleting the caches when I have time. I'll let you know if that helps.

0

Please sign in to leave a comment.