diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/encoding/IncompatibleEncodingDialog.java b/platform/platform-impl/src/com/intellij/openapi/vfs/encoding/IncompatibleEncodingDialog.java index 9e56820e7350..3204f26057f7 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/encoding/IncompatibleEncodingDialog.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/encoding/IncompatibleEncodingDialog.java @@ -54,13 +54,20 @@ public class IncompatibleEncodingDialog extends DialogWrapper { protected JComponent createCenterPanel() { JLabel label = new JLabel(XmlStringUtil.wrapInHtml( "The encoding you've chosen ('" + charset.displayName() + "') may change the contents of '" + virtualFile.getName() + "'.
" + - "Do you want to reload the file from disk or
" + - "convert the text and save in the new encoding?")); + "Do you want to
" + + "1. Reload the file from disk in the new encoding '" + charset.displayName() + "'" + warning(safeToReload) + " or
" + + "2. Convert the text and save in the new encoding" + warning(safeToConvert) + "?")); label.setIcon(Messages.getQuestionIcon()); label.setIconTextGap(10); return label; } + @NotNull + private static String warning(@NotNull EncodingUtil.Magic8 isItSafe) { + return isItSafe == EncodingUtil.Magic8.ABSOLUTELY ? "" : + isItSafe == EncodingUtil.Magic8.WELL_IF_YOU_INSIST ? " (may change contents)" : " (contents will be changed)"; + } + @NotNull @Override protected Action[] createActions() {