The relationship between plugins in Eclipse

Is it possible to create Eclipse plugins that automatically open each other?

I am developing a set of plugins that should work in two main situations:

  • individually
  • in agreement with each other.

When you run individually, the plugins should "just work", but when they are consistent, they will use the same model content, and one of the plugins should present the user with a list of other plugins for sharing the content. eg:

Foo Plugin discovered the following plugins can share ontologies with:

[] Bar plugin

[] Base plugin

[] Do not use

Does Eclipse offer any internal publishing / discovery methods that would facilitate the automatic detection of other plugins?

+4
source share
2 answers

The answer should consist of a Declarative Service , which combines the advantages of expanding both eclipse xml and osgi POJO services. Something that is implicitly dynamic, like osgi services, but loads on demand, like the eclipse extension.

Introduced in 2006 for eclipse3.3, you will find those concepts that are illustrated in this presentation .

Declarative Services provides the ability to define a link to other services. You can also specify the power of the link. Power is set using two numbers, the first, 0 or 1, indicates optional, the second, 1 or n, indicates multiplicity.

In practice, these DS (declarative services) are not easy to use, since you need to access the BundleContext, which means tracking the BundleActivator, which is not always easy ...

If you need to define some model of service-oriented components, this presentation should provide you with various alternatives that exist today, as well as a detailed description of these "declarative services"


Post what rcreswick found in relation to DS:

+1
source

Well, the OSGI Service registry can share pojo-based services at runtime, not the plugins themselves. There are several options to make this process easier, such as coding directly to the OSGI API, declarative services, Spring DM, and iPojo (I'm sure there are others).

You might want to check out the Whiteboard template as a means of executing a dynamic solution like Observer / Observable.

0
source

All Articles