Tools__CodeNavigationService.st
changeset 15172 26249a020c0f
parent 14448 e1cfd3e4826b
child 15325 c47ce660e294
equal deleted inserted replaced
15171:8615930c22ef 15172:26249a020c0f
   518     "Created: / 25-06-2010 / 14:05:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   518     "Created: / 25-06-2010 / 14:05:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   519 ! !
   519 ! !
   520 
   520 
   521 !CodeNavigationService methodsFor:'misc'!
   521 !CodeNavigationService methodsFor:'misc'!
   522 
   522 
       
   523 highlightClassVariable:name
       
   524     "interface from browser (when a class var is selected)"
       
   525 
       
   526     self highlightVariable:name isClassVariable:true
       
   527 !
       
   528 
   523 highlightInstanceVariable:name
   529 highlightInstanceVariable:name
       
   530     "interface from browser (when an inst var is selected)"
       
   531 
       
   532     self highlightVariable:name isClassVariable:false
       
   533 !
       
   534 
       
   535 highlightVariable:name isClassVariable:isClassVariable
       
   536     "interface from browser (when an inst or class var is selected)"
       
   537 
   524     |element|
   538     |element|
   525 
   539 
   526     element := (codeView syntaxElements ? #()) 
   540     element := (codeView syntaxElements ? #()) 
   527                     detect:[:e |     
   541                     detect:[:e |     
   528                         e isVariable
   542                         e isVariable
   529                         and:[ e isInstanceVariable
   543                         and:[ (isClassVariable 
       
   544                                     ifTrue:[e isClassVariable ]
       
   545                                     ifFalse:[e isInstanceVariable ])
   530                         and:[ e name = name ]]
   546                         and:[ e name = name ]]
   531                     ] ifNone:nil.
   547                     ] ifNone:nil.
   532 
   548 
   533     self highlightClear.
   549     self highlightClear.
   534     codeView syntaxElementSelection:nil.
   550     codeView syntaxElementSelection:nil.
   846 ! !
   862 ! !
   847 
   863 
   848 !CodeNavigationService class methodsFor:'documentation'!
   864 !CodeNavigationService class methodsFor:'documentation'!
   849 
   865 
   850 version
   866 version
   851     ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.47 2014-06-04 09:12:47 az Exp $'
   867     ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.48 2015-02-02 11:56:05 cg Exp $'
   852 !
   868 !
   853 
   869 
   854 version_CVS
   870 version_CVS
   855     ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.47 2014-06-04 09:12:47 az Exp $'
   871     ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.48 2015-02-02 11:56:05 cg Exp $'
   856 !
   872 !
   857 
   873 
   858 version_SVN
   874 version_SVN
   859     ^ '$Id: Tools__CodeNavigationService.st,v 1.47 2014-06-04 09:12:47 az Exp $'
   875     ^ '$Id: Tools__CodeNavigationService.st,v 1.48 2015-02-02 11:56:05 cg Exp $'
   860 ! !
   876 ! !
   861 
   877