Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-ct.88.mcz
==================== Summary ====================
Name: PreferenceBrowser-ct.88
Author: ct
Time: 15 August 2019, 1:10:30.509584 am
UUID: dd2e726b-1ef0-774c-8b31-9ecc8910866c
Ancestors: PreferenceBrowser-mt.87
Add entries "browse implementation" and "inspect preference" to the Preference item menu
=============== Diff against PreferenceBrowser-mt.87 ===============
Item was changed:
----- Method: PBPreferenceView>>offerPreferenceNameMenu: (in category 'user interface') -----
offerPreferenceNameMenu: aPreferenceBrowser
"the user clicked on a preference name -- put up a menu"
| aMenu |
aMenu := MenuMorph new
defaultTarget: self preference;
addTitle: self preference name.
(Preferences okayToChangeProjectLocalnessOf: self preference name) ifTrue:
+ [aMenu
+ addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness;
+ balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project. If this item is checked, then this preference will be printed in bold and will have a separate value for each project'].
- [aMenu addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness.
- aMenu balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project. If this item is checked, then this preference will be printed in bold and will have a separate value for each project'].
+ aMenu
+ add: 'browse senders' translated
+ target: self systemNavigation
+ selector: #browseAllSelect:name:autoSelect:
+ argumentList: {
+ [:m | self preference selectors anySatisfy: [:sel | m hasLiteral: sel]].
+ 'Preference senders: {1}' translated format: {self preference name}.
+ self preference selectors first };
+ balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference "'
+ , self preference name , '".'.
+ self preference provider ifNotNil: [
+ aMenu
+ add: 'browse implementation' translated
+ target: Browser
+ selector: #fullOnClass:selector:
+ argumentList: {
+ self preference provider class.
+ self preference selectors first };
+ balloonTextForLastItem: 'This will open a browser on the method that stores the preference "' , self preference name , '".'].
+ aMenu
+ add: 'inspect preference' translated
+ target: self preference
+ selector: #inspect;
+ balloonTextForLastItem: 'This will open an Inspector on the preference "' , self preference name , '".'.
+ aMenu
+ add: 'show category...'
+ target: aPreferenceBrowser
+ selector: #findCategoryFromPreference:
+ argument: self preference name;
+ balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.'.
- aMenu add: 'browse senders' translated target: self systemNavigation selector: #browseAllSelect:name:autoSelect: argumentList: {[:m | self preference selectors anySatisfy: [:sel | m hasLiteral: sel]]. 'Preference senders: {1}' translated format: {self preference name}. self preference selectors first}.
- aMenu balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference "', self preference name, '".'.
- aMenu add: 'show category...' target: aPreferenceBrowser selector: #findCategoryFromPreference: argument: self preference name.
- aMenu balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.'.
Smalltalk isMorphic ifTrue:
+ [aMenu
+ add: 'hand me a button for this preference'
+ target: self
+ selector: #tearOffButton;
+ balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish'].
- [aMenu add: 'hand me a button for this preference' target: self selector: #tearOffButton.
- aMenu balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish'].
+ aMenu
+ add: 'copy this name to clipboard'
+ target: self preference
+ selector: #copyName;
+ balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere'.
- aMenu add: 'copy this name to clipboard' target: self preference selector: #copyName.
- aMenu balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere'.
aMenu popUpInWorld!
Marcel Taeumel uploaded a new version of 46Deprecated to project The Trunk:
http://source.squeak.org/trunk/46Deprecated-ct.8.mcz
==================== Summary ====================
Name: 46Deprecated-ct.8
Author: ct
Time: 15 August 2019, 2:59:15.890584 am
UUID: d1c020d3-3cf4-7047-9199-2e91f9fcd256
Ancestors: 46Deprecated-mt.7
Mark deprecated Browser methods with #deprecated:
=============== Diff against 46Deprecated-mt.7 ===============
Item was changed:
----- Method: Browser>>classComment:notifying: (in category '*46Deprecated') -----
classComment: aText notifying: aPluggableTextMorph
"The user has just entered aText.
It may be all red (a side-effect of replacing the default comment), so remove the color if it is."
| theClass cleanedText redRange |
+ self deprecated: 'ct: Use #classComment: on selectedClass instead'.
theClass := self selectedClassOrMetaClass.
theClass
ifNotNil: [cleanedText := aText asText.
redRange := cleanedText rangeOf: TextColor red startingAt: 1.
redRange size = cleanedText size
ifTrue: [cleanedText
removeAttribute: TextColor red
from: 1
to: redRange last ].
theClass comment: aText stamp: Utilities changeStamp].
self changed: #classCommentText.
^ true!
Item was changed:
----- Method: Browser>>messageListSingleton (in category '*46Deprecated') -----
messageListSingleton
| name |
+ self deprecated.
name := self selectedMessageName.
^ name ifNil: [Array new]
ifNotNil: [Array with: name]!
Item was changed:
----- Method: Browser>>optionalAnnotationHeight (in category '*46Deprecated') -----
optionalAnnotationHeight
+ self deprecated.
^ 10!
Item was changed:
----- Method: Browser>>optionalButtonHeight (in category '*46Deprecated') -----
optionalButtonHeight
+ self deprecated.
^ 10!
Item was changed:
----- Method: Browser>>potentialClassNames (in category '*46Deprecated') -----
potentialClassNames
"Answer the names of all the classes that could be viewed in this browser. This hook is provided so that HierarchyBrowsers can indicate their restricted subset. For generic Browsers, the entire list of classes known to Smalltalk is provided, though of course that really only is accurate in the case of full system browsers."
+ self deprecated: 'ct: All classes can be viewed in browser without restrictions.'.
^ Smalltalk classNames!
Item was changed:
----- Method: HierarchyBrowser>>potentialClassNames (in category '*46Deprecated') -----
potentialClassNames
"Answer the names of all the classes that could be viewed in this browser"
+ self deprecated: 'ct: All classes can be viewed in browser without restrictions.'.
^ self classList collect:
[:aName | aName copyWithout: $ ]!
Marcel Taeumel uploaded a new version of 45Deprecated to project The Trunk:
http://source.squeak.org/trunk/45Deprecated-ct.27.mcz
==================== Summary ====================
Name: 45Deprecated-ct.27
Author: ct
Time: 15 August 2019, 3:02:49.486584 am
UUID: 069f1037-0192-fe41-a267-3058ef31dea8
Ancestors: 45Deprecated-eem.26
Mark deprecated Utilities>>#methodDiffFor:class:selector:prettyDiffs: with #deprecated:
=============== Diff against 45Deprecated-eem.26 ===============
Item was changed:
----- Method: Utilities class>>methodDiffFor:class:selector:prettyDiffs: (in category '*45Deprecated-miscellaneous') -----
methodDiffFor: aString class: aClass selector: aSelector prettyDiffs: prettyDiffBoolean
"Return a string comprising a source-code diff between an existing method and the source-code in aString. DO prettyDiff if prettyDiffBoolean is true."
+ self deprecated: 'Use ' , ChangeList , #>> , #methodDiffFor:class:selector:prettyDiffs: , ' instead'.
^ (aClass notNil and: [aClass includesSelector: aSelector])
ifTrue:
[TextDiffBuilder
buildDisplayPatchFrom: (aClass sourceCodeAt: aSelector)
to: aString
inClass: aClass
prettyDiffs: prettyDiffBoolean]
ifFalse:
[aString copy]!