Andreas Pakulat
2017-08-09 14:51:41 UTC
Hi,
I'm including a thirdparty jar file in my Eclipse plugin. Currently I'm doing
this by simply copying the jar into the plugin and adding it as a Runtime
class path entry in the plugin meta information. This works fine, but the jar
lacks source code, so stepping into that code is not possible. I do have the
source code though and I can manually connect the jar with the local
directory on disk. This however stores a local path in the plugin project
which is not really a good idea on a shared project. The alternative of using
a workspace path would work, but require that I also place the source code
into the plugin and version control it which I find a little ugly.
I thought I could leverage the Eclipse source bundle support to let Tycho
build an eclipse plugin carrying the jar's and generate a source bundle that
carries the source code and allows Eclipse to make the connection between
class file and source 'automatically'.
Essentially I had an eclipse plugin which referrenced the jar files via
bin.includes and the source directories via src.includes. Then used
tycho-source-plugin to get a source plugin built out of that and assembled a
feature and p2 repository carrying both. However this did not work out,
Eclipse was not able to figure out the correct place of the sources.
Looking at the generated source plugin and some reading led me to believe
that the EclipseSourceBundle entry would require some different values for
the root=. part. This in turn let me find this old thread
https://dev.eclipse.org/mhonarc/lists/tycho-user/msg01991.html which suggests
this is not possible at the moment.
Is that still correct or am I overlooking something?
Andreas
I'm including a thirdparty jar file in my Eclipse plugin. Currently I'm doing
this by simply copying the jar into the plugin and adding it as a Runtime
class path entry in the plugin meta information. This works fine, but the jar
lacks source code, so stepping into that code is not possible. I do have the
source code though and I can manually connect the jar with the local
directory on disk. This however stores a local path in the plugin project
which is not really a good idea on a shared project. The alternative of using
a workspace path would work, but require that I also place the source code
into the plugin and version control it which I find a little ugly.
I thought I could leverage the Eclipse source bundle support to let Tycho
build an eclipse plugin carrying the jar's and generate a source bundle that
carries the source code and allows Eclipse to make the connection between
class file and source 'automatically'.
Essentially I had an eclipse plugin which referrenced the jar files via
bin.includes and the source directories via src.includes. Then used
tycho-source-plugin to get a source plugin built out of that and assembled a
feature and p2 repository carrying both. However this did not work out,
Eclipse was not able to figure out the correct place of the sources.
Looking at the generated source plugin and some reading led me to believe
that the EclipseSourceBundle entry would require some different values for
the root=. part. This in turn let me find this old thread
https://dev.eclipse.org/mhonarc/lists/tycho-user/msg01991.html which suggests
this is not possible at the moment.
Is that still correct or am I overlooking something?
Andreas
--
Andreas Pakulat ***@froglogic.com
froglogic GmbH - Automated UI and Web Testing
Andreas Pakulat ***@froglogic.com
froglogic GmbH - Automated UI and Web Testing