Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Majewski2018-11-07 14:27:02 -0500
committerLars Vogel2018-11-08 09:58:11 -0500
commitbb585c8e491a149458dd733ba52c50721fa20e39 (patch)
tree4bd0ae4d5424c90ae996c9f182edee78df3f070d /org.eclipse.ui.workbench.texteditor
parent6a5ee7545b2018fece5e4b4ee8b2d1879c7275c5 (diff)
downloadeclipse.platform.text-bb585c8e491a149458dd733ba52c50721fa20e39.tar.gz
eclipse.platform.text-bb585c8e491a149458dd733ba52c50721fa20e39.tar.xz
eclipse.platform.text-bb585c8e491a149458dd733ba52c50721fa20e39.zip
Change-Id: I3519140064c2dbae9692d151fb88f75ff5fd19d5 Signed-off-by: Mike Majewski <mike.majewski@email.de>
Diffstat (limited to 'org.eclipse.ui.workbench.texteditor')
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java5
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties3
3 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index aae59d3e5..ce86a6c82 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -4707,8 +4707,9 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
title= EditorMessages.Editor_error_activated_outofsync_title;
msg= NLSUtility.format(EditorMessages.Editor_error_activated_outofsync_message, inputName);
- if (MessageDialog.openQuestion(shell, title, msg)) {
-
+ if (MessageDialog.open(MessageDialog.QUESTION, shell, title, msg, SWT.NONE,
+ new String[] { EditorMessages.Editor_error_replace_button_label,
+ EditorMessages.Editor_error_dontreplace_button_label }) == 0) {
try {
if (provider instanceof IDocumentProviderExtension) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java
index f838ac1af..d355d95d7 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java
@@ -52,6 +52,8 @@ final class EditorMessages extends NLS {
public static String Editor_error_save_outofsync_message;
public static String Editor_error_activated_outofsync_title;
public static String Editor_error_activated_outofsync_message;
+ public static String Editor_error_replace_button_label;
+ public static String Editor_error_dontreplace_button_label;
public static String Editor_error_activated_deleted_save_title;
public static String Editor_error_activated_deleted_save_message;
public static String Editor_error_activated_deleted_save_button_save;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
index 75d358a01..908aed6df 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
@@ -31,6 +31,9 @@ Editor_error_save_outofsync_message=The file ''{0}'' has been changed on the fil
Editor_error_activated_outofsync_title=File Changed
Editor_error_activated_outofsync_message=The file ''{0}'' has been changed on the file system. Do you want to replace the editor contents with these changes?
+Editor_error_replace_button_label=&Replace
+Editor_error_dontreplace_button_label=&Do not replace
+
Editor_error_activated_deleted_save_title=File Not Accessible
Editor_error_activated_deleted_save_message=The file ''{0}'' has been deleted or is not accessible. Do you want to save your changes or close the editor without saving?
Editor_error_activated_deleted_save_button_save=Save

Back to the top