author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 03 Oct 2013 11:41:07 +0100 | |
changeset 118 | 88e6fd734a11 |
parent 117 | 441529422c2f |
child 120 | 4fefce92f5bb |
permissions | -rw-r--r-- |
117
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
"{ Package: 'jv:smallsense' }" |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
"{ NameSpace: SmallSense }" |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
Object subclass:#CompletionEngine |
118
88e6fd734a11
Some more fixes in complete-as-you-type support...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
117
diff
changeset
|
6 |
instanceVariableNames:'codeView result' |
117
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
classVariableNames:'' |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
poolDictionaries:'' |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
category:'SmallSense-Core' |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
! |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
!CompletionEngine class methodsFor:'testing'! |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
isAbstract |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
^ self == CompletionEngine |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
"Created: / 02-10-2013 / 13:11:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
! ! |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
19 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
!CompletionEngine methodsFor:'completion'! |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
complete |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
"Compute completion for `codeView`, taking all the information |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
from it. Returns a CompletionResult with computed completions" |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
^ self subclassResponsibility |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
"Modified (comment): / 02-10-2013 / 13:33:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
! |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
completeFor: aCodeView2OrTextEditView |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
"Compute completion for given codeView, taking all the information |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
from it. Returns a CompletionResult with computed completions" |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
codeView := aCodeView2OrTextEditView. |
118
88e6fd734a11
Some more fixes in complete-as-you-type support...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
117
diff
changeset
|
36 |
result := CompletionResult new. |
117
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
^ self complete. |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
|
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
"Created: / 02-10-2013 / 13:24:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
118
88e6fd734a11
Some more fixes in complete-as-you-type support...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
117
diff
changeset
|
40 |
"Modified: / 03-10-2013 / 11:18:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
117
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
41 |
! ! |
441529422c2f
Completion support refactored to make it more pluggable/extendable.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
42 |