开发者

How do you programmatically tell if an Eclipse plug-in makes a UI contribution?

开发者 https://www.devze.com 2023-03-27 10:52 出处:网络
How do I programmatically tell if an Eclipse plug-in does/does not make a UI contribution to Eclipse?

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:

  1. UI plugins depend on other UI plugins and transitively depend on the SWT plugin
  2. UI plugin activators sub-class from org.eclipse.ui.plugin.AbstractUIPlugin, whereas non-UI plugin activators typically sub-class from org.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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号