Project: JDT
Bug 180929 [clean up] sort fields should warn for semantic change
Reported: 2007-04-04 08:26:31 | Status: resolved fixed

Build ID: I20070323-1616 Steps To Reproduce: 1.Create an empty class 2.Add two constants private static final int z=5; private static final int a=2*Z; 3.Sort/cleanup with sort enabled/save with automatic sorting enabled More information: I entered a new bug regarding sorting, even though there are already, because all existing ones I found have been postponed with state LATER pointing out that sorting is no refactoring action and thus is not meant to preserve semantic. This might have been ok, as long as sorting was a deliberate act by the programmer she or he had to invoke explicitly. With 3.3 one can include sorting in Clean-Up and also have sort performed automatically on save. These automatic rules make no sense at all, if sort can occasionally produce code which does not compile any more.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpMessages.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CodeFormatingTabPage.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java