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.
Recent requirements from refactoring team and introduction of editable diff views requires a slight enhanccments in the API. I am proposing to deprecate existing DiffView and create a new class DiffController. All diffs are attached to the issue. New class will provide more features (mainly navigation via setLcoation() and allow easier future extensibility (is an abstract class).
Created attachment 40244 [details] Diff changes
Created attachment 40245 [details] DiffController.java
Y01 Separate API from SPI. As far as I know the new DiffController is needed due to inability to enhance DiffView - this is because the DiffView is used both for implementors, as well as users of the API. So please learn from this and create two classes: public final class org.nb.api.diff.DiffController { ... } and second public interface org.nb.spi.diff.DiffControlerProvider /* or DiffView2, etc.*/ that way you will be able to add new methods into DiffController in future. Y02 Tests. Y03 I'd like the new API to work even with old providers. Even if people register just DiffView the users of the API will be able to get DiffController and manipulate it.
Y01: I separated API and SPI, DiffController is an API now and DiffControllerImpl is an SPI (along with its DiffControllerProvider) Y03: DiffController now provides a bridge to a default DiffView if there is no registered DiffControllerProvider Since the new version no longer modifies any existing APIs, I am just attaching new files. I'll address Y02 once the API is approved.
Created attachment 40683 [details] New API and SPI classes
Integrated into trunk. /shared/data/ccvs/repository/diff/nbproject/project.properties,v <-- project.properties new revision: 1.12; previous revision: 1.11 /shared/data/ccvs/repository/diff/src/org/netbeans/api/diff/DiffController.java,v <-- DiffController.java initial revision: 1.1 /shared/data/ccvs/repository/diff/src/org/netbeans/spi/diff/DiffControllerProvider.java,v <-- DiffControllerProvider.java initial revision: 1.1 /shared/data/ccvs/repository/diff/src/org/netbeans/spi/diff/DiffControllerImpl.java,v <-- DiffControllerImpl.java initial revision: 1.1 /shared/data/ccvs/repository/diff/src/META-INF/services/org.netbeans.spi.diff.DiffControllerProvider,v <-- org.netbeans.spi.diff.DiffControllerProvider initial revision: 1.1 /shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/builtin/DefaultDiffControllerProvider.java,v <-- DefaultDiffControllerProvider.java initial revision: 1.1 /shared/data/ccvs/repository/diff/test/unit/src/org/netbeans/modules/diff/DiffControllerTest.java,v <-- DiffControllerTest.java initial revision: 1.1 /shared/data/ccvs/repository/diff/api/doc/changes/apichanges.xml,v <-- apichanges.xml new revision: 1.11; previous revision: 1.10