Bug 85945 Test failure in N-build in JavaElementLabelsTest.testTypeLabelAnonymousInAnonymous
N20050221-0010 I corrected the bug in JavaElementLabels 1.4 -> 1.5. Please verify the fix. Content not as expected: is org.test.new Object() {...}.xoo().new Serializable() {...} Differs at pos 9: .test.^new Ob expected: org.test.Outer.foo(...).new Object() {...}.xoo().new Serializable() {...} expected:<...Outer.foo(...)....> but was:<......> junit.framework.ComparisonFailure: Content not as expected: is org.test.new Object() {...}.xoo().new Serializable() {...} Differs at pos 9: .test.^new Ob expected: org.test.Outer.foo(...).new Object() {...}.xoo().new Serializable() {...} expected:<...Outer.foo(...)....> but was:<......> at org.eclipse.jdt.testplugin.StringAsserts.assertEqualString(StringAsserts.java:72) at org.eclipse.jdt.ui.tests.core.CoreTests.assertEqualString(CoreTests.java:55) at org.eclipse.jdt.ui.tests.core.JavaElementLabelsTest.testTypeLabelAnonymousInAnonymous(JavaElementLabelsTest.java:223) ...
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabels.java
}
		buf.append(JavaUIMessages.getString("JavaElementLabels.initializer")); 
		
		if (getFlag(flags, I_POST_QUALIFIED)) {
			buf.append(CONCAT_STRING);
			getTypeLabel(initializer.getDeclaringType(), T_FULLY_QUALIFIED | (flags & QUALIFIER_FLAGS), buf);
		}
	}
	
	private static void getTypeSignatureLabel(String typeSig, long flags, StringBuffer buf) {
		int sigKind= Signature.getTypeSignatureKind(typeSig);
		if (sigKind == Signature.BASE_TYPE_SIGNATURE) {
			buf.append(Signature.toString(typeSig));
		} else if (sigKind == Signature.ARRAY_TYPE_SIGNATURE) {
			getTypeSignatureLabel(Signature.getElementType(typeSig), flags, buf);
			for (int dim= Signature.getArrayCount(typeSig); dim > 0; dim--) {
				buf.append('[').append(']');
			}
		} else if (sigKind == Signature.CLASS_TYPE_SIGNATURE) {
			String baseType= Signature.toString(Signature.getTypeErasure(typeSig));
			buf.append(Signature.getSimpleName(baseType));
			
			String[] typeArguments= Signature.getTypeArguments(typeSig);
			getTypeArgumentSignaturesLabel(typeArguments, flags, buf);
		} else if (sigKind == Signature.TYPE_VARIABLE_SIGNATURE) {
			buf.append(Signature.toString(typeSig));
		}
	}
	
	private static void getTypeArgumentSignaturesLabel(String[] typeArgsSig, long flags, StringBuffer buf) {