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 208740

Summary: "Complete" API
Product: utilities Reporter: Tomas Mysik <tmysik>
Component: DiffAssignee: Ondrej Vrabec <ovrabec>
Status: NEW ---    
Severity: normal CC: ovrabec
Priority: P1    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 199151    

Description Tomas Mysik 2012-02-22 09:55:46 UTC
The diff API is kind of incomplete. Scenario:

- have 2 temporary files, none of them come from the IDE
- create editable diff controller for them
- edit the right file
- close the diff's "JComponent" by pressing OK button
- now what??

There is no documented way how to:
- find out whether the "right" file has been changed? and/or
- save the modified document?, and/or
- get the content of the modified "right" file.

Thanks a lot.
Comment 1 Tomas Mysik 2012-02-24 11:55:36 UTC
BTW this [1] is what I need to do in order to use the Diff API for my (not so uncommon, I would say) needs. Please notice that the save() method must be always called (even if user clicks Cancel) otherwise the IDE thinks that there is a file with unsaved changes somewhere.

Thanks.
[1] http://hg.netbeans.org/web-main/file/d0b04f4d17db/php.project/src/org/netbeans/modules/php/project/connections/sync/diff/EditableTmpLocalFileStreamSource.java
Comment 2 Quality Engineering 2012-03-21 12:06:13 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/d0b04f4d17db
User: Tomas Mysik <tmysik@netbeans.org>
Log: Editable diff works now

But really too much complicated, issue #208740 should solve this.