[Setools] [OB] Access to browser in node instances?

David Röthlisberger squeak at c3com.ch
Fri Dec 8 08:29:20 UTC 2006



>> yes, I agree.
>> But how to create nodes for domain objects that do not know themselves 
>> what their successors are and that are not statically accessible for a 
>> given browser, but only dependent on a specific instance of a browser?
>>
> Each node having a reference to the feature is a possible way to go 
> about it - that's how my package browser worked. You could subclass the 
> node classes and override the navigation methods, or just fork the 
> package and modify the node's behavior directly.


Thanks Colin, I did it by subclassing all the node classes, it works, 
although I was hoping to find and easier solution. ;)


> Another option, in your case, is to use custom filters - subclassing 
> OBFilter or OBModalFilter (or both) - to filter out the program elements 
> that don't belong to the feature. It would be better to compose the 
> filters, but we don't have support for that; probably a good feature to 
> have.

yes, indeed.
In my case, however, I think it's easier and more efficient to enumerate 
the entities that belong to the feature than to iterate over all 
entities in a system to exclude most of them.


David




More information about the Setools mailing list