Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EuGENia] unable to create some elements(unable to create basic EuGENia elements in particular conditions sush as inheritances and number of iterations)
[EuGENia] unable to create some elements [message #486603] Fri, 18 September 2009 11:20 Go to next message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
Hello

I have some trouble creating basic elements that I think are in the scope of elements processed by EuGENia.

The first one is a gmf.link (for EClass), the problem is
the class that is used to create the link inherits from an
abstract class that has no source or target, as I have found
that abstract elements should also have a representation for
EuGENia to function properly, I believe the problem lies in
ether this being really necessary with the impossibility of creating a link with foo="bar"

Abstract
|
|---NodeA - gmf.link( source="sourceA", target="targetA")
|      |---sourceA
|      |---targetA
|
|---NodeB - gmf.link( source="sourceB", target="targetB")
       |---sourceB
       |---targetB


The second problem is containments are not created by EuGENia, after its forth level. I have :

canvas
  ->container
        ->container
              ->container
                    ->container (this is no longer created in any file as container, but their contained nodes are in Graph and Tool)
                          ->node.


If there are any ways to get over these limitation I could use the help. Thank you.

Vasco
Re: [EuGENia] unable to create some elements [message #486604 is a reply to message #486603] Fri, 18 September 2009 11:25 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

Could you please post your .emf metamodel and indicate the specific
classes that are causing the problems?

Cheers,
Dimitris

Vasco Sousa wrote:
> Hello
>
> I have some trouble creating basic elements that I think are in the
> scope of elements processed by EuGENia.
>
> The first one is a gmf.link (for EClass), the problem is
> the class that is used to create the link inherits from an
> abstract class that has no source or target, as I have found
> that abstract elements should also have a representation for
> EuGENia to function properly, I believe the problem lies in
> ether this being really necessary with the impossibility of creating a
> link with foo="bar"
>
> Abstract
> |
> |---NodeA - gmf.link( source="sourceA", target="targetA")
> | |---sourceA
> | |---targetA
> |
> |---NodeB - gmf.link( source="sourceB", target="targetB")
> |---sourceB
> |---targetB
>
> The second problem is containments are not created by EuGENia, after its
> forth level. I have :
>
> canvas
> ->container
> ->container
> ->container
> ->container (this is no longer created in any file as
> container, but their contained nodes are in Graph and Tool)
> ->node.
>
> If there are any ways to get over these limitation I could use the help.
> Thank you.
>
> Vasco


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #487325 is a reply to message #486604] Tue, 22 September 2009 18:48 Go to previous messageGo to next message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
sorry for the delay I had to ask for permition as the metamodel is not mine,

here is the section in question, were I am unable to
create the containment in ApplyClass, but it creates the ApplyAttribute node in GMFGraph and GMFTool,
and unable to generate a link from ApplyAssociation.

thank you for the reply
Vasco
Re: [EuGENia] unable to create some elements [message #487597 is a reply to message #487325] Wed, 23 September 2009 16:42 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

Could you please also attach the metamodel you refer to so that I can
have a look?

Cheers,
Dimitris

Vasco Sousa wrote:
> sorry for the delay I had to ask for permition as the metamodel is not
> mine,
>
> here is the section in question, were I am unable to create the
> containment in ApplyClass, but it creates the ApplyAttribute node in
> GMFGraph and GMFTool,
> and unable to generate a link from ApplyAssociation.
>
> thank you for the reply
> Vasco


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #487637 is a reply to message #487597] Wed, 23 September 2009 20:32 Go to previous messageGo to next message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
couln't upload in any brouser so I'll post it here

@gmf(foo="bar")
@namespace(uri="http://metamodel/1.0", prefix="metamodel")
package metamodel;

@gmf.diagram(foo="bar")
class TransformationModel {
  val AbstractSource[*] source;
}

@gmf.node(foo="bar")
abstract class Layer extends AbstractSource {
  attr String description;
  
  @gmf.link(source.decoration="arrow")
  ref AbstractSource[+] previousSource;
  attr String outputFilePathURI;

  @gmf.compartment(layout ="free")
  val Rule[*] hasRule;
}

@gmf.node(label="className")
class ApplyClass extends AbstractClass {

  @gmf.containment(layout="free")
  val ApplyAttribute[*] attribute;
}

@gmf.node( color="255,255,163")
class ApplyModel {

  @gmf.compartment(layout ="free")
  val ApplyClass[*] ~class;

  val ApplyAssociation[*] association;
}

//@gmf.link(source="source", target="target")
class ApplyAssociation extends Association {
  ref ApplyClass[1] source;
  ref ApplyClass[1] target;
}

@gmf.node(foo="bar")
abstract class AbstractClass {
  attr String description;
  attr String className;
  attr String packageName;
}

//@gmf.link(source="", target="")
abstract class Association {
  attr String associationName;
}

@gmf.node(label="attributeName")
class ApplyAttribute {
  attr String[1] description;
  attr String attributeName;
}

@gmf.node(foo="bar")
abstract class AbstractSource {
}

@gmf.node(label="description")
class Rule {
  attr String description;

  @gmf.compartment(layout ="list")
  val ApplyModel[1] apply;

}

@gmf.node(label="description", color="0,0,255")
class Sequential extends Layer {
}


PS:aditionaly today while showing the basic example of the EuGENia] page, I get a
Internal error: java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to org.eclipse.gmf.gmfgraph.LineKind
error and no links are generated, not shure if it has to do with my link problem
Re: [EuGENia] unable to create some elements [message #487645 is a reply to message #487637] Wed, 23 September 2009 21:22 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

The problem stems from the fact that you need to have one compartment
under ApplyModel that can hold the contents of both the ~class and
association containment references. This is not currently supported by
EuGENia but I'll have a look and see if this can be fixed with a custom
polishing EOL script
( http://epsilonblog.wordpress.com/2009/06/15/eugenia-polishin g-your-gmf-editor/).


Re the other issue, could it be the case that you have updated EuGENia
but not the rest of Epsilon?

Cheers,
Dimitris

Vasco Sousa wrote:
> couln't upload in any brouser so I'll post it here
>
>
> @gmf(foo="bar")
> @namespace(uri="http://metamodel/1.0", prefix="metamodel")
> package metamodel;
>
> @gmf.diagram(foo="bar")
> class TransformationModel {
> val AbstractSource[*] source;
> }
>
> @gmf.node(foo="bar")
> abstract class Layer extends AbstractSource {
> attr String description;
>
> @gmf.link(source.decoration="arrow")
> ref AbstractSource[+] previousSource;
> attr String outputFilePathURI;
>
> @gmf.compartment(layout ="free")
> val Rule[*] hasRule;
> }
>
> @gmf.node(label="className")
> class ApplyClass extends AbstractClass {
>
> @gmf.containment(layout="free")
> val ApplyAttribute[*] attribute;
> }
>
> @gmf.node( color="255,255,163")
> class ApplyModel {
>
> @gmf.compartment(layout ="free")
> val ApplyClass[*] ~class;
>
> val ApplyAssociation[*] association;
> }
>
> //@gmf.link(source="source", target="target")
> class ApplyAssociation extends Association {
> ref ApplyClass[1] source;
> ref ApplyClass[1] target;
> }
>
> @gmf.node(foo="bar")
> abstract class AbstractClass {
> attr String description;
> attr String className;
> attr String packageName;
> }
>
> //@gmf.link(source="", target="")
> abstract class Association {
> attr String associationName;
> }
>
> @gmf.node(label="attributeName")
> class ApplyAttribute {
> attr String[1] description;
> attr String attributeName;
> }
>
> @gmf.node(foo="bar")
> abstract class AbstractSource {
> }
>
> @gmf.node(label="description")
> class Rule {
> attr String description;
>
> @gmf.compartment(layout ="list")
> val ApplyModel[1] apply;
>
> }
>
> @gmf.node(label="description", color="0,0,255")
> class Sequential extends Layer {
> }
>
>
> PS:aditionaly today while showing the basic example of the EuGENia]
> page, I get a Internal error: java.lang.ClassCastException:
> org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to
> org.eclipse.gmf.gmfgraph.LineKind error and no links are generated, not
> shure if it has to do with my link problem


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #487646 is a reply to message #487645] Wed, 23 September 2009 21:49 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

On an update to this, I think I've figured out how to support such cases
in EuGENia. The new version will most likely be available mid-next week.

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Vasco,
>
> The problem stems from the fact that you need to have one compartment
> under ApplyModel that can hold the contents of both the ~class and
> association containment references. This is not currently supported by
> EuGENia but I'll have a look and see if this can be fixed with a custom
> polishing EOL script
> ( http://epsilonblog.wordpress.com/2009/06/15/eugenia-polishin g-your-gmf-editor/).
>
>
> Re the other issue, could it be the case that you have updated EuGENia
> but not the rest of Epsilon?
>
> Cheers,
> Dimitris
>
> Vasco Sousa wrote:
>> couln't upload in any brouser so I'll post it here
>>
>>
>> @gmf(foo="bar")
>> @namespace(uri="http://metamodel/1.0", prefix="metamodel")
>> package metamodel;
>>
>> @gmf.diagram(foo="bar")
>> class TransformationModel {
>> val AbstractSource[*] source;
>> }
>>
>> @gmf.node(foo="bar")
>> abstract class Layer extends AbstractSource {
>> attr String description;
>>
>> @gmf.link(source.decoration="arrow")
>> ref AbstractSource[+] previousSource;
>> attr String outputFilePathURI;
>>
>> @gmf.compartment(layout ="free")
>> val Rule[*] hasRule;
>> }
>>
>> @gmf.node(label="className")
>> class ApplyClass extends AbstractClass {
>>
>> @gmf.containment(layout="free")
>> val ApplyAttribute[*] attribute;
>> }
>>
>> @gmf.node( color="255,255,163")
>> class ApplyModel {
>>
>> @gmf.compartment(layout ="free")
>> val ApplyClass[*] ~class;
>>
>> val ApplyAssociation[*] association;
>> }
>>
>> //@gmf.link(source="source", target="target")
>> class ApplyAssociation extends Association {
>> ref ApplyClass[1] source;
>> ref ApplyClass[1] target;
>> }
>>
>> @gmf.node(foo="bar")
>> abstract class AbstractClass {
>> attr String description;
>> attr String className;
>> attr String packageName;
>> }
>>
>> //@gmf.link(source="", target="")
>> abstract class Association {
>> attr String associationName;
>> }
>>
>> @gmf.node(label="attributeName")
>> class ApplyAttribute {
>> attr String[1] description;
>> attr String attributeName;
>> }
>>
>> @gmf.node(foo="bar")
>> abstract class AbstractSource {
>> }
>>
>> @gmf.node(label="description")
>> class Rule {
>> attr String description;
>>
>> @gmf.compartment(layout ="list")
>> val ApplyModel[1] apply;
>>
>> }
>>
>> @gmf.node(label="description", color="0,0,255")
>> class Sequential extends Layer {
>> }
>>
>>
>> PS:aditionaly today while showing the basic example of the EuGENia]
>> page, I get a Internal error: java.lang.ClassCastException:
>> org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to
>> org.eclipse.gmf.gmfgraph.LineKind error and no links are generated,
>> not shure if it has to do with my link problem
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #487753 is a reply to message #487646] Thu, 24 September 2009 10:33 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

A new interim version that fixes this has just been made available. I've
slightly modified the metamodel, mainly to add a label to ApplyModel as
labels are mandatory for nodes. The modified version appears below.
Could you please update to the latest *interim* version of
Epsilon/EuGENia and let me know how it goes?

--- metamodel.emf ---

@gmf(foo="bar")
@namespace(uri="http://metamodel/1.0", prefix="metamodel")
package metamodel;

@gmf.diagram(foo="bar")
class TransformationModel {
val AbstractSource[*] source;
}

@gmf.node(foo="bar")
abstract class Layer extends AbstractSource {
attr String description;

@gmf.link(source.decoration="arrow")
ref AbstractSource[+] previousSource;
attr String outputFilePathURI;

@gmf.compartment(layout ="free")
val Rule[*] hasRule;
}

@gmf.node(label="className")
class ApplyClass extends AbstractClass {

@gmf.containment(layout="free")
val ApplyAttribute[*] attribute;
}

@gmf.node(label="name", color="255,255,163")
class ApplyModel {
attr String name; // Added - all nodes must have a label
@gmf.compartment(layout ="free")
val ApplyClass[*] ~class;

@gmf.compartment(layout ="free")
val ApplyAssociation[*] association;
}

@gmf.link(source="source", target="target")
class ApplyAssociation extends Association {
ref ApplyClass[1] source;
ref ApplyClass[1] target;
}

@gmf.node(foo="bar")
abstract class AbstractClass {
attr String description;
attr String className;
attr String packageName;
}

//@gmf.link(source="", target="")
abstract class Association {
attr String associationName;
}

@gmf.node(label="attributeName")
class ApplyAttribute {
attr String[1] description;
attr String attributeName;
}

@gmf.node(foo="bar")
abstract class AbstractSource {
}

@gmf.node(label="description")
class Rule {
attr String description;

@gmf.compartment(layout ="list")
val ApplyModel[1] apply;

}

@gmf.node(label="description", color="0,0,255")
class Sequential extends Layer {
}

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Vasco,
>
> On an update to this, I think I've figured out how to support such cases
> in EuGENia. The new version will most likely be available mid-next week.
>
> Cheers,
> Dimitris
>
> Dimitris Kolovos wrote:
>> Hi Vasco,
>>
>> The problem stems from the fact that you need to have one compartment
>> under ApplyModel that can hold the contents of both the ~class and
>> association containment references. This is not currently supported by
>> EuGENia but I'll have a look and see if this can be fixed with a
>> custom polishing EOL script
>> ( http://epsilonblog.wordpress.com/2009/06/15/eugenia-polishin g-your-gmf-editor/).
>>
>>
>> Re the other issue, could it be the case that you have updated EuGENia
>> but not the rest of Epsilon?
>>
>> Cheers,
>> Dimitris
>>
>> Vasco Sousa wrote:
>>> couln't upload in any brouser so I'll post it here
>>>
>>>
>>> @gmf(foo="bar")
>>> @namespace(uri="http://metamodel/1.0", prefix="metamodel")
>>> package metamodel;
>>>
>>> @gmf.diagram(foo="bar")
>>> class TransformationModel {
>>> val AbstractSource[*] source;
>>> }
>>>
>>> @gmf.node(foo="bar")
>>> abstract class Layer extends AbstractSource {
>>> attr String description;
>>>
>>> @gmf.link(source.decoration="arrow")
>>> ref AbstractSource[+] previousSource;
>>> attr String outputFilePathURI;
>>>
>>> @gmf.compartment(layout ="free")
>>> val Rule[*] hasRule;
>>> }
>>>
>>> @gmf.node(label="className")
>>> class ApplyClass extends AbstractClass {
>>>
>>> @gmf.containment(layout="free")
>>> val ApplyAttribute[*] attribute;
>>> }
>>>
>>> @gmf.node( color="255,255,163")
>>> class ApplyModel {
>>>
>>> @gmf.compartment(layout ="free")
>>> val ApplyClass[*] ~class;
>>>
>>> val ApplyAssociation[*] association;
>>> }
>>>
>>> //@gmf.link(source="source", target="target")
>>> class ApplyAssociation extends Association {
>>> ref ApplyClass[1] source;
>>> ref ApplyClass[1] target;
>>> }
>>>
>>> @gmf.node(foo="bar")
>>> abstract class AbstractClass {
>>> attr String description;
>>> attr String className;
>>> attr String packageName;
>>> }
>>>
>>> //@gmf.link(source="", target="")
>>> abstract class Association {
>>> attr String associationName;
>>> }
>>>
>>> @gmf.node(label="attributeName")
>>> class ApplyAttribute {
>>> attr String[1] description;
>>> attr String attributeName;
>>> }
>>>
>>> @gmf.node(foo="bar")
>>> abstract class AbstractSource {
>>> }
>>>
>>> @gmf.node(label="description")
>>> class Rule {
>>> attr String description;
>>>
>>> @gmf.compartment(layout ="list")
>>> val ApplyModel[1] apply;
>>>
>>> }
>>>
>>> @gmf.node(label="description", color="0,0,255")
>>> class Sequential extends Layer {
>>> }
>>>
>>>
>>> PS:aditionaly today while showing the basic example of the EuGENia]
>>> page, I get a Internal error: java.lang.ClassCastException:
>>> org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to
>>> org.eclipse.gmf.gmfgraph.LineKind error and no links are generated,
>>> not shure if it has to do with my link problem
>>
>>
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #487781 is a reply to message #487753] Thu, 24 September 2009 12:15 Go to previous messageGo to next message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
I tried the metamodel you have provided and updated the Epsilon plugin to the latest *intermin*

I no longer have the error with the filesystem example
but in this metamodel the issues still apply, he doesn't create a
mapping for the ApplyAttribute nor the representation of the ApplyAttribute containment in ApplyClass on the Graph model

the apply association is still absent from the mapping file
(do I realy need to define a compartment for the link in
@gmf.node(label="name", color="255,255,163")
class ApplyModel {
attr String name; // Added - all nodes must have a label
@gmf.compartment(layout ="free")
val ApplyClass[*] ~class;

@gmf.compartment(layout ="free")
val ApplyAssociation[*] association;
}

?)

I suspect that in the same manner I need to define nodes for the abstract classes for the flowing classes to be properly generated, the same would happen with the links, but the abstract class to the ApplyAssociation doesn't have the mandatory source and target.


PS: as for the mandatory label in nodes I usualy let EuGENia generate the mapping, and then stroll down the file deleting the label mappings the I don't need, or would give error messages, and it runs fine
Re: [EuGENia] unable to create some elements [message #487799 is a reply to message #487781] Thu, 24 September 2009 13:05 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

Vasco Sousa wrote:
> I tried the metamodel you have provided and updated the Epsilon plugin
> to the latest *intermin*
>
> I no longer have the error with the filesystem example
> but in this metamodel the issues still apply, he doesn't create a
> mapping for the ApplyAttribute nor the representation of the
> ApplyAttribute containment in ApplyClass on the Graph model

Please replace @gmf.containment(layout="free") with
@gmf.compartment(layout="free") in line 25 of the .emf to get this working.

>
> the apply association is still absent from the mapping file
> (do I realy need to define a compartment for the link in
> @gmf.node(label="name", color="255,255,163")
> class ApplyModel {
> attr String name; // Added - all nodes must have a label
> @gmf.compartment(layout ="free")
> val ApplyClass[*] ~class;
>
> @gmf.compartment(layout ="free")
> val ApplyAssociation[*] association;
> }
>
> ?)
>
> I suspect that in the same manner I need to define nodes for the
> abstract classes for the flowing classes to be properly generated, the
> same would happen with the links, but the abstract class to the
> ApplyAssociation doesn't have the mandatory source and target.
>

None of these should be necessary. I'll check again and get back to you.

>
> PS: as for the mandatory label in nodes I usualy let EuGENia generate
> the mapping, and then stroll down the file deleting the label mappings
> the I don't need, or would give error messages, and it runs fine

I'll have a look at this and see if we can make labels optional in EuGENia.

--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #488363 is a reply to message #487799] Mon, 28 September 2009 12:33 Go to previous messageGo to next message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
Hi Dimitrios

Thank you for spotting that error with the compartment, for some reason I couldn't spot it.
Anyhow all compartments are working within expected.

Cheers,
Vasco
Re: [EuGENia] unable to create some elements [message #488378 is a reply to message #488363] Mon, 28 September 2009 13:35 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

Thanks for the update. Could you perhaps add an enhancement request for
this "optional labels" feature in the bugzilla so that we can keep track
of this?

Cheers,
Dimitris

Vasco Sousa wrote:
> Hi Dimitrios
> Thank you for spotting that error with the compartment, for some reason
> I couldn't spot it.
> Anyhow all compartments are working within expected.
>
> Cheers,
> Vasco


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #489347 is a reply to message #488378] Fri, 02 October 2009 14:20 Go to previous messageGo to next message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
I am sorry
I'm still preaty green with this
don't seem to find the right place to report
the feature request, I stil get lost in bugzilla

any news on not needing to map
the abstract classes ?

Cheers
Vasco
Re: [EuGENia] unable to create some elements [message #489387 is a reply to message #489347] Fri, 02 October 2009 18:14 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

Vasco Sousa wrote:
> I am sorry
> I'm still preaty green with this
> don't seem to find the right place to report
> the feature request, I stil get lost in bugzilla

To submit the feature request, please follow the "Report new bug" link
in the Epsilon homepage (http://eclipse.org/gmt/epsilon/)

>
> any news on not needing to map
> the abstract classes ?

If you remove @gmf.compartment from the following it should really work

@gmf.compartment(layout ="free")
val ApplyAssociation[*] association;

If not, could you please send me a minimal example that reproduces this
because I'm not yet convinced I understand the problem completely.

>
> Cheers
> Vasco


Cheers,
Dimtiris
Re: [EuGENia] unable to create some elements [message #580906 is a reply to message #486604] Tue, 22 September 2009 18:48 Go to previous message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
sorry for the delay I had to ask for permition as the metamodel is not mine,

here is the section in question, were I am unable to
create the containment in ApplyClass, but it creates the ApplyAttribute node in GMFGraph and GMFTool,
and unable to generate a link from ApplyAssociation.

thank you for the reply
Vasco
Re: [EuGENia] unable to create some elements [message #580925 is a reply to message #487325] Wed, 23 September 2009 16:42 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

Could you please also attach the metamodel you refer to so that I can
have a look?

Cheers,
Dimitris

Vasco Sousa wrote:
> sorry for the delay I had to ask for permition as the metamodel is not
> mine,
>
> here is the section in question, were I am unable to create the
> containment in ApplyClass, but it creates the ApplyAttribute node in
> GMFGraph and GMFTool,
> and unable to generate a link from ApplyAssociation.
>
> thank you for the reply
> Vasco


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #580944 is a reply to message #487597] Wed, 23 September 2009 20:32 Go to previous message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
couln't upload in any brouser so I'll post it here


@gmf(foo="bar")
@namespace(uri="http://metamodel/1.0", prefix="metamodel")
package metamodel;

@gmf.diagram(foo="bar")
class TransformationModel {
val AbstractSource[*] source;
}

@gmf.node(foo="bar")
abstract class Layer extends AbstractSource {
attr String description;

@gmf.link(source.decoration="arrow")
ref AbstractSource[+] previousSource;
attr String outputFilePathURI;

@gmf.compartment(layout ="free")
val Rule[*] hasRule;
}

@gmf.node(label="className")
class ApplyClass extends AbstractClass {

@gmf.containment(layout="free")
val ApplyAttribute[*] attribute;
}

@gmf.node( color="255,255,163")
class ApplyModel {

@gmf.compartment(layout ="free")
val ApplyClass[*] ~class;

val ApplyAssociation[*] association;
}

//@gmf.link(source="source", target="target")
class ApplyAssociation extends Association {
ref ApplyClass[1] source;
ref ApplyClass[1] target;
}

@gmf.node(foo="bar")
abstract class AbstractClass {
attr String description;
attr String className;
attr String packageName;
}

//@gmf.link(source="", target="")
abstract class Association {
attr String associationName;
}

@gmf.node(label="attributeName")
class ApplyAttribute {
attr String[1] description;
attr String attributeName;
}

@gmf.node(foo="bar")
abstract class AbstractSource {
}

@gmf.node(label="description")
class Rule {
attr String description;

@gmf.compartment(layout ="list")
val ApplyModel[1] apply;

}

@gmf.node(label="description", color="0,0,255")
class Sequential extends Layer {
}


PS:aditionaly today while showing the basic example of the EuGENia] page, I get a Internal error: java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to org.eclipse.gmf.gmfgraph.LineKind error and no links are generated, not shure if it has to do with my link problem
Re: [EuGENia] unable to create some elements [message #580952 is a reply to message #580944] Wed, 23 September 2009 21:22 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

The problem stems from the fact that you need to have one compartment
under ApplyModel that can hold the contents of both the ~class and
association containment references. This is not currently supported by
EuGENia but I'll have a look and see if this can be fixed with a custom
polishing EOL script
( http://epsilonblog.wordpress.com/2009/06/15/eugenia-polishin g-your-gmf-editor/).


Re the other issue, could it be the case that you have updated EuGENia
but not the rest of Epsilon?

Cheers,
Dimitris

Vasco Sousa wrote:
> couln't upload in any brouser so I'll post it here
>
>
> @gmf(foo="bar")
> @namespace(uri="http://metamodel/1.0", prefix="metamodel")
> package metamodel;
>
> @gmf.diagram(foo="bar")
> class TransformationModel {
> val AbstractSource[*] source;
> }
>
> @gmf.node(foo="bar")
> abstract class Layer extends AbstractSource {
> attr String description;
>
> @gmf.link(source.decoration="arrow")
> ref AbstractSource[+] previousSource;
> attr String outputFilePathURI;
>
> @gmf.compartment(layout ="free")
> val Rule[*] hasRule;
> }
>
> @gmf.node(label="className")
> class ApplyClass extends AbstractClass {
>
> @gmf.containment(layout="free")
> val ApplyAttribute[*] attribute;
> }
>
> @gmf.node( color="255,255,163")
> class ApplyModel {
>
> @gmf.compartment(layout ="free")
> val ApplyClass[*] ~class;
>
> val ApplyAssociation[*] association;
> }
>
> //@gmf.link(source="source", target="target")
> class ApplyAssociation extends Association {
> ref ApplyClass[1] source;
> ref ApplyClass[1] target;
> }
>
> @gmf.node(foo="bar")
> abstract class AbstractClass {
> attr String description;
> attr String className;
> attr String packageName;
> }
>
> //@gmf.link(source="", target="")
> abstract class Association {
> attr String associationName;
> }
>
> @gmf.node(label="attributeName")
> class ApplyAttribute {
> attr String[1] description;
> attr String attributeName;
> }
>
> @gmf.node(foo="bar")
> abstract class AbstractSource {
> }
>
> @gmf.node(label="description")
> class Rule {
> attr String description;
>
> @gmf.compartment(layout ="list")
> val ApplyModel[1] apply;
>
> }
>
> @gmf.node(label="description", color="0,0,255")
> class Sequential extends Layer {
> }
>
>
> PS:aditionaly today while showing the basic example of the EuGENia]
> page, I get a Internal error: java.lang.ClassCastException:
> org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to
> org.eclipse.gmf.gmfgraph.LineKind error and no links are generated, not
> shure if it has to do with my link problem


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #580967 is a reply to message #487645] Wed, 23 September 2009 21:49 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

On an update to this, I think I've figured out how to support such cases
in EuGENia. The new version will most likely be available mid-next week.

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Vasco,
>
> The problem stems from the fact that you need to have one compartment
> under ApplyModel that can hold the contents of both the ~class and
> association containment references. This is not currently supported by
> EuGENia but I'll have a look and see if this can be fixed with a custom
> polishing EOL script
> ( http://epsilonblog.wordpress.com/2009/06/15/eugenia-polishin g-your-gmf-editor/).
>
>
> Re the other issue, could it be the case that you have updated EuGENia
> but not the rest of Epsilon?
>
> Cheers,
> Dimitris
>
> Vasco Sousa wrote:
>> couln't upload in any brouser so I'll post it here
>>
>>
>> @gmf(foo="bar")
>> @namespace(uri="http://metamodel/1.0", prefix="metamodel")
>> package metamodel;
>>
>> @gmf.diagram(foo="bar")
>> class TransformationModel {
>> val AbstractSource[*] source;
>> }
>>
>> @gmf.node(foo="bar")
>> abstract class Layer extends AbstractSource {
>> attr String description;
>>
>> @gmf.link(source.decoration="arrow")
>> ref AbstractSource[+] previousSource;
>> attr String outputFilePathURI;
>>
>> @gmf.compartment(layout ="free")
>> val Rule[*] hasRule;
>> }
>>
>> @gmf.node(label="className")
>> class ApplyClass extends AbstractClass {
>>
>> @gmf.containment(layout="free")
>> val ApplyAttribute[*] attribute;
>> }
>>
>> @gmf.node( color="255,255,163")
>> class ApplyModel {
>>
>> @gmf.compartment(layout ="free")
>> val ApplyClass[*] ~class;
>>
>> val ApplyAssociation[*] association;
>> }
>>
>> //@gmf.link(source="source", target="target")
>> class ApplyAssociation extends Association {
>> ref ApplyClass[1] source;
>> ref ApplyClass[1] target;
>> }
>>
>> @gmf.node(foo="bar")
>> abstract class AbstractClass {
>> attr String description;
>> attr String className;
>> attr String packageName;
>> }
>>
>> //@gmf.link(source="", target="")
>> abstract class Association {
>> attr String associationName;
>> }
>>
>> @gmf.node(label="attributeName")
>> class ApplyAttribute {
>> attr String[1] description;
>> attr String attributeName;
>> }
>>
>> @gmf.node(foo="bar")
>> abstract class AbstractSource {
>> }
>>
>> @gmf.node(label="description")
>> class Rule {
>> attr String description;
>>
>> @gmf.compartment(layout ="list")
>> val ApplyModel[1] apply;
>>
>> }
>>
>> @gmf.node(label="description", color="0,0,255")
>> class Sequential extends Layer {
>> }
>>
>>
>> PS:aditionaly today while showing the basic example of the EuGENia]
>> page, I get a Internal error: java.lang.ClassCastException:
>> org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to
>> org.eclipse.gmf.gmfgraph.LineKind error and no links are generated,
>> not shure if it has to do with my link problem
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #580984 is a reply to message #487646] Thu, 24 September 2009 10:33 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

A new interim version that fixes this has just been made available. I've
slightly modified the metamodel, mainly to add a label to ApplyModel as
labels are mandatory for nodes. The modified version appears below.
Could you please update to the latest *interim* version of
Epsilon/EuGENia and let me know how it goes?

--- metamodel.emf ---

@gmf(foo="bar")
@namespace(uri="http://metamodel/1.0", prefix="metamodel")
package metamodel;

@gmf.diagram(foo="bar")
class TransformationModel {
val AbstractSource[*] source;
}

@gmf.node(foo="bar")
abstract class Layer extends AbstractSource {
attr String description;

@gmf.link(source.decoration="arrow")
ref AbstractSource[+] previousSource;
attr String outputFilePathURI;

@gmf.compartment(layout ="free")
val Rule[*] hasRule;
}

@gmf.node(label="className")
class ApplyClass extends AbstractClass {

@gmf.containment(layout="free")
val ApplyAttribute[*] attribute;
}

@gmf.node(label="name", color="255,255,163")
class ApplyModel {
attr String name; // Added - all nodes must have a label
@gmf.compartment(layout ="free")
val ApplyClass[*] ~class;

@gmf.compartment(layout ="free")
val ApplyAssociation[*] association;
}

@gmf.link(source="source", target="target")
class ApplyAssociation extends Association {
ref ApplyClass[1] source;
ref ApplyClass[1] target;
}

@gmf.node(foo="bar")
abstract class AbstractClass {
attr String description;
attr String className;
attr String packageName;
}

//@gmf.link(source="", target="")
abstract class Association {
attr String associationName;
}

@gmf.node(label="attributeName")
class ApplyAttribute {
attr String[1] description;
attr String attributeName;
}

@gmf.node(foo="bar")
abstract class AbstractSource {
}

@gmf.node(label="description")
class Rule {
attr String description;

@gmf.compartment(layout ="list")
val ApplyModel[1] apply;

}

@gmf.node(label="description", color="0,0,255")
class Sequential extends Layer {
}

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Vasco,
>
> On an update to this, I think I've figured out how to support such cases
> in EuGENia. The new version will most likely be available mid-next week.
>
> Cheers,
> Dimitris
>
> Dimitris Kolovos wrote:
>> Hi Vasco,
>>
>> The problem stems from the fact that you need to have one compartment
>> under ApplyModel that can hold the contents of both the ~class and
>> association containment references. This is not currently supported by
>> EuGENia but I'll have a look and see if this can be fixed with a
>> custom polishing EOL script
>> ( http://epsilonblog.wordpress.com/2009/06/15/eugenia-polishin g-your-gmf-editor/).
>>
>>
>> Re the other issue, could it be the case that you have updated EuGENia
>> but not the rest of Epsilon?
>>
>> Cheers,
>> Dimitris
>>
>> Vasco Sousa wrote:
>>> couln't upload in any brouser so I'll post it here
>>>
>>>
>>> @gmf(foo="bar")
>>> @namespace(uri="http://metamodel/1.0", prefix="metamodel")
>>> package metamodel;
>>>
>>> @gmf.diagram(foo="bar")
>>> class TransformationModel {
>>> val AbstractSource[*] source;
>>> }
>>>
>>> @gmf.node(foo="bar")
>>> abstract class Layer extends AbstractSource {
>>> attr String description;
>>>
>>> @gmf.link(source.decoration="arrow")
>>> ref AbstractSource[+] previousSource;
>>> attr String outputFilePathURI;
>>>
>>> @gmf.compartment(layout ="free")
>>> val Rule[*] hasRule;
>>> }
>>>
>>> @gmf.node(label="className")
>>> class ApplyClass extends AbstractClass {
>>>
>>> @gmf.containment(layout="free")
>>> val ApplyAttribute[*] attribute;
>>> }
>>>
>>> @gmf.node( color="255,255,163")
>>> class ApplyModel {
>>>
>>> @gmf.compartment(layout ="free")
>>> val ApplyClass[*] ~class;
>>>
>>> val ApplyAssociation[*] association;
>>> }
>>>
>>> //@gmf.link(source="source", target="target")
>>> class ApplyAssociation extends Association {
>>> ref ApplyClass[1] source;
>>> ref ApplyClass[1] target;
>>> }
>>>
>>> @gmf.node(foo="bar")
>>> abstract class AbstractClass {
>>> attr String description;
>>> attr String className;
>>> attr String packageName;
>>> }
>>>
>>> //@gmf.link(source="", target="")
>>> abstract class Association {
>>> attr String associationName;
>>> }
>>>
>>> @gmf.node(label="attributeName")
>>> class ApplyAttribute {
>>> attr String[1] description;
>>> attr String attributeName;
>>> }
>>>
>>> @gmf.node(foo="bar")
>>> abstract class AbstractSource {
>>> }
>>>
>>> @gmf.node(label="description")
>>> class Rule {
>>> attr String description;
>>>
>>> @gmf.compartment(layout ="list")
>>> val ApplyModel[1] apply;
>>>
>>> }
>>>
>>> @gmf.node(label="description", color="0,0,255")
>>> class Sequential extends Layer {
>>> }
>>>
>>>
>>> PS:aditionaly today while showing the basic example of the EuGENia]
>>> page, I get a Internal error: java.lang.ClassCastException:
>>> org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to
>>> org.eclipse.gmf.gmfgraph.LineKind error and no links are generated,
>>> not shure if it has to do with my link problem
>>
>>
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #581001 is a reply to message #487753] Thu, 24 September 2009 12:15 Go to previous message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
I tried the metamodel you have provided and updated the Epsilon plugin to the latest *intermin*

I no longer have the error with the filesystem example
but in this metamodel the issues still apply, he doesn't create a
mapping for the ApplyAttribute nor the representation of the ApplyAttribute containment in ApplyClass on the Graph model

the apply association is still absent from the mapping file
(do I realy need to define a compartment for the link in @gmf.node(label="name", color="255,255,163")
class ApplyModel {
attr String name; // Added - all nodes must have a label
@gmf.compartment(layout ="free")
val ApplyClass[*] ~class;

@gmf.compartment(layout ="free")
val ApplyAssociation[*] association;
}

?)

I suspect that in the same manner I need to define nodes for the abstract classes for the flowing classes to be properly generated, the same would happen with the links, but the abstract class to the ApplyAssociation doesn't have the mandatory source and target.


PS: as for the mandatory label in nodes I usualy let EuGENia generate the mapping, and then stroll down the file deleting the label mappings the I don't need, or would give error messages, and it runs fine
Re: [EuGENia] unable to create some elements [message #581015 is a reply to message #487781] Thu, 24 September 2009 13:05 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

Vasco Sousa wrote:
> I tried the metamodel you have provided and updated the Epsilon plugin
> to the latest *intermin*
>
> I no longer have the error with the filesystem example
> but in this metamodel the issues still apply, he doesn't create a
> mapping for the ApplyAttribute nor the representation of the
> ApplyAttribute containment in ApplyClass on the Graph model

Please replace @gmf.containment(layout="free") with
@gmf.compartment(layout="free") in line 25 of the .emf to get this working.

>
> the apply association is still absent from the mapping file
> (do I realy need to define a compartment for the link in
> @gmf.node(label="name", color="255,255,163")
> class ApplyModel {
> attr String name; // Added - all nodes must have a label
> @gmf.compartment(layout ="free")
> val ApplyClass[*] ~class;
>
> @gmf.compartment(layout ="free")
> val ApplyAssociation[*] association;
> }
>
> ?)
>
> I suspect that in the same manner I need to define nodes for the
> abstract classes for the flowing classes to be properly generated, the
> same would happen with the links, but the abstract class to the
> ApplyAssociation doesn't have the mandatory source and target.
>

None of these should be necessary. I'll check again and get back to you.

>
> PS: as for the mandatory label in nodes I usualy let EuGENia generate
> the mapping, and then stroll down the file deleting the label mappings
> the I don't need, or would give error messages, and it runs fine

I'll have a look at this and see if we can make labels optional in EuGENia.

--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #581034 is a reply to message #487799] Mon, 28 September 2009 12:33 Go to previous message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
Hi Dimitrios

Thank you for spotting that error with the compartment, for some reason I couldn't spot it.
Anyhow all compartments are working within expected.

Cheers,
Vasco
Re: [EuGENia] unable to create some elements [message #581048 is a reply to message #488363] Mon, 28 September 2009 13:35 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

Thanks for the update. Could you perhaps add an enhancement request for
this "optional labels" feature in the bugzilla so that we can keep track
of this?

Cheers,
Dimitris

Vasco Sousa wrote:
> Hi Dimitrios
> Thank you for spotting that error with the compartment, for some reason
> I couldn't spot it.
> Anyhow all compartments are working within expected.
>
> Cheers,
> Vasco


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] unable to create some elements [message #581288 is a reply to message #488378] Fri, 02 October 2009 14:20 Go to previous message
Vasco Sousa is currently offline Vasco SousaFriend
Messages: 23
Registered: September 2009
Junior Member
I am sorry
I'm still preaty green with this
don't seem to find the right place to report
the feature request, I stil get lost in bugzilla

any news on not needing to map
the abstract classes ?

Cheers
Vasco
Re: [EuGENia] unable to create some elements [message #581305 is a reply to message #581288] Fri, 02 October 2009 18:14 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Vasco,

Vasco Sousa wrote:
> I am sorry
> I'm still preaty green with this
> don't seem to find the right place to report
> the feature request, I stil get lost in bugzilla

To submit the feature request, please follow the "Report new bug" link
in the Epsilon homepage (http://eclipse.org/gmt/epsilon/)

>
> any news on not needing to map
> the abstract classes ?

If you remove @gmf.compartment from the following it should really work

@gmf.compartment(layout ="free")
val ApplyAssociation[*] association;

If not, could you please send me a minimal example that reproduces this
because I'm not yet convinced I understand the problem completely.

>
> Cheers
> Vasco


Cheers,
Dimtiris
Previous Topic:ETL: creation of arbitrary number of target traceable elements
Next Topic:Nested Operations by importing EOL Files - using Java
Goto Forum:
  


Current Time: Fri Apr 26 15:01:58 GMT 2024

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

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

Back to the top