| /** |
| * Copyright (c) 2008-2014 EclipseSource Muenchen GmbH and others. |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| */ |
| package org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl; |
| |
| import java.util.Collection; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.common.util.EList; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EPackage; |
| import org.eclipse.emf.ecore.EStructuralFeature; |
| import org.eclipse.emf.ecore.InternalEObject; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
| import org.eclipse.emf.emfstore.internal.common.api.AbstractAPIDeletegateImpl; |
| import org.eclipse.emf.emfstore.internal.fuzzy.emf.api.ESMutatorConfigImpl; |
| import org.eclipse.emf.emfstore.internal.fuzzy.emf.config.ConfigPackage; |
| import org.eclipse.emf.emfstore.internal.fuzzy.emf.config.MutatorConfig; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Mutator Config</b></em>'. |
| * |
| * @extends AbstractAPIDeletegateImpl<ESMutatorConfigImpl, MutatorConfig> |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#getRootEClass |
| * <em>Root EClass</em>}</li> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#getMinObjectsCount |
| * <em>Min Objects Count</em>}</li> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#isIgnoreAndLog |
| * <em>Ignore And Log</em>}</li> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#isDoNotGenerateRoot |
| * <em>Do Not Generate Root</em>}</li> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#isUseEcoreUtilDelete |
| * <em>Use Ecore Util Delete</em>}</li> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#getEClassesToIgnore |
| * <em>EClasses To Ignore</em>}</li> |
| * <li> |
| * {@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#getEStructuralFeaturesToIgnore |
| * <em>EStructural Features To Ignore</em>}</li> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#getEPackages |
| * <em>EPackages</em>} |
| * </li> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#getMaxDeleteCount |
| * <em>Max Delete Count</em>}</li> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#getMutationCount |
| * <em>Mutation Count</em>}</li> |
| * <li>{@link org.eclipse.emf.emfstore.internal.fuzzy.emf.config.impl.MutatorConfigImpl#isAllowDuplicateIDs |
| * <em>Allow Duplicate IDs</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class MutatorConfigImpl extends AbstractAPIDeletegateImpl<ESMutatorConfigImpl, MutatorConfig> implements |
| MutatorConfig { |
| |
| /** |
| * The cached value of the '{@link #getRootEClass() <em>Root EClass</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getRootEClass() |
| * @generated |
| * @ordered |
| */ |
| protected EClass rootEClass; |
| |
| /** |
| * The default value of the '{@link #getMinObjectsCount() <em>Min Objects Count</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getMinObjectsCount() |
| * @generated |
| * @ordered |
| */ |
| protected static final int MIN_OBJECTS_COUNT_EDEFAULT = 100; |
| |
| /** |
| * The cached value of the '{@link #getMinObjectsCount() <em>Min Objects Count</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getMinObjectsCount() |
| * @generated |
| * @ordered |
| */ |
| protected int minObjectsCount = MIN_OBJECTS_COUNT_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isIgnoreAndLog() <em>Ignore And Log</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #isIgnoreAndLog() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IGNORE_AND_LOG_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isIgnoreAndLog() <em>Ignore And Log</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #isIgnoreAndLog() |
| * @generated |
| * @ordered |
| */ |
| protected boolean ignoreAndLog = IGNORE_AND_LOG_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isDoNotGenerateRoot() <em>Do Not Generate Root</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #isDoNotGenerateRoot() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean DO_NOT_GENERATE_ROOT_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isDoNotGenerateRoot() <em>Do Not Generate Root</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #isDoNotGenerateRoot() |
| * @generated |
| * @ordered |
| */ |
| protected boolean doNotGenerateRoot = DO_NOT_GENERATE_ROOT_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isUseEcoreUtilDelete() <em>Use Ecore Util Delete</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #isUseEcoreUtilDelete() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean USE_ECORE_UTIL_DELETE_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isUseEcoreUtilDelete() <em>Use Ecore Util Delete</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #isUseEcoreUtilDelete() |
| * @generated |
| * @ordered |
| */ |
| protected boolean useEcoreUtilDelete = USE_ECORE_UTIL_DELETE_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getEClassesToIgnore() <em>EClasses To Ignore</em>}' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getEClassesToIgnore() |
| * @generated |
| * @ordered |
| */ |
| protected EList<EClass> eClassesToIgnore; |
| |
| /** |
| * The cached value of the '{@link #getEStructuralFeaturesToIgnore() <em>EStructural Features To Ignore</em>}' |
| * reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getEStructuralFeaturesToIgnore() |
| * @generated |
| * @ordered |
| */ |
| protected EList<EStructuralFeature> eStructuralFeaturesToIgnore; |
| |
| /** |
| * The cached value of the '{@link #getEPackages() <em>EPackages</em>}' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getEPackages() |
| * @generated |
| * @ordered |
| */ |
| protected EList<EPackage> ePackages; |
| |
| /** |
| * The default value of the '{@link #getMaxDeleteCount() <em>Max Delete Count</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getMaxDeleteCount() |
| * @generated |
| * @ordered |
| */ |
| protected static final Integer MAX_DELETE_COUNT_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getMaxDeleteCount() <em>Max Delete Count</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getMaxDeleteCount() |
| * @generated |
| * @ordered |
| */ |
| protected Integer maxDeleteCount = MAX_DELETE_COUNT_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getMutationCount() <em>Mutation Count</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getMutationCount() |
| * @generated |
| * @ordered |
| */ |
| protected static final int MUTATION_COUNT_EDEFAULT = -1; |
| |
| /** |
| * The cached value of the '{@link #getMutationCount() <em>Mutation Count</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #getMutationCount() |
| * @generated |
| * @ordered |
| */ |
| protected int mutationCount = MUTATION_COUNT_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #isAllowDuplicateIDs() <em>Allow Duplicate IDs</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #isAllowDuplicateIDs() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean ALLOW_DUPLICATE_IDS_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isAllowDuplicateIDs() <em>Allow Duplicate IDs</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @see #isAllowDuplicateIDs() |
| * @generated |
| * @ordered |
| */ |
| protected boolean allowDuplicateIDs = ALLOW_DUPLICATE_IDS_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| protected MutatorConfigImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return ConfigPackage.Literals.MUTATOR_CONFIG; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public EClass getRootEClass() { |
| if (rootEClass != null && rootEClass.eIsProxy()) { |
| final InternalEObject oldRootEClass = (InternalEObject) rootEClass; |
| rootEClass = (EClass) eResolveProxy(oldRootEClass); |
| if (rootEClass != oldRootEClass) { |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigPackage.MUTATOR_CONFIG__ROOT_ECLASS, |
| oldRootEClass, rootEClass)); |
| } |
| } |
| } |
| return rootEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public EClass basicGetRootEClass() { |
| return rootEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setRootEClass(EClass newRootEClass) { |
| final EClass oldRootEClass = rootEClass; |
| rootEClass = newRootEClass; |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.MUTATOR_CONFIG__ROOT_ECLASS, |
| oldRootEClass, rootEClass)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public int getMinObjectsCount() { |
| return minObjectsCount; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setMinObjectsCount(int newMinObjectsCount) { |
| final int oldMinObjectsCount = minObjectsCount; |
| minObjectsCount = newMinObjectsCount; |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.MUTATOR_CONFIG__MIN_OBJECTS_COUNT, |
| oldMinObjectsCount, minObjectsCount)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public boolean isIgnoreAndLog() { |
| return ignoreAndLog; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setIgnoreAndLog(boolean newIgnoreAndLog) { |
| final boolean oldIgnoreAndLog = ignoreAndLog; |
| ignoreAndLog = newIgnoreAndLog; |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.MUTATOR_CONFIG__IGNORE_AND_LOG, |
| oldIgnoreAndLog, ignoreAndLog)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public boolean isDoNotGenerateRoot() { |
| return doNotGenerateRoot; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setDoNotGenerateRoot(boolean newDoNotGenerateRoot) { |
| final boolean oldDoNotGenerateRoot = doNotGenerateRoot; |
| doNotGenerateRoot = newDoNotGenerateRoot; |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.MUTATOR_CONFIG__DO_NOT_GENERATE_ROOT, |
| oldDoNotGenerateRoot, doNotGenerateRoot)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public boolean isUseEcoreUtilDelete() { |
| return useEcoreUtilDelete; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setUseEcoreUtilDelete(boolean newUseEcoreUtilDelete) { |
| final boolean oldUseEcoreUtilDelete = useEcoreUtilDelete; |
| useEcoreUtilDelete = newUseEcoreUtilDelete; |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.MUTATOR_CONFIG__USE_ECORE_UTIL_DELETE, |
| oldUseEcoreUtilDelete, useEcoreUtilDelete)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public EList<EClass> getEClassesToIgnore() { |
| if (eClassesToIgnore == null) { |
| eClassesToIgnore = new EObjectResolvingEList<EClass>(EClass.class, this, |
| ConfigPackage.MUTATOR_CONFIG__ECLASSES_TO_IGNORE); |
| } |
| return eClassesToIgnore; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public EList<EStructuralFeature> getEStructuralFeaturesToIgnore() { |
| if (eStructuralFeaturesToIgnore == null) { |
| eStructuralFeaturesToIgnore = new EObjectResolvingEList<EStructuralFeature>(EStructuralFeature.class, this, |
| ConfigPackage.MUTATOR_CONFIG__ESTRUCTURAL_FEATURES_TO_IGNORE); |
| } |
| return eStructuralFeaturesToIgnore; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public EList<EPackage> getEPackages() { |
| if (ePackages == null) { |
| ePackages = new EObjectResolvingEList<EPackage>(EPackage.class, this, |
| ConfigPackage.MUTATOR_CONFIG__EPACKAGES); |
| } |
| return ePackages; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public Integer getMaxDeleteCount() { |
| return maxDeleteCount; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setMaxDeleteCount(Integer newMaxDeleteCount) { |
| final Integer oldMaxDeleteCount = maxDeleteCount; |
| maxDeleteCount = newMaxDeleteCount; |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.MUTATOR_CONFIG__MAX_DELETE_COUNT, |
| oldMaxDeleteCount, maxDeleteCount)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public int getMutationCount() { |
| return mutationCount; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setMutationCount(int newMutationCount) { |
| final int oldMutationCount = mutationCount; |
| mutationCount = newMutationCount; |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.MUTATOR_CONFIG__MUTATION_COUNT, |
| oldMutationCount, mutationCount)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public boolean isAllowDuplicateIDs() { |
| return allowDuplicateIDs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setAllowDuplicateIDs(boolean newAllowDuplicateIDs) { |
| final boolean oldAllowDuplicateIDs = allowDuplicateIDs; |
| allowDuplicateIDs = newAllowDuplicateIDs; |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.MUTATOR_CONFIG__ALLOW_DUPLICATE_IDS, |
| oldAllowDuplicateIDs, allowDuplicateIDs)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case ConfigPackage.MUTATOR_CONFIG__ROOT_ECLASS: |
| if (resolve) { |
| return getRootEClass(); |
| } |
| return basicGetRootEClass(); |
| case ConfigPackage.MUTATOR_CONFIG__MIN_OBJECTS_COUNT: |
| return getMinObjectsCount(); |
| case ConfigPackage.MUTATOR_CONFIG__IGNORE_AND_LOG: |
| return isIgnoreAndLog(); |
| case ConfigPackage.MUTATOR_CONFIG__DO_NOT_GENERATE_ROOT: |
| return isDoNotGenerateRoot(); |
| case ConfigPackage.MUTATOR_CONFIG__USE_ECORE_UTIL_DELETE: |
| return isUseEcoreUtilDelete(); |
| case ConfigPackage.MUTATOR_CONFIG__ECLASSES_TO_IGNORE: |
| return getEClassesToIgnore(); |
| case ConfigPackage.MUTATOR_CONFIG__ESTRUCTURAL_FEATURES_TO_IGNORE: |
| return getEStructuralFeaturesToIgnore(); |
| case ConfigPackage.MUTATOR_CONFIG__EPACKAGES: |
| return getEPackages(); |
| case ConfigPackage.MUTATOR_CONFIG__MAX_DELETE_COUNT: |
| return getMaxDeleteCount(); |
| case ConfigPackage.MUTATOR_CONFIG__MUTATION_COUNT: |
| return getMutationCount(); |
| case ConfigPackage.MUTATOR_CONFIG__ALLOW_DUPLICATE_IDS: |
| return isAllowDuplicateIDs(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case ConfigPackage.MUTATOR_CONFIG__ROOT_ECLASS: |
| setRootEClass((EClass) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__MIN_OBJECTS_COUNT: |
| setMinObjectsCount((Integer) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__IGNORE_AND_LOG: |
| setIgnoreAndLog((Boolean) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__DO_NOT_GENERATE_ROOT: |
| setDoNotGenerateRoot((Boolean) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__USE_ECORE_UTIL_DELETE: |
| setUseEcoreUtilDelete((Boolean) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__ECLASSES_TO_IGNORE: |
| getEClassesToIgnore().clear(); |
| getEClassesToIgnore().addAll((Collection<? extends EClass>) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__ESTRUCTURAL_FEATURES_TO_IGNORE: |
| getEStructuralFeaturesToIgnore().clear(); |
| getEStructuralFeaturesToIgnore().addAll((Collection<? extends EStructuralFeature>) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__EPACKAGES: |
| getEPackages().clear(); |
| getEPackages().addAll((Collection<? extends EPackage>) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__MAX_DELETE_COUNT: |
| setMaxDeleteCount((Integer) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__MUTATION_COUNT: |
| setMutationCount((Integer) newValue); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__ALLOW_DUPLICATE_IDS: |
| setAllowDuplicateIDs((Boolean) newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case ConfigPackage.MUTATOR_CONFIG__ROOT_ECLASS: |
| setRootEClass((EClass) null); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__MIN_OBJECTS_COUNT: |
| setMinObjectsCount(MIN_OBJECTS_COUNT_EDEFAULT); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__IGNORE_AND_LOG: |
| setIgnoreAndLog(IGNORE_AND_LOG_EDEFAULT); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__DO_NOT_GENERATE_ROOT: |
| setDoNotGenerateRoot(DO_NOT_GENERATE_ROOT_EDEFAULT); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__USE_ECORE_UTIL_DELETE: |
| setUseEcoreUtilDelete(USE_ECORE_UTIL_DELETE_EDEFAULT); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__ECLASSES_TO_IGNORE: |
| getEClassesToIgnore().clear(); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__ESTRUCTURAL_FEATURES_TO_IGNORE: |
| getEStructuralFeaturesToIgnore().clear(); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__EPACKAGES: |
| getEPackages().clear(); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__MAX_DELETE_COUNT: |
| setMaxDeleteCount(MAX_DELETE_COUNT_EDEFAULT); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__MUTATION_COUNT: |
| setMutationCount(MUTATION_COUNT_EDEFAULT); |
| return; |
| case ConfigPackage.MUTATOR_CONFIG__ALLOW_DUPLICATE_IDS: |
| setAllowDuplicateIDs(ALLOW_DUPLICATE_IDS_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case ConfigPackage.MUTATOR_CONFIG__ROOT_ECLASS: |
| return rootEClass != null; |
| case ConfigPackage.MUTATOR_CONFIG__MIN_OBJECTS_COUNT: |
| return minObjectsCount != MIN_OBJECTS_COUNT_EDEFAULT; |
| case ConfigPackage.MUTATOR_CONFIG__IGNORE_AND_LOG: |
| return ignoreAndLog != IGNORE_AND_LOG_EDEFAULT; |
| case ConfigPackage.MUTATOR_CONFIG__DO_NOT_GENERATE_ROOT: |
| return doNotGenerateRoot != DO_NOT_GENERATE_ROOT_EDEFAULT; |
| case ConfigPackage.MUTATOR_CONFIG__USE_ECORE_UTIL_DELETE: |
| return useEcoreUtilDelete != USE_ECORE_UTIL_DELETE_EDEFAULT; |
| case ConfigPackage.MUTATOR_CONFIG__ECLASSES_TO_IGNORE: |
| return eClassesToIgnore != null && !eClassesToIgnore.isEmpty(); |
| case ConfigPackage.MUTATOR_CONFIG__ESTRUCTURAL_FEATURES_TO_IGNORE: |
| return eStructuralFeaturesToIgnore != null && !eStructuralFeaturesToIgnore.isEmpty(); |
| case ConfigPackage.MUTATOR_CONFIG__EPACKAGES: |
| return ePackages != null && !ePackages.isEmpty(); |
| case ConfigPackage.MUTATOR_CONFIG__MAX_DELETE_COUNT: |
| return MAX_DELETE_COUNT_EDEFAULT == null ? maxDeleteCount != null |
| : !MAX_DELETE_COUNT_EDEFAULT.equals(maxDeleteCount); |
| case ConfigPackage.MUTATOR_CONFIG__MUTATION_COUNT: |
| return mutationCount != MUTATION_COUNT_EDEFAULT; |
| case ConfigPackage.MUTATOR_CONFIG__ALLOW_DUPLICATE_IDS: |
| return allowDuplicateIDs != ALLOW_DUPLICATE_IDS_EDEFAULT; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) { |
| return super.toString(); |
| } |
| |
| final StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (minObjectsCount: "); //$NON-NLS-1$ |
| result.append(minObjectsCount); |
| result.append(", ignoreAndLog: "); //$NON-NLS-1$ |
| result.append(ignoreAndLog); |
| result.append(", doNotGenerateRoot: "); //$NON-NLS-1$ |
| result.append(doNotGenerateRoot); |
| result.append(", useEcoreUtilDelete: "); //$NON-NLS-1$ |
| result.append(useEcoreUtilDelete); |
| result.append(", maxDeleteCount: "); //$NON-NLS-1$ |
| result.append(maxDeleteCount); |
| result.append(", mutationCount: "); //$NON-NLS-1$ |
| result.append(mutationCount); |
| result.append(", allowDuplicateIDs: "); //$NON-NLS-1$ |
| result.append(allowDuplicateIDs); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.emf.emfstore.internal.common.api.APIDelegate#createAPI() |
| * |
| * @generated NOT |
| */ |
| @Override |
| public ESMutatorConfigImpl createAPI() { |
| return new ESMutatorConfigImpl(this); |
| } |
| |
| } // MutatorConfigImpl |