Re: Autocompletion feature in runtime



"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


.



Relevant Pages

  • Re: Autocompletion feature in runtime
    ... I understood that Scintilla is not designed ... What I need is not the lexical features, just an autocompletion based ... on a custom dictionary preservating text format. ...
    (comp.lang.smalltalk.dolphin)
  • Re: Cannot activate "Track Changes" on Word 2004 for Mac
    ... What I meant is that people who never used MacWrite Pro could use its advanced Find features without making mistakes. ... That is an intuitive interface and that is the Mac way. ... I'm pretty sure, however, that a button that says "Format" is no less intuitive for the user who expands the Word dialog and says "okay, now how do I search for bold text? ...
    (microsoft.public.mac.office.word)
  • Re: Cannot activate "Track Changes" on Word 2004 for Mac
    ... Probably Word was not meant for beginners, but the point is that both Mac OS X vs Windows and MacWrite Pro vs Word prove that you can have a powerful yet intuitive interface. ... And notice that to actually feel the ease of use of MacWrite Pro in the Find feature and other features you must use it. ... I'm pretty sure, however, that a button that says "Format" is no less intuitive for the user who expands the Word dialog and says "okay, now how do I search for bold text? ...
    (microsoft.public.mac.office.word)
  • Re: Cannot activate "Track Changes" on Word 2004 for Mac
    ... most people that do not "learn how it works" make mistakes when using the advanced Find features of Word. ... I want an interface that does not force me to learn things but that is so obvious that it is a matter of seen what is displayed and make the choice... ... I'm pretty sure, however, that a button that says "Format" is no less intuitive for the user who expands the Word dialog and says "okay, now how do I search for bold text? ... But I'm not seeing any way to F&R a paragraph mark with a line break, which is something I do often I've got an icon on my toolbar for it. ...
    (microsoft.public.mac.office.word)
  • Re: How do... YOU... do... "IT"?
    ... So you add those extra features, and you can sell SSJOW v 2.0. ... the file format incompatible with v2. ... bug fixes, and might even start looking at alternatives. ...
    (rec.arts.sf.composition)