Home » Modeling » TMF (Xtext) » Problem on launching Eclipse 2019.03 with Xtext and xcore
Problem on launching Eclipse 2019.03 with Xtext and xcore [message #1805180] |
Tue, 09 April 2019 12:13 |
Wendel Przygoda Messages: 1 Registered: April 2019 |
Junior Member |
|
|
Greetings to all.
I have a problem migrating old version of my DSL for the new version of Xtext + xcore. We migrate our enviroment to OpenJDK11, and now it's the time to update the DSL projects.
After migrate to Eclipse -> 2019.03, Xtext -> 2.17.0 and xocre -> 1.9.0, I get the following error when launch the Eclipse Platform im run/debug my DSL.
!SESSION 2019-04-09 08:43:32.604 -----------------------------------------------
eclipse.buildId=unknown
java.version=11
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -application org.eclipse.ui.ide.workbench
Command-line arguments: -application org.eclipse.ui.ide.workbench -data /home/wendel/workspaces/workspace-dsl-java11/../runtime-EclipseXtext -dev file:/home/wendel/workspaces/workspace-dsl-java11/.metadata/.plugins/org.eclipse.pde.core/Launch Runtime Eclipse/dev.properties -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2019-04-09 08:43:37.108
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench" could not be found in the registry. The applications available are: org.eclipse.pde.build.Build, org.eclipse.ant.core.antRunner, org.eclipse.ant.ui.antRunner, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.importer.ecore.Ecore2GenModel, org.eclipse.emf.importer.java.Java2GenModel, org.eclipse.emf.importer.rose.Rose2GenModel, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.pde.junit.runtime.coretestapplicationnonmain, org.eclipse.pde.junit.runtime.nonuithreadtestapplication.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:252)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:33)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1476)
at org.eclipse.equinox.launcher.Main.main(Main.java:1449)
It's easy to reproduce the problem. If I create a new Xtext Project example from Wizard, and launch in debug, it works perfectly.
But we have a xcore model. And this requires the org.eclipse.emf.ecore.xcore.lib dependency on the xcore project. So I must have to add the org.eclipse.emf.sdk.feature.group 1.9.0. With this setup, when I try to launch the Eclipse Runtime, I got the error log above.
I hope that I make myself clear.
These are my artifacts
mydsl.xcore
package org.xtext.example.mydsl
class Model {
contains Greeting[] greetings
}
class Greeting {
String name
}
GenerateMyDsl.mwe2
module org.xtext.example.mydsl.GenerateMyDsl
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
var rootPath = ".."
Workflow {
component = XtextGenerator {
configuration = {
project = StandardProjectConfig {
baseName = "org.xtext.example.mydsl"
rootPath = rootPath
runtimeTest = {
enabled = true
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = true
}
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
}
}
language = StandardLanguage {
name = "org.xtext.example.mydsl.MyDsl"
fileExtensions = "mydsl"
referencedResource = "platform:/resource/org.xtext.example.mydsl.model/model/mydsl.xcore"
fragment = ecore2xtext.Ecore2XtextValueConverterServiceFragment2 auto-inject {}
formatter = {
generateStub = true
}
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
junitSupport = {
junitVersion = "5"
}
}
}
}
MyDsl.xtext
// automatically generated by Xtext
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals
import "org.xtext.example.mydsl"
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
Model returns Model:
{Model}
'Model'
'{'
('greetings' '{' greetings+=Greeting ( "," greetings+=Greeting)* '}' )?
'}';
Greeting returns Greeting:
{Greeting}
'Greeting'
name=EString;
EString returns ecore::EString:
STRING | ID;
Thanks to all.
|
|
| |
Goto Forum:
Current Time: Fri Mar 29 14:45:35 GMT 2024
Powered by FUDForum. Page generated in 0.03172 seconds
|