fix can't read message for IDEA-121207

This commit is contained in:
Gregory.Shrago
2014-02-25 15:23:23 +04:00
parent 87ef851e5f
commit 0826b4a018
@@ -105,10 +105,15 @@ public class TipUIUtil {
}
}
private static void setCantReadText(JEditorPane browser, TipAndTrickBean missingFile) {
private static void setCantReadText(JEditorPane browser, TipAndTrickBean bean) {
try {
browser.read(new StringReader(
IdeBundle.message("error.unable.to.read.tip.of.the.day", missingFile, ApplicationNamesInfo.getInstance().getFullProductName())), null);
String plugin = getPoweredByText(bean);
String product = ApplicationNamesInfo.getInstance().getFullProductName();
if (!plugin.isEmpty()) {
product += " and " + plugin + " plugin";
}
String message = IdeBundle.message("error.unable.to.read.tip.of.the.day", bean.getFileName(), product);
browser.read(new StringReader(message), null);
}
catch (IOException ignored) {
}