[squeak-dev] The Trunk: Tools-mt.978.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Sat Jun 13 10:23:03 UTC 2020



For example, "BitBlt ()" means that (1) you need it as a base class and (2) you actually reference the class "BitBlt" in your code and (3) you make no extensions to that class.

For another example, "Kernel () *" means that (1) you need some class from Kernel package as base class and (2) you add extension methods to at least one class from the Kernel package. It does not reveal whether you reference a class from that Kernel package in your code.

For a last example, "Files" means that (1) you reference a class from the Files package and (2) you do not need any class as a base class from there and (3) you do not put extensions into any of those classes from Files.

Well, if there would be no hidden dependencies -- but there often are, e.g. Etoys msg sendsĀ  -- considering modularity, it is preferrable to get rid of "*" and "*exts only" first. Then go for changing "()" into "(defs only)". In any case remove the number of items in the second to fifth panes. :-D

Best,
Marcel
Am 13.06.2020 12:12:25 schrieb commits at source.squeak.org <commits at source.squeak.org>:
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.978.mcz

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

Name: Tools-mt.978
Author: mt
Time: 13 June 2020, 12:12:13.228814 pm
UUID: 2b303276-0f03-1643-80da-7a436f6d2f89
Ancestors: Tools-mt.977

In the deps browser, reveal whether there is any class-definition or extension dependency at all as early as possible.

Feel free to adjust the labels. For now, they are:

2nd / 3rd pane
... ()
... *
... () *
... *exts only
... (defs only)
4th pane:
... (class definition)
*extensions

=============== Diff against Tools-mt.977 ===============

Item was changed:
----- Method: DependencyBrowser>>classDepsList (in category 'class deps') -----
classDepsList
"Class dependencies for the currently selected package"

+ | checkDef checkExt |
+ checkDef := [:mref | mref selector = #Definition].
+ checkExt := [:mref | mref category notNil and: [mref category first = $*]].
+
^ classDepsList ifNil: [
classDepsList := self classDeps.
classDepsList := classDepsList collect: [:className |
+ String streamContents: [:label |
+ label nextPutAll: className.
+ (self depsForClassNamed: className allSatisfy: checkDef)
+ ifTrue: [label nextPutAll: ' (defs only)']
+ ifFalse: [(self depsForClassNamed: className allSatisfy: checkExt)
+ ifTrue: [label nextPutAll: ' *exts only']
+ ifFalse: [
+ (self depsForClassNamed: className anySatisfy: checkDef)
+ ifTrue: [label nextPutAll: ' ()'].
+ (self depsForClassNamed: className anySatisfy: checkExt)
+ ifTrue: [label nextPutAll: ' *']]]]]]!
- (self
- depsForClassNamed: className
- allSatisfy: [:mref | mref selector = #Definition])
- ifTrue: [className, ' (defs only)']
- ifFalse: [(self
- depsForClassNamed: className
- allSatisfy: [:mref | mref category notNil and: [mref category first = $*]])
- ifTrue: [className, ' *ext only*']
- ifFalse: [className]]].
- classDepsList]!

Item was added:
+ ----- Method: DependencyBrowser>>depsForClassNamed:anySatisfy: (in category 'enumerating') -----
+ depsForClassNamed: className anySatisfy: workBlock
+
+ self
+ depsForClassNamed: className
+ do: [:mref | (workBlock value: mref) ifTrue: [^ true]].
+ ^ false!

Item was added:
+ ----- Method: DependencyBrowser>>depsForPackageNamed:anySatisfy: (in category 'enumerating') -----
+ depsForPackageNamed: packageName anySatisfy: workBlock
+
+ self
+ depsForPackageNamed: packageName
+ do: [:mref | (workBlock value: mref) ifTrue: [^ true]].
+ ^ false!

Item was changed:
----- Method: DependencyBrowser>>packageDepsList (in category 'package deps') -----
packageDepsList
"Package dependencies for the currently selected package"

+ | checkDef checkExt |
+ checkDef := [:mref | mref selector = #Definition].
+ checkExt := [:mref | mref category notNil and: [mref category first = $*]].
+
^ packageDepsList ifNil: [
packageDepsList := self packageDeps.
packageDepsList := packageDepsList collect: [:packageName |
+ String streamContents: [:label |
+ label nextPutAll: packageName.
+ (self depsForPackageNamed: packageName allSatisfy: checkDef)
+ ifTrue: [label nextPutAll: ' (defs only)']
+ ifFalse: [(self depsForPackageNamed: packageName allSatisfy: checkExt)
+ ifTrue: [label nextPutAll: ' *exts only']
+ ifFalse: [
+ (self depsForPackageNamed: packageName anySatisfy: checkDef)
+ ifTrue: [label nextPutAll: ' ()'].
+ (self depsForPackageNamed: packageName anySatisfy: checkExt)
+ ifTrue: [label nextPutAll: ' *']]]]]]!
- (self
- depsForPackageNamed: packageName
- allSatisfy: [:mref | mref selector = #Definition])
- ifTrue: [packageName, ' (defs only)']
- ifFalse: [(self
- depsForPackageNamed: packageName
- allSatisfy: [:mref | mref category notNil and: [mref category first = $*]])
- ifTrue: [packageName, ' *ext only*']
- ifFalse: [packageName]]].
- packageDepsList]!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200613/2713a58d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 66944 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200613/2713a58d/attachment-0001.png>


More information about the Squeak-dev mailing list