### Eclipse Workspace Patch 1.0 #P org.eclipse.pde.api.tools.tests Index: src/org/eclipse/pde/api/tools/builder/tests/compatibility/ConstructorCompatibilityTests.java =================================================================== RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/compatibility/ConstructorCompatibilityTests.java,v retrieving revision 1.9 diff -u -r1.9 ConstructorCompatibilityTests.java --- src/org/eclipse/pde/api/tools/builder/tests/compatibility/ConstructorCompatibilityTests.java 9 Sep 2008 20:24:36 -0000 1.9 +++ src/org/eclipse/pde/api/tools/builder/tests/compatibility/ConstructorCompatibilityTests.java 27 Apr 2009 19:52:34 -0000 @@ -267,7 +267,7 @@ }; setExpectedProblemIds(ids); String[][] args = new String[1][]; - args[0] = new String[]{PACKAGE_PREFIX + "AddTypeParameter.AddTypeParameter(Object)", "U"}; + args[0] = new String[]{PACKAGE_PREFIX + "AddTypeParameter.AddTypeParameter(T)", "U"}; setExpectedMessageArgs(args); performCompatibilityTest(filePath, incremental); } @@ -294,7 +294,7 @@ }; setExpectedProblemIds(ids); String[][] args = new String[1][]; - args[0] = new String[]{PACKAGE_PREFIX + "RemoveTypeParameter.RemoveTypeParameter(Object)", "U"}; + args[0] = new String[]{PACKAGE_PREFIX + "RemoveTypeParameter.RemoveTypeParameter(T)", "U"}; setExpectedMessageArgs(args); performCompatibilityTest(filePath, incremental); } Index: src/org/eclipse/pde/api/tools/builder/tests/compatibility/MissingSinceTagTests.java =================================================================== RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/compatibility/MissingSinceTagTests.java,v retrieving revision 1.4 diff -u -r1.4 MissingSinceTagTests.java --- src/org/eclipse/pde/api/tools/builder/tests/compatibility/MissingSinceTagTests.java 1 Dec 2008 16:31:33 -0000 1.4 +++ src/org/eclipse/pde/api/tools/builder/tests/compatibility/MissingSinceTagTests.java 27 Apr 2009 19:52:34 -0000 @@ -54,6 +54,22 @@ setExpectedMessageArgs(args); } /** + * Tests adding a generic method + */ + private void xAddMethod2(boolean incremental) throws Exception { + IPath filePath = WORKSPACE_CLASSES_PACKAGE_A.append("AddMethod2.java"); + configureExpectedProblems(IDelta.METHOD_ELEMENT_TYPE, "foo(List)"); + performCompatibilityTest(filePath, incremental); + } + + public void testAddMethod2I() throws Exception { + xAddMethod2(true); + } + + public void testAddMethod2F() throws Exception { + xAddMethod2(false); + } + /** * Tests adding a non-visible method */ private void xAddNonVisibleMethod2(boolean incremental) throws Exception { @@ -205,5 +221,5 @@ public void testAddTypeF() throws Exception { xAddType(false); - } + } } Index: test-builder/compat/since/AddMethod2.java =================================================================== RCS file: test-builder/compat/since/AddMethod2.java diff -N test-builder/compat/since/AddMethod2.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ test-builder/compat/since/AddMethod2.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2008 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package a.since; + +import java.util.List; +/** + * @noextend This class is not intended to be subclassed by clients. + */ +public class AddMethod2 { + + public void foo(List a) { + } +} Index: test-builder/baseline/bundle.a/src/a/since/AddMethod2.java =================================================================== RCS file: test-builder/baseline/bundle.a/src/a/since/AddMethod2.java diff -N test-builder/baseline/bundle.a/src/a/since/AddMethod2.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ test-builder/baseline/bundle.a/src/a/since/AddMethod2.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2008 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package a.since; + +/** + * @noextend This class is not intended to be subclassed by clients. + */ +public class AddMethod2 { + +} #P org.eclipse.pde.api.tools Index: src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java =================================================================== RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java,v retrieving revision 1.84 diff -u -r1.84 ClassFileComparator.java --- src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java 1 Apr 2009 16:05:46 -0000 1.84 +++ src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java 27 Apr 2009 19:52:35 -0000 @@ -2787,22 +2787,20 @@ } private String getMethodDisplayName(IApiMethod method, IApiType type) { - String methodName = method.getName(); + String methodName = null; if (method.isConstructor()) { - String typeName = type.getName(); - int index = typeName.lastIndexOf('.'); - if (index == -1) { - methodName = typeName; - } else { - int index2 = typeName.lastIndexOf('$'); - if (index2 > index) { - methodName = typeName.substring(index2 + 1); - } else { - methodName = typeName.substring(index + 1); - } - } + methodName = type.getSimpleName(); + } else { + methodName = method.getName(); + } + String signature = null; + String genericSignature = method.getGenericSignature(); + if (genericSignature != null) { + signature = genericSignature; + } else { + signature = method.getSignature(); } - return Signature.toString(method.getSignature(), methodName, null, false, false); + return Signature.toString(signature, methodName, null, false, false); } private SignatureDescriptor getSignatureDescriptor(String signature) {