Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVT] not keyword recognized as a keyword
[QVT] not keyword recognized as a keyword [message #839570] Sun, 08 April 2012 23:19 Go to next message
chadi assem is currently offline chadi assem
Messages: 26
Registered: March 2012
Junior Member
hello, I face a problem that may already be familiar to some. When I code:

model::keywordlike_name::element

the keywordlike_name is recognized as a Keyword!!! as an exemple, I wrote:

model::references::ReferenceType
references remains RED
is this a qvt incapability of distinction or what!!?
Re: [QVT] not keyword recognized as a keyword [message #839737 is a reply to message #839570] Mon, 09 April 2012 05:43 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi

This is a problem in almost all languages. Try using 'package' as a
variable name in Java.

AFAIK Java offers no solution other than renaming.

Modeling requires all names to be useable, so there are escaping mechanisms.

In OCL 2.0 and 2.2, and consequently QVT 1.0 and 1.1, a '_' prefix could
be used.

In OCL 2.3 this was deprecated since it was ambiguous for already '_'
prefixed names. The preferred escaping is therefore to use an '_'
prefixed string literal, which also allows spaces, backspaces/new-lines
and any other garbage you might like in a name.

Since Eclipse QVTo reuses Eclipse OCL, the enhancement in OCL is present
in QVT as well so you can do model::_'references'::ReferenceType

Regards

Ed Willink

On 09/04/2012 00:19, sohaib soso wrote:
> hello, I face a problem that may already be familiar to some. When I
> code:
>
> model::keywordlike_name::element
>
> the keywordlike_name is recognized as a Keyword!!! as an exemple, I
> wrote:
>
> model::references::ReferenceType
> references remains RED is this a qvt incapability of distinction or
> what!!?
Previous Topic:Nmodels2Nmodels transformation [qvto]
Next Topic:[ATL] Transformation failure with model references serialized with absolute paths
Goto Forum:
  


Current Time: Fri Oct 24 11:31:10 GMT 2014

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

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