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
getPackageFragmentLabel(type.getPackageFragment(), flags & QUALIFIER_FLAGS, buf);
			}
		}
	}
	/**
	 * Appends the label for a import container, import or package declaration to a {@link StringBuffer}. Considers the D_* flags.
	 * 	@param declaration The element to render.
	 * @param flags The rendering flags. Flags with names starting with 'D_' are considered.
	 * @param buf The buffer to append the resulting label to.
	 */	
	public static void getDeclararionLabel(IJavaElement declaration, long flags, StringBuffer buf) {
		if (getFlag(flags, D_QUALIFIED)) {
			IJavaElement openable= (IJavaElement) declaration.getOpenable();
			if (openable != null) {
				buf.append(getElementLabel(openable, CF_QUALIFIED | CU_QUALIFIED | (flags & QUALIFIER_FLAGS)));
				buf.append('/');
			}	
		}
		if (declaration.getElementType() == IJavaElement.IMPORT_CONTAINER) {
			buf.append(JavaUIMessages.getString("JavaElementLabels.import_container")); 
		} else {
			buf.append(declaration.getElementName());
		}
		
		if (getFlag(flags, D_POST_QUALIFIED)) {
			IJavaElement openable= (IJavaElement) declaration.getOpenable();
			if (openable != null) {
				buf.append(CONCAT_STRING);
				buf.append(getElementLabel(openable, CF_QUALIFIED | CU_QUALIFIED | (flags & QUALIFIER_FLAGS)));
			}