addBeansFromComponent(component, beans);
}
}
private IAopProject buildAopReferencesForFile(IFile currentFile, IProgressMonitor monitor) {
IAopProject aopProject = null;
IBeansProject project = BeansCorePlugin.getModel().getProject(currentFile.getProject());
if (project != null) {
IBeansConfig config = project.getConfig(currentFile, true);
IJavaProject javaProject = JdtUtils.getJavaProject(project.getProject());
if (javaProject != null && config != null) {
// long start = System.currentTimeMillis();
aopProject = ((AopReferenceModel) Activator.getModel()).getProjectWithInitialization(javaProject);
aopProject.clearReferencesForResource(currentFile);
// AopLog.log(AopLog.BUILDER_CLASSPATH, Activator.getFormattedMessage(
// "AopReferenceModelBuilder.aopBuilderClassPath", StringUtils.arrayToDelimitedString(
// ((URLClassLoader) classLoaderSupport.getProjectClassLoader()).getURLs(), ";")));
List<IAspectDefinition> aspectInfos = new ArrayList<IAspectDefinition>();
aspectInfos.addAll(buildAspectDefinitions(currentFile));
addAspectInfosFromImport(config, aspectInfos);
// remove references for all definitions
for (IAspectDefinition info : aspectInfos) {
aopProject.clearReferencesForResource(info.getResource());
}
// System.out.println(String.format("-- preparing aop model for file '%s' took '%s'", currentFile,
// (System
// .currentTimeMillis() - start)));