How do you programmatically tell if an Eclipse plug-in makes a UI contribution?
How do I programmatically tell if an Eclipse plug-in does/does not make a UI contribution to Eclipse?
Specifically, I have access to a p2 repository, and I want to be able to tell which of the plug-ins in the repository do or do not make a UI contribution.
Or if开发者_开发百科 is there any other way not via the p2 (e.g. via BundleContext)?
Thanks!
There are two differences between UI and Non-UI plugins:
- UI plugins depend on other UI plugins and transitively depend on the SWT plugin
- UI plugin activators sub-class from
org.eclipse.ui.plugin.AbstractUIPlugin
, whereas non-UI plugin activators typically sub-class fromorg.eclipse.core.runtime.Plugin
.
If you are trying to analyze a p2 repository, then you should be looking for #1. Check all of the transitive dependencies for org.eclipse.swt.
精彩评论