Index: api/doc/changes/apichanges.xml =================================================================== RCS file: /shared/data/ccvs/repository/diff/api/doc/changes/apichanges.xml,v retrieving revision 1.9 diff -u -r1.9 apichanges.xml --- api/doc/changes/apichanges.xml 5 Mar 2007 13:56:12 -0000 1.9 +++ api/doc/changes/apichanges.xml 2 Apr 2007 08:34:07 -0000 @@ -149,6 +149,18 @@ StreamSource provides more ways of defining the source (a FileObject) and can declare its editability. + + + + DiffController class extends DiffView + + + + + + DiffController class is an evolution of DiffView interface that provides more features. + + Index: nbproject/project.properties =================================================================== RCS file: /shared/data/ccvs/repository/diff/nbproject/project.properties,v retrieving revision 1.11 diff -u -r1.11 project.properties --- nbproject/project.properties 5 Mar 2007 13:56:03 -0000 1.11 +++ nbproject/project.properties 2 Apr 2007 08:34:07 -0000 @@ -18,6 +18,6 @@ javac.compilerargs=-Xlint:unchecked javac.source=1.5 -spec.version.base=1.17.0 +spec.version.base=1.18.0 javadoc.apichanges=${basedir}/api/doc/changes/apichanges.xml javadoc.arch=${basedir}/arch/arch-diff.xml Index: src/org/netbeans/api/diff/Diff.java =================================================================== RCS file: /shared/data/ccvs/repository/diff/src/org/netbeans/api/diff/Diff.java,v retrieving revision 1.5 diff -u -r1.5 Diff.java --- src/org/netbeans/api/diff/Diff.java 20 Dec 2006 06:15:48 -0000 1.5 +++ src/org/netbeans/api/diff/Diff.java 2 Apr 2007 08:34:07 -0000 @@ -114,4 +114,28 @@ }; } + + /** + * Creates a Diff Controller for supplied left and right sources. + * + * @param base defines content of the Base Diff pane + * @param modified defines content of the Modified (possibly editable) Diff pane + * @return DiffController implementation of the DiffController class + * @throws IOException when the reading from input streams fails. + * @since 1.18 + */ + public DiffController createDiffController(StreamSource base, StreamSource modified) throws IOException { + final Component c = createDiff(base.getName(), base.getTitle(), base.createReader(), + modified.getName(), modified.getTitle(), modified.createReader(), + base.getMIMEType()); + return new DiffController() { + public javax.swing.JComponent getJComponent() { + return (javax.swing.JComponent) c; + } + + public int getDifferenceCount() { + return 0; + } + }; + } }