Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » extending the Diagram notation interface
extending the Diagram notation interface [message #92974] Mon, 15 January 2007 14:31 Go to next message
Eclipse UserFriend
Originally posted by: NOSAPM.xyz.com

Hello everybody,
I extended the Diagram because I need to introduce some additional
references.
Is it possible to hook the new "MyDiagram" EClass by means of the tooling?

The only point I could think of is in the .gmfgen - the Diagram Element /
Diagram Run Time Class
property of the "Gen Diagram XXXEditPart" .

I loaded my new notational .ecore in the .gmfgen and expected the new
"MyDiagram" type to
appear as a choice in the said "Diagram Run Time Class" combo. It didn't,
however : (

Whet is the right way to hook a new Diagram notation type to the generated
editor?

By the way, in that "Diagram Run Time Class" combo one can choose between
the
Ecore types ( EClassifier, EObject ...) and notation types ( View, Edge
....).
Isn't this misleading? Does "Diagram Run Time Class" mean the ruin-time
class of
the semantic element or the view element?
Cheers,
Theo
Re: extending the Diagram notation interface [message #93032 is a reply to message #92974] Mon, 15 January 2007 15:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: NOSAPM.xyz.com

"Theo" <NOSAPM@xyz.com> wrote in message
news:eogmif$ikt$1@utils.eclipse.org...
> Hello everybody,
> I extended the Diagram because I need to introduce some additional
> references.
> Is it possible to hook the new "MyDiagram" EClass by means of the tooling?
>
> The only point I could think of is in the .gmfgen - the Diagram Element /
> Diagram Run Time Class
> property of the "Gen Diagram XXXEditPart" .
>
> I loaded my new notational .ecore in the .gmfgen and expected the new
> "MyDiagram" type to
> appear as a choice in the said "Diagram Run Time Class" combo. It didn't,
> however : (
>
> Whet is the right way to hook a new Diagram notation type to the generated
> editor?
>
> By the way, in that "Diagram Run Time Class" combo one can choose between
> the
> Ecore types ( EClassifier, EObject ...) and notation types ( View, Edge
> ...).
> Isn't this misleading? Does "Diagram Run Time Class" mean the ruin-time
> class of
> the semantic element or the view element?
> Cheers,
> Theo

Just got it myself: one have to "Load resource" both the .ecore anf the
..genmodel
with the new extension. But still, why both semantic and notation types
appear in
"Diagram Run Time Class" property in the .gmfgen?
Theo
Re: extending the Diagram notation interface [message #93047 is a reply to message #93032] Mon, 15 January 2007 15:56 Go to previous message
Eclipse UserFriend
Originally posted by: NOSAPM.xyz.com

"Theo" <NOSAPM@xyz.com> wrote in message
news:eognm4$kut$1@utils.eclipse.org...
> "Theo" <NOSAPM@xyz.com> wrote in message
> news:eogmif$ikt$1@utils.eclipse.org...
>> Hello everybody,
>> I extended the Diagram because I need to introduce some additional
>> references.
>> Is it possible to hook the new "MyDiagram" EClass by means of the
>> tooling?
>>
>> The only point I could think of is in the .gmfgen - the Diagram Element /
>> Diagram Run Time Class
>> property of the "Gen Diagram XXXEditPart" .
>>
>> I loaded my new notational .ecore in the .gmfgen and expected the new
>> "MyDiagram" type to
>> appear as a choice in the said "Diagram Run Time Class" combo. It didn't,
>> however : (
>>
>> Whet is the right way to hook a new Diagram notation type to the
>> generated editor?
>>
>> By the way, in that "Diagram Run Time Class" combo one can choose between
>> the
>> Ecore types ( EClassifier, EObject ...) and notation types ( View, Edge
>> ...).
>> Isn't this misleading? Does "Diagram Run Time Class" mean the ruin-time
>> class of
>> the semantic element or the view element?
>> Cheers,
>> Theo
>
> Just got it myself: one have to "Load resource" both the .ecore anf the
> .genmodel
> with the new extension. But still, why both semantic and notation types
> appear in
> "Diagram Run Time Class" property in the .gmfgen?
> Theo

Not so fast with champagne... The .gmfgen accepts and validates the notation
extension but the editors generated by the .gmfgen with :
1) Diagram Run Time Class = Diagram-> View
and
2) Diagram Run Time Class = MyDiagram-> Diagram

are identical byte by byte.
I expected that XXXDiagramViewFactory.createDiagram( ...) would be
overriden...
I guess I will have to face the truth :) - apparently such a feature simply
isn'i supported yet and "Diagram Run Time Class" is just a placeholder
Good luck, Theo
Previous Topic:Adding more tabs in property view in GMF
Next Topic:Arrows
Goto Forum:
  


Current Time: Wed Apr 30 15:06:15 EDT 2025

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

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

Back to the top