To better realize the dynamic loading/uninstalling plug-ins, eclipse has implemented the osgi specification since 3.0. A lot of content defined in the XML file is recommended in manifest. in the MF file, only <extension> and <extension-point> are exceptions. The following table lists the elements in the two file formats:
Plugin. xml tag/attribute |
Manifest. MF Header |
<Plugin id => |
Bundle-symbolicname |
<Plugin version => |
Bundle-version |
<Plugin name => |
Bundle-name |
<Plugin provider => |
Bundle-vendor |
<Plugin class => |
Bundle-Activator |
<Fragment Plugin-id => |
Fragment-host |
<Fragment Plugin-version => |
Fragment-Host: <ID>; bundle-version = |
<Requires>, <import> |
Require-bundle |
<Runtime>, <library> |
Bundle-classpath |
The specific conversion method can be seen here. That is to say, we recommend using manifest when developing plug-ins in eclipse 3.0 or later versions. mf file method (in fact, the plug-in manifest editor provided by eclipse has already done a lot of work for us in this regard. The new version of eclipse will automatically put it in manifest when creating a new project. the content in the MF file is transferred in the past ).