[squeak-dev] The Trunk: Tools-cmm.601.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Apr 22 02:33:02 UTC 2015
Chris Muller uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cmm.601.mcz
==================== Summary ====================
Name: Tools-cmm.601
Author: cmm
Time: 21 April 2015, 9:32:35.388 pm
UUID: 9a860ff9-21b9-48b6-9613-8a5f0303877b
Ancestors: Tools-cmm.600
- Added "Show System-Category in Hierarchy Browsers" so that HierarchyBrowsers may prefer to show their systemCategory or not.
- Let the new layout frame for FileContentsBrowser play nicely with the horizontal smart-splitter algorithm; by not making a one-line list.
=============== Diff against Tools-cmm.600 ===============
Item was changed:
----- Method: Browser>>selectClassNamed: (in category 'class list') -----
selectClassNamed: aSymbolOrString
| className currentMessageCategoryName currentMessageName |
currentMessageCategoryName := [self selectedMessageCategoryName]
on: Error
do: [:ex| ex return: nil].
currentMessageName := [self selectedMessageName]
on: Error
do: [:ex| ex return: nil].
selectedClassName := aSymbolOrString ifNotNil: [ aSymbolOrString asSymbol ].
self setClassOrganizer.
self setClassDefinition.
"Try to reselect the category and/or selector if the new class has them."
selectedMessageCategoryName :=(self messageCategoryList includes: currentMessageCategoryName)
ifTrue: [currentMessageCategoryName]
ifFalse: [nil].
selectedMessageName := (self messageList includes: currentMessageName)
ifTrue: [currentMessageName]
ifFalse: [nil].
self hasMessageSelected ifTrue:
[self editSelection: #editMessage] ifFalse:
[self hasMessageCategorySelected ifTrue:
[self editSelection: #newMessage] ifFalse:
[self classCommentIndicated
ifTrue: [self editSelection: #editComment]
ifFalse: [self editSelection: (self hasClassSelected not
ifTrue: [(metaClassIndicated or: [ self hasSystemCategorySelected not ])
ifTrue: [#none]
ifFalse: [#newClass]]
ifFalse: [#editClass])]]].
contents := nil.
self selectedClass isNil
ifFalse: [className := self selectedClass name.
(RecentClasses includes: className)
ifTrue: [RecentClasses remove: className].
RecentClasses addFirst: className.
RecentClasses size > 16
ifTrue: [RecentClasses removeLast]].
self changed: #classSelectionChanged.
self changed: #classCommentText.
self changed: #classListIndex. "update my selection"
self changed: #messageCategoryList.
self changed: #messageList.
self changed: #relabel.
+ self changed: #selectedSystemCategoryName.
self contentsChanged!
Item was changed:
----- Method: FileContentsBrowser>>buildSystemCatListSingletonWith: (in category 'toolbuilder') -----
+ buildSystemCatListSingletonWith: aToolBuilder
- buildSystemCatListSingletonWith: builder
"Overwritten to change callbacks for menu and keyboard interaction."
+ ^ aToolBuilder pluggableInputFieldSpec new
+ model: self ;
+ getText: #selectedSystemCategoryName ;
+ setText: nil ;
+ " keyPress: #systemCatSingletonKey:from: ;
+ " menu: #packageListMenu:shifted:;
+ " keyPress: #packageListKey:from:;
+ " yourself!
-
- ^ (super buildSystemCatListSingletonWith: builder)
- menu: #packageListMenu:shifted:;
- keyPress: #packageListKey:from:;
- yourself!
Item was changed:
Browser subclass: #HierarchyBrowser
instanceVariableNames: 'classDisplayList centralClass'
+ classVariableNames: 'ShowSystemCategory'
- classVariableNames: ''
poolDictionaries: ''
category: 'Tools-Browser'!
!HierarchyBrowser commentStamp: 'fbs 3/9/2011 12:02' prior: 0!
I provide facilities to explore classes in the context of their subclass hierarchy.
My classDisplayList instvar uses indentation to show the subclassing relationship between the displayed classes.
!
Item was added:
+ ----- Method: HierarchyBrowser class>>showSystemCategory (in category 'preferences') -----
+ showSystemCategory
+ <preference: 'Show System-Category in Hierarchy Browsers'
+ category: 'Morphic'
+ description: 'When true, hierarchy browsers will include a widget which reports the system category.'
+ type: #Boolean>
+ ^ ShowSystemCategory ifNil: [ true ]!
Item was added:
+ ----- Method: HierarchyBrowser class>>showSystemCategory: (in category 'preferences') -----
+ showSystemCategory: aBoolean
+ ShowSystemCategory := aBoolean!
Item was added:
+ ----- Method: HierarchyBrowser>>openSystemCatEditString: (in category 'toolbuilder') -----
+ openSystemCatEditString: aString
+ "Create a pluggable version of all the views for a Browser, including views and controllers. The top list view is of the currently selected system class category--a single item list."
+ "Example:
+ Browser new browseAllClasses.
+ "
+ | builder catPaneHeight max |
+ self class showSystemCategory ifTrue: [ ^ super openSystemCatEditString: aString ].
+ catPaneHeight := Preferences standardListFont height + 5 "top margin/border" + 5 "bottom margin/border".
+ builder := ToolBuilder default.
+ max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4].
+ ^self buildWindowWith: builder specs: {
+ (self classListFrame: max fromTop: 0 fromLeft: 0 width: 0.333) -> [self buildClassListWith: builder].
+ (self switchesFrame: max fromLeft: 0 width: 0.333) -> [self buildSwitchesWith: builder].
+ (LayoutFrame fractions: (0.333 at 0 corner: 0.666 at max) offsets: (0 at 0 corner: 0 at 0)) -> [self buildMessageCategoryListWith: builder].
+ (LayoutFrame fractions: (0.666 at 0 corner: 1 at max) offsets: (0 at 0 corner: 0 at 0)) -> [self buildMessageListWith: builder].
+ (0 at max corner: 1 at 1) -> [self buildCodePaneWith: builder].
+ }!
More information about the Squeak-dev
mailing list
|