DoWhatIMeanSupport.st
changeset 4058 8221d2e915df
parent 4054 f6bdf516b10b
child 4065 ebea28fa8bab
equal deleted inserted replaced
4057:a5e1c40ecf26 4058:8221d2e915df
   309     ].
   309     ].
   310 
   310 
   311     findBest := [:node :selector |
   311     findBest := [:node :selector |
   312         |srchClass bestSelectors bestPrefixes|
   312         |srchClass bestSelectors bestPrefixes|
   313 
   313 
   314         srchClass := self lookupClassForMessage:node inClass:classOrNil.
   314         codeView topView withCursor:(Cursor questionMark) do:[
   315         srchClass notNil ifTrue:[
   315             srchClass := self lookupClassForMessage:node inClass:classOrNil.
   316             bestSelectors := Parser findBest:30 selectorsFor:selector in:srchClass forCompletion:true.
   316             srchClass notNil ifTrue:[
   317         ] ifFalse:[
   317                 bestSelectors := Parser findBest:30 selectorsFor:selector in:srchClass forCompletion:true.
   318             codeView topView withCursor:(Cursor questionMark) do:[
   318             ] ifFalse:[
   319                 bestSelectors := Parser findBest:30 selectorsFor:selector in:nil forCompletion:true.
   319                 bestSelectors := Parser findBest:30 selectorsFor:selector in:nil forCompletion:true.
   320             ].
   320             ].
   321         ].
   321         ].
   322 
   322 
   323         (bestSelectors includes:selector) ifTrue:[
   323         (bestSelectors includes:selector) ifTrue:[
   513         info:'Completion'.
   513         info:'Completion'.
   514     ].
   514     ].
   515 
   515 
   516     "Created: / 10-11-2006 / 13:18:27 / cg"
   516     "Created: / 10-11-2006 / 13:18:27 / cg"
   517     "Modified: / 16-02-2010 / 10:33:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   517     "Modified: / 16-02-2010 / 10:33:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   518     "Modified: / 06-07-2011 / 13:59:12 / cg"
   518     "Modified: / 17-07-2011 / 10:32:05 / cg"
   519 !
   519 !
   520 
   520 
   521 codeCompletionForMethod:node inClass:classOrNil codeView:codeView
   521 codeCompletionForMethod:node inClass:classOrNil codeView:codeView
   522     "completion in a methods selector pattern"
   522     "completion in a methods selector pattern"
   523 
   523 
  1121                         ^ receiverClass theNonMetaclass
  1121                         ^ receiverClass theNonMetaclass
  1122                     ]
  1122                     ]
  1123                 ]
  1123                 ]
  1124             ].
  1124             ].
  1125         ].
  1125         ].
       
  1126         classProvidingNamespaceOrNil notNil ifTrue:[
       
  1127             (receiver receiver isSelf and:[receiver selector = 'class']) ifTrue:[
       
  1128                 ^ classProvidingNamespaceOrNil class
       
  1129             ].
       
  1130         ].
  1126     ].
  1131     ].
  1127     ^ nil
  1132     ^ nil
  1128 
  1133 
  1129     "Modified: / 24-08-2010 / 15:05:49 / sr"
  1134     "Modified: / 24-08-2010 / 15:05:49 / sr"
  1130     "Modified: / 06-07-2011 / 14:15:55 / cg"
  1135     "Modified: / 17-07-2011 / 10:28:19 / cg"
  1131 !
  1136 !
  1132 
  1137 
  1133 old_askUserForCompletion:what for:codeView from:allTheBest
  1138 old_askUserForCompletion:what for:codeView from:allTheBest
  1134     |list resources choice lastChoice|
  1139     |list resources choice lastChoice|
  1135 
  1140 
  2170 ! !
  2175 ! !
  2171 
  2176 
  2172 !DoWhatIMeanSupport class methodsFor:'documentation'!
  2177 !DoWhatIMeanSupport class methodsFor:'documentation'!
  2173 
  2178 
  2174 version_CVS
  2179 version_CVS
  2175     ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.83 2011-07-08 06:50:09 cg Exp $'
  2180     ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.84 2011-07-17 09:13:33 cg Exp $'
  2176 ! !
  2181 ! !