Project: JDT
Bug 84338 Annotation type member removal issues
Reported: 2005-02-03 10:55:39 | Status: resolved fixed

(3.1M4) The testcase is MyAnnotationType.java with the following contents: package package1.packageTp1; /** * MyAnnotationType annotation type. */ @interface MyAnnotationType { int field2 = 0; String method1(); } Select "method1" in the Outline view and try to delete it. All attempts fail. Deletion via setting the CU's buffer contents (IBuffer.setContents, IBuffer.save) does not fire correct JDT delta, only "MyAnnotationType(cu) [*]" comes in, no "method1 [-]". Running the DeleteRefactoring on "method1" ends in this: org.eclipse.jface.util.Assert$AssertionFailedException: Assertion failed: Search for method declaration did not find original element at org.eclipse.jface.util.Assert.isTrue(Assert.java:180) at org.eclipse.jdt.internal.corext.refactoring.rename.RippleMethodFinder2.getAllRip pleMethods(RippleMethodFinder2.java:136) at org.eclipse.jdt.internal.corext.refactoring.rename.RippleMethodFinder2.getRelate dMethods(RippleMethodFinder2.java:123) at org.eclipse.jdt.internal.corext.refactoring.rename.RenameMethodProcessor.initial izeMethodsToRename(RenameMethodProcessor.java:162) at org.eclipse.jdt.internal.corext.refactoring.rename.RenameMethodProcessor.checkFi nalConditions(RenameMethodProcessor.java:258) at org.eclipse.jdt.internal.corext.refactoring.rename.RenameVirtualMethodProcessor. checkFinalConditions(RenameVirtualMethodProcessor.java:91) at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFin alConditions(ProcessorBasedRefactoring.java:153)

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ASTNodeDeleteUtil.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ASTNodeSearchUtil.java