|
| Re: Create Pictogramm Element from Contextmenu [message #683789 is a reply to message #683779] |
Tue, 14 June 2011 08:37   |
Christian Brand Messages: 36 Registered: July 2009 Location: Walldorf/Germany |
Member |
|
|
Let us solve your first problem: Usually create features appear in the palette. In your case you need to have an add feature to add the graphical representation to a BO. This add feature would then be called indirectly through the framework when calling addGraphicalRepresentation() in your custom feature.
Christian Brand
SAP AG - Walldorf - Germany
|
|
|
|
| Re: Create Pictogramm Element from Contextmenu [message #684137 is a reply to message #683800] |
Wed, 15 June 2011 00:50   |
Christian Brand Messages: 36 Registered: July 2009 Location: Walldorf/Germany |
Member |
|
|
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!
Christian Brand
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 Messages: 1267 Registered: July 2009 Location: Walldorf, Germany |
Senior Member |
|
|
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
HTH,
Michael
"Kalle" schrieb im Newsbeitrag news:iug964$d4$1@news.eclipse.org...
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
businessObject.
Any suggestions?
I'm grateful for any new approach concerning Graphiti.
|
|
|
|
|
|
|
|
|
|
| Re: Create Pictogramm Element from Contextmenu [message #702435 is a reply to message #702409] |
Tue, 26 July 2011 06:52  |
Michael Wenz Messages: 1267 Registered: July 2009 Location: Walldorf, Germany |
Senior Member |
|
|
Sounds like a bug. Would you open a Bugzilla describing that?
Thanks,
Michael
"Phillipp" schrieb im Newsbeitrag news:j0m3v7$n2c$1@news.eclipse.org...
Ok, I tracked the problem down to a boxRelativeAnchor I added to the shape.
ChopboxAnchors work but both, BoxRelative and chobox don't.
It would be nice to have both but for now I can live with chopbox only ;)
|
|
|
Powered by
FUDForum. Page generated in 0.02143 seconds