The Inbox: Tools-ct.901.mcz

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

The Inbox: Tools-ct.901.mcz

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

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

Name: Tools-ct.901
Author: ct
Time: 2 October 2019, 11:19:39.149682 pm
UUID: 2641031f-a660-7642-8fae-5f415cf51f6d
Ancestors: Tools-ul.899

Deduplicates the InspectorBrowser by adapting to a real Browser and respecting to super. This also enhances look + functionality noticeably. Increases initialExtent for a nicer sight.

You can open an InspectorBrowser by doing:
InspectorBrowser openOn: Morph new.

=============== Diff against Tools-ul.899 ===============

Item was changed:
  Inspector subclass: #InspectorBrowser
+ instanceVariableNames: 'browser'
- instanceVariableNames: 'fieldList msgList msgListIndex'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Tools-Inspector'!
 
  !InspectorBrowser commentStamp: 'tcj 3/12/2018 07:55' prior: 0!
  I am an inspector that also shows all messages the inspected objects can understand. I combine inspector and code browser.
 
  InspectorBrowser openOn: Smalltalk!

Item was added:
+ ----- Method: InspectorBrowser>>browser (in category 'initialize-release') -----
+ browser
+
+ ^ browser ifNil: [browser := Browser new]!

Item was changed:
+ ----- Method: InspectorBrowser>>buildWith: (in category 'toolbuilder') -----
- ----- Method: InspectorBrowser>>buildWith: (in category 'tool builder') -----
  buildWith: builder
 
+ | windowSpec |
+ windowSpec := self buildWindowWith: builder specs: {
+ (0@0 corner: 0.3@0.3) -> [self buildFieldListWith: builder].
+ (0.3@0 corner: 1.0@0.3) -> [self buildValuePaneWith: builder].
+ (0@0.3 corner: 0.3@1.0) -> [browser buildMessageListWith: builder].
+ (0.3@0.3 corner: 1.0@1.0) -> [browser buildCodePaneWith: builder].
+ }.
+ ^ builder build: windowSpec!
- | window fieldSpec valueSpec msgSpec codeSpec |
-
- window := builder pluggableWindowSpec new
- model: self;
- children: OrderedCollection new;
- yourself.
-
- fieldSpec := builder pluggableListSpec new
- model: self;
- list: #fieldList;
- getIndex: #selectionIndex;
- setIndex: #toggleIndex:;
- menu: #fieldListMenu:;
- frame: (0@0 corner: 0.3@0.5).
-
- valueSpec := builder pluggableTextSpec new
- model: self;
- getText: #contents;
- setText: #accept:;
- menu: #codePaneMenu:shifted:;
- frame: (0.3@0 corner: 1.0@0.5).
-
- msgSpec := builder pluggableListSpec new
- model: self;
- list: #msgList;
- getIndex: #msgListIndex;
- setIndex: #msgListIndex:;
- menu: #msgListMenu;
- frame: (0@0.5 corner: 0.3@1.0).
-
- codeSpec := builder pluggableTextSpec new
- model: self;
- getText: #msgText;
- setText: #msgAccept:from:;
- menu: #msgPaneMenu:shifted:;
- frame: (0.3@0.5 corner: 1.0@1.0).
-
- window children addAll: {fieldSpec. valueSpec. msgSpec. codeSpec}.
- ^ builder build: window!

Item was removed:
- ----- Method: InspectorBrowser>>fieldList (in category 'accessing') -----
- fieldList
- fieldList ifNotNil: [^ fieldList].
- ^ (fieldList := super fieldList)!

Item was added:
+ ----- Method: InspectorBrowser>>initialExtent (in category 'toolbuilder') -----
+ initialExtent
+
+ ^ super initialExtent * 3/2!

Item was removed:
- ----- Method: InspectorBrowser>>initialize (in category 'initialize-release') -----
- initialize
-
- super initialize.
- fieldList := nil.
- msgListIndex := 0.
- self changed: #msgText
- !

Item was changed:
  ----- Method: InspectorBrowser>>inspect: (in category 'initialize-release') -----
  inspect: anObject
  "Initialize the receiver so that it is inspecting anObject. There is no current selection.
  Overriden so that my class is not changed to 'anObject inspectorClass'."
 
  object := anObject.
+ self browser selectClass: anObject class.
  self initialize
  !

Item was removed:
- ----- Method: InspectorBrowser>>msgAccept:from: (in category 'messages') -----
- msgAccept: newText from: editor
- | category |
- category := msgListIndex = 0
- ifTrue: [ClassOrganizer default]
- ifFalse: [object class organization categoryOfElement: (msgList at: msgListIndex)].
- ^ (object class compile: newText classified: category notifying: editor) ~~ nil!

Item was removed:
- ----- Method: InspectorBrowser>>msgList (in category 'messages') -----
- msgList
-
- ^msgList ifNil: [ msgList := object class selectors sort ]!

Item was removed:
- ----- Method: InspectorBrowser>>msgListIndex (in category 'messages') -----
- msgListIndex
- ^msgListIndex!

Item was removed:
- ----- Method: InspectorBrowser>>msgListIndex: (in category 'messages') -----
- msgListIndex: anInteger
- "A selection has been made in the message pane"
-
- msgListIndex := anInteger.
- self changed: #msgText.!

Item was removed:
- ----- Method: InspectorBrowser>>msgListMenu: (in category 'messages') -----
- msgListMenu: aMenu
- ^ aMenu labels: 'Not yet implemented' lines: #(0) selections: #(flash)!

Item was removed:
- ----- Method: InspectorBrowser>>msgPaneMenu:shifted: (in category 'messages') -----
- msgPaneMenu: aMenu shifted: shifted
- ^ aMenu labels:
- 'find... (f)
- find again (g)
- find and replace...
- do/replace again (j)
- undo (z)
- redo (Z)
- copy (c)
- cut (x)
- paste (v)
- do it (d)
- print it (p)
- inspect it (i)
- accept (s)
- cancel (l)'
- lines: #(0 4 6 9 12)
- selections: #(find findAgain findReplace again undo redo copySelection cut paste doIt printIt inspectIt accept cancel)!

Item was removed:
- ----- Method: InspectorBrowser>>msgText (in category 'messages') -----
- msgText
- msgListIndex = 0 ifTrue: [^ nil].
- ^ object class sourceCodeAt: (msgList at: msgListIndex)!

Item was removed:
- ----- Method: InspectorBrowser>>step (in category 'stepping and presenter') -----
- step
- | list fieldString msg |
- (list := super fieldList) = fieldList ifFalse:
- [fieldString := selectionIndex > 0 ifTrue: [fieldList at: selectionIndex] ifFalse: [nil].
- fieldList := list.
- selectionIndex := fieldList indexOf: fieldString.
- self changed: #fieldList.
- self changed: #selectionIndex].
- list := msgList.  msgList := nil.  "force recomputation"
- list = self msgList ifFalse:
- [msg := msgListIndex > 0 ifTrue: [list at: msgListIndex] ifFalse: [nil].
- msgListIndex := msgList indexOf: msg.
- self changed: #msgList.
- self changed: #msgListIndex].
- super step!

Item was added:
+ ----- Method: InspectorBrowser>>stepAt:in: (in category 'stepping and presenter') -----
+ stepAt: millisecondClockValue in: aWindow
+
+ super stepAt: millisecondClockValue in: aWindow.
+ browser stepAt: millisecondClockValue in: aWindow.!

Item was removed:
- ----- Method: InspectorBrowser>>wantsSteps (in category 'accessing') -----
- wantsSteps
- ^ true!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-ct.901.mcz

Christoph Thiede

Should all the removed methods here be to moved into *60Deprecated, or would you consider them an implementation detail?


Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Mittwoch, 2. Oktober 2019 23:19:38
An: [hidden email]
Betreff: [squeak-dev] The Inbox: Tools-ct.901.mcz
 
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-ct.901.mcz

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

Name: Tools-ct.901
Author: ct
Time: 2 October 2019, 11:19:39.149682 pm
UUID: 2641031f-a660-7642-8fae-5f415cf51f6d
Ancestors: Tools-ul.899

Deduplicates the InspectorBrowser by adapting to a real Browser and respecting to super. This also enhances look + functionality noticeably. Increases initialExtent for a nicer sight.

You can open an InspectorBrowser by doing:
InspectorBrowser openOn: Morph new.

=============== Diff against Tools-ul.899 ===============

Item was changed:
  Inspector subclass: #InspectorBrowser
+        instanceVariableNames: 'browser'
-        instanceVariableNames: 'fieldList msgList msgListIndex'
         classVariableNames: ''
         poolDictionaries: ''
         category: 'Tools-Inspector'!
 
  !InspectorBrowser commentStamp: 'tcj 3/12/2018 07:55' prior: 0!
  I am an inspector that also shows all messages the inspected objects can understand. I combine inspector and code browser.
 
  InspectorBrowser openOn: Smalltalk!

Item was added:
+ ----- Method: InspectorBrowser>>browser (in category 'initialize-release') -----
+ browser
+
+        ^ browser ifNil: [browser := Browser new]!

Item was changed:
+ ----- Method: InspectorBrowser>>buildWith: (in category 'toolbuilder') -----
- ----- Method: InspectorBrowser>>buildWith: (in category 'tool builder') -----
  buildWith: builder
 
+        | windowSpec |
+        windowSpec := self buildWindowWith: builder specs: {
+                (0@0 corner: 0.3@0.3) -> [self buildFieldListWith: builder].
+                (0.3@0 corner: 1.0@0.3) -> [self buildValuePaneWith: builder].
+                (0@0.3 corner: 0.3@1.0) -> [browser buildMessageListWith: builder].
+                (0.3@0.3 corner: 1.0@1.0) -> [browser buildCodePaneWith: builder].
+        }.
+        ^ builder build: windowSpec!
-        | window fieldSpec valueSpec msgSpec codeSpec |
-       
-        window := builder pluggableWindowSpec new
-                model: self;
-                children: OrderedCollection new;
-                yourself.
-               
-        fieldSpec := builder pluggableListSpec new
-                model: self;
-                list: #fieldList;
-                getIndex: #selectionIndex;
-                setIndex: #toggleIndex:;
-                menu: #fieldListMenu:;
-                frame: (0@0 corner: 0.3@0.5).
-       
-        valueSpec := builder pluggableTextSpec new
-                model: self;
-                getText: #contents;
-                setText: #accept:;
-                menu: #codePaneMenu:shifted:;
-                frame: (0.3@0 corner: 1.0@0.5).
-
-        msgSpec := builder pluggableListSpec new
-                model: self;
-                list: #msgList;
-                getIndex: #msgListIndex;
-                setIndex: #msgListIndex:;
-                menu: #msgListMenu;
-                frame: (0@0.5 corner: 0.3@1.0).
-               
-        codeSpec := builder pluggableTextSpec new
-                model: self;
-                getText: #msgText;
-                setText: #msgAccept:from:;
-                menu: #msgPaneMenu:shifted:;
-                frame: (0.3@0.5 corner: 1.0@1.0).
-       
-        window children addAll: {fieldSpec. valueSpec. msgSpec. codeSpec}.
-        ^ builder build: window!

Item was removed:
- ----- Method: InspectorBrowser>>fieldList (in category 'accessing') -----
- fieldList
-        fieldList ifNotNil: [^ fieldList].
-        ^ (fieldList := super fieldList)!

Item was added:
+ ----- Method: InspectorBrowser>>initialExtent (in category 'toolbuilder') -----
+ initialExtent
+
+        ^ super initialExtent * 3/2!

Item was removed:
- ----- Method: InspectorBrowser>>initialize (in category 'initialize-release') -----
- initialize
-
-        super initialize.
-        fieldList := nil.
-        msgListIndex := 0.
-        self changed: #msgText
- !

Item was changed:
  ----- Method: InspectorBrowser>>inspect: (in category 'initialize-release') -----
  inspect: anObject
         "Initialize the receiver so that it is inspecting anObject. There is no current selection.
         Overriden so that my class is not changed to 'anObject inspectorClass'."
        
         object := anObject.
+        self browser selectClass: anObject class.
         self initialize
  !

Item was removed:
- ----- Method: InspectorBrowser>>msgAccept:from: (in category 'messages') -----
- msgAccept: newText from: editor
-        | category |
-        category := msgListIndex = 0
-                ifTrue: [ClassOrganizer default]
-                ifFalse: [object class organization categoryOfElement: (msgList at: msgListIndex)].
-        ^ (object class compile: newText classified: category notifying: editor) ~~ nil!

Item was removed:
- ----- Method: InspectorBrowser>>msgList (in category 'messages') -----
- msgList
-
-        ^msgList ifNil: [ msgList := object class selectors sort ]!

Item was removed:
- ----- Method: InspectorBrowser>>msgListIndex (in category 'messages') -----
- msgListIndex
-        ^msgListIndex!

Item was removed:
- ----- Method: InspectorBrowser>>msgListIndex: (in category 'messages') -----
- msgListIndex: anInteger
-        "A selection has been made in the message pane"
-
-        msgListIndex := anInteger.
-        self changed: #msgText.!

Item was removed:
- ----- Method: InspectorBrowser>>msgListMenu: (in category 'messages') -----
- msgListMenu: aMenu
-        ^ aMenu labels: 'Not yet implemented' lines: #(0) selections: #(flash)!

Item was removed:
- ----- Method: InspectorBrowser>>msgPaneMenu:shifted: (in category 'messages') -----
- msgPaneMenu: aMenu shifted: shifted
-        ^ aMenu labels:
- 'find... (f)
- find again (g)
- find and replace...
- do/replace again (j)
- undo (z)
- redo (Z)
- copy (c)
- cut (x)
- paste (v)
- do it (d)
- print it (p)
- inspect it (i)
- accept (s)
- cancel (l)'
-                lines: #(0 4 6 9 12)
-                selections: #(find findAgain findReplace again undo redo copySelection cut paste doIt printIt inspectIt accept cancel)!

Item was removed:
- ----- Method: InspectorBrowser>>msgText (in category 'messages') -----
- msgText
-        msgListIndex = 0 ifTrue: [^ nil].
-        ^ object class sourceCodeAt: (msgList at: msgListIndex)!

Item was removed:
- ----- Method: InspectorBrowser>>step (in category 'stepping and presenter') -----
- step
-        | list fieldString msg |
-        (list := super fieldList) = fieldList ifFalse:
-                [fieldString := selectionIndex > 0 ifTrue: [fieldList at: selectionIndex] ifFalse: [nil].
-                fieldList := list.
-                selectionIndex := fieldList indexOf: fieldString.
-                self changed: #fieldList.
-                self changed: #selectionIndex].
-        list := msgList.  msgList := nil.  "force recomputation"
-                list = self msgList ifFalse:
-                [msg := msgListIndex > 0 ifTrue: [list at: msgListIndex] ifFalse: [nil].
-                msgListIndex := msgList indexOf: msg.
-                self changed: #msgList.
-                self changed: #msgListIndex].
-        super step!

Item was added:
+ ----- Method: InspectorBrowser>>stepAt:in: (in category 'stepping and presenter') -----
+ stepAt: millisecondClockValue in: aWindow
+       
+        super stepAt: millisecondClockValue in: aWindow.
+        browser stepAt: millisecondClockValue in: aWindow.!

Item was removed:
- ----- Method: InspectorBrowser>>wantsSteps (in category 'accessing') -----
- wantsSteps
-        ^ true!




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-ct.901.mcz

Hannes Hirzel
The InspectorBrowser is a tool.  The methods are not used directly. So
I consider it to be an implementation detail.

Good improvement.
+1 for inclusion.

It would be nice it it also had a pane for code evaluation as in a
simple Inspector.

--Hannes

On 10/2/19, Thiede, Christoph
<[hidden email]> wrote:

> Should all the removed methods here be to moved into *60Deprecated, or would
> you consider them an implementation detail?
>
> ________________________________
> Von: Squeak-dev <[hidden email]> im Auftrag
> von [hidden email] <[hidden email]>
> Gesendet: Mittwoch, 2. Oktober 2019 23:19:38
> An: [hidden email]
> Betreff: [squeak-dev] The Inbox: Tools-ct.901.mcz
>
> A new version of Tools was added to project The Inbox:
> http://source.squeak.org/inbox/Tools-ct.901.mcz
>
> ==================== Summary ====================
>
> Name: Tools-ct.901
> Author: ct
> Time: 2 October 2019, 11:19:39.149682 pm
> UUID: 2641031f-a660-7642-8fae-5f415cf51f6d
> Ancestors: Tools-ul.899
>
> Deduplicates the InspectorBrowser by adapting to a real Browser and
> respecting to super. This also enhances look + functionality noticeably.
> Increases initialExtent for a nicer sight.
>
> You can open an InspectorBrowser by doing:
> InspectorBrowser openOn: Morph new.
>
> =============== Diff against Tools-ul.899 ===============
>
> Item was changed:
>   Inspector subclass: #InspectorBrowser
> +        instanceVariableNames: 'browser'
> -        instanceVariableNames: 'fieldList msgList msgListIndex'
>          classVariableNames: ''
>          poolDictionaries: ''
>          category: 'Tools-Inspector'!
>
>   !InspectorBrowser commentStamp: 'tcj 3/12/2018 07:55' prior: 0!
>   I am an inspector that also shows all messages the inspected objects can
> understand. I combine inspector and code browser.
>
>   InspectorBrowser openOn: Smalltalk!
>
> Item was added:
> + ----- Method: InspectorBrowser>>browser (in category 'initialize-release')
> -----
> + browser
> +
> +        ^ browser ifNil: [browser := Browser new]!
>
> Item was changed:
> + ----- Method: InspectorBrowser>>buildWith: (in category 'toolbuilder')
> -----
> - ----- Method: InspectorBrowser>>buildWith: (in category 'tool builder')
> -----
>   buildWith: builder
>
> +        | windowSpec |
> +        windowSpec := self buildWindowWith: builder specs: {
> +                (0@0 corner: 0.3@0.3) -> [self buildFieldListWith:
> builder].
> +                (0.3@0 corner: 1.0@0.3) -> [self buildValuePaneWith:
> builder].
> +                (0@0.3 corner: 0.3@1.0) -> [browser buildMessageListWith:
> builder].
> +                (0.3@0.3 corner: 1.0@1.0) -> [browser buildCodePaneWith:
> builder].
> +        }.
> +        ^ builder build: windowSpec!
> -        | window fieldSpec valueSpec msgSpec codeSpec |
> -
> -        window := builder pluggableWindowSpec new
> -                model: self;
> -                children: OrderedCollection new;
> -                yourself.
> -
> -        fieldSpec := builder pluggableListSpec new
> -                model: self;
> -                list: #fieldList;
> -                getIndex: #selectionIndex;
> -                setIndex: #toggleIndex:;
> -                menu: #fieldListMenu:;
> -                frame: (0@0 corner: 0.3@0.5).
> -
> -        valueSpec := builder pluggableTextSpec new
> -                model: self;
> -                getText: #contents;
> -                setText: #accept:;
> -                menu: #codePaneMenu:shifted:;
> -                frame: (0.3@0 corner: 1.0@0.5).
> -
> -        msgSpec := builder pluggableListSpec new
> -                model: self;
> -                list: #msgList;
> -                getIndex: #msgListIndex;
> -                setIndex: #msgListIndex:;
> -                menu: #msgListMenu;
> -                frame: (0@0.5 corner: 0.3@1.0).
> -
> -        codeSpec := builder pluggableTextSpec new
> -                model: self;
> -                getText: #msgText;
> -                setText: #msgAccept:from:;
> -                menu: #msgPaneMenu:shifted:;
> -                frame: (0.3@0.5 corner: 1.0@1.0).
> -
> -        window children addAll: {fieldSpec. valueSpec. msgSpec. codeSpec}.
> -        ^ builder build: window!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>fieldList (in category 'accessing') -----
> - fieldList
> -        fieldList ifNotNil: [^ fieldList].
> -        ^ (fieldList := super fieldList)!
>
> Item was added:
> + ----- Method: InspectorBrowser>>initialExtent (in category 'toolbuilder')
> -----
> + initialExtent
> +
> +        ^ super initialExtent * 3/2!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>initialize (in category
> 'initialize-release') -----
> - initialize
> -
> -        super initialize.
> -        fieldList := nil.
> -        msgListIndex := 0.
> -        self changed: #msgText
> - !
>
> Item was changed:
>   ----- Method: InspectorBrowser>>inspect: (in category
> 'initialize-release') -----
>   inspect: anObject
>          "Initialize the receiver so that it is inspecting anObject. There
> is no current selection.
>          Overriden so that my class is not changed to 'anObject
> inspectorClass'."
>
>          object := anObject.
> +        self browser selectClass: anObject class.
>          self initialize
>   !
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgAccept:from: (in category 'messages')
> -----
> - msgAccept: newText from: editor
> -        | category |
> -        category := msgListIndex = 0
> -                ifTrue: [ClassOrganizer default]
> -                ifFalse: [object class organization categoryOfElement:
> (msgList at: msgListIndex)].
> -        ^ (object class compile: newText classified: category notifying:
> editor) ~~ nil!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgList (in category 'messages') -----
> - msgList
> -
> -        ^msgList ifNil: [ msgList := object class selectors sort ]!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgListIndex (in category 'messages')
> -----
> - msgListIndex
> -        ^msgListIndex!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgListIndex: (in category 'messages')
> -----
> - msgListIndex: anInteger
> -        "A selection has been made in the message pane"
> -
> -        msgListIndex := anInteger.
> -        self changed: #msgText.!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgListMenu: (in category 'messages')
> -----
> - msgListMenu: aMenu
> -        ^ aMenu labels: 'Not yet implemented' lines: #(0) selections:
> #(flash)!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgPaneMenu:shifted: (in category
> 'messages') -----
> - msgPaneMenu: aMenu shifted: shifted
> -        ^ aMenu labels:
> - 'find... (f)
> - find again (g)
> - find and replace...
> - do/replace again (j)
> - undo (z)
> - redo (Z)
> - copy (c)
> - cut (x)
> - paste (v)
> - do it (d)
> - print it (p)
> - inspect it (i)
> - accept (s)
> - cancel (l)'
> -                lines: #(0 4 6 9 12)
> -                selections: #(find findAgain findReplace again undo redo
> copySelection cut paste doIt printIt inspectIt accept cancel)!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgText (in category 'messages') -----
> - msgText
> -        msgListIndex = 0 ifTrue: [^ nil].
> -        ^ object class sourceCodeAt: (msgList at: msgListIndex)!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>step (in category 'stepping and
> presenter') -----
> - step
> -        | list fieldString msg |
> -        (list := super fieldList) = fieldList ifFalse:
> -                [fieldString := selectionIndex > 0 ifTrue: [fieldList at:
> selectionIndex] ifFalse: [nil].
> -                fieldList := list.
> -                selectionIndex := fieldList indexOf: fieldString.
> -                self changed: #fieldList.
> -                self changed: #selectionIndex].
> -        list := msgList.  msgList := nil.  "force recomputation"
> -                list = self msgList ifFalse:
> -                [msg := msgListIndex > 0 ifTrue: [list at: msgListIndex]
> ifFalse: [nil].
> -                msgListIndex := msgList indexOf: msg.
> -                self changed: #msgList.
> -                self changed: #msgListIndex].
> -        super step!
>
> Item was added:
> + ----- Method: InspectorBrowser>>stepAt:in: (in category 'stepping and
> presenter') -----
> + stepAt: millisecondClockValue in: aWindow
> +
> +        super stepAt: millisecondClockValue in: aWindow.
> +        browser stepAt: millisecondClockValue in: aWindow.!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>wantsSteps (in category 'accessing')
> -----
> - wantsSteps
> -        ^ true!
>
>
>



Updated_InspectorBrowser.png (91K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-ct.901.mcz

David T. Lewis
+1

This update also fixes a bug. In trunk, blue button on a selected method
in an inspector browser raises an error. After loading Tools-ct.901,
the menu works.

Dave


On Sat, Oct 05, 2019 at 10:04:44AM +0000, H. Hirzel wrote:

> The InspectorBrowser is a tool.  The methods are not used directly. So
> I consider it to be an implementation detail.
>
> Good improvement.
> +1 for inclusion.
>
> It would be nice it it also had a pane for code evaluation as in a
> simple Inspector.
>
> --Hannes
>
> On 10/2/19, Thiede, Christoph
> <[hidden email]> wrote:
> > Should all the removed methods here be to moved into *60Deprecated, or would
> > you consider them an implementation detail?
> >
> > ________________________________
> > Von: Squeak-dev <[hidden email]> im Auftrag
> > von [hidden email] <[hidden email]>
> > Gesendet: Mittwoch, 2. Oktober 2019 23:19:38
> > An: [hidden email]
> > Betreff: [squeak-dev] The Inbox: Tools-ct.901.mcz
> >
> > A new version of Tools was added to project The Inbox:
> > http://source.squeak.org/inbox/Tools-ct.901.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Tools-ct.901
> > Author: ct
> > Time: 2 October 2019, 11:19:39.149682 pm
> > UUID: 2641031f-a660-7642-8fae-5f415cf51f6d
> > Ancestors: Tools-ul.899
> >
> > Deduplicates the InspectorBrowser by adapting to a real Browser and
> > respecting to super. This also enhances look + functionality noticeably.
> > Increases initialExtent for a nicer sight.
> >
> > You can open an InspectorBrowser by doing:
> > InspectorBrowser openOn: Morph new.
> >
> > =============== Diff against Tools-ul.899 ===============
> >
> > Item was changed:
> >   Inspector subclass: #InspectorBrowser
> > +        instanceVariableNames: 'browser'
> > -        instanceVariableNames: 'fieldList msgList msgListIndex'
> >          classVariableNames: ''
> >          poolDictionaries: ''
> >          category: 'Tools-Inspector'!
> >
> >   !InspectorBrowser commentStamp: 'tcj 3/12/2018 07:55' prior: 0!
> >   I am an inspector that also shows all messages the inspected objects can
> > understand. I combine inspector and code browser.
> >
> >   InspectorBrowser openOn: Smalltalk!
> >
> > Item was added:
> > + ----- Method: InspectorBrowser>>browser (in category 'initialize-release')
> > -----
> > + browser
> > +
> > +        ^ browser ifNil: [browser := Browser new]!
> >
> > Item was changed:
> > + ----- Method: InspectorBrowser>>buildWith: (in category 'toolbuilder')
> > -----
> > - ----- Method: InspectorBrowser>>buildWith: (in category 'tool builder')
> > -----
> >   buildWith: builder
> >
> > +        | windowSpec |
> > +        windowSpec := self buildWindowWith: builder specs: {
> > +                (0@0 corner: 0.3@0.3) -> [self buildFieldListWith:
> > builder].
> > +                (0.3@0 corner: 1.0@0.3) -> [self buildValuePaneWith:
> > builder].
> > +                (0@0.3 corner: 0.3@1.0) -> [browser buildMessageListWith:
> > builder].
> > +                (0.3@0.3 corner: 1.0@1.0) -> [browser buildCodePaneWith:
> > builder].
> > +        }.
> > +        ^ builder build: windowSpec!
> > -        | window fieldSpec valueSpec msgSpec codeSpec |
> > -
> > -        window := builder pluggableWindowSpec new
> > -                model: self;
> > -                children: OrderedCollection new;
> > -                yourself.
> > -
> > -        fieldSpec := builder pluggableListSpec new
> > -                model: self;
> > -                list: #fieldList;
> > -                getIndex: #selectionIndex;
> > -                setIndex: #toggleIndex:;
> > -                menu: #fieldListMenu:;
> > -                frame: (0@0 corner: 0.3@0.5).
> > -
> > -        valueSpec := builder pluggableTextSpec new
> > -                model: self;
> > -                getText: #contents;
> > -                setText: #accept:;
> > -                menu: #codePaneMenu:shifted:;
> > -                frame: (0.3@0 corner: 1.0@0.5).
> > -
> > -        msgSpec := builder pluggableListSpec new
> > -                model: self;
> > -                list: #msgList;
> > -                getIndex: #msgListIndex;
> > -                setIndex: #msgListIndex:;
> > -                menu: #msgListMenu;
> > -                frame: (0@0.5 corner: 0.3@1.0).
> > -
> > -        codeSpec := builder pluggableTextSpec new
> > -                model: self;
> > -                getText: #msgText;
> > -                setText: #msgAccept:from:;
> > -                menu: #msgPaneMenu:shifted:;
> > -                frame: (0.3@0.5 corner: 1.0@1.0).
> > -
> > -        window children addAll: {fieldSpec. valueSpec. msgSpec. codeSpec}.
> > -        ^ builder build: window!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>fieldList (in category 'accessing') -----
> > - fieldList
> > -        fieldList ifNotNil: [^ fieldList].
> > -        ^ (fieldList := super fieldList)!
> >
> > Item was added:
> > + ----- Method: InspectorBrowser>>initialExtent (in category 'toolbuilder')
> > -----
> > + initialExtent
> > +
> > +        ^ super initialExtent * 3/2!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>initialize (in category
> > 'initialize-release') -----
> > - initialize
> > -
> > -        super initialize.
> > -        fieldList := nil.
> > -        msgListIndex := 0.
> > -        self changed: #msgText
> > - !
> >
> > Item was changed:
> >   ----- Method: InspectorBrowser>>inspect: (in category
> > 'initialize-release') -----
> >   inspect: anObject
> >          "Initialize the receiver so that it is inspecting anObject. There
> > is no current selection.
> >          Overriden so that my class is not changed to 'anObject
> > inspectorClass'."
> >
> >          object := anObject.
> > +        self browser selectClass: anObject class.
> >          self initialize
> >   !
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>msgAccept:from: (in category 'messages')
> > -----
> > - msgAccept: newText from: editor
> > -        | category |
> > -        category := msgListIndex = 0
> > -                ifTrue: [ClassOrganizer default]
> > -                ifFalse: [object class organization categoryOfElement:
> > (msgList at: msgListIndex)].
> > -        ^ (object class compile: newText classified: category notifying:
> > editor) ~~ nil!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>msgList (in category 'messages') -----
> > - msgList
> > -
> > -        ^msgList ifNil: [ msgList := object class selectors sort ]!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>msgListIndex (in category 'messages')
> > -----
> > - msgListIndex
> > -        ^msgListIndex!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>msgListIndex: (in category 'messages')
> > -----
> > - msgListIndex: anInteger
> > -        "A selection has been made in the message pane"
> > -
> > -        msgListIndex := anInteger.
> > -        self changed: #msgText.!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>msgListMenu: (in category 'messages')
> > -----
> > - msgListMenu: aMenu
> > -        ^ aMenu labels: 'Not yet implemented' lines: #(0) selections:
> > #(flash)!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>msgPaneMenu:shifted: (in category
> > 'messages') -----
> > - msgPaneMenu: aMenu shifted: shifted
> > -        ^ aMenu labels:
> > - 'find... (f)
> > - find again (g)
> > - find and replace...
> > - do/replace again (j)
> > - undo (z)
> > - redo (Z)
> > - copy (c)
> > - cut (x)
> > - paste (v)
> > - do it (d)
> > - print it (p)
> > - inspect it (i)
> > - accept (s)
> > - cancel (l)'
> > -                lines: #(0 4 6 9 12)
> > -                selections: #(find findAgain findReplace again undo redo
> > copySelection cut paste doIt printIt inspectIt accept cancel)!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>msgText (in category 'messages') -----
> > - msgText
> > -        msgListIndex = 0 ifTrue: [^ nil].
> > -        ^ object class sourceCodeAt: (msgList at: msgListIndex)!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>step (in category 'stepping and
> > presenter') -----
> > - step
> > -        | list fieldString msg |
> > -        (list := super fieldList) = fieldList ifFalse:
> > -                [fieldString := selectionIndex > 0 ifTrue: [fieldList at:
> > selectionIndex] ifFalse: [nil].
> > -                fieldList := list.
> > -                selectionIndex := fieldList indexOf: fieldString.
> > -                self changed: #fieldList.
> > -                self changed: #selectionIndex].
> > -        list := msgList.  msgList := nil.  "force recomputation"
> > -                list = self msgList ifFalse:
> > -                [msg := msgListIndex > 0 ifTrue: [list at: msgListIndex]
> > ifFalse: [nil].
> > -                msgListIndex := msgList indexOf: msg.
> > -                self changed: #msgList.
> > -                self changed: #msgListIndex].
> > -        super step!
> >
> > Item was added:
> > + ----- Method: InspectorBrowser>>stepAt:in: (in category 'stepping and
> > presenter') -----
> > + stepAt: millisecondClockValue in: aWindow
> > +
> > +        super stepAt: millisecondClockValue in: aWindow.
> > +        browser stepAt: millisecondClockValue in: aWindow.!
> >
> > Item was removed:
> > - ----- Method: InspectorBrowser>>wantsSteps (in category 'accessing')
> > -----
> > - wantsSteps
> > -        ^ true!
> >
> >
> >


>


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-ct.901.mcz

Chris Muller-3
In reply to this post by Christoph Thiede
Christoph, this is very nice, but I actually have (had?) plans to do a similar enhancement, only:

  - instead of the source code, show the result of evaluating the selected message.
  - The pane would show the printString of the result, but prefixed by a small embedded Morph (via TextAnchor) as the first character which, itself, can:

        - be clicked to open a new InspectorBrowser on that object, OR
        - dragged, (just as inspector variables can) as an argument to another binary or keyword selector in the messages pane of the same or other InspectorBrowser (enabling that result to be displayed and used, likewise)

I've always wanted Smalltalk's Inspector to be better at *working* with objects, instead of only inspecting their physical state and only allowing access via their API by typing expressions.  Smalltalk is overdue to have an "Object browser" for users that presents its API properly and usably.

Best,
  Chris


On Wed, Oct 2, 2019 at 4:21 PM Thiede, Christoph <[hidden email]> wrote:

Should all the removed methods here be to moved into *60Deprecated, or would you consider them an implementation detail?


Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Mittwoch, 2. Oktober 2019 23:19:38
An: [hidden email]
Betreff: [squeak-dev] The Inbox: Tools-ct.901.mcz
 
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-ct.901.mcz

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

Name: Tools-ct.901
Author: ct
Time: 2 October 2019, 11:19:39.149682 pm
UUID: 2641031f-a660-7642-8fae-5f415cf51f6d
Ancestors: Tools-ul.899

Deduplicates the InspectorBrowser by adapting to a real Browser and respecting to super. This also enhances look + functionality noticeably. Increases initialExtent for a nicer sight.

You can open an InspectorBrowser by doing:
InspectorBrowser openOn: Morph new.

=============== Diff against Tools-ul.899 ===============

Item was changed:
  Inspector subclass: #InspectorBrowser
+        instanceVariableNames: 'browser'
-        instanceVariableNames: 'fieldList msgList msgListIndex'
         classVariableNames: ''
         poolDictionaries: ''
         category: 'Tools-Inspector'!
 
  !InspectorBrowser commentStamp: 'tcj 3/12/2018 07:55' prior: 0!
  I am an inspector that also shows all messages the inspected objects can understand. I combine inspector and code browser.
 
  InspectorBrowser openOn: Smalltalk!

Item was added:
+ ----- Method: InspectorBrowser>>browser (in category 'initialize-release') -----
+ browser
+
+        ^ browser ifNil: [browser := Browser new]!

Item was changed:
+ ----- Method: InspectorBrowser>>buildWith: (in category 'toolbuilder') -----
- ----- Method: InspectorBrowser>>buildWith: (in category 'tool builder') -----
  buildWith: builder
 
+        | windowSpec |
+        windowSpec := self buildWindowWith: builder specs: {
+                (0@0 corner: 0.3@0.3) -> [self buildFieldListWith: builder].
+                (0.3@0 corner: 1.0@0.3) -> [self buildValuePaneWith: builder].
+                (0@0.3 corner: 0.3@1.0) -> [browser buildMessageListWith: builder].
+                (0.3@0.3 corner: 1.0@1.0) -> [browser buildCodePaneWith: builder].
+        }.
+        ^ builder build: windowSpec!
-        | window fieldSpec valueSpec msgSpec codeSpec |
-       
-        window := builder pluggableWindowSpec new
-                model: self;
-                children: OrderedCollection new;
-                yourself.
-               
-        fieldSpec := builder pluggableListSpec new
-                model: self;
-                list: #fieldList;
-                getIndex: #selectionIndex;
-                setIndex: #toggleIndex:;
-                menu: #fieldListMenu:;
-                frame: (0@0 corner: 0.3@0.5).
-       
-        valueSpec := builder pluggableTextSpec new
-                model: self;
-                getText: #contents;
-                setText: #accept:;
-                menu: #codePaneMenu:shifted:;
-                frame: (0.3@0 corner: 1.0@0.5).
-
-        msgSpec := builder pluggableListSpec new
-                model: self;
-                list: #msgList;
-                getIndex: #msgListIndex;
-                setIndex: #msgListIndex:;
-                menu: #msgListMenu;
-                frame: (0@0.5 corner: 0.3@1.0).
-               
-        codeSpec := builder pluggableTextSpec new
-                model: self;
-                getText: #msgText;
-                setText: #msgAccept:from:;
-                menu: #msgPaneMenu:shifted:;
-                frame: (0.3@0.5 corner: 1.0@1.0).
-       
-        window children addAll: {fieldSpec. valueSpec. msgSpec. codeSpec}.
-        ^ builder build: window!

Item was removed:
- ----- Method: InspectorBrowser>>fieldList (in category 'accessing') -----
- fieldList
-        fieldList ifNotNil: [^ fieldList].
-        ^ (fieldList := super fieldList)!

Item was added:
+ ----- Method: InspectorBrowser>>initialExtent (in category 'toolbuilder') -----
+ initialExtent
+
+        ^ super initialExtent * 3/2!

Item was removed:
- ----- Method: InspectorBrowser>>initialize (in category 'initialize-release') -----
- initialize
-
-        super initialize.
-        fieldList := nil.
-        msgListIndex := 0.
-        self changed: #msgText
- !

Item was changed:
  ----- Method: InspectorBrowser>>inspect: (in category 'initialize-release') -----
  inspect: anObject
         "Initialize the receiver so that it is inspecting anObject. There is no current selection.
         Overriden so that my class is not changed to 'anObject inspectorClass'."
        
         object := anObject.
+        self browser selectClass: anObject class.
         self initialize
  !

Item was removed:
- ----- Method: InspectorBrowser>>msgAccept:from: (in category 'messages') -----
- msgAccept: newText from: editor
-        | category |
-        category := msgListIndex = 0
-                ifTrue: [ClassOrganizer default]
-                ifFalse: [object class organization categoryOfElement: (msgList at: msgListIndex)].
-        ^ (object class compile: newText classified: category notifying: editor) ~~ nil!

Item was removed:
- ----- Method: InspectorBrowser>>msgList (in category 'messages') -----
- msgList
-
-        ^msgList ifNil: [ msgList := object class selectors sort ]!

Item was removed:
- ----- Method: InspectorBrowser>>msgListIndex (in category 'messages') -----
- msgListIndex
-        ^msgListIndex!

Item was removed:
- ----- Method: InspectorBrowser>>msgListIndex: (in category 'messages') -----
- msgListIndex: anInteger
-        "A selection has been made in the message pane"
-
-        msgListIndex := anInteger.
-        self changed: #msgText.!

Item was removed:
- ----- Method: InspectorBrowser>>msgListMenu: (in category 'messages') -----
- msgListMenu: aMenu
-        ^ aMenu labels: 'Not yet implemented' lines: #(0) selections: #(flash)!

Item was removed:
- ----- Method: InspectorBrowser>>msgPaneMenu:shifted: (in category 'messages') -----
- msgPaneMenu: aMenu shifted: shifted
-        ^ aMenu labels:
- 'find... (f)
- find again (g)
- find and replace...
- do/replace again (j)
- undo (z)
- redo (Z)
- copy (c)
- cut (x)
- paste (v)
- do it (d)
- print it (p)
- inspect it (i)
- accept (s)
- cancel (l)'
-                lines: #(0 4 6 9 12)
-                selections: #(find findAgain findReplace again undo redo copySelection cut paste doIt printIt inspectIt accept cancel)!

Item was removed:
- ----- Method: InspectorBrowser>>msgText (in category 'messages') -----
- msgText
-        msgListIndex = 0 ifTrue: [^ nil].
-        ^ object class sourceCodeAt: (msgList at: msgListIndex)!

Item was removed:
- ----- Method: InspectorBrowser>>step (in category 'stepping and presenter') -----
- step
-        | list fieldString msg |
-        (list := super fieldList) = fieldList ifFalse:
-                [fieldString := selectionIndex > 0 ifTrue: [fieldList at: selectionIndex] ifFalse: [nil].
-                fieldList := list.
-                selectionIndex := fieldList indexOf: fieldString.
-                self changed: #fieldList.
-                self changed: #selectionIndex].
-        list := msgList.  msgList := nil.  "force recomputation"
-                list = self msgList ifFalse:
-                [msg := msgListIndex > 0 ifTrue: [list at: msgListIndex] ifFalse: [nil].
-                msgListIndex := msgList indexOf: msg.
-                self changed: #msgList.
-                self changed: #msgListIndex].
-        super step!

Item was added:
+ ----- Method: InspectorBrowser>>stepAt:in: (in category 'stepping and presenter') -----
+ stepAt: millisecondClockValue in: aWindow
+       
+        super stepAt: millisecondClockValue in: aWindow.
+        browser stepAt: millisecondClockValue in: aWindow.!

Item was removed:
- ----- Method: InspectorBrowser>>wantsSteps (in category 'accessing') -----
- wantsSteps
-        ^ true!





Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-ct.901.mcz

marcel.taeumel
Hmm... there is already ObjectExplorer and InspectorBrowser. I like these ideas but they should manifest in a *new* tool. :-) Less interference with existing working habits that way.

Best,
Marcel

Am 07.10.2019 20:24:04 schrieb Chris Muller <[hidden email]>:

Christoph, this is very nice, but I actually have (had?) plans to do a similar enhancement, only:

  - instead of the source code, show the result of evaluating the selected message.
  - The pane would show the printString of the result, but prefixed by a small embedded Morph (via TextAnchor) as the first character which, itself, can:

        - be clicked to open a new InspectorBrowser on that object, OR
        - dragged, (just as inspector variables can) as an argument to another binary or keyword selector in the messages pane of the same or other InspectorBrowser (enabling that result to be displayed and used, likewise)

I've always wanted Smalltalk's Inspector to be better at *working* with objects, instead of only inspecting their physical state and only allowing access via their API by typing expressions.  Smalltalk is overdue to have an "Object browser" for users that presents its API properly and usably.

Best,
  Chris


On Wed, Oct 2, 2019 at 4:21 PM Thiede, Christoph <[hidden email]> wrote:

Should all the removed methods here be to moved into *60Deprecated, or would you consider them an implementation detail?


Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Mittwoch, 2. Oktober 2019 23:19:38
An: [hidden email]
Betreff: [squeak-dev] The Inbox: Tools-ct.901.mcz
 
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-ct.901.mcz

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

Name: Tools-ct.901
Author: ct
Time: 2 October 2019, 11:19:39.149682 pm
UUID: 2641031f-a660-7642-8fae-5f415cf51f6d
Ancestors: Tools-ul.899

Deduplicates the InspectorBrowser by adapting to a real Browser and respecting to super. This also enhances look + functionality noticeably. Increases initialExtent for a nicer sight.

You can open an InspectorBrowser by doing:
InspectorBrowser openOn: Morph new.

=============== Diff against Tools-ul.899 ===============

Item was changed:
  Inspector subclass: #InspectorBrowser
+        instanceVariableNames: 'browser'
-        instanceVariableNames: 'fieldList msgList msgListIndex'
         classVariableNames: ''
         poolDictionaries: ''
         category: 'Tools-Inspector'!
 
  !InspectorBrowser commentStamp: 'tcj 3/12/2018 07:55' prior: 0!
  I am an inspector that also shows all messages the inspected objects can understand. I combine inspector and code browser.
 
  InspectorBrowser openOn: Smalltalk!

Item was added:
+ ----- Method: InspectorBrowser>>browser (in category 'initialize-release') -----
+ browser
+
+        ^ browser ifNil: [browser := Browser new]!

Item was changed:
+ ----- Method: InspectorBrowser>>buildWith: (in category 'toolbuilder') -----
- ----- Method: InspectorBrowser>>buildWith: (in category 'tool builder') -----
  buildWith: builder
 
+        | windowSpec |
+        windowSpec := self buildWindowWith: builder specs: {
+                (0@0 corner: 0.3@0.3) -> [self buildFieldListWith: builder].
+                (0.3@0 corner: 1.0@0.3) -> [self buildValuePaneWith: builder].
+                (0@0.3 corner: 0.3@1.0) -> [browser buildMessageListWith: builder].
+                (0.3@0.3 corner: 1.0@1.0) -> [browser buildCodePaneWith: builder].
+        }.
+        ^ builder build: windowSpec!
-        | window fieldSpec valueSpec msgSpec codeSpec |
-       
-        window := builder pluggableWindowSpec new
-                model: self;
-                children: OrderedCollection new;
-                yourself.
-               
-        fieldSpec := builder pluggableListSpec new
-                model: self;
-                list: #fieldList;
-                getIndex: #selectionIndex;
-                setIndex: #toggleIndex:;
-                menu: #fieldListMenu:;
-                frame: (0@0 corner: 0.3@0.5).
-       
-        valueSpec := builder pluggableTextSpec new
-                model: self;
-                getText: #contents;
-                setText: #accept:;
-                menu: #codePaneMenu:shifted:;
-                frame: (0.3@0 corner: 1.0@0.5).
-
-        msgSpec := builder pluggableListSpec new
-                model: self;
-                list: #msgList;
-                getIndex: #msgListIndex;
-                setIndex: #msgListIndex:;
-                menu: #msgListMenu;
-                frame: (0@0.5 corner: 0.3@1.0).
-               
-        codeSpec := builder pluggableTextSpec new
-                model: self;
-                getText: #msgText;
-                setText: #msgAccept:from:;
-                menu: #msgPaneMenu:shifted:;
-                frame: (0.3@0.5 corner: 1.0@1.0).
-       
-        window children addAll: {fieldSpec. valueSpec. msgSpec. codeSpec}.
-        ^ builder build: window!

Item was removed:
- ----- Method: InspectorBrowser>>fieldList (in category 'accessing') -----
- fieldList
-        fieldList ifNotNil: [^ fieldList].
-        ^ (fieldList := super fieldList)!

Item was added:
+ ----- Method: InspectorBrowser>>initialExtent (in category 'toolbuilder') -----
+ initialExtent
+
+        ^ super initialExtent * 3/2!

Item was removed:
- ----- Method: InspectorBrowser>>initialize (in category 'initialize-release') -----
- initialize
-
-        super initialize.
-        fieldList := nil.
-        msgListIndex := 0.
-        self changed: #msgText
- !

Item was changed:
  ----- Method: InspectorBrowser>>inspect: (in category 'initialize-release') -----
  inspect: anObject
         "Initialize the receiver so that it is inspecting anObject. There is no current selection.
         Overriden so that my class is not changed to 'anObject inspectorClass'."
        
         object := anObject.
+        self browser selectClass: anObject class.
         self initialize
  !

Item was removed:
- ----- Method: InspectorBrowser>>msgAccept:from: (in category 'messages') -----
- msgAccept: newText from: editor
-        | category |
-        category := msgListIndex = 0
-                ifTrue: [ClassOrganizer default]
-                ifFalse: [object class organization categoryOfElement: (msgList at: msgListIndex)].
-        ^ (object class compile: newText classified: category notifying: editor) ~~ nil!

Item was removed:
- ----- Method: InspectorBrowser>>msgList (in category 'messages') -----
- msgList
-
-        ^msgList ifNil: [ msgList := object class selectors sort ]!

Item was removed:
- ----- Method: InspectorBrowser>>msgListIndex (in category 'messages') -----
- msgListIndex
-        ^msgListIndex!

Item was removed:
- ----- Method: InspectorBrowser>>msgListIndex: (in category 'messages') -----
- msgListIndex: anInteger
-        "A selection has been made in the message pane"
-
-        msgListIndex := anInteger.
-        self changed: #msgText.!

Item was removed:
- ----- Method: InspectorBrowser>>msgListMenu: (in category 'messages') -----
- msgListMenu: aMenu
-        ^ aMenu labels: 'Not yet implemented' lines: #(0) selections: #(flash)!

Item was removed:
- ----- Method: InspectorBrowser>>msgPaneMenu:shifted: (in category 'messages') -----
- msgPaneMenu: aMenu shifted: shifted
-        ^ aMenu labels:
- 'find... (f)
- find again (g)
- find and replace...
- do/replace again (j)
- undo (z)
- redo (Z)
- copy (c)
- cut (x)
- paste (v)
- do it (d)
- print it (p)
- inspect it (i)
- accept (s)
- cancel (l)'
-                lines: #(0 4 6 9 12)
-                selections: #(find findAgain findReplace again undo redo copySelection cut paste doIt printIt inspectIt accept cancel)!

Item was removed:
- ----- Method: InspectorBrowser>>msgText (in category 'messages') -----
- msgText
-        msgListIndex = 0 ifTrue: [^ nil].
-        ^ object class sourceCodeAt: (msgList at: msgListIndex)!

Item was removed:
- ----- Method: InspectorBrowser>>step (in category 'stepping and presenter') -----
- step
-        | list fieldString msg |
-        (list := super fieldList) = fieldList ifFalse:
-                [fieldString := selectionIndex > 0 ifTrue: [fieldList at: selectionIndex] ifFalse: [nil].
-                fieldList := list.
-                selectionIndex := fieldList indexOf: fieldString.
-                self changed: #fieldList.
-                self changed: #selectionIndex].
-        list := msgList.  msgList := nil.  "force recomputation"
-                list = self msgList ifFalse:
-                [msg := msgListIndex > 0 ifTrue: [list at: msgListIndex] ifFalse: [nil].
-                msgListIndex := msgList indexOf: msg.
-                self changed: #msgList.
-                self changed: #msgListIndex].
-        super step!

Item was added:
+ ----- Method: InspectorBrowser>>stepAt:in: (in category 'stepping and presenter') -----
+ stepAt: millisecondClockValue in: aWindow
+       
+        super stepAt: millisecondClockValue in: aWindow.
+        browser stepAt: millisecondClockValue in: aWindow.!

Item was removed:
- ----- Method: InspectorBrowser>>wantsSteps (in category 'accessing') -----
- wantsSteps
-        ^ true!





Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-ct.901.mcz

David T. Lewis
Returning to topic, Tools-ct.901.mcz is a good enhancement and also
a bug fix. It should be merged to trunk.

Tools-ct.905 and Tools-ct.903 are also good, and could go into the
same merge commit.

I am less certain about Tools-ct.904, Tools-ct.902, and Tools-ct.900,
but only because I have not looked closely at them.

@Marcel, I am assuming you are reviewing these, but I would be happy
to merge 901, 903, and 905 into trunk if no one else gets to it in
the next day or so.

Dave

On Tue, Oct 08, 2019 at 09:01:03AM +0200, Marcel Taeumel wrote:

> Hmm... there is already ObjectExplorer and InspectorBrowser. I like these ideas but they should manifest in a *new* tool. :-) Less interference with existing working habits that way.
>
> Best,
> Marcel
> Am 07.10.2019 20:24:04 schrieb Chris Muller <[hidden email]>:
> Christoph, this is very nice, but I actually have (had?) plans to do a similar enhancement, only:
>
> ?? - instead of the source code, show the result of evaluating the selected message.
> ?? - The pane would show the printString of the result, but prefixed by a small embedded Morph (via TextAnchor) as the first character which, itself, can:
>
> ?? ?? ?? ?? - be clicked to open a new InspectorBrowser on that object, OR
> ?? ?? ?? ?? - dragged, (just as inspector variables can) as an argument to another binary or keyword selector in the messages pane of the same or other InspectorBrowser (enabling that result to be displayed and used, likewise)
>
> I've always wanted Smalltalk's Inspector to be better at *working* with objects, instead of only inspecting their physical state and only allowing access via their API by typing expressions.?? Smalltalk is overdue to have an "Object browser" for users that presents its API properly and usably.
>
>
> Best,
> ?? Chris
>
>
> On Wed, Oct 2, 2019 at 4:21 PM Thiede, Christoph <[hidden email] [mailto:[hidden email]]> wrote:
>
> Should all the removed methods here be to moved into *60Deprecated, or would you consider them an implementation detail?
> Von: Squeak-dev <[hidden email] [mailto:[hidden email]]> im Auftrag von [hidden email] [mailto:[hidden email]] <[hidden email] [mailto:[hidden email]]>
> Gesendet: Mittwoch, 2. Oktober 2019 23:19:38
> An: [hidden email] [mailto:[hidden email]]
> Betreff: [squeak-dev] The Inbox: Tools-ct.901.mcz
> ??
> A new version of Tools was added to project The Inbox:
> http://source.squeak.org/inbox/Tools-ct.901.mcz [http://source.squeak.org/inbox/Tools-ct.901.mcz]
>
> ==================== Summary ====================
>
> Name: Tools-ct.901
> Author: ct
> Time: 2 October 2019, 11:19:39.149682 pm
> UUID: 2641031f-a660-7642-8fae-5f415cf51f6d
> Ancestors: Tools-ul.899
>
> Deduplicates the InspectorBrowser by adapting to a real Browser and respecting to super. This also enhances look + functionality noticeably. Increases initialExtent for a nicer sight.
>
> You can open an InspectorBrowser by doing:
> InspectorBrowser openOn: Morph new.
>
> =============== Diff against Tools-ul.899 ===============
>
> Item was changed:
> ?? Inspector subclass: #InspectorBrowser
> +?????????????? instanceVariableNames: 'browser'
> -?????????????? instanceVariableNames: 'fieldList msgList msgListIndex'
> ???????????????? classVariableNames: ''
> ???????????????? poolDictionaries: ''
> ???????????????? category: 'Tools-Inspector'!
> ??
> ?? !InspectorBrowser commentStamp: 'tcj 3/12/2018 07:55' prior: 0!
> ?? I am an inspector that also shows all messages the inspected objects can understand. I combine inspector and code browser.
> ??
> ?? InspectorBrowser openOn: Smalltalk!
>
> Item was added:
> + ----- Method: InspectorBrowser>>browser (in category 'initialize-release') -----
> + browser
> +
> +?????????????? ^ browser ifNil: [browser := Browser new]!
>
> Item was changed:
> + ----- Method: InspectorBrowser>>buildWith: (in category 'toolbuilder') -----
> - ----- Method: InspectorBrowser>>buildWith: (in category 'tool builder') -----
> ?? buildWith: builder
> ??
> +?????????????? | windowSpec |
> +?????????????? windowSpec := self buildWindowWith: builder specs: {
> +?????????????????????????????? (0@0 corner: 0.3@0.3) -> [self buildFieldListWith: builder].
> +?????????????????????????????? (0.3@0 corner: 1.0@0.3) -> [self buildValuePaneWith: builder].
> +?????????????????????????????? (0@0.3 corner: 0.3@1.0) -> [browser buildMessageListWith: builder].
> +?????????????????????????????? (0.3@0.3 corner: 1.0@1.0) -> [browser buildCodePaneWith: builder].
> +?????????????? }.
> +?????????????? ^ builder build: windowSpec!
> -?????????????? | window fieldSpec valueSpec msgSpec codeSpec |
> -??????????????
> -?????????????? window := builder pluggableWindowSpec new
> -?????????????????????????????? model: self;
> -?????????????????????????????? children: OrderedCollection new;
> -?????????????????????????????? yourself.
> -??????????????????????????????
> -?????????????? fieldSpec := builder pluggableListSpec new
> -?????????????????????????????? model: self;
> -?????????????????????????????? list: #fieldList;
> -?????????????????????????????? getIndex: #selectionIndex;
> -?????????????????????????????? setIndex: #toggleIndex:;
> -?????????????????????????????? menu: #fieldListMenu:;
> -?????????????????????????????? frame: (0@0 corner: 0.3@0.5).
> -??????????????
> -?????????????? valueSpec := builder pluggableTextSpec new
> -?????????????????????????????? model: self;
> -?????????????????????????????? getText: #contents;
> -?????????????????????????????? setText: #accept:;
> -?????????????????????????????? menu: #codePaneMenu:shifted:;
> -?????????????????????????????? frame: (0.3@0 corner: 1.0@0.5).
> -
> -?????????????? msgSpec := builder pluggableListSpec new
> -?????????????????????????????? model: self;
> -?????????????????????????????? list: #msgList;
> -?????????????????????????????? getIndex: #msgListIndex;
> -?????????????????????????????? setIndex: #msgListIndex:;
> -?????????????????????????????? menu: #msgListMenu;
> -?????????????????????????????? frame: (0@0.5 corner: 0.3@1.0).
> -??????????????????????????????
> -?????????????? codeSpec := builder pluggableTextSpec new
> -?????????????????????????????? model: self;
> -?????????????????????????????? getText: #msgText;
> -?????????????????????????????? setText: #msgAccept:from:;
> -?????????????????????????????? menu: #msgPaneMenu:shifted:;
> -?????????????????????????????? frame: (0.3@0.5 corner: 1.0@1.0).
> -??????????????
> -?????????????? window children addAll: {fieldSpec. valueSpec. msgSpec. codeSpec}.
> -?????????????? ^ builder build: window!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>fieldList (in category 'accessing') -----
> - fieldList
> -?????????????? fieldList ifNotNil: [^ fieldList].
> -?????????????? ^ (fieldList := super fieldList)!
>
> Item was added:
> + ----- Method: InspectorBrowser>>initialExtent (in category 'toolbuilder') -----
> + initialExtent
> +
> +?????????????? ^ super initialExtent * 3/2!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>initialize (in category 'initialize-release') -----
> - initialize
> -
> -?????????????? super initialize.
> -?????????????? fieldList := nil.
> -?????????????? msgListIndex := 0.
> -?????????????? self changed: #msgText
> - !
>
> Item was changed:
> ?? ----- Method: InspectorBrowser>>inspect: (in category 'initialize-release') -----
> ?? inspect: anObject
> ???????????????? "Initialize the receiver so that it is inspecting anObject. There is no current selection.
> ???????????????? Overriden so that my class is not changed to 'anObject inspectorClass'."
> ????????????????
> ???????????????? object := anObject.
> +?????????????? self browser selectClass: anObject class.
> ???????????????? self initialize
> ?? !
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgAccept:from: (in category 'messages') -----
> - msgAccept: newText from: editor
> -?????????????? | category |
> -?????????????? category := msgListIndex = 0
> -?????????????????????????????? ifTrue: [ClassOrganizer default]
> -?????????????????????????????? ifFalse: [object class organization categoryOfElement: (msgList at: msgListIndex)].
> -?????????????? ^ (object class compile: newText classified: category notifying: editor) ~~ nil!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgList (in category 'messages') -----
> - msgList
> -
> -?????????????? ^msgList ifNil: [ msgList := object class selectors sort ]!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgListIndex (in category 'messages') -----
> - msgListIndex
> -?????????????? ^msgListIndex!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgListIndex: (in category 'messages') -----
> - msgListIndex: anInteger
> -?????????????? "A selection has been made in the message pane"
> -
> -?????????????? msgListIndex := anInteger.
> -?????????????? self changed: #msgText.!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgListMenu: (in category 'messages') -----
> - msgListMenu: aMenu
> -?????????????? ^ aMenu labels: 'Not yet implemented' lines: #(0) selections: #(flash)!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgPaneMenu:shifted: (in category 'messages') -----
> - msgPaneMenu: aMenu shifted: shifted
> -?????????????? ^ aMenu labels:
> - 'find... (f)
> - find again (g)
> - find and replace...
> - do/replace again (j)
> - undo (z)
> - redo (Z)
> - copy (c)
> - cut (x)
> - paste (v)
> - do it (d)
> - print it (p)
> - inspect it (i)
> - accept (s)
> - cancel (l)'
> -?????????????????????????????? lines: #(0 4 6 9 12)
> -?????????????????????????????? selections: #(find findAgain findReplace again undo redo copySelection cut paste doIt printIt inspectIt accept cancel)!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>msgText (in category 'messages') -----
> - msgText
> -?????????????? msgListIndex = 0 ifTrue: [^ nil].
> -?????????????? ^ object class sourceCodeAt: (msgList at: msgListIndex)!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>step (in category 'stepping and presenter') -----
> - step
> -?????????????? | list fieldString msg |
> -?????????????? (list := super fieldList) = fieldList ifFalse:
> -?????????????????????????????? [fieldString := selectionIndex > 0 ifTrue: [fieldList at: selectionIndex] ifFalse: [nil].
> -?????????????????????????????? fieldList := list.
> -?????????????????????????????? selectionIndex := fieldList indexOf: fieldString.
> -?????????????????????????????? self changed: #fieldList.
> -?????????????????????????????? self changed: #selectionIndex].
> -?????????????? list := msgList.?? msgList := nil.?? "force recomputation"
> -?????????????????????????????? list = self msgList ifFalse:
> -?????????????????????????????? [msg := msgListIndex > 0 ifTrue: [list at: msgListIndex] ifFalse: [nil].
> -?????????????????????????????? msgListIndex := msgList indexOf: msg.
> -?????????????????????????????? self changed: #msgList.
> -?????????????????????????????? self changed: #msgListIndex].
> -?????????????? super step!
>
> Item was added:
> + ----- Method: InspectorBrowser>>stepAt:in: (in category 'stepping and presenter') -----
> + stepAt: millisecondClockValue in: aWindow
> +??????????????
> +?????????????? super stepAt: millisecondClockValue in: aWindow.
> +?????????????? browser stepAt: millisecondClockValue in: aWindow.!
>
> Item was removed:
> - ----- Method: InspectorBrowser>>wantsSteps (in category 'accessing') -----
> - wantsSteps
> -?????????????? ^ true!
>
>
>

>