EditorTextField not supporting any syntax highlights
Answered
Hi,
I have used the below code to create a EditorTextField
but it is not supporting any kind of syntax checks, please let me know, what is wrong?
private EditorTextField createEditorTextField(String content){
EditorFactory editorFactory = EditorFactory.getInstance();
Document document = editorFactory.createDocument(content);
EditorTextField field = new EditorTextField(document, null, JsonFileType.INSTANCE);
field.setOneLineMode(false);
field.setCaretPosition(0);
return field;
}
Please sign in to leave a comment.
I want to achieve a editor in settings similar to
Settings → Editor → Code Style → JSON
Hi,
Please clarify: doesn't it highlight syntax at all, or there are not other highlights like annotator or inspections?
Why do you pass the null project?