Target platform option description for creating plug-in projects in Eclipse-osgi, three different build

Source: Internet
Author: User

Original address: http://blog.csdn.net/jsjszg/article/details/7370814

When you create a new plug-in project, you need to select Target platform:

There are three types of options:

1. Eclipse version

2, an OSGi Framework:equinox

3, an OSGi Framework:standard


What do you mean?


Eclipse version refers to how the Eclipse UI plug-in works.

The An OSGi framework refers to a non-UI plug-in that runs under OSGi.
Option: Equinox refers to using Equinox (Eclipse's OSGi implementation)
Option: standard refers to the use of standards for OSGI implementations


Here's how they differ:

1. The difference between automatically generated code:

Select Eclipse version, then the default generated activator is inheritance and abstractuiplugin.

[Java]  View plain copy package helloservive04;      import  org.eclipse.ui.plugin.abstractuiplugin;   import org.osgi.framework.bundlecontext;     /**   * the activator class controls the plug-in life  cycle   */   public class activator extends abstractuiplugin  {          // The plug-in ID        public static final String PLUGIN_ID =  "HelloServive04";  //$ non-nls-1$          // The shared instance       private static Activator plugin;               /**       * The constructor       */       public activator ()  {       }           /*       *  (non-javadoc)        *  @see  org.eclipse.ui.plugin.abstractuiplugin#start ( Org.osgi.framework.BundleContext)        */        Public void start (bundlecontext context)  throws Exception {            super.start (context);            plugin = this;       }           /*       *  (non-javadoc)         *  @see  org.eclipse.ui.plugin.abstractuiplugin#stop (org.osgi.framework.BundleContext)        */ &nbsp     public void stop (Bundlecontext context)  throws Exception  {           plugin = null;            super.stop (context);       }           /**       * Returns the  shared instance       *       *  @return  the shared instance       */        Public static activator getdefault ()  {            return plugin;       }     }  

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.