Skip to main content



      Home
Home » Eclipse Projects » P2 » Where did the ServiceReference and Activator class go?
Where did the ServiceReference and Activator class go? [message #1736556] Thu, 30 June 2016 06:27 Go to next message
Eclipse UserFriend
Where did the ServiceReference and Activator class go?

While reading the API documentation here (http://help.eclipse.org/mars/topic/org.eclipse.platform.doc.isv/guide/p2_api_overview.htm?cp=2_0_20_0) I tried to find the class ServiceReference and Activator to import the package that contains the classes. After looking at the org.eclipse.equinox.p2.* set of packages here (http://help.eclipse.org/mars/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/equinox/p2/core/package-summary.html?cp=2_1_0_85) I could not find ServiceReference and Activator.

Where did the ServiceReference and Activator class go?

Re: Where did the ServiceReference and Activator class go? [message #1736614 is a reply to message #1736556] Thu, 30 June 2016 11:03 Go to previous message
Eclipse UserFriend
ServiceReference is an OSGi class (org.osgi.framework). Activator is the bundle's activator and it's mostly used in the example code to fetch the BundleContext, which holds the OSGi framework's context for that particular bundle. You can also get a BundleContext for the bundle that contains the current class with:
BundleContext context = FrameworkUtil.getBundle(getClass()).getBundleContext();
Previous Topic:P2 loses user installed plugins after installing plugins as admin
Next Topic:Picking Plugins outside eclipse folder @ Headless Build
Goto Forum:
  


Current Time: Tue Jun 24 07:11:54 EDT 2025

Powered by FUDForum. Page generated in 0.03951 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top