}
// Create the ImportReference needed to add a
// ProgramElement
ImportReference importRef = new ImportReference(path, new long[] { 0 }, false, 0);
IProgramElement ceNode = new ProgramElement(activeStructureModel, importRef.toString(),
IProgramElement.Kind.IMPORT_REFERENCE, makeLocation(importRef), 0, null, null);
ceNode.setSourceSignature(genSourceSignature(importRef));
// Add Element to Imports of Current Class
ProgramElement imports = getImportReferencesRoot();// (ProgramElement) ((IProgramElement)
// stack.peek()).getChildren().get(0);
imports.addChild(0, ceNode);
}
}
}
}
int typeModifiers = typeDeclaration.modifiers;
if (typeDeclaration instanceof AspectDeclaration) {
typeModifiers = ((AspectDeclaration) typeDeclaration).getDeclaredModifiers();
}
IProgramElement peNode = new ProgramElement(activeStructureModel, name, kind, makeLocation(typeDeclaration), typeModifiers,
null, null);
peNode.setSourceSignature(genSourceSignature(typeDeclaration));
peNode.setFormalComment(generateJavadocComment(typeDeclaration));
peNode.setAnnotationStyleDeclaration(isAnnotationStyleAspect);
((IProgramElement) stack.peek()).addChild(peNode);
stack.push(peNode);
return true;
}