<p>Is it possible to create Eclipse plugins that auto-discover eachother?</p>

<p>I am developing a set of plugins that need to operate in two primary situations:</p>

<ul>
<li>individually</li>
<li>in concert with each other.</li>
</ul>

<p>When run individually, the plugins should "just work" but when in concert, they will be sharing some of the same model content, and one of the plugins should present the user with a list of other plugins to share content with. eg:</p>

<blockquote>
  <p>Foo Plugin detected the following
  plugins it can share ontologies with:</p>
  
  <p>[ ] Bar plugin</p>
  
  <p>[ ] Baz plugin   </p>
  
  <p>[ ] Don't share</p>
</blockquote>

<p>Does Eclipse offer any internal publication / detection methods that would facilitate this sort of auto-detection of other plugins?</p>

The answer should be through
Declarative Service
, which combines the advantages of both eclipse xml extensions and osgi POJO services. Something that is implicitly dynamic like osgi services, but loaded “on demand” like eclipse extensions.
Introduced in 2006 for eclipse3.3, you will find those concepts illustrated in
this presentation
.
Declarative Services gives the option to define reference to other services. It is also possible to specify the cardinality of the reference. The cardinality is specified using two numbers, the first one, 0 or 1, indicates the optionality, the second one, 1 or n, indicates the multiplicity.
In practice, those
DS (Declarative Services)
are not easy to use, as you have to access the BundleContext, meaning keeping track of the BundleActivator,
which is not always easy
...
If what you need is to define some sort of Service Oriented Component Model,
this presentation
should provide you with the different alternatives existing today, as well as detailing those "Declarative Services"
To publish what rcreswick has found in relation with DS:
Getting Started with OSGi:
Introducing Declarative Services
Getting Started with OSGi:
Declarative Services and Dependencies