完整的 TargetPlatform 能够使用 xtext 编辑器

Full TargetPlatform to be able to use the xtext editor

我需要将 xtext 与其他基于 Eclipse 的工具(基于 RCP 插件)集成。 我以 eclipse 示例 xtext 项目中提供的目标平台为例:

如果我使用来自 org.eclipse.xtext.example.domainmodel.releng 的目标平台,我在我的工作区中没有发现任何错误。目标平台:

设置 Target Platoform 和 运行 Eclipse 运行time 应用程序后,我无法在我的 Eclipe 运行time 实例中使用 xtext 编辑器。

编辑: 更改目标平台后,我无法使用 Domainmodel 编辑器打开:

目标平台实际上可能存在缺陷:在 2019-12(您似乎使用的)上启动 Eclipse 运行时时显示大量错误。

这可能是由于 includeMode="slicer" 告诉 PDE 不要获取额外的依赖项。我制作了以下似乎运行良好的目标平台:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<target name="Xtext Domainmodel Example - Eclipse 2019-12" sequenceNumber="1526502000">
  <locations>
      <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
          <repository location="http://download.eclipse.org/releases/2019-12"/>
          <unit id="org.eclipse.emf.sdk.feature.group" version="2.20.0.v20191028-0905"/>
          <unit id="org.eclipse.jdt.feature.group" version="3.18.200.v20191210-0610"/>
          <unit id="org.eclipse.sdk.feature.group" version="4.14.0.v20191210-0610"/>
          <unit id="org.eclipse.xtext.sdk.feature.group" version="2.20.0.v20191202-1256"/>
      </location>
  </locations>
</target>

下面的目标平台对我有用,使用了 xtext 2.21:

<target name="Xtext Domainmodel Example - Eclipse Photon" sequenceNumber="1526501985">
  <locations>
    <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
      <unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.pde.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
      <repository location="https://download.eclipse.org/releases/2019-12"/>
    </location>
    <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
      <unit id="org.eclipse.emf.mwe.sdk.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.emf.mwe2.runtime.sdk.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.emf.mwe2.language.sdk.feature.group" version="0.0.0"/>
      <repository location="https://download.eclipse.org/modeling/emft/mwe/updates/releases/2.11.2"/>
    </location>
    <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
        <unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
        <repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.21.0/"/>
    </location>
    <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
      <unit id="org.objectweb.asm" version="7.2.0.v20191010-1910"/>
      <unit id="org.objectweb.asm.tree" version="7.2.0.v20191010-1910"/>
      <unit id="com.google.inject" version="3.0.0.v201605172100"/>
      <unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
      <unit id="com.google.guava" version="27.1.0.v20190517-1946"/>
      <unit id="io.github.classgraph" version="4.8.35.v20190528-1517"/>
      <repository location="https://download.eclipse.org/tools/orbit/downloads/2019-12"/>
    </location>
    <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
      <unit id="org.eclipse.draw2d.feature.group" version="3.10.100.201606061308"/>
      <repository location="https://download.eclipse.org/tools/gef/updates/legacy/releases"/>
    </location>
  </locations>
</target>