I have followed all the online tutorials I can find related to Lexing, Parsing & Code Completion.
I have implemented my own language (a query language for search/filter) using ANTLR. Syntax Highlighting works. Code completion appears to work. Parsing/Error Hints get triggered after a short delay and appear to be working. I say appear to work because the functionality works individually. However, I’ve noticed if I have grammatical errors in my file the Error Hints disappear when the Code-Completion window is opened and the user continues to type (to filter the code-completion popup). The error hints are displayed again as soon as the code-completion window is closed. So I can have syntax highlighting & errors or syntax highlighting & code completion but not syntax highlighting, error hints and code completion. When editing a .java file in NetBeans you can see error hints while code completion is open and the user continues typing (filtering the code completion window). I have noticed when editing a .js (javascript) file in NetBeans the editor behaves the way my language behaves – the parsing error hints disappear if the code-completion popup is visible and the user continues typing/filters the code-completion suggestions. I am using the default Editor behavior when opening a custom file type. Could someone familiar with the parsing/editing APIs help point me in the right direction? I would really like the behavior to be the same as editing a .java file. One other issue that’s kind of related. I then changed my data object so that it opens a custom editor rather than the default editor because ultimately I want my editor to be a text field embedded into another top-component rather than a standalone editor. Again I followed the tutorials dealing with this type of functionality. In my custom editor I create a JEditorPane, set the editor kit for my MIME type. Bind the component to the document. Syntax highlighting and Code-Completion are functional but the parsing/error hints never activate. I am trying to figure out what needs to be added to get the parsing/editor hints functional. Many Thanks -Graeme
