[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: extending the Diagram notation interface

"Theo" <NOSAPM@xxxxxxx> wrote in message 
news:eognm4$kut$1@xxxxxxxxxxxxxxxxxxxx
> "Theo" <NOSAPM@xxxxxxx> wrote in message 
> news:eogmif$ikt$1@xxxxxxxxxxxxxxxxxxxx
>> 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