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

karl ramberg karlramberg at gmail.com
Sun Apr 12 16:27:54 UTC 2015


Hi,
You are making really nice enhancements :-)

BTW : Could we preserve the selection in the list as well ?
Or are the list models too different for it to make sense ?
First level selection should probably work...

Karl



On Sun, Apr 12, 2015 at 4:56 PM, <commits at source.squeak.org> wrote:

> Marcel Taeumel uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-mt.582.mcz
>
> ==================== Summary ====================
>
> Name: Tools-mt.582
> Author: mt
> Time: 12 April 2015, 4:56:27.909 pm
> UUID: 3ad55be5-74b1-f84f-98d1-b1cf671476d2
> Ancestors: Tools-mt.581
>
> Preserve expressions that were entered in the code pane in
> inspector/explorer when switching between those tools.
>
> =============== Diff against Tools-mt.581 ===============
>
> Item was changed:
>   StringHolder subclass: #Inspector
> +       instanceVariableNames: 'object selectionIndex timeOfLastListUpdate
> selectionUpdateTime context expression'
> -       instanceVariableNames: 'object selectionIndex timeOfLastListUpdate
> selectionUpdateTime context'
>         classVariableNames: ''
>         poolDictionaries: ''
>         category: 'Tools-Inspector'!
>
>   !Inspector commentStamp: '<historical>' prior: 0!
>   I represent a query path into the internal representation of an object.
> As a StringHolder, the string I represent is the value of the currently
> selected variable of the observed object.!
>
> Item was changed:
>   ----- Method: Inspector>>buildCodePaneWith: (in category 'toolbuilder')
> -----
>   buildCodePaneWith: builder
>         | textSpec |
>         textSpec := builder pluggableTextSpec new.
>         textSpec
>                 model: self;
> +               getText: #expression;
> +               editText: #expression:;
> -               getText: #trash;
> -               setText: #trash:;
>                 help: #helpText;
>                 selection: #contentsSelection;
>                 menu: #codePaneMenu:shifted:;
>                 askBeforeDiscardingEdits: false.
>         ^textSpec!
>
> Item was changed:
>   ----- Method: Inspector>>exploreObject (in category 'toolbuilder') -----
>   exploreObject
>         "Switch to an explorer tool."
>
> +       | window model |
> +       window := self object explore.
> +       model := window model.
> +
> +       model setExpression: self expression.
> +       window bounds: self containingWindow bounds.
> -       self object explore
> -               bounds: self containingWindow bounds.
>         self changed: #close.!
>
> Item was added:
> + ----- Method: Inspector>>expression (in category 'accessing') -----
> + expression
> +
> +       ^ expression ifNil: ['']!
>
> Item was added:
> + ----- Method: Inspector>>expression: (in category 'accessing') -----
> + expression: aString
> +
> +       expression := aString.!
>
> Item was added:
> + ----- Method: Inspector>>setExpression: (in category 'code') -----
> + setExpression: aString
> +
> +       self expression: aString.
> +       self changed: #expression.!
>
> Item was changed:
>   AbstractHierarchicalList subclass: #ObjectExplorer
> +       instanceVariableNames: 'root currentParent inspector monitorList
> expression'
> -       instanceVariableNames: 'root currentParent inspector monitorList'
>         classVariableNames: ''
>         poolDictionaries: ''
>         category: 'Tools-Explorer'!
>
>   !ObjectExplorer commentStamp: '<historical>' prior: 0!
>   ObjectExplorer provides a hierarchical alternative to #inspect. Simply
> evaluate an expression like:
>
>   World explore
>
>   and enjoy.!
>
> Item was changed:
>   ----- Method: ObjectExplorer>>buildWith: (in category 'toolbuilder')
> -----
>   buildWith: builder
>
>         | windowSpec treeSpec textSpec buttonSpec buttonOffset |
>         windowSpec := builder pluggableWindowSpec new.
>         windowSpec
>                 model: self;
>                 children: OrderedCollection new;
>                 label: #label;
>                 extent: self initialExtent.
>
>         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 at 0 corner: 1 at 0.75).
>         windowSpec children add: treeSpec.
>
>         buttonOffset := (Preferences standardButtonFont widthOfString:
> 'inspect') * 3/2.
>
>         textSpec := builder pluggableTextSpec new.
>         textSpec
>                 model: self;
> +               getText: #expression;
> +               editText: #expression:;
>                 menu: #codePaneMenu:shifted:;
>                 help: 'Evaluate expressions for the current tree
> selection...' translated;
>                 frame: (LayoutFrame fractions: (0 at 0.75 corner: 1 at 1)
> offsets: (0 at 0 corner: buttonOffset negated at 0)).
>         windowSpec children add: textSpec.
>
>         buttonSpec := builder pluggableButtonSpec new
>                 model: self;
>                 label: 'inspect';
>                 action: #inspectObject;
>                 help: 'Switch to an inspector tool';
>                 frame: (LayoutFrame fractions: (1 at 0.75 corner: 1 at 1)
> offsets: (buttonOffset negated at 0 corner: 0 @ 0)).
>         windowSpec children add: buttonSpec.
>
>         [^ builder build: windowSpec]
>                 ensure: [self changed: #expandRootsRequested]!
>
> Item was added:
> + ----- Method: ObjectExplorer>>expression (in category 'accessing') -----
> + expression
> +
> +       ^ expression!
>
> Item was added:
> + ----- Method: ObjectExplorer>>expression: (in category 'accessing') -----
> + expression: aString
> +
> +       expression := aString.!
>
> Item was changed:
>   ----- Method: ObjectExplorer>>inspectObject (in category 'toolbuilder')
> -----
>   inspectObject
>         "Switch to an inspector tool."
>
> +       | window model |
> +       window := self object inspect.
> +       model := window model.
> +
> +       model setExpression: self expression.
> +       window bounds: self containingWindow bounds.
> -       self object inspect
> -               bounds: self containingWindow bounds.
>         self changed: #close.!
>
> Item was added:
> + ----- Method: ObjectExplorer>>setExpression: (in category 'accessing -
> other') -----
> + setExpression: aString
> +
> +       self expression: aString.
> +       self changed: #expression.!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150412/a31842d5/attachment.htm


More information about the Squeak-dev mailing list