wharley - bug fix: previously generated files not removed on a clean, if there are no processors on the factory path.
diff --git a/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AnnotationProcessorFactoryLoader.java b/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AnnotationProcessorFactoryLoader.java
index 7e84958..cf4cf80 100644
--- a/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AnnotationProcessorFactoryLoader.java
+++ b/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AnnotationProcessorFactoryLoader.java
@@ -367,17 +367,6 @@
}
/**
- * @param javaProj
- * @return <code>true</code> iff there are Annotation Processor Factories associated with
- * the given project
- */
- public synchronized boolean hasFactoriesForProject(IJavaProject javaProj){
- Map<AnnotationProcessorFactory, FactoryPath.Attributes> factories =
- getFactoriesAndAttributesForProject(javaProj);
- return factories != null && !factories.isEmpty();
- }
-
- /**
* Convenience method: get the key set of the map returned by
* @see #getFactoriesAndAttributesForProject(IJavaProject), as a List.
*/
diff --git a/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptCompilationParticipant.java b/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptCompilationParticipant.java
index 8690086..e7a2317 100644
--- a/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptCompilationParticipant.java
+++ b/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptCompilationParticipant.java
@@ -231,13 +231,13 @@
return GENERIC_COMPILATION_RESULT;
}
+ /**
+ * Does APT have anything to do for this project?
+ * Even if there are no processors on the factory path, apt may still
+ * be involved during a clean.
+ */
public boolean doesParticipateInProject(IJavaProject project){
- if (!AptConfig.isEnabled(project)) {
- return false;
- }
-
- return AnnotationProcessorFactoryLoader.getLoader().hasFactoriesForProject(project);
- // TODO: use config to decide which projects we support
+ return AptConfig.isEnabled(project);
}
public void aboutToBuild(IJavaProject project) {