ICompilationUnit reconcile() behavior [message #714937] |
Thu, 11 August 2011 19:58  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02336 seconds