EDU-395 Hint window is empty if there is no available hint for current placeholder

This commit is contained in:
liana.bakradze
2015-09-06 11:57:08 +03:00
parent 32481293fd
commit 1a1a99e3db
@@ -61,7 +61,8 @@ public class StudyShowHintAction extends DumbAwareAction {
}
String hintText = ourWarningMessage;
if (answerPlaceholder != null) {
hintText = answerPlaceholder.getHint();
String hint = answerPlaceholder.getHint();
hintText = hint.isEmpty() ? HINT_NOT_AVAILABLE : hint;
}
int offset = editor.getDocument().getLineStartOffset(pos.line) + pos.column;
PsiElement element = file.findElementAt(offset);