I have improrted a module with some libraries from Eclipse.
I have attached sources to the libraries.
I have copied a class from one of the libraries to the imported project.
I have modified one method of the class.
I have created a new module which depends on the imported project.
I have added the libraries from the imported module to the dependency list of the testing module below the imported module.
I have created testing class which calls some methods in the imported module.
I have launched the testing code.
The run has failed and one of stacktrace items pointed to the modified method.
I clicked the link in the stacktrace item but the original class from library was opened instead of the modified class.
I can access the relevant code using workaround as follows:
Ctrl-N -> Name of the class from the stacktrace
Ctrl-G -> line from the stacktrace
Then the correct source code is opened.
Note:
Such configuration is typical for my style of work. I have project with core libraries and with libraries comming from nightly builds. I check out from our repository only files which will be modified. My testing code is in a separate module dependent on the main module. Then I am facing similar discrepancies quite often. It looks like discrepancy between order of modules/libraries in classpath and order of modules/libraries used for browsing code which occurs in some specific circumstances.
The issue 18092 is closed but I think it really should be solved. The issue is caused by incorrect evaluation inside IDEA. From some point of view the current approach seems to be OK but from my point of view it is completely wrong. Any software works properly if the implementation satisfactorily models reality. In this case I can see a big gap as the internal IDEA representation of classes does not reflect classpath settings. The fact that I use classes in a bit different way than it is usual does not justify incorrectness of your approach.
I am facing annoyances caused by this issue quite often.