Home » Modeling » Epsilon » Navigation of ref'd associations
Navigation of ref'd associations [message #532143] |
Fri, 07 May 2010 10:28 |
Eclipse User |
|
|
|
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 |
Dimitrios Kolovos 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 |
Eclipse User |
|
|
|
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 |
Steffen Zschaler 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 |
Dimitrios Kolovos 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 |
Dimitrios Kolovos 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 |
Dimitrios Kolovos 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 |
Eclipse User |
|
|
|
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 |
Steffen Zschaler 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 |
Dimitrios Kolovos 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 |
Dimitrios Kolovos 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
|
|
|
Goto Forum:
Current Time: Sun Sep 22 00:02:52 GMT 2024
Powered by FUDForum. Page generated in 0.04384 seconds
|