Editor () { if (myEditor == null) { final Project project = myFile.getProject(); myEditor = FileEditorManager.getInstance(project).openTextEditor(new OpenFileDescriptor(project, myFile.getVirtualFile(), 0), false); assert myEditor != null; } return myEditor; }