diff options
author | Jesse Garms | 2005-08-05 18:34:22 +0000 |
---|---|---|
committer | Jesse Garms | 2005-08-05 18:34:22 +0000 |
commit | 06941e026ea4dbfbd7f404b306f62a143ee43165 (patch) | |
tree | 3abd9bf3bbb916fce4ba7871c913d9455d219fbe /org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptCompilationParticipant.java | |
parent | dbb24333d1a9f6e740de2fc6e65eb72985f1b637 (diff) | |
download | eclipse.jdt.core-06941e026ea4dbfbd7f404b306f62a143ee43165.tar.gz eclipse.jdt.core-06941e026ea4dbfbd7f404b306f62a143ee43165.tar.xz eclipse.jdt.core-06941e026ea4dbfbd7f404b306f62a143ee43165.zip |
jgarms:
Bug 102252 disabling APT may leave crumbs.
Submitting patch by Daniel Somerfield that allows APT to perform a clean after it's been disabled, and properly listen at the workspace level for config changes.
Also re-enable reconcile type generation tests.
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.java | 30 |
1 files changed, 18 insertions, 12 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 331beb0a3e..43f44b3be1 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 @@ -70,23 +70,29 @@ public class AptCompilationParticipant implements ICompilationParticipant public CompilationParticipantResult notify( CompilationParticipantEvent cpe ) { - if (!AptConfig.isEnabled(cpe.getJavaProject())) + // We need to clean even if we have been disabled. This allows + // us to remove our generated source files if we get disabled + if ( cpe.getKind() == ICompilationParticipant.CLEAN_EVENT ) { + return cleanNotify( cpe ); + } + else if (!AptConfig.isEnabled(cpe.getJavaProject())) { return GENERIC_COMPILATION_RESULT; - - if ( cpe == null ) + } + else if ( cpe == null ) { return GENERIC_COMPILATION_RESULT; - - else if ( cpe.getKind() == ICompilationParticipant.PRE_BUILD_EVENT ) + } + else if ( cpe.getKind() == ICompilationParticipant.PRE_BUILD_EVENT ) { return preBuildNotify( (PreBuildCompilationEvent) cpe ); - - else if ( cpe.getKind() == ICompilationParticipant.POST_RECONCILE_EVENT ) + } + else if ( cpe.getKind() == ICompilationParticipant.POST_RECONCILE_EVENT ) { return postReconcileNotify( (PostReconcileCompilationEvent) cpe ); - else if ( cpe.getKind() == ICompilationParticipant.CLEAN_EVENT ) - return cleanNotify( cpe ); - else if ( cpe.getKind() == ICompilationParticipant.BROKEN_CLASSPATH_BUILD_FAILURE_EVENT) + } + else if ( cpe.getKind() == ICompilationParticipant.BROKEN_CLASSPATH_BUILD_FAILURE_EVENT) { return brokenClasspathBuildFailureNotify( (BrokenClasspathBuildFailureEvent) cpe ); - else - return GENERIC_COMPILATION_RESULT; + } + else { + return GENERIC_COMPILATION_RESULT; + } } private CompilationParticipantResult preBuildNotify( PreBuildCompilationEvent pbce ) |