|
|
|
|
Re: many editpolicies with the same role for the same editpart [message #530359 is a reply to message #530310] |
Thu, 29 April 2010 13:47 |
Mariot Chauvin Messages: 174 Registered: July 2009 |
Senior Member |
|
|
Hi,
Comments below.
Marwane a écrit :
> Do you mean ComponentEditPolicy because I can't find an editpolicy with
> such name. this policy provide elementary mothods for managing commands.
> my simple idea for using many editpolicies with the same editpart:
> is to decide when to remove the current editpolicy (for example,
> according to the change of a model attribute )
> removeEditPolicy(EditPolicy.LAYOUT_ROLE)
> then install the new editpolicy.
Sorry this class is not in GEF. I have used it so many times, I forget it.
You could write your own CompoundEditPolicy quite easily, simply create a class which implements EditPolicy which wraps an edit policy list and
for each method iterate on your list, for instance :
public void activate() {
for (EditPolicy editPolicy : editPolicies) {
editPolicy.activate();
}
}
For the getCommand method, simply create a CompoundCommand, and add to it each command result.
Hope this help,
Regards,
Mariot
|
|
|
Powered by
FUDForum. Page generated in 0.03916 seconds