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.

Bug 209110

Summary: API Addition: RefactoringCommit, Modification Result
Product: editor Reporter: Jan Becicka <jbecicka>
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: normal CC: ppisl, ralphbenjamin, vv159170
Priority: P3 Keywords: API_REVIEW, API_REVIEW_FAST
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Attachments: RefactoringCommit
ModificationResult
Java impl. of ModificationResult

Description Jan Becicka 2012-03-02 14:20:52 UTC
There are several copies of RetoucheCommit class (e.g. end, php, who else?)

RefactoringCommit class should be sufficient default implementation of Transaction
Comment 1 Jan Becicka 2012-03-02 14:30:10 UTC
    <change id="RefactoringCommit">
        <api name="refactoring"/>
        <summary>Added RefactoringCommit and ModificationResult SPI classes.</summary>
        <version major="1" minor="23"/>
        <date day="2" month="3" year="2011"/>
        <author login="jbecicka"/>
        <compatibility addition="yes"/>
        <description>
            <p>
                Added RefactoringCommit and ModificationResult SPI classes.
            </p>    
        </description>
        <class package="org.netbeans.modules.refactoring.spi" name="ModificationResult"/>
        <class package="org.netbeans.modules.refactoring.spi" name="RefactoringCommit"/>
        <issue number="209110"/>
    </change>
Comment 2 Jan Becicka 2012-03-02 14:35:40 UTC
Created attachment 116300 [details]
RefactoringCommit
Comment 3 Jan Becicka 2012-03-02 14:37:47 UTC
Created attachment 116301 [details]
ModificationResult
Comment 4 Vladimir Voskresensky 2012-03-02 15:43:31 UTC
Jan, in cnd we also uses ModificationResult.Difference and access it in some places, i.e. DiffElement
which is based on 
copy of org.netbeans.modules.refactoring.java.spi.DiffElement
Comment 5 Jan Becicka 2012-03-02 16:01:28 UTC
I also plan to move java.spi.DiffElement to refactoring.spi but in different API change...
Comment 6 Vladimir Voskresensky 2012-03-02 16:25:28 UTC
can you share your ModificationResult variant. Now it keeps internally all changes as collection of Difference, how it is expected to be split?
Comment 7 Jan Becicka 2012-03-02 16:35:01 UTC
Created attachment 116305 [details]
Java impl. of ModificationResult
Comment 8 Vladimir Voskresensky 2012-03-03 13:06:24 UTC
Thanks, I missed that you've proposed MR as interface. OK for me.
Can I double check that introduced RefactoringCommit is the same as mine which is expected to be replaced.

Btw, it's more usual when during api reviews hg diff is attached instead of javadocs :-)
Comment 9 Quality Engineering 2012-03-21 12:07:02 UTC
Integrated into 'main-golden', will be available in build *201203210400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e7f98ee45ecc
User: Jan Becicka <jbecicka@netbeans.org>
Log: #209110:  API Addition: RefactoringCommit, Modification Result
Issue #48427 - [60cat] Integrate Refactoring Undo with Editor Undo and Local History
Comment 10 Ralph Ruijs 2015-08-31 09:05:50 UTC
Seems to be integrated a long time ago. Closing.