[squeak-dev] The Inbox: Tools-ul.423.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Sep 4 00:53:16 UTC 2012


A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-ul.423.mcz

==================== Summary ====================

Name: Tools-ul.423
Author: ul
Time: 4 September 2012, 2:25:58.433 am
UUID: 2ca7cf6f-060f-d847-95d4-e52506e7b5e7
Ancestors: Tools-ul.422

- enh: IndentingListItemMorph's color is set by its complextContent's preferred and highlighted colors instead of hardcoded black.
- enh: PointerExplorerWrapper is gray instead of black if the wrapped item only has a weak reference to the object. The downside is that when the element is highlighted the text is hardly readable. It's because #highlightingColor is not taking into account the selection's color.
- enh: #highlightingColor is never nil, so don't check for that

Note: there are two different highlighting mechanisms. See #highlightColor vs #highlightingColor

=============== Diff against Tools-ul.422 ===============

Item was added:
+ ----- Method: IndentingListItemMorph>>defaultColor (in category 'initialization') -----
+ defaultColor
+ 
+ 	^complexContents
+ 		ifNil: [ super defaultColor ]
+ 		ifNotNil: [ complexContents preferredColor ]!

Item was changed:
  ----- Method: IndentingListItemMorph>>highlight (in category 'private-container protocol') -----
  highlight
  
+ 	self color: complexContents highlightingColor.
- 	complexContents highlightingColor ifNotNil: [self color: complexContents highlightingColor].
  	self changed.
  	
  !

Item was changed:
  ----- Method: IndentingListItemMorph>>unhighlight (in category 'drawing') -----
  unhighlight
  
+ 	self color: complexContents preferredColor.
- 	complexContents highlightingColor ifNotNil: [self color: Color black].
  	self changed.
  	
  	
  !

Item was changed:
  ObjectExplorerWrapper subclass: #PointerExplorerWrapper
+ 	instanceVariableNames: 'weakOnly'
- 	instanceVariableNames: ''
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Tools-Explorer'!
  
  !PointerExplorerWrapper commentStamp: 'avi 8/21/2004 19:58' prior: 0!
  A subclass of ObjectExplorerWrapper for use with PointerExplorer.  #contents is overridden to work backwards: it returns wrappers for the objects pointing to item rather than for the objects that item points to.!

Item was changed:
  ----- Method: PointerExplorerWrapper>>contents (in category 'accessing') -----
  contents
  	"Return the wrappers with the objects holding references to item. Eldest objects come first, weak only referencers are at the end and have parentheses around their identity hash."
  
  	| objects weakOnlyReferences |
  	objects := item inboundPointersExcluding: { self. model }.
  	weakOnlyReferences := OrderedCollection new.
  	objects removeAllSuchThat: [ :each |
  		each class == self class 
  			or: [ each class == PointerExplorer
  			or: [ (each class == MethodContext
  				and: [ each receiver class == PointerExplorer ] )
  			or: [ (each pointsOnlyWeaklyTo: item)
  				ifTrue: [ weakOnlyReferences add: each. true ]
  				ifFalse: [ false ] ] ] ] ].
  	 ^(objects replace: [ :each |	
  		self class with: each name: each identityHash asString model: item ])
  		addAll: (weakOnlyReferences replace: [ :each |
+ 			(self class with: each name: '(', each identityHash asString, ')' model: item)
+ 				weakOnly: true;
+ 				yourself ]);
- 			self class with: each name: '(', each identityHash asString, ')' model: item ]);
  		yourself!

Item was added:
+ ----- Method: PointerExplorerWrapper>>isWeakOnly (in category 'testing') -----
+ isWeakOnly
+ 
+ 	^weakOnly ifNil: [ false ] "This #ifNil: message is only here to avoid errors when updating an image with opened PointerExplorers."!

Item was added:
+ ----- Method: PointerExplorerWrapper>>preferredColor (in category 'accessing') -----
+ preferredColor
+ 
+ 	^self isWeakOnly
+ 		ifTrue: [ Color gray ]
+ 		ifFalse: [ Color black ]!

Item was added:
+ ----- Method: PointerExplorerWrapper>>weakOnly: (in category 'accessing') -----
+ weakOnly: aBoolean
+ 
+ 	weakOnly := aBoolean!



More information about the Squeak-dev mailing list