Hi, Are there any examples (documentation) how to extend Calipso? I have tried to create a simple (demo) method group, but I miss something, because it is not called. I have created three subclasses of: ClyMethodGroup (with #name and #includesMethod:), ClySingleMethodGroupProvider (with #methodGroupClass), and ClyEnvironmentPlugin (with #collectMethodGroupProvidersFor:). What do I miss? Letâs say that I want a new method group that displays all methods of a selected class that include substring âfooâ. Thanks! Juraj
Hi There is no real documentation for now. Only examples on my slides. 2017-11-02 16:16 GMT+01:00 Juraj Kubelka <juraj.kubelka@icloud.com>:
Hi,
Are there any examples (documentation) how to extend Calipso?
I have tried to create a simple (demo) method group, but I miss something, because it is not called.
I have created three subclasses of: ClyMethodGroup (with #name and #includesMethod:), ClySingleMethodGroupProvider (with #methodGroupClass), and ClyEnvironmentPlugin (with #collectMethodGroupProvidersFor:).
What do I miss?
Looks good. But to activate this plugin on current system environment you need to reset it: ClySystemNavigationEnvironment reset. Or manually add new plugin: ClySystemNavigationEnvironment currentImage addPlugin: ClyYourPlugin new. Letâs say that I want a new method group that displays all methods of a
selected class that include substring âfooâ.
Thanks! Juraj
Thanks! It works. Then I have two more questions: 1. How it is done that âshould be implementedâ has red color? 2. Then letâs say I want a message group that display all messages in the environment that refers to a selected class. I found `ClyClassReferences to: classes`, but I miss how to use it in that case. My class ClyClassReferencesMethodGroup should use it in #includesMethod: and #methods. What is the right way to use ClyClassReferences or access environment to make the query? Cheers, Juraj
On Nov 2, 2017, at 12:23, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hi
There is no real documentation for now. Only examples on my slides.
2017-11-02 16:16 GMT+01:00 Juraj Kubelka <juraj.kubelka@icloud.com <mailto:juraj.kubelka@icloud.com>>: Hi,
Are there any examples (documentation) how to extend Calipso?
I have tried to create a simple (demo) method group, but I miss something, because it is not called.
I have created three subclasses of: ClyMethodGroup (with #name and #includesMethod:), ClySingleMethodGroupProvider (with #methodGroupClass), and ClyEnvironmentPlugin (with #collectMethodGroupProvidersFor:).
What do I miss?
Looks good. But to activate this plugin on current system environment you need to reset it:
ClySystemNavigationEnvironment reset.
Or manually add new plugin:
ClySystemNavigationEnvironment currentImage addPlugin: ClyYourPlugin new.
Letâs say that I want a new method group that displays all methods of a selected class that include substring âfooâ.
Thanks! Juraj
2017-11-02 16:50 GMT+01:00 Juraj Kubelka <juraj.kubelka@icloud.com>:
Thanks! It works.
Then I have two more questions:
1. How it is done that âshould be implementedâ has red color?
Any method group can implement class side method: #decorateTableCell: anItemCellMorph of: groupItem Look at implementors for examples
2. Then letâs say I want a message group that display all messages in the environment that refers to a selected class.
I found `ClyClassReferences to: classes`, but I miss how to use it in that case. My class ClyClassReferencesMethodGroup should use it in #includesMethod: and #methods. What is the right way to use ClyClassReferences or access environment to make the query?
Right now queries are not reused by groups. Each group directly retrieves information from selected classes. So there is no access to the full environment. I am working on the model refactoring. And it is one of the parts which I want to improve. I want method group to be based on query for methods and query for subgroups. So it will be straightforward to get what you want. Now you can implement it in global way like: YourMethodGroup>>methods cursor := ClySystemNavigationEnvironment queryCurrentImageFor: (ClyClassReferences of: classes). ^cursor retrieveAllActualObjects But to make it usable you should always show this group: YourMethodGroupProvider>>buildGroupItemsOn: items items add: (YourMethodGroup classes: classes) asEnvironmentItem because by default provider adds only not empty groups where empty check can lead to long computation
Cheers, Juraj
On Nov 2, 2017, at 12:23, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hi
There is no real documentation for now. Only examples on my slides.
2017-11-02 16:16 GMT+01:00 Juraj Kubelka <juraj.kubelka@icloud.com>:
Hi,
Are there any examples (documentation) how to extend Calipso?
I have tried to create a simple (demo) method group, but I miss something, because it is not called.
I have created three subclasses of: ClyMethodGroup (with #name and #includesMethod:), ClySingleMethodGroupProvider (with #methodGroupClass), and ClyEnvironmentPlugin (with #collectMethodGroupProvidersFor:).
What do I miss?
Looks good. But to activate this plugin on current system environment you need to reset it:
ClySystemNavigationEnvironment reset.
Or manually add new plugin:
ClySystemNavigationEnvironment currentImage addPlugin: ClyYourPlugin new.
Letâs say that I want a new method group that displays all methods of a
selected class that include substring âfooâ.
Thanks! Juraj
Thanks for the help, it looks good :-) I have published it here: https://github.com/JurajKubelka/CalypsoExtensions <https://github.com/JurajKubelka/CalypsoExtensions> Cheers, Juraj
On Nov 2, 2017, at 13:20, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2017-11-02 16:50 GMT+01:00 Juraj Kubelka <juraj.kubelka@icloud.com <mailto:juraj.kubelka@icloud.com>>: Thanks! It works.
Then I have two more questions:
1. How it is done that âshould be implementedâ has red color?
Any method group can implement class side method: #decorateTableCell: anItemCellMorph of: groupItem Look at implementors for examples
2. Then letâs say I want a message group that display all messages in the environment that refers to a selected class.
I found `ClyClassReferences to: classes`, but I miss how to use it in that case. My class ClyClassReferencesMethodGroup should use it in #includesMethod: and #methods. What is the right way to use ClyClassReferences or access environment to make the query?
Right now queries are not reused by groups. Each group directly retrieves information from selected classes. So there is no access to the full environment. I am working on the model refactoring. And it is one of the parts which I want to improve. I want method group to be based on query for methods and query for subgroups. So it will be straightforward to get what you want.
Now you can implement it in global way like:
YourMethodGroup>>methods cursor := ClySystemNavigationEnvironment queryCurrentImageFor: (ClyClassReferences of: classes). ^cursor retrieveAllActualObjects
But to make it usable you should always show this group:
YourMethodGroupProvider>>buildGroupItemsOn: items
items add: (YourMethodGroup classes: classes) asEnvironmentItem
because by default provider adds only not empty groups where empty check can lead to long computation
Cheers, Juraj
On Nov 2, 2017, at 12:23, Denis Kudriashov <dionisiydk@gmail.com <mailto:dionisiydk@gmail.com>> wrote:
Hi
There is no real documentation for now. Only examples on my slides.
2017-11-02 16:16 GMT+01:00 Juraj Kubelka <juraj.kubelka@icloud.com <mailto:juraj.kubelka@icloud.com>>: Hi,
Are there any examples (documentation) how to extend Calipso?
I have tried to create a simple (demo) method group, but I miss something, because it is not called.
I have created three subclasses of: ClyMethodGroup (with #name and #includesMethod:), ClySingleMethodGroupProvider (with #methodGroupClass), and ClyEnvironmentPlugin (with #collectMethodGroupProvidersFor:).
What do I miss?
Looks good. But to activate this plugin on current system environment you need to reset it:
ClySystemNavigationEnvironment reset.
Or manually add new plugin:
ClySystemNavigationEnvironment currentImage addPlugin: ClyYourPlugin new.
Letâs say that I want a new method group that displays all methods of a selected class that include substring âfooâ.
Thanks! Juraj
participants (2)
-
Denis Kudriashov -
Juraj Kubelka