Problem understanding how to attach source code

I'm having difficulty understanding what I was hoping would be a simple concept. I have a project and simply want to add the source code found in another project. (The other project's jar is already part of my existing project). I simply want to set up some global libraries of the source code for some of my existing projects.

Under the global libraries section I've set up a library source module and I pointed it to the top level src directory in my other project. I also see this global library module in my current project's module dependencies section. However, whenever I try to jump to a method that would be contained in the source of this other project, I'm brought to the class representation that idea provides by default - not the source. Any ideas what am I doing wrong?

(Using Beta6 #5646)

(Side note, Also, if you are in the project structure dialog and you right click on global libraries and click "add" - you have options to 'add global library" and "add project library" - however, when go to add a global library, you are prompted about adding "classes." Shouldn't you have the option at that point of what you want to add (classes, source?). You have to create one with classes and then edit it to provide the source and remove the classes. (Also, why does it say "add project library" when your right click on the global libraries option and click "add" ? Shouldn't it only provide "add project library" for when you right-click on the project library section?)

2 comments
Comment actions Permalink

If I understand you right you already added the other projects jar as a module dependency and now you created a global library containing only the sources. If that's the case then remove the jar from the module dependencies, attach it to your global library, and add the global library to your module dependencies.

0
Comment actions Permalink

Thanks that worked. A bit confusing though. I don't think I'd be the only one to get tripped up by that.

0

Please sign in to leave a comment.