return addToNode;
}
- @Override
public boolean visit(TypeDeclaration typeDeclaration, CompilationUnitScope scope) {
String name = new String(typeDeclaration.name);
IProgramElement.Kind kind = IProgramElement.Kind.CLASS;
return true;
}
- @Override
public void endVisit(TypeDeclaration typeDeclaration, CompilationUnitScope scope) {
// Is there a package declaration to insert into the model?
if (packageDecl != null) {
}
// ??? share impl with visit(TypeDeclaration, ..) ?
- @Override
public boolean visit(TypeDeclaration memberTypeDeclaration, ClassScope scope) {
String name = new String(memberTypeDeclaration.name);
return true;
}
- @Override
public void endVisit(TypeDeclaration memberTypeDeclaration, ClassScope scope) {
stack.pop();
}
- @Override
public boolean visit(TypeDeclaration memberTypeDeclaration, BlockScope scope) {
String fullName = "<undefined>";
if (memberTypeDeclaration.allocation != null && memberTypeDeclaration.allocation.type != null) {
return true;
}
- @Override
public void endVisit(TypeDeclaration memberTypeDeclaration, BlockScope scope) {
stack.pop();
}
// return (IProgramElement) stack.peek();
// }
- @Override
public boolean visit(MethodDeclaration methodDeclaration, ClassScope scope) {
IProgramElement peNode = null;
// For intertype decls, use the modifiers from the original signature,
((IProgramElement) stack.peek()).addChild(peNode);
}
- @Override
public void endVisit(MethodDeclaration methodDeclaration, ClassScope scope) {
stack.pop();
}
- @Override
public boolean visit(ImportReference importRef, CompilationUnitScope scope) {
int dotIndex = importRef.toString().lastIndexOf('.');
String currPackageImport = "";
return (ProgramElement) element.getChildren().get(hasPackageDeclaration ? 1 : 0);
}
- @Override
public void endVisit(ImportReference importRef, CompilationUnitScope scope) {
int dotIndex = importRef.toString().lastIndexOf('.');
String currPackageImport = "";
return output.toString();
}
- @Override
public boolean visit(FieldDeclaration fieldDeclaration, MethodScope scope) {
IProgramElement peNode = null;
if (fieldDeclaration.type == null) { // The field represents an enum
return true;
}
- @Override
public void endVisit(FieldDeclaration fieldDeclaration, MethodScope scope) {
stack.pop();
}
// stack.pop();
// }
- @Override
public boolean visit(ConstructorDeclaration constructorDeclaration, ClassScope scope) {
if ((constructorDeclaration.bits & ASTNode.IsDefaultConstructor) != 0) {
stack.push(null); // a little weird but does the job
return true;
}
- @Override
public void endVisit(ConstructorDeclaration constructorDeclaration, ClassScope scope) {
stack.pop();
}
*/
private Initializer inInitializer = null;
- @Override
public boolean visit(Initializer initializer, MethodScope scope) {
if (initializer == inInitializer) {
return false;