mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
rename (fix for IDEA-CR-14348)
This commit is contained in:
committed by
liana.bakradze
parent
4050dd2623
commit
b6c4c34dfd
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -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));
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user