|Re: Create Pictogramm Element from Contextmenu [message #684137 is a reply to message #683800]
||Wed, 15 June 2011 00:50
| Christian Brand
Registered: July 2009
Problem one seems to be solved. Is it?|
Problem two is how to create a connection? Perhaps we need some more details on what exactly does not work.
Three - Disabling the selection of a connection: At least you can disable the move of it. Just switch of the ReconnectionFeature and the CreateBendpointFeature.
Please let us know what is working and where we can help you. Thanx!
SAP AG - Walldorf - Germany
|Re: Create Pictogramm Element from Contextmenu [message #690893 is a reply to message #690653]
||Thu, 30 June 2011 07:43
| Michael Wenz
Registered: July 2009
Location: Walldorf, Germany
You should be able to reuse the CreateEClassFeature in the method |
getContextMenu(ICustomContext context) . You can simply create a new
CreateContext, provide the new target (e.g. the Diagram if you want to
display the new object there) and
"Kalle" schrieb im Newsbeitrag news:email@example.com...
I'll use this topic for another similar problem I have with the ContextMenu.
I'm new to Graphiti, so I'm not sure if I got the right understanding of the
structure of Graphiti.
I want to create and add an EClass by using the ContextMenu. I already
defined a "AddEClassFeature" and a "CreateEClassFeature". It works for the
palette, but when I'm using the ToolBehaviorProvider and want to override
the "getContextMenu(ICustomContext context)" I don't have access to a
(I)CreateContext or a (I)AddContext. So I'm not able to create a new EClass.
I already got the idea of creating an own custom AddEClassFeature, which
extends AbstractCustomFeature. I overrode the execute-method and created a
new AddContext. The NewObject of the AddContext is the businessObject of the
currently selected pictogramElement, which is the old businessObject. At the
end of the method I used the addIfPossible-method, but it seems that now I
only added a new EClass to the diagram, which is linked to the old
I'm grateful for any new approach concerning Graphiti.
Powered by FUDForum
. Page generated in 0.02351 seconds