Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-ct.234.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-ct.234
Author: ct
Time: 5 August 2019, 2:50:11.900062 pm
UUID: f6987fae-9cfa-4e44-927f-247f4eeb868e
Ancestors: ToolBuilder-Morphic-mt.233
Extend #updateStyle(Now) to remove obsolete styling
A call of #updateStyle(Now) implies that the text morph is used for styling, so it is not capable of storing other styles we could accidentally delete here.
=============== Diff against ToolBuilder-Morphic-mt.233 ===============
Item was changed:
----- Method: PluggableTextMorphPlus>>updateStyle (in category 'styling') -----
updateStyle
self okToStyle
+ ifTrue: [styler styleInBackgroundProcess: textMorph contents]
+ ifFalse: [textMorph contents: textMorph contents asString].!
- ifTrue: [styler styleInBackgroundProcess: textMorph contents].!
Item was changed:
----- Method: PluggableTextMorphPlus>>updateStyleNow (in category 'styling') -----
updateStyleNow
self okToStyle
+ ifTrue: [styler style: textMorph contents]
+ ifFalse: [textMorph contents: textMorph contents asString].!
- ifTrue: [styler style: textMorph contents].!
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1254.mcz
==================== Summary ====================
Name: Kernel-mt.1254
Author: mt
Time: 4 August 2019, 4:24:58.883226 pm
UUID: 196964fd-3ccf-a948-a547-59988b7fb079
Ancestors: Kernel-mt.1253
Adds a way to check deprecation state of code artifacts.
=============== Diff against Kernel-mt.1253 ===============
Item was added:
+ ----- Method: ClassDescription>>isDeprecated (in category 'testing') -----
+ isDeprecated
+
+ ^ self category includesSubstring: 'Deprecated'!
Item was added:
+ ----- Method: CompiledMethod>>isDeprecated (in category 'testing') -----
+ isDeprecated
+ "Note that #literalsDo: is faster than #hasLiteral: (and #hasLiteral:scanForSpecial:). We already know that 'self deprecated' should be the first statement in a deprecated method, which is directly accessible in this method's literals. No need to check compiled blocks or other nested structures.
+
+ Note that both #isQuick and is-this-method check make no sense performance-wise. Maybe bench again in the future."
+
+ self literalsDo: [:literal |
+ (#deprecated = literal or: [#deprecated: = literal])
+ ifTrue: [^ true]].
+ ^ false!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.862.mcz
==================== Summary ====================
Name: Tools-mt.862
Author: mt
Time: 4 August 2019, 12:07:44.136314 pm
UUID: d52b05de-7a3d-184c-9243-32be566fcea1
Ancestors: Tools-mt.861
Merges Tools-ct.858, which I moved to treated inbox due to incompatible ancestry.
"Inspector: Try to keep field selection when changing object
Instead of unselecting the field viewed latest when another object is assigned, keep the selection unless it is no more valid (got a phantom)
Example where this is useful: debug World allMorphs, select owner in the receiver view and watch the selection while stepping a few times into #allMorphsDo:."
=============== Diff against Tools-mt.861 ===============
Item was changed:
----- Method: Inspector>>object: (in category 'accessing') -----
object: anObject
"Set anObject to be the object being inspected by the receiver."
+ | oldSelection oldFields newFields commonFieldRange |
- | oldIndex |
anObject == object
ifTrue: [self update]
ifFalse:
+ [oldSelection := selectionIndex.
+ oldFields := self fieldList.
- [oldIndex := selectionIndex <= 2 ifTrue: [selectionIndex] ifFalse: [0].
self inspect: anObject.
+ newFields := self fieldList.
+ commonFieldRange := ((1 to: (oldFields size min: newFields size))
+ select: [:i | (oldFields at: i) = (newFields at: i)])
+ ifNotEmpty: #last
+ ifEmpty: [0].
- oldIndex := oldIndex min: self fieldList size.
self changed: #inspectObject.
+ self toggleIndex: (oldSelection <= commonFieldRange
+ ifTrue: [oldSelection]
+ ifFalse: [0]).
- oldIndex > 0
- ifTrue: [self toggleIndex: oldIndex].
self changed: #fieldList.
self changed: #contents.
self changed: #helpText]!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.861.mcz
==================== Summary ====================
Name: Tools-mt.861
Author: mt
Time: 4 August 2019, 12:04:31.081314 pm
UUID: 7b061394-82bb-0941-b46b-304f857afa7c
Ancestors: Tools-mt.860
Merges Tools-ct.857, which I moved to treated inbox due to incompatible ancestry.
"Fix & refactor ChangeList>>#compareToCurrentVersion
Deduplicate the code with overridden version in ClassCommentVersionBrowser, and fix a bug: As the feature is named "compare TO current version", I expect a comparison FROM the selected item to the current version, not the opposite (same as "compare to version ...")."
=============== Diff against Tools-mt.860 ===============
Item was added:
+ ----- Method: ChangeList>>compareToCurrentSource: (in category 'menu actions') -----
+ compareToCurrentSource: currentSource
+ "If the current selection corresponds to a method in the system, then spawn a window showing the diffs as text"
+
+ | change selectedSource |
+ change := changeList at: listIndex ifAbsent: [^ self].
+ selectedSource := change string.
+ currentSource = selectedSource
+ ifTrue: [^ self inform: 'Exact Match'].
+ (StringHolder new
+ textContents: (TextDiffBuilder
+ buildDisplayPatchFrom: selectedSource
+ to: currentSource
+ inClass: change methodClass
+ prettyDiffs: self showingPrettyDiffs))
+ openLabel: 'Comparison to Current Version'.!
Item was changed:
----- Method: ChangeList>>compareToCurrentVersion (in category 'menu actions') -----
compareToCurrentVersion
"If the current selection corresponds to a method in the system, then spawn a window showing the diffs as text"
+ | change class |
+ change := changeList at: listIndex ifAbsent: [^ self].
+ class := change methodClass.
+ (class notNil and: [(class includesSelector: change methodSelector)])
+ ifFalse: [^ self flash].
+ ^ self compareToCurrentSource: (class sourceCodeAt: change methodSelector) asString!
- | change class s1 s2 |
- listIndex = 0
- ifTrue: [^ self].
- change := changeList at: listIndex.
- ((class := change methodClass) notNil
- and: [class includesSelector: change methodSelector])
- ifTrue: [s1 := (class sourceCodeAt: change methodSelector) asString.
- s2 := change string.
- s1 = s2
- ifTrue: [^ self inform: 'Exact Match'].
- (StringHolder new
- textContents: (TextDiffBuilder buildDisplayPatchFrom: s1 to: s2 inClass: class prettyDiffs: self showingPrettyDiffs))
- openLabel: 'Comparison to Current Version']
- ifFalse: [self flash]!
Item was changed:
----- Method: ClassCommentVersionsBrowser>>compareToCurrentVersion (in category 'menu') -----
compareToCurrentVersion
"If the current selection corresponds to a method in the system, then spawn a window showing the diffs as text"
+ ^ self compareToCurrentSource: classOfMethod organization classComment!
- | change s1 s2 |
- listIndex = 0
- ifTrue: [^ self].
- change := changeList at: listIndex.
- s1 := classOfMethod organization classComment.
- s2 := change string.
- s1 = s2
- ifTrue: [^ self inform: 'Exact Match'].
- (StringHolder new
- textContents: (TextDiffBuilder buildDisplayPatchFrom: s1 to: s2 inClass: classOfMethod prettyDiffs: self showingPrettyDiffs))
- openLabel: 'Comparison to Current Version'!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.860.mcz
==================== Summary ====================
Name: Tools-mt.860
Author: mt
Time: 4 August 2019, 11:47:29.338314 am
UUID: 4c9375a7-9e2f-994f-b08e-7ccb3a620b9e
Ancestors: Tools-mt.859
Merges Tools-ct.855, which I moved to treated inbox due to ancestry issues.
"Addition to last commit: Style content in ContextVariablesInspector completely according to doItReceiver (highlight instvars correctly)"
=============== Diff against Tools-mt.859 ===============
Item was changed:
----- Method: ContextVariablesInspector>>aboutToStyle:forMorph: (in category 'styling') -----
aboutToStyle: aStyler forMorph: aMorph
+ (super aboutToStyle: aStyler forMorph: aMorph)
+ ifFalse: [^ false].
+ aStyler
+ classOrMetaClass: self doItReceiver class;
+ context: self doItContext.
+ ^ true!
- aStyler context: self object.
- ^ super aboutToStyle: aStyler forMorph: aMorph!