Bug 149074

Summary: No F_CONTENT flag on delta when using auto complete w/ annotation
Product: [Eclipse Project] JDT Reporter: Paul Fullbright <paul.fullbright>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: david_audel
Version: 3.2   
Target Milestone: 3.4 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Paul Fullbright CLA 2006-06-28 16:01:01 EDT
To reproduce (must have ability to capture and observe all java deltas):
- On primary type (works in other situations as well), begin to type in the name of an annotation
- Auto-complete to add annotation and import
- Sample delta:
 [Working copy] TestEntity.java[*]: {CHILDREN | FINE GRAINED | AST AFFECTED}
	<import container>[+]: {}
  Note delta has CHILDREN flag for import added, but no CONTENT flag for annotation change.

Example of correct behavior:
- On primary type type in full name of annotation
- Sample delta:
 [Working copy] TestEntity.java[*]: {CONTENT | FINE GRAINED | AST AFFECTED}
  No import was added, so no CHILDREN flag, but CONTENT is included, as it should also be included above.
Comment 1 Jerome Lanneluc CLA 2007-06-21 10:48:19 EDT
Reproduced with 3.3RC4:
1. Paste the following in a Package Explorer:
package p1;
public @interface MyAnnot {
}

package p2;
public class X {
	
	void foo() {
	}
}
2. In X.java editor, put cursor on the line above 'void foo() {'
3. Paste the following '@MyAnno', press Ctrl+Space then Enter quickly
Observe: You get the following delta:
[Working copy] X.java[*]: {CHILDREN | FINE GRAINED | AST AFFECTED}
	<import container>[+]: {}
Comment 2 Jerome Lanneluc CLA 2007-12-05 12:03:01 EST
Fix for bug 79112 actually fixed this problem. The delta is now:
[Working copy] X.java[*]: {CHILDREN | FINE GRAINED | AST AFFECTED}
	<import container>[+]: {}
	X[*]: {CHILDREN | FINE GRAINED}
		foo()[*]: {ANNOTATIONS}
			@MyAnnot[+]: {}
			@MyAnno[-]: {}


*** This bug has been marked as a duplicate of bug 79112 ***
Comment 3 David Audel CLA 2007-12-11 07:34:52 EST
Verified for 3.4M4 using build I20071210-1800.