--- a/BrowserView.st Wed Apr 17 22:19:06 1996 +0200
+++ b/BrowserView.st Thu Apr 18 13:36:45 1996 +0200
@@ -437,17 +437,19 @@
box := self enterBoxForCodeSelectionTitle:'class to find:' okText:'find'.
box entryCompletionBlock:[:contents |
- |s what m|
-
- s := contents withoutSpaces.
- what := Smalltalk classnameCompletion:s.
- box contents:what first.
- (what at:2) size ~~ 1 ifTrue:[
- device beep
- ]
+ |s what m|
+
+ s := contents withoutSpaces.
+ what := Smalltalk classnameCompletion:s.
+ box contents:what first.
+ (what at:2) size ~~ 1 ifTrue:[
+ device beep
+ ]
].
box action:[:aString | self switchToClassNameMatching:aString].
box showAtPointer
+
+ "Modified: 18.4.1996 / 13:26:00 / cg"
!
classCategoryFindMethod
@@ -515,6 +517,7 @@
currentClassCategory isNil ifTrue:[
labels := #(
'clone'
+ 'open for class ...'
'spawn full class'
'-'
'update'
@@ -527,6 +530,7 @@
).
selectors := #(
classCategoryClone
+ classCategoryOpenInClass
classCategorySpawnFullClass
nil
classCategoryUpdate
@@ -557,6 +561,7 @@
'printOut protocol'
'-'
'clone'
+ 'open for class ...'
'SPAWN_CATEGORY'
'spawn full class'
'-'
@@ -577,6 +582,7 @@
classCategoryPrintOutProtocol
nil
classCategoryClone
+ classCategoryOpenInClass
classCategorySpawn
classCategorySpawnFullClass
nil
@@ -621,7 +627,7 @@
^ m
"Created: 14.9.1995 / 10:50:17 / claus"
- "Modified: 7.3.1996 / 13:43:55 / cg"
+ "Modified: 18.4.1996 / 13:26:21 / cg"
!
classCategoryNewCategory
@@ -657,6 +663,26 @@
box showAtPointer
!
+classCategoryOpenInClass
+ |box|
+
+ box := self enterBoxForCodeSelectionTitle:'class to find:' okText:'find'.
+ box entryCompletionBlock:[:contents |
+ |s what m|
+
+ s := contents withoutSpaces.
+ what := Smalltalk classnameCompletion:s.
+ box contents:what first.
+ (what at:2) size ~~ 1 ifTrue:[
+ device beep
+ ]
+ ].
+ box action:[:aString | (SystemBrowser open) switchToClassNameMatching:aString].
+ box showAtPointer
+
+ "Modified: 18.4.1996 / 13:27:36 / cg"
+!
+
classCategoryPrintOut
|printStream|
@@ -2869,53 +2895,63 @@
str := aString.
classSymbol := aString asSymbolIfInterned.
classSymbol isNil ifTrue:[
- (aString endsWith:'class') ifTrue:[
- str := aString copyWithoutLast:5.
- classSymbol := str asSymbolIfInterned.
- classSymbol isNil ifTrue:[
- ^ self
- ].
- meta := true
- ].
+ (aString endsWith:'class') ifTrue:[
+ str := aString copyWithoutLast:5.
+ classSymbol := str asSymbolIfInterned.
+ classSymbol isNil ifTrue:[
+ ^ self
+ ].
+ meta := true
+ ].
].
theClass := Smalltalk at:classSymbol.
(theClass isNil and:[str endsWith:'class']) ifTrue:[
- str := str copyWithoutLast:5.
- classSymbol := str asSymbolIfInterned.
- classSymbol isNil ifTrue:[
- ^ self
- ].
- meta := true.
- theClass := Smalltalk at:classSymbol.
+ str := str copyWithoutLast:5.
+ classSymbol := str asSymbolIfInterned.
+ classSymbol isNil ifTrue:[
+ ^ self
+ ].
+ meta := true.
+ theClass := Smalltalk at:classSymbol.
+ ].
+
+ classCategoryListView notNil ifTrue:[
+ classCategoryListView list size == 0 ifTrue:[
+ classCategoryListView list:(self listOfAllClassCategories).
+ ]
].
theClass == currentClass ifTrue:[^ self].
theClass isBehavior ifTrue:[
- classCategoryListView notNil ifTrue:[
- currentClassHierarchy isNil ifTrue:[
- ((newCat := theClass category) ~= currentClassCategory) ifTrue:[
- currentClassCategory := newCat.
- newCat isNil ifTrue:[
- element := '* no category *'
- ] ifFalse:[
- element := newCat.
- ].
- classCategoryListView selectElement:element.
- "/ classCategoryListView makeSelectionVisible.
- ]
- ]
- ].
- self updateClassList.
- self switchToClass:theClass.
-
- classListView selectElement:str.
- self instanceProtocol:meta not.
- self classSelectionChanged
+ classCategoryListView notNil ifTrue:[
+ currentClassHierarchy isNil ifTrue:[
+ ((newCat := theClass category) ~= currentClassCategory) ifTrue:[
+ currentClassCategory := newCat.
+ newCat isNil ifTrue:[
+ element := '* no category *'
+ ] ifFalse:[
+ element := newCat.
+ ].
+ classCategoryListView selectElement:element.
+ "/ classCategoryListView makeSelectionVisible.
+ ]
+ ]
+ ].
+ self updateClassList.
+ self switchToClass:theClass.
+
+ classListView selectElement:str.
+ self instanceProtocol:meta not.
+ self classSelectionChanged.
+ classCategoryListView notNil ifTrue:[
+ classCategoryListView selectElement:theClass category
+ ]
]
"Modified: 1.9.1995 / 01:41:35 / claus"
+ "Modified: 18.4.1996 / 13:33:52 / cg"
!
updateClassList
@@ -3339,66 +3375,68 @@
v := classCategoryListView.
v notNil ifTrue:[
- v action:[:lineNr | self classCategorySelection:lineNr].
- v selectConditionBlock:checkBlock.
- v ignoreReselect:false.
- v contents:(self listOfAllClassCategories).
- "
- tell classCategoryListView to ask for the menu
- "
- v menuHolder:self; menuPerformer:self; menuMessage:#classCategoryMenu.
+ v action:[:lineNr | self classCategorySelection:lineNr].
+ v selectConditionBlock:checkBlock.
+ v ignoreReselect:false.
+ v list size == 0 ifTrue:[
+ v list:(self listOfAllClassCategories).
+ ].
+ "
+ tell classCategoryListView to ask for the menu
+ "
+ v menuHolder:self; menuPerformer:self; menuMessage:#classCategoryMenu.
].
v := classListView.
v notNil ifTrue:[
- v action:[:lineNr | self classSelection:lineNr].
- v selectConditionBlock:checkBlock.
- v ignoreReselect:false.
- "
- tell classListView to ask for the menu
- "
- v menuHolder:self; menuPerformer:self; menuMessage:#classMenu.
+ v action:[:lineNr | self classSelection:lineNr].
+ v selectConditionBlock:checkBlock.
+ v ignoreReselect:false.
+ "
+ tell classListView to ask for the menu
+ "
+ v menuHolder:self; menuPerformer:self; menuMessage:#classMenu.
].
v := methodCategoryListView.
v notNil ifTrue:[
- v action:[:lineNr | self methodCategorySelection:lineNr].
- v selectConditionBlock:checkBlock.
- v ignoreReselect:false.
- "
- tell methodCategoryListView to ask for the menu
- "
- v menuHolder:self; menuPerformer:self; menuMessage:#methodCategoryMenu.
+ v action:[:lineNr | self methodCategorySelection:lineNr].
+ v selectConditionBlock:checkBlock.
+ v ignoreReselect:false.
+ "
+ tell methodCategoryListView to ask for the menu
+ "
+ v menuHolder:self; menuPerformer:self; menuMessage:#methodCategoryMenu.
].
v := methodListView.
v notNil ifTrue:[
- v action:[:lineNr | self methodSelection:lineNr].
- v selectConditionBlock:checkBlock.
- v ignoreReselect:false.
- "
- tell methodListView to ask for the menu
- "
- v menuHolder:self; menuPerformer:self; menuMessage:#methodMenu.
+ v action:[:lineNr | self methodSelection:lineNr].
+ v selectConditionBlock:checkBlock.
+ v ignoreReselect:false.
+ "
+ tell methodListView to ask for the menu
+ "
+ v menuHolder:self; menuPerformer:self; menuMessage:#methodMenu.
].
v := classMethodListView.
v notNil ifTrue:[
- v action:[:lineNr | self classMethodSelection:lineNr].
- v selectConditionBlock:checkBlock.
- v ignoreReselect:false.
- "
- tell classMethodListView to ask for the menu
- "
- v menuHolder:self; menuPerformer:self; menuMessage:#classMethodMenu.
+ v action:[:lineNr | self classMethodSelection:lineNr].
+ v selectConditionBlock:checkBlock.
+ v ignoreReselect:false.
+ "
+ tell classMethodListView to ask for the menu
+ "
+ v menuHolder:self; menuPerformer:self; menuMessage:#classMethodMenu.
].
v := variableListView.
v notNil ifTrue:[
- v action:[:lineNr | self variableSelection:lineNr].
- v ignoreReselect:false.
- v toggleSelect:true.
- v menuHolder:self; menuPerformer:self; menuMessage:#variableListMenu.
+ v action:[:lineNr | self variableSelection:lineNr].
+ v ignoreReselect:false.
+ v toggleSelect:true.
+ v menuHolder:self; menuPerformer:self; menuMessage:#variableListMenu.
].
"
@@ -3407,8 +3445,10 @@
initially
"
currentClassHierarchy notNil ifTrue:[
- classListView scrollToBottom.
+ classListView scrollToBottom.
]
+
+ "Modified: 18.4.1996 / 13:34:05 / cg"
!
terminate
@@ -6986,6 +7026,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.125 1996-04-16 18:45:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.126 1996-04-18 11:36:45 cg Exp $'
! !
BrowserView initialize!