Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.diff/1 1.15.22 42
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.api.diff
Class Diff

    java.lang.Object
      org.netbeans.api.diff.Diff

    public abstract class Diff

extends Object

This class represents a visual diff presenter, that knows how to compute the differences between files and show them to the user.

Constructor Summary
`Diff()`

Method Summary
`DiffView` | `createDiff(StreamSource s1, StreamSource s2)` Creates single-window diff component that does not include any navigation controls and is controlled programatically via the returned DiffView interface.
`abstract Component` | `createDiff(String name1, String title1, Reader r1, String name2, String title2, Reader r2, String MIMEType)` Show the visual representation of the diff between two sources.
`static Collection` | `getAll()` Get all visual diff presenters registered in the system.
`static Diff` | `getDefault()` Get the default visual diff presenter.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Diff

    public Diff()

Method Detail

### getDefault

    public static Diff getDefault()

  Get the default visual diff presenter.

### getAll

    public static Collection getAll()

  Get all visual diff presenters registered in the system.

### createDiff

    public abstract Component createDiff(String name1,
                                         String title1,
                                         Reader r1,
                                         String name2,
                                         String title2,
                                         Reader r2,
                                         String MIMEType)
                                  throws IOException

  Show the visual representation of the diff between two sources.

  Parameters:
    `name1` - the name of the first source
    `title1` - the title of the first source
    `r1` - the first source
    `name2` - the name of the second source
    `title2` - the title of the second source
    `r2` - the second resource compared with the first one.
    `MIMEType` - the mime type of these sources
  Returns:
    The Component representing the diff visual representation or null, when the representation is outside the IDE.
  Throws:
    `IOException` - when the reading from input streams fails.

### createDiff

    public DiffView createDiff(StreamSource s1,
                               StreamSource s2)
                        throws IOException

  Creates single-window diff component that does not include any navigation controls and is controlled programatically via the returned DiffView interface.

  The StreamSource can be used to save the source content if it's modified in the view. The view should not allow source modification if StreamSource.createWriter() returns `null`.

  Parameters:
    `s1` - the first source
    `s2` - the second source
  Returns:
    DiffView controller interface
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.diff/1 1.15.22 42
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.