public abstract class AbstractChangeFactory extends Object implements IChangeFactory
| Constructor and Description | 
|---|
| AbstractChangeFactory() | 
| Modifier and Type | Method and Description | 
|---|---|
| Diff | create(Diff input) | 
| abstract Diff | createExtension()It creates the graphical change extension. | 
| void | fillRequiredDifferences(Comparison comparison,
                       Diff extension)Sets the required link of the difference extension created by the related factory. | 
| protected List<Diff> | findCrossReferences(Comparison comparison,
                   EObject lookup,
                   com.google.common.base.Predicate<Diff> p)Find the differences, on the given model object, which match with the predicate. | 
| protected Set<Diff> | getAllContainedDifferences(Diff input)Get all the add and delete changes on the objects contained in the one concerned by the given
 difference. | 
| Class<? extends Diff> | getExtensionKind()Returns the kind of extension that this factory has to create. | 
| Match | getParentMatch(Diff input)Returns the match in which the difference will be added. | 
| protected DifferenceKind | getRelatedExtensionKind(Diff input)Get the  DifferenceKindof the matching diagram difference extension in relation to the
 given difference. | 
| boolean | handles(Diff input)Returns true if this factory handles the given kind of Diff, i.e., if it can create an  extension. | 
| protected boolean | isRelatedToAnExtensionAdd(AttributeChange input)Check if the given attribute change is related to a graphical add. | 
| protected boolean | isRelatedToAnExtensionAdd(ReferenceChange input)Check if the given reference change is related to a graphical add. | 
| protected boolean | isRelatedToAnExtensionAdd(ResourceAttachmentChange input)Check if the given resource attachment change is related to a graphical add. | 
| protected boolean | isRelatedToAnExtensionChange(AttributeChange input)Check if the given attribute change is related to a graphical change. | 
| protected boolean | isRelatedToAnExtensionChange(ReferenceChange input)Check if the given reference change is related to a graphical change. | 
| protected boolean | isRelatedToAnExtensionChange(ResourceAttachmentChange input)Check if the given resource attachment change is related to a graphical change. | 
| protected boolean | isRelatedToAnExtensionDelete(AttributeChange input)Check if the given attribute change is related to a graphical delete. | 
| protected boolean | isRelatedToAnExtensionDelete(ReferenceChange input)Check if the given reference change is related to a graphical delete. | 
| protected boolean | isRelatedToAnExtensionDelete(ResourceAttachmentChange input)Check if the given resource attachment change is related to a graphical delete. | 
| protected boolean | isRelatedToAnExtensionMove(AttributeChange input)Check if the given attribute change is related to a graphical move. | 
| protected boolean | isRelatedToAnExtensionMove(ReferenceChange input)Check if the given reference change is related to a graphical move. | 
| protected boolean | isRelatedToAnExtensionMove(ResourceAttachmentChange input)Check if the given resource attachment change is related to a graphical ;ove. | 
| abstract void | setRefiningChanges(Diff extension,
                  DifferenceKind extensionKind,
                  Diff refiningDiff)Get the refining differences and set the given extension with them, from the given refining one. | 
public boolean handles(Diff input)
extension.
 
 Performance note:  this method should return as quickly as possible as it will called on every
 Diff of the Comparison.
handles in interface IChangeFactoryinput - the element to testIChangeFactory.handles(org.eclipse.emf.compare.Diff)public Diff create(Diff input)
extension from the given Diff. The returned element MUST NOT
 be added to its parent, it will be done by the post processor.create in interface IChangeFactoryinput - The input difference element.IChangeFactory.create(org.eclipse.emf.compare.Diff)public abstract Diff createExtension()
public abstract void setRefiningChanges(Diff extension, DifferenceKind extensionKind, Diff refiningDiff)
extension - The extension to set.extensionKind - The extension kind.refiningDiff - The refining difference.public Match getParentMatch(Diff input)
getParentMatch in interface IChangeFactoryinput - The input difference element.IChangeFactory.getParentMatch(org.eclipse.emf.compare.Diff)public Class<? extends Diff> getExtensionKind()
getExtensionKind in interface IChangeFactoryIChangeFactory.getExtensionKind()public void fillRequiredDifferences(Comparison comparison, Diff extension)
fillRequiredDifferences in interface IChangeFactorycomparison - The comparison.extension - The difference extension.IChangeFactory.fillRequiredDifferences(org.eclipse.emf.compare.Comparison,
      org.eclipse.emf.compare.Diff)protected DifferenceKind getRelatedExtensionKind(Diff input)
DifferenceKind of the matching diagram difference extension in relation to the
 given difference.input - The given difference.protected boolean isRelatedToAnExtensionAdd(ReferenceChange input)
input - The reference change.protected boolean isRelatedToAnExtensionDelete(ReferenceChange input)
input - The reference change.protected boolean isRelatedToAnExtensionChange(ReferenceChange input)
input - The reference change.protected boolean isRelatedToAnExtensionMove(ReferenceChange input)
input - The reference change.protected boolean isRelatedToAnExtensionAdd(AttributeChange input)
input - The attribute change.protected boolean isRelatedToAnExtensionDelete(AttributeChange input)
input - The attribute change.protected boolean isRelatedToAnExtensionChange(AttributeChange input)
input - The attribute change.protected boolean isRelatedToAnExtensionMove(AttributeChange input)
input - The attribute change.protected boolean isRelatedToAnExtensionAdd(ResourceAttachmentChange input)
input - The resource attachment change.protected boolean isRelatedToAnExtensionDelete(ResourceAttachmentChange input)
input - The resource attachment change.protected boolean isRelatedToAnExtensionChange(ResourceAttachmentChange input)
input - The resource attachment change.protected boolean isRelatedToAnExtensionMove(ResourceAttachmentChange input)
input - The resource attachment change.protected Set<Diff> getAllContainedDifferences(Diff input)
input - The given difference.protected final List<Diff> findCrossReferences(Comparison comparison, EObject lookup, com.google.common.base.Predicate<Diff> p)
comparison - The comparison.lookup - The model object.p - The predicate.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.