Eclipse 3.4 是否有很好的 jface 数据绑定框架示例和文档?

发布于 2024-08-13 22:28:27 字数 117 浏览 5 评论 0原文

官方网站非常稀缺,大多数示例都是 EMF 相关的,并且适用于 Eclipse 3.5。但是如果使用 3.4 目标 Eclipse 平台并且不使用 EMF 会怎样。 我对树查看器示例特别感兴趣,但总是赞赏好的示例和文档。

The official site is quite scarce and most of the examples are EMF- related and for Eclipse 3.5 But what if one uses 3.4 target Eclipse platform and does not use EMF.
I am specifically interested in Tree Viewer examples, but good example and documentation is always appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

路弥 2024-08-20 22:28:27

这里有一些很好的资源:

我不认为 eclipse 3.4 和 3.5 中的 JFace 数据绑定之间存在重大差异。概念仍然相同(ISWTObservables 等)。

编辑

Lars Vogel 演示了一个可观察的列表查看器以下代码:

// Define the viewer
viewer = new ListViewer(parent);
viewer.setContentProvider(new ObservableListContentProvider());
List<Person> persons = new ArrayList<Person>();
// Just for testing we create sample data
createExampleData(persons);
input = new WritableList(persons, Person.class);
// Set the writeableList as input for the viewer
viewer.setInput(input);

简介鼓励这也适用于 TreeViewers。您需要的内容提供程序是 org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider。它有点复杂,因为您需要一个列表工厂和一个 TreeStructureAdvisor 来构造这个内容提供程序。这就是我能提供的所有帮助。也没有找到示例,并且到目前为止还没有使用树查看器的数据绑定。因此,从现在开始,JFace API 文档必须成为您的朋友;)

Here are some good resources:

I do not think, there's a major difference between JFace databinding in eclipse 3.4 and 3.5. The concepts are still the same (ISWTObservables, etc).

Edit

Lars Vogel demonstrates an observable Listviewer with the following code:

// Define the viewer
viewer = new ListViewer(parent);
viewer.setContentProvider(new ObservableListContentProvider());
List<Person> persons = new ArrayList<Person>();
// Just for testing we create sample data
createExampleData(persons);
input = new WritableList(persons, Person.class);
// Set the writeableList as input for the viewer
viewer.setInput(input);

The introduction encourages that this works with TreeViewers aswell. The Content provider you need it org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider. It's a bit more complicated, because you need a list factory and a TreeStructureAdvisor to construct this content provider. That's all help I can provide. Didn't find an example either and didn't use databinding with tree viewers so far. So from now on the JFace API doc has to be your friend ;)

够运 2024-08-20 22:28:27

这是一个 示例的完整列表这个专门与TreeViewer相关。

Here is a comprehensive list of samples. This one is specifically related to TreeViewer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文