]> source.dussan.org Git - aspectj.git/commitdiff
bug 203384: getting ontype information from the AST
authoraclement <aclement>
Tue, 22 Jan 2008 18:48:29 +0000 (18:48 +0000)
committeraclement <aclement>
Tue, 22 Jan 2008 18:48:29 +0000 (18:48 +0000)
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeFieldDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/InterTypeMethodDeclaration.java

index 15e80d339037cf577672f920e4ef2bd99476dd9d..2f88951b0251dd5bba6fad4b7a45c4e3deeb8296 100644 (file)
@@ -226,8 +226,10 @@ public class AjASTConverter extends ASTConverter {
                        return convert((InterTypeFieldDeclaration) methodDeclaration);
                } else if (methodDeclaration instanceof InterTypeMethodDeclaration){
                        methodDecl = new org.aspectj.org.eclipse.jdt.core.dom.InterTypeMethodDeclaration(this.ast);
+                       ((org.aspectj.org.eclipse.jdt.core.dom.InterTypeMethodDeclaration) methodDecl).setOnType(((InterTypeMethodDeclaration) methodDeclaration).getOnType().toString());
                } else if (methodDeclaration instanceof InterTypeConstructorDeclaration){
                        methodDecl = new org.aspectj.org.eclipse.jdt.core.dom.InterTypeMethodDeclaration(this.ast);
+                       ((org.aspectj.org.eclipse.jdt.core.dom.InterTypeMethodDeclaration) methodDecl).setOnType(((InterTypeConstructorDeclaration) methodDeclaration).getOnType().toString());
                        methodDecl.setConstructor(true);
                } else if (methodDeclaration instanceof PointcutDeclaration){
                        return convert((PointcutDeclaration) methodDeclaration);
@@ -507,6 +509,7 @@ public class AjASTConverter extends ASTConverter {
                if (!(this.resolveBindings && binding == null)) {
                        convert(fieldDecl.javadoc, fieldDeclaration);
                }
+               fieldDeclaration.setOnType(fieldDecl.getOnType().toString());
                return fieldDeclaration;
        }
        public ASTNode convert(PointcutDeclaration pointcutDeclaration) {
index 5307c4bef2996109af6e9ba8a90a248a0d7a448e..80859baf3c5ee49e93425c3d503c4b1f97acc02d 100644 (file)
@@ -27,9 +27,19 @@ package org.aspectj.org.eclipse.jdt.core.dom;
  */
 
 public class InterTypeFieldDeclaration extends FieldDeclaration {
+       private String onType;
+
        InterTypeFieldDeclaration(AST ast) {
                super(ast);
        }
+
+       public String getOnType() { 
+               return onType;
+       }
+       
+       public void setOnType(String onType) {
+               this.onType = onType;
+       }
        
        ASTNode clone0(AST target) {
                InterTypeFieldDeclaration result = new InterTypeFieldDeclaration(target);
index 9daecd31c46a49b0aadbe82986b66e16f694dd5c..9aa4ba9780c2a96b1913ff025b68e2699eebcb2e 100644 (file)
@@ -28,10 +28,20 @@ import org.aspectj.org.eclipse.jdt.core.dom.Type;
  */
 
 public class InterTypeMethodDeclaration extends MethodDeclaration {
+       private String onType;
+       
        InterTypeMethodDeclaration(AST ast) {
                super(ast);
        }
 
+       public String getOnType() { 
+               return onType;
+       }
+       
+       public void setOnType(String onType) {
+               this.onType = onType;
+       }
+
        /* (omit javadoc for this method)
         * Method declared on ASTNode.
         */