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 2017-11-02 16:16 GMT+01:00 Juraj Kubelka <[hidden email]>: Hi, Looks good. But to activate this plugin on current system environment you need to reset it:
Or manually add new plugin:
Let’s say that I want a new method group that displays all methods of a selected class that include substring ‘foo’. |
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
|
2017-11-02 16:50 GMT+01:00 Juraj Kubelka <[hidden email]>:
Any method group can implement class side method: Look at implementors for examples
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:
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
|
Thanks for the help, it looks good :-)
I have published it here: https://github.com/JurajKubelka/CalypsoExtensions Cheers, Juraj
|
Free forum by Nabble | Edit this page |