|
Class: EditTextViewCompletionSupport
Object
|
+--EditTextViewCompletionSupport
|
+--WorkspaceCompletionSupport
- Package:
- stx:libwidg
- Category:
- Views-Text
- Version:
- rev:
1.62
date: 2024/03/05 21:16:38
- user: cg
- file: EditTextViewCompletionSupport.st directory: libwidg
- module: stx stc-classLibrary: libwidg
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:]
copyrightCOPYRIGHT (c) 2018 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
cleanup
-
lowSpaceCleanup
-
(comment from inherited method)
ignored here - redefined in some classes to
cleanup in low-memory situations
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.
Notice: this is interrupted and terminated if the user presses another key
within delayTime
-
computeCompletions
-
compute the completions.
Don't know how to do this here.
-
release
-
(comment from inherited method)
remove all references to objects that may refer to self.
Subclasses may redefine this method but should do a 'super release'.
-
startCompletionProcess
-
start the code completion process in the background
-
stopCompletionProcess
-
kill any background completion process
-
updateCompletionList
-
called for keypress events
private-API
-
adjustPositionAndSizeOfCompletionView: topViewOfCompletionView
-
oops - no cursor shown???
-
adjustSizeOfCompletionView: topViewOfCompletionView
-
-
closeCompletionView
-
completionView := nil.
-
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`.
|