The Inbox: Tools-ct.872.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Tools-ct.872.mcz

commits-2
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-ct.872.mcz

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

Name: Tools-ct.872
Author: ct
Time: 10 August 2019, 4:22:44.436412 pm
UUID: 6f7c43d3-d25c-e942-9dbe-02d41e4c1092
Ancestors: Tools-mt.870

Refactor CodeHolder>>#buildOptionalButtonsWith:

Add knob #wantsCodeProvenanceButton instead of overriding the toolbuilder method. Change decomposition. Refines Debugger's optional buttons layout (see #extraDebuggerButtons preference), hide the gap at the right of the buttons.

=============== Diff against Tools-mt.870 ===============

Item was removed:
- ----- Method: CodeHolder>>addCodeProvenanceButtonTo:using: (in category 'toolbuilder') -----
- addCodeProvenanceButtonTo: panelSpec using: builder
- panelSpec children add: (self buildCodeProvenanceButtonWith: builder)!

Item was changed:
  ----- Method: CodeHolder>>buildOptionalButtonsWith: (in category 'toolbuilder') -----
  buildOptionalButtonsWith: builder
 
  | panelSpec |
  panelSpec := builder pluggablePanelSpec new.
  panelSpec children: OrderedCollection new.
  self optionalButtonPairs do:[:spec|
  | buttonSpec |
  buttonSpec := builder pluggableActionButtonSpec new.
  buttonSpec model: self.
  buttonSpec label: spec first.
  buttonSpec action: spec second.
  spec second == #methodHierarchy
  ifTrue:[buttonSpec
  enabled: #inheritanceButtonEnabled;
  color: #inheritanceButtonColor].
  spec second == #browseVersions
  ifTrue:[buttonSpec enabled: #versionsButtonEnabled].
  spec size > 2 ifTrue:[buttonSpec help: spec third].
  panelSpec children add: buttonSpec].
 
  "What to show"
+ self wantsCodeProvenanceButton ifTrue: [
+ panelSpec children
+ add: builder pluggableSpacerSpec new;
+ add: (self buildCodeProvenanceButtonWith: builder)].
- panelSpec children add: builder pluggableSpacerSpec new.
- self addCodeProvenanceButtonTo: panelSpec using: builder.
 
  panelSpec layout: #horizontal. "buttons"
  ^panelSpec!

Item was added:
+ ----- Method: CodeHolder>>wantsCodeProvenanceButton (in category 'what to show') -----
+ wantsCodeProvenanceButton
+
+ ^ true!

Item was removed:
- ----- Method: Debugger>>addCodeProvenanceButtonTo:using: (in category 'toolbuilder') -----
- addCodeProvenanceButtonTo: panelSpec using: builder
- "No thanks!!"!

Item was added:
+ ----- Method: Debugger>>wantsCodeProvenanceButton (in category 'toolbuilder') -----
+ wantsCodeProvenanceButton
+
+ ^ false!