I have a project A in eclipse whose code is compiled into a jar and used by a separate project B. I have associated the jar to the workspace project A code. When I run project B I get stack trace on the console which references the jar. When clicking on the references the correct file opens up from project A but as read only, I want to edit this file and fix my code. What I end up doing is open the file manually using search typing the name or navigating to it in the package explorer and then edit it. I mean file is there in the project in my workspace, why is it not editable? Is there any way around it?
To open a Java file of project A with the Java Editor (editable) instead of with the Java Class Viewer (read-only) when you are in your project B, you have to do the following:
I would recommend convert project A to a plug-in project. A plug-in JAR can be used in both, a plain Java and an OSGi application. The code would be more modular and changes in project A would not require a JAR file to be updated in project B.