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 29971 - Implement data object for .diff files
Summary: Implement data object for .diff files
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker with 1 vote (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-12 12:44 UTC by Jaroslav Tulach
Modified: 2016-05-25 06:14 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
diff module from the branch (420.60 KB, application/octet-stream)
2003-01-30 10:08 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2003-01-12 12:44:11 UTC
Would be handy to have diff files with some useful
operations visible in explorer.
Comment 1 Jaroslav Tulach 2003-01-12 12:59:25 UTC
Created branch. Get it using: cvs upd -r loader_29971
Comment 2 Martin Entlicher 2003-01-13 10:21:12 UTC
Thanks Yarda for your contribution to the diff module!
Comment 3 Jaroslav Tulach 2003-01-14 18:37:47 UTC
I think I am ready to announce alpha version. Not localized, but there
is a dialog that allows to associate a filedifferencies with
fileobject. I have modified the Tool->ApplyPatch to also use this
dialog. Martin please give it a look to find out whether the UI is
intuitive. 

Btw. it always tells me that there is nothing to patch. Do not know
what is wrong yet.
Comment 4 Jaroslav Tulach 2003-01-15 10:26:01 UTC
I believe that the functionality is implemented. Martin, do you want
to integrate it?
Comment 5 Jaroslav Tulach 2003-01-30 10:08:54 UTC
Created attachment 8741 [details]
diff module from the branch
Comment 6 _ tboudreau 2003-01-30 11:01:40 UTC
Okay, some interesting results:

Adding soft caching of property editors to Node.Property does solve
the problem as long as GC doesn't happen (and this caching is needed
for the new property sheet impl).

One weird thing:  You seem to have 2 property editors and you are
calling setValue on both of them (or something is).  I added:
    public void setValue(Object value) {
        System.out.println("SetValue: " + value + " on " + toString());
        super.setValue(value);
    }
to DataObjectEditor, and I see the following results when I try it
on a patch:
SetValue:
org.netbeans.modules.diff.DiffDataObject@11170a9[xmlpatch.diff] on
org.netbeans.beaninfo.editors.DataObjectEditor@12e3e73
SetValue:
org.netbeans.modules.diff.DiffDataObject@11170a9[xmlpatch.diff] on
org.netbeans.beaninfo.editors.DataObjectEditor@14e2266

Reason:  You have 2 instances of the property editor, one
owned by DataObjectListView, and the other owned by PropertyPanel.

I strongly recommend using a tree view instead of a list view
for these properties (you can hint this - set "guitype" to 
"TreeView").  Actually what would be better is a "Windows explorer"
style 2 pane view - maybe I'll write one.

Anyway, the core issue here is that DataObjectListView and
DataObjectTreeView should override DataObjectPanel.setDataObject()
and update their GUIs appropriately.  That is what should be
fixed.
Comment 7 _ tboudreau 2003-01-30 11:04:31 UTC
Sorry, Martin - Jarda attached his patch to this bug instead of 
30124, so I replied here by mistake.
Comment 8 _ tboudreau 2003-08-25 17:49:10 UTC
Because I don't have a patch util for Windows, I'm checking
out the branch and building it again to apply some patches
at home.

And I'm thinking...the changes on this branch are wonderful
and useful!  When will they be integrated?
Comment 9 _ tboudreau 2003-08-25 20:26:26 UTC
FYI, I just synched Jarda's branch so it's now up to date
with the current trunk version of the diff module.

Doing this was pretty painful - we really need a nice
three way merge tool (hint, hint) :-)

Included one enhancement, since I had to reimplement the
partial diff warning anyway - the message now includes
a list of files that the diff failed for.  Seemed more
useful than just saying "something went wrong - here's what
didn't."

Attaching a diff (okay, it was fun to type
cvs -f diff diff > diff.diff :-)
Comment 10 _ tboudreau 2003-08-25 20:57:38 UTC
Note, the usability is pretty awful in the patch dialog -
it should really be made into a wizard.  I'm not sure I
feel inspired to do that (at least I should really get on
with the explorer-html patch, which was the reason I was
doing any of this in the first place).
Comment 11 ejvyas 2007-02-08 15:45:28 UTC
I was curious to know the status of this. It is very often that I have history
of same file/code in different projects and I have to use the external diff
tools like Windiff. Can I test the alpha release by any chance

Thanks
Comment 12 Maros Sandor 2008-04-08 14:41:44 UTC
I do not think that the original branch/patch is still applicable but the enhancement makes sense; at least have the
Apply... menu item on .patch and .diff files that would prompt the user for a destination for the patch.
Comment 13 Jaroslav Tulach 2016-05-25 06:14:42 UTC
There seem to be some syntax coloring for .diff files in NetBeans 8.1.