[Valentina-studio] Re: [antlr-interest] Re: Auto- completion feature based on ANTLR

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Aug 21 19:07:49 CDT 2003


on 8/21/03 6:47 AM, Thomas Brandon at tom at psy.unsw.edu.au wrote:

> If you want to see an implementation of code completion you could
> look at the Netbeans IDE (www.netbeans.org, and specifically
> editor.netbeans.org). I had a quick look and the only docs on it are
> user-view docs, but there's a full implementation in there. It does
> code-completion for at least Java and HTML. The implementation is
> language specific though there is a move to pull it out into a
> seperate code-completion module but I don't think this is underway
> yet and again no in-depth programmer docs yet. I think that the Java
> editor uses a hand-built parser.
> 
> As with other tools though it's only method completion, no completion
> for keywords as you were talking about. This makes it rather easier
> as then you don't have to deal with incomplete tokens, it's already
> an IDENT (or FIELD_IDENT or TABLE_IDENT) token you just check how it
> could be expanded.
> 
> As to keywords, you could drop this in favour of abbreviations which
> is what Netbeans has. e.g. 're' is expanded to 'return'. Though this
> can be a bit annoying as a variable called 're' gets expanded
> to 'return'. But it might be worth thinking about whether it's worth
> having keyword completion. Field\table etc name completion is great
> as you don't have to know them all off by heart but who's gonna
> forget select. And if you had say loj->LEFT OUTER JOIN abbreviations
> and so on you could take care of the longer sequences, there aren't
> many long sequences in SQL. You could even do them outside the ANTLR
> parser, have your Editor Kit do it before lexing\parsing. When a
> space (or whatever you're abbreviation key is) is inserted check what
> it was inserted after. Though depending on your editor implementation
> that may or may not be easy, with a Swing editor kit it wouldn't be
> too bad.

Hi Thomas,

You really have made good point!!!

It is really have no big sense for SQL editor to have auto-completion!
What user really need -- list of tables and list of fields.

This can be made as 2 keyboard shortcuts!
I need now type name of table, press e.g. Ctrl+T and get popup menu with
tables.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-studio mailing list