Bug 11314 Replace package name fragments should always be smaller
Build 20020214 If you enter "2~." in the 'Replace package name fragments with:' field in the preferences (Java->Work in progress), com.ibm.foobar is replaced with co~.ib~.foobar. I believe that package name compression should only replace a fragment if the compressed name is actually smaller. Thus com. would not be replaced in this example, since co~. is the same length, and contains less info.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
*/	
	public final static int D_POST_QUALIFIED= 1 << 17;	
	/**
	 * Class file names are fully qualified.
	 * e.g. <code>java.util.Vector.class</code>
	 */	
	public final static int CF_QUALIFIED= 1 << 18;
	
	/**
	 * Class file names are post qualified.
	 * e.g. <code>Vector.class - java.util</code>
	 */	
	public final static int CF_POST_QUALIFIED= 1 << 19;
	
	/**
	 * Compilation unit names are fully qualified.
	 * e.g. <code>java.util.Vector.java</code>
	 */	
	public final static int CU_QUALIFIED= 1 << 20;
	
	/**
	 * Compilation unit names are post  qualified.
	 * e.g. <code>Vector.java - java.util</code>
	 */	
	public final static int CU_POST_QUALIFIED= 1 << 21;
	/**
	 * Package names are qualified.
	 * e.g. <code>MyProject/src/java.util</code>
	 */	
	public final static int P_QUALIFIED= 1 << 22;