editor does not recognize imports for codes in the same module
I had the bad idea to ask to a complete rebuild of my project
and now editor does not know about other classes in the same package! (types appear in red!)
I have been trying to read all dependencies ... to no avail
there appears a suggestion to import older version of the current module in maven (but I want THIS version!)
no way to have a build ... except going directly for maven command (and there it does work)
I suspect an inconsistency between maven numbering of the modules
desesperately stuck! thanks
(another strange thing is happening: if I mark a line of code for debugging, the debug thread does not stop there -though I am sure the code is executed
I am wondering if it is not an older version of the code that gets in the debug process)
Post is closed for comments.
well I am stuck and can't program anymore :(
here is a copy of my screen it shows that a code cannot know about a class in the same package!
the BusMessage class does not compile fro the same reason: does not know about other classes in the same package!
help popup suggest that I rely on previous maven version of the module : but I want the currrent version!
HELP!
Attachment(s):
Capture d’écran 2011-12-09 à 11.13.51.png
Hi Bernard,
Please try 'File | Invalidate Caches'.
Provide minimal but complete standalone project that illustrates the problem if the above doesn't help.
Denis
thanks for replying so quickly
but does not work
the problem is that it is not a standalone project but a big combination of 25 modules!
happily the current module is depending on only 2 other modules
--------------------------------------------------------- cuurent pom.xml
<parent>
<groupId>org.lsst</groupId>
<artifactId>org-lsst-ccs</artifactId>
<version>1.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org-lsst-ccs-core</artifactId>
<packaging>jar</packaging>
<groupId>org.lsst</groupId>
<version>1.2-SNAPSHOT</version>
---- later in dependencies
<dependency>
<groupId>org.lsst</groupId>
<artifactId>org-lsst-ccs-utilities</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
----------------------------------------------------- utilities pom.xml
<parent>
<groupId>org.lsst</groupId>
<artifactId>org-lsst-ccs</artifactId>
<version>1.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org-lsst-ccs-utilities</artifactId>
<packaging>jar</packaging>
<groupId>org.lsst</groupId>
<version>1.1-SNAPSHOT</version>
-- no other module dependency
----------------------------------------------------------
stuck
thanks
The problem is that I've checked that the problem is not reproduced at local environment. And we can't go further if we are unable to reproduce it.
Can you try to work out minimal but complete standalone project that illustrates the problem?
Denis
since our project is open source I can send you a whole BIG zip
(but not through the forum here)
I suspect something stupid I did somewhere (but not obvious to me ... ;))
is that ok?
thanks
Sure. You can upload it to our ftp - ftp://ftp.intellij.net/.uploads/
Also I can just download it if you provide the link.
Denis
ok I put it under name ccs_project.zip
so the "culprit" id moduel org-lsst-ccs-core
thanks
Sorry but I don't see your IntelliJ IDEA project config there ('.idea' directory).
Denis
oops! sent another zip containing the .idea of the project
thanks
So, is it expected that ccs_project.zip at ftp://ftp.intellij.net/.uploads/ should contain IJ project files? I'm asking because I still don't see them there.
Denis
>> "So, is it expected that ccs_project.zip at ftp://ftp.intellij.net/.uploads/ should contain IJ project files? I'm asking because I still don't see them there."
well yes ... what do you call "project files" more precisely?
this is a complete copy of the files I use under the project directory (I just forgot the .idea because it did not showed up when listing my project directory -oops!-)
at first level there are all the modules that are in the project and so on ....
I suppose zip has copied all the ".something" hidden directories ....(it is supposed to do it)
Yes, I was talking about '.idea' directory. Don't see it at the archive.
It's required because the problem seems to be related to the particular project setup, so, I need to examine it.
Denis
the .idea is in a separate zip "idea-lsst.zip"
Sorry but I was unable to reproduce the problem.
The project opens and target file is ok:
Denis
first thanks a lot for trying! Intellij Support is first class!
---> alas the problem is still there on my machine (A Mac OSX by the way) ....
I downloaded latest version of IntelliJ idea just to get (may be) something different ... no way.
strange behaviour: when starting the editor shows exactly the same screeen as yours for 10 seconds ... then it turns red and I can't compile
I am stuck... will try harder to change things (a plugin problem?)
thanks again
edit: the overall behaviour is starting to get erratical:
I deleted all jars and .class
then started to rebuild the project -> impossible
direct commands by maven from the command line build the project correctly
then starting a test does not work (intelliJ failed to pass a correct argument to the classPath)
rebooted completely the machine: same test command -> ok, classPath correct!!!!
but still stick by inability to have correct edit/compile ..... strange.....
You can try to disable third-party plugins and try pure IJ installation.
Denis
disabled ALL plugins ; restarted -> same problem : the import is correct for 10 seconds then turns red.
reintroduced a limited list of plugins I need: subversion, maven, groovy, IDEAVIM
there is somewhere a gremlin in my machine ]:)
thanks
You can try to use the fresh config/system directory. Go to your $IJ_HOME/bin/idea.properties and define new paths for 'idea.config.path', 'idea.system.path', 'idea.plugins.path' properties.
Denis
>>>>> You can try to use the fresh config/system directory. Go to your $IJ_HOME/bin/idea.properties and define new paths for 'idea.config.path', 'idea.system.path', 'idea.plugins.path' properties.
apparently this idea.properties does not exist in my app directory version 11 (but does exist in version 10) ... what do I do, use version 10? version 11? copy properties from 10 to 11 ?
thanks
edit: BTW: the corresponding $HOME/.IntellIJ10 directory does not exist ....
Oh, sorry, the info I provided is for Linux/Win users.
Feel free to check this document for Mac configs setup.
Denis
went to those directories on the MAC then moved the contents, started again -> ok for longer (20 seconds) then red again!
there is some task somewhere (late in idea startup ) that disables the correct configuration ... will try again
edit: found something strange that could be a lead:
in the jars directory there has been a double generation!
org-lsst-ccs-core-1.0-SNAPSHOT.jar.7cff2ca2
org-lsst-ccs-core-1.1.jar.9dd505dc
so : is there an error somewhere that dictates to generate 2 different versions of the same module
and that confuses everything ?
the version of core should be 1.2 SNAPSHOT
so there may be other modules that ask for previous versions and that confuses the idea ...
(may be a lead?)
edit2: destroying everything in the MAC directories -> then starting again: starts with red, then black ok , regenerates everything and just at the end red again!
ther is a task that destroys configuration somewhere!
Can you please send me the idea.log file from your IDEA_SYSTEM_DIR/log directory?
attached Logs
NOTE: did a severe test on version 10: really removed everything in the directories (apparently I didn't do that exectly for version 11)
I had numerous problem for restarting version 10 (lost configuration) BUT now it did work!!!!
conclusion: so probably a focused removal of something will do the trick!
Attachment(s):
idea11logs.zip
tried again to empty every configuration and run again -> nothing
except this: (see screen copy attached)
- if the project is opened wrongly (first window!) then the code are ok
- if the project is opened properly (second window) then the code are not ok
something in the .idea directory ?
Attachment(s):
Capture d’écran 2011-12-12 à 15.52.42.png
What do you mean, "properly" and "wrongly"?
Do you mean you 've opened two projects at once?
>>
What do you mean, "properly" and "wrongly"?
Do you mean you 've opened two projects at once?
>>>
yes and no those are the same modules directories
the directories are organised thus :
Lsst
- CameraControl
-org-lsst-core
- trunk ....
if I open an Intellij Project I must be in "Lsst" -> module show properly (image 2) but do not compile properly
if I open IntelliJ Project in directory CameraControl -> modules do not show properly (image 1 : modules have names like MainXX) but do compile
why this is a mystery to me ....
(may be I should act on each .idea ???)
DOES WORK
I deleted the data in the .idea file
apparently the xml files describing the project were somewhat corrupted!
thanks a lot for your patience!!!!
this is long lived issues and in my 2018.1.1 i still have this issue open
I am developing Kotlin (for JVM), I dont know why we are choosing this, but with this we are restricted to intellij and cant use worlds best IDE eclipse, nevertheless
Deleting .idea and .iml! do we think these are the right solution? its a stupid workaround and wasting so much of time.
I hope to go back to java+eclipse soon, enough of kotlin+idea...
Hi, @Qualityking. Unlikely that your issue is caused by the the same problem as was reported long time ago. Can you provide a sample project to check? Where do you have classes which are red-highlighted in imports? Are they from project libraries or from the project source code (some or different module)? What is your OS?
Hi, I am facing a similar issue on my mac with intellij. I am using java and intellij is not able to resolve imports from the same module.