Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Wendel Przygoda is currently offline Wendel PrzygodaFriend
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.
Re: Problem on launching Eclipse 2019.03 with Xtext and xcore [message #1805369 is a reply to message #1805180] Fri, 12 April 2019 16:48 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
hi, i dont see how

Application "org.eclipse.ui.ide.workbench" could not be found in the registry.

should be Xtext related.
does this happen if you
- create a new plugin project
- add xcore.lib as dependency
run

you also should hit the validate button on the plugins section of the launch dialog


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 12 April 2019 16:50]

Report message to a moderator

Previous Topic:Breakpoint in outside workspace model file
Next Topic:Single Lined Comments With Ending Characters - Grammar Question
Goto Forum:
  


Current Time: Sat Aug 24 23:36:12 GMT 2019

Powered by FUDForum. Page generated in 0.02037 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top