Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Accessing a "guard" field in a model
Accessing a "guard" field in a model [message #482065] Tue, 25 August 2009 10:10 Go to next message
Osmar Marchi dos Santos is currently offline Osmar Marchi dos SantosFriend
Messages: 8
Registered: July 2009
Junior Member
Hi,

I need to access a field with the name "guard" in a model (e.g. var
foo := t.guard).
Unfortunately, "guard" seems to be a reserved keyword in Epsilon and
when running the Epsilon I got an error.
Any idea on how I could access this field directly?

Cheers,
Osmar
Re: Accessing a "guard" field in a model [message #482066 is a reply to message #482065] Tue, 25 August 2009 10:11 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Osmar,

var foo := t."guard"; should do the job.

Cheers,
Dimitris

Osmar Marchi dos Santos wrote:
> Hi,
>
> I need to access a field with the name "guard" in a model (e.g. var
> foo := t.guard).
> Unfortunately, "guard" seems to be a reserved keyword in Epsilon and
> when running the Epsilon I got an error.
> Any idea on how I could access this field directly?
>
> Cheers,
> Osmar
Re: Accessing a "guard" field in a model [message #482075 is a reply to message #482066] Tue, 25 August 2009 10:31 Go to previous messageGo to next message
Osmar Marchi dos Santos is currently offline Osmar Marchi dos SantosFriend
Messages: 8
Registered: July 2009
Junior Member
Thanks :)

Dimitris Kolovos wrote:
> Hi Osmar,
>
> var foo := t."guard"; should do the job.
>
> Cheers,
> Dimitris
>
> Osmar Marchi dos Santos wrote:
>> Hi,
>>
>> I need to access a field with the name "guard" in a model (e.g. var
>> foo := t.guard).
>> Unfortunately, "guard" seems to be a reserved keyword in Epsilon and
>> when running the Epsilon I got an error.
>> Any idea on how I could access this field directly?
>>
>> Cheers,
>> Osmar
Re: Accessing a "guard" field in a model [message #504521 is a reply to message #482075] Mon, 21 December 2009 08:35 Go to previous messageGo to next message
Hector is currently offline HectorFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,

After migrating to version 0.8.8 of Epsilon I have found that item."message" is not valid anymore.

Which is the right way to access to the attributes that have the same name as specific expressions of evl?

Best regards,
Héctor Iturria
Re: Accessing a "guard" field in a model [message #504563 is a reply to message #504521] Mon, 21 December 2009 14:39 Go to previous messageGo to next message
Enrico Schnepel is currently offline Enrico SchnepelFriend
Messages: 121
Registered: July 2009
Senior Member
This is the same problem Bak describes in
http://www.eclipse.org/forums/index.php?t=msg&th=159579& amp;start=0&S=006878493f0ea00bf65aa009f79065f7
with a proposed solution.

try item.~message

Enrico

"H" <hiturria@prodevelop.es> schrieb im Newsbeitrag
news:hgnc0c$ljd$1@build.eclipse.org...
> Hi,
>
> After migrating to version 0.8.8 of Epsilon I have found that
> item."message" is not valid anymore.
>
> Which is the right way to access to the attributes that have the same name
> as specific expressions of evl?
>
> Best regards,
> H
Re: Accessing a "guard" field in a model [message #504627 is a reply to message #504521] Mon, 21 December 2009 15:26 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
H wrote on Mon, 21 December 2009 03:35
Hi,

After migrating to version 0.8.8 of Epsilon I have found that item."message" is not valid anymore.

Which is the right way to access to the attributes that have the same name as specific expressions of evl?

Best regards,
Héctor Iturria


Héctor,

Since 0.8.8, the correct syntax is:
item.`message`


This change was introduced to make EOL's syntax more like Java's. Full details can be found here:

http://www.eclipse.org/gmt/epsilon/doc/articles/eol-syntax-u pdates/

Best,
Louis.
Re: Accessing a "guard" field in a model [message #504628 is a reply to message #504563] Mon, 21 December 2009 15:32 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Enrico Schnepel wrote on Mon, 21 December 2009 09:39
This is the same problem Bak describes in
http://www.eclipse.org/forums/index.php?t=msg&th=159579& amp; amp;start=0&S=006878493f0ea00bf65aa009f79065f7
with a proposed solution.

try item.~message

Enrico


Enrico,

The tilde prefix is used to access "extended" properties of a model element. Extended properties are used to attach some kind of information (that is not supported by the metamodel) to particular model elements. Until now, we've been using Maps to achieve this (similarly to what we've done above).

A more thorough discussion of extended properties is available here:

http://epsilonblog.wordpress.com/2008/01/30/extended-propert ies-in-eol/

I'll also post this information on the other thread you mention. Thanks!

Best,
Louis.
Re: Accessing a "guard" field in a model [message #506387 is a reply to message #482065] Thu, 07 January 2010 11:33 Go to previous messageGo to next message
Hector is currently offline HectorFriend
Messages: 20
Registered: July 2009
Junior Member
Many thanks, fixed!

Best regards,
Héctor
Re: Accessing a "guard" field in a model [message #574856 is a reply to message #482065] Tue, 25 August 2009 10:11 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Osmar,

var foo := t."guard"; should do the job.

Cheers,
Dimitris

Osmar Marchi dos Santos wrote:
> Hi,
>
> I need to access a field with the name "guard" in a model (e.g. var
> foo := t.guard).
> Unfortunately, "guard" seems to be a reserved keyword in Epsilon and
> when running the Epsilon I got an error.
> Any idea on how I could access this field directly?
>
> Cheers,
> Osmar
Re: Accessing a "guard" field in a model [message #579439 is a reply to message #482066] Tue, 25 August 2009 10:31 Go to previous messageGo to next message
Osmar Marchi dos Santos is currently offline Osmar Marchi dos SantosFriend
Messages: 8
Registered: July 2009
Junior Member
Thanks :)

Dimitris Kolovos wrote:
> Hi Osmar,
>
> var foo := t."guard"; should do the job.
>
> Cheers,
> Dimitris
>
> Osmar Marchi dos Santos wrote:
>> Hi,
>>
>> I need to access a field with the name "guard" in a model (e.g. var
>> foo := t.guard).
>> Unfortunately, "guard" seems to be a reserved keyword in Epsilon and
>> when running the Epsilon I got an error.
>> Any idea on how I could access this field directly?
>>
>> Cheers,
>> Osmar
Re: Accessing a "guard" field in a model [message #583968 is a reply to message #482075] Mon, 21 December 2009 08:35 Go to previous messageGo to next message
Hector is currently offline HectorFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,

After migrating to version 0.8.8 of Epsilon I have found that item."message" is not valid anymore.

Which is the right way to access to the attributes that have the same name as specific expressions of evl?

Best regards,
Héctor Iturria
Re: Accessing a "guard" field in a model [message #583982 is a reply to message #583968] Mon, 21 December 2009 14:39 Go to previous messageGo to next message
Enrico Schnepel is currently offline Enrico SchnepelFriend
Messages: 121
Registered: July 2009
Senior Member
This is the same problem Bak describes in
http://www.eclipse.org/forums/index.php?t=msg&th=159579& amp;start=0&S=006878493f0ea00bf65aa009f79065f7
with a proposed solution.

try item.~message

Enrico

"H" <hiturria@prodevelop.es> schrieb im Newsbeitrag
news:hgnc0c$ljd$1@build.eclipse.org...
> Hi,
>
> After migrating to version 0.8.8 of Epsilon I have found that
> item."message" is not valid anymore.
>
> Which is the right way to access to the attributes that have the same name
> as specific expressions of evl?
>
> Best regards,
> H
Re: Accessing a "guard" field in a model [message #583995 is a reply to message #583968] Mon, 21 December 2009 15:26 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
H wrote on Mon, 21 December 2009 03:35
> Hi,
>
> After migrating to version 0.8.8 of Epsilon I have found that item."message" is not valid anymore.
>
> Which is the right way to access to the attributes that have the same name as specific expressions of evl?
>
> Best regards,
> Héctor Iturria


Héctor,

Since 0.8.8, the correct syntax is: item.`message`

This change was introduced to make EOL's syntax more like Java's. Full details can be found here:

http://www.eclipse.org/gmt/epsilon/doc/articles/eol-syntax-u pdates/

Best,
Louis.
Re: Accessing a "guard" field in a model [message #584006 is a reply to message #504563] Mon, 21 December 2009 15:32 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Enrico Schnepel wrote on Mon, 21 December 2009 09:39
> This is the same problem Bak describes in
> http://www.eclipse.org/forums/index.php?t=msg&th=159579& amp; amp; amp;start=0&S=006878493f0ea00bf65aa009f79065f7
> with a proposed solution.
>
> try item.~message
>
> Enrico


Enrico,

The tilde prefix is used to access "extended" properties of a model element. Extended properties are used to attach some kind of information (that is not supported by the metamodel) to particular model elements. Until now, we've been using Maps to achieve this (similarly to what we've done above).

A more thorough discussion of extended properties is available here:

http://epsilonblog.wordpress.com/2008/01/30/extended-propert ies-in-eol/

I'll also post this information on the other thread you mention. Thanks!

Best,
Louis.
Re: Accessing a "guard" field in a model [message #584497 is a reply to message #482065] Thu, 07 January 2010 11:33 Go to previous message
Hector is currently offline HectorFriend
Messages: 20
Registered: July 2009
Junior Member
Many thanks, fixed!

Best regards,
Héctor
Previous Topic:NullPointerException at org.eclipse.epsilon.emc.emf
Next Topic:Problem calling Native java code
Goto Forum:
  


Current Time: Fri Mar 29 06:04:55 GMT 2024

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

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

Back to the top