Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext: Referencing Elements of one DSL from another DSL Problem
Xtext: Referencing Elements of one DSL from another DSL Problem [message #1024526] Tue, 26 March 2013 08:15
Srinivas MV is currently offline Srinivas MVFriend
Messages: 16
Registered: February 2013
Junior Member
Hi ,

I was trying out an example of Referencing Elements of one DSL from another DSL . I followed this example from Christian.

http://christiandietrich.wordpress.com/2012/08/07/xtext-referencing-elements-of-one-dsl-from-another-dsl/

Here is my grammar

grammar org.xtext.example.definitions.Definitions with org.eclipse.xtext.common.Terminals

generate definitions "http://www.xtext.org/example/definitions/Definitions"
import "http://www.eclipse.org/emf/2002/Ecore"
Model:
definitions+=Definition*;

Definition:
'define' name=[EClass];



Referencing Grammar

grammar org.xtext.example.usages.Usages with org.eclipse.xtext.common.Terminals

generate usages "http://www.xtext.org/example/usages/Usages"

import "http://www.xtext.org/example/definitions/Definitions" as def

Model:
usages+=Usage*;

Usage:
'use' definition=[def::Definition];


Exception thrown while running

1593 [main] INFO ipse.xtext.generator.LanguageConfig - generating infrastructure for org.xtext.example.usages.Usages with fragments : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment, EcoreGeneratorFragment, SerializerFragment, ResourceFactoryFragment, XtextAntlrGeneratorFragment, JavaValidatorFragment, ImportNamespacesScopingFragment, QualifiedNamesFragment, BuilderIntegrationFragment, GeneratorFragment, FormatterFragment, LabelProviderFragment, OutlineTreeProviderFragment, QuickOutlineFragment, QuickfixProviderFragment, JavaBasedContentAssistFragment, XtextAntlrUiGeneratorFragment, Junit4Fragment, RefactorElementNameFragment, TypesGeneratorFragment, XbaseGeneratorFragment, CodetemplatesGeneratorFragment, CompareFragment
java.lang.NullPointerException
at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.hasExtendedMetaData(GenPackageImpl.java:4388)
at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.initialize(GenPackageImpl.java:2777)
at org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.initialize(GenModelImpl.java:2265)
at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.getSaveAndReconcileGenModel(EcoreGeneratorFragment.java:652)
at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.generate(EcoreGeneratorFragment.java:207)
Previous Topic:Xtext Code generator Problem
Next Topic:How to obtain EMF model at certain offset
Goto Forum:
  


Current Time: Mon Jan 20 12:12:36 GMT 2020

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

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

Back to the top