mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CodeInsightTestFixtureImpl: reset caret position and selection on 'configure...'
This commit is contained in:
+6
-4
@@ -1343,10 +1343,9 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
|
||||
assert myEditor != null : "Editor couldn't be created for file: " +
|
||||
copy.getPath() +
|
||||
", use copyFileToProject(..) method for this file instead of configureByFile(..)";
|
||||
if (loader.caretMarker != null) {
|
||||
int offset = loader.caretMarker.getStartOffset();
|
||||
myEditor.getCaretModel().moveToOffset(offset);
|
||||
}
|
||||
int offset = loader.caretMarker != null ? loader.caretMarker.getStartOffset() : 0;
|
||||
myEditor.getCaretModel().moveToOffset(offset);
|
||||
|
||||
if (loader.selStartMarker != null && loader.selEndMarker != null) {
|
||||
int start = loader.selStartMarker.getStartOffset();
|
||||
int end = loader.selEndMarker.getStartOffset();
|
||||
@@ -1357,6 +1356,9 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
|
||||
myEditor.getSelectionModel().setSelection(start, end);
|
||||
}
|
||||
}
|
||||
else {
|
||||
myEditor.getSelectionModel().removeSelection();
|
||||
}
|
||||
|
||||
Module module = getModule();
|
||||
if (module != null) {
|
||||
|
||||
Reference in New Issue
Block a user