Hamcrest source code osgi bundle

10 views
Skip to first unread message

Jim Wang

unread,
Apr 24, 2018, 2:30:40 PM4/24/18
to Hamcrest Developers
Hello, 

I am totally new to osgi and have only just worked out how to import hamcrest (org.hamcrest.library) into my project.  However now I want to see the source code but have no idea where to find it (or even if its available).  

I'm hoping those in this group have faced a similar task in the past and can point me in the right direction.

Thanks,
Jim

John Patrick

unread,
Apr 24, 2018, 3:18:02 PM4/24/18
to hamcre...@googlegroups.com
i googled “hamcrest source code” and the 1st link for me was the github repo... maybe start their

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Hamcrest Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hamcrest-dev...@googlegroups.com.
To post to this group, send email to hamcre...@googlegroups.com.
Visit this group at https://groups.google.com/group/hamcrest-dev.
For more options, visit https://groups.google.com/d/optout.

Jim Wang

unread,
Apr 26, 2018, 8:58:12 AM4/26/18
to Hamcrest Developers
You are totally right. And I should have been more specific in my question.

Attempt 2: Is there a way for *eclipse* to find the source code associated with the dependency?  

From what I have read, if Eclipse-SourceBundle were defined in the MANIFEST.MF of the Hamcrest bundle, then eclipse should/could have taken care of retrieving and attaching the source code. Is this understanding correct?

If yes, then does there exist a 'source bundle' (is the correct term?) that I can add into my project's target platform such that eclipse can retrieve and attach?

Context: When I work on Maven projects in Intellij, Intellij is able to retrieve and attach the appropriate source code.  I presume it finds the source jar for a co-ordinate, downloads it and makes it available in the IDE. I'm wondering if there is something similar for osgi and eclipse. 

John Patrick

unread,
Apr 26, 2018, 9:32:43 AM4/26/18
to hamcre...@googlegroups.com
If your using eclipse and maven, burried somewhere in eclipse is a
check box and it will attempt to automatically download source for any
jar dependency your project has. The same is true for javadoc.

If your managing your eclipse project manually or with another tool
then it's a manual process.

You might try here
https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.hamcrest%22%20AND%20a%3A%22hamcrest-core%22

IntelliJ also has this feature and I'm sure Netbeans does too.

If manual, find the jar in the dependency section, then right click
and you can associate with javadoc or source code. Then when debugging
and stepping thought code or following source code it will show you
the source code instead of a decompiled version.

Not used eclipse for ~4 years but used it for 5 years before then so
it might have changed slightly but the option is avaliable.
Reply all
Reply to author
Forward
0 new messages