Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329925

Summary: Form of declare annotation that removes annotations
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: DEVELOPMENT   
Target Milestone: 1.6.11   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andrew Clement CLA 2010-11-10 12:11:51 EST
Unlike removing entries from a type hierarchy, removing annotations is far less dangerous and addresses some use cases. (eg. you want to switch from some bunch of annotations to another bunch).  So we need something like

  declare @remove_field: int i: @Anno

(syntax not yet decided).
Comment 1 Andrew Clement CLA 2010-11-25 17:06:13 EST
Syntax is

declare @field: int A.i: -@Foo

Tasks still to do:
1) tests for specifying multiple annotations.  Grammar won't allow '-' before each one I think (right now) - should just police it and prevent it for now.
2) police usage of '-' with other annotation declares (constructor/method/type) - error message required (compiler limitation right now)
3) grammar had support for '+' added, need to police that as well with an appropriate error for now
Comment 2 Andrew Clement CLA 2010-11-26 14:54:44 EST
As Andrew discovered - need to do something about values.  Probably -@Foo doesn't allow values to be specified, and shouldn't enforce inclusion of values that have no default.
Comment 3 Andrew Clement CLA 2010-12-09 16:46:31 EST
fixed for 1.6.11 - will need another bug to cover the other declare variants as use cases come up.