This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 59179
Collapse All | Expand All

(-)api/doc/changes/apichanges.xml (-1 / +14 lines)
Lines 8-14 Link Here
8
   - http://www.sun.com/
8
   - http://www.sun.com/
9
   -
9
   -
10
   - The Original Code is NetBeans. The Initial Developer of the Original
10
   - The Original Code is NetBeans. The Initial Developer of the Original
11
   - Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
11
   - Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
12
   - Microsystems, Inc. All Rights Reserved.
12
   - Microsystems, Inc. All Rights Reserved.
13
  -->
13
  -->
14
<?xml-stylesheet type="text/xml"
14
<?xml-stylesheet type="text/xml"
Lines 116-121 Link Here
116
      <compatibility addition="yes"/>
116
      <compatibility addition="yes"/>
117
      <description>
117
      <description>
118
        Service, that is used to resolve merge collisions.
118
        Service, that is used to resolve merge collisions.
119
      </description>
120
    </change>
121
122
    <change>
123
      <api name="diff"/>
124
      <summary>DiffView interface added</summary>
125
      <version major="1" minor="13"/>
126
      <date day="23" month="5" year="2005"/>
127
      <author login="mentlicher"/>
128
      <compatibility addition="yes"/>
129
      <description>
130
        A controler interface, that allows to programmatically control the
131
        diff component.
119
      </description>
132
      </description>
120
    </change>
133
    </change>
121
 
134
 
(-)nbproject/project.properties (-1 / +1 lines)
Lines 9-15 Link Here
9
# Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
9
# Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
10
# Microsystems, Inc. All Rights Reserved.
10
# Microsystems, Inc. All Rights Reserved.
11
 
11
 
12
spec.version.base=1.12.0
12
spec.version.base=1.13.0
13
javadoc.apichanges=${basedir}/api/doc/changes/apichanges.xml
13
javadoc.apichanges=${basedir}/api/doc/changes/apichanges.xml
14
javadoc.arch=${basedir}/arch/arch-diff.xml
14
javadoc.arch=${basedir}/arch/arch-diff.xml
15
javadoc.title=Diff API
15
javadoc.title=Diff API
(-)api/diff/Diff.java (+16 lines)
Lines 58-61 Link Here
58
    public abstract Component createDiff(String name1, String title1,
58
    public abstract Component createDiff(String name1, String title1,
59
                                         Reader r1, String name2, String title2,
59
                                         Reader r1, String name2, String title2,
60
                                         Reader r2, String MIMEType) throws IOException ;
60
                                         Reader r2, String MIMEType) throws IOException ;
61
    
62
    /**
63
     * Creates single-window diff component that does not include any navigation controls and
64
     * is controlled programatically via the returned DiffView interface.
65
     * <p>
66
     * The StreamSource can be used to save the source content if it's modified
67
     * in the view. The view should not allow source modification if StreamSource.createWriter()
68
     * returns <code>null</code>.
69
     * 
70
     * @param s1 the first source
71
     * @param s2 the second source
72
     * @return DiffView controller interface
73
     */ 
74
    public DiffView createDiff(StreamSource s1, StreamSource s2) throws IOException {
75
        throw new UnsupportedOperationException("This operation is not supported");
76
    }
61
}
77
}
(-)spi/diff/DiffVisualizer.java (-1 / +19 lines)
Lines 7-13 Link Here
7
 * http://www.sun.com/
7
 * http://www.sun.com/
8
 * 
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
11
 * Microsystems, Inc. All Rights Reserved.
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
12
 */
13
13
Lines 19-25 Link Here
19
19
20
//import org.openide.util.Lookup;
20
//import org.openide.util.Lookup;
21
21
22
import org.netbeans.api.diff.DiffView;
22
import org.netbeans.api.diff.Difference;
23
import org.netbeans.api.diff.Difference;
24
import org.netbeans.api.diff.StreamSource;
23
25
24
/**
26
/**
25
 * This class represents a diff visualizer. It's used as a presenter of a visual
27
 * This class represents a diff visualizer. It's used as a presenter of a visual
Lines 55-58 Link Here
55
    public abstract Component createView(Difference[] diffs, String name1, String title1,
57
    public abstract Component createView(Difference[] diffs, String name1, String title1,
56
                                         Reader r1, String name2, String title2,
58
                                         Reader r1, String name2, String title2,
57
                                         Reader r2, String MIMEType) throws IOException ;
59
                                         Reader r2, String MIMEType) throws IOException ;
60
    /**
61
     * Creates single-window diff component that does not include any navigation controls and
62
     * is controlled programatically via the returned DiffView interface.
63
     * <p>
64
     * The StreamSource can be used to save the source content if it's modified
65
     * in the view. The view should not allow source modification if StreamSource.createWriter()
66
     * returns <code>null</code>.
67
     * 
68
     * @param s1 the first source
69
     * @param s2 the second source
70
     * @return DiffView controller interface
71
     *
72
     */ 
73
    public DiffView createDiff(Difference[] diffs, StreamSource s1, StreamSource s2) throws IOException {
74
        throw new UnsupportedOperationException("This operation is not supported");
75
    }
58
}
76
}
59
*                 Sun Public License Notice
77
*                 Sun Public License Notice
60
*
78
*
61
* The contents of this file are subject to the Sun Public License
79
* The contents of this file are subject to the Sun Public License
62
* Version 1.0 (the "License"). You may not use this file except in
80
* Version 1.0 (the "License"). You may not use this file except in
63
* compliance with the License. A copy of the License is available at
81
* compliance with the License. A copy of the License is available at
64
* http://www.sun.com/
82
* http://www.sun.com/
65
*
83
*
66
* The Original Code is NetBeans. The Initial Developer of the Original
84
* The Original Code is NetBeans. The Initial Developer of the Original
67
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
85
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
68
* Microsystems, Inc. All Rights Reserved.
86
* Microsystems, Inc. All Rights Reserved.
69
*/
87
*/
70
* Controller interface that allows external code to control the DIFF component.
88
* Controller interface that allows external code to control the DIFF component.
71
* 
89
* 
72
* @author Maros Sandor, Martin Entlicher
90
* @author Maros Sandor, Martin Entlicher
73
*/
91
*/
74
   
92
   
75
   /**
93
   /**
76
    * This property is fired when the difference count has changed.
94
    * This property is fired when the difference count has changed.
77
    */
95
    */
78
   public static final String PROP_DIFF_COUNT = "diffCount"; // NOI18N
96
   public static final String PROP_DIFF_COUNT = "diffCount"; // NOI18N
79
   /**
97
   /**
80
    * Gets the visual DIFF component that modules can include in their GUI.
98
    * Gets the visual DIFF component that modules can include in their GUI.
81
    * 
99
    * 
82
    * @return Component
100
    * @return Component
83
    */ 
101
    */ 
84
   public Component getComponent();
102
   public Component getComponent();
85
   
103
   
86
   /**
104
   /**
87
    * Gets the number of differences found in sources.
105
    * Gets the number of differences found in sources.
88
    * 
106
    * 
89
    * @return int
107
    * @return int
90
    */ 
108
    */ 
91
   public int getDiffCount();
109
   public int getDiffCount();
92
   
110
   
93
   /**
111
   /**
94
    * Test whether this view can change the current difference.
112
    * Test whether this view can change the current difference.
95
    * This is expected to be true when the view has a visual indication
113
    * This is expected to be true when the view has a visual indication
96
    * of the current difference.
114
    * of the current difference.
97
    */
115
    */
98
   public boolean canSetCurrentDiff();
116
   public boolean canSetCurrentDiff();
99
   /**
117
   /**
100
    * Instructs the DIFF view to navigate to the n-th difference.
118
    * Instructs the DIFF view to navigate to the n-th difference.
101
    * 
119
    * 
102
    * @param diffNo The difference number
120
    * @param diffNo The difference number
103
    * @throws UnsupportedOperationException iff {@link #canSetCurrentDiff}
121
    * @throws UnsupportedOperationException iff {@link #canSetCurrentDiff}
104
    *         returns <code>false</code>.
122
    *         returns <code>false</code>.
105
    */ 
123
    */ 
106
   public void setCurrentDifference(int diffNo) throws UnsupportedOperationException;
124
   public void setCurrentDifference(int diffNo) throws UnsupportedOperationException;
107
   
125
   
108
   /**
126
   /**
109
    * Get the current difference that is displayed in the view.
127
    * Get the current difference that is displayed in the view.
110
    *
128
    *
111
    * @return The current difference number
129
    * @return The current difference number
112
    * @throws UnsupportedOperationException iff {@link #canSetCurrentDiff}
130
    * @throws UnsupportedOperationException iff {@link #canSetCurrentDiff}
113
    *         returns <code>false</code>.
131
    *         returns <code>false</code>.
114
    */
132
    */
115
   public int getCurrentDifference() throws UnsupportedOperationException;
133
   public int getCurrentDifference() throws UnsupportedOperationException;
116
   
134
   
117
   /**
135
   /**
118
    * Get a toolbar, that is adviced to be displayed together with the component
136
    * Get a toolbar, that is adviced to be displayed together with the component
119
    * obtained from {@link #getComponent}.
137
    * obtained from {@link #getComponent}.
120
    *
138
    *
121
    * @return the toolbar or <code>null</code> when no toolbar is provided by
139
    * @return the toolbar or <code>null</code> when no toolbar is provided by
122
    *         this view.
140
    *         this view.
123
    */
141
    */
124
   public JToolBar getToolBar();
142
   public JToolBar getToolBar();
125
   
143
   
126
   /**
144
   /**
127
    * Add a property change listener.
145
    * Add a property change listener.
128
    * @param l The property change listener
146
    * @param l The property change listener
129
    */
147
    */
130
   public void addPropertyChangeListener(PropertyChangeListener l);
148
   public void addPropertyChangeListener(PropertyChangeListener l);
131
   
149
   
132
   /**
150
   /**
133
    * Remove a property change listener.
151
    * Remove a property change listener.
134
    * @param l The property change listener
152
    * @param l The property change listener
135
    */
153
    */
136
   public void removePropertyChangeListener(PropertyChangeListener l);
154
   public void removePropertyChangeListener(PropertyChangeListener l);
137
   
155
   

Return to bug 59179