Bug 566550 - CompareUI.findContentViewer should return text compare viewer in TextEditChangePreviewViewer
Summary: CompareUI.findContentViewer should return text compare viewer in TextEditChan...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.17   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-01 08:22 EDT by Christopher Hendrich CLA
Modified: 2020-09-04 03:20 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Hendrich CLA 2020-09-01 08:22:11 EDT
When searching an replacing text via the file search dialog in Eclipse, the CompareViewer within the class TextEditChangePreviewViewer asks via "CompareUI.findContentViewer" for a matching compare viewer with respect to the underlying file. 

If you have a custom compare viewer registered for this file (since it is a structured, complex object that requires special treatment), the corresponding specific viewer will be used.
This viewer can - however - not work with text snippets. Therefore, the only meaningful compare viewer would be the generic text based one and this would make perfectly sense since we are in a text search and replace scenario. 

Is there any chance to force this class to use the generic text compare viewer for the search and replace preview?
Comment 1 Noopur Gupta CLA 2020-09-04 03:20:03 EDT
I think this should be handled in Platform Compare or Text to return the expected viewer via "CompareUI.findContentViewer".