Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] Problem with tool.name annotation detail by using different metamodel
[Eugenia] Problem with tool.name annotation detail by using different metamodel [message #547112] Thu, 15 July 2010 13:27 Go to next message
Eclipse UserFriend
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 #547122 is a reply to message #547112] Thu, 15 July 2010 15:39 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
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 #547291 is a reply to message #547122] Fri, 16 July 2010 07:39 Go to previous messageGo to next message
Eclipse UserFriend
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 #547292 is a reply to message #547291] Fri, 16 July 2010 08:38 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
You may wish to file a feature request/bug report. Dimitrios et al
will then be able to look at it and decide whether it makes sense to
include this fix into the official version.

Cheers,

Steffen

On 16/07/2010 08:39, Mario Sänger wrote:
> 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 #547344 is a reply to message #547292] Fri, 16 July 2010 11:46 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Mario,

I'm not convinced that extending Ecore with new classes is the best solution but as Steffen suggested, I'm happy to make this change in Eugenia (isTypeOf->isKindOf). Could you please file an enhancement request for this in the bugzilla using the link below?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT& component=Epsilon

Cheers,
Dimitris
Re: [Eugenia] Problem with tool.name annotation detail by using different metamodel [message #590687 is a reply to message #547112] Thu, 15 July 2010 15:39 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #590719 is a reply to message #547291] Fri, 16 July 2010 08:38 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
You may wish to file a feature request/bug report. Dimitrios et al
will then be able to look at it and decide whether it makes sense to
include this fix into the official version.

Cheers,

Steffen

On 16/07/2010 08:39, Mario Sänger wrote:
> 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 #590729 is a reply to message #547292] Fri, 16 July 2010 11:46 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Mario,

I'm not convinced that extending Ecore with new classes is the best solution but as Steffen suggested, I'm happy to make this change in Eugenia (isTypeOf->isKindOf). Could you please file an enhancement request for this in the bugzilla using the link below?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT& component=Epsilon

Cheers,
Dimitris
Previous Topic:[Eugenia] Problem with tool.name annotation detail by using different metamodel
Next Topic:[Epsilon] Revisiting problems with examples.friends.
Goto Forum:
  


Current Time: Thu Mar 28 12:42:22 GMT 2024

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

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

Back to the top