嗨,任何人都可以解释我如何让我的编辑器为 Eclipse 中的属性 View 做出贡献。 以下链接详细解释了一些内容,但它们没有告诉我如何将项目资源管理器 View 或我自己的编辑器注册到属性 View 。
最佳答案
eclipse上的页面有一个link to an older tutorial 。他们在那里解释:
Every workbench part has a
IWorkbenchPartSite
, and one can set the selection provider for this site. When I created our sample view, I instantiated aListViewer
, which implementsISelectionProvider
. I pass thisListViewer
to theIWorkbenchPartSite
object viasetSelectionProvider
. This enables the property view to be informed of selection changes in our list when our view is the active workbench part.
该 View 显示选择的属性,它监听所有选择提供程序。您不必将 View 注册到选择接收器。
关于java - 属性 View 和编辑器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9463220/