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: 14665
Registered: July 2009
Senior Member
if you set the scope for x manually anyway why not using a simple name only

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: 14665
Registered: July 2009
Senior Member
jepp

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:JvmTypeReference and eIsProxy
Goto Forum:
  


Current Time: Fri Apr 26 15:49:38 GMT 2024

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

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

Back to the top