【发布时间】:2016-03-01 20:23:48
【问题描述】:
在我的 Eclipse RCP 视图中,我使用 JFace 数据绑定将模型数据绑定到 org.eclipse.jface.viewers.TreeViewer。我使用ViewerSupport.bind()绑定数据,如sn-ps所示,效果很好。
ViewerSupport.bind(viewer, model, BeanProperties.list("children",
ModelObject.class), BeanProperties.value(ModelObject.class, "name"));
现在我真的很想在节点上显示图像以及文本。如果没有数据绑定,我只会覆盖LabelProvider 的getImage(Object element) 方法,但是内容+标签提供程序方法和ViewerSupport 的使用不能一起使用。我还没有在ViewerSupport API 中找到我的问题的解决方案。有没有解决方案,也许使用org.eclipse.core.databinding.property.value.IValuePropertys?
【问题讨论】:
标签: eclipse swt eclipse-rcp jface eclipse-databinding