Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Import of Xtext Grammar Model(Why is it not possible to import the Xtext Grammar EMF model)
Import of Xtext Grammar Model [message #1837039] Thu, 21 January 2021 10:20 Go to next message
Olaf Bigalk is currently offline Olaf BigalkFriend
Messages: 155
Registered: July 2009
Location: Berlin
Senior Member
I want to import the Xtext Grammar EMF model via
	referencedResource = "http://www.eclipse.org/2008/Xtext"

in my MWE2 workflow
Running the workflow yields the error genmodel not found.

How can I work around this problem?
Re: Import of Xtext Grammar Model [message #1837040 is a reply to message #1837039] Thu, 21 January 2021 10:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
wonder what the goal of this is.

you can try referencedResource = "platform:/resource/org.eclipse.xtext/org/eclipse/xtext/Xtext.genmodel"
or referencedResource = "classpath:/org/eclipse/xtext/Xtext.genmodel"
or "classpath:/org/eclipse/xtext/Xtext.xtext"
or something like that


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 21 January 2021 11:02]

Report message to a moderator

Re: Import of Xtext Grammar Model [message #1837067 is a reply to message #1837040] Thu, 21 January 2021 15:05 Go to previous messageGo to next message
Olaf Bigalk is currently offline Olaf BigalkFriend
Messages: 155
Registered: July 2009
Location: Berlin
Senior Member
Christian Dietrich wrote on Thu, 21 January 2021 05:25

you can try referencedResource = "platform:/resource/org.eclipse.xtext/org/eclipse/xtext/Xtext.genmodel"


Thank you very much the first option did it.
Can you explain why the genmodel of Xtext is not registered with its URI ?
Re: Import of Xtext Grammar Model [message #1837069 is a reply to message #1837067] Thu, 21 January 2021 15:08 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
cause referenced resource are not registered by namespace in general

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Import of Xtext Grammar Model [message #1837084 is a reply to message #1837069] Thu, 21 January 2021 20:06 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
HI

A GenModel has no Epaxkage so it cannot possibly be registered by its non-existent nsURI.

It is however consistently registered by the following plugin.xml snippet.

  <extension point="org.eclipse.emf.ecore.generated_package">
    <package 
       uri = "http://www.eclipse.org/2008/Xtext" 
       class = "org.eclipse.xtext.XtextPackage"
       genModel = "org/eclipse/xtext/Xtext.genmodel" /> 
  </extension>


that populates a Map accessible by EcorePlugin.getEPackageNsURIToGenModelLocationMap().

Regards

Ed Willink
Previous Topic: DeclarativeScopeProvider as delegate
Next Topic:Using FQN rule in reference rules does not work as expexcted.
Goto Forum:
  


Current Time: Fri Apr 19 14:07:11 GMT 2024

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

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

Back to the top