4 comments
Comment actions Permalink

Hi,

Out of interest what is the context of the operation you are performing currently?
For example, if you are writing an action you can get the current editor from the supplied event with e.getData(PlatformDataKeys.EDITOR)

Alan

0
Comment actions Permalink

Also, to answer your second question, you can use FileEditorManager.getInstance(project).getAllEditors() which will return all currently open editors
Similiarly there are more useful methods in this class that may be beneficial to look at.

0
Comment actions Permalink

i have my custom editor:  public class MyEditor implements FileEditor, FileEditorManagerListener
and in MyAction.update i want to see if the active editor is of MyEditor type . In function of this i make my action visible or not.

0
Comment actions Permalink

Thank you for the fast answer!

1) FileEditorManager.getInstance(e.getProject()).getAllEditors();
2) FileEditorManager.getInstance(e.getProject()).getSelectedEditors();

1

Please sign in to leave a comment.