aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/src
diff options
context:
space:
mode:
authoraclement <aclement>2006-12-16 16:12:14 +0000
committeraclement <aclement>2006-12-16 16:12:14 +0000
commit8ee3d8eeae145e60e42eaeb039fc9054d727246e (patch)
treeb9a615060ee2064930d7972553ac45b9f31f2552 /org.aspectj.ajdt.core/src
parentc2abdf7c6f1e64e53632a8873e9c5b26c995aa01 (diff)
downloadaspectj-8ee3d8eeae145e60e42eaeb039fc9054d727246e.tar.gz
aspectj-8ee3d8eeae145e60e42eaeb039fc9054d727246e.zip
AST contributions: bug 110465
Diffstat (limited to 'org.aspectj.ajdt.core/src')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java87
1 files changed, 85 insertions, 2 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java
index 074c2ea00..ec9ce932b 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java
@@ -41,7 +41,7 @@ public class AjNaiveASTFlattener extends AjASTVisitor {
* The string buffer into which the serialized representation of the AST is
* written.
*/
- private StringBuffer buffer;
+ protected StringBuffer buffer;
private int indent = 0;
@@ -523,7 +523,7 @@ public class AjNaiveASTFlattener extends AjASTVisitor {
buffer.append(", ");
}
buffer.append("):");
- buffer.append(((DefaultPointcut)node.getDesignator()).getDetail());
+ node.getDesignator().accept(this);
buffer.append(";\n");
return false;
}
@@ -1646,4 +1646,87 @@ public class AjNaiveASTFlattener extends AjASTVisitor {
return false;
}
+ public boolean visit(DeclareParentsDeclaration node) {
+ printIndent();
+ this.buffer.append("declare parents: ");
+ node.getChildTypePattern().accept(this);
+
+ if(node.isExtends()){
+ this.buffer.append(" extends ");
+ } else {
+ this.buffer.append(" implements ");
+ }
+
+ for (Iterator it = node.parentTypePatterns().iterator(); it.hasNext();) {
+ TypePattern typePat = (TypePattern) it.next();
+ typePat.accept(this);
+ if(it.hasNext()){
+ this.buffer.append(", ");
+ }
+ }
+
+ this.buffer.append(";\n");
+
+ return false;
+ }
+
+ public boolean visit(DeclareWarningDeclaration node) {
+ printIndent();
+
+ this.buffer.append("declare warning: ");
+ node.getPointcut().accept(this);
+ this.buffer.append(" : ");
+ node.getMessage().accept(this);
+ this.buffer.append(" ;\n");
+ return false;
+ }
+
+ public boolean visit(DeclareErrorDeclaration node) {
+ printIndent();
+
+ this.buffer.append("declare error: ");
+ node.getPointcut().accept(this);
+ this.buffer.append(" : ");
+ node.getMessage().accept(this);
+ this.buffer.append(" ;\n");
+ return false;
+ }
+
+ public boolean visit(DeclareSoftDeclaration node) {
+ printIndent();
+
+ this.buffer.append("declare soft: ");
+ node.getTypePattern().accept(this);
+ this.buffer.append(" : ");
+ node.getPointcut().accept(this);
+ this.buffer.append(" ;\n");
+ return false;
+ }
+
+ public boolean visit(DeclarePrecedenceDeclaration node) {
+ printIndent();
+
+ this.buffer.append("declare precedence: ");
+ for (Iterator it = node.typePatterns().iterator(); it.hasNext();) {
+ TypePattern typePat = (TypePattern) it.next();
+ typePat.accept(this);
+ if(it.hasNext()){
+ this.buffer.append(", ");
+ }
+ }
+
+ this.buffer.append(";\n");
+
+ return false;
+ }
+
+ public boolean visit(DefaultTypePattern node) {
+ this.buffer.append(node.getDetail());
+ return false;
+ }
+
+ public boolean visit(DefaultPointcut node) {
+ this.buffer.append(node.getDetail());
+ return false;
+ }
}