Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.ide.quickdiff
Class QuickDiffReference

java.lang.Object
  extended by java.util.Observable
      extended by oracle.ide.quickdiff.QuickDiffReference

public abstract class QuickDiffReference
extends java.util.Observable

Class that supplies comparable reference data to a Quick Diff margin, and sends notifications for changes to the reference state.

Since:
11.1.1.0.0 (Bulldog)

Nested Class Summary
 class QuickDiffReference.DefaultNodeListener
           
 
Constructor Summary
protected QuickDiffReference(java.net.URL url)
          Constructor.
 
Method Summary
protected  oracle.javatools.compare.algorithm.text.TextCompareContributor createCompareContributor()
          Creates the TextCompareContributor for the compare operation to be performed by the Quick Diff margin.
protected  NodeListener createNodeListener()
          Creates a QuickDiffReference.DefaultNodeListener for observing the Node associated with the reference URL.
 void dispose()
          Disposes of all transient reference data and detaches all listeners for the observable state.
protected  void doNotifyObservers()
          Performs notification of a reference state change to the Quick Diff margin, first clearing any locally cached compare contributor state.
 oracle.javatools.compare.algorithm.text.TextCompareContributor getCompareContributor()
          Gets the TextCompareContributor for the compare operation to be performed by the Quick Diff margin.
protected  Node getNode()
          Gets the Node associated with the reference URL.
abstract  java.io.InputStream openInputStream()
          Opens an InputStream onto the reference file.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuickDiffReference

protected QuickDiffReference(java.net.URL url)
Constructor. If there is a cached node for the given URL and a call to createNodeListener() produces a non-null result, the listener is added to the node and will be removed in dispose().

Parameters:
url - the reference URL.
Method Detail

createNodeListener

protected NodeListener createNodeListener()
Creates a QuickDiffReference.DefaultNodeListener for observing the Node associated with the reference URL. By default, returns null.

Returns:
the new QuickDiffReference.DefaultNodeListener.

getNode

protected final Node getNode()
Gets the Node associated with the reference URL.

Returns:
the associated Node instance, if any, or null.

getCompareContributor

public final oracle.javatools.compare.algorithm.text.TextCompareContributor getCompareContributor()
                                                                                           throws java.lang.Exception
Gets the TextCompareContributor for the compare operation to be performed by the Quick Diff margin. This method cannot be overridden and may return locally cached contributor instance.

Returns:
the TextCompareContributor.
Throws:
java.lang.Exception - if an I/O or process exception occurs.

createCompareContributor

protected oracle.javatools.compare.algorithm.text.TextCompareContributor createCompareContributor()
                                                                                           throws java.lang.Exception
Creates the TextCompareContributor for the compare operation to be performed by the Quick Diff margin. This method must return a new contributor instance based on the latest state of the reference.

Returns:
the TextCompareContributor.
Throws:
java.lang.Exception - if an I/O or process exception occurs.

openInputStream

public abstract java.io.InputStream openInputStream()
                                             throws java.io.IOException
Opens an InputStream onto the reference file.

Returns:
an InputStream
Throws:
java.io.IOException - if an I/O exception occurs.

dispose

public void dispose()
Disposes of all transient reference data and detaches all listeners for the observable state. This method is called by the Quick Diff margin when the reference is no longer required.


doNotifyObservers

protected void doNotifyObservers()
Performs notification of a reference state change to the Quick Diff margin, first clearing any locally cached compare contributor state.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.