Alternative to NautilusMethodSelected in Calypso

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

Alternative to NautilusMethodSelected in Calypso

Gustavo Santos
Hello,

I'm trying to upgrade MacroRecorder to Pharo7.
I used NautilusClassSelected and NautilusMethodSelected announcements to apply a macro in a given class or method right after the developer clicks on the browser. Something like

AbstractNautilusPlugin subclass: #MRNautilusPlugin ...

registerTo: aModel
      aModel announcer weak
when: NautilusClassSelected  send: #entitySelected: to: self;
when: NautilusMethodSelected send: #entitySelected: to: self.

How can I do the same with Calypso?

Cheers,
Reply | Threaded
Open this post in threaded view
|

Re: Alternative to NautilusMethodSelected in Calypso

Denis Kudriashov
Hi Gustavo.

There is no such events in Calypso. But you can subscribe on raw table selection changes like:
browser classView table onAnnouncement: FTSelectionChanged do: [:ann | 
    browser classSelection actualObjects "==> real class objects"]
You will need create subclass of ClyBrowserPlugin. And add this logic into #browser: method.



вт, 4 дек. 2018 г. в 17:47, Gustavo Santos <[hidden email]>:
Hello,

I'm trying to upgrade MacroRecorder to Pharo7.
I used NautilusClassSelected and NautilusMethodSelected announcements to apply a macro in a given class or method right after the developer clicks on the browser. Something like

AbstractNautilusPlugin subclass: #MRNautilusPlugin ...

registerTo: aModel
      aModel announcer weak
when: NautilusClassSelected  send: #entitySelected: to: self;
when: NautilusMethodSelected send: #entitySelected: to: self.

How can I do the same with Calypso?

Cheers,
Reply | Threaded
Open this post in threaded view
|

Re: Alternative to NautilusMethodSelected in Calypso

hernanmd
In reply to this post by Gustavo Santos
Hi Gustavo,

Is MacroRecorder available for Pharo 7?

Cheers,

Hernán

El mar., 4 dic. 2018 a las 14:47, Gustavo Santos
(<[hidden email]>) escribió:

>
> Hello,
>
> I'm trying to upgrade MacroRecorder to Pharo7.
> I used NautilusClassSelected and NautilusMethodSelected announcements to apply a macro in a given class or method right after the developer clicks on the browser. Something like
>
> AbstractNautilusPlugin subclass: #MRNautilusPlugin ...
>
> registerTo: aModel
>       aModel announcer weak
> when: NautilusClassSelected  send: #entitySelected: to: self;
> when: NautilusMethodSelected send: #entitySelected: to: self.
>
> How can I do the same with Calypso?
>
> Cheers,
> --
> Gustavo Santos
> http://gustavojss.github.io/