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
}
	}
	/**
	 * Appends the label for a package fragment root to a StringBuffer. Considers the ROOT_* flags.
	 */	
	public static void getPackageFragmentRootLabel(IPackageFragmentRoot root, int flags, StringBuffer buf) {
		if (root.isArchive() && getFlag(flags, ROOT_VARIABLE)) {
			try {
				IClasspathEntry rawEntry= JavaModelUtil.getRawClasspathEntry(root);
				if (rawEntry != null) {
					if (rawEntry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
						buf.append(rawEntry.getPath().makeRelative());
						buf.append(CONCAT_STRING);
					}
				}
			} catch (JavaModelException e) {
				JavaPlugin.log(e); 
			}
		}
		if (root.isExternal()) {
			
			
			buf.append(root.getPath().toOSString());
		} else {
			if (getFlag(flags, ROOT_QUALIFIED)) {
				buf.append(root.getPath().makeRelative().toString());
			} else {
				buf.append(root.getElementName());
			}
			if (getFlag(flags, ROOT_POST_QUALIFIED)) {