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(CONCAT_STRING);
			getPackageFragmentRootLabel(root, ROOT_QUALIFIED, buf);
		}
	}
	private static final boolean BUG_85811= true;
	
	/**
	 * Appends the label for a method to a {@link StringBuffer}. Considers the M_* flags.
	 * 	@param method The element to render.
	 * @param flags The rendering flags. Flags with names starting with 'M_' are considered.
	 * @param buf The buffer to append the resulting label to.
	 */		
	public static void getMethodLabel(IMethod method, long flags, StringBuffer buf) {
		try {
			BindingKey resolvedKey= getFlag(flags, USE_RESOLVED) && method.isResolved() ? new BindingKey(method.getKey()) : null;
			String resolvedSig= (resolvedKey != null && !BUG_85811) ? resolvedKey.toSignature() : null;
			
			
			if (getFlag(flags, M_PRE_TYPE_PARAMETERS) && method.exists()) {
				if (resolvedKey != null) {
					String[] typeArgRefs= resolvedKey.getTypeArguments();
					if (typeArgRefs.length > 0) {
						getTypeArgumentSignaturesLabel(typeArgRefs, flags, buf);
						buf.append(' ');
					}
				} else {
					ITypeParameter[] typeParameters= method.getTypeParameters();
					if (typeParameters.length > 0) {
						getTypeParametersLabel(typeParameters, flags, buf);
						buf.append(' ');