Quellcode durchsuchen

declare -> declareDecl for ajc

tags/mostlyLastEclipse2xTree_20040112
wisberg vor 20 Jahren
Ursprung
Commit
2c735c83fc

+ 11
- 11
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/DeclareDeclaration.java Datei anzeigen

@@ -26,7 +26,7 @@ import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
import org.eclipse.jdt.internal.compiler.parser.Parser;

public class DeclareDeclaration extends MethodDeclaration {
public Declare declare;
public Declare declareDecl;

/**
* Constructor for IntraTypeDeclaration.
@@ -34,12 +34,12 @@ public class DeclareDeclaration extends MethodDeclaration {
static int counter = 0; //XXX evil
public DeclareDeclaration(CompilationResult result, Declare symbolicDeclare) {
super(result);
this.declare = symbolicDeclare;
if (declare != null) {
this.declareDecl = symbolicDeclare;
if (declareDecl != null) {
// AMC added init of declarationSourceXXX fields which are used
// in AsmBuilder for processing of MethodDeclaration locations.
declarationSourceStart = sourceStart = declare.getStart();
declarationSourceEnd = sourceEnd = declare.getEnd();
declarationSourceStart = sourceStart = declareDecl.getStart();
declarationSourceEnd = sourceEnd = declareDecl.getEnd();
}
//??? we might need to set parameters to be empty
this.returnType = TypeReference.baseTypeReference(T_void, 0);
@@ -53,7 +53,7 @@ public class DeclareDeclaration extends MethodDeclaration {
* method.
*/
public void generateCode(ClassScope classScope, ClassFile classFile) {
classFile.extraAttributes.add(new EclipseAttributeAdapter(new AjAttribute.DeclareAttribute(declare)));
classFile.extraAttributes.add(new EclipseAttributeAdapter(new AjAttribute.DeclareAttribute(declareDecl)));
return;
}

@@ -80,12 +80,12 @@ public class DeclareDeclaration extends MethodDeclaration {

public Declare build(ClassScope classScope) {
if (declare == null) return null;
if (declareDecl == null) return null;
EclipseScope scope = new EclipseScope(new FormalBinding[0], classScope);

declare.resolve(scope);
return declare;
declareDecl.resolve(scope);
return declareDecl;
}


@@ -94,7 +94,7 @@ public class DeclareDeclaration extends MethodDeclaration {


public String toString(int tab) {
if (declare == null) return tabString(tab) + "<declare>";
else return tabString(tab) + declare.toString();
if (declareDecl == null) return tabString(tab) + "<declare>";
else return tabString(tab) + declareDecl.toString();
}
}

+ 8
- 8
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java Datei anzeigen

@@ -79,8 +79,8 @@ public class AsmElementFormatter {
} else if (methodDeclaration instanceof DeclareDeclaration) {
DeclareDeclaration declare = (DeclareDeclaration)methodDeclaration;
String name = DEC_LABEL + " ";
if (declare.declare instanceof DeclareErrorOrWarning) {
DeclareErrorOrWarning deow = (DeclareErrorOrWarning)declare.declare;
if (declare.declareDecl instanceof DeclareErrorOrWarning) {
DeclareErrorOrWarning deow = (DeclareErrorOrWarning)declare.declareDecl;
if (deow.isError()) {
node.setKind( IProgramElement.Kind.DECLARE_ERROR);
@@ -92,21 +92,21 @@ public class AsmElementFormatter {
node.setName(name) ;
node.setDetails("\"" + genDeclareMessage(deow.getMessage()) + "\"");
} else if (declare.declare instanceof DeclareParents) {
} else if (declare.declareDecl instanceof DeclareParents) {
node.setKind( IProgramElement.Kind.DECLARE_PARENTS);
DeclareParents dp = (DeclareParents)declare.declare;
DeclareParents dp = (DeclareParents)declare.declareDecl;
node.setName(name + DECLARE_PARENTS);
node.setDetails(genTypePatternLabel(dp.getChild()));
} else if (declare.declare instanceof DeclareSoft) {
} else if (declare.declareDecl instanceof DeclareSoft) {
node.setKind( IProgramElement.Kind.DECLARE_SOFT);
DeclareSoft ds = (DeclareSoft)declare.declare;
DeclareSoft ds = (DeclareSoft)declare.declareDecl;
node.setName(name + DECLARE_SOFT);
node.setDetails(genTypePatternLabel(ds.getException()));
} else if (declare.declare instanceof DeclarePrecedence) {
} else if (declare.declareDecl instanceof DeclarePrecedence) {
node.setKind( IProgramElement.Kind.DECLARE_PRECEDENCE);
DeclarePrecedence ds = (DeclarePrecedence)declare.declare;
DeclarePrecedence ds = (DeclarePrecedence)declare.declareDecl;
node.setName(name + DECLARE_PRECEDENCE);
node.setDetails(genPrecedenceListLabel(ds.getPatterns()));

Laden…
Abbrechen
Speichern