Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Re: Extension registry evolution

Boris Bokowski schrieb:
> public class SomeContributedView {
>  public SomeContributedView(ISelectionService ss, IProgressService ps,
> IWorkbenchHelpSystem hs) {
> ...
> }

I think it pretty much comes down to a personal preference. I could also
imagine that there could be a single "IUIServices" context which would
provide access to the UI services. But having the capability to inject
whatever is available in the context would definitely be a great helper.

> Note that I already see three interfaces "IDisposable" in my workspace
> (one in ECF, one in EMF, and one in Platform UI), and I suspect they
> all could extend this common one.

+1

> Another possibility, since you are using reflection anyway, is to not
> require clients to implement interfaces like this but rather call
> their init() and dispose() methods should they exist.

What I don't like with such reflection magic is that it makes it more
difficult to understand the code. It's not simple anymore to search for
callers of a method (Ctrl+Shift+G). That's why I would prefer having a
visible contract.

> (3) What about existing dependency injection frameworks? 

That's a good point. Is there any progress in relation to e4? I
understand that this is a work item on the e4 list.

-Gunnar


-- 
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx
http://wagenknecht.org/



Back to the top