for (Object element : ((StructuredSelection) selection).toArray()) {
if (element instanceof IType) {
IType type = (IType) element;
IProject project = type.getJavaProject().getProject();
if (isBeansProject(project) && !isBeansConfig(type)) {
IAnnotation configurationAnnotation = type.getAnnotation("Configuration");
IAnnotation componentAnnotation = type.getAnnotation("Component");
IAnnotation beanAnnotation = type.getAnnotation("Bean");
IAnnotation importAnnotation = type.getAnnotation("Import");
IAnnotation eacAnnotation = type.getAnnotation("EnableAutoConfiguration");
if ((configurationAnnotation != null && configurationAnnotation.exists())
|| (componentAnnotation != null && componentAnnotation.exists())
|| (beanAnnotation != null && beanAnnotation.exists())
|| (importAnnotation != null && importAnnotation.exists())
|| (eacAnnotation != null && eacAnnotation.exists())) {
selectedItems.add(type);
}
}
} else if (element instanceof IFile) {
IFile file = (IFile) element;