javaeclipsextexttarget-platform

Full TargetPlatform to be able to use the xtext editor


I need to integrate xtext with other Eclipse based tool (based on RCP plugins). I have used as example the target platform provided in the eclipse example xtext project: enter image description here enter image description here

If I use the target platform from org.eclipse.xtext.example.domainmodel.releng I see no errors in my workspace. Target platform: enter image description here

After setting the Target Platoform and run Eclipse runtime app, I am not able to use the xtext editor in my Eclipe runtime instance.

EDIT: I cannot open with Domainmodel editor after changing the Target Platform: enter image description here


Solution

  • The target platform may actually be flawed: tons of errors are shown when launching an Eclipse runtime on 2019-12 (which you seem to use).

    It may be caused by the includeMode="slicer" which tells PDE not to fetch additional dependencies. I crafted the following target platform which seems to work well:

    <?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>