Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkaufman2005-07-26 23:03:24 +0000
committermkaufman2005-07-26 23:03:24 +0000
commit1f110c3776a429c5c16a660065de0c3ffe5e4639 (patch)
treeb23130b807f968daf1d83fdf2f94765dae0cf353 /org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptCompilationParticipant.java
parentfa5043035008baa87658a861702929b4e6cc6033 (diff)
downloadeclipse.jdt.core-1f110c3776a429c5c16a660065de0c3ffe5e4639.tar.gz
eclipse.jdt.core-1f110c3776a429c5c16a660065de0c3ffe5e4639.tar.xz
eclipse.jdt.core-1f110c3776a429c5c16a660065de0c3ffe5e4639.zip
mkaufman. Chagnes required to get the fact that we updated the project's classpath during file-generation back to the AptCompilationParticipant.
DRTs: jdt/apt
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.java21
1 files changed, 19 insertions, 2 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 86c4081236..eedd75e9d2 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
@@ -106,12 +106,17 @@ public class AptCompilationParticipant implements ICompilationParticipant
HashMap<IFile, Set<String>> newDependencies = new HashMap<IFile, Set<String>>();
HashMap<IFile, List<IProblem>> problems = new HashMap<IFile, List<IProblem>>(4);
List<AnnotationProcessorFactory> factories = _factoryLoader.getFactoriesForProject( javaProject );
+ boolean sourcePathChanged = false;
for ( int i = 0; i < buildFiles.length; i++ )
{
APTResult result = APTDispatch.runAPTDuringBuild(
factories,
buildFiles[i],
javaProject );
+
+ // see if APT updated a project's source path
+ sourcePathChanged |= result.getSourcePathChanged();
+
newFiles.addAll( result.getNewFiles() );
deletedFiles.addAll( result.getDeletedFiles() );
newDependencies.put( buildFiles[i], result.getNewDependencies() );
@@ -123,7 +128,13 @@ public class AptCompilationParticipant implements ICompilationParticipant
if ( newFiles.contains( df ) )
deletedFiles.remove( df );
- return new PreBuildCompilationResult( newFiles.toArray( new IFile[ newFiles.size() ] ), deletedFiles.toArray( new IFile[ deletedFiles.size() ] ), newDependencies, problems );
+ //
+ // Bugzilla 103745. When the patch to o.e.jdt.core is commited to CVS,
+ // then we can uncomment the following line and remove the one after
+ // that
+ //
+ //return new PreBuildCompilationResult( newFiles.toArray( new IFile[ newFiles.size() ] ), deletedFiles.toArray( new IFile[ deletedFiles.size() ] ), newDependencies, problems, sourcePathChanged );
+ return new PreBuildCompilationResult( newFiles.toArray( new IFile[ newFiles.size() ] ), deletedFiles.toArray( new IFile[ deletedFiles.size() ] ), newDependencies, problems );
}
/**
@@ -201,8 +212,14 @@ public class AptCompilationParticipant implements ICompilationParticipant
private final static String DOT_JAVA = ".java"; //$NON-NLS-1$
private final static PreBuildCompilationResult EMPTY_PRE_BUILD_COMPILATION_RESULT =
+ //
+ // Bugzilla 103745. When the patch to o.e.jdt.core is commited to CVS,
+ // then we can uncomment the following line and remove the one after
+ // that
+ //
+ //new PreBuildCompilationResult( new IFile[0], new IFile[0], Collections.emptyMap(), Collections.emptyMap(), false );
new PreBuildCompilationResult( new IFile[0], new IFile[0], Collections.emptyMap(), Collections.emptyMap() );
-
+
private final static CompilationParticipantResult GENERIC_COMPILATION_RESULT =
new CompilationParticipantResult();

Back to the top