【问题标题】:Import ecore package / referenced resources in Xtext/MWE2在 Xtext/MWE2 中导入 ecore 包/引用的资源
【发布时间】:2018-10-20 11:21:15
【问题描述】:

我不太确定如何通过在 workflow 部分的 GeneratyMydsl.mwe2 文件中导入来引用我想在 Xtext 语法中使用的模型。

他们通过添加引用模型的示例 referencedResource = “平台:/resource/org.example.domainmodel/model/Domainmodel.genmodel”

platform 是什么意思,我究竟如何引用我自己的模型?我的语法的文件位置与模型的文件位置没有真正的关联。

【问题讨论】:

    标签: eclipse dsl xtext


    【解决方案1】:

    platform:/resource/project/folder/file 是 Eclipse 中的一个 uri。所以platform:/resource/org.example.domainmodel/model/Domainmodel.genmodel 指向org.example.domainmodel 项目,model 文件夹,Domainmodel.genmodel 文件。

    EMF 和 MWE 通过查看文件夹结构和类路径来“模仿”独立模式下的行为。

    【讨论】:

    • 除此之外:您能否更具体地回答您的问题
    猜你喜欢
    • 2018-09-16
    • 1970-01-01
    • 1970-01-01
    • 2013-03-05
    • 1970-01-01
    • 2021-02-27
    • 2011-11-25
    • 2021-04-01
    • 1970-01-01
    相关资源
    最近更新 更多