* @generated
*/
private Command getEditHelperCommand(IEditCommandRequest request,
Command editPolicyCommand) {
if (editPolicyCommand != null) {
ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand)
.getICommand() : new CommandProxy(editPolicyCommand);
request.setParameter(DispelBaseEditHelper.EDIT_POLICY_COMMAND,
command);
}
IElementType requestContextElementType = getContextElementType(request);
request.setParameter(DispelBaseEditHelper.CONTEXT_ELEMENT_TYPE,
requestContextElementType);
ICommand command = requestContextElementType.getEditCommand(request);
request.setParameter(DispelBaseEditHelper.EDIT_POLICY_COMMAND, null);
request.setParameter(DispelBaseEditHelper.CONTEXT_ELEMENT_TYPE, null);
if (command != null) {
if (!(command instanceof CompositeTransactionalCommand)) {
command = new CompositeTransactionalCommand(getEditingDomain(),
command.getLabel()).compose(command);
}
return new ICommandProxy(command);
}
return editPolicyCommand;
}