Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » strategies for editing external source
strategies for editing external source [message #172246] Sat, 23 September 2006 16:40 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 143
Registered: July 2009
Senior Member
Eclipse 3.2, JDK 1.4.2.

I needed to debug a problem in the Hibernate portion of my application, so
I edited my library definition for Hibernate 3.0.5 to include the source
folder for it. I was able to step into the Hibernate code and get some
idea of what was happening.

Now, I'd like to be able to add some debugging statements to the Hibernate
source, and build it from the command line (the Hibernate distro can be
built from the source).

So, I went to the window that was showing the Hibernate class I wanted to
edit (that I had just stepped through in the debugger) and started typing.
Nothing. Eclipse appears to treat this as read-only. This is certainly
a good default. However, you'd think there'd be some way to override it.
I can't find it.

I'm considering adding it as a "linked source" folder, but won't that then
try to compile it? The build of my application is done outside of
Eclipse, so perhaps that isn't a fatal problem.

What are reasonable strategies to be able to do what I want?
Re: strategies for editing external source [message #172633 is a reply to message #172246] Wed, 27 September 2006 00:31 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse4.rizzoweb.com

David Karr wrote:
> Eclipse 3.2, JDK 1.4.2.
>
> I needed to debug a problem in the Hibernate portion of my application,
> so I edited my library definition for Hibernate 3.0.5 to include the
> source folder for it. I was able to step into the Hibernate code and
> get some idea of what was happening.
>
> Now, I'd like to be able to add some debugging statements to the
> Hibernate source, and build it from the command line (the Hibernate
> distro can be built from the source).
>
> So, I went to the window that was showing the Hibernate class I wanted
> to edit (that I had just stepped through in the debugger) and started
> typing. Nothing. Eclipse appears to treat this as read-only. This is
> certainly a good default. However, you'd think there'd be some way to
> override it. I can't find it.

It's because the source of Hibernate is not a citizen of a Java project.
Eclipse is just being convenient by showing you the source, because the
library is really a JAR.

> I'm considering adding it as a "linked source" folder, but won't that
> then try to compile it? The build of my application is done outside of
> Eclipse, so perhaps that isn't a fatal problem.
>
> What are reasonable strategies to be able to do what I want?

You could make it a linked folder to your application project, but that
is probably going to create more headaches. What I would do (have done,
in fact, with a different third-party library) is to create a separate
project for that library's source code, and import it (or use a linked
folder). Then you can configure that project's build path and compile
options so that you can effectively edit the code and run the Ant script
to build it into a new JAR.
You'll either have to copy your modified JAR over into your own app, or
make your app project depend on the Hibernate project instead of the
Hibernate distrib JAR.

--
Hope this helps,
Eric
Previous Topic:Adding Buttons on Toolbar
Next Topic:configuring build path with system variables
Goto Forum:
  


Current Time: Fri Apr 19 18:48:48 GMT 2024

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

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

Back to the top