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
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.jdt.core.BindingKey;
import org.eclipse.jdt.core.ClasspathContainerInitializer;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IInitializer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.ILocalVariable;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeParameter;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
/**
 * <code>JavaElementLabels</code> provides helper methods to render names of Java elements.
 * 
 * @since 3.1
 */
public class JavaElementLabels {