type here as default placeholder text
authorLiana.Bakradze <liana.bakradze@jetbrains.com>
Thu, 10 Nov 2016 15:44:31 +0000 (18:44 +0300)
committerliana.bakradze <liana.bakradze@jetbrains.com>
Thu, 17 Nov 2016 14:08:42 +0000 (17:08 +0300)
python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCAddAnswerPlaceholder.java

index b4ca4accdc8b2b1911e370f57f4a73c410705e27..2d6faf38ded845c761f8d5308f38ad4170380db8 100644 (file)
@@ -181,7 +181,8 @@ public class CCAddAnswerPlaceholder extends CCAnswerPlaceholderAction {
   }
 
   protected CCCreateAnswerPlaceholderDialog createDialog(Project project, AnswerPlaceholder answerPlaceholder) {
-    return new CCCreateAnswerPlaceholderDialog(project, StringUtil.notNullize(answerPlaceholder.getTaskText()),
+    String answerPlaceholderText = StringUtil.notNullize(answerPlaceholder.getTaskText());
+    return new CCCreateAnswerPlaceholderDialog(project, answerPlaceholderText.isEmpty() ? "type here" : answerPlaceholderText,
                                                answerPlaceholder.getHints());
   }
 }
\ No newline at end of file