Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java')
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java
new file mode 100644
index 000000000..8bff24bf4
--- /dev/null
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed Materials - Property of IBM,
+ * WebSphere Studio Workbench
+ * (c) Copyright IBM Corp 2000, 2001
+ */
+package org.eclipse.compare.structuremergeviewer;
+
+import org.eclipse.compare.ITypedElement;
+
+/**
+ * An <code>IDiffElement</code> is used in the <code>DiffTreeViewer</code>
+ * to display the kind of change detected as the result of a two-way or three-way compare.
+ * <p>
+ * The base interface <code>ITypedElement</code> provides a name, a type, and an image.
+ * <code>IDiffElement</code> adds API for maintaining a parent relationship.
+ * <p>
+ * <code>DiffTreeViewer</code> works on a tree of <code>IDiffElements</code>.
+ * Leaf elements must implement the
+ * <code>IDiffElement</code> interface, inner nodes the <code>IDiffContainer</code> interface.
+ * <p>
+ * <code>IDiffElement</code>s are typically created as the result of performing
+ * a compare with the <code>Differencer</code>.
+ * <p>
+ * Clients may implement this interface, or use one of the standard implementations,
+ * <code>DiffElement</code>, <code>DiffContainer</code>, or <code>DiffNode</code>.
+ *
+ * @see DiffTreeViewer
+ * @see DiffElement
+ * @see DiffContainer
+ * @see DiffNode
+ */
+public interface IDiffElement extends ITypedElement {
+
+ /**
+ * Returns the kind of difference as defined in <code>Differencer</code>.
+ *
+ * @return the kind of difference as defined in <code>Differencer</code>
+ */
+ int getKind();
+
+ /**
+ * Returns the parent of this element.
+ * If the object is the root of a hierarchy <code>null</code> is returned.
+ *
+ * @return the parent of this element, or <code>null</code> if the element has no parent
+ */
+ IDiffContainer getParent();
+
+ /**
+ * Sets the parent of this element.
+ *
+ * @param parent the new parent of this element, or <code>null</code> if this
+ * element is to have no parent
+ */
+ void setParent(IDiffContainer parent);
+}

Back to the top