Bug 16858 Preceding space in package compression pattern sometimes ignored
(In the following discussion, all patterns were entered without the enclosing quote marks.) The pattern "1 " causes one character of each package name to be displayed with a single space separator between them. The pattern " 1 " causes one space to precede the first single-character package name and two spaces to appear between each one. Both of the above cases were expected. However, if you set the patttern to " 1" (i.e. space before, but no space after), no spaces are displayed in the result.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
getPackageFragmentLabel((IPackageFragment) classFile.getParent(), 0, buf);
		}
	}
	/**
	 * Appends the label for a compilation unit to a StringBuffer. Considers the CU_* flags.
	 */
	public static void getCompilationUnitLabel(ICompilationUnit cu, int flags, StringBuffer buf) {
		if (getFlag(flags, CU_QUALIFIED)) {
			IPackageFragment pack= (IPackageFragment) cu.getParent();
			if (!pack.isDefaultPackage()) {
				buf.append(pack.getElementName());
				buf.append('.');
			}
		}
		buf.append(cu.getElementName());
		
		if (getFlag(flags, CU_POST_QUALIFIED)) {
			buf.append(CONCAT_STRING);
			getPackageFragmentLabel((IPackageFragment) cu.getParent(), 0, buf);
		}		
	}
	/**
	 * Appends the label for a package fragment to a StringBuffer. Considers the P_* flags.
	 */	
	public static void getPackageFragmentLabel(IPackageFragment pack, int flags, StringBuffer buf) {
		if (getFlag(flags, P_QUALIFIED)) {
			getPackageFragmentRootLabel((IPackageFragmentRoot) pack.getParent(), ROOT_QUALIFIED, buf);
			buf.append('/');
		}
		refreshPackageNamePattern();