On 06/11/2009 06:10 PM, Dmitry Skavish wrote:
It's an advantage if you need a service, but extension point is not exactly
a service. For example you have an interface Command and there are two
different extension points (A and B) which could be extended by those
commands. I am creating a plugin to extend A, I don't want to extend B
because my commands are for A only. And there is some other plugin which
extends B using its own commands. The problem here is that my plugin which
extend A and this other plugin which extend B they both use this very
convenient interface Command. So they cannot just declare that they provide
services Command because A and B will try to consume commands from both of
them.

Of course I can create unique interfaces for A and B and extend them through
those unique interfaces, but in many cases it's artificial. Basically I am
forced to create those unique interfaces because interface is the only key
here.

Either way, you need some bits specified by someone somewhere to differentiate who should be getting what. I am not sure why using service properties for such a purpose would be any more or less artificial than any other approach.

In your example here, extension A could say, "I will only consume Command services with service proprty 'foo'," while B would do something similar for service property 'bar'. Either way, someone has to declare this info if you want to filter on it.

-> richard


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to