Re: Autocompletion feature in runtime
- From: "Blair McGlashan" <blairmcg@xxxxxxxxxxxxxxx>
- Date: Wed, 17 May 2006 07:27:31 +0100
"Sebastián" <ssastre@xxxxxxxxxxxxxxx> wrote in message
news:1147701492.188049.69820@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dear Blair,
thanks for your answer. I understood that Scintilla is not designed
to show formatted text.
What I need is not the lexical features, just an autocompletion based
on a custom dictionary preservating text format.
What would you recomend to have both features, formatted text and
autocompletion?
Can autocompletion be added to a subclass of RichTextPresenter for
instance?
Well it would be possible, especially if you completion is based just on
dictionary lookup. If you need to identify syntactic elements in order to
direct auto-completion, then you will have a lot of work to do. You'll need
to maintain information about the tokens in the text, and maintain this
efficiently as the user is editing. This is non-trivial.
Scintilla itself doesn't do a lot of this work for you, but rather it
understands what text has been "styled" and sends appropriate notifications
to request styling of text. Obviously it is also capable of maintaining
information about the styling of text runs, and of drawing the runs
appropritely depending on the visual style configuration. It has a lot of
built-in "lexers" that can do this styling, but frankly I don't think those
belong in the control itself even though they are packaged that way for
convenience. We use container based "lexing" (really it goes a bit beyond
lexical analysis because of token ambiguity in Smalltalk) because it is much
more flexible and allows us to provide extensibility in Smalltalk without
having to build a C++ lexer for your favourite language and get it
incorporated into the distro.
Being able to distinguish the type of syntactic element under the cursor is
absolutely key to the intelligent editing features of most modern IDEs.
Regards
Blair
.
- Follow-Ups:
- Re: Autocompletion feature in runtime
- From: Sebastián
- Re: Autocompletion feature in runtime
- References:
- Autocompletion feature in runtime
- From: Sebastián
- Re: Autocompletion feature in runtime
- From: Blair McGlashan
- Re: Autocompletion feature in runtime
- From: Sebastián
- Autocompletion feature in runtime
- Prev by Date: Re: Where is the entry point?
- Next by Date: Re: MSVDM glitch
- Previous by thread: Re: Autocompletion feature in runtime
- Next by thread: Re: Autocompletion feature in runtime
- Index(es):
Relevant Pages
|