Bug 94902 Sort members should warn about possible semantic changes
I20050509-2010 Sort members changes the order of the literals in enumerations, which changes the values of the literals and can impact compatibility between network clients and storage formats. Also under some circumstances the initialization order of fields can affect the result.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SortMembersAction.java
if (!hasMembersToSort(types)) {
				MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.SortMembersAction_no_members); 
				return;
			}
			
			if (!ElementValidator.check(cu, getShell(), getDialogTitle(), false)) {
				return;
			}
			
			
			IEditorPart editor= EditorUtility.openInEditor(cu);
			if (editor != null) {
				run(shell, cu, editor);
			}
		} catch (CoreException e) {
			ExceptionHandler.handle(e, shell, getDialogTitle(), null); 
		}			
	}
	
	private boolean hasMembersToSort(IJavaElement[] members) throws JavaModelException {
		if (members.length > 1) {
			return true;
		}
		if (members.length == 1) {
			IJavaElement elem= members[0];
			if (elem instanceof IParent) {
				return hasMembersToSort(((IParent) elem).getChildren());
			}
		}
		return false;