|
Class: EditTextViewCompletionSupport
Object
|
+--EditTextViewCompletionSupport
|
+--WorkspaceCompletionSupport
- Package:
- stx:libwidg
- Category:
- Views-Text
- Version:
- rev:
1.34
date: 2019/08/14 14:45:59
- user: cg
- file: EditTextViewCompletionSupport.st directory: libwidg
- module: stx stc-classLibrary: libwidg
- Author:
- Claus Gittinger
An abstract supperclass to support completion in text views.
Individual completion engines may create a subclass of
EditTextCompletionSupport and customize it.
Basically, they have to implement #computeCompletions
[instance variables:]
[class variables:]
instance creation
-
for: anEditView
-
queries
-
isAbstract
-
(comment from inherited method)
Return if this class is an abstract class.
True is returned for Object here; false for subclasses.
Abstract subclasses must redefine this again.
accessing
-
editView: anEditTextView
-
events
-
buttonPress: button x: x y: y
-
-
editViewLostFocus
-
this is a hack for Windows:
on windows, an activate:false event is first sent to my textView,
then an activate is sent to the completion popup.
this is done BEFORE the buttonPress event is delivered.
therefore, allow for the activate of the completionMenu and its button event to be processed.
before forcing it to be closed...
-
handleKeyPress: key x: x y: y
-
return true, if I have eaten this keypress
-
postKeyPress: key
-
only update, if already open
-
startTimeoutForEditViewLostFocus
-
see comment in #editViewLostFocus
private
-
computeAndShowCompletions
-
compute completions, then push an event to show them
-
computeCompletions
-
compute the completions.
Don't know how to do this here.
-
release
-
-
startCompletionProcess
-
start the code completion process in the background
-
stopCompletionProcess
-
kill any background completion process
-
updateCompletionList
-
called for keypress events
private-API
-
closeCompletionView
-
let it close itself - avoids synchronization problems
-
openCompletionView
-
Opens the completion view with an initial list. Called as soon as
completion is initiated but completion options are not yet computed.
-
openCompletionView: list
-
Makes sure the completion view is opened and with given `list`.
|