EditorTextField getEditor return null Follow
Answered
How to get Editor from EditorTextField when creating dialog??
- Description from source: getEditor "return null if the editor is not initialized (e.g. if the field is not added to a container)"
- EditorTextField added in protected JComponent createCenterPanel()
- getEditor() called after DialogWrapper.init() and still return null;
It return value when user change input (by .addDocumentListener), but i need to get editor early.
Please sign in to leave a comment.
What do you need it for?
Please note, that underlying Editor might change later.
I'm use HighlightManager.getInstance(project).addRangeHighlight(...editor...) with DocumentListener. EditorTextField might be initialized with text, which must be highlighted, but i can't apply addRangeHighlight without Editor
Maybe, EditorTextField.addSettingsProvider() will help? This provider will be executed every time a new Editor is created.
Yeah, it works, thx.