use of com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl in project intellij-plugins by JetBrains.
the class DartExtractMethodRefactoringTest method createRefactoring.
@NotNull
private ServerExtractMethodRefactoring createRefactoring(String filePath) {
((CodeInsightTestFixtureImpl) myFixture).canChangeDocumentDuringHighlighting(true);
final PsiFile psiFile = myFixture.configureByFile(filePath);
// make sure server is warmed up
myFixture.doHighlighting();
// find the Element to rename
final SelectionModel selectionModel = getEditor().getSelectionModel();
int offset = selectionModel.getSelectionStart();
final int length = selectionModel.getSelectionEnd() - offset;
return new ServerExtractMethodRefactoring(getProject(), psiFile.getVirtualFile(), offset, length);
}
Aggregations