--- a/Tools_MethodList.st Wed Aug 17 15:22:29 2011 +0200
+++ b/Tools_MethodList.st Thu Aug 18 02:16:52 2011 +0200
@@ -96,46 +96,46 @@
the UIPainter may not be able to read the specification."
"
- UIPainter new openOnClass:MethodList andSelector:#windowSpec
- MethodList new openInterface:#windowSpec
- MethodList open
+ UIPainter new openOnClass:Tools::MethodList andSelector:#windowSpec
+ Tools::MethodList new openInterface:#windowSpec
+ Tools::MethodList open
"
<resource: #canvas>
^
- #(#FullSpec
- #name: #windowSpec
- #window:
- #(#WindowSpec
- #label: 'SelectorList'
- #name: 'SelectorList'
- #min: #(#Point 0 0)
- #bounds: #(#Rectangle 12 22 312 322)
+ #(FullSpec
+ name: windowSpec
+ window:
+ (WindowSpec
+ label: 'SelectorList'
+ name: 'SelectorList'
+ min: (Point 0 0)
+ bounds: (Rectangle 0 0 300 300)
)
- #component:
- #(#SpecCollection
- #collection: #(
- #(#SequenceViewSpec
- #name: 'List'
- #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
- #tabable: true
- #model: #selectedMethodNameIndices
- #menu: #menuHolder
- #hasHorizontalScrollBar: true
- #hasVerticalScrollBar: true
- #miniScrollerHorizontal: true
- #isMultiSelect: true
- #valueChangeSelector: #selectionChangedByClick
- #useIndex: true
- #sequenceList: #browserNameList
- #doubleClickChannel: #doubleClickChannel
- #properties:
- #(#PropertyListDictionary
- #dragArgument: nil
- #dropArgument: nil
- #canDropSelector: #canDropContext:
- #dropSelector: #doDropContext:
+ component:
+ (SpecCollection
+ collection: (
+ (SequenceViewSpec
+ name: 'List'
+ layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+ tabable: true
+ model: selectedMethodNameIndices
+ menu: menuHolder
+ hasHorizontalScrollBar: true
+ hasVerticalScrollBar: true
+ miniScrollerHorizontal: true
+ isMultiSelect: true
+ valueChangeSelector: selectionChangedByClick
+ useIndex: true
+ sequenceList: browserNameList
+ doubleClickChannel: doubleClickChannel
+ properties:
+ (PropertyListDictionary
+ canDropSelector: canDropContext:
+ dragArgument: nil
+ dropArgument: nil
+ dropSelector: doDropContext:
)
)
)
@@ -158,8 +158,8 @@
(if this app is embedded in a subCanvas)."
^ #(
- "/ #classHolder
- #(#doubleClickChannel #action )
+ #(doubleClickChannel action)
+ #filterClassVars
#forceGeneratorTrigger
#immediateUpdate
#inGeneratorHolder
@@ -168,18 +168,16 @@
#packageFilter
#selectedMethods
#selectionChangeCondition
+ #showCoverageInformation
+ #showImageResourceMethodsImages
+ #showMethodComplexity
+ #showMethodInheritance
+ #showMethodTypeIcon
+ #sortBy
#updateTrigger
#variableFilter
- #filterClassVars
- #showMethodInheritance
- #showMethodComplexity
- #showMethodTypeIcon
- #showImageResourceMethodsImages
- #sortBy
- #showCoverageInformation
).
- "Modified: / 27-04-2010 / 16:13:57 / cg"
! !
!MethodList methodsFor:'aspects'!
@@ -906,6 +904,40 @@
!MethodList methodsFor:'private'!
+isMethodToBeShown:aMethod
+ "invoked, when we get a change for aMethod which was previously not
+ in the list (for example, if I show a filtered list).
+ Check if that single method is to be shown now.
+ Used to speed up update for senders/string/implementors lists"
+
+ |generator|
+
+ generator := inGeneratorHolder value.
+ generator isNil ifTrue:[
+ ^ false
+ ].
+
+ "/ generator generates nil-selector entries
+ "/ to pass multiple-class and multiple-protocol info
+
+ generator do:[:cls :cat :sel :mthd |
+ mthd == aMethod ifTrue:[
+ mthd isSynthetic ifFalse:[
+ sel notNil ifTrue:[
+ (packageFilter value isNil
+ or:[ packageFilter value includes:mthd package ]) ifTrue:[
+ ^ true
+ ]
+ ]
+ ].
+ ^ false
+ ]
+ ].
+ ^ false
+
+ "Created: / 17-08-2011 / 15:03:34 / cg"
+!
+
listOfMethodNames
|methods entries selectorBag newNameList allClasses newClasses
allCategories "allSelectors"
@@ -1435,12 +1467,15 @@
]
].
idx == 0 ifTrue:[
- self invalidateList
+ "/ method was not previously shown; try to avoid a full update
+ (self isMethodToBeShown:aMethod) ifTrue:[
+ self invalidateList
+ ].
] ifFalse:[
self browserNameList at:idx put:s.
]
- "Modified: / 08-08-2011 / 17:10:10 / cg"
+ "Modified: / 17-08-2011 / 15:05:02 / cg"
! !
!MethodList methodsFor:'private-presentation'!
@@ -1703,9 +1738,9 @@
!MethodList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.57 2011-08-08 16:27:33 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.58 2011-08-18 00:16:52 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.57 2011-08-08 16:27:33 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.58 2011-08-18 00:16:52 cg Exp $'
! !