Skip to main content



      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 05:20 Go to next message
Eclipse UserFriend
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 05:25 Go to previous messageGo to next message
Eclipse UserFriend
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

[Updated on: Thu, 21 January 2021 06:02] by Moderator

Re: Import of Xtext Grammar Model [message #1837067 is a reply to message #1837040] Thu, 21 January 2021 10:05 Go to previous messageGo to next message
Eclipse UserFriend
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 10:08 Go to previous messageGo to next message
Eclipse UserFriend
cause referenced resource are not registered by namespace in general
Re: Import of Xtext Grammar Model [message #1837084 is a reply to message #1837069] Thu, 21 January 2021 15:06 Go to previous message
Eclipse UserFriend
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: Sat Jul 12 12:15:40 EDT 2025

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

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

Back to the top