2 * Copyright (c) 2012, 2015 Obeo.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Obeo - initial API and implementation
11 package org
.eclipse
.emf
.compare
.impl
;
13 import java
.util
.Collection
;
15 import org
.eclipse
.emf
.common
.notify
.Notification
;
16 import org
.eclipse
.emf
.common
.notify
.NotificationChain
;
17 import org
.eclipse
.emf
.common
.util
.EList
;
18 import org
.eclipse
.emf
.compare
.ComparePackage
;
19 import org
.eclipse
.emf
.compare
.Conflict
;
20 import org
.eclipse
.emf
.compare
.Diff
;
21 import org
.eclipse
.emf
.compare
.DifferenceKind
;
22 import org
.eclipse
.emf
.compare
.DifferenceSource
;
23 import org
.eclipse
.emf
.compare
.DifferenceState
;
24 import org
.eclipse
.emf
.compare
.Equivalence
;
25 import org
.eclipse
.emf
.compare
.Match
;
26 import org
.eclipse
.emf
.ecore
.EClass
;
27 import org
.eclipse
.emf
.ecore
.InternalEObject
;
28 import org
.eclipse
.emf
.ecore
.impl
.ENotificationImpl
;
29 import org
.eclipse
.emf
.ecore
.impl
.MinimalEObjectImpl
;
30 import org
.eclipse
.emf
.ecore
.util
.EObjectWithInverseResolvingEList
;
31 import org
.eclipse
.emf
.ecore
.util
.EcoreUtil
;
32 import org
.eclipse
.emf
.ecore
.util
.InternalEList
;
35 * <!-- begin-user-doc --> An implementation of the model object '<em><b>Diff</b></em>'. <!-- end-user-doc -->
37 * The following features are implemented:
39 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getMatch <em>Match</em>}</li>
40 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getRequires <em>Requires</em>}</li>
41 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getRequiredBy <em>Required By</em>}</li>
42 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getImplies <em>Implies</em>}</li>
43 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getImpliedBy <em>Implied By</em>}</li>
44 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getRefines <em>Refines</em>}</li>
45 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getRefinedBy <em>Refined By</em>}</li>
46 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getPrimeRefining <em>Prime Refining</em>}</li>
47 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getKind <em>Kind</em>}</li>
48 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getSource <em>Source</em>}</li>
49 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getState <em>State</em>}</li>
50 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getEquivalence <em>Equivalence</em>}</li>
51 * <li>{@link org.eclipse.emf.compare.impl.DiffImpl#getConflict <em>Conflict</em>}</li>
57 // Supressing warnings : generated code
58 @SuppressWarnings("all")
59 public class DiffImpl
extends MinimalEObjectImpl
implements Diff
{
61 * <!-- begin-user-doc --> <!-- end-user-doc -->
64 public static final String copyright
= "Copyright (c) 2012 Obeo.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Obeo - initial API and implementation"; //$NON-NLS-1$
67 * The cached value of the '{@link #getRequires() <em>Requires</em>}' reference list.
69 * --> <!-- end-user-doc -->
74 protected EList
<Diff
> requires
;
77 * The cached value of the '{@link #getRequiredBy() <em>Required By</em>}' reference list. <!--
78 * begin-user-doc --> <!-- end-user-doc -->
80 * @see #getRequiredBy()
84 protected EList
<Diff
> requiredBy
;
87 * The cached value of the '{@link #getImplies() <em>Implies</em>}' reference list.
89 * --> <!-- end-user-doc -->
94 protected EList
<Diff
> implies
;
97 * The cached value of the '{@link #getImpliedBy() <em>Implied By</em>}' reference list. <!--
98 * begin-user-doc --> <!-- end-user-doc -->
100 * @see #getImpliedBy()
105 protected EList
<Diff
> impliedBy
;
108 * The cached value of the '{@link #getRefines() <em>Refines</em>}' reference list.
109 * <!-- begin-user-doc
110 * --> <!-- end-user-doc -->
115 protected EList
<Diff
> refines
;
118 * The cached value of the '{@link #getRefinedBy() <em>Refined By</em>}' reference list. <!--
119 * begin-user-doc --> <!-- end-user-doc -->
121 * @see #getRefinedBy()
125 protected EList
<Diff
> refinedBy
;
128 * The cached value of the '{@link #getPrimeRefining() <em>Prime Refining</em>}' reference. <!--
129 * begin-user-doc --> <!-- end-user-doc -->
131 * @see #getPrimeRefining()
136 protected Diff primeRefining
;
139 * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
140 * <!-- begin-user-doc --> <!--
146 protected static final DifferenceKind KIND_EDEFAULT
= DifferenceKind
.ADD
;
149 * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
150 * <!-- begin-user-doc --> <!--
156 protected DifferenceKind kind
= KIND_EDEFAULT
;
159 * The default value of the '{@link #getSource() <em>Source</em>}' attribute.
160 * <!-- begin-user-doc --> <!--
166 protected static final DifferenceSource SOURCE_EDEFAULT
= DifferenceSource
.LEFT
;
169 * The cached value of the '{@link #getSource() <em>Source</em>}' attribute.
170 * <!-- begin-user-doc --> <!--
176 protected DifferenceSource source
= SOURCE_EDEFAULT
;
179 * The default value of the '{@link #getState() <em>State</em>}' attribute.
180 * <!-- begin-user-doc --> <!--
186 protected static final DifferenceState STATE_EDEFAULT
= DifferenceState
.UNRESOLVED
;
189 * The cached value of the '{@link #getState() <em>State</em>}' attribute.
190 * <!-- begin-user-doc --> <!--
196 protected DifferenceState state
= STATE_EDEFAULT
;
199 * The cached value of the '{@link #getEquivalence() <em>Equivalence</em>}' reference.
200 * <!-- begin-user-doc
201 * --> <!-- end-user-doc -->
202 * @see #getEquivalence()
206 protected Equivalence equivalence
;
209 * The cached value of the '{@link #getConflict() <em>Conflict</em>}' reference.
210 * <!-- begin-user-doc -->
211 * <!-- end-user-doc -->
212 * @see #getConflict()
216 protected Conflict conflict
;
219 * <!-- begin-user-doc --> <!-- end-user-doc -->
222 protected DiffImpl() {
227 * <!-- begin-user-doc --> <!-- end-user-doc -->
231 protected EClass
eStaticClass() {
232 return ComparePackage
.Literals
.DIFF
;
236 * <!-- begin-user-doc --> <!-- end-user-doc -->
239 public Match
getMatch() {
240 Match match
= basicGetMatch();
241 return match
!= null && match
.eIsProxy() ?
(Match
)eResolveProxy((InternalEObject
)match
) : match
;
245 * <!-- begin-user-doc -->
246 * <!-- end-user-doc -->
250 public Match
basicGetMatch() {
251 // TODO: implement this method to return the 'Match' reference
252 // -> do not perform proxy resolution
253 // Ensure that you remove @generated or mark it @generated NOT
254 throw new UnsupportedOperationException();
258 * <!-- begin-user-doc -->
259 * <!-- end-user-doc -->
262 public void setMatch(Match newMatch
) {
263 // TODO: implement this method to set the 'Match' reference
264 // Ensure that you remove @generated or mark it @generated NOT
265 throw new UnsupportedOperationException();
269 * <!-- begin-user-doc --> <!-- end-user-doc -->
272 public EList
<Diff
> getRequires() {
273 if (requires
== null) {
274 requires
= new EObjectWithInverseResolvingEList
.ManyInverse
<Diff
>(Diff
.class, this,
275 ComparePackage
.DIFF__REQUIRES
, ComparePackage
.DIFF__REQUIRED_BY
);
281 * <!-- begin-user-doc --> <!-- end-user-doc -->
284 public EList
<Diff
> getRequiredBy() {
285 if (requiredBy
== null) {
286 requiredBy
= new EObjectWithInverseResolvingEList
.ManyInverse
<Diff
>(Diff
.class, this,
287 ComparePackage
.DIFF__REQUIRED_BY
, ComparePackage
.DIFF__REQUIRES
);
293 * <!-- begin-user-doc --> <!-- end-user-doc -->
296 public EList
<Diff
> getImplies() {
297 if (implies
== null) {
298 implies
= new EObjectWithInverseResolvingEList
.ManyInverse
<Diff
>(Diff
.class, this,
299 ComparePackage
.DIFF__IMPLIES
, ComparePackage
.DIFF__IMPLIED_BY
);
305 * <!-- begin-user-doc --> <!-- end-user-doc -->
308 public EList
<Diff
> getImpliedBy() {
309 if (impliedBy
== null) {
310 impliedBy
= new EObjectWithInverseResolvingEList
.ManyInverse
<Diff
>(Diff
.class, this,
311 ComparePackage
.DIFF__IMPLIED_BY
, ComparePackage
.DIFF__IMPLIES
);
317 * <!-- begin-user-doc --> <!-- end-user-doc -->
320 public EList
<Diff
> getRefines() {
321 if (refines
== null) {
322 refines
= new EObjectWithInverseResolvingEList
.ManyInverse
<Diff
>(Diff
.class, this,
323 ComparePackage
.DIFF__REFINES
, ComparePackage
.DIFF__REFINED_BY
);
329 * <!-- begin-user-doc --> <!-- end-user-doc -->
332 public EList
<Diff
> getRefinedBy() {
333 if (refinedBy
== null) {
334 refinedBy
= new EObjectWithInverseResolvingEList
.ManyInverse
<Diff
>(Diff
.class, this,
335 ComparePackage
.DIFF__REFINED_BY
, ComparePackage
.DIFF__REFINES
);
341 * <!-- begin-user-doc --> <!-- end-user-doc -->
344 public Diff
getPrimeRefining() {
345 if (primeRefining
!= null && primeRefining
.eIsProxy()) {
346 InternalEObject oldPrimeRefining
= (InternalEObject
)primeRefining
;
347 primeRefining
= (Diff
)eResolveProxy(oldPrimeRefining
);
348 if (primeRefining
!= oldPrimeRefining
) {
349 if (eNotificationRequired())
350 eNotify(new ENotificationImpl(this, Notification
.RESOLVE
,
351 ComparePackage
.DIFF__PRIME_REFINING
, oldPrimeRefining
, primeRefining
));
354 return primeRefining
;
358 * <!-- begin-user-doc --> <!-- end-user-doc -->
361 public Diff
basicGetPrimeRefining() {
362 return primeRefining
;
366 * <!-- begin-user-doc --> <!-- end-user-doc -->
369 public DifferenceKind
getKind() {
374 * <!-- begin-user-doc --> <!-- end-user-doc -->
377 public void setKind(DifferenceKind newKind
) {
378 DifferenceKind oldKind
= kind
;
379 kind
= newKind
== null ? KIND_EDEFAULT
: newKind
;
380 if (eNotificationRequired())
381 eNotify(new ENotificationImpl(this, Notification
.SET
, ComparePackage
.DIFF__KIND
, oldKind
, kind
));
385 * <!-- begin-user-doc --> <!-- end-user-doc -->
388 public Conflict
getConflict() {
389 if (conflict
!= null && conflict
.eIsProxy()) {
390 InternalEObject oldConflict
= (InternalEObject
)conflict
;
391 conflict
= (Conflict
)eResolveProxy(oldConflict
);
392 if (conflict
!= oldConflict
) {
393 if (eNotificationRequired())
394 eNotify(new ENotificationImpl(this, Notification
.RESOLVE
, ComparePackage
.DIFF__CONFLICT
,
395 oldConflict
, conflict
));
402 * <!-- begin-user-doc --> <!-- end-user-doc -->
405 public Conflict
basicGetConflict() {
410 * <!-- begin-user-doc --> <!-- end-user-doc -->
413 public NotificationChain
basicSetConflict(Conflict newConflict
, NotificationChain msgs
) {
414 Conflict oldConflict
= conflict
;
415 conflict
= newConflict
;
416 if (eNotificationRequired()) {
417 ENotificationImpl notification
= new ENotificationImpl(this, Notification
.SET
,
418 ComparePackage
.DIFF__CONFLICT
, oldConflict
, newConflict
);
422 msgs
.add(notification
);
428 * <!-- begin-user-doc --> <!-- end-user-doc -->
431 public void setConflict(Conflict newConflict
) {
432 if (newConflict
!= conflict
) {
433 NotificationChain msgs
= null;
434 if (conflict
!= null)
435 msgs
= ((InternalEObject
)conflict
).eInverseRemove(this, ComparePackage
.CONFLICT__DIFFERENCES
,
436 Conflict
.class, msgs
);
437 if (newConflict
!= null)
438 msgs
= ((InternalEObject
)newConflict
).eInverseAdd(this, ComparePackage
.CONFLICT__DIFFERENCES
,
439 Conflict
.class, msgs
);
440 msgs
= basicSetConflict(newConflict
, msgs
);
443 } else if (eNotificationRequired())
444 eNotify(new ENotificationImpl(this, Notification
.SET
, ComparePackage
.DIFF__CONFLICT
, newConflict
,
449 * <!-- begin-user-doc --> <!-- end-user-doc -->
452 public DifferenceSource
getSource() {
457 * <!-- begin-user-doc --> <!-- end-user-doc -->
460 public void setSource(DifferenceSource newSource
) {
461 DifferenceSource oldSource
= source
;
462 source
= newSource
== null ? SOURCE_EDEFAULT
: newSource
;
463 if (eNotificationRequired())
464 eNotify(new ENotificationImpl(this, Notification
.SET
, ComparePackage
.DIFF__SOURCE
, oldSource
,
469 * <!-- begin-user-doc --> <!-- end-user-doc -->
472 public DifferenceState
getState() {
477 * <!-- begin-user-doc --> <!-- end-user-doc -->
480 public void setState(DifferenceState newState
) {
481 DifferenceState oldState
= state
;
482 state
= newState
== null ? STATE_EDEFAULT
: newState
;
483 if (eNotificationRequired())
484 eNotify(new ENotificationImpl(this, Notification
.SET
, ComparePackage
.DIFF__STATE
, oldState
, state
));
488 * <!-- begin-user-doc --> <!-- end-user-doc -->
491 public Equivalence
getEquivalence() {
492 if (equivalence
!= null && equivalence
.eIsProxy()) {
493 InternalEObject oldEquivalence
= (InternalEObject
)equivalence
;
494 equivalence
= (Equivalence
)eResolveProxy(oldEquivalence
);
495 if (equivalence
!= oldEquivalence
) {
496 if (eNotificationRequired())
497 eNotify(new ENotificationImpl(this, Notification
.RESOLVE
,
498 ComparePackage
.DIFF__EQUIVALENCE
, oldEquivalence
, equivalence
));
505 * <!-- begin-user-doc --> <!-- end-user-doc -->
508 public Equivalence
basicGetEquivalence() {
513 * <!-- begin-user-doc --> <!-- end-user-doc -->
516 public NotificationChain
basicSetEquivalence(Equivalence newEquivalence
, NotificationChain msgs
) {
517 Equivalence oldEquivalence
= equivalence
;
518 equivalence
= newEquivalence
;
519 if (eNotificationRequired()) {
520 ENotificationImpl notification
= new ENotificationImpl(this, Notification
.SET
,
521 ComparePackage
.DIFF__EQUIVALENCE
, oldEquivalence
, newEquivalence
);
525 msgs
.add(notification
);
531 * <!-- begin-user-doc --> <!-- end-user-doc -->
534 public void setEquivalence(Equivalence newEquivalence
) {
535 if (newEquivalence
!= equivalence
) {
536 NotificationChain msgs
= null;
537 if (equivalence
!= null)
538 msgs
= ((InternalEObject
)equivalence
).eInverseRemove(this,
539 ComparePackage
.EQUIVALENCE__DIFFERENCES
, Equivalence
.class, msgs
);
540 if (newEquivalence
!= null)
541 msgs
= ((InternalEObject
)newEquivalence
).eInverseAdd(this,
542 ComparePackage
.EQUIVALENCE__DIFFERENCES
, Equivalence
.class, msgs
);
543 msgs
= basicSetEquivalence(newEquivalence
, msgs
);
546 } else if (eNotificationRequired())
547 eNotify(new ENotificationImpl(this, Notification
.SET
, ComparePackage
.DIFF__EQUIVALENCE
,
548 newEquivalence
, newEquivalence
));
552 * <!-- begin-user-doc --> <!-- end-user-doc -->
555 public void copyRightToLeft() {
556 // TODO: implement this method
557 // Ensure that you remove @generated or mark it @generated NOT
558 throw new UnsupportedOperationException();
562 * <!-- begin-user-doc --> <!-- end-user-doc -->
565 public void copyLeftToRight() {
566 // TODO: implement this method
567 // Ensure that you remove @generated or mark it @generated NOT
568 throw new UnsupportedOperationException();
572 * <!-- begin-user-doc --> <!-- end-user-doc -->
575 public void discard() {
576 // TODO: implement this method
577 // Ensure that you remove @generated or mark it @generated NOT
578 throw new UnsupportedOperationException();
582 * <!-- begin-user-doc --> <!-- end-user-doc -->
585 @SuppressWarnings("unchecked")
587 public NotificationChain
eInverseAdd(InternalEObject otherEnd
, int featureID
, NotificationChain msgs
) {
589 case ComparePackage
.DIFF__REQUIRES
:
590 return ((InternalEList
<InternalEObject
>)(InternalEList
<?
>)getRequires()).basicAdd(otherEnd
,
592 case ComparePackage
.DIFF__REQUIRED_BY
:
593 return ((InternalEList
<InternalEObject
>)(InternalEList
<?
>)getRequiredBy()).basicAdd(otherEnd
,
595 case ComparePackage
.DIFF__IMPLIES
:
596 return ((InternalEList
<InternalEObject
>)(InternalEList
<?
>)getImplies()).basicAdd(otherEnd
,
598 case ComparePackage
.DIFF__IMPLIED_BY
:
599 return ((InternalEList
<InternalEObject
>)(InternalEList
<?
>)getImpliedBy()).basicAdd(otherEnd
,
601 case ComparePackage
.DIFF__REFINES
:
602 return ((InternalEList
<InternalEObject
>)(InternalEList
<?
>)getRefines()).basicAdd(otherEnd
,
604 case ComparePackage
.DIFF__REFINED_BY
:
605 return ((InternalEList
<InternalEObject
>)(InternalEList
<?
>)getRefinedBy()).basicAdd(otherEnd
,
607 case ComparePackage
.DIFF__EQUIVALENCE
:
608 if (equivalence
!= null)
609 msgs
= ((InternalEObject
)equivalence
).eInverseRemove(this,
610 ComparePackage
.EQUIVALENCE__DIFFERENCES
, Equivalence
.class, msgs
);
611 return basicSetEquivalence((Equivalence
)otherEnd
, msgs
);
612 case ComparePackage
.DIFF__CONFLICT
:
613 if (conflict
!= null)
614 msgs
= ((InternalEObject
)conflict
).eInverseRemove(this,
615 ComparePackage
.CONFLICT__DIFFERENCES
, Conflict
.class, msgs
);
616 return basicSetConflict((Conflict
)otherEnd
, msgs
);
618 return super.eInverseAdd(otherEnd
, featureID
, msgs
);
622 * <!-- begin-user-doc --> <!-- end-user-doc -->
626 public NotificationChain
eInverseRemove(InternalEObject otherEnd
, int featureID
, NotificationChain msgs
) {
628 case ComparePackage
.DIFF__REQUIRES
:
629 return ((InternalEList
<?
>)getRequires()).basicRemove(otherEnd
, msgs
);
630 case ComparePackage
.DIFF__REQUIRED_BY
:
631 return ((InternalEList
<?
>)getRequiredBy()).basicRemove(otherEnd
, msgs
);
632 case ComparePackage
.DIFF__IMPLIES
:
633 return ((InternalEList
<?
>)getImplies()).basicRemove(otherEnd
, msgs
);
634 case ComparePackage
.DIFF__IMPLIED_BY
:
635 return ((InternalEList
<?
>)getImpliedBy()).basicRemove(otherEnd
, msgs
);
636 case ComparePackage
.DIFF__REFINES
:
637 return ((InternalEList
<?
>)getRefines()).basicRemove(otherEnd
, msgs
);
638 case ComparePackage
.DIFF__REFINED_BY
:
639 return ((InternalEList
<?
>)getRefinedBy()).basicRemove(otherEnd
, msgs
);
640 case ComparePackage
.DIFF__EQUIVALENCE
:
641 return basicSetEquivalence(null, msgs
);
642 case ComparePackage
.DIFF__CONFLICT
:
643 return basicSetConflict(null, msgs
);
645 return super.eInverseRemove(otherEnd
, featureID
, msgs
);
649 * <!-- begin-user-doc --> <!-- end-user-doc -->
653 public Object
eGet(int featureID
, boolean resolve
, boolean coreType
) {
655 case ComparePackage
.DIFF__MATCH
:
658 return basicGetMatch();
659 case ComparePackage
.DIFF__REQUIRES
:
660 return getRequires();
661 case ComparePackage
.DIFF__REQUIRED_BY
:
662 return getRequiredBy();
663 case ComparePackage
.DIFF__IMPLIES
:
665 case ComparePackage
.DIFF__IMPLIED_BY
:
666 return getImpliedBy();
667 case ComparePackage
.DIFF__REFINES
:
669 case ComparePackage
.DIFF__REFINED_BY
:
670 return getRefinedBy();
671 case ComparePackage
.DIFF__PRIME_REFINING
:
673 return getPrimeRefining();
674 return basicGetPrimeRefining();
675 case ComparePackage
.DIFF__KIND
:
677 case ComparePackage
.DIFF__SOURCE
:
679 case ComparePackage
.DIFF__STATE
:
681 case ComparePackage
.DIFF__EQUIVALENCE
:
683 return getEquivalence();
684 return basicGetEquivalence();
685 case ComparePackage
.DIFF__CONFLICT
:
687 return getConflict();
688 return basicGetConflict();
690 return super.eGet(featureID
, resolve
, coreType
);
694 * <!-- begin-user-doc --> <!-- end-user-doc -->
697 @SuppressWarnings("unchecked")
699 public void eSet(int featureID
, Object newValue
) {
701 case ComparePackage
.DIFF__MATCH
:
702 setMatch((Match
)newValue
);
704 case ComparePackage
.DIFF__REQUIRES
:
705 getRequires().clear();
706 getRequires().addAll((Collection
<?
extends Diff
>)newValue
);
708 case ComparePackage
.DIFF__REQUIRED_BY
:
709 getRequiredBy().clear();
710 getRequiredBy().addAll((Collection
<?
extends Diff
>)newValue
);
712 case ComparePackage
.DIFF__IMPLIES
:
713 getImplies().clear();
714 getImplies().addAll((Collection
<?
extends Diff
>)newValue
);
716 case ComparePackage
.DIFF__IMPLIED_BY
:
717 getImpliedBy().clear();
718 getImpliedBy().addAll((Collection
<?
extends Diff
>)newValue
);
720 case ComparePackage
.DIFF__REFINES
:
721 getRefines().clear();
722 getRefines().addAll((Collection
<?
extends Diff
>)newValue
);
724 case ComparePackage
.DIFF__REFINED_BY
:
725 getRefinedBy().clear();
726 getRefinedBy().addAll((Collection
<?
extends Diff
>)newValue
);
728 case ComparePackage
.DIFF__KIND
:
729 setKind((DifferenceKind
)newValue
);
731 case ComparePackage
.DIFF__SOURCE
:
732 setSource((DifferenceSource
)newValue
);
734 case ComparePackage
.DIFF__STATE
:
735 setState((DifferenceState
)newValue
);
737 case ComparePackage
.DIFF__EQUIVALENCE
:
738 setEquivalence((Equivalence
)newValue
);
740 case ComparePackage
.DIFF__CONFLICT
:
741 setConflict((Conflict
)newValue
);
744 super.eSet(featureID
, newValue
);
748 * <!-- begin-user-doc --> <!-- end-user-doc -->
752 public void eUnset(int featureID
) {
754 case ComparePackage
.DIFF__MATCH
:
755 setMatch((Match
)null);
757 case ComparePackage
.DIFF__REQUIRES
:
758 getRequires().clear();
760 case ComparePackage
.DIFF__REQUIRED_BY
:
761 getRequiredBy().clear();
763 case ComparePackage
.DIFF__IMPLIES
:
764 getImplies().clear();
766 case ComparePackage
.DIFF__IMPLIED_BY
:
767 getImpliedBy().clear();
769 case ComparePackage
.DIFF__REFINES
:
770 getRefines().clear();
772 case ComparePackage
.DIFF__REFINED_BY
:
773 getRefinedBy().clear();
775 case ComparePackage
.DIFF__KIND
:
776 setKind(KIND_EDEFAULT
);
778 case ComparePackage
.DIFF__SOURCE
:
779 setSource(SOURCE_EDEFAULT
);
781 case ComparePackage
.DIFF__STATE
:
782 setState(STATE_EDEFAULT
);
784 case ComparePackage
.DIFF__EQUIVALENCE
:
785 setEquivalence((Equivalence
)null);
787 case ComparePackage
.DIFF__CONFLICT
:
788 setConflict((Conflict
)null);
791 super.eUnset(featureID
);
795 * <!-- begin-user-doc --> <!-- end-user-doc -->
799 public boolean eIsSet(int featureID
) {
801 case ComparePackage
.DIFF__MATCH
:
802 return basicGetMatch() != null;
803 case ComparePackage
.DIFF__REQUIRES
:
804 return requires
!= null && !requires
.isEmpty();
805 case ComparePackage
.DIFF__REQUIRED_BY
:
806 return requiredBy
!= null && !requiredBy
.isEmpty();
807 case ComparePackage
.DIFF__IMPLIES
:
808 return implies
!= null && !implies
.isEmpty();
809 case ComparePackage
.DIFF__IMPLIED_BY
:
810 return impliedBy
!= null && !impliedBy
.isEmpty();
811 case ComparePackage
.DIFF__REFINES
:
812 return refines
!= null && !refines
.isEmpty();
813 case ComparePackage
.DIFF__REFINED_BY
:
814 return refinedBy
!= null && !refinedBy
.isEmpty();
815 case ComparePackage
.DIFF__PRIME_REFINING
:
816 return primeRefining
!= null;
817 case ComparePackage
.DIFF__KIND
:
818 return kind
!= KIND_EDEFAULT
;
819 case ComparePackage
.DIFF__SOURCE
:
820 return source
!= SOURCE_EDEFAULT
;
821 case ComparePackage
.DIFF__STATE
:
822 return state
!= STATE_EDEFAULT
;
823 case ComparePackage
.DIFF__EQUIVALENCE
:
824 return equivalence
!= null;
825 case ComparePackage
.DIFF__CONFLICT
:
826 return conflict
!= null;
828 return super.eIsSet(featureID
);
832 * <!-- begin-user-doc --> <!-- end-user-doc -->
836 public String
toString() {
838 return super.toString();
840 StringBuffer result
= new StringBuffer(super.toString());
841 result
.append(" (kind: "); //$NON-NLS-1$
843 result
.append(", source: "); //$NON-NLS-1$
844 result
.append(source
);
845 result
.append(", state: "); //$NON-NLS-1$
846 result
.append(state
);
848 return result
.toString();