Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Adding SpecializationTypes dynamically
Adding SpecializationTypes dynamically [message #94908] Mon, 22 January 2007 04:54 Go to next message
Eclipse UserFriend
Originally posted by: klapdohr.upb.de

Hi,
I have an editor for a metamodel that consist basically just of the
classes "Node" and "Edge". Now I want to add any number of
specialization types for these basic types (based on another model)
dynamically (so I cant use the elementTypes extension point).

In my palette I want to have a Creation Tool for any of my
specialization types. What I did so far:
- I created new specialization types for my basic element types "Node"
and "Edge" and registered them to the ElementTypeRegistry.
- I bound these specialization types to the client context of my editor.
- I created an palette entry for these types.

Now the specialization types are shown on the palette but I cannot add
them to the diagram canvas (only the basic ElementTypes of "Node" and
"Edge").
Is there a special thing I have to add, so my specialization types can
be added to the canvas?


Thank you for helping, Chris Klapdohr
Re: Adding SpecializationTypes dynamically [message #95542 is a reply to message #94908] Tue, 23 January 2007 06:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: schmelly.uni-paderborn.de

Hi Chris,

in the 'eclipse.technology.gmf' archive i found a post which seems to
describe exactly your problem, maybe this helps:

http://dev.eclipse.org/newslists/news.eclipse.technology.gmf /msg03951.html

best regards,
David


Chris Klapdohr schrieb:
> Hi,
> I have an editor for a metamodel that consist basically just of the
> classes "Node" and "Edge". Now I want to add any number of
> specialization types for these basic types (based on another model)
> dynamically (so I cant use the elementTypes extension point).
>
> In my palette I want to have a Creation Tool for any of my
> specialization types. What I did so far:
> - I created new specialization types for my basic element types "Node"
> and "Edge" and registered them to the ElementTypeRegistry.
> - I bound these specialization types to the client context of my editor.
> - I created an palette entry for these types.
>
> Now the specialization types are shown on the palette but I cannot add
> them to the diagram canvas (only the basic ElementTypes of "Node" and
> "Edge").
> Is there a special thing I have to add, so my specialization types can
> be added to the canvas?
>
>
> Thank you for helping, Chris Klapdohr
Re: Adding SpecializationTypes dynamically [message #95637 is a reply to message #95542] Tue, 23 January 2007 07:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: klapdohr.upb.de

Hi David,
thanks for your answer.

I have implemented the Interface IHintedType, but I still get the
"not-allowed" cursor by trying to add one of my SpecializationTypes.

By debugging I found, that a node that can be added to the canvas
unlike my SpecializationTypes gets a Comand "cmd" in the method "Command
getCommand(Request request)" which is not null, so the method
_disableCanonicalEditPolicyList.addAll(disableCanonicalFor(_ request)) is
called. In case of adding one of my SpecializaitonTypes the Command cmd
is allways null.

Any ideas whats missing here?

Best regard, Chris


David Schmelter schrieb:
> Hi Chris,
>
> in the 'eclipse.technology.gmf' archive i found a post which seems to
> describe exactly your problem, maybe this helps:
>
> http://dev.eclipse.org/newslists/news.eclipse.technology.gmf /msg03951.html
>
> best regards,
> David
>
>
> Chris Klapdohr schrieb:
>> Hi,
>> I have an editor for a metamodel that consist basically just of the
>> classes "Node" and "Edge". Now I want to add any number of
>> specialization types for these basic types (based on another model)
>> dynamically (so I cant use the elementTypes extension point).
>>
>> In my palette I want to have a Creation Tool for any of my
>> specialization types. What I did so far:
>> - I created new specialization types for my basic element types "Node"
>> and "Edge" and registered them to the ElementTypeRegistry.
>> - I bound these specialization types to the client context of my editor.
>> - I created an palette entry for these types.
>>
>> Now the specialization types are shown on the palette but I cannot add
>> them to the diagram canvas (only the basic ElementTypes of "Node" and
>> "Edge").
>> Is there a special thing I have to add, so my specialization types can
>> be added to the canvas?
>>
>>
>> Thank you for helping, Chris Klapdohr
Re: Adding SpecializationTypes dynamically [message #96198 is a reply to message #95637] Wed, 24 January 2007 13:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: schmelly.upb.de

hm im sorry, i think someone with a better technical background must
help you here.

best regards,
David


Chris Klapdohr wrote:
> Hi David,
> thanks for your answer.
>
> I have implemented the Interface IHintedType, but I still get the
> "not-allowed" cursor by trying to add one of my SpecializationTypes.
>
> By debugging I found, that a node that can be added to the canvas
> unlike my SpecializationTypes gets a Comand "cmd" in the method "Command
> getCommand(Request request)" which is not null, so the method
> _disableCanonicalEditPolicyList.addAll(disableCanonicalFor(_ request)) is
> called. In case of adding one of my SpecializaitonTypes the Command cmd
> is allways null.
>
> Any ideas whats missing here?
>
> Best regard, Chris
>
>
> David Schmelter schrieb:
>> Hi Chris,
>>
>> in the 'eclipse.technology.gmf' archive i found a post which seems to
>> describe exactly your problem, maybe this helps:
>>
>> http://dev.eclipse.org/newslists/news.eclipse.technology.gmf /msg03951.html
>>
>>
>> best regards,
>> David
>>
>>
>> Chris Klapdohr schrieb:
>>> Hi,
>>> I have an editor for a metamodel that consist basically just of the
>>> classes "Node" and "Edge". Now I want to add any number of
>>> specialization types for these basic types (based on another model)
>>> dynamically (so I cant use the elementTypes extension point).
>>>
>>> In my palette I want to have a Creation Tool for any of my
>>> specialization types. What I did so far:
>>> - I created new specialization types for my basic element types
>>> "Node" and "Edge" and registered them to the ElementTypeRegistry.
>>> - I bound these specialization types to the client context of my editor.
>>> - I created an palette entry for these types.
>>>
>>> Now the specialization types are shown on the palette but I cannot
>>> add them to the diagram canvas (only the basic ElementTypes of "Node"
>>> and "Edge").
>>> Is there a special thing I have to add, so my specialization types
>>> can be added to the canvas?
>>>
>>>
>>> Thank you for helping, Chris Klapdohr
Re: Adding SpecializationTypes dynamically [message #97150 is a reply to message #96198] Fri, 26 January 2007 04:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: klapdohr.upb.de

I have solved the my problem by adding the specialization types to the
KNOWN_ELEMENT_TYPES in my generated class xxxElementTypes.


David Schmelter schrieb:
> hm im sorry, i think someone with a better technical background must
> help you here.
>
> best regards,
> David
>
>
> Chris Klapdohr wrote:
>> Hi David,
>> thanks for your answer.
>>
>> I have implemented the Interface IHintedType, but I still get the
>> "not-allowed" cursor by trying to add one of my SpecializationTypes.
>>
>> By debugging I found, that a node that can be added to the canvas
>> unlike my SpecializationTypes gets a Comand "cmd" in the method
>> "Command getCommand(Request request)" which is not null, so the method
>> _disableCanonicalEditPolicyList.addAll(disableCanonicalFor(_ request))
>> is called. In case of adding one of my SpecializaitonTypes the Command
>> cmd is allways null.
>>
>> Any ideas whats missing here?
>>
>> Best regard, Chris
>>
>>
>> David Schmelter schrieb:
>>> Hi Chris,
>>>
>>> in the 'eclipse.technology.gmf' archive i found a post which seems to
>>> describe exactly your problem, maybe this helps:
>>>
>>> http://dev.eclipse.org/newslists/news.eclipse.technology.gmf /msg03951.html
>>>
>>>
>>> best regards,
>>> David
>>>
>>>
>>> Chris Klapdohr schrieb:
>>>> Hi,
>>>> I have an editor for a metamodel that consist basically just of the
>>>> classes "Node" and "Edge". Now I want to add any number of
>>>> specialization types for these basic types (based on another model)
>>>> dynamically (so I cant use the elementTypes extension point).
>>>>
>>>> In my palette I want to have a Creation Tool for any of my
>>>> specialization types. What I did so far:
>>>> - I created new specialization types for my basic element types
>>>> "Node" and "Edge" and registered them to the ElementTypeRegistry.
>>>> - I bound these specialization types to the client context of my
>>>> editor.
>>>> - I created an palette entry for these types.
>>>>
>>>> Now the specialization types are shown on the palette but I cannot
>>>> add them to the diagram canvas (only the basic ElementTypes of
>>>> "Node" and "Edge").
>>>> Is there a special thing I have to add, so my specialization types
>>>> can be added to the canvas?
>>>>
>>>>
>>>> Thank you for helping, Chris Klapdohr
Re: Adding SpecializationTypes dynamically [message #97180 is a reply to message #97150] Fri, 26 January 2007 04:59 Go to previous message
Eclipse UserFriend
Originally posted by: klapdohr.upb.de

Oh, I forgot to mention, that you have to update the method
"getCreateCommand" in your xxxItemSemanticEditPolicy, so "true" is
returned if the element type of the request is your basic element type
(like generated) OR a specialization type of it.

Chris Klapdohr schrieb:
> I have solved the my problem by adding the specialization types to the
> KNOWN_ELEMENT_TYPES in my generated class xxxElementTypes.
>
>
> David Schmelter schrieb:
>> hm im sorry, i think someone with a better technical background must
>> help you here.
>>
>> best regards,
>> David
>>
>>
>> Chris Klapdohr wrote:
>>> Hi David,
>>> thanks for your answer.
>>>
>>> I have implemented the Interface IHintedType, but I still get the
>>> "not-allowed" cursor by trying to add one of my SpecializationTypes.
>>>
>>> By debugging I found, that a node that can be added to the canvas
>>> unlike my SpecializationTypes gets a Comand "cmd" in the method
>>> "Command getCommand(Request request)" which is not null, so the
>>> method
>>> _disableCanonicalEditPolicyList.addAll(disableCanonicalFor(_ request))
>>> is called. In case of adding one of my SpecializaitonTypes the
>>> Command cmd is allways null.
>>>
>>> Any ideas whats missing here?
>>>
>>> Best regard, Chris
>>>
>>>
>>> David Schmelter schrieb:
>>>> Hi Chris,
>>>>
>>>> in the 'eclipse.technology.gmf' archive i found a post which seems
>>>> to describe exactly your problem, maybe this helps:
>>>>
>>>> http://dev.eclipse.org/newslists/news.eclipse.technology.gmf /msg03951.html
>>>>
>>>>
>>>> best regards,
>>>> David
>>>>
>>>>
>>>> Chris Klapdohr schrieb:
>>>>> Hi,
>>>>> I have an editor for a metamodel that consist basically just of the
>>>>> classes "Node" and "Edge". Now I want to add any number of
>>>>> specialization types for these basic types (based on another model)
>>>>> dynamically (so I cant use the elementTypes extension point).
>>>>>
>>>>> In my palette I want to have a Creation Tool for any of my
>>>>> specialization types. What I did so far:
>>>>> - I created new specialization types for my basic element types
>>>>> "Node" and "Edge" and registered them to the ElementTypeRegistry.
>>>>> - I bound these specialization types to the client context of my
>>>>> editor.
>>>>> - I created an palette entry for these types.
>>>>>
>>>>> Now the specialization types are shown on the palette but I cannot
>>>>> add them to the diagram canvas (only the basic ElementTypes of
>>>>> "Node" and "Edge").
>>>>> Is there a special thing I have to add, so my specialization types
>>>>> can be added to the canvas?
>>>>>
>>>>>
>>>>> Thank you for helping, Chris Klapdohr
Previous Topic:Unwanted Horizontal Rule Above a Compartment
Next Topic:Flexible Figure For Nodes With bend points
Goto Forum:
  


Current Time: Sun May 11 13:59:15 EDT 2025

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

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

Back to the top