HutnGenerationException in property of an element [message #638730] |
Fri, 12 November 2010 06:44  |
Eclipse User |
|
|
|
Hello!
I'm having problems with one attribute of an element in a model. The syntax has no errors but when I try to generate the model, an exception appears:
org.eclipse.epsilon.hutn.exceptions.HutnGenerationException: Invalid assignment to property 'represents' (69:26)
at org.eclipse.epsilon.hutn.generate.model.ModelGenerator.gener ate(ModelGenerator.java:124)
...
The model I'm using:
@Spec {
metamodel "DD" {
nsUri: "http://datadictionary/1.0"
}
}
datadictionary {
GlobalBusinessDataDictionary "gbddName" {
name: "gbddName"
code: "000"
MainOrganization: MainOrganization " /es.cv.gvcase.linkers.dd2cld.test.data/models//hr.model#//@o rganizations.0 "
dataStructures: DataStructure "dsName" {
name: "dsName"
represents: Entity
isContainedBy: DataStructure "dsName"
contains: Field "F1" {
name: "F1"
isContainedBy: DataStructure "dsName"
}
}
}
}
'Represents' is a multivalued property (1..*) of the element DataStructure. The type of this property is enumeration, whose possible values are Interface or Entity.
Any ideas to solve the problem?
Thanks.
|
|
|
|
|
|
Re: HutnGenerationException in property of an element [message #639376 is a reply to message #639108] |
Tue, 16 November 2010 05:17  |
Eclipse User |
|
|
|
Jes and I debugged this issue offline. In case anybody else runs into the same problem, the exception was caused by attempting to assign a model element as its own container.
The HUTN in Jes's first post specifies that the DataStructure, dsName, should be the value of its own isContainedBy feature, which is a containment reference. Recursive containment is not permitted in EMF.
This indicated a problem with the metamodel, and the isContainedBy reference was made optional, rather than mandatory.
Cheers,
Louis.
|
|
|
Powered by
FUDForum. Page generated in 0.07551 seconds