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 99506

Summary: Optionally format before diff (to ignore different formatting configuration)
Product: utilities Reporter: thulin <thulin>
Component: DiffAssignee: Ondrej Vrabec <ovrabec>
Status: NEW ---    
Severity: blocker CC: smil
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description thulin 2007-03-30 09:59:21 UTC
The formatting of two version of a file often differs if several IDE:s are used
in a project. It would be nice to have a option for diff to ignor *all* formatting. 
The following code would not be different:
A:
if (true) { foo = 1 + 3;

B:
if(true)
{  
   foo=1+3 ;

Conceptually you could think of this enhancement as a bytecode diff operation.
Comment 1 smil 2008-10-24 17:51:34 UTC
This would be a great feature, since this is what you are up-to when compareing java files: What's been changed
logically, and not what formatting has changed.

I hope this will be implemented someday :-)

Cheers,

Tamas
Comment 2 markiewb 2013-09-22 16:01:28 UTC
It is not about ignoring the format. It is easier to format both sides the same way and then compare them.

It would be also feasible to create a plugin for this. Both sides/streamsources (left and right) are being formatted before showing the creating the diff.
Comment 3 smil 2013-09-30 19:06:50 UTC
Hi,

Basically the same thing :-) Just it would be great to be able to skip the code noise.

additionally fields and methods could be sorted so their order would not matter as well.

Cheers,
T