Bug 99653 - Enhance Diff API
Enhance Diff API
Product: utilities
Classification: Unclassified
Component: Diff
All All
: P1 (vote)
: 6.x
Assigned To: diff-issues@utilities
Depends on:
Blocks: 93029
  Show dependency treegraph
Reported: 2007-04-02 09:46 UTC by Maros Sandor
Modified: 2007-04-17 12:27 UTC (History)
0 users

See Also:
Issue Type: TASK

Diff changes (3.08 KB, text/plain)
2007-04-02 09:47 UTC, Maros Sandor
DiffController.java (4.60 KB, text/plain)
2007-04-02 09:48 UTC, Maros Sandor
New API and SPI classes (5.25 KB, application/octet-stream)
2007-04-10 15:03 UTC, Maros Sandor

Note You need to log in before you can comment on or make changes to this bug.
Description Maros Sandor 2007-04-02 09:46:23 UTC
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).
Comment 1 Maros Sandor 2007-04-02 09:47:18 UTC
Created attachment 40244 [details]
Diff changes
Comment 2 Maros Sandor 2007-04-02 09:48:00 UTC
Created attachment 40245 [details]
Comment 3 Jaroslav Tulach 2007-04-05 15:58:52 UTC
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. 
Comment 4 Maros Sandor 2007-04-10 15:02:32 UTC
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.
Comment 5 Maros Sandor 2007-04-10 15:03:54 UTC
Created attachment 40683 [details]
New API and SPI classes
Comment 6 Maros Sandor 2007-04-17 12:27:18 UTC
Integrated into trunk.

/shared/data/ccvs/repository/diff/nbproject/project.properties,v  <-- 
new revision: 1.12; previous revision: 1.11
 <--  DiffController.java
initial revision: 1.1
 <--  DiffControllerProvider.java
initial revision: 1.1
 <--  DiffControllerImpl.java
initial revision: 1.1
 <--  org.netbeans.spi.diff.DiffControllerProvider
initial revision: 1.1
 <--  DefaultDiffControllerProvider.java
initial revision: 1.1
 <--  DiffControllerTest.java
initial revision: 1.1
/shared/data/ccvs/repository/diff/api/doc/changes/apichanges.xml,v  <-- 
new revision: 1.11; previous revision: 1.10

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo