Code editor with autocomplete

Posted by Andrey on Stack Overflow See other posts from Stack Overflow or by Andrey
Published on 2008-11-24T14:04:14Z Indexed on 2010/03/23 14:03 UTC
Read the original article Hit count: 326

Filed under:
|

I need to create a code editor for my own simple language:

className.MethodName(parameterName = 2, ... )

I've created the appropriate grammar and autogenerate parser using ANTLR tool. Now I would like to have an autocomplete for class, method, variables and parameter names. This list should be context dependent, f.e. for "class." it should display methods and for "class.Method(" - parameters. I was going to parse the text and display the list depending on in which node the cursor is. The problem is that for incomplete code like "aaa.bbb(" the parser produces an error instead of a syntax tree. Any idea how to solve this problem? Maybe I'm on the wrong way and I shouldn't parse code to display autocomplete?

© Stack Overflow or respective owner

Related posts about autocomplete

Related posts about parsing