Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Garms2005-07-12 18:00:58 +0000
committerJesse Garms2005-07-12 18:00:58 +0000
commit57e6ab81c3cf39fecb76455d174c657f7c273f84 (patch)
treeeb8ce18806d8ef57edb4b10b066d20ef46e1769c /org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptCompilationParticipant.java
parent50edd18aecf53feeb87eedfe2eb9dbbb6ea16224 (diff)
downloadeclipse.jdt.core-57e6ab81c3cf39fecb76455d174c657f7c273f84.tar.gz
eclipse.jdt.core-57e6ab81c3cf39fecb76455d174c657f7c273f84.tar.xz
eclipse.jdt.core-57e6ab81c3cf39fecb76455d174c657f7c273f84.zip
100951 Should not do APT dispatch on non 1.5 projects
Disable APT dispatch on pre-1.5 projects. Also add tests for positive and negative cases.
Diffstat (limited to 'org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptCompilationParticipant.java')
-rw-r--r--org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptCompilationParticipant.java9
1 files changed, 9 insertions, 0 deletions
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 c76aa21de8..39ca5b6301 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
@@ -94,6 +94,15 @@ public class AptCompilationParticipant implements ICompilationParticipant
if ( buildFiles == null || buildFiles.length == 0 )
return EMPTY_PRE_BUILD_COMPILATION_RESULT;
+
+ // Don't dispatch on pre-1.5 project. They cannot legally have annotations
+ String javaVersion = javaProject.getOption("org.eclipse.jdt.core.compiler.source", true);
+
+ // Check for 1.3 or 1.4, as we don't want this to break in the future when 1.6
+ // is a possibility
+ if ("1.3".equals(javaVersion) || "1.4".equals(javaVersion)) {
+ return EMPTY_PRE_BUILD_COMPILATION_RESULT;
+ }
HashSet<IFile> newFiles = new HashSet<IFile>();
HashSet<IFile> deletedFiles = new HashSet<IFile>();

Back to the top