[ANN] MessageFlowBrowser

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

[ANN] MessageFlowBrowser

Torsten Bergmann
A new tool to browse and dive deep into the flow of messages
using a tree representation (messages, senders, implementors, ...)
and further on. I know such a tool from Smalltalk/MT and it is really
helpful to trace a message flow without running in the debugger.

See the attached screenshot, the best is to try it:

In a latest Pharo 5.0 image (Pharo5.0 Latest update: #50314)
you can evaluate:

  Gofer new
     url: 'http://smalltalkhub.com/mc/TorstenBergmann/MessageFlowBrowser/main';
     package: 'Tool-MessageFlowBrowser';
     load

to load it.

Then open whatever method in Nautilus and choose "Message Flow" from the context
menu. The nice thing is that you can dive into senders, implementors, messages sent
deeper and deeper (or up again) and you do not open more and more windows but stay
in a single window !!!

Alternatively you can start the tool from the playground:

 MessageFlowBrowser openOn: #inspect "open the flow browser on a selector"

 MessageFlowBrowser openOn: (Compiler>>#evaluate) "open the flow browser on a method"
 
 MessageFlowBrowser openOn: Object   "open the flow browser on a class"

 1 messageFlow.                      "open the flow browser on the class of an instance"


If someone with GT knowledge and time could help to correct the syntax highlighting
in the code pane this would be super cool (see method MessageFlowBrowser #openOn:).
Also selection could be improved to show/highlight the messages sent directly
in the code. Unfortunately I'm not so familar with the current code editors - so
any help is appreciated.

Repo is open for contribution.

Thanks
T.


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

Re: [ANN] MessageFlowBrowser

Nicolai Hess


2015-09-09 14:07 GMT+02:00 Torsten Bergmann <[hidden email]>:
A new tool to browse and dive deep into the flow of messages
using a tree representation (messages, senders, implementors, ...)
and further on. I know such a tool from Smalltalk/MT and it is really
helpful to trace a message flow without running in the debugger.


Great!
 


If someone with GT knowledge and time could help to correct the syntax highlighting
in the code pane this would be super cool (see method MessageFlowBrowser #openOn:).

You need to set the class this method belongs to:

a smalltalkCode       
   smalltalkClass: [:each | each <class/behavior> ];     
   display: [:each | each sourceCode ]].   
 
Also selection could be improved to show/highlight the messages sent directly
in the code. Unfortunately I'm not so familar with the current code editors - so
any help is appreciated.

Repo is open for contribution.

Thanks
T.


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] MessageFlowBrowser

Torsten Bergmann
In reply to this post by Torsten Bergmann
Nicolai wrote:
>You need to set the class this method belongs to:
>
>a smalltalkCode
>   smalltalkClass: [:each | each <class/behavior> ];
>   display: [:each | each sourceCode ]].

Yes - I know that. At least from the code I found in the image.
But how do I do that in the context of Glamour where the tree is
transmitted to the code pane...

See #openOn: in MessageFlowBrowser.

Thanks
T.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] MessageFlowBrowser

abergel
In reply to this post by Torsten Bergmann
Hi Torsten,

Can you make it available from the catalog browser ?

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Sep 9, 2015, at 9:07 AM, Torsten Bergmann <[hidden email]> wrote:

A new tool to browse and dive deep into the flow of messages
using a tree representation (messages, senders, implementors, ...)
and further on. I know such a tool from Smalltalk/MT and it is really
helpful to trace a message flow without running in the debugger.

See the attached screenshot, the best is to try it:

In a latest Pharo 5.0 image (Pharo5.0 Latest update: #50314)
you can evaluate:

 Gofer new
    url: 'http://smalltalkhub.com/mc/TorstenBergmann/MessageFlowBrowser/main';
    package: 'Tool-MessageFlowBrowser';
    load

to load it.

Then open whatever method in Nautilus and choose "Message Flow" from the context
menu. The nice thing is that you can dive into senders, implementors, messages sent
deeper and deeper (or up again) and you do not open more and more windows but stay
in a single window !!!

Alternatively you can start the tool from the playground:

MessageFlowBrowser openOn: #inspect "open the flow browser on a selector"

MessageFlowBrowser openOn: (Compiler>>#evaluate) "open the flow browser on a method"

MessageFlowBrowser openOn: Object   "open the flow browser on a class"

1 messageFlow.                      "open the flow browser on the class of an instance"


If someone with GT knowledge and time could help to correct the syntax highlighting
in the code pane this would be super cool (see method MessageFlowBrowser #openOn:).
Also selection could be improved to show/highlight the messages sent directly
in the code. Unfortunately I'm not so familar with the current code editors - so
any help is appreciated.

Repo is open for contribution.

Thanks
T.

<messageflow.png>

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] MessageFlowBrowser

abergel
In reply to this post by Torsten Bergmann
Also, it would be great to have it accessible from the World/Tools menu.

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Sep 9, 2015, at 9:07 AM, Torsten Bergmann <[hidden email]> wrote:

A new tool to browse and dive deep into the flow of messages
using a tree representation (messages, senders, implementors, ...)
and further on. I know such a tool from Smalltalk/MT and it is really
helpful to trace a message flow without running in the debugger.

See the attached screenshot, the best is to try it:

In a latest Pharo 5.0 image (Pharo5.0 Latest update: #50314)
you can evaluate:

 Gofer new
    url: 'http://smalltalkhub.com/mc/TorstenBergmann/MessageFlowBrowser/main';
    package: 'Tool-MessageFlowBrowser';
    load

to load it.

Then open whatever method in Nautilus and choose "Message Flow" from the context
menu. The nice thing is that you can dive into senders, implementors, messages sent
deeper and deeper (or up again) and you do not open more and more windows but stay
in a single window !!!

Alternatively you can start the tool from the playground:

MessageFlowBrowser openOn: #inspect "open the flow browser on a selector"

MessageFlowBrowser openOn: (Compiler>>#evaluate) "open the flow browser on a method"

MessageFlowBrowser openOn: Object   "open the flow browser on a class"

1 messageFlow.                      "open the flow browser on the class of an instance"


If someone with GT knowledge and time could help to correct the syntax highlighting
in the code pane this would be super cool (see method MessageFlowBrowser #openOn:).
Also selection could be improved to show/highlight the messages sent directly
in the code. Unfortunately I'm not so familar with the current code editors - so
any help is appreciated.

Repo is open for contribution.

Thanks
T.

<messageflow.png>

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] MessageFlowBrowser

stepharo
In reply to this post by Torsten Bergmann
Coooool
I want to try it!
Thanks for it. This was a project I wanted to propose.


Le 9/9/15 14:07, Torsten Bergmann a écrit :

> A new tool to browse and dive deep into the flow of messages
> using a tree representation (messages, senders, implementors, ...)
> and further on. I know such a tool from Smalltalk/MT and it is really
> helpful to trace a message flow without running in the debugger.
>
> See the attached screenshot, the best is to try it:
>
> In a latest Pharo 5.0 image (Pharo5.0 Latest update: #50314)
> you can evaluate:
>
>    Gofer new
>       url: 'http://smalltalkhub.com/mc/TorstenBergmann/MessageFlowBrowser/main';
>       package: 'Tool-MessageFlowBrowser';
>       load
>
> to load it.
>
> Then open whatever method in Nautilus and choose "Message Flow" from the context
> menu. The nice thing is that you can dive into senders, implementors, messages sent
> deeper and deeper (or up again) and you do not open more and more windows but stay
> in a single window !!!
>
> Alternatively you can start the tool from the playground:
>
>   MessageFlowBrowser openOn: #inspect "open the flow browser on a selector"
>
>   MessageFlowBrowser openOn: (Compiler>>#evaluate) "open the flow browser on a method"
>  
>   MessageFlowBrowser openOn: Object   "open the flow browser on a class"
>
>   1 messageFlow.                      "open the flow browser on the class of an instance"
>
>
> If someone with GT knowledge and time could help to correct the syntax highlighting
> in the code pane this would be super cool (see method MessageFlowBrowser #openOn:).
> Also selection could be improved to show/highlight the messages sent directly
> in the code. Unfortunately I'm not so familar with the current code editors - so
> any help is appreciated.
>
> Repo is open for contribution.
>
> Thanks
> T.
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] MessageFlowBrowser

Torsten Bergmann
In reply to this post by abergel
Some new changes:

- Catalog methods were added and config is in MetaRepoForPharo50
   => should be available in CatalogBrowser and Spotter by tomorrow after catalog job run 
- it is now possible to browse the methods
- class comment added
- syntax highlighting is now working correctly (was easier than I thought - should always remember GT methods also accept blocks!)
 
Is there any code that marks/selects messages in a smalltalkCode editor?
Would be cool if you browse the messages that a method sends and you
click on the displaed method selectors in the tree they will be highlighted
in the code pane...
 
Alexandre wrote:
>Also, it would be great to have it accessible from the World/Tools menu.
 
No as it is not a standalone tool. You need to have a method or selector first
to display some contents. When catalog job is ready and catches the new
ConfigurationOfMessageFlowBrowser (tomorrow) you can:
 
  - hit ALT+ENTER to open spotter
  - search for the project by entering "Flow" and load it
  - when it is loaded just use "Method Flow" on a method in Nautilus

Maybe it would be good to have something similar to Cmd+M shortcut
that works on selected text and that is interpretet as selector.
 
Stef wrote:
>Thanks for it. This was a project I wanted to propose.
 
If you feel something is missing: the repo is open. An improved version
could possibly be a part of Pharo 5. A nice extension would be to add
also "local senders" and "local implementors" to it (= local to the class and
up the hierarchy) 
 
Have fun
T.

 
 
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] MessageFlowBrowser

EstebanLM

On 09 Sep 2015, at 21:14, Torsten Bergmann <[hidden email]> wrote:

Some new changes:

- Catalog methods were added and config is in MetaRepoForPharo50
   => should be available in CatalogBrowser and Spotter by tomorrow after catalog job run 
- it is now possible to browse the methods
- class comment added
- syntax highlighting is now working correctly (was easier than I thought - should always remember GT methods also accept blocks!)
 
Is there any code that marks/selects messages in a smalltalkCode editor?
Would be cool if you browse the messages that a method sends and you
click on the displaed method selectors in the tree they will be highlighted
in the code pane...
 
Alexandre wrote:
>Also, it would be great to have it accessible from the World/Tools menu.
 
No as it is not a standalone tool. You need to have a method or selector first
to display some contents.

+1

When catalog job is ready and catches the new
ConfigurationOfMessageFlowBrowser (tomorrow) you can:
 
  - hit ALT+ENTER to open spotter
  - search for the project by entering "Flow" and load it
  - when it is loaded just use "Method Flow" on a method in Nautilus

not there yet… I suppose we need to wait the refresh :)


Maybe it would be good to have something similar to Cmd+M shortcut
that works on selected text and that is interpretet as selector.
 
Stef wrote:
>Thanks for it. This was a project I wanted to propose.

yes, this was a missing tool. 
we could discuss also it’s introduction in the core distribution… what do you think?

Esteban

 
If you feel something is missing: the repo is open. An improved version
could possibly be a part of Pharo 5. A nice extension would be to add
also "local senders" and "local implementors" to it (= local to the class and
up the hierarchy) 
 
Have fun
T.