org.eclipse.xtext.ui.compare
Class StreamContentAccessorDelegate

java.lang.Object
  extended by org.eclipse.xtext.ui.compare.StreamContentAccessorDelegate
All Implemented Interfaces:
org.eclipse.compare.IResourceProvider, org.eclipse.compare.IStreamContentAccessor

public class StreamContentAccessorDelegate
extends java.lang.Object
implements org.eclipse.compare.IStreamContentAccessor, org.eclipse.compare.IResourceProvider

Author:
Michael Clay - Initial contribution and API

Constructor Summary
StreamContentAccessorDelegate(org.eclipse.compare.IStreamContentAccessor streamContentAccessor, org.eclipse.compare.IResourceProvider resourceProvider)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.io.InputStream getContents()
          Returns an open InputStream for this object which can be used to retrieve the object's content.
 org.eclipse.core.resources.IResource getResource()
          Returns the corresponding resource for this object or null.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamContentAccessorDelegate

public StreamContentAccessorDelegate(org.eclipse.compare.IStreamContentAccessor streamContentAccessor,
                                     org.eclipse.compare.IResourceProvider resourceProvider)
Method Detail

getContents

public java.io.InputStream getContents()
                                throws org.eclipse.core.runtime.CoreException
Description copied from interface: org.eclipse.compare.IStreamContentAccessor
Returns an open InputStream for this object which can be used to retrieve the object's content. The client is responsible for closing the stream when finished. Returns null if this object has no streamable contents.

Specified by:
getContents in interface org.eclipse.compare.IStreamContentAccessor
Returns:
an input stream containing the contents of this object
Throws:
org.eclipse.core.runtime.CoreException - if the contents of this object could not be accessed

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getResource

public org.eclipse.core.resources.IResource getResource()
Description copied from interface: org.eclipse.compare.IResourceProvider
Returns the corresponding resource for this object or null.

Specified by:
getResource in interface org.eclipse.compare.IResourceProvider
Returns:
the corresponding resource or null