protected Command createSetOverrideCommand(SetCommand setCommand) { EStructuralFeature feature = setCommand.getFeature(); return feature instanceof EReference && ((EReference)feature).isContainment() && mappingRoot.isOutputObject(setCommand.getOwner()) ? new SetOverrideCommand(this, setCommand) : null; }
protected Command createSetOverrideCommand(SetCommand setCommand) { EStructuralFeature feature = setCommand.getFeature(); return feature instanceof EReference && ((EReference)feature).isContainment() && mappingRoot.isOutputObject(setCommand.getOwner()) ? new SetOverrideCommand(this, setCommand) : null; }
protected boolean analyzeForNonContainment(Command command) { if (command instanceof AddCommand) { return isNonContainment(((AddCommand)command).getFeature()); } else if (command instanceof SetCommand) { return isNonContainment(((SetCommand)command).getFeature()); } else if (command instanceof CommandWrapper) { return analyzeForNonContainment(((CommandWrapper)command).getCommand()); } else if (command instanceof CompoundCommand) { for (Command childCommand : ((CompoundCommand)command).getCommandList()) { if (analyzeForNonContainment(childCommand)) { return true; } } } return false; }