Bug 85148

Summary: Annotation type member deletion via IBuffer.setContents - incomplete JDT delta
Product: [Eclipse Project] JDT Reporter: Alexander Pavlov <Alexander.Pavlov>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Alexander Pavlov CLA 2005-02-14 10:47:21 EST
(3.1M4) The testcase is MyAnnotationType.java with the following contents:
package package1.packageTp1;

/**
 * MyAnnotationType annotation type.
 */
@interface MyAnnotationType {

	int field2 = 0;

 	String method1();

}

Deletion of "method1" via setting the CU's buffer contents 
(IBuffer.setContents, IBuffer.save) does not fire "method1 [-]" in the JDT 
delta, only "MyAnnotationType(cu) [*]" comes in.
Comment 1 Jerome Lanneluc CLA 2005-02-14 10:50:45 EST
Do you call ICompilationUnit#reconcile(...) after setting the buffer contents ?
Comment 2 Alexander Pavlov CLA 2005-02-15 04:45:58 EST
Sorry, my fault. I thought I was working with the primary CU there, so I didn't 
call reconcile(...) but it turned out to be a working copy. Thanks.
Comment 3 Jerome Lanneluc CLA 2005-02-15 05:03:09 EST
No problem. Closing then.