Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Qualified name for EObject without a name
Qualified name for EObject without a name [message #1696241] Sun, 24 May 2015 10:58 Go to next message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
Hi,

I have a grammar that allows having something like this:

Blocklabel : BLOCK {
int x;
x = 5;
}
and also allows:

BLOCK{
int x;
x=5;
}

now the block may or maynot have a name. In setting the scope for x, I have to implement the qualified name. for the case with a name for the block (BlockLabel) I will set the qualified name to be BlockLabel.x, but for the second case, how can I set the scope for x?
Re: Qualified name for EObject without a name [message #1696254 is a reply to message #1696241] Sun, 24 May 2015 15:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13885
Registered: July 2009
Senior Member
if you set the scope for x manually anyway why not using a simple name only

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Qualified name for EObject without a name [message #1696381 is a reply to message #1696254] Tue, 26 May 2015 08:47 Go to previous messageGo to next message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
you mean only setting the qualifier name to the simple name only and not setting it to any higher level like this?
QualifiedName.create( IntegerDeclaration.getName() )?
Re: Qualified name for EObject without a name [message #1696404 is a reply to message #1696381] Tue, 26 May 2015 10:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13885
Registered: July 2009
Senior Member
jepp

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Qualified name for EObject without a name [message #1696405 is a reply to message #1696404] Tue, 26 May 2015 10:27 Go to previous message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
Thanks Smile
Previous Topic:Suggesting Java classes
Next Topic:File extension conflict
Goto Forum:
  


Current Time: Sun Apr 18 12:41:45 GMT 2021

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

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

Back to the top