Bug 203384 - AST: Type information not exposed on itmd, itfd...
Summary: AST: Type information not exposed on itmd, itfd...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.3   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 1.6.0 M2   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-13 19:22 EDT by Alexei Svitkine CLA
Modified: 2008-01-22 13:48 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.