From b6c4c34dfd4467798be178fbab2ec8be1ffa839e Mon Sep 17 00:00:00 2001 From: "Liana.Bakradze" Date: Wed, 26 Oct 2016 20:05:42 +0300 Subject: [PATCH] rename (fix for IDEA-CR-14348) --- .../edu/coursecreator/actions/CCHideFromStudent.java | 2 +- .../actions/placeholder/CCAddAnswerPlaceholder.java | 2 +- .../actions/placeholder/CCChangePlaceholderVisibility.java | 2 +- .../placeholder/CCDeleteAllAnswerPlaceholdersAction.java | 2 +- .../actions/placeholder/CCSubtaskPlaceholderAction.java | 4 ++-- .../testSrc/com/jetbrains/edu/coursecreator/CCTestCase.java | 2 +- .../student/src/com/jetbrains/edu/learning/StudyUtils.java | 2 +- .../edu/learning/actions/StudyRefreshTaskFileAction.java | 2 +- .../com/jetbrains/edu/learning/checker/StudyCheckUtils.java | 2 +- .../src/com/jetbrains/edu/learning/core/EduUtils.java | 6 +++--- .../edu/learning/editor/StudyEditorFactoryListener.java | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCHideFromStudent.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCHideFromStudent.java index 8d3100240063..b183eeda7b38 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCHideFromStudent.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCHideFromStudent.java @@ -64,7 +64,7 @@ public class CCHideFromStudent extends CCTaskFileActionBase { for (FileEditor fileEditor : FileEditorManager.getInstance(myProject).getEditors(myFile)) { if (fileEditor instanceof TextEditor) { Editor editor = ((TextEditor)fileEditor).getEditor(); - StudyUtils.drawAllWindows(editor, myTaskFile); + StudyUtils.drawAllAnswerPlaceholders(editor, myTaskFile); } } } diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCAddAnswerPlaceholder.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCAddAnswerPlaceholder.java index d36c5983a03f..b4ca4accdc8b 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCAddAnswerPlaceholder.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCAddAnswerPlaceholder.java @@ -101,7 +101,7 @@ public class CCAddAnswerPlaceholder extends CCAnswerPlaceholderAction { if (answerPlaceholders.contains(myPlaceholder)) { answerPlaceholders.remove(myPlaceholder); myEditor.getMarkupModel().removeAllHighlighters(); - StudyUtils.drawAllWindows(myEditor, myTaskFile); + StudyUtils.drawAllAnswerPlaceholders(myEditor, myTaskFile); EduAnswerPlaceholderPainter.createGuardedBlocks(myEditor, myTaskFile); } } diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCChangePlaceholderVisibility.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCChangePlaceholderVisibility.java index e8a038bb4b6e..9c56d0bd432c 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCChangePlaceholderVisibility.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCChangePlaceholderVisibility.java @@ -46,7 +46,7 @@ public abstract class CCChangePlaceholderVisibility extends CCAnswerPlaceholderA int length = isVisible() ? placeholder.getTaskText().length() : 0; placeholder.setLength(length); saveIndent(placeholder, state, !visible); - StudyUtils.drawAllWindows(state.getEditor(), state.getTaskFile()); + StudyUtils.drawAllAnswerPlaceholders(state.getEditor(), state.getTaskFile()); } private static void saveIndent(AnswerPlaceholder placeholder, CCState state, boolean visible) { diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCDeleteAllAnswerPlaceholdersAction.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCDeleteAllAnswerPlaceholdersAction.java index 0fa8c6b2bcc2..7decdd46bd42 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCDeleteAllAnswerPlaceholdersAction.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCDeleteAllAnswerPlaceholdersAction.java @@ -65,7 +65,7 @@ public class CCDeleteAllAnswerPlaceholdersAction extends DumbAwareAction { private static void updateView(@NotNull final Editor editor, @NotNull final TaskFile taskFile) { editor.getMarkupModel().removeAllHighlighters(); - StudyUtils.drawAllWindows(editor, taskFile); + StudyUtils.drawAllAnswerPlaceholders(editor, taskFile); } @Override diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCSubtaskPlaceholderAction.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCSubtaskPlaceholderAction.java index 9604658154fd..77d6aa13ee8e 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCSubtaskPlaceholderAction.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/placeholder/CCSubtaskPlaceholderAction.java @@ -36,13 +36,13 @@ public abstract class CCSubtaskPlaceholderAction extends CCAnswerPlaceholderActi @Override public void undo() throws UnexpectedUndoException { undoAction(existingPlaceholder, subtaskIndex, info); - StudyUtils.drawAllWindows(editor, taskFile); + StudyUtils.drawAllAnswerPlaceholders(editor, taskFile); } @Override public void redo() throws UnexpectedUndoException { redoAction(existingPlaceholder, subtaskIndex, info); - StudyUtils.drawAllWindows(editor, taskFile); + StudyUtils.drawAllAnswerPlaceholders(editor, taskFile); } }); } diff --git a/python/educational-core/course-creator/testSrc/com/jetbrains/edu/coursecreator/CCTestCase.java b/python/educational-core/course-creator/testSrc/com/jetbrains/edu/coursecreator/CCTestCase.java index 0ee7e1d27242..902a09ebc9f8 100644 --- a/python/educational-core/course-creator/testSrc/com/jetbrains/edu/coursecreator/CCTestCase.java +++ b/python/educational-core/course-creator/testSrc/com/jetbrains/edu/coursecreator/CCTestCase.java @@ -123,7 +123,7 @@ public abstract class CCTestCase extends CodeInsightFixtureTestCase { taskFile.addAnswerPlaceholder(placeholder); } taskFile.sortAnswerPlaceholders(); - StudyUtils.drawAllWindows(myFixture.getEditor(), taskFile); + StudyUtils.drawAllAnswerPlaceholders(myFixture.getEditor(), taskFile); CCUtils.createResourceFile(file, StudyTaskManager.getInstance(getProject()).getCourse(), file.getParent()); return file; } diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/StudyUtils.java b/python/educational-core/student/src/com/jetbrains/edu/learning/StudyUtils.java index 2026a25e401f..9505f6d63eab 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/StudyUtils.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/StudyUtils.java @@ -348,7 +348,7 @@ public class StudyUtils { return null; } - public static void drawAllWindows(Editor editor, TaskFile taskFile) { + public static void drawAllAnswerPlaceholders(Editor editor, TaskFile taskFile) { editor.getMarkupModel().removeAllHighlighters(); final Project project = editor.getProject(); if (project == null) return; diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyRefreshTaskFileAction.java b/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyRefreshTaskFileAction.java index 1949b84bb6b2..08bd1056b968 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyRefreshTaskFileAction.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyRefreshTaskFileAction.java @@ -74,7 +74,7 @@ public class StudyRefreshTaskFileAction extends StudyActionWithShortcut { } WolfTheProblemSolver.getInstance(project).clearProblems(studyState.getVirtualFile()); taskFile.setHighlightErrors(false); - StudyUtils.drawAllWindows(editor, taskFile); + StudyUtils.drawAllAnswerPlaceholders(editor, taskFile); EduAnswerPlaceholderPainter.createGuardedBlocks(editor, taskFile); ApplicationManager.getApplication().invokeLater( () -> IdeFocusManager.getInstance(project).requestFocus(editor.getContentComponent(), true)); diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/checker/StudyCheckUtils.java b/python/educational-core/student/src/com/jetbrains/edu/learning/checker/StudyCheckUtils.java index 5569e2fd2e89..2f5ac54c64a0 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/checker/StudyCheckUtils.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/checker/StudyCheckUtils.java @@ -59,7 +59,7 @@ public class StudyCheckUtils { FileEditor fileEditor = FileEditorManager.getInstance(project).getSelectedEditor(virtualFile); if (fileEditor instanceof StudyEditor) { StudyEditor studyEditor = (StudyEditor)fileEditor; - StudyUtils.drawAllWindows(studyEditor.getEditor(), taskFile); + StudyUtils.drawAllAnswerPlaceholders(studyEditor.getEditor(), taskFile); } } } diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/core/EduUtils.java b/python/educational-core/student/src/com/jetbrains/edu/learning/core/EduUtils.java index 64b5572fbfe1..499b25f13492 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/core/EduUtils.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/core/EduUtils.java @@ -141,7 +141,7 @@ public class EduUtils { VirtualFile answerFile, VirtualFile parentDir, @Nullable Task task, - int toSubtaskIndex) { + int targetSubtaskIndex) { VirtualFile studentFile = copyFile(requestor, parentDir, answerFile); if (studentFile == null) { @@ -167,10 +167,10 @@ public class EduUtils { taskFile.setTrackLengths(false); for (AnswerPlaceholder placeholder : taskFile.getAnswerPlaceholders()) { int fromSubtask = task.getActiveSubtaskIndex(); - placeholder.switchSubtask(project, studentDocument, fromSubtask, toSubtaskIndex); + placeholder.switchSubtask(project, studentDocument, fromSubtask, targetSubtaskIndex); } for (AnswerPlaceholder placeholder : taskFile.getAnswerPlaceholders()) { - replaceWithTaskText(project, studentDocument, placeholder, toSubtaskIndex); + replaceWithTaskText(project, studentDocument, placeholder, targetSubtaskIndex); } taskFile.setTrackChanges(true); studentDocument.removeDocumentListener(listener); diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/editor/StudyEditorFactoryListener.java b/python/educational-core/student/src/com/jetbrains/edu/learning/editor/StudyEditorFactoryListener.java index 73133964ff33..288bc157b012 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/editor/StudyEditorFactoryListener.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/editor/StudyEditorFactoryListener.java @@ -81,7 +81,7 @@ public class StudyEditorFactoryListener implements EditorFactoryListener { if (!taskFile.getAnswerPlaceholders().isEmpty()) { StudyNavigator.navigateToFirstAnswerPlaceholder(editor, taskFile); boolean isStudyProject = EduNames.STUDY.equals(course.getCourseMode()); - StudyUtils.drawAllWindows(editor, taskFile); + StudyUtils.drawAllAnswerPlaceholders(editor, taskFile); if (isStudyProject) { editor.addEditorMouseListener(new WindowSelectionListener(taskFile)); }