Difference between revisions of "FAQ How does OSGi and the new runtime affect me?"

From Eclipsepedia

Jump to: navigation, search
 
m
 
Line 7: Line 7:
 
to begin with, and each framework had many features
 
to begin with, and each framework had many features
 
that the other lacked.  
 
that the other lacked.  
 
 
  
 
By bringing the two together,
 
By bringing the two together,
Line 22: Line 20:
 
between the two frameworks. All in all, it’s what the marketing types
 
between the two frameworks. All in all, it’s what the marketing types
 
like to call a win-win situation.
 
like to call a win-win situation.
 
 
 
  
 
Now, to the question of how plug-ins are affected:  The new runtime
 
Now, to the question of how plug-ins are affected:  The new runtime
Line 42: Line 37:
 
the new runtime API and the old. The following example from a <tt>plugin.xml</tt>
 
the new runtime API and the old. The following example from a <tt>plugin.xml</tt>
 
file imports both the old and new runtimes:
 
file imports both the old and new runtimes:
 +
 
<pre>
 
<pre>
 
   &lt;requires&gt;
 
   &lt;requires&gt;
Line 47: Line 43:
 
   &lt;/requires&gt;
 
   &lt;/requires&gt;
 
</pre>
 
</pre>
 
 
 
  
 
Apart from that one change, you can continue using runtime facilities  
 
Apart from that one change, you can continue using runtime facilities  
Line 58: Line 51:
 
For now, the fact that Eclipse is running on OSGi is an implementation
 
For now, the fact that Eclipse is running on OSGi is an implementation
 
detail that will not significantly affect you.
 
detail that will not significantly affect you.
 
 
 
 
 
  
 
== See Also: ==
 
== See Also: ==
 +
*[[FAQ What is a dynamic plug-in?]]
 +
*[http://www.osgi.org The OSGi Web site]
  
 
+
{{Template:FAQ_Tagline}}
[[FAQ_What_is_a_dynamic_plug-in%3F]]
+
 
+
 
+
The OSGi Web site (http://www.osgi.org)
+
 
+
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
+

Latest revision as of 21:58, 29 May 2006

Just when you thought you were beginning to understand how the Eclipse kernel worked, those pesky Eclipse developers replaced it all for Eclipse 3.0. The kernel is now built on another Java component framework, the Open Services Gateway initiative (OSGi). The reasons for this convergence between Eclipse and OSGi are manifold. The two frameworks had many similarities to begin with, and each framework had many features that the other lacked.

By bringing the two together, Eclipse gained the infrastructure for many new features, especially dynamic addition and removal of plug-ins and a more robust security model. Eclipse in turn has a powerful declarative model—extensions and extension points—that OSGi lacked, in addition to more advanced support for multiple versions, fragments, a commercial-quality open source implementation, and great tooling support. Rather than creating a derivative OSGi++, the Eclipse community is contributing a number of important Eclipse features back into the OSGi specification, paving the way for better interoperability between the two frameworks. All in all, it’s what the marketing types like to call a win-win situation.

Now, to the question of how plug-ins are affected: The new runtime is 100 percent backward compatible with the runtime that existed in all versions before Eclipse 3.0. Plug-ins written prior to 3.0 will continue to run without requiring any modification. When you port a plug-in to 3.0, you can still make use of the old runtime API by explicitly importing the backward-compatibility layer, which is found in a separate plug-in. Although the boot and runtime plug-ins were imported automatically prior to Eclipse 3.0, the runtime must now be imported explicitly. The new runtime compatibility plug-in contains the deprecated portions of the API from the boot and runtime plug-ins and also exports the new runtime plug-in. In short, all you now have to import is the new runtime compatibility plug-in, and you will get access to both the new runtime API and the old. The following example from a plugin.xml file imports both the old and new runtimes:

   <requires>
      <import plugin="org.eclipse.core.runtime.compatibility"/> 
   </requires>

Apart from that one change, you can continue using runtime facilities as you did prior to Eclipse 3.0. Over time, more elements of the old runtime will likely become deprecated, and plug-ins will begin to use the equivalent OSGi APIs instead. However, for release 3.0, the focus is on getting the technology in place with minimal disruption to the rest of the platform. For now, the fact that Eclipse is running on OSGi is an implementation detail that will not significantly affect you.

[edit] See Also:


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.