Community
Participate
Working Groups
Created attachment 120927 [details] pde-runtime-serviceproperties-1.patch Build ID: I20081211-1908 Steps To Reproduce: 1. Create a (RCP) app exposing some OSGi services 2. Launch it with the PDE Runtime oplugin included 3. Open the PDE Plugin Registry 4. Open Properties view 5. Locate the OSGi service in the Plugin Registry 6. No service properties shown More information: The Plugin registry is an invaluable tool, when inspecting and diagnosing problems from within a RCP application. Unfortunately it is very difficult to determine whether a specific OSGI service is registered or used, as the Plugin Registry simply shows the service by its registered interfaces. The attached patch for the PDE Runtime plugin provides a simple IPropertySource and adapter for the Properties View, which lists the service properties.
Wolfgang, this is cool addition! I'm only wondering whether it's better to keep service properties in Properties view, or directly in Plug-in registry view as nodes under the service node. Having it in plug-in registry would benefit in easy searching (thru the filter at the top of the view). For start we can have it in properties.
Hi Jacek! Thanks for the flowers :-) I think you're right regarding showing the service properties in the plugin registry view itself. Additional to searching it does not required an additional view. I try to come up with another patch including both options. Showing the service properties in plugin registry view would only need some additional changes to the content provider, as the service properties are already part of the ServiceRegistration object as of my patch.
I have now created two patches: pde-runtime-serviceproperties-2-pluginregistry.patch -> implements service properties (re-using class Attribute as property) and shows them in the tree as children of ServiceRegistration pde-runtime-serviceproperties-2-propertyview.patch (based on pde-runtime-serviceproperties-2-pluginregistry.patch) -> shows service properties in Properties View
Created attachment 121015 [details] implements service properties in plugin registry implements service properties (re-using class Attribute as property) and shows them in the tree as children of ServiceRegistration
Created attachment 121016 [details] shows service properties in Properties View (based on pde-runtime-serviceproperties-2-pluginregistry.patch) shows service properties in Properties View
I'll look at this for 3.5M5 Thanks for the contribution ;)
Created attachment 121346 [details] org.eclipse.pde.runtime.patch I updated the patch and also included a new icon for service properties. Thanks for your contribution! :)
Thanks Wolfgang! > 20081230
Hi Chris! I applied your changes and it looks nice. I made some more changes to show service properties by type: The attached patch shows service properties always in the following order: 1. "objectClass" (icon is "class_obj.gif") 2. "service.*" (sorted alphabetically, icon has overlay "run_co.gif") 3. everything else (sorted alphabetically) As the service object already shows the contents of the objectClass property, we might simply hide this property. And/or change the icon to "int_obj.gif"... BTW, showing service properties now makes it possible to find all OSGi services by specifying "objectClass" as filter, but an option to show only services, no bundles (similar to "Show Extension Content Only") would be nice as well. I updated the patch for showing service properties in the Properties View, although I'm not sure, if it is still required, but as the necessary plugin org.eclipse.ui.views is optional, I think it wouldn't hurt to include it. Thanks for integrating this functionality! Regards, Wolfgang
Created attachment 121608 [details] pde-runtime-serviceproperties-3-sorting-icons.patch Sort service properties and show different icons for "objectClass" and "service.*"
Created attachment 121609 [details] pde-runtime-serviceproperties-3-propertyview.patch Updated to work with changes made by Chris
> BTW, showing service properties now makes it possible to find all OSGi services > by specifying "objectClass" as filter, but an option to show only services, no > bundles (similar to "Show Extension Content Only") would be nice as well. Ah, I just found bug #220110. Of course after I had created a (trivial) patch for this. FWIW, I will attach it there...
See the attached screenshots for a view of the service properties. They have been taken after applying pde-runtime-serviceproperties-3-sorting-icons.patch, so the service properties are sorted as specified above and the properties "service.*" have an overlay icon.
Created attachment 121611 [details] pde-runtime-serviceproperties-3-sorting-icons-screenshot1.jpg Screenshot showing service properties in Registry Browser as well as Properties view. The displayed service has both OSGi-specific as well as custom service properties.
Created attachment 121612 [details] pde-runtime-serviceproperties-3-sorting-icons-screenshot2.jpg Screenshot showing service properties in Registry Browser as well as Properties view. The displayed service (part of Eclipse Equinox runtime) has only OSGi-specific service properties.
Created attachment 121618 [details] pde-runtime-serviceproperties-4-sorting-icons.patch This updated patch also displays "component.*" service properties (from Declarative Services) with the same icon as "service.*" and sorts them between "objectClass" and "service.*".