The Trunk: Tools-mt.581.mcz

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

The Trunk: Tools-mt.581.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.581.mcz

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

Name: Tools-mt.581
Author: mt
Time: 12 April 2015, 4:43:28.671 pm
UUID: 6b7d43e3-76f0-3241-aee8-84b532a1c45e
Ancestors: Tools-mt.580

For Bert: Added a button to easily switch between inspector and object explorer.

=============== Diff against Tools-mt.580 ===============

Item was changed:
  ----- Method: Inspector>>buildCodePaneWith: (in category 'toolbuilder') -----
  buildCodePaneWith: builder
  | textSpec |
  textSpec := builder pluggableTextSpec new.
  textSpec
  model: self;
  getText: #trash;
+ setText: #trash:;
+ help: #helpText;
- setText: #trash:;
  selection: #contentsSelection;
  menu: #codePaneMenu:shifted:;
  askBeforeDiscardingEdits: false.
  ^textSpec!

Item was added:
+ ----- Method: Inspector>>buildExploreButtonWith: (in category 'toolbuilder') -----
+ buildExploreButtonWith: builder
+
+ ^ builder pluggableButtonSpec new
+ model: self;
+ label: 'explore';
+ action: #exploreObject;
+ help: 'Switch to an explorer tool'!

Item was changed:
  ----- Method: Inspector>>buildValuePaneWith: (in category 'toolbuilder') -----
  buildValuePaneWith: builder
  | textSpec |
  textSpec := builder pluggableTextSpec new.
  textSpec
  model: self;
  getText: #contents;
  setText: #accept:;
+ help: 'Select a field on the left.';
  selection: #contentsSelection;
  menu: #codePaneMenu:shifted:.
  ^textSpec!

Item was changed:
  ----- Method: Inspector>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  "Inspector openOn: SystemOrganization"
+ | windowSpec buttonOffset |
+ buttonOffset := (Preferences standardButtonFont widthOfString: 'explore') * 3/2.
- | windowSpec |
  windowSpec := self buildWindowWith: builder specs: {
+ (0@0 corner: 0.3@0.75)  -> [self buildFieldListWith: builder].
+ (0.3@0.0corner: 1@0.75) -> [self buildValuePaneWith: builder].
+ (LayoutFrame fractions: (0@0.75 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)) -> [self buildCodePaneWith: builder].
+ (LayoutFrame fractions: (1@0.75 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)) -> [self buildExploreButtonWith: builder].
- (0@0 corner: 0.3@0.7)  -> [self buildFieldListWith: builder].
- (0.3@0.0corner: 1@0.7) -> [self buildValuePaneWith: builder].
- (0.0@0.7corner: 1@1) -> [self buildCodePaneWith: builder].
  }.
+ windowSpec extent: self initialExtent.
  ^builder build: windowSpec!

Item was added:
+ ----- Method: Inspector>>exploreObject (in category 'toolbuilder') -----
+ exploreObject
+ "Switch to an explorer tool."
+
+ self object explore
+ bounds: self containingWindow bounds.
+ self changed: #close.!

Item was added:
+ ----- Method: Inspector>>helpText (in category 'accessing') -----
+ helpText
+
+ ^ 'Evaluate expressions for ''{1}'' here...' format: {self object printStringLimitedTo: 20}!

Item was changed:
  ----- Method: Inspector>>initialExtent (in category 'accessing') -----
  initialExtent
  "Answer the desired extent for the receiver when it is first opened on the screen.  "
 
+ ^ 350 @ 250!
- ^ 250 @ 200!

Item was changed:
  ----- Method: Inspector>>object: (in category 'accessing') -----
  object: anObject
  "Set anObject to be the object being inspected by the receiver."
 
  | oldIndex |
  anObject == object
  ifTrue: [self update]
  ifFalse:
  [oldIndex := selectionIndex <= 2 ifTrue: [selectionIndex] ifFalse: [0].
  self inspect: anObject.
  oldIndex := oldIndex min: self fieldList size.
  self changed: #inspectObject.
  oldIndex > 0
  ifTrue: [self toggleIndex: oldIndex].
  self changed: #fieldList.
+ self changed: #contents.
+ self changed: #helpText]!
- self changed: #contents]!

Item was changed:
  ----- Method: Object>>inspect (in category '*Tools-inspecting') -----
  inspect
  "Create and schedule an Inspector in which the user can examine the receiver's variables."
+ ^ ToolSet inspect: self!
- ToolSet inspect: self!

Item was changed:
  ----- Method: ObjectExplorer>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
 
+ | windowSpec treeSpec textSpec buttonSpec buttonOffset |
- | windowSpec treeSpec textSpec |
  windowSpec := builder pluggableWindowSpec new.
  windowSpec
  model: self;
  children: OrderedCollection new;
+ label: #label;
+ extent: self initialExtent.
+
- label: #label.
-
  treeSpec := builder pluggableTreeSpec new.
  treeSpec
  model: self;
  nodeClass: self class nodeClass;
  roots: #getList;
  keyPress: #explorerKey:from:event:;
  getSelected: #currentSelection;
  setSelected: #currentSelection:;
  setSelectedParent: #currentParent:;
  menu: #genericMenu:;
  autoDeselect: false;
  columns: (ObjectExplorerWrapper showContentsInColumns
  ifTrue: [{
  [:listMorph | (listMorph filteredItems collect: [:item |
  item preferredWidthOfColumn: 1]) max].
  nil "take all the space"}]);
+ frame: (0@0 corner: 1@0.75).
- frame: (0@0 corner: 1@0.85).
  windowSpec children add: treeSpec.
 
+ buttonOffset := (Preferences standardButtonFont widthOfString: 'inspect') * 3/2.
+
  textSpec := builder pluggableTextSpec new.
  textSpec
  model: self;
  menu: #codePaneMenu:shifted:;
  help: 'Evaluate expressions for the current tree selection...' translated;
+ frame: (LayoutFrame fractions: (0@0.75 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)).
- frame: (0@0.85 corner: 1@1).
  windowSpec children add: textSpec.
 
+ buttonSpec := builder pluggableButtonSpec new
+ model: self;
+ label: 'inspect';
+ action: #inspectObject;
+ help: 'Switch to an inspector tool';
+ frame: (LayoutFrame fractions: (1@0.75 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)).
+ windowSpec children add: buttonSpec.
+
  [^ builder build: windowSpec]
  ensure: [self changed: #expandRootsRequested]!

Item was changed:
  ----- Method: ObjectExplorer>>initialExtent (in category 'user interface') -----
  initialExtent
 
+ ^350@250!
- ^400@400!

Item was added:
+ ----- Method: ObjectExplorer>>inspectObject (in category 'toolbuilder') -----
+ inspectObject
+ "Switch to an inspector tool."
+
+ self object inspect
+ bounds: self containingWindow bounds.
+ self changed: #close.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.581.mcz

Bert Freudenberg

> On 12.04.2015, at 14:43, [hidden email] wrote:
>
> Marcel Taeumel uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-mt.581.mcz
>
> ==================== Summary ====================
>
> Name: Tools-mt.581
> Author: mt
> Time: 12 April 2015, 4:43:28.671 pm
> UUID: 6b7d43e3-76f0-3241-aee8-84b532a1c45e
> Ancestors: Tools-mt.580
>
> For Bert: Added a button to easily switch between inspector and object explorer.
For me? Awwww, than you ^_^

- Bert -




smime.p7s (5K) Download Attachment