BrowserView.st
changeset 1267 17fc5184fb22
parent 1266 ee97c01c22c9
child 1268 e74c05a6a049
equal deleted inserted replaced
1266:ee97c01c22c9 1267:17fc5184fb22
  1510      If switching to hierarchy or all, keep current selections"
  1510      If switching to hierarchy or all, keep current selections"
  1511 
  1511 
  1512     |newCategory oldClass oldName classIndex list|
  1512     |newCategory oldClass oldName classIndex list|
  1513 
  1513 
  1514     newCategory := classCategoryListView selectionValue.
  1514     newCategory := classCategoryListView selectionValue.
  1515     (newCategory startsWith:'*') ifTrue:[
  1515     (newCategory = '* all *'
  1516         "etiher all or hierarchy;
  1516     or:[newCategory = '* hierarchy *']) ifTrue:[
  1517          remember current selections and switch after showing class list"
  1517         "switch to all or hierarchy:
       
  1518          remember current class and reselect it
       
  1519          after showing the updated class list
       
  1520         "
  1518         oldClass := currentClass
  1521         oldClass := currentClass
  1519     ].
  1522     ].
  1520     currentClassCategory := newCategory.
  1523     currentClassCategory := newCategory.
  1521     oldClass isNil ifTrue:[
  1524     oldClass isNil ifTrue:[
  1522         self classCategorySelectionChanged
  1525         self classCategorySelectionChanged
  1538         ] ifFalse:[
  1541         ] ifFalse:[
  1539             self normalLabel.
  1542             self normalLabel.
  1540         ]
  1543         ]
  1541     ]
  1544     ]
  1542 
  1545 
  1543     "Modified: 20.12.1996 / 16:40:15 / cg"
  1546     "Modified: 31.7.1997 / 23:01:40 / cg"
  1544 !
  1547 !
  1545 
  1548 
  1546 classCategorySelectionChanged
  1549 classCategorySelectionChanged
  1547     "class category has changed - update dependent views"
  1550     "class category has changed - update dependent views"
  1548 
  1551 
  4043                                 (Smalltalk at:key) == cls ifTrue:[
  4046                                 (Smalltalk at:key) == cls ifTrue:[
  4044                                     globlName := key
  4047                                     globlName := key
  4045                                 ]
  4048                                 ]
  4046                         ].
  4049                         ].
  4047 
  4050 
  4048                     msg := 'found ' , cls name , ' in category ''' , cls category , '.\'.
  4051                     msg := 'found ' , cls name , ' in category ''' , cls category , '''.\'.
  4049                     globlName notNil ifTrue:[
  4052                     globlName notNil ifTrue:[
  4050                         msg := msg , '(known as ' , globlName , ')\'.
  4053                         msg := msg , '(known as ' , globlName , ')\'.
  4051                     ].
  4054                     ].
  4052                     (self confirm:(msg , '\reconnect ?') withCRs)
  4055                     (self confirm:(msg , '\rebind in Smalltalk as ''' , cls name , '''?') withCRs)
  4053                     ifTrue:[
  4056                     ifTrue:[
  4054                         Smalltalk at:cls name asSymbol put:cls
  4057                         Smalltalk at:cls name asSymbol put:cls
  4055                     ]
  4058                     ]
  4056                 ] ifFalse:[
  4059                 ] ifFalse:[
  4057                     self warn:('found multiple classes with a name of ' , nm , '.\\Select and rename as required') withCRs.
  4060                     self warn:('found multiple classes with a name of ' , nm , '.\\Select and rename as required') withCRs.
  4062                 self warn:'oops - could not find that class'
  4065                 self warn:'oops - could not find that class'
  4063             ]
  4066             ]
  4064         ]
  4067         ]
  4065     ]
  4068     ]
  4066 
  4069 
  4067     "Modified: 30.7.1997 / 17:56:55 / cg"
  4070     "Modified: 31.7.1997 / 22:56:45 / cg"
  4068 !
  4071 !
  4069 
  4072 
  4070 classSelectionChanged
  4073 classSelectionChanged
  4071     |oldMethodCategory oldMethod oldSelector|
  4074     |oldMethodCategory oldMethod oldSelector|
  4072 
  4075 
  8597     "depending on the current nameSpace, either show a classes
  8600     "depending on the current nameSpace, either show a classes
  8598      fullname or its name without the namespace prefix (if its in the current)"
  8601      fullname or its name without the namespace prefix (if its in the current)"
  8599 
  8602 
  8600     |owner nm ns|
  8603     |owner nm ns|
  8601 
  8604 
  8602     "/ in which nameSpace is that class (or its owner) ?
       
  8603 
       
  8604     aClass isJavaClass ifTrue:[
  8605     aClass isJavaClass ifTrue:[
  8605         ^ aClass fullName "/ asString replaceAll:$/ by:$.
  8606         ^ aClass fullName "/ asString replaceAll:$/ by:$.
  8606     ].
  8607     ].
       
  8608 
       
  8609     "/ in which nameSpace is that class (or its owner) ?
  8607 
  8610 
  8608     owner := aClass topOwningClass.
  8611     owner := aClass topOwningClass.
  8609     owner notNil ifTrue:[
  8612     owner notNil ifTrue:[
  8610         ns := owner nameSpace.
  8613         ns := owner nameSpace.
  8611     ] ifFalse:[
  8614     ] ifFalse:[
  8638         ^ ns name , '::' , nm   "/ full name
  8641         ^ ns name , '::' , nm   "/ full name
  8639     ].
  8642     ].
  8640     ^ nm.
  8643     ^ nm.
  8641 
  8644 
  8642     "Created: 20.12.1996 / 17:46:41 / cg"
  8645     "Created: 20.12.1996 / 17:46:41 / cg"
  8643     "Modified: 22.3.1997 / 14:08:08 / cg"
  8646     "Modified: 31.7.1997 / 22:57:16 / cg"
  8644 !
  8647 !
  8645 
  8648 
  8646 listOfAllNamespaces
  8649 listOfAllNamespaces
  8647     "return a list of all namespaces"
  8650     "return a list of all namespaces"
  8648 
  8651 
 10476 ! !
 10479 ! !
 10477 
 10480 
 10478 !BrowserView class methodsFor:'documentation'!
 10481 !BrowserView class methodsFor:'documentation'!
 10479 
 10482 
 10480 version
 10483 version
 10481     ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.325 1997-07-31 20:42:31 cg Exp $'
 10484     ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.326 1997-07-31 21:16:08 cg Exp $'
 10482 ! !
 10485 ! !
 10483 BrowserView initialize!
 10486 BrowserView initialize!