Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » ICompilationUnit reconcile() behavior
ICompilationUnit reconcile() behavior [message #714937] Thu, 11 August 2011 19:58 Go to next message
tkordemon is currently offline tkordemonFriend
Messages: 1
Registered: August 2011
Junior Member
I tried to make the title pretty exact to what I'm talking about. I've been throwing a project together which now requires me to reconcile two separate versions of source code. I understand ICompilationUnit wasn't really designed to reconcile different files, but through some magic(passing the new source code to a ReplaceEdit and applying to a WorkingCopy), I have gotten reconcile to work. My only problem is that the output from reconciling seems to simply be the new source code, with no changes added from the old code. This leads me to my point, what is the behavior of the CompilationUnit's reconcile method. Does it ignore methods, fields, etc. that exist in the old version and not the new? Does it check matching methods' bodies? Any help/information would be appreciated, and again, my code's not breaking, I simply want to clarify how this method works. Thanks.
Re: ICompilationUnit reconcile() behavior [message #715083 is a reply to message #714937] Fri, 12 August 2011 10:06 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 11.08.2011 21:58, tkordemon wrote:
> I tried to make the title pretty exact to what I'm talking about.
> I've been throwing a project together which now requires me to
> reconcile two separate versions of source code. I understand
> ICompilationUnit wasn't really designed to reconcile different files,
> but through some magic(passing the new source code to a ReplaceEdit
> and applying to a WorkingCopy), I have gotten reconcile to work. My
> only problem is that the output from reconciling seems to simply be
> the new source code, with no changes added from the old code. This
> leads me to my point, what is the behavior of the CompilationUnit's
> reconcile method. Does it ignore methods, fields, etc. that exist in
> the old version and not the new? Does it check matching methods'
> bodies? Any help/information would be appreciated, and again, my
> code's not breaking, I simply want to clarify how this method works.
> Thanks.
The reconcile method is there to update the Java model based on the
source and not the other way around.

Dani
Previous Topic:(no subject)
Next Topic:Rename class in Java editor
Goto Forum:
  


Current Time: Sun May 12 10:31:52 GMT 2024

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

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

Back to the top