Editor (VirtualFile file) { Editor editor = FileEditorManager.getInstance(getProject()).openTextEditor(new OpenFileDescriptor(getProject(), file, 0), false); EditorTestUtil.waitForLoading(editor); return editor; }