Bug 256194 - New API requested for handling compare dialog's button selection
Summary: New API requested for handling compare dialog's button selection
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2008-11-22 02:16 EST by Remy Suen CLA
Modified: 2019-09-06 15:35 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2008-11-22 02:16:57 EST
I need to send someone over the network my copy of a file to get some help. This serialized message contains the toString() of an IPath and the file's String content itself. My friend receives it and a compare dialog should be opened on his side if his corresponding IResource for that IPath exists to compare the two copies. He should then be able to click 'OK' or 'Cancel' to choose to replace his copy or not.

I believe one of the following would be required:

1. Make CompareDialog API. This would obviously satisfy my use case because I can then do anything I want through subclassing or whatever.

2. Add a new method to CompareUI. Something like...

public static int openCompareDialog(CompareEditorInput)

...which returns the integer that's returned by CompareDialog's getReturnCode(). This would also be sufficient for me, I can just check whether it's equal to Window.OK or not.

3. Add a new method to CompareUI. Something like...

public static Dialog createCompareDialog(CompareEditorInput)

...which returns the currently internal CompareDialog, but hides the fact that it's internal. This really doesn't add much more than what 2 suggests beyond allowing the developer to choose when to create and/or open the dialog.

At the moment, I am working around this limitation by making my own Dialog subclass which simply calls CompareEditorInput's createContents(Composite) to populate the dialog.
Comment 1 Eclipse Webmaster CLA 2019-09-06 15:35:51 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.