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)
|
Re: [EuGENia] unable to create some elements [message #486604 is a reply to message #486603] |
Fri, 18 September 2009 11:25 |
Dimitrios Kolovos 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 #487637 is a reply to message #487597] |
Wed, 23 September 2009 20:32 |
Vasco Sousa 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 |
Dimitrios Kolovos 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 |
Dimitrios Kolovos 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 |
Dimitrios Kolovos 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 |
Vasco Sousa 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 |
Dimitrios Kolovos 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 #580944 is a reply to message #487597] |
Wed, 23 September 2009 20:32 |
Vasco Sousa 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 |
Dimitrios Kolovos 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 |
Dimitrios Kolovos 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 |
Dimitrios Kolovos 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 |
Vasco Sousa 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 |
Dimitrios Kolovos 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
|
|
| | | | |
Goto Forum:
Current Time: Fri Apr 26 15:01:58 GMT 2024
Powered by FUDForum. Page generated in 0.05994 seconds
|