Bug 127237 - [Java] source code format - before - file compare
Summary: [Java] source code format - before - file compare
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 enhancement with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 293031 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-10 04:12 EST by Marcel Petavy CLA
Modified: 2019-09-06 15:32 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Petavy CLA 2006-02-10 04:12:31 EST
Hi. 

There should be an option in the compare view which initiates a source code format with the actual preference definitions - BEFORE - the comparison.
This helps in the case when there has been some source code format definition changes beween the two file revisions and the compare view will not display "changes" because only the file source code format has changed.

Cheers - Marcel.
Comment 1 Jerome Lanneluc CLA 2006-02-10 05:36:22 EST
Moving to Platform Compare
Comment 2 Andre Weinand CLA 2006-02-10 07:20:06 EST
Have you tried the "Ignore Whitespace" option?
There is a button for it in the toolbar if the compare editor is active.
Comment 3 Marcel Petavy CLA 2006-02-10 13:35:24 EST
(In reply to comment #2)
> Have you tried the "Ignore Whitespace" option?
> There is a button for it in the toolbar if the compare editor is active.
> 

Yep, but whitespaces are not the problem, the problem is for example the wrap lines definition : in old files 80, newer files 120 (maybe because of my great new 19" tft :-).
Comment 4 Andre Weinand CLA 2006-02-11 18:52:33 EST
At least in structure compare mode the line length is ignored, so formatting should not have an influence.
Comment 5 Claudio Nieder CLA 2006-10-17 15:45:34 EDT
(In reply to comment #4)
> At least in structure compare mode the line length is ignored, so formatting
> should not have an influence.

True, but that doesn't help when in a method there is mixed formatting and real change.

Regarding this wish and also the "ignore whitespace" option: It would be nice if those could be switched on and off with a button in the compare window and having instant effect on what is show, rather than having them in preferences and with the need to restart the comparison.
Comment 6 Michael Valenta CLA 2006-10-17 16:16:28 EDT
There is a button for ignore whitespace. It appears in the main toolbar when a compare editor is open. The ability to format code would need to be provided by the Java Merge Viewer. At some point, we are hoping to find the cycles to push a bunch of Java editor funtionality into the Compare viewer. Once this happens, you should just be able to perform the format manually as a Java operation.
Comment 7 Christian Weyermann CLA 2007-09-26 14:02:07 EDT
There are much more settings you can configure in the format preferences, than the things discussed here. 

It would make Format-Guidelines in a group of developers useless. 
Comment 8 Tomasz Zarna CLA 2009-10-22 09:43:36 EDT
*** Bug 293031 has been marked as a duplicate of this bug. ***
Comment 9 Eclipse Webmaster CLA 2019-09-06 15:32:11 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.