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
public final static int P_COMPRESSED= 1 << 29;
	
	/**
	 * Qualify all elements
	 */
	public final static int ALL_FULLY_QUALIFIED= F_FULLY_QUALIFIED | M_FULLY_QUALIFIED | I_FULLY_QUALIFIED | T_FULLY_QUALIFIED | D_QUALIFIED | CF_QUALIFIED | CU_QUALIFIED | P_QUALIFIED | ROOT_QUALIFIED;
	/**
	 * Post qualify all elements
	 */
	public final static int ALL_POST_QUALIFIED= F_POST_QUALIFIED | M_POST_QUALIFIED | I_POST_QUALIFIED | T_POST_QUALIFIED | D_POST_QUALIFIED | CF_POST_QUALIFIED | CU_POST_QUALIFIED | P_POST_QUALIFIED | ROOT_POST_QUALIFIED;
	/**
	 *  Default options (M_PARAMETER_TYPES enabled)
	 */
	public final static int ALL_DEFAULT= M_PARAMETER_TYPES;
	/**
	 *  Default qualify options (All except Root and Package)
	 */
	public final static int DEFAULT_QUALIFIED= F_FULLY_QUALIFIED | M_FULLY_QUALIFIED | I_FULLY_QUALIFIED | T_FULLY_QUALIFIED | D_QUALIFIED | CF_QUALIFIED | CU_QUALIFIED;
	/**
	 *  Default post qualify options (All except Root and Package)
	 */
	public final static int DEFAULT_POST_QUALIFIED= F_POST_QUALIFIED | M_POST_QUALIFIED | I_POST_QUALIFIED | T_POST_QUALIFIED | D_POST_QUALIFIED | CF_POST_QUALIFIED | CU_POST_QUALIFIED;
	private final static String CONCAT_STRING= JavaUIMessages.getString("JavaElementLabels.concat_string"); 
	private final static String COMMA_STRING= JavaUIMessages.getString("JavaElementLabels.comma_string"); 
	private final static String DECL_STRING= JavaUIMessages.getString("JavaElementLabels.declseparator_string"); 
	/*
	 * Package name compression
	 */
	private static String fgPkgNamePattern= ""; 
	private static String fgPkgNamePrefix;