Bug 203384

Summary: AST: Type information not exposed on itmd, itfd...
Product: [Tools] AspectJ Reporter: Alexei Svitkine <alexei.svitkine>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aclement
Version: 1.5.3   
Target Milestone: 1.6.0 M2   
Hardware: PC   
OS: All   
Whiteboard:

Description Alexei Svitkine CLA 2007-09-13 19:22:16 EDT
The Types:

org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java
org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java

Which can be returned by visiting the AjAST tree do not expose the name of the type on which the method or field is added. I require this information in the project I'm currently working on, and would appreciate if it was added.
Comment 1 Alexei Svitkine CLA 2007-09-13 20:06:01 EDT
The following modifications achieve what I want. I suggest them to be added to the codebase:

Index: org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
===================================================================
RCS file: /cvsroot/tools/org.aspectj/modules/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java,v
retrieving revision 1.8
diff -r1.8 AjASTConverter.java
227a228
>                       ((org.aspectj.org.eclipse.jdt.core.dom.InterTypeMethodDeclaration) methodDecl).setOnType(((InterTypeMethodDeclaration) methodDeclaration).getOnType().toString());
229a231
>                       ((org.aspectj.org.eclipse.jdt.core.dom.InterTypeMethodDeclaration) methodDecl).setOnType(((InterTypeMethodDeclaration) methodDeclaration).getOnType().toString());
508a511
>               fieldDeclaration.setOnType(fieldDecl.getOnType().toString());
Index: org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java
===================================================================
RCS file: /cvsroot/tools/org.aspectj/modules/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java,v
retrieving revision 1.2
diff -r1.2 InterTypeFieldDeclaration.java
29a30,31
>       private String onType;
> 
65a68,75
> 
>       public String getOnType() {
>               return onType;
>       }
> 
>       public void setOnType(String onType) {
>               this.onType = onType;
>       }
Index: org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java
===================================================================
RCS file: /cvsroot/tools/org.aspectj/modules/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java,v
retrieving revision 1.3
diff -r1.3 InterTypeMethodDeclaration.java
30a31,32
>       private String onType;
> 
94a97,104
> 
>       public String getOnType() {
>               return onType;
>       }
> 
>       public void setOnType(String onType) {
>               this.onType = onType;
>       }
Comment 2 Andrew Clement CLA 2008-01-22 13:48:56 EST
changes are in - sorry it took so long.  they will be in a dev build later today.