|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.compare.BufferedContent
org.eclipse.compare.ResourceNode
A ResourceNode wrappers an IResources so that it can be used as input for the differencing engine (interfaces IStructureComparator and ITypedElement) and the ReplaceWithEditionDialog (interfaces ITypedElement and IModificationDate).
Clients may instantiate this class; it is not intended to be subclassed.
Field Summary |
Fields inherited from interface org.eclipse.compare.ITypedElement |
FOLDER_TYPE, TEXT_TYPE, UNKNOWN_TYPE |
Constructor Summary | |
ResourceNode(IResource resource)
Creates a ResourceNode for the given resource. |
Method Summary | |
protected IStructureComparator | createChild(IResource child)
This hook method is called from getChildren once for every member of a container resource. |
protected InputStream | createStream()
Returns an open stream if the corresponding resource implements the IStorage interface. |
boolean | equals(Object other)
Returns true if the other object is of type ITypedElement and their names are identical. |
String | getCharset()
Returns the name of a charset encoding to be used when decoding this stream accessor's contents into characters. |
Object[] | getChildren()
Returns an iterator for all children of this object or null if there are no children. |
InputStream | getContents()
Returns an open InputStream for this object which can be used to retrieve the object's content. |
Image | getImage()
Returns an image for this object. |
long | getModificationDate()
Returns the modification time of this object. |
String | getName()
Returns the name of this object. |
IResource | getResource()
Returns the corresponding resource for this object. |
String | getType()
Returns the type of this object. |
int | hashCode()
Returns the hash code of the name. |
boolean | isEditable()
Returns true if this object can be modified. |
ITypedElement | replace(ITypedElement child,
ITypedElement other)
This method is called on a parent to add or remove a child, or to copy the contents of a child. |
Methods inherited from class org.eclipse.compare.BufferedContent |
addContentChangeListener, discardBuffer, fireContentChanged, getContent, removeContentChangeListener, setContent |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.compare.IEditableContent |
setContent |
Constructor Detail |
public ResourceNode(IResource resource)
Method Detail |
public IResource getResource()
public InputStream getContents() throws CoreException
public long getModificationDate()
Note that this value should only be used to give the user a general idea of how old the object is.
public String getName()
public String getType()
public Image getImage()
public boolean equals(Object other)
public int hashCode()
public Object[] getChildren()
protected IStructureComparator createChild(IResource child)
protected InputStream createStream() throws CoreException
public boolean isEditable()
public ITypedElement replace(ITypedElement child, ITypedElement other)
add: | child == null | other != null |
remove: | child != null | other == null |
copy: | child != null | other != null |
public String getCharset()
Note: this method does not check whether the result is a supported charset name. Callers should be prepared to handle UnsupportedEncodingException where this charset is used.
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.