Revision 170f6932
Added by Katja Luther almost 4 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/handler/MergeGroupHandlerE4.java | ||
---|---|---|
52 | 52 |
Set<CdmBase> mergedCandidates = new HashSet<>(); |
53 | 53 |
|
54 | 54 |
if(editor.isDirty()){ |
55 |
boolean proceed = MessageDialog.openQuestion(null, |
|
56 |
"Save changes", "You have made changes that must be saved before this query can be executed. Would you like to proceed?"); |
|
57 |
if (proceed) { |
|
58 |
BulkEditorQuery lastQuery = editor.getLastQuery(); |
|
59 |
editor.setLastQuery(null); |
|
60 |
editor.save(new NullProgressMonitor(), true); |
|
61 |
editor.setLastQuery(lastQuery); |
|
62 |
} else { |
|
63 |
return ; |
|
55 |
String[] labels = {"Save Changes", "Continue Without Saving", "Cancel"}; |
|
56 |
|
|
57 |
MessageDialog dialog = new MessageDialog(null, "Save changes", null, "You have made changes that must be saved before this query can be executed. Would you like to proceed?", |
|
58 |
MessageDialog.QUESTION_WITH_CANCEL, 0, labels); |
|
59 |
dialog.open(); |
|
60 |
int proceed = dialog.getReturnCode(); |
|
61 |
|
|
62 |
boolean save = false; |
|
63 |
if (proceed == 0) { |
|
64 |
save = true; |
|
65 |
} else if (proceed == 2){ |
|
66 |
return; |
|
64 | 67 |
} |
68 |
BulkEditorQuery lastQuery = editor.getLastQuery(); |
|
69 |
editor.setLastQuery(null); |
|
70 |
editor.save(new NullProgressMonitor(), save); |
|
71 |
editor.setLastQuery(lastQuery); |
|
65 | 72 |
} |
66 | 73 |
|
67 | 74 |
// Check whether there are any group annotations |
Also available in: Unified diff
fix #8969: add third button for continue without saving