Hi, I have instance of Project, Document, FileEditor and a Virtual file open in the editor, but I can't seem to get an Editor instance from these, I dont have AnActionEvent to use. I got my Project instance with the code:
Project project = (Project) DataManager.getInstance().getDataContext().getData(DataConstants.PROJECT);
Using the same code for an editor instance, like so:
Editor editor = (Editor) DataManager.getInstance().getDataContext().getData(DataConstants.EDITOR);
gives null. How can I get an instance of the active Editor?