Paul Tomblin
Paul Tomblin

Reputation: 182782

Project in Eclipse that builds a jar used by another project in Eclipse

I have several projects open in Eclipse. One of them is the main app, and others build jars used by that main app. How do I make it so that when I hit F3 on a method call in the main app that it takes me to the source in the other project instead of taking me to the class file in the Libraries list? I got it so that it shows me the source, but I can't actually edit it like it could if I go to the other project, and similarly when I step through in the debugger it doesn't go into the editable code.

I don't know if it's relevant, but we're using Maven to handle the dependencies.

I know this should be simple, but I haven't found the option.

Upvotes: 2

Views: 1110

Answers (2)

Rob Heiser
Rob Heiser

Reputation: 2862

Instead of including the other projects' jars in the main app on its library path, include the projects as dependencies in the "Projects" tab inside the Project Properties dialog.

Upvotes: 3

Pablo Santa Cruz
Pablo Santa Cruz

Reputation: 181280

If you right-click the JAR file on your main project, you can use "Attach Source" option to use F3 to navigate to methods when needed.

Upvotes: 0

Related Questions