diff options
author | Tor Norbye <tnorbye@google.com> | 2014-09-18 11:43:07 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-09-18 11:43:28 -0700 |
commit | e782c57d74000722f9db4c9426317410520670c6 (patch) | |
tree | 6e5d3e8934107ffabb7661f8bfc0e1a08eb37faf /python/edu/course-creator/src/org/jetbrains/plugins/coursecreator/format/TaskWindow.java | |
parent | c3d3a90f6b4ead083d63e28e6b9fcea93d675678 (diff) | |
download | idea-e782c57d74000722f9db4c9426317410520670c6.tar.gz |
Snapshot idea/138.2210 from git://git.jetbrains.org/idea/community.git
Change-Id: I8f0204d7887ee78cf1fd8c09f936c5afff0edd2f
Diffstat (limited to 'python/edu/course-creator/src/org/jetbrains/plugins/coursecreator/format/TaskWindow.java')
-rw-r--r-- | python/edu/course-creator/src/org/jetbrains/plugins/coursecreator/format/TaskWindow.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/python/edu/course-creator/src/org/jetbrains/plugins/coursecreator/format/TaskWindow.java b/python/edu/course-creator/src/org/jetbrains/plugins/coursecreator/format/TaskWindow.java index cb6418ec75d7..6b1be7ef3e7d 100644 --- a/python/edu/course-creator/src/org/jetbrains/plugins/coursecreator/format/TaskWindow.java +++ b/python/edu/course-creator/src/org/jetbrains/plugins/coursecreator/format/TaskWindow.java @@ -68,16 +68,17 @@ public class TaskWindow implements Comparable{ } } - public void drawHighlighter(@NotNull final Editor editor) { + public void drawHighlighter(@NotNull final Editor editor, boolean useLength) { int startOffset = editor.getDocument().getLineStartOffset(line) + start; - int endOffset = startOffset + myReplacementLength; + int highlighterLength = useLength ? length : myReplacementLength; + int endOffset = startOffset + highlighterLength; TextAttributes defaultTestAttributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(EditorColors.LIVE_TEMPLATE_ATTRIBUTES); RangeHighlighter highlighter = editor.getMarkupModel().addRangeHighlighter(startOffset, endOffset, HighlighterLayer.LAST + 1, defaultTestAttributes, HighlighterTargetArea.EXACT_RANGE); highlighter.setGreedyToLeft(true); - highlighter.setGreedyToRight(true); + highlighter.setGreedyToRight(false); } public int getIndex() { @@ -123,10 +124,6 @@ public class TaskWindow implements Comparable{ return lineDiff; } - public String getPossibleAnswer() { - return possible_answer; - } - public int getLength() { return length; } |