136 UserInformation handle:[:ex | |
133 UserInformation handle:[:ex | |
137 codeView showInfo:(ex messageText). |
134 codeView showInfo:(ex messageText). |
138 ex proceed. |
135 ex proceed. |
139 ] do:[ |
136 ] do:[ |
140 codeView withWaitCursorDo:[ |
137 codeView withWaitCursorDo:[ |
141 DoWhatIMeanSupport codeCompletionForClass:cls codeView:textView. |
138 DoWhatIMeanSupport codeCompletionForClass:cls context:nil codeView:textView. |
142 ] |
139 ] |
143 ]. |
140 ]. |
144 ^ self. |
141 ^ self. |
145 |
|
146 "/ |
|
147 "/ interval := self selectedInterval. |
|
148 "/ interval isEmpty ifTrue:[ |
|
149 "/ crsrPos := codeView characterPositionOfCursor - 1. |
|
150 "/ char := codeView characterUnderCursor. |
|
151 "/ [crsrPos > 1 and:[char isSeparator or:['.' includes:char]]] whileTrue:[ |
|
152 "/ crsrPos := crsrPos - 1. |
|
153 "/ char := codeView characterAtCharacterPosition:crsrPos. |
|
154 "/ ]. |
|
155 "/ interval := crsrPos to:crsrPos. |
|
156 "/ ]. |
|
157 "/ |
|
158 "/ node := self findNodeForInterval:interval allowErrors:true. |
|
159 "/ [node isNil] whileTrue:[ |
|
160 "/ "/ expand to the left ... |
|
161 "/ interval start > 1 ifFalse:[ |
|
162 "/ self showInfo:'No parseNode found'. |
|
163 "/ ^ self. |
|
164 "/ ]. |
|
165 "/ interval start:(interval start - 1). |
|
166 "/ node := self findNodeForInterval:interval allowErrors:true. |
|
167 "/ ]. |
|
168 "/ |
|
169 "/ node isVariable ifTrue:[ |
|
170 "/ self codeCompletionForVariable:node inClass:cls. |
|
171 "/ ^ self. |
|
172 "/ ]. |
|
173 "/ |
|
174 "/ checkedNode := node. |
|
175 "/ [checkedNode notNil] whileTrue:[ |
|
176 "/ checkedNode isMessage ifTrue:[ |
|
177 "/ self codeCompletionForMessage:checkedNode inClass:cls. |
|
178 "/ ^ self |
|
179 "/ ]. |
|
180 "/ checkedNode isMethod ifTrue:[ |
|
181 "/ self codeCompletionForMethod:checkedNode inClass:cls. |
|
182 "/ ^ self. |
|
183 "/ ]. |
|
184 "/ checkedNode := checkedNode parent. |
|
185 "/ ]. |
|
186 "/ |
|
187 "/ self showInfo:'Node is neither variable nor message.'. |
|
188 |
142 |
189 "Modified: / 04-07-2006 / 18:48:26 / fm" |
143 "Modified: / 04-07-2006 / 18:48:26 / fm" |
190 "Modified: / 20-11-2006 / 12:30:59 / cg" |
144 "Modified: / 20-11-2006 / 12:30:59 / cg" |
191 "Created: / 07-03-2010 / 09:37:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
145 "Created: / 07-03-2010 / 09:37:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
192 ! ! |
146 ! ! |
193 |
147 |
194 !CodeCompletionService class methodsFor:'documentation'! |
148 !CodeCompletionService class methodsFor:'documentation'! |
195 |
149 |
196 version_CVS |
150 version_CVS |
197 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeCompletionService.st,v 1.8 2013-07-22 12:02:14 cg Exp $' |
151 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeCompletionService.st,v 1.9 2013-08-31 22:32:36 cg Exp $' |
198 ! |
152 ! |
199 |
153 |
200 version_HG |
154 version_HG |
201 |
155 |
202 ^ '$Changeset: <not expanded> $' |
156 ^ '$Changeset: <not expanded> $' |
203 ! |
157 ! |
204 |
158 |
205 version_SVN |
159 version_SVN |
206 ^ '$Id: Tools__CodeCompletionService.st,v 1.8 2013-07-22 12:02:14 cg Exp $' |
160 ^ '$Id: Tools__CodeCompletionService.st,v 1.9 2013-08-31 22:32:36 cg Exp $' |
207 ! ! |
161 ! ! |
208 |
162 |