--- a/BrowserView.st Wed Sep 05 15:06:08 2001 +0200
+++ b/BrowserView.st Wed Sep 05 15:06:30 2001 +0200
@@ -622,6 +622,912 @@
"Modified: / 28.5.1998 / 12:22:58 / cg"
! !
+!BrowserView class methodsFor:'menu specs'!
+
+menuSpec
+ "This resource specification was automatically generated
+ by the MenuEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the MenuEditor may not be able to read the specification."
+
+ "
+ MenuEditor new openOnClass:BrowserView andSelector:#menuSpec
+ (Menu new fromLiteralArrayEncoding:(BrowserView menuSpec)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Browse'
+ #translateLabel: true
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Clone'
+ #translateLabel: true
+ #value: #browserClone
+ )
+ #(#MenuItem
+ #label: 'Open for Class...'
+ #translateLabel: true
+ #value: #browserOpenInClass
+ )
+ #(#MenuItem
+ #label: 'Spawn Full Class Browser'
+ #translateLabel: true
+ #value: #browserSpawnFullClass
+ )
+ #(#MenuItem
+ #label: 'Spawn Extensions Browser'
+ #translateLabel: true
+ #value: #browserSpawnExtensions
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Exit'
+ #translateLabel: true
+ #value: #closeRequest
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: 'Category'
+ #translateLabel: true
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'FileOut As...'
+ #translateLabel: true
+ #value: #classCategoryFileOutAs
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: 'FileOut Each in...'
+ #translateLabel: true
+ #value: #classCategoryFileOutEachIn
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: 'FileOut Each Binary in...'
+ #translateLabel: true
+ #value: #classCategoryFileOutBinaryEach
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: 'PrintOut'
+ #translateLabel: true
+ #value: #classCategoryPrintOut
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: 'PrintOut Protocol'
+ #translateLabel: true
+ #value: #classCategoryPrintOutProtocol
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Spawn Category'
+ #translateLabel: true
+ #value: #classCategorySpawn
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Find class...'
+ #translateLabel: true
+ #value: #classCategoryFindClass
+ )
+ #(#MenuItem
+ #label: 'Find method...'
+ #translateLabel: true
+ #value: #classCategoryFindMethod
+ )
+ #(#MenuItem
+ #label: 'Visited history'
+ #translateLabel: true
+ #submenuChannel: #classHistoryMenu
+ )
+ #(#MenuItem
+ #label: 'Changed history'
+ #translateLabel: true
+ #submenuChannel: #changeHistoryMenu
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'New class category...'
+ #translateLabel: true
+ #value: #classCategoryNewCategory
+ )
+ #(#MenuItem
+ #label: 'Rename...'
+ #translateLabel: true
+ #value: #classCategoryRename
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: 'Remove...'
+ #translateLabel: true
+ #value: #classCategoryRemove
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Repository'
+ #translateLabel: true
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Repository history...'
+ #translateLabel: true
+ #value: #classCategoryRepositoryHistory
+ )
+ #(#MenuItem
+ #label: 'Validate class revisions'
+ #translateLabel: true
+ #value: #classCategoryValidateClassRevisions
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Checkin each...'
+ #translateLabel: true
+ #value: #classCategoryCheckinEach
+ #enabled: #hasClassCategorySelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Load from repository...'
+ #translateLabel: true
+ #value: #classCategoryLoadFromRepository
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Update'
+ #translateLabel: true
+ #value: #classCategoryUpdate
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: 'Class'
+ #translateLabel: true
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'FileOut As...'
+ #translateLabel: true
+ #value: #classFileOutAs
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'FileOut Binary as...'
+ #translateLabel: true
+ #value: #classFileOutBinaryAs
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'PrintOut'
+ #translateLabel: true
+ #value: #classPrintOut
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'PrintOut Protocol'
+ #translateLabel: true
+ #value: #classPrintOutProtocol
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Spawn'
+ #translateLabel: true
+ #enabled: #hasClassSelected
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Class'
+ #translateLabel: true
+ #value: #classSpawn
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Full Protocol'
+ #translateLabel: true
+ #value: #classSpawnFullProtocol
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Hierarchy'
+ #translateLabel: true
+ #value: #classSpawnHierarchy
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: 'Subclasses'
+ #translateLabel: true
+ #value: #classSpawnSubclasses
+ #enabled: #hasLoadedClassSelected
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: 'References to Class'
+ #translateLabel: true
+ #value: #classRefs
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: 'Find Response to...'
+ #translateLabel: true
+ #value: #methodFindAnyMethod
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Show'
+ #translateLabel: true
+ #enabled: #hasClassSelected
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Hierarchy'
+ #translateLabel: true
+ #value: #classHierarchy
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: 'Definition'
+ #translateLabel: true
+ #value: #classDefinition
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: 'Comment'
+ #translateLabel: true
+ #value: #classComment
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Class Instvars'
+ #translateLabel: true
+ #value: #classClassInstVars
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Primitive Definitions'
+ #translateLabel: true
+ #value: #classPrimitiveDefinitions
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Primitive Variables'
+ #translateLabel: true
+ #value: #classPrimitiveVariables
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Primitive Functions'
+ #translateLabel: true
+ #value: #classPrimitiveFunctions
+ #enabled: #hasLoadedClassSelected
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: 'Documentation'
+ #translateLabel: true
+ #value: #classDocumentation
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Save Documentation as...'
+ #translateLabel: true
+ #value: #classDocumentationAs
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'New'
+ #translateLabel: true
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Class...'
+ #translateLabel: true
+ #value: #classNewClass
+ )
+ #(#MenuItem
+ #label: 'Subclass...'
+ #translateLabel: true
+ #value: #classNewSubclass
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Private Class...'
+ #translateLabel: true
+ #value: #classNewPrivateClass
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Application...'
+ #translateLabel: true
+ #value: #classNewApplication
+ )
+ #(#MenuItem
+ #label: 'Dialog...'
+ #translateLabel: true
+ #value: #classNewDialog
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Rename...'
+ #translateLabel: true
+ #value: #classRename
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Remove...'
+ #translateLabel: true
+ #value: #classRemove
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Repository'
+ #translateLabel: true
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Package...'
+ #translateLabel: true
+ #value: #classModifyPackage
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: 'Source Container...'
+ #translateLabel: true
+ #value: #classModifyContainer
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Remove Source Container...'
+ #translateLabel: true
+ #value: #classRemoveContainer
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Revision Log...'
+ #translateLabel: true
+ #value: #classRevisionInfo
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: 'Compare with Repository'
+ #translateLabel: true
+ #value: #classCompareWithRepository
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Check into Source Repository...'
+ #translateLabel: true
+ #value: #classCheckin
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Load from Repository...'
+ #translateLabel: true
+ #value: #classLoadRevision
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Others'
+ #translateLabel: true
+ #enabled: #hasLoadedClassSelected
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Inspect Class'
+ #translateLabel: true
+ #value: #classInspect
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: 'Inspect Instances'
+ #translateLabel: true
+ #value: #classInstancesInspect
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: 'Inspect Derived Instances'
+ #translateLabel: true
+ #value: #classDerivedInstancesInspect
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Make private in...'
+ #translateLabel: true
+ #value: #classMakePrivate
+ #enabled: #hasClassSelected
+ )
+ #(#MenuItem
+ #label: 'Make public...'
+ #translateLabel: true
+ #value: #classMakePublic
+ #enabled: #hasClassSelected
+ )
+ )
+ nil
+ nil
+ )
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: 'Protocol'
+ #translateLabel: true
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'FileOut'
+ #translateLabel: true
+ #value: #methodCategoryFileOut
+ #enabled: #hasMethodCategorySelected
+ )
+ #(#MenuItem
+ #label: 'FileOut All'
+ #translateLabel: true
+ #value: #methodCategoryFileOutAll
+ #enabled: #hasMethodCategorySelected
+ )
+ #(#MenuItem
+ #label: 'PrintOut'
+ #translateLabel: true
+ #value: #methodCategoryPrintOut
+ #enabled: #hasMethodCategorySelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Spawn'
+ #translateLabel: true
+ #value: #methodCategorySpawn
+ #enabled: #hasMethodCategorySelected
+ )
+ #(#MenuItem
+ #label: 'Spawn Category'
+ #translateLabel: true
+ #value: #methodCategorySpawnCategory
+ #enabled: #hasMethodCategorySelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'New Category...'
+ #translateLabel: true
+ #value: #methodCategoryNewCategory
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Copy Category...'
+ #translateLabel: true
+ #value: #methodCategoryCopyCategory
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Rename...'
+ #translateLabel: true
+ #value: #methodCategoryRename
+ #enabled: #hasMethodCategorySelected
+ )
+ #(#MenuItem
+ #label: 'Remove...'
+ #translateLabel: true
+ #value: #methodCategoryRemove
+ #enabled: #hasMethodCategorySelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Generate'
+ #translateLabel: true
+ #enabled: #hasLoadedClassSelected
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Documentation Stubs'
+ #translateLabel: true
+ #isVisible: #showingClass
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Initial Application Code'
+ #translateLabel: true
+ #isVisible: #showingClassAndIsApplicationSubclass
+ #value: #methodCategoryCreateApplicationMethods
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Initial Dialog Code'
+ #translateLabel: true
+ #isVisible: #showingClassAndIsDialogSubclass
+ #value: #methodCategoryCreateApplicationMethods
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Access methods (for selected variable)'
+ #translateLabel: true
+ #isVisible: #showingInstanceAndHasVariableSelected
+ #value: #methodCategoryCreateAccessMethods
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Access methods with change notification (for selected variable)'
+ #translateLabel: true
+ #isVisible: #showingInstanceAndHasVariableSelected
+ #value: #methodCategoryCreateAccessMethodsWithChange
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Access methods (for all)'
+ #translateLabel: true
+ #value: #methodCategoryCreateAccessMethods
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Access methods with change notification (for all)'
+ #translateLabel: true
+ #value: #methodCategoryCreateAccessMethodsWithChange
+ #enabled: #hasLoadedClassSelected
+ )
+ #(#MenuItem
+ #label: 'Standard update method template'
+ #translateLabel: true
+ #isVisible: #showingInstance
+ #value: #methodCategoryCreateUpdateMethod
+ #enabled: #hasLoadedClassSelected
+ )
+ )
+ nil
+ nil
+ )
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: 'Selector'
+ #translateLabel: true
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'FileOut'
+ #translateLabel: true
+ #value: #methodFileOut
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: 'PrintOut'
+ #translateLabel: true
+ #value: #methodPrintOut
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Spawn'
+ #translateLabel: true
+ #value: #methodSpawn
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: 'Inheritance'
+ #translateLabel: true
+ #value: #methodInheritance
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Senders...'
+ #translateLabel: true
+ #value: #methodSenders
+ )
+ #(#MenuItem
+ #label: 'Implementors...'
+ #translateLabel: true
+ #value: #methodImplementors
+ )
+ #(#MenuItem
+ #label: 'Globals...'
+ #translateLabel: true
+ #value: #methodGlobalReferends
+ )
+ #(#MenuItem
+ #label: 'String search...'
+ #translateLabel: true
+ #value: #methodStringSearch
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'New'
+ #translateLabel: true
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Method'
+ #translateLabel: true
+ #value: #methodNewMethod
+ #enabled: #hasMethodCategorySelected
+ )
+ #(#MenuItem
+ #label: 'Window spec'
+ #translateLabel: true
+ #isVisible: #showingClassAndHasMethodCategorySelectedAndIsApplicationSubclass
+ #value: #methodNewWindowSpec
+ )
+ #(#MenuItem
+ #label: 'Menu spec'
+ #translateLabel: true
+ #isVisible: #showingClassAndHasMethodCategorySelectedAndIsApplicationSubclass
+ #value: #methodNewMenuSpec
+ )
+ #(#MenuItem
+ #label: 'Image spec'
+ #translateLabel: true
+ #isVisible: #showingClassAndHasMethodCategorySelectedAndIsApplicationSubclass
+ #value: #methodNewImageSpec
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: 'Copy to...'
+ #translateLabel: true
+ #value: #methodCopy
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: 'Move to...'
+ #translateLabel: true
+ #value: #methodMove
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: 'Remove...'
+ #translateLabel: true
+ #value: #methodRemove
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Debug'
+ #translateLabel: true
+ #enabled: #hasMethodSelected
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Breakpoint'
+ #translateLabel: true
+ #value: #methodBreakPoint
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: 'Others'
+ #translateLabel: true
+ #enabled: #hasMethodSelected
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Compare with Previous'
+ #translateLabel: true
+ #value: #methodCompareWithPreviousVersion
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: 'Compare against...'
+ #translateLabel: true
+ #value: #methodCompareSource
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Inspect method'
+ #translateLabel: true
+ #value: #methodInspect
+ #enabled: #hasMethodSelected
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'stc-compile'
+ #translateLabel: true
+ #value: #methodSTCCompile
+ )
+ #(#MenuItem
+ #label: 'Decompile'
+ #translateLabel: true
+ #value: #methodDecompile
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Package...'
+ #translateLabel: true
+ #value: #methodModifyPackage
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Make public'
+ #translateLabel: true
+ #value: #methodMakePublic
+ )
+ #(#MenuItem
+ #label: 'Make private'
+ #translateLabel: true
+ #value: #methodMakePrivate
+ )
+ #(#MenuItem
+ #label: 'Make protected'
+ #translateLabel: true
+ #value: #methodMakeProtected
+ )
+ #(#MenuItem
+ #label: 'Make ignored'
+ #translateLabel: true
+ #value: #methodMakeIgnored
+ )
+ )
+ nil
+ nil
+ )
+ )
+ )
+ nil
+ nil
+ )
+ )
+ #(#MenuItem
+ #label: 'Help'
+ #translateLabel: true
+ #startGroup: #right
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Browser Documentation'
+ #translateLabel: true
+ #value: #openBrowserDocumentation
+ )
+ )
+ nil
+ nil
+ )
+ )
+ )
+ nil
+ nil
+ )
+! !
+
!BrowserView methodsFor:'change & update'!
delayedUpdate:something with:someArgument from:changedObject
@@ -1035,13 +1941,14 @@
!BrowserView methodsFor:'class category list menu'!
-classCategoryClone
+browserClone
"open a new SystemBrowser showing the same method as I do"
|brwsr|
brwsr := SystemBrowser openInClass:actualClass selector:currentSelector.
brwsr notNil ifTrue:[
+ brwsr extent:(self topView extent).
environment ~~ Smalltalk ifTrue:[
brwsr environment:environment.
brwsr switchToClassNamed:actualClass name.
@@ -1056,6 +1963,58 @@
"Modified: 14.9.1995 / 10:59:31 / claus"
!
+browserOpenInClass
+ "find a class - and open a browser (by default)"
+
+ self classCategoryFindClassOpen:true
+
+ "Modified: 15.1.1997 / 22:55:32 / cg"
+!
+
+browserSpawnExtensions
+ "create a new SystemBrowser browsing all extensions"
+
+ self withBusyCursorDo:[
+ |brwsr methods|
+
+ methods := IdentitySet new.
+ environment allClassesDo:[:eachClass |
+ |classPackage|
+
+ classPackage := eachClass package.
+ eachClass methodDictionary keysAndValuesDo:[:sel :mthd |
+ mthd package ~= classPackage ifTrue:[ methods add:mthd ].
+ ].
+ eachClass theMetaclass methodDictionary keysAndValuesDo:[:sel :mthd |
+ mthd package ~= classPackage ifTrue:[ methods add:mthd ].
+ ].
+ ].
+
+ brwsr := SystemBrowser browseMethods:methods title:'All Class extensions'.
+ brwsr notNil ifTrue:[brwsr environment:environment].
+ ]
+
+ "Modified: 18.8.1997 / 15:42:58 / cg"
+!
+
+browserSpawnFullClass
+ "create a new SystemBrowser browsing full class"
+
+ |brwsr|
+
+ self withBusyCursorDo:[
+ brwsr := SystemBrowser browseFullClasses.
+ brwsr environment:environment.
+" "
+ currentClass notNil ifTrue:[
+ brwsr switchToClassNamed:(currentClass name)
+ ]
+" "
+ ]
+
+ "Modified: 18.8.1997 / 15:43:01 / cg"
+!
+
classCategoryFileOut
"create a file 'categoryName.st' consisting of all classes in current category
into the current projects defaultDirectory."
@@ -1454,20 +2413,20 @@
currentClassCategory notNil ifTrue:[
items := #(
- ('fileOut each binary...' classCategoryFileOutBinaryEach )
+ ('FileOut each binary...' classCategoryFileOutBinaryEach )
('-' nil )
- ('repository history...' classCategoryRepositoryHistory )
- ('validate class revisions' classCategoryValidateClassRevisions )
+ ('Repository history...' classCategoryRepositoryHistory )
+ ('Validate class revisions' classCategoryValidateClassRevisions )
('-' nil )
- ('checkin each...' classCategoryCheckinEach )
+ ('Checkin each...' classCategoryCheckinEach )
('-' nil )
- ('load from repository...' classCategoryLoadFromRepository )
+ ('Load from repository...' classCategoryLoadFromRepository )
).
] ifFalse:[
items := #(
- ('repository history...' classCategoryRepositoryHistory )
+ ('Repository history...' classCategoryRepositoryHistory )
('-' nil )
- ('load from repository...' classCategoryLoadFromRepository)
+ ('Load from repository...' classCategoryLoadFromRepository)
).
].
@@ -1505,49 +2464,49 @@
"/ ('namespace...' namespaceDialog )
"/ ('-' nil )
- ('clone' classCategoryClone )
- ('open for class...' classCategoryOpenInClass )
- ('spawn full class' classCategorySpawnFullClass )
- ('class extensions' classCategorySpawnExtensions )
+ ('Clone' browserClone )
+ ('Open for class...' browserOpenInClass )
+ ('Spawn full class' browserSpawnFullClass )
+ ('Class extensions' browserSpawnExtensions )
('-' nil )
- ('update' classCategoryUpdate )
- ('find class...' classCategoryFindClass #Find )
- ('find method...' classCategoryFindMethod )
- ('visited history' classHistoryMenu )
- ('changed history' changeHistoryMenu )
+ ('Update' classCategoryUpdate )
+ ('Find class...' classCategoryFindClass #Find )
+ ('Find method...' classCategoryFindMethod )
+ ('Visited history' classHistoryMenu )
+ ('Changed history' changeHistoryMenu )
('-' nil )
- ('new class category...' classCategoryNewCategory #Cmdn )
+ ('New class category...' classCategoryNewCategory #Cmdn )
('=' nil )
- ('others' otherMenu #Ctrl )
+ ('Others' otherMenu #Ctrl )
).
] ifFalse:[
items := #(
- ('fileOut' classCategoryFileOut )
- ('fileOut as...' classCategoryFileOutAs )
- ('fileOut each' classCategoryFileOutEach )
- ('fileOut each in...' classCategoryFileOutEachIn )
- ('printOut' classCategoryPrintOut )
- ('printOut protocol' classCategoryPrintOutProtocol )
+ ('FileOut' classCategoryFileOut )
+ ('FileOut as...' classCategoryFileOutAs )
+ ('FileOut each' classCategoryFileOutEach )
+ ('FileOut each in...' classCategoryFileOutEachIn )
+ ('PrintOut' classCategoryPrintOut )
+ ('PrintOut protocol' classCategoryPrintOutProtocol )
('-' nil )
"/ ('namespace...' namespaceDialog )
"/ ('-' nil )
- ('clone' classCategoryClone Cmdc )
- ('open for class...' classCategoryOpenInClass Cmdo )
+ ('Clone' browserClone Cmdc )
+ ('Open for class...' browserOpenInClass Cmdo )
('SPAWN_CATEGORY' classCategorySpawn )
- ('spawn full class' classCategorySpawnFullClass )
- ('class extensions' classCategorySpawnExtensions )
+ ('Spawn full class' browserSpawnFullClass )
+ ('Class extensions' browserSpawnExtensions )
('-' nil )
- ('update' classCategoryUpdate )
- ('find class...' classCategoryFindClass Find )
- ('find method...' classCategoryFindMethod )
- ('visited history' classHistoryMenu )
- ('changed history' changeHistoryMenu )
+ ('Update' classCategoryUpdate )
+ ('Find class...' classCategoryFindClass Find )
+ ('Find method...' classCategoryFindMethod )
+ ('Visited history' classHistoryMenu )
+ ('Changed history' changeHistoryMenu )
('-' nil )
- ('new class category...' classCategoryNewCategory Cmdn )
- ('rename...' classCategoryRename )
- ('remove...' classCategoryRemove )
+ ('New class category...' classCategoryNewCategory Cmdn )
+ ('Rename...' classCategoryRename )
+ ('Remove...' classCategoryRemove )
('=' nil )
- ('others' otherMenu Ctrl )
+ ('Others' otherMenu Ctrl )
).
].
@@ -1556,8 +2515,8 @@
resources:resources.
m subMenuAt:#otherMenu put:specialMenu.
- m subMenuAt:#classHistoryMenu put:self classHistoryMenu.
- ((ChangeSet current size == 0) or:[(subMenu := self changeHistoryMenu) isNil]) ifTrue:[
+ m subMenuAt:#classHistoryMenu put:self classHistoryPopUpMenu.
+ ((ChangeSet current size == 0) or:[(subMenu := self changeHistoryPopUpMenu) isNil]) ifTrue:[
m disable:#changeHistoryMenu
] ifFalse:[
m subMenuAt:#changeHistoryMenu put:subMenu.
@@ -1571,7 +2530,7 @@
classCategoryRename classCategoryRemove)
].
(currentClassCategory = '* obsolete *') ifTrue:[
- m disableAll:#(classCategorySpawn classCategorySpawnFullClass)
+ m disableAll:#(classCategorySpawn browserSpawnFullClass)
].
self environment ~~ Smalltalk ifTrue:[
@@ -1613,14 +2572,6 @@
"Modified: / 10.4.1998 / 12:25:29 / cg"
!
-classCategoryOpenInClass
- "find a class - and open a browser (by default)"
-
- self classCategoryFindClassOpen:true
-
- "Modified: 15.1.1997 / 22:55:32 / cg"
-!
-
classCategoryPrintOut
|printStream|
@@ -1805,50 +2756,6 @@
"Modified: 18.8.1997 / 15:42:58 / cg"
!
-classCategorySpawnExtensions
- "create a new SystemBrowser browsing all extensions"
-
- self withBusyCursorDo:[
- |brwsr methods|
-
- methods := IdentitySet new.
- environment allClassesDo:[:eachClass |
- |classPackage|
-
- classPackage := eachClass package.
- eachClass methodDictionary keysAndValuesDo:[:sel :mthd |
- mthd package ~= classPackage ifTrue:[ methods add:mthd ].
- ].
- eachClass theMetaclass methodDictionary keysAndValuesDo:[:sel :mthd |
- mthd package ~= classPackage ifTrue:[ methods add:mthd ].
- ].
- ].
-
- brwsr := SystemBrowser browseMethods:methods title:'All Class extensions'.
- brwsr notNil ifTrue:[brwsr environment:environment].
- ]
-
- "Modified: 18.8.1997 / 15:42:58 / cg"
-!
-
-classCategorySpawnFullClass
- "create a new SystemBrowser browsing full class"
-
- |brwsr|
-
- self withBusyCursorDo:[
- brwsr := SystemBrowser browseFullClasses.
- brwsr environment:environment.
-" "
- currentClass notNil ifTrue:[
- brwsr switchToClassNamed:(currentClass name)
- ]
-" "
- ]
-
- "Modified: 18.8.1997 / 15:43:01 / cg"
-!
-
classCategoryUpdate
"update class category list and dependants"
@@ -2657,9 +3564,50 @@
changes := ChangeSet current.
hist := OrderedCollection new.
+ labels := Set new.
+
+ menu := Menu new receiver:self.
+ n := 0.
+ nMax := self class classHistoryMaxSize.
+ changes reverseDo:[:aChange |
+ |item|
+
+ n < nMax ifTrue:[
+ aChange isMethodChange ifTrue:[
+ item := aChange printString.
+ (labels includes:item) ifFalse:[
+ labels add:item.
+ n := n + 1.
+
+ menu addItem:(MenuItem new
+ label: item;
+ value: #switchBackToMessageNamed:;
+ argument: item;
+ activeHelpKey: #historyMenuItem).
+ ]
+ ].
+ ].
+ ].
+ n = 0 ifTrue:[
+ ^ nil
+ ].
+ ^ menu
+
+ "Modified: / 10.2.2000 / 14:05:34 / cg"
+!
+
+changeHistoryPopUpMenu
+ "returns a popup menu to navigate
+ to the last few changes"
+
+ <resource: #programMenu >
+
+ |labels selectors args changes hist n nMax|
+
+ changes := ChangeSet current.
+ hist := OrderedCollection new.
labels := OrderedCollection new.
- menu := Menu new.
n := 0.
nMax := self class classHistoryMaxSize.
changes reverseDo:[:aChange |
@@ -2693,19 +3641,47 @@
<resource: #programMenu >
+ |menu|
+
+ self class checkClassHistory.
+
+ ClassHistory isEmpty ifTrue: [ ^ self ].
+
+ menu := Menu new receiver:self.
+ ClassHistory do:[:clsName |
+ menu addItem:(MenuItem new
+ label: clsName;
+ value: #switchBackToMessageNamed:;
+ argument: clsName).
+ ].
+
+"/ menu addSeparator.
+"/ menu addItem:(MenuItem new
+"/ label: (resources string:'empty history');
+"/ value: #emptyClassHistory:).
+"/
+ ^ menu
+!
+
+classHistoryPopUpMenu
+ "returns a popup menu to navigate to
+ the last visited classes"
+
+ <resource: #programMenu >
+
|labels selectors args|
self class checkClassHistory.
ClassHistory notEmpty ifTrue: [
labels := ClassHistory collect: [:clsName| clsName upTo: $ ].
- labels add: '-';add:(resources string:'empty history').
selectors := Array new: ClassHistory size.
selectors atAllPut:#switchBackToMessageNamed:.
selectors := selectors asOrderedCollection.
- selectors add: nil; add:#emptyClassHistory.
args := ClassHistory copy.
- args add: nil; add: nil.
+"/ labels add: '-';add:(resources string:'empty history').
+"/ selectors add: nil; add:#emptyClassHistory.
+"/ args add: nil; add: nil.
] ifFalse: [
labels := resources string:#('empty history').
].
@@ -3376,33 +4352,33 @@
currentClass isNil ifTrue:[
items := #(
- ('fileIn new from repository...' classLoadNewRevision)
+ ('Load from repository...' classLoadRevision)
).
] ifFalse:[
items := #(
- ('fileOut binary' classFileOutBinary )
- ('fileOut binary as...' classFileOutBinaryAs )
+ ('FileOut binary' classFileOutBinary )
+ ('FileOut binary as...' classFileOutBinaryAs )
('-' nil )
- ('inspect class' classInspect )
- ('inspect instances' classInstancesInspect )
- ('inspect derived instances' classDerivedInstancesInspect )
+ ('Inspect class' classInspect )
+ ('Inspect instances' classInstancesInspect )
+ ('Inspect derived instances' classDerivedInstancesInspect )
('-' nil )
- ('make private class...' classMakePrivate )
- ('make public class' classMakePublic )
+ ('Make private class...' classMakePrivate )
+ ('Make public class' classMakePublic )
('-' nil )
- ('primitive definitions' classPrimitiveDefinitions )
- ('primitive variables' classPrimitiveVariables )
- ('primitive functions' classPrimitiveFunctions )
+ ('Primitive definitions' classPrimitiveDefinitions )
+ ('Primitive variables' classPrimitiveVariables )
+ ('Primitive functions' classPrimitiveFunctions )
('-' nil )
- ('package...' classModifyPackage )
- ('source container...' classModifyContainer )
- ('remove source container...' classRemoveContainer )
+ ('Package...' classModifyPackage )
+ ('Source container...' classModifyContainer )
+ ('Remove source container...' classRemoveContainer )
('-' nil )
- ('revision log' classRevisionInfo )
- ('compare with repository...' classCompareWithRepository )
+ ('Revision log' classRevisionInfo )
+ ('Compare with repository...' classCompareWithRepository )
('-' nil )
- ('check into source repository...' classCheckin )
- ('fileIn from repository...' classLoadRevision )
+ ('Check into source repository...' classCheckin )
+ ('Load from repository...' classLoadRevision )
).
].
@@ -3473,60 +4449,60 @@
currentClass isNil ifTrue:[
items := #(
- ('new class' classNewClass Cmdn)
- ('new application' classNewApplication)
- ('new dialog' classNewDialog)
+ ('New Class' classNewClass Cmdn)
+ ('New Application' classNewApplication)
+ ('New Dialog' classNewDialog)
).
] ifFalse:[
currentClass isLoaded ifFalse:[
items := #(
- ('documentation' classDocumentation )
- ('save documentation as...' classDocumentationAs )
+ ('Documentation' classDocumentation )
+ ('Save Documentation as...' classDocumentationAs )
('-' nil )
- ('class refs' classRefs )
+ ('References to Class' classRefs )
('-' nil )
- ('new class' classNewClass Cmdn )
- ('new application' classNewApplication )
- ('new dialog' classNewDialog )
- ('remove...' classRemove )
+ ('New Class' classNewClass Cmdn )
+ ('New Application' classNewApplication )
+ ('New Dialog' classNewDialog )
+ ('Remove...' classRemove )
('-' nil )
- ('load' classLoad Cmdl )
+ ('Load' classLoad Cmdl )
).
] ifTrue:[
fullProtocol ifTrue:[
items := #(
- ('hierarchy' classHierarchy )
- ('definition' classDefinition )
- ('documentation' classDocumentation Cmdd )
- ('save documentation as...' classDocumentationAs )
- ('comment' classComment )
- ('class instvars' classClassInstVars )
+ ('Hierarchy' classHierarchy )
+ ('Definition' classDefinition )
+ ('Documentation' classDocumentation Cmdd )
+ ('Save Documentation as...' classDocumentationAs )
+ ('Comment' classComment )
+ ('Class Instvars' classClassInstVars )
).
] ifFalse:[
items := #(
- ('fileOut' classFileOut )
- ('fileOut as...' classFileOutAs )
- ('printOut' classPrintOut )
- ('printOut protocol' classPrintOutProtocol )
+ ('FileOut' classFileOut )
+ ('FileOut as...' classFileOutAs )
+ ('PrintOut' classPrintOut )
+ ('PrintOut protocol' classPrintOutProtocol )
('-' nil )
).
classCategoryListView isNil ifTrue:[
"/ a hierarchy or subclass-browser.
items := items , #(
- ('browse' classCategoryClone )
+ ('Browse' browserClone )
).
].
items := items , #(
- ('spawn...' spawnMenu )
+ ('Spawn...' spawnMenu )
('-' nil )
).
spawnItems := #(
- ('class' classSpawn )
- ('full protocol' classSpawnFullProtocol )
- ('hierarchy' classSpawnHierarchy )
- ('subclasses' classSpawnSubclasses )
+ ('Class' classSpawn )
+ ('Full protocol' classSpawnFullProtocol )
+ ('Hierarchy' classSpawnHierarchy )
+ ('Subclasses' classSpawnSubclasses )
).
spawnMenu := PopUpMenu
itemList:spawnItems
@@ -3534,40 +4510,40 @@
fullClass ifFalse:[
items := items , #(
- ('hierarchy' classHierarchy )
- ('definition' classDefinition )
- ('documentation' classDocumentation Cmdd )
- ('save documentation as...' classDocumentationAs )
- ('comment' classComment )
- ('class instvars' classClassInstVars )
+ ('Hierarchy' classHierarchy )
+ ('Definition' classDefinition )
+ ('Documentation' classDocumentation Cmdd )
+ ('Save Documentation as...' classDocumentationAs )
+ ('Comment' classComment )
+ ('Class Instvars' classClassInstVars )
('-' nil )
).
].
items := items , #(
- ('class refs' classRefs )
- ('-' nil )
- ('new...' newClassMenu)
+ ('References to Class' classRefs )
+ ('-' nil )
+ ('New...' newClassMenu)
).
newClassMenu := PopUpMenu
itemList:#(
- ('class' classNewClass Cmdn )
- ('subclass' classNewSubclass )
- ('private class' classNewPrivateClass )
- ('application' classNewApplication )
- ('dialog' classNewDialog )
+ ('Class' classNewClass Cmdn )
+ ('Subclass' classNewSubclass )
+ ('Private class' classNewPrivateClass )
+ ('Application' classNewApplication )
+ ('Dialog' classNewDialog )
)
resources:resources.
items := items , #(
- ('rename...' classRename )
- ('remove...' classRemove )
+ ('Rename...' classRename )
+ ('Remove...' classRemove )
).
currentClass wasAutoloaded ifTrue:[
items := items , #(
- ('unload' classUnload)
+ ('Unload' classUnload)
).
]
]
@@ -3576,7 +4552,7 @@
items := items , #(
('=' nil )
- ('others' otherMenu Ctrl)
+ ('Others' otherMenu Ctrl)
).
m := PopUpMenu itemList:items resources:resources.
@@ -4395,6 +5371,10 @@
"load a specific revision into the system - especially useful to
upgrade a class to the newest revision"
+ currentClass isNil ifTrue:[
+ ^ self classLoadNewRevision.
+ ].
+
currentClass isLoaded ifFalse:[
self warn:'cannot load specific releases of autoloaded classes.'.
^ self.
@@ -6317,8 +7297,8 @@
view == classCategoryListView ifTrue:[
(key == #Find) ifTrue:[^ self classCategoryFindClass].
(untranslatedKey == #Cmdn) ifTrue:[^ self classCategoryNewCategory].
- (untranslatedKey == #Cmdc) ifTrue:[^ self classCategoryClone].
- (untranslatedKey == #Cmdo) ifTrue:[^ self classCategoryOpenInClass].
+ (untranslatedKey == #Cmdc) ifTrue:[^ self browserClone].
+ (untranslatedKey == #Cmdo) ifTrue:[^ self browserOpenInClass].
].
view == classListView ifTrue:[
@@ -6617,6 +7597,7 @@
variableListView := v scrolledView.
variableListView delegate:self.
+ variableListView toggleSelect:true.
wScr := v scrollBar preferredExtent x.
wScrHalf := wScr // 2.
@@ -6749,10 +7730,24 @@
^ s
!
+pullDownMenu
+ "return the top (pullDown) menu"
+
+ <resource: #programMenu>
+
+ |m|
+
+ m := self class menuSpec.
+ m := m decodeAsLiteralArray.
+ m receiver:self.
+ m findGuiResourcesIn:self.
+ ^ m.
+!
+
setupForAll
"create subviews for a full browser"
- |vpanel hpanel frame v spc nsHolder hMax|
+ |vpanel hpanel frame v spc nsHolder hMax menuPanel mH|
styleSheet is3D ifTrue:[
spc := ViewSpacing.
@@ -6760,7 +7755,15 @@
spc := 0
].
- vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
+ menuPanel := MenuPanel in:self.
+ menuPanel level:1.
+ menuPanel verticalLayout:false.
+ menuPanel receiver:self.
+ menuPanel menu:(self pullDownMenu).
+ mH := menuPanel preferredExtent y.
+ menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)).
+
+ vpanel := VariableVerticalPanel origin:(0.0 @ mH) corner:(1.0 @ 1.0) in:self.
vpanel snapMode:#both.
hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
@@ -7701,6 +8704,10 @@
(I'm tired of typing)"
self checkClassSelected ifFalse:[^ self].
+ (actualClass includesSelector:#'update:with:from:') ifTrue:[
+ self warn:'class already implements #update:with:from:\\No code generated.' withCRs.
+ ^ self
+ ].
self withBusyCursorDo:[
|txt|
@@ -7708,8 +8715,7 @@
"/ add a windowSpec method for an empty applicationWindow,
"/ with a menuPanel.
- (actualClass includesSelector:#'update:with:from:') ifFalse:[
- txt :=
+ txt :=
'update:something with:aParameter from:changedObject
"Invoked when an object that I depend upon sends a change notification."
@@ -7721,14 +8727,13 @@
"/ ].
super update:something with:aParameter from:changedObject
'.
- Compiler
- compile:txt
- forClass:actualClass
- inCategory:'change & update'.
-
- self instanceProtocol:true.
- self switchToMethodNamed:#'update:with:from:'
- ].
+ Compiler
+ compile:txt
+ forClass:actualClass
+ inCategory:'change & update'.
+
+ self instanceProtocol:true.
+ self switchToMethodNamed:#'update:with:from:'
]
"Modified: / 10.2.2000 / 13:47:17 / cg"
@@ -7835,19 +8840,19 @@
disableFlag := false.
showInstance ifFalse:[
items := #(
- ( 'documentation stubs' methodCategoryCreateDocumentationMethods)
+ ( 'Documentation stubs' methodCategoryCreateDocumentationMethods)
).
(currentClass isSubclassOf:ApplicationModel) ifTrue:[
(currentClass isSubclassOf:SimpleDialog) ifTrue:[
items := items , #(
- ( 'initial dialog code' methodCategoryCreateApplicationMethods)
+ ( 'Initial dialog code' methodCategoryCreateApplicationMethods)
).
] ifFalse:[
"/ ((currentClass class implements:#windowSpec)
"/ and:[currentClass class implements:#mainMenu]) ifFalse:[
items := items , #(
- ( 'initial application code' methodCategoryCreateApplicationMethods)
+ ( 'Initial application code' methodCategoryCreateApplicationMethods)
).
"/ ]
]
@@ -7855,11 +8860,11 @@
] ifTrue:[
(variableListView notNil
and:[(varSel := variableListView selectionValue) notNil]) ifTrue:[
- s1 := 'access methods (for ''%1'')'.
- s2 := 'access methods with change message (for ''%1'')'.
+ s1 := 'Access methods (for ''%1'')'.
+ s2 := 'Access methods with change message (for ''%1'')'.
] ifFalse:[
- s1 := 'access methods (for all)'.
- s2 := 'access methods with change message (for all)'.
+ s1 := 'Access methods (for all)'.
+ s2 := 'Access methods with change message (for all)'.
disableFlag := currentClass instVarNames size == 0
].
s1 := resources string:s1 with:varSel.
@@ -7872,7 +8877,7 @@
with:#methodCategoryCreateAccessMethodsWithChange).
items := items , #(
- ( 'standard update method template' methodCategoryCreateUpdateMethod)
+ ( 'Standard update method template' methodCategoryCreateUpdateMethod)
).
].
codeMenu := PopUpMenu itemList:items resources:resources.
@@ -7887,35 +8892,39 @@
currentMethodCategory notNil ifTrue:[
items := #(
- ('fileOut' methodCategoryFileOut )
- ('fileOut all' methodCategoryFileOutAll )
- ('printOut' methodCategoryPrintOut )
+ ('FileOut' methodCategoryFileOut )
+ ('FileOut all' methodCategoryFileOutAll )
+ ('PrintOut' methodCategoryPrintOut )
('-' )
('SPAWN_METHODCATEGORY' methodCategorySpawn )
- ('spawn category' methodCategorySpawnCategory )
+ ('Spawn Category' methodCategorySpawnCategory )
).
] ifFalse:[
items := #().
].
-
+ items size > 0 ifTrue:[
items := items , #(
- ('new category...' methodCategoryNewCategory Cmdn )
- ('copy category...' methodCategoryCopyCategory )
+ ('-' )
+ ).
+ ].
+ items := items , #(
+ ('New Category...' methodCategoryNewCategory Cmdn )
+ ('Copy Category...' methodCategoryCopyCategory )
).
currentMethodCategory notNil ifTrue:[
items := items , #(
('-' )
- ('rename...' methodCategoryRename )
- ('remove...' methodCategoryRemove )
+ ('Rename...' methodCategoryRename )
+ ('Remove...' methodCategoryRemove )
).
].
codeMenu notNil ifTrue:[
items := items , #(
('-' )
- ('generate' codeMenu)
+ ('Generate' codeMenu)
).
].
@@ -8980,48 +9989,48 @@
currentMethod isCountingMemoryUsage ifTrue:[
brkItems := #(
('-' nil)
- ('stop mem usage' methodStopMemoryUsage)
- ('reset mem count' methodResetMemoryUsage)
+ ('Stop mem usage' methodStopMemoryUsage)
+ ('Reset mem count' methodResetMemoryUsage)
).
] ifFalse:[
currentMethod isCounting ifTrue:[
brkItems := #(
('-' nil )
- ('stop counting' methodStopCounting)
- ('reset count' methodResetCounting)
+ ('Stop counting' methodStopCounting)
+ ('Reset count' methodResetCounting)
).
] ifFalse:[
currentMethod isTimed ifTrue:[
brkItems := #(
('-' nil )
- ('stop timing' methodStopTiming)
- ('reset times' methodResetTiming)
+ ('Stop timing' methodStopTiming)
+ ('Reset times' methodResetTiming)
).
] ifFalse:[
currentMethod isTraced ifTrue:[
brkItems := #(
('-' nil )
- ('remove trace' methodRemoveBreakOrTrace)
+ ('Remove trace' methodRemoveBreakOrTrace)
).
] ifFalse:[
currentMethod isBreakpointed ifTrue:[
brkItems := #(
('-' nil )
- ('remove breakpoint' methodRemoveBreakOrTrace)
+ ('Remove breakpoint' methodRemoveBreakOrTrace)
).
] ifFalse:[
brkItems := #(
('-' nil )
- ('breakpoint' methodBreakPoint )
- ('breakpoint in...' methodBreakPointInProcess )
+ ('Breakpoint' methodBreakPoint )
+ ('Breakpoint in...' methodBreakPointInProcess )
('-' nil )
- ('trace' methodTrace )
- ('trace sender' methodTraceSender )
- ('trace full walkback' methodTraceFull )
+ ('Trace' methodTrace )
+ ('Trace sender' methodTraceSender )
+ ('Trace full walkback' methodTraceFull )
('-' nil )
- ('start timing' methodStartTiming )
- ('start counting' methodStartCounting )
- ('start mem usage' methodStartMemoryUsage )
+ ('Start timing' methodStartTiming )
+ ('Start counting' methodStartCounting )
+ ('Start mem usage' methodStartMemoryUsage )
).
]
]
@@ -9031,38 +10040,38 @@
currentMethod isJavaMethod ifTrue:[
items := #(
- ('compare source...' methodCompareSource )
- ('inspect method' methodInspect )
- ('decompile' methodDecompile )
+ ('Compare against...' methodCompareSource )
+ ('Inspect Method' methodInspect )
+ ('Decompile' methodDecompile )
('-' nil )
- ('flush code' methodFlushCode )
+ ('Flush code' methodFlushCode )
).
items := items , brkItems.
] ifFalse:[
items := #(
- ('compare source...' methodCompareSource )
- ('inspect method' methodInspect )
+ ('Compare against...' methodCompareSource )
+ ('Inspect Method' methodInspect )
('stc-compile' methodSTCCompile )
- ('decompile' methodDecompile )
+ ('Decompile' methodDecompile )
('-' nil )
- ('package...' methodModifyPackage )
+ ('Package...' methodModifyPackage )
).
Method methodPrivacySupported ifTrue:[
items := items , #(
('-' nil )
- ('make public' methodMakePublic )
- ('make private' methodMakePrivate )
- ('make protected' methodMakeProtected )
- ('make ignored' methodMakeIgnored )
+ ('Make public' methodMakePublic )
+ ('Make private' methodMakePrivate )
+ ('Make protected' methodMakeProtected )
+ ('Make ignored' methodMakeIgnored )
).
].
actualClass isMeta ifTrue:[
items := #(
- ('invoke method' methodInvoke )
+ ('Invoke method' methodInvoke )
('-' nil )
)
, items.
@@ -9125,14 +10134,14 @@
sepMthdItems := #().
searchItems := #(
- ('senders...' methodSenders Cmds)
- ('implementors...' methodImplementors Cmdi)
- ('globals...' methodGlobalReferends Cmdg)
- ('string search...' methodStringSearch Cmdt)
- ('apropos...' methodAproposSearch )
+ ('Senders...' methodSenders Cmds)
+ ('Implementors...' methodImplementors Cmdi)
+ ('Globals...' methodGlobalReferends Cmdg)
+ ('String search...' methodStringSearch Cmdt)
+ ('Apropos...' methodAproposSearch )
('-' )
- ('find method here...' methodFindMethod )
- ('find method...' methodFindAnyMethod )
+ ('Find Method here...' methodFindMethod )
+ ('Find Method...' methodFindAnyMethod )
).
currentMethodCategory notNil ifTrue:[
@@ -9142,14 +10151,14 @@
and:[showInstance not
and:[currentClass isSubclassOf:ApplicationModel]]) ifTrue:[
newItems := #(
- ('new method' methodNewMethod )
- ('new window spec' methodNewWindowSpec )
- ('new menu spec' methodNewMenuSpec )
- ('new image spec' methodNewImageSpec )
+ ('New Method' methodNewMethod )
+ ('New Window spec' methodNewWindowSpec )
+ ('New Menu spec' methodNewMenuSpec )
+ ('New Image spec' methodNewImageSpec )
).
] ifFalse:[
newItems := #(
- ('new method' methodNewMethod)
+ ('New Method' methodNewMethod)
).
].
sepMthdItems := #(('-')).
@@ -9159,24 +10168,24 @@
currentMethod notNil ifTrue:[
fileItems := #(
- ('fileOut' methodFileOut )
- ('printOut' methodPrintOut )
+ ('FileOut' methodFileOut )
+ ('PrintOut' methodPrintOut )
('-' nil )
('SPAWN_METHOD' methodSpawn )
- ('inheritance' methodInheritance )
+ ('Inheritance' methodInheritance )
('-' nil )
).
sepLocalItems := #(('-')).
mthdItems := #(
- ('change category...' methodChangeCategory )
- ('move to...' methodMove )
- ('copy to...' methodCopy )
- ('remove' methodRemove )
+ ('Change Category...' methodChangeCategory )
+ ('Copy to...' methodCopy )
+ ('Move to...' methodMove )
+ ('Remove' methodRemove )
('-' nil )
- ('compare with previous' methodCompareWithPreviousVersion )
- ('back to previous' methodPreviousVersion )
+ ('Compare with Previous' methodCompareWithPreviousVersion )
+ ('Back to previous' methodPreviousVersion )
).
] ifFalse:[
@@ -9199,7 +10208,7 @@
specialMenu notNil ifTrue:[
items := items , #(
('=' )
- ('others' otherMenu Ctrl)
+ ('Others' otherMenu Ctrl)
).
].
@@ -10516,6 +11525,10 @@
"Modified: / 31.3.1998 / 23:40:04 / cg"
!
+openBrowserDocumentation
+ HTMLDocumentView openFullOnDocumentationFile:'tools/sbrowser/TOP.html'
+!
+
processName
"the name of my process - for the processMonitor only"
@@ -12691,6 +13704,66 @@
^ self fetchIcon:#trace selector:#traceIcon
! !
+!BrowserView methodsFor:'private queries'!
+
+hasClassCategorySelected
+ ^ currentClassCategory notNil
+!
+
+hasClassCategorySelectedHolder
+ ^ [ self hasClassCategorySelected ]
+!
+
+hasClassSelected
+ ^ currentClass notNil
+!
+
+hasClassSelectedHolder
+ ^ [ self hasClassSelected ]
+!
+
+hasLoadedClassSelected
+ ^ currentClass notNil and:[currentClass isLoaded]
+!
+
+hasMethodCategorySelected
+ ^ currentMethodCategory notNil
+!
+
+hasMethodSelected
+ ^ currentMethod notNil
+!
+
+showingClass
+ ^ showInstance not
+!
+
+showingClassAndHasMethodCategorySelectedAndIsApplicationSubclass
+ ^ self showingClass and:[self hasMethodCategorySelected]
+!
+
+showingClassAndIsApplicationSubclass
+ ^ showInstance not
+ and:[ currentClass notNil
+ and:[ currentClass isSubclassOf:ApplicationModel ]]
+!
+
+showingClassAndIsDialogSubclass
+ ^ showInstance not
+ and:[ currentClass notNil
+ and:[ currentClass isSubclassOf:Dialog ]]
+!
+
+showingInstance
+ ^ showInstance
+!
+
+showingInstanceAndHasVariableSelected
+ ^ showInstance
+ and:[ variableListView notNil
+ and:[ variableListView selectionValue notNil ]]
+! !
+
!BrowserView methodsFor:'syntax coloring'!
startSyntaxHighlightProcess
@@ -13753,6 +14826,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.662 2001-09-03 17:08:24 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.663 2001-09-05 13:06:30 cg Exp $'
! !
BrowserView initialize!