Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Beginner Scoping/Referencing Problem(Referencing based on previous reference)
Xtext Beginner Scoping/Referencing Problem [message #1818732] Wed, 25 December 2019 11:10 Go to next message
Selin Aydin is currently offline Selin AydinFriend
Messages: 1
Registered: December 2019
Junior Member
Hi everyone,

I have a language like this:



Grammer rules, like
only work inside an object. I can reference ObjectA.attribute1 only in ObjectA, but not in Object B. I'm trying to get into the ScopeProvider, but is it possible to create a reference (attribute) based on the reference before (object)? Is there some documentation of similar cases? Thanks in advance!
Re: Xtext Beginner Scoping/Referencing Problem [message #1818825 is a reply to message #1818732] Mon, 30 December 2019 06:33 Go to previous message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 250
Registered: June 2013
Senior Member
Hi Selin.
In your case the reference should look like to handle the hierarchy :
FQN: ID ('.' ID)*;

This should work out of the box.

Have a look into the documentation for FQN (full qualified name):

Entity: ... 'extends' extends=[Entity|Fqn]...;
Fqn: ID ('.' ID)*;

explained in
Previous Topic:Code coverage of generated Java code
Next Topic:Error on retrieval of features in *Generator.xtend
Goto Forum:

Current Time: Mon Sep 20 00:16:52 GMT 2021

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

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

Back to the top