How to add source attachments to jar files from Eclipse Target Platform / Plug-in Dependencies

For eclipse users who are debugging the following message might be familiar:

The JAR of this class file belongs to container ‚Plug-in Dependencies‘ which does not allow modifications to source attachments on its entries.

This always happens when Eclipse cannot find the source code for a plugin bundle which is part of your target platform but the target platform does not contain a accordant source bundle. This for example happend to me today with the embedded Jetty (org.mortbay.jetty_5.1.14.v200806031611.jar) inside the Eclipse Equinox OSGI platform which makes up my target platform.

When debugged and wanted to go into any class inside a jetty package I always got the message that it is a class from Plugin-Dependencies and the source attachment cannot be modified.

I solved it like this:

  1. Switch to the Plugins View in Eclipse ( Window / Show View / Plugins)
  2. locate the bundle org.mortbay.jetty
  3. right click on that bundle and select „Import as“ -> „Binary Project with linked content“

Now that Bundle shows up in your Package Explorer as a new Eclipse project, in my caseorg.mortbay.jetty.

Now right click on that new project in the package explorer and goto ‚Properties / Java Build Path / Libraries‘. You see the the jetty jar file there and if you expand this entry you can edit the ‚Source Attachment‘ as usual. I pointed it to the downloaded Jetty Source code located in a completely different folder than my target platform which I am using for my project.

Have posted this answer also here on Stackoverflow.

Dieser Beitrag wurde unter Allgemein veröffentlicht. Setze ein Lesezeichen auf den Permalink.

41 Antworten auf How to add source attachments to jar files from Eclipse Target Platform / Plug-in Dependencies

  1. Pingback: casinos

  2. herve sagt:

    Thanks for your wonderfull article !
    I use eclipse for years and it was always a battle for add source of swt functions (and others). Sometimes I succeeded to do it after a lot of unsucessfull attempts but I never understand how I did it among my too many attempts !
    For the first time, I find in your article the solution within 3 lines and 1 attempts : amazing !
    To help other users, 2 tiny issues respect to your article :
    – first line : „Switch to the Plug-ins View in Eclipse ( Window / Show View / Plug-ins)“ and not „Plugins“
    – I didn’t get directly the source when debugging, but it made appear the button „attach source files“ which was not available on swt java files before your manipulation. So I clicked on this button, attach the file I got for a long time (but I didn’t succeed to use before), and it went well after that !!!
    Thanks a lot again,

  3. *Youre so cool! I dont suppose Ive read anything like this before. So nice to find somebody with some original thoughts on this subject. realy thank you for starting this up. this website is something that is needed on the web, someone with a little originality. useful job for bringing something new to the internet!

  4. AwBklCRt sagt:

    803113 20953Read more on that great Post, I linked to you Thank you. 608773

  5. 935816 854930The specific New york Diet can be an highly affordable and versatile eating greater tool built for time expecting to loose fat along with naturally maintain a healthful everyday life. la weight loss 503981

  6. roll-up sagt:

    361375 395977If I should say something, then nothing will stop the chatter within 481838

  7. 858849 177202I got what you mean , saved to my bookmarks , very good site . 253309

  8. 907110 4362Whoah this blog is magnificent i genuinely like reading your articles. Keep up the excellent paintings! You realize, a lot of persons are searching round for this data, you could aid them greatly. 218483

  9. 440170 589364woah i like yur site. It actually helped me with the info i wus seeking for. thank you, will save. 22117

  10. cittadinanza sagt:

    90530 541839Made to measure curtains […]check out the sites listed below, worth a read for interiors and rugs enthusiasts[…] 631143

  11. 471258 710138I saw two other comparable posts although yours was the most beneficial so a whole lot 516218

  12. 509862 404703Having read this I thought it was extremely informative. I appreciate you taking the time and effort to put this article together. I once once more find myself spending method to significantly time both reading and commenting. But so what, it was nonetheless worth it! 19575

  13. sko DK sagt:

    39709 252040We offer the best practical and most applicable solutions. All our Sydney plumbers are experienced and qualified and are able to rapidly assess your difficulty and discover the best answer. 596654

  14. 272927 731447I dont normally look at these types of websites (Im a pretty modest person) – but even though I was a bit shocked as I was reading, I was undoubtedly a bit excited as nicely. Thanks for producing my day 452694

  15. 735015 9240cleaning supplies ought to have earth friendly organic ingredients so that they do not harm the environment 729348

  16. 820271 509055I adore your wp internet template, wherever would you obtain it through? 697532

  17. 224959 445536An intriguing discussion will be worth comment. I believe that you can write read much more about this subject, may possibly well definitely be a taboo subject but generally folks are inadequate to chat on such topics. To a higher. Cheers 71850

  18. 762905 462735Normally I do not learn post on blogs, even so I would like to say that this write-up extremely pressured me to look at and do so! Your writing style has been surprised me. Thank you, quite fantastic post. 904358

  19. 53141 479911Most appropriate the human race messages work to show your and present exclusive chance with unique couple. Beginer appear system in advance of raucous men and women will most likely always be aware most of the golden value off presentation, which is a persons truck. greatest man jokes 808189

  20. 671528 531356Music started playing anytime I opened this internet site, so annoying! 271849

  21. 43145 834094I always was concerned in this subject and stock nonetheless am, regards for posting . 180405

  22. 444746 564193I discovered your weblog web site internet site on google and appearance some of your early posts. Preserve up the excellent operate. I just extra increase Feed to my MSN News Reader. Searching for toward reading far a lot more by you later on! 801966

  23. 124529 153142Fairly uncommon. Is likely to appreciate it for men and women who include community forums or anything, internet site theme . a tones way for the client to communicate. Outstanding job.. 949250

  24. 724732 700248I feel other site owners need to take this site as an model, really clean and superb user genial design and style . 683993

  25. 673430 86998Seriously very excellent contribution, I actually depend on up-dates of your stuff. 234013

  26. 731222 450748Music began playing any time I opened this web site, so frustrating! 209330

  27. 114468 947348Black Ops Zombies […]some men and women nonetheless have not played this game. It is hard to picture or believe, but yes, some men and women are missing out on all of the fun.[…] 749800

  28. 287248 37639Hey this really is kinda of off subject but I was wanting to know if blogs use WYSIWYG editors or in the event you have to manually code with HTML. Im starting a blog soon but have no coding experience so I wanted to get advice from someone with experience. Any assist would be greatly appreciated! 289825

  29. 194791 303524I recognize theres lots of spam on this site. Do you require support cleansing them up? I may support among courses! 522925

  30. 787380 369288I adore foregathering useful info , this post has got me even far more information! . 184274

  31. 701384 958935bmmzyfixtirh cheapest phentermine zero health expert prescribed qrdzoumve buy phentermine diet pill iixqnjouukkebr 484048

  32. 742804 799149I like this weblog its a master peace ! Glad I observed this on google . 300931

  33. 658799 213678This website is often a walk-through like the info you wanted in regards to this and didnt know who to question. Glimpse here, and you will certainly discover it. 278300

  34. 977751 957153Hi there! Great post! Please do tell us when I could see a follow up! 81815

  35. 293056 632297You produced some very first rate factors there. I seemed on the internet for the difficulty and located many people will go along with together with your website. 581152

  36. 3721 225432Some truly nice stuff on this internet web site , I like it. 740705

  37. 490685 799000Intriguing post. Positive that Ill come back here. Good function. 168688

  38. 750300 494378I got what you mean , saved to my bookmarks , extremely good site . 678633

  39. 751787 997105Excellent help from this weblog! Thanks alot for the data I necessary 35775

  40. 575432 273628As soon as I detected this internet website I went on reddit to share some with the enjoy with them. 489833

  41. 743815 925821Spot lets start work on this write-up, I in fact believe this remarkable website requirements additional consideration. Ill far more likely be once once again you just read additional, thank you that data. 279858

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.