Bug 100818 [quick fix] Wrong label for nested enum LinkedCorrectionProposal.LinkedModeProposal
3.1-RC2 test pass - have the cu below -> compile error since the return value in the switch statement is not compatible with the declared return type - use quick fix to change the declared return type - note the label of the proposed return type is wrong - there is no separator between the type name and the qualifier -------- P.java ---------- package pr100795; class P { enum E {ONE, TWO, THREE} int m(int i) { switch (i) { case 0: return E.ONE; } } } --------------------------
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BindingLabelProvider.java
* @since 3.1
 */
public class BindingLabelProvider extends LabelProvider {
	
	private static int getAdornmentFlags(IBinding binding, int flags) {
		int adornments= 0;
		if (binding instanceof IMethodBinding && ((IMethodBinding) binding).isConstructor())
			adornments|= JavaElementImageDescriptor.CONSTRUCTOR;
		final int modifiers= binding.getModifiers();
		if (Modifier.isAbstract(modifiers))
			adornments|= JavaElementImageDescriptor.ABSTRACT;
		if (Modifier.isFinal(modifiers))
			adornments|= JavaElementImageDescriptor.FINAL;
		if (Modifier.isSynchronized(modifiers))
			adornments|= JavaElementImageDescriptor.SYNCHRONIZED;
		if (Modifier.isStatic(modifiers))
			adornments|= JavaElementImageDescriptor.STATIC;
		if (binding.isDeprecated())
			adornments|= JavaElementImageDescriptor.DEPRECATED;
		return adornments;
	}
	private static ImageDescriptor getBaseImageDescriptor(IBinding binding, int flags) {
		if (binding instanceof ITypeBinding) {
			ITypeBinding typeBinding= (ITypeBinding) binding;
			if (typeBinding.isArray()) {
				typeBinding= typeBinding.getElementType();
			}
			if (typeBinding.isCapture()) {
				typeBinding.getWildcard();
			}