[Eugenia] Problem with tool.name annotation detail by using different metamodel [message #547112] |
Thu, 15 July 2010 13:27 |
Eclipse User |
|
|
|
Originally posted by: mario28988.yahoo.de
Hi newsgroup,
I have created the following metamodel which extends the general ecore
metamodel:
example
|- DiagramElement -> EClass
|- ModelElement -> EClass
|- EditorProject -> EPackage
Based on this metamodel I have created a model with gmf annotations:
Editor Project TestProject
|- gmf
|- Model Element AModelElement
|- name : String
|- gmf.node
|- label -> name
|- tool.name -> NewToolName
|- Diagram Element ADiagramElement
|- gmf.diagram
|- ownedModelElements : AModelElement
|- gmf.link
|- tool.name
My Problem is, that if I generate the gmf models via eugenia only the
tool name of the link element will be changed (not the node tool name).
Referring to this I checked the Ecore2GMF.eol script of the
org.eclipse.epsilon.eugenia plugin and located the problem in the
createCreationTool operation. The condition of the if statement 'if
(element.isTypeOf(ECore!EClass) and element.isNode())' always returns
false, because the element type isn't exactly EClass but AModelElement
(which is derived from EClass). However, the isTypeOf method returns
false. :-(
Is this behaviour a problem of the isTypeOf method or should the
implementation of the Ecore2GMF.eol be different? Does anyone know the
location of the eol api reference according to this?
What would you advise me in this issue? What's a 'good' solution for
this problem?
Thanks in advance.
Mario
|
|
|
|
Re: [Eugenia] Problem with tool.name annotation detail by using different metamodel [message #547291 is a reply to message #547122] |
Fri, 16 July 2010 07:39 |
Eclipse User |
|
|
|
Originally posted by: mario28988.yahoo.de
That works fine. Nevertheless I have to change the
org.eclipse.epsilon.eugenia plugin :-(
Regards
Mario
Am 15.07.2010 17:39, schrieb Steffen Zschaler:
> I think this may work when you replace isTypeOf with isKindOf.
>
> Steffen
>
> On 15/07/2010 14:27, Mario Sänger wrote:
>> Hi newsgroup,
>>
>> I have created the following metamodel which extends the general ecore
>> metamodel:
>>
>> example
>> |- DiagramElement -> EClass
>> |- ModelElement -> EClass
>> |- EditorProject -> EPackage
>>
>> Based on this metamodel I have created a model with gmf annotations:
>>
>> Editor Project TestProject
>> |- gmf
>>
>> |- Model Element AModelElement
>> |- name : String
>> |- gmf.node
>> |- label -> name
>> |- tool.name -> NewToolName
>>
>> |- Diagram Element ADiagramElement
>> |- gmf.diagram
>> |- ownedModelElements : AModelElement
>> |- gmf.link
>> |- tool.name
>>
>> My Problem is, that if I generate the gmf models via eugenia only the
>> tool name of the link element will be changed (not the node tool
>> name). Referring to this I checked the Ecore2GMF.eol script of the
>> org.eclipse.epsilon.eugenia plugin and located the problem in the
>> createCreationTool operation. The condition of the if statement 'if
>> (element.isTypeOf(ECore!EClass) and element.isNode())' always returns
>> false, because the element type isn't exactly EClass but AModelElement
>> (which is derived from EClass). However, the isTypeOf method returns
>> false. :-(
>>
>> Is this behaviour a problem of the isTypeOf method or should the
>> implementation of the Ecore2GMF.eol be different? Does anyone know the
>> location of the eol api reference according to this?
>>
>> What would you advise me in this issue? What's a 'good' solution for
>> this problem?
>>
>> Thanks in advance.
>>
>> Mario
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
|
|
|
|
|
|
Re: [Eugenia] Problem with tool.name annotation detail by using different metamodel [message #590713 is a reply to message #547122] |
Fri, 16 July 2010 07:39 |
Eclipse User |
|
|
|
Originally posted by: mario28988.yahoo.de
That works fine. Nevertheless I have to change the
org.eclipse.epsilon.eugenia plugin :-(
Regards
Mario
Am 15.07.2010 17:39, schrieb Steffen Zschaler:
> I think this may work when you replace isTypeOf with isKindOf.
>
> Steffen
>
> On 15/07/2010 14:27, Mario Sänger wrote:
>> Hi newsgroup,
>>
>> I have created the following metamodel which extends the general ecore
>> metamodel:
>>
>> example
>> |- DiagramElement -> EClass
>> |- ModelElement -> EClass
>> |- EditorProject -> EPackage
>>
>> Based on this metamodel I have created a model with gmf annotations:
>>
>> Editor Project TestProject
>> |- gmf
>>
>> |- Model Element AModelElement
>> |- name : String
>> |- gmf.node
>> |- label -> name
>> |- tool.name -> NewToolName
>>
>> |- Diagram Element ADiagramElement
>> |- gmf.diagram
>> |- ownedModelElements : AModelElement
>> |- gmf.link
>> |- tool.name
>>
>> My Problem is, that if I generate the gmf models via eugenia only the
>> tool name of the link element will be changed (not the node tool
>> name). Referring to this I checked the Ecore2GMF.eol script of the
>> org.eclipse.epsilon.eugenia plugin and located the problem in the
>> createCreationTool operation. The condition of the if statement 'if
>> (element.isTypeOf(ECore!EClass) and element.isNode())' always returns
>> false, because the element type isn't exactly EClass but AModelElement
>> (which is derived from EClass). However, the isTypeOf method returns
>> false. :-(
>>
>> Is this behaviour a problem of the isTypeOf method or should the
>> implementation of the Ecore2GMF.eol be different? Does anyone know the
>> location of the eol api reference according to this?
>>
>> What would you advise me in this issue? What's a 'good' solution for
>> this problem?
>>
>> Thanks in advance.
>>
>> Mario
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04055 seconds