Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.compare.structuremergeviewer
Class DiffElement


java.lang.Object
  extended by 
org.eclipse.compare.structuremergeviewer.DiffElement
All Implemented Interfaces:
ITypedElement, IDiffElement
Direct Known Subclasses:
DiffContainer

public abstract class DiffElement
extends Object
implements IDiffElement

An abstract base implementation of the IDiffElement interface.

Subclasses may add behavior and state, and may override getImage and getType to suit.


Field Summary
 
Fields inherited from interface org.eclipse.compare. ITypedElement
FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE
 
Constructor Summary
DiffElement ( IDiffContainer parent, int kind)
          Creates a new DiffElement as a child of the given parent.
 
Method Summary
  Image getImage ()
          The DiffElement implementation of this ITypedInput method returns null.
 int getKind ()
          Returns the kind of difference as defined in Differencer.
  IDiffContainer getParent ()
          Returns the parent of this element.
  String getType ()
          The DiffElement implementation of this ITypedElement method returns ITypedElement.UNKNOWN_TYPE.
 void setKind (int kind)
          Sets the kind of difference for this element.
 void setParent ( IDiffContainer parent)
          Sets the parent of this element.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.compare. ITypedElement
getName
 

Constructor Detail

DiffElement

public DiffElement(
IDiffContainer parent,
                   int kind)
Creates a new DiffElement as a child of the given parent. If parent is not null the new element is added to the parent.

Parameters:
parent - the parent of this child; if not null this element is automatically added as a child
kind - the kind of change
Method Detail

getImage

public 
Image getImage()
The DiffElement implementation of this ITypedInput method returns null. Subclasses may re-implement to provide an image for this element.

Specified by:
getImage in interface ITypedElement
Returns:
null.

getType

public 
String getType()
The DiffElement implementation of this ITypedElement method returns ITypedElement.UNKNOWN_TYPE. Subclasses may re-implement to provide a type for this element.

Specified by:
getType in interface ITypedElement
Returns:
ITypedElement.UNKNOWN_TYPE.

setKind

public void setKind(int kind)
Sets the kind of difference for this element.

Parameters:
kind - set the kind of difference this element represents
See Also:
Differencer

getKind

public int getKind()
Description copied from interface: IDiffElement
Returns the kind of difference as defined in Differencer.

Specified by:
getKind in interface IDiffElement
Returns:
the kind of difference as defined in Differencer

getParent

public 
IDiffContainer getParent()
Description copied from interface: IDiffElement
Returns the parent of this element. If the object is the root of a hierarchy null is returned.

Specified by:
getParent in interface IDiffElement
Returns:
the parent of this element, or null if the element has no parent

setParent

public void setParent(
IDiffContainer parent)
Description copied from interface: IDiffElement
Sets the parent of this element.

Specified by:
setParent in interface IDiffElement
Parameters:
parent - the new parent of this element, or null if this element is to have no parent

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire