author | Claus Gittinger <cg@exept.de> |
Fri, 09 Dec 2016 13:45:14 +0100 | |
branch | cvs_MAIN |
changeset 1007 | 60cc13ef0a9c |
parent 966 | 25bb5ab6275e |
child 1111 | 188b3b126921 |
permissions | -rw-r--r-- |
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
1 |
" |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
2 |
stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
3 |
Copyright (C) 2013-2014 Jan Vrany |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
4 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
5 |
This library is free software; you can redistribute it and/or |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
6 |
modify it under the terms of the GNU Lesser General Public |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
7 |
License as published by the Free Software Foundation; either |
918 | 8 |
version 2.1 of the License. |
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
9 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
10 |
This library is distributed in the hope that it will be useful, |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
13 |
Lesser General Public License for more details. |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
14 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
15 |
You should have received a copy of the GNU Lesser General Public |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
16 |
License along with this library; if not, write to the Free Software |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
17 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
18 |
" |
249
8bc64027b189
Package renamed to stx:goodies/smallsense
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
237
diff
changeset
|
19 |
"{ Package: 'stx:goodies/smallsense' }" |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
"{ NameSpace: SmallSense }" |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
Tools::CodeViewService subclass:#EditService |
205
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
24 |
instanceVariableNames:'environment support' |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
classVariableNames:'' |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
poolDictionaries:'' |
67
020b7461b15e
Package structure reorganization.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
64
diff
changeset
|
27 |
category:'SmallSense-Core-Services' |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
|
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
30 |
!EditService class methodsFor:'documentation'! |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
31 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
32 |
copyright |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
33 |
" |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
34 |
stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
35 |
Copyright (C) 2013-2014 Jan Vrany |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
36 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
37 |
This library is free software; you can redistribute it and/or |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
38 |
modify it under the terms of the GNU Lesser General Public |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
39 |
License as published by the Free Software Foundation; either |
918 | 40 |
version 2.1 of the License. |
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
41 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
42 |
This library is distributed in the hope that it will be useful, |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
43 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
44 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
45 |
Lesser General Public License for more details. |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
46 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
47 |
You should have received a copy of the GNU Lesser General Public |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
48 |
License along with this library; if not, write to the Free Software |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
49 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
50 |
" |
966 | 51 |
! |
52 |
||
53 |
documentation |
|
54 |
" |
|
55 |
this is the 'Electric Edit' service. |
|
56 |
It automatically insert code fragments as you type. |
|
57 |
" |
|
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
58 |
! ! |
83
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
59 |
|
86
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
60 |
!EditService class methodsFor:'initialization'! |
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
61 |
|
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
62 |
initialize |
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
63 |
" |
173 | 64 |
| map | |
65 |
map := Screen current keyboardMap. |
|
66 |
map bindValue:#CodeCompletion to: #'Ctrl '. |
|
67 |
map bindValue:#CodeCompletion to: #'Ctrlspace'. |
|
86
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
68 |
" |
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
69 |
|
173 | 70 |
Smalltalk addStartBlock:[ |
918 | 71 |
Screen current notNil ifTrue:[ |
72 |
| map | |
|
73 |
map := Screen current keyboardMap. |
|
74 |
(map keyAtValue:#CodeCompletion) isNil ifTrue:[ |
|
75 |
map bindValue:#CodeCompletion to: #'Ctrl '. |
|
76 |
map bindValue:#CodeCompletion to: #'Ctrlspace'. |
|
77 |
]. |
|
173 | 78 |
] |
86
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
79 |
] |
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
80 |
|
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
81 |
"Created: / 17-09-2013 / 15:23:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
82 |
! ! |
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
83 |
|
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
84 |
!EditService class methodsFor:'accessing'! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
85 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
86 |
label |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
87 |
"Answers a short label - for UI" |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
88 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
89 |
^'SmallSense - Edit Support' |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
90 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
91 |
"Created: / 27-07-2013 / 22:35:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
92 |
! ! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
93 |
|
308
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
94 |
!EditService class methodsFor:'testing'! |
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
95 |
|
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
96 |
isAvailable |
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
97 |
|
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
98 |
^false |
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
99 |
|
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
100 |
"Created: / 28-11-2014 / 15:41:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
101 |
! |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
102 |
|
308
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
103 |
isAvailableFor: applicationClass |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
104 |
|
308
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
105 |
"Returns true if given service may be used in |
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
106 |
given application class." |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
107 |
|
308
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
108 |
^false |
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
109 |
|
8a605d737807
Removed all but one swizzled methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
252
diff
changeset
|
110 |
"Created: / 28-11-2014 / 15:41:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
111 |
! ! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
112 |
|
205
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
113 |
!EditService methodsFor:'accessing'! |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
114 |
|
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
115 |
environment |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
116 |
"Return an system environment for completion." |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
117 |
|
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
118 |
^ environment ? Smalltalk |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
119 |
|
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
120 |
"Modified: / 13-05-2014 / 12:02:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
121 |
! |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
122 |
|
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
123 |
environment:aSystemEnvironment |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
124 |
"Sets an envirronment for completion. Only classes and/or methods in |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
125 |
the environment are offered for completion" |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
126 |
environment := aSystemEnvironment. |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
127 |
|
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
128 |
"Modified (comment): / 13-05-2014 / 11:55:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
218
0f5b160ecb9d
Let the CompletionController itself to instantiate completion engine.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
129 |
! |
0f5b160ecb9d
Let the CompletionController itself to instantiate completion engine.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
130 |
|
0f5b160ecb9d
Let the CompletionController itself to instantiate completion engine.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
131 |
support |
0f5b160ecb9d
Let the CompletionController itself to instantiate completion engine.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
132 |
^ support |
205
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
133 |
! ! |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
134 |
|
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
135 |
!EditService methodsFor:'accessing-views'! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
136 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
137 |
codeView |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
138 |
^ codeView |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
139 |
! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
140 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
141 |
gutterView |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
142 |
^ gutterView |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
143 |
! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
144 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
145 |
textView |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
146 |
^ textView |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
147 |
! ! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
148 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
149 |
!EditService methodsFor:'change & update'! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
150 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
151 |
update:something with:aParameter from:changedObject |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
152 |
"Invoked when an object that I depend upon sends a change notification." |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
153 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
154 |
changedObject == codeView ifTrue:[ |
918 | 155 |
(#(methodHolder classHolder languageHolder) includes: something) ifTrue:[ |
156 |
aParameter key removeDependent: self. |
|
157 |
aParameter value addDependent: self. |
|
158 |
]. |
|
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
159 |
]. |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
160 |
|
918 | 161 |
(changedObject == codeView languageHolder |
162 |
or:[changedObject == codeView classHolder |
|
163 |
or:[changedObject == codeView methodHolder]]) ifTrue:[ |
|
164 |
self updateSupport. |
|
165 |
^self. |
|
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
166 |
]. |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
167 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
168 |
super update:something with:aParameter from:changedObject |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
169 |
|
83
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
170 |
"Modified: / 16-09-2013 / 16:36:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
171 |
! |
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
172 |
|
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
173 |
updateSupport |
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
174 |
| lang | |
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
175 |
|
914 | 176 |
(UserPreferences current smallSenseElectricEditSupportEnabled == true) ifTrue:[ |
918 | 177 |
support language ~~ (lang := codeView language) ifTrue:[ |
178 |
self updateSupport: (EditSupport forLanguage: lang). |
|
179 |
]. |
|
83
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
180 |
]. |
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
181 |
|
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
182 |
"Created: / 16-09-2013 / 16:31:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
205
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
183 |
"Modified: / 13-05-2014 / 14:49:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
184 |
! |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
185 |
|
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
186 |
updateSupport: anEditSupport |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
187 |
support := anEditSupport. |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
188 |
support initializeForService: self. |
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
189 |
|
43bee6463c53
Introduced notion of `environment` to completion context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
190 |
"Created: / 13-05-2014 / 14:49:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
191 |
! ! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
192 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
193 |
!EditService methodsFor:'event handling'! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
194 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
195 |
keyPress: key x:x y:y in: view |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
196 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
197 |
"Handles an event in given view (a subview of codeView). |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
198 |
If the method returns true, the event will not be processed |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
199 |
by the view." |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
200 |
|
918 | 201 |
^support notNil |
202 |
ifTrue:[support keyPress: key x:x y:y in: view] |
|
203 |
ifFalse:[false] |
|
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
204 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
205 |
"Created: / 07-03-2010 / 09:36:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
206 |
"Modified: / 24-07-2013 / 23:28:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
207 |
! ! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
208 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
209 |
!EditService methodsFor:'registering'! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
210 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
211 |
registerIn: aCodeView |
918 | 212 |
(UserPreferences current smallSenseEnabled == true) ifTrue:[ |
213 |
super registerIn: aCodeView. |
|
214 |
aCodeView languageHolder addDependent: self. |
|
215 |
aCodeView classHolder addDependent: self. |
|
216 |
aCodeView methodHolder addDependent: self. |
|
217 |
support := EditSupport forLanguage: aCodeView language. |
|
218 |
support initializeForService: self. |
|
219 |
] ifFalse:[ |
|
220 |
"/ If not enabled, remove itself from set of services, |
|
221 |
"/ see Tools::CodeView2>>registerService: |
|
222 |
"/ Bad API, has to be fixed in CodeView2... |
|
223 |
aCodeView services remove: self ifAbsent:[ ] |
|
177
be588b60f4b2
Added preference to enable/disable SmallSense completion.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
173
diff
changeset
|
224 |
]. |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
225 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
226 |
"Created: / 24-07-2013 / 23:13:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
237
5c5e94e2fb00
Bugfix in EditService>>unregister: call super unregister at the end of the unregister method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
218
diff
changeset
|
227 |
"Modified: / 13-06-2014 / 14:15:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
228 |
! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
229 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
230 |
unregister |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
231 |
"Uninstall myself from my codeView" |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
232 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
233 |
codeView languageHolder removeDependent: self. |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
234 |
codeView classHolder removeDependent: self. |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
235 |
codeView methodHolder removeDependent: self. |
237
5c5e94e2fb00
Bugfix in EditService>>unregister: call super unregister at the end of the unregister method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
218
diff
changeset
|
236 |
super unregister |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
237 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
238 |
"Created: / 24-07-2013 / 23:14:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
237
5c5e94e2fb00
Bugfix in EditService>>unregister: call super unregister at the end of the unregister method.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
218
diff
changeset
|
239 |
"Modified: / 13-06-2014 / 14:17:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
240 |
! ! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
241 |
|
83
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
242 |
!EditService class methodsFor:'documentation'! |
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
243 |
|
862 | 244 |
version_CVS |
245 |
||
246 |
^ '$Header$' |
|
247 |
! |
|
248 |
||
83
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
249 |
version_HG |
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
250 |
|
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
251 |
^ '$Changeset: <not expanded> $' |
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
252 |
! ! |
e02330ae1fe4
Bugfix in EditService: correctly react on classHolder/methodHolder changes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
67
diff
changeset
|
253 |
|
86
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
254 |
|
3b615594edf6
Fixed Lint service to work on CVS Smalltalk/X...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
255 |
EditService initialize! |