Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » DI question
DI question [message #894204] Sat, 07 July 2012 12:18 Go to next message
Eclipse UserFriend
DI enables to find a provider for a certain service in a well-defined
context.
Is there some way to get a list of *all* possible providers of some
well-defined service?
This would enable to build some kind of super-service that can either
chose what implementation is better suited in the specific situation or
to apply all services in sequence, all this without need to know in
advance which and how many different implementations of the same service
will be provided.
Re: DI question [message #894530 is a reply to message #894204] Mon, 09 July 2012 10:15 Go to previous messageGo to next message
Eclipse UserFriend
OSGi has the notion of multiple provides of a service, and of properties and rankings that can help distinguish them.

What kind of pattern is it you want to apply to your injected Object? Are you talking OSGi-like inter-bundle communication services?

PW
Re: DI question [message #894566 is a reply to message #894530] Mon, 09 July 2012 11:35 Go to previous messageGo to next message
Eclipse UserFriend
On 09/07/2012 16:15, Paul Webster wrote:
> OSGi has the notion of multiple provides of a service, and of properties
> and rankings that can help distinguish them.
>
> What kind of pattern is it you want to apply to your injected Object?
> Are you talking OSGi-like inter-bundle communication services?

I am working (personal project, in my spare time) to implement a full
fledged TextEditor for E4 (in it's own plugin).
I am starting from the standard SourceViewer and adding capabilities.

I was toying with the idea to provide a generic interface for hover,
syntax coloring and similar things. The user of the TextEditor could
provide one or more (e.g.) "hover services" and the global hover would
display all hovers that are compatible with the current location.
Same thing with Syntax coloring, spell-checking and other possible
Annotations.
This would enable to define a new Annotation, together with a way to
display it and, possibly, some display criteria and have the TextEditor
to automatically pick it up.

Is this a stupid idea, for some reason?

MC
Re: DI question [message #894691 is a reply to message #894566] Tue, 10 July 2012 03:37 Go to previous message
Eclipse UserFriend
Hi Mauro,

I think it is easier to archive your target with the usage of extension points. They are designed to have multiple contributors.

Best regards, Lars
Previous Topic:Anyone ELSE have menu items disappear after updating Eclipse??
Next Topic:Processors
Goto Forum:
  


Current Time: Sun Jul 06 22:41:50 EDT 2025

Powered by FUDForum. Page generated in 0.04978 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top