Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [TCS] Templates for ambiguous classes
[TCS] Templates for ambiguous classes [message #7486] Thu, 27 March 2008 12:21 Go to next message
T Kruse is currently offline T KruseFriend
Messages: 73
Registered: July 2009
Member
Hi, assuming you have a km3 metamodel with several packages and repeated
class names like this...

package SimpleTCS {
class Article {
attribute value : String;
}
}
package OtherPackage {
class Article {
attribute value2 : String;
}
}

...then if I define a TCS Syntax like this...
template Article
: "vaue" "=" value
;

...then this does not work with TCS:
[C-2] There are several metamodel Classes corresponding to ClassTemplate
Article

Is there a way to make this work with TCS, or are such situations
currently not supported?
Similarly, what would be the convention in the ModelAdapter to pass
qualifiedNames?
Re: [TCS] Templates for ambiguous classes [message #9745 is a reply to message #7486] Mon, 31 March 2008 08:35 Go to previous messageGo to next message
T Kruse is currently offline T KruseFriend
Messages: 73
Registered: July 2009
Member
Hi,
It is somewhat urgent for me to tackle this, so I need to know whether and
TCS deals with qualifying classes in metamodels.
I am prepared to extend TCS to include new syntax elements to make it
work. Currently I think the easiest would be to extend the names of
templates to be package notations, making it the responsibility of the
ModelAdapter and not the Parser to resolve the path.
The only other idea I have is extending the metamodel to have a path
attribute in NamedElement, which would be the full path to the element. I
don't know whether there is a better way.

Any idea what's better, or what TCS will do in the future?
Re: [TCS] Templates for ambiguous classes [message #9776 is a reply to message #9745] Mon, 31 March 2008 11:03 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi,

> It is somewhat urgent for me to tackle this, so I need to know whether
> and TCS deals with qualifying classes in metamodels. I am prepared to
> extend TCS to include new syntax elements to make it work. Currently I
> think the easiest would be to extend the names of templates to be
> package notations, making it the responsibility of the ModelAdapter and
> not the Parser to resolve the path.

The current version of TCS does not support fully qualified name.

What you suggest looks like what is currently supported in ATL. It would
indeed be nice to have this feature in TCS.



Regards,

Frédéric Jouault
Previous Topic:[TCS] ModelAdapter operations from multivalued attributes
Next Topic:[TCS]Create left-recursive syntax
Goto Forum:
  


Current Time: Wed Feb 05 11:55:27 GMT 2025

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

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

Back to the top