openTextEditor returns null

Hey,

I am working on a plugin but now i'm stuck in a very basic step.
All attempts to open a new text editor within Intellij were in vain.
Whenever i call the openTextEditor method it returns null and no editor window is opened .
Here is my code:

VirtualFile vf = LocalFileSystem.getInstance().findFileByIoFile(f);
FileEditorManagerEx.getInstanceEx(myProject).openTextEditor(new OpenFileDescriptor(myProject, vf), true);

1 comment

Solved it...
It was my fault. I tried to open a file, that was not existing..

0

Please sign in to leave a comment.