How can i change the selected Editor?

How can i change the selected editor? I have anEditor and i want to make it active/focus on it.

Thank you!
Best Regards,
Sebastian

3 comments
Comment actions Permalink

If the editor is in an editor tab, use FileEditorManager.setSelectedEditor(). Otherwise, use IdeFocusManager.requestFocus(), like you would with any other component.

0
Comment actions Permalink

But i don't have FileEditorManager.setSelectedEditor() method in Idea 12.1.6. Is there any other way i can do it?

0
Comment actions Permalink

I changed to IDEA 13, and i'm still not getting what i was needing from any of the methods.

FileEditorManager.getInstance(project).setSelectedEditor(myEditor.getFile(), MyFileEditorProvider.getEditorTypeId())
IdeFocusManager.getInstance(project).requestFocus(myEditor.getComponent(), true);

The selected editor dosn't change...
Is ther somthing that i am missing?


Thank you!

0

Please sign in to leave a comment.