Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Navigation of ref'd associations
Navigation of ref'd associations [message #532143] Fri, 07 May 2010 10:28 Go to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi,
I have two metamodels, defined in separate folders (one Emfatic file in
each folder). Metamodel A has a class Foo that has a 'ref' association
with a class Bar in metamodel B. A model based on metamodel B is
generated first (using ETL) and then a model based on metamodel A is
generated (again using ETL). I can bind class Foo to class Bar via:
<snip>
foo : A.Foo
bar : B.Bar
foo.barAtt := bar
</snip>

When I open the model based on metamodel A with the Exeed editor and
navigate down to foo (an instance of metaclass Foo), I can see the
attribute barAtt and it's associated value (which, in this case, appears
to have been generated using the value of the name attribute of the
class - i.e. an attribute I declared on the metaclass).

However, if I try to navigate to the attribute Bar.name via:
<snip>
foo.barrAtt.name
</snip>
I receive an error to the effect that the property 'name' is not found.
It appears that Exeed is able to navigate the association, how can I do
this from within EOL/ETL? I don't want to add a 'val' to Foo within
metamodel B because that would introduce a circularity.

Best Wishes
Chris
Re: Navigation of ref'd associations [message #532159 is a reply to message #532143] Fri, 07 May 2010 10:49 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Have you ticked the "Include external references" in your EMF model
configuration? If you're using the epsilon.emf.loadModel ANT task I've
noticed that there's no way to turn this on (forgot to add setter/getter
for the expand property - default is false - in
http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
but will fix this shortly and roll out a new interim version. In the
meantime I suggest you use the generic epsilon.loadModel task and add
the expand parameter as follows:

<parameter name="expand" value="true"/>

Cheers,
Dimitris

Chris Holmes wrote:
> Hi,
> I have two metamodels, defined in separate folders (one Emfatic file in
> each folder). Metamodel A has a class Foo that has a 'ref' association
> with a class Bar in metamodel B. A model based on metamodel B is
> generated first (using ETL) and then a model based on metamodel A is
> generated (again using ETL). I can bind class Foo to class Bar via:
> <snip>
> foo : A.Foo
> bar : B.Bar
> foo.barAtt := bar
> </snip>
>
> When I open the model based on metamodel A with the Exeed editor and
> navigate down to foo (an instance of metaclass Foo), I can see the
> attribute barAtt and it's associated value (which, in this case, appears
> to have been generated using the value of the name attribute of the
> class - i.e. an attribute I declared on the metaclass).
>
> However, if I try to navigate to the attribute Bar.name via:
> <snip>
> foo.barrAtt.name
> </snip>
> I receive an error to the effect that the property 'name' is not found.
> It appears that Exeed is able to navigate the association, how can I do
> this from within EOL/ETL? I don't want to add a 'val' to Foo within
> metamodel B because that would introduce a circularity.
>
> Best Wishes
> Chris


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Navigation of ref'd associations [message #532163 is a reply to message #532159] Fri, 07 May 2010 11:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
I don't understand this:
'Have you ticked the "Include external references" in your EMF model
configuration?'

I'm running the model transformations form Ant, where can I find the
setting you mention (I can see it in the configurations I have for
launching (e.g.) EGL).

Best Wishes
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Have you ticked the "Include external references" in your EMF model
> configuration? If you're using the epsilon.emf.loadModel ANT task I've
> noticed that there's no way to turn this on (forgot to add setter/getter
> for the expand property - default is false - in
> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
> but will fix this shortly and roll out a new interim version. In the
> meantime I suggest you use the generic epsilon.loadModel task and add
> the expand parameter as follows:
>
> <parameter name="expand" value="true"/>
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi,
>> I have two metamodels, defined in separate folders (one Emfatic file
>> in each folder). Metamodel A has a class Foo that has a 'ref'
>> association with a class Bar in metamodel B. A model based on
>> metamodel B is generated first (using ETL) and then a model based on
>> metamodel A is generated (again using ETL). I can bind class Foo to
>> class Bar via:
>> <snip>
>> foo : A.Foo
>> bar : B.Bar
>> foo.barAtt := bar
>> </snip>
>>
>> When I open the model based on metamodel A with the Exeed editor and
>> navigate down to foo (an instance of metaclass Foo), I can see the
>> attribute barAtt and it's associated value (which, in this case,
>> appears to have been generated using the value of the name attribute
>> of the class - i.e. an attribute I declared on the metaclass).
>>
>> However, if I try to navigate to the attribute Bar.name via:
>> <snip>
>> foo.barrAtt.name
>> </snip>
>> I receive an error to the effect that the property 'name' is not
>> found. It appears that Exeed is able to navigate the association, how
>> can I do this from within EOL/ETL? I don't want to add a 'val' to Foo
>> within metamodel B because that would introduce a circularity.
>>
>> Best Wishes
>> Chris
>
>
Re: Navigation of ref'd associations [message #532184 is a reply to message #532163] Fri, 07 May 2010 13:04 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Hi Chris,

I think what Dimitris was saying is that for ANT there is a bug in that
this option has not been surfaced to the ANT tasks.

Steffen

07/05/2010 12:30, Chris Holmes wrote:
> Hi Dimitris,
> I don't understand this:
> 'Have you ticked the "Include external references" in your EMF model
> configuration?'
>
> I'm running the model transformations form Ant, where can I find the
> setting you mention (I can see it in the configurations I have for
> launching (e.g.) EGL).
>
> Best Wishes
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> Have you ticked the "Include external references" in your EMF model
>> configuration? If you're using the epsilon.emf.loadModel ANT task
>> I've noticed that there's no way to turn this on (forgot to add
>> setter/getter for the expand property - default is false - in
>> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
>> but will fix this shortly and roll out a new interim version. In the
>> meantime I suggest you use the generic epsilon.loadModel task and add
>> the expand parameter as follows:
>>
>> <parameter name="expand" value="true"/>
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi,
>>> I have two metamodels, defined in separate folders (one Emfatic file
>>> in each folder). Metamodel A has a class Foo that has a 'ref'
>>> association with a class Bar in metamodel B. A model based on
>>> metamodel B is generated first (using ETL) and then a model based on
>>> metamodel A is generated (again using ETL). I can bind class Foo to
>>> class Bar via:
>>> <snip>
>>> foo : A.Foo
>>> bar : B.Bar
>>> foo.barAtt := bar
>>> </snip>
>>>
>>> When I open the model based on metamodel A with the Exeed editor and
>>> navigate down to foo (an instance of metaclass Foo), I can see the
>>> attribute barAtt and it's associated value (which, in this case,
>>> appears to have been generated using the value of the name attribute
>>> of the class - i.e. an attribute I declared on the metaclass).
>>>
>>> However, if I try to navigate to the attribute Bar.name via:
>>> <snip>
>>> foo.barrAtt.name
>>> </snip>
>>> I receive an error to the effect that the property 'name' is not
>>> found. It appears that Exeed is able to navigate the association,
>>> how can I do this from within EOL/ETL? I don't want to add a 'val'
>>> to Foo within metamodel B because that would introduce a circularity.
>>>
>>> Best Wishes
>>> Chris
>>
>>
Re: Navigation of ref'd associations [message #532427 is a reply to message #532184] Sun, 09 May 2010 21:23 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

It should be possible to use the expand property in your
epsilon.emf.loadModel task (i.e. <epsilon.emf.loadModel
modelFile="foo.model" ... expand="true"/>) to make the loaded EMF model
expand its scope to include all referenced models but unfortunately this
is not possible as there's no setter/getter for the expand attribute in
the Java implementation of the ANT task.

To set expand to true, you'll need to use epsilon.loadModel instead of
epsilon.emf.loadModel and specify the "expand" property using a nested
<parameter> element:

<epsilon.loadModel name="foo" type="EMF">
<parameter name="modelFile" path="foo.model"/>
...
<parameter name="expand" value="true"/>
</epsilon.loadModel>

I haven't been able to release a new interim version that fixes the
epsilon.emf.loadModel task yet but will do so tomorrow morning.

Cheers,
Dimitris

Steffen Zschaler wrote:
> Hi Chris,
>
> I think what Dimitris was saying is that for ANT there is a bug in that
> this option has not been surfaced to the ANT tasks.
>
> Steffen
>
> 07/05/2010 12:30, Chris Holmes wrote:
>> Hi Dimitris,
>> I don't understand this:
>> 'Have you ticked the "Include external references" in your EMF model
>> configuration?'
>>
>> I'm running the model transformations form Ant, where can I find the
>> setting you mention (I can see it in the configurations I have for
>> launching (e.g.) EGL).
>>
>> Best Wishes
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> Have you ticked the "Include external references" in your EMF model
>>> configuration? If you're using the epsilon.emf.loadModel ANT task
>>> I've noticed that there's no way to turn this on (forgot to add
>>> setter/getter for the expand property - default is false - in
>>> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
>>> but will fix this shortly and roll out a new interim version. In the
>>> meantime I suggest you use the generic epsilon.loadModel task and add
>>> the expand parameter as follows:
>>>
>>> <parameter name="expand" value="true"/>
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi,
>>>> I have two metamodels, defined in separate folders (one Emfatic file
>>>> in each folder). Metamodel A has a class Foo that has a 'ref'
>>>> association with a class Bar in metamodel B. A model based on
>>>> metamodel B is generated first (using ETL) and then a model based on
>>>> metamodel A is generated (again using ETL). I can bind class Foo to
>>>> class Bar via:
>>>> <snip>
>>>> foo : A.Foo
>>>> bar : B.Bar
>>>> foo.barAtt := bar
>>>> </snip>
>>>>
>>>> When I open the model based on metamodel A with the Exeed editor and
>>>> navigate down to foo (an instance of metaclass Foo), I can see the
>>>> attribute barAtt and it's associated value (which, in this case,
>>>> appears to have been generated using the value of the name attribute
>>>> of the class - i.e. an attribute I declared on the metaclass).
>>>>
>>>> However, if I try to navigate to the attribute Bar.name via:
>>>> <snip>
>>>> foo.barrAtt.name
>>>> </snip>
>>>> I receive an error to the effect that the property 'name' is not
>>>> found. It appears that Exeed is able to navigate the association,
>>>> how can I do this from within EOL/ETL? I don't want to add a 'val'
>>>> to Foo within metamodel B because that would introduce a circularity.
>>>>
>>>> Best Wishes
>>>> Chris
>>>
>>>
Re: Navigation of ref'd associations [message #532604 is a reply to message #532427] Mon, 10 May 2010 14:34 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

On an update to this, I've released a new interim version which (among
other things) adds support for defining the value of the "expand"
attribute in the <epsilon.emf.loadModel> task.

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Chris,
>
> It should be possible to use the expand property in your
> epsilon.emf.loadModel task (i.e. <epsilon.emf.loadModel
> modelFile="foo.model" ... expand="true"/>) to make the loaded EMF model
> expand its scope to include all referenced models but unfortunately this
> is not possible as there's no setter/getter for the expand attribute in
> the Java implementation of the ANT task.
>
> To set expand to true, you'll need to use epsilon.loadModel instead of
> epsilon.emf.loadModel and specify the "expand" property using a nested
> <parameter> element:
>
> <epsilon.loadModel name="foo" type="EMF">
> <parameter name="modelFile" path="foo.model"/>
> ...
> <parameter name="expand" value="true"/>
> </epsilon.loadModel>
>
> I haven't been able to release a new interim version that fixes the
> epsilon.emf.loadModel task yet but will do so tomorrow morning.
>
> Cheers,
> Dimitris
>
> Steffen Zschaler wrote:
>> Hi Chris,
>>
>> I think what Dimitris was saying is that for ANT there is a bug in
>> that this option has not been surfaced to the ANT tasks.
>>
>> Steffen
>>
>> 07/05/2010 12:30, Chris Holmes wrote:
>>> Hi Dimitris,
>>> I don't understand this:
>>> 'Have you ticked the "Include external references" in your EMF model
>>> configuration?'
>>>
>>> I'm running the model transformations form Ant, where can I find the
>>> setting you mention (I can see it in the configurations I have for
>>> launching (e.g.) EGL).
>>>
>>> Best Wishes
>>> Chris
>>>
>>> Dimitris Kolovos wrote:
>>>> Hi Chris,
>>>>
>>>> Have you ticked the "Include external references" in your EMF model
>>>> configuration? If you're using the epsilon.emf.loadModel ANT task
>>>> I've noticed that there's no way to turn this on (forgot to add
>>>> setter/getter for the expand property - default is false - in
>>>> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
>>>> but will fix this shortly and roll out a new interim version. In the
>>>> meantime I suggest you use the generic epsilon.loadModel task and
>>>> add the expand parameter as follows:
>>>>
>>>> <parameter name="expand" value="true"/>
>>>>
>>>> Cheers,
>>>> Dimitris
>>>>
>>>> Chris Holmes wrote:
>>>>> Hi,
>>>>> I have two metamodels, defined in separate folders (one Emfatic
>>>>> file in each folder). Metamodel A has a class Foo that has a 'ref'
>>>>> association with a class Bar in metamodel B. A model based on
>>>>> metamodel B is generated first (using ETL) and then a model based
>>>>> on metamodel A is generated (again using ETL). I can bind class Foo
>>>>> to class Bar via:
>>>>> <snip>
>>>>> foo : A.Foo
>>>>> bar : B.Bar
>>>>> foo.barAtt := bar
>>>>> </snip>
>>>>>
>>>>> When I open the model based on metamodel A with the Exeed editor
>>>>> and navigate down to foo (an instance of metaclass Foo), I can see
>>>>> the attribute barAtt and it's associated value (which, in this
>>>>> case, appears to have been generated using the value of the name
>>>>> attribute of the class - i.e. an attribute I declared on the
>>>>> metaclass).
>>>>>
>>>>> However, if I try to navigate to the attribute Bar.name via:
>>>>> <snip>
>>>>> foo.barrAtt.name
>>>>> </snip>
>>>>> I receive an error to the effect that the property 'name' is not
>>>>> found. It appears that Exeed is able to navigate the association,
>>>>> how can I do this from within EOL/ETL? I don't want to add a 'val'
>>>>> to Foo within metamodel B because that would introduce a circularity.
>>>>>
>>>>> Best Wishes
>>>>> Chris
>>>>
>>>>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Navigation of ref'd associations [message #588927 is a reply to message #532143] Fri, 07 May 2010 10:49 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Have you ticked the "Include external references" in your EMF model
configuration? If you're using the epsilon.emf.loadModel ANT task I've
noticed that there's no way to turn this on (forgot to add setter/getter
for the expand property - default is false - in
http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
but will fix this shortly and roll out a new interim version. In the
meantime I suggest you use the generic epsilon.loadModel task and add
the expand parameter as follows:

<parameter name="expand" value="true"/>

Cheers,
Dimitris

Chris Holmes wrote:
> Hi,
> I have two metamodels, defined in separate folders (one Emfatic file in
> each folder). Metamodel A has a class Foo that has a 'ref' association
> with a class Bar in metamodel B. A model based on metamodel B is
> generated first (using ETL) and then a model based on metamodel A is
> generated (again using ETL). I can bind class Foo to class Bar via:
> <snip>
> foo : A.Foo
> bar : B.Bar
> foo.barAtt := bar
> </snip>
>
> When I open the model based on metamodel A with the Exeed editor and
> navigate down to foo (an instance of metaclass Foo), I can see the
> attribute barAtt and it's associated value (which, in this case, appears
> to have been generated using the value of the name attribute of the
> class - i.e. an attribute I declared on the metaclass).
>
> However, if I try to navigate to the attribute Bar.name via:
> <snip>
> foo.barrAtt.name
> </snip>
> I receive an error to the effect that the property 'name' is not found.
> It appears that Exeed is able to navigate the association, how can I do
> this from within EOL/ETL? I don't want to add a 'val' to Foo within
> metamodel B because that would introduce a circularity.
>
> Best Wishes
> Chris


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Navigation of ref'd associations [message #588937 is a reply to message #532159] Fri, 07 May 2010 11:30 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
I don't understand this:
'Have you ticked the "Include external references" in your EMF model
configuration?'

I'm running the model transformations form Ant, where can I find the
setting you mention (I can see it in the configurations I have for
launching (e.g.) EGL).

Best Wishes
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Have you ticked the "Include external references" in your EMF model
> configuration? If you're using the epsilon.emf.loadModel ANT task I've
> noticed that there's no way to turn this on (forgot to add setter/getter
> for the expand property - default is false - in
> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
> but will fix this shortly and roll out a new interim version. In the
> meantime I suggest you use the generic epsilon.loadModel task and add
> the expand parameter as follows:
>
> <parameter name="expand" value="true"/>
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi,
>> I have two metamodels, defined in separate folders (one Emfatic file
>> in each folder). Metamodel A has a class Foo that has a 'ref'
>> association with a class Bar in metamodel B. A model based on
>> metamodel B is generated first (using ETL) and then a model based on
>> metamodel A is generated (again using ETL). I can bind class Foo to
>> class Bar via:
>> <snip>
>> foo : A.Foo
>> bar : B.Bar
>> foo.barAtt := bar
>> </snip>
>>
>> When I open the model based on metamodel A with the Exeed editor and
>> navigate down to foo (an instance of metaclass Foo), I can see the
>> attribute barAtt and it's associated value (which, in this case,
>> appears to have been generated using the value of the name attribute
>> of the class - i.e. an attribute I declared on the metaclass).
>>
>> However, if I try to navigate to the attribute Bar.name via:
>> <snip>
>> foo.barrAtt.name
>> </snip>
>> I receive an error to the effect that the property 'name' is not
>> found. It appears that Exeed is able to navigate the association, how
>> can I do this from within EOL/ETL? I don't want to add a 'val' to Foo
>> within metamodel B because that would introduce a circularity.
>>
>> Best Wishes
>> Chris
>
>
Re: Navigation of ref'd associations [message #588945 is a reply to message #532163] Fri, 07 May 2010 13:04 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Hi Chris,

I think what Dimitris was saying is that for ANT there is a bug in that
this option has not been surfaced to the ANT tasks.

Steffen

07/05/2010 12:30, Chris Holmes wrote:
> Hi Dimitris,
> I don't understand this:
> 'Have you ticked the "Include external references" in your EMF model
> configuration?'
>
> I'm running the model transformations form Ant, where can I find the
> setting you mention (I can see it in the configurations I have for
> launching (e.g.) EGL).
>
> Best Wishes
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> Have you ticked the "Include external references" in your EMF model
>> configuration? If you're using the epsilon.emf.loadModel ANT task
>> I've noticed that there's no way to turn this on (forgot to add
>> setter/getter for the expand property - default is false - in
>> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
>> but will fix this shortly and roll out a new interim version. In the
>> meantime I suggest you use the generic epsilon.loadModel task and add
>> the expand parameter as follows:
>>
>> <parameter name="expand" value="true"/>
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi,
>>> I have two metamodels, defined in separate folders (one Emfatic file
>>> in each folder). Metamodel A has a class Foo that has a 'ref'
>>> association with a class Bar in metamodel B. A model based on
>>> metamodel B is generated first (using ETL) and then a model based on
>>> metamodel A is generated (again using ETL). I can bind class Foo to
>>> class Bar via:
>>> <snip>
>>> foo : A.Foo
>>> bar : B.Bar
>>> foo.barAtt := bar
>>> </snip>
>>>
>>> When I open the model based on metamodel A with the Exeed editor and
>>> navigate down to foo (an instance of metaclass Foo), I can see the
>>> attribute barAtt and it's associated value (which, in this case,
>>> appears to have been generated using the value of the name attribute
>>> of the class - i.e. an attribute I declared on the metaclass).
>>>
>>> However, if I try to navigate to the attribute Bar.name via:
>>> <snip>
>>> foo.barrAtt.name
>>> </snip>
>>> I receive an error to the effect that the property 'name' is not
>>> found. It appears that Exeed is able to navigate the association,
>>> how can I do this from within EOL/ETL? I don't want to add a 'val'
>>> to Foo within metamodel B because that would introduce a circularity.
>>>
>>> Best Wishes
>>> Chris
>>
>>
Re: Navigation of ref'd associations [message #588973 is a reply to message #532184] Sun, 09 May 2010 21:23 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

It should be possible to use the expand property in your
epsilon.emf.loadModel task (i.e. <epsilon.emf.loadModel
modelFile="foo.model" ... expand="true"/>) to make the loaded EMF model
expand its scope to include all referenced models but unfortunately this
is not possible as there's no setter/getter for the expand attribute in
the Java implementation of the ANT task.

To set expand to true, you'll need to use epsilon.loadModel instead of
epsilon.emf.loadModel and specify the "expand" property using a nested
<parameter> element:

<epsilon.loadModel name="foo" type="EMF">
<parameter name="modelFile" path="foo.model"/>
...
<parameter name="expand" value="true"/>
</epsilon.loadModel>

I haven't been able to release a new interim version that fixes the
epsilon.emf.loadModel task yet but will do so tomorrow morning.

Cheers,
Dimitris

Steffen Zschaler wrote:
> Hi Chris,
>
> I think what Dimitris was saying is that for ANT there is a bug in that
> this option has not been surfaced to the ANT tasks.
>
> Steffen
>
> 07/05/2010 12:30, Chris Holmes wrote:
>> Hi Dimitris,
>> I don't understand this:
>> 'Have you ticked the "Include external references" in your EMF model
>> configuration?'
>>
>> I'm running the model transformations form Ant, where can I find the
>> setting you mention (I can see it in the configurations I have for
>> launching (e.g.) EGL).
>>
>> Best Wishes
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> Have you ticked the "Include external references" in your EMF model
>>> configuration? If you're using the epsilon.emf.loadModel ANT task
>>> I've noticed that there's no way to turn this on (forgot to add
>>> setter/getter for the expand property - default is false - in
>>> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
>>> but will fix this shortly and roll out a new interim version. In the
>>> meantime I suggest you use the generic epsilon.loadModel task and add
>>> the expand parameter as follows:
>>>
>>> <parameter name="expand" value="true"/>
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi,
>>>> I have two metamodels, defined in separate folders (one Emfatic file
>>>> in each folder). Metamodel A has a class Foo that has a 'ref'
>>>> association with a class Bar in metamodel B. A model based on
>>>> metamodel B is generated first (using ETL) and then a model based on
>>>> metamodel A is generated (again using ETL). I can bind class Foo to
>>>> class Bar via:
>>>> <snip>
>>>> foo : A.Foo
>>>> bar : B.Bar
>>>> foo.barAtt := bar
>>>> </snip>
>>>>
>>>> When I open the model based on metamodel A with the Exeed editor and
>>>> navigate down to foo (an instance of metaclass Foo), I can see the
>>>> attribute barAtt and it's associated value (which, in this case,
>>>> appears to have been generated using the value of the name attribute
>>>> of the class - i.e. an attribute I declared on the metaclass).
>>>>
>>>> However, if I try to navigate to the attribute Bar.name via:
>>>> <snip>
>>>> foo.barrAtt.name
>>>> </snip>
>>>> I receive an error to the effect that the property 'name' is not
>>>> found. It appears that Exeed is able to navigate the association,
>>>> how can I do this from within EOL/ETL? I don't want to add a 'val'
>>>> to Foo within metamodel B because that would introduce a circularity.
>>>>
>>>> Best Wishes
>>>> Chris
>>>
>>>
Re: Navigation of ref'd associations [message #589093 is a reply to message #532427] Mon, 10 May 2010 14:34 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

On an update to this, I've released a new interim version which (among
other things) adds support for defining the value of the "expand"
attribute in the <epsilon.emf.loadModel> task.

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Chris,
>
> It should be possible to use the expand property in your
> epsilon.emf.loadModel task (i.e. <epsilon.emf.loadModel
> modelFile="foo.model" ... expand="true"/>) to make the loaded EMF model
> expand its scope to include all referenced models but unfortunately this
> is not possible as there's no setter/getter for the expand attribute in
> the Java implementation of the ANT task.
>
> To set expand to true, you'll need to use epsilon.loadModel instead of
> epsilon.emf.loadModel and specify the "expand" property using a nested
> <parameter> element:
>
> <epsilon.loadModel name="foo" type="EMF">
> <parameter name="modelFile" path="foo.model"/>
> ...
> <parameter name="expand" value="true"/>
> </epsilon.loadModel>
>
> I haven't been able to release a new interim version that fixes the
> epsilon.emf.loadModel task yet but will do so tomorrow morning.
>
> Cheers,
> Dimitris
>
> Steffen Zschaler wrote:
>> Hi Chris,
>>
>> I think what Dimitris was saying is that for ANT there is a bug in
>> that this option has not been surfaced to the ANT tasks.
>>
>> Steffen
>>
>> 07/05/2010 12:30, Chris Holmes wrote:
>>> Hi Dimitris,
>>> I don't understand this:
>>> 'Have you ticked the "Include external references" in your EMF model
>>> configuration?'
>>>
>>> I'm running the model transformations form Ant, where can I find the
>>> setting you mention (I can see it in the configurations I have for
>>> launching (e.g.) EGL).
>>>
>>> Best Wishes
>>> Chris
>>>
>>> Dimitris Kolovos wrote:
>>>> Hi Chris,
>>>>
>>>> Have you ticked the "Include external references" in your EMF model
>>>> configuration? If you're using the epsilon.emf.loadModel ANT task
>>>> I've noticed that there's no way to turn this on (forgot to add
>>>> setter/getter for the expand property - default is false - in
>>>> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclip se/epsilon/workflow/tasks/emf/LoadModel.java)
>>>> but will fix this shortly and roll out a new interim version. In the
>>>> meantime I suggest you use the generic epsilon.loadModel task and
>>>> add the expand parameter as follows:
>>>>
>>>> <parameter name="expand" value="true"/>
>>>>
>>>> Cheers,
>>>> Dimitris
>>>>
>>>> Chris Holmes wrote:
>>>>> Hi,
>>>>> I have two metamodels, defined in separate folders (one Emfatic
>>>>> file in each folder). Metamodel A has a class Foo that has a 'ref'
>>>>> association with a class Bar in metamodel B. A model based on
>>>>> metamodel B is generated first (using ETL) and then a model based
>>>>> on metamodel A is generated (again using ETL). I can bind class Foo
>>>>> to class Bar via:
>>>>> <snip>
>>>>> foo : A.Foo
>>>>> bar : B.Bar
>>>>> foo.barAtt := bar
>>>>> </snip>
>>>>>
>>>>> When I open the model based on metamodel A with the Exeed editor
>>>>> and navigate down to foo (an instance of metaclass Foo), I can see
>>>>> the attribute barAtt and it's associated value (which, in this
>>>>> case, appears to have been generated using the value of the name
>>>>> attribute of the class - i.e. an attribute I declared on the
>>>>> metaclass).
>>>>>
>>>>> However, if I try to navigate to the attribute Bar.name via:
>>>>> <snip>
>>>>> foo.barrAtt.name
>>>>> </snip>
>>>>> I receive an error to the effect that the property 'name' is not
>>>>> found. It appears that Exeed is able to navigate the association,
>>>>> how can I do this from within EOL/ETL? I don't want to add a 'val'
>>>>> to Foo within metamodel B because that would introduce a circularity.
>>>>>
>>>>> Best Wishes
>>>>> Chris
>>>>
>>>>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Previous Topic:[EuGENia] Defining the list of Attributes with static key and variable value.
Next Topic:[EuGENia] Defining the list of Attributes with static key and variable value.
Goto Forum:
  


Current Time: Sat Apr 20 03:10:43 GMT 2024

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

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

Back to the top