|
|
|
|
Re: [Compare Editor] DiffViewer doesn't refresh with custom CompareEditorInput [message #335463 is a reply to message #335451] |
Thu, 09 April 2009 13:08 |
Michael Valenta Messages: 35 Registered: July 2009 |
Member |
|
|
Shankar,
I am no longer involved in the maintenance of the Compare framework so I
cannot make any statements about when features may be available. Also, I
do not know of any way currently for you to realize live updates. The
best way to get a response from the Compare developers would be to open
a bug report.
Michael
Shankar wrote:
> Thanks for the prompt response, Michael. It seems like a common use case
> to be able to invoke the eclipse compare editor programmatically (from a
> custom plug-in) and make changes to the compare editor. Is there any way
> I can realize the live difference update in the compare editor?
> Can you please let me know when this feature would be available? Please
> note that I am using Eclipse 3.3.
>
> Michael Valenta wrote:
>
>> Shankar,
>
>> I don't believe that the compare framework supports "live" difference
>> update when changes are made in an editor. I believe you need to save
>> the editor to have the diff recomputed. I seem to recall that there
>> were already bugs entered for this so you may want to search in bugzilla.
>
>> In regards to the hard-coded reference to
>> ResourceCompareInput.MyDiffNode, I belivee this is a hack to make the
>> Compare with/Each Other work when performed on folders. There are
>> already bugs for that as well.
>
>> Michael
>
>> Shankar wrote:
>>> Would appreciate any help on the below. Am really stuck - the diff
>>> viewer in the compare editor doesn't refresh due to the instanceof
>>> check (hard-coded to ResourceCompareInput.MyDiffNode). However, I
>>> provide my own compare input. Any thoughts please?
>>>
>>> Shankar wrote:
>>>
>>>> Hello,
>>>
>>>> I need to provide a custom CompareEditorInput to the compare editor.
>>>> I created left and right inputs that implements ITypedElement,
>>>> IStreamContentAccessor and IEditableContent. In the prepareInput
>>>> method of the custom CompareEditorInput, these left and right inputs
>>>> are used as left and right sides of a DiffNode. I am able to
>>>> successfully open the editor. However, the diff viewer in the
>>>> compare editor doesn't refresh (doesn't show the differences) when
>>>> changes are made in the editor.
>>>
>>>> I looked at the source code and I believe the reason is due to the
>>>> contents not being flushed to the input elements via the content
>>>> provider in ContentMergeViewer. This is due to the instanceof check
>>>> done for the diff node. The check is made against
>>>> ResourceCompareInput.MyDiffNode in the saveLeftContent and
>>>> saveRightContent methods in MergeViewerContentProvider and the
>>>> fireChange method is never called.
>>>
>>>> fireChange is never called from saveLeftContent method
>>>> saveRightContent methods in MergeViewerContentProvider due to below
>>>> instanceof check
>>>> if (node instanceof ResourceCompareInput.MyDiffNode)
>>>> ((ResourceCompareInput.MyDiffNode)node).fireChange();
>>>
>>>> What is the best way to get around this issue? Is there a way I can
>>>> contribute my own provider?
>>>
>>>> Any help is greatly appreciated.
>>>
>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03218 seconds