Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Conflicted EditPolicies?
Conflicted EditPolicies? [message #659174] Fri, 11 March 2011 06:44
StefanK  is currently offline StefanK
Messages: 25
Registered: July 2009
Junior Member
Hi everyone,

i´ve got the following situation:
The user is able to create a figure "Alt" which can contain 0 to * "ConditionParts". The AltFigure has got a ToolbarLayoutPolicy, which automatically orders the conditionParts when they are added to the AltFigure.
Every ConditionPart has got the feature that it can contain several other figures, so i installed a XYLayoutEditPolicy in the ConditionPartEditPart. A person can also add elements that are already placed within the canvas to the ConditionPart. This functionality is provided due to the createAddCommand method within the XYLayoutEditPolicy.
The problem starts now: The user should be able to switch the position of the conditionParts within the Alt figure. So the AltEditPart installs the AbstractOrderListEditPolicy that handles the reordering.

Let´s say:
Alt
-ConditionPart1
-ConditionPart2
-ConditionPart3

The user wants to switch the position of ConditionPart2 with ConditionPart1, so he selects CP2 and moves it over the top of CP1. GEF thinks that i want to add something to ConditionPart1, which is not intended.

The reordering works just fine if i deactivate the Policy which allows you to add something to a conditionPart. How can i prevent GEF from trying to add ConditionPart2 to ConditionPart1?

Any help will be appreciated
Thank you very much
StefanK
Previous Topic:Text Editor debugging
Next Topic:palette
Goto Forum:
  


Current Time: Sat Aug 30 02:33:17 EDT 2014

Powered by FUDForum. Page generated in 0.02422 seconds