Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Editing Jar File Source Attachment
Editing Jar File Source Attachment [message #896646] Thu, 19 July 2012 09:35 Go to next message
Rob Apples is currently offline Rob ApplesFriend
Messages: 5
Registered: July 2012
Junior Member
Hi everybody,

I've had a long look and I can't find a definitive answer to what I'm looking for.

I've downloaded the Juno modelling package and want to edit some of the code in a jar in one of the plug-in dependencies. I can view the full .class code but can't edit it (presumably because it's a binary .class file and the package doesn't come with the associated source code).

... but on checking the properties of the jar file I can see that the Java Source Attachment is set as an External location .../.../ org.eclipse.gmf.runtime.diagram.ui.source_1.6.0.v20120514-1615.jar

So this is what I need to edit? How would I go about accessing the .java files? Can I import the jar file into my workspace to make the edits I need and then recompile my code so the .jar file picks up the changes?

Thanks,

Rob
Re: Editing Jar File Source Attachment [message #896682 is a reply to message #896646] Thu, 19 July 2012 11:22 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 26226
Registered: July 2009
Senior Member
Rob,

Comments below.

On 19/07/2012 11:35 AM, Rob Apples wrote:
> Hi everybody,
>
> I've had a long look and I can't find a definitive answer to what I'm
> looking for.
> I've downloaded the Juno modelling package and want to edit some of
> the code in a jar in one of the plug-in dependencies. I can view the
> full .class code but can't edit it (presumably because it's a binary
> .class file and the package doesn't come with the associated source
> code).
>
> .. but on checking the properties of the jar file I can see that the
> Java Source Attachment is set as an External location .../.../
> org.eclipse.gmf.runtime.diagram.ui.source_1.6.0.v20120514-1615.jar
>
> So this is what I need to edit?
Pretty much.
> How would I go about accessing the .java files? Can I import the jar
> file into my workspace to make the edits I need and then recompile my
> code so the .jar file picks up the changes?
You can use File->Import...Plug-in Development->Plug-ins and Fragments.
Be sure to change "Import As" to "Projects with source folders". Locate
the bundle you want to import; the filter is handy. This should produce
a project in your workspace with the source (as attached) for that
bundle. There can you make changes. If you launch a runtime Eclipse
development environment, your changed version of the bundle should be
active there.

You can use File->Export...->Plug-in Development->Deployable plug-ins
and fragments to package it up and put it in the drop-ins folder of your
Eclipse IDE installation so that it overrides the installed one; you
might have to increment the service version number.
>
> Thanks,
>
> Rob
Previous Topic:Proxy authentication always turns false
Next Topic: org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
Goto Forum:
  


Current Time: Wed Nov 26 21:44:13 GMT 2014

Powered by FUDForum. Page generated in 0.06564 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software