【问题标题】:Eclipse error: The type org.eclipse.emf.edit.domain.EditingDomain cannot be resolved. It is indirectly referenced from required .class filesEclipse 错误:无法解析类型 org.eclipse.emf.edit.domain.EditingDomain。它是从所需的 .class 文件中间接引用的
【发布时间】:2016-11-14 21:54:44
【问题描述】:

我在 Eclipse 中收到一条错误消息:

The type org.eclipse.emf.edit.domain.EditingDomain cannot be resolved.
It is indirectly referenced from required .class files

当我尝试在我的 EMF 模型项目中使用 EMF DiffMerge 插件时,我得到了它。我将我的项目的实例模型从 EMF 持久化 XMI 文件加载到 Resource 并尝试像这样将其提供给 EMF DiffMerge(错误在最后一行给出):

ResourceSet resSet = new ResourceSetImpl();

Resource resource = resSet.getResource(URI.createURI("grafok/MyGraph.xmi"),true);
IEditableModelScope targetScope = new FragmentedModelScope(resource);

你能帮忙解决问题吗?

无论如何,我尝试清理项目并删除 JRE 库并将其再次添加到属性/Java 构建路径中,正如另一篇类似帖子中所建议的那样,但这些没有帮助。

【问题讨论】:

  • 您的依赖项中有org.eclipse.emf.edit.domain 插件吗?
  • 我不确定,因为我不确定我是否在正确的地方检查它。你能确认我应该在哪里检查吗?
  • 打开你的Manifest.MF文件并切换到查看依赖,点击添加并插入org.eclipse.emf.edit,添加这个插件可能会解决你的问题

标签: java resources emf diffmerge


【解决方案1】:

您需要将org.eclipse.emf.transaction 添加到项目的依赖项中。 这会解决你的问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-26
    • 1970-01-01
    相关资源
    最近更新 更多