Class IncrementalImageBuilder
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.builder.AbstractImageBuilder
org.aspectj.org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder
- All Implemented Interfaces:
ICompilerRequestor, ICompilationUnitLocator
- Direct Known Subclasses:
AjIncrementalImageBuilder
The incremental image builder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanstatic intprotected LinkedHashSet<SourceFile> protected LinkedHashSet<SourceFile> Fields inherited from class AbstractImageBuilder
compiledAllAtOnce, compiler, COMPILER_FACTORY_KEY, filesWithAnnotations, JAVA_PROBLEM_MARKER_ATTRIBUTE_NAMES, javaBuilder, keepStoringProblemMarkers, MAX_AT_ONCE, nameEnvironment, newState, notifier, P_HIGH, P_LOW, P_NORMAL, problemSourceFiles, S_ERROR, S_INFO, S_WARNING, sourceLocations, workQueueModifier and TypeFieldDescriptionprotected booleanprotected Compilerstatic final Stringprotected Map<SourceFile, AnnotationBinding[]> static final String[]protected JavaBuilderprotected booleanstatic intprotected NameEnvironmentprotected Stateprotected BuildNotifierstatic final Integerstatic final Integerstatic final Integerprotected LinkedHashSet<SourceFile> static final Integerstatic final Integerstatic final Integerprotected ClasspathMultiDirectory[]protected WorkQueue -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIncrementalImageBuilder(BatchImageBuilder batchBuilder, CompilationGroup compilationGroup) protectedIncrementalImageBuilder(JavaBuilder javaBuilder) protectedIncrementalImageBuilder(JavaBuilder javaBuilder, State buildState, CompilationGroup compilationGroup) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddAffectedSourceFiles(Set<String> qualifiedSet, Set<String> simpleSet, Set<String> rootSet, Set<String> affectedTypes) protected voidaddDependentsOf(org.eclipse.core.runtime.IPath path, boolean isStructuralChange) protected voidaddDependentsOf(org.eclipse.core.runtime.IPath path, boolean isStructuralChange, Set<String> qualifiedNames, Set<String> simpleNames, Set<String> rootNames) booleanprotected voidprotected booleancheckForClassFileChanges(org.eclipse.core.resources.IResourceDelta binaryDelta, ClasspathMultiDirectory md, int segmentCount) protected booleanclassFileChanged(org.eclipse.core.resources.IFile file, String fileName, byte[] newBytes) protected voidcleanUp()protected voidcompile(SourceFile[] units, SourceFile[] additionalUnits, boolean compilingFirstGroup) protected voiddeleteGeneratedFiles(org.eclipse.core.resources.IFile[] deletedGeneratedFiles) protected voidfindAffectedSourceFiles(org.eclipse.core.resources.IResourceDelta binaryDelta, int segmentCount, StringSet structurallyChangedTypes) protected booleanfindAffectedSourceFiles(org.eclipse.core.resources.IResourceDelta delta, ClasspathLocation[] classFoldersAndJars, org.eclipse.core.resources.IProject prereqProject) protected booleanfindSourceFiles(org.eclipse.core.resources.IResourceDelta delta) protected booleanfindSourceFiles(org.eclipse.core.resources.IResourceDelta sourceDelta, ClasspathMultiDirectory md, int segmentCount) protected voidfinishedWith(String sourceLocator, CompilationResult result, char[] mainTypeName, ArrayList definedTypeNames, ArrayList duplicateTypeNames) protected voidprotected voidremoveClassFile(org.eclipse.core.runtime.IPath typePath, org.eclipse.core.resources.IContainer outputFolder) protected voidprotected voidtoString()protected voidupdateProblemsFor(SourceFile sourceFile, CompilationResult result) protected voidupdateTasksFor(SourceFile sourceFile, CompilationResult result) protected voidwriteClassFileContents(ClassFile classfile, org.eclipse.core.resources.IFile file, String qualifiedFileName, boolean isTopLevelType, SourceFile compilationUnit) Methods inherited from class AbstractImageBuilder
acceptResult, acceptSecondaryType, addAllSourceFiles, compile, copyResource, createFolder, createProblemFor, findSourceFile, fromIFile, getInitalTypeNames, initializeAnnotationProcessorManager, internalException, isExcludedFromProject, newCompiler, notifyParticipants, processAnnotations, recordParticipantResult, storeProblemsFor, storeTasksFor, writeClassFileModifier and TypeMethodDescriptionvoidacceptResult(CompilationResult result) Accept a compilation result.protected voidacceptSecondaryType(ClassFile classFile) protected voidaddAllSourceFiles(LinkedHashSet<SourceFile> sourceFiles) protected voidcompile(SourceFile[] units) protected voidcopyResource(org.eclipse.core.resources.IResource source, org.eclipse.core.resources.IResource destination) protected org.eclipse.core.resources.IContainercreateFolder(org.eclipse.core.runtime.IPath packagePath, org.eclipse.core.resources.IContainer outputFolder) protected voidcreateProblemFor(org.eclipse.core.resources.IResource resource, IMember javaElement, String message, String problemSeverity) protected SourceFilefindSourceFile(org.eclipse.core.resources.IFile file, boolean mustExist) fromIFile(org.eclipse.core.resources.IFile file) protected String[]getInitalTypeNames(SourceFile[] units) protected voidinitializeAnnotationProcessorManager(Compiler newCompiler) protected RuntimeExceptioninternalException(org.eclipse.core.runtime.CoreException t) protected booleanisExcludedFromProject(org.eclipse.core.runtime.IPath childPath) protected Compilerprotected CompilationParticipantResult[]notifyParticipants(SourceFile[] unitsAboutToCompile) protected voidprocessAnnotations(CompilationParticipantResult[] results) protected voidprotected voidstoreProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems) Creates a marker from each problem and adds it to the resource.protected voidstoreTasksFor(SourceFile sourceFile, CategorizedProblem[] tasks) protected char[]writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ICompilerRequestor
endBatch, flushBatch, startBatchModifier and TypeMethodDescriptiondefault voidendBatch()ifICompilerRequestor.startBatch()was called then endBatch is called to finalize possibly multipleICompilerRequestor.acceptResult(CompilationResult)default voidOptionally called after someICompilerRequestor.acceptResult(CompilationResult)to signal a good point in timedefault voidOptionally called to start multipleICompilerRequestor.acceptResult(CompilationResult)
-
Field Details
-
sourceFiles
-
previousSourceFiles
-
qualifiedStrings
-
simpleStrings
-
rootStrings
-
secondaryTypesToRemove
-
hasStructuralChanges
protected boolean hasStructuralChanges -
makeOutputFolderConsistent
protected boolean makeOutputFolderConsistent -
MaxCompileLoop
public static int MaxCompileLoop
-
-
Constructor Details
-
IncrementalImageBuilder
protected IncrementalImageBuilder(JavaBuilder javaBuilder, State buildState, CompilationGroup compilationGroup) -
IncrementalImageBuilder
-
IncrementalImageBuilder
protected IncrementalImageBuilder(BatchImageBuilder batchBuilder, CompilationGroup compilationGroup)
-
-
Method Details
-
build
public boolean build(Map<org.eclipse.core.resources.IProject, org.eclipse.core.resources.IResourceDelta> deltas) -
buildAfterBatchBuild
protected void buildAfterBatchBuild() -
addAffectedSourceFiles
protected void addAffectedSourceFiles() -
addAffectedSourceFiles
-
addDependentsOf
protected void addDependentsOf(org.eclipse.core.runtime.IPath path, boolean isStructuralChange) -
addDependentsOf
-
checkForClassFileChanges
protected boolean checkForClassFileChanges(org.eclipse.core.resources.IResourceDelta binaryDelta, ClasspathMultiDirectory md, int segmentCount) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
cleanUp
protected void cleanUp()- Overrides:
cleanUpin classAbstractImageBuilder
-
compile
protected void compile(SourceFile[] units, SourceFile[] additionalUnits, boolean compilingFirstGroup) - Overrides:
compilein classAbstractImageBuilder
-
deleteGeneratedFiles
protected void deleteGeneratedFiles(org.eclipse.core.resources.IFile[] deletedGeneratedFiles) - Overrides:
deleteGeneratedFilesin classAbstractImageBuilder
-
findAffectedSourceFiles
protected boolean findAffectedSourceFiles(org.eclipse.core.resources.IResourceDelta delta, ClasspathLocation[] classFoldersAndJars, org.eclipse.core.resources.IProject prereqProject) -
findAffectedSourceFiles
protected void findAffectedSourceFiles(org.eclipse.core.resources.IResourceDelta binaryDelta, int segmentCount, StringSet structurallyChangedTypes) -
findSourceFiles
protected boolean findSourceFiles(org.eclipse.core.resources.IResourceDelta delta) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
findSourceFiles
protected boolean findSourceFiles(org.eclipse.core.resources.IResourceDelta sourceDelta, ClasspathMultiDirectory md, int segmentCount) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
finishedWith
protected void finishedWith(String sourceLocator, CompilationResult result, char[] mainTypeName, ArrayList definedTypeNames, ArrayList duplicateTypeNames) - Overrides:
finishedWithin classAbstractImageBuilder
-
processAnnotationResults
- Specified by:
processAnnotationResultsin classAbstractImageBuilder
-
removeClassFile
protected void removeClassFile(org.eclipse.core.runtime.IPath typePath, org.eclipse.core.resources.IContainer outputFolder) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
removeSecondaryTypes
protected void removeSecondaryTypes() throws org.eclipse.core.runtime.CoreException- Throws:
org.eclipse.core.runtime.CoreException
-
resetCollections
protected void resetCollections() -
updateProblemsFor
protected void updateProblemsFor(SourceFile sourceFile, CompilationResult result) throws org.eclipse.core.runtime.CoreException - Overrides:
updateProblemsForin classAbstractImageBuilder- Throws:
org.eclipse.core.runtime.CoreException
-
updateTasksFor
protected void updateTasksFor(SourceFile sourceFile, CompilationResult result) throws org.eclipse.core.runtime.CoreException - Overrides:
updateTasksForin classAbstractImageBuilder- Throws:
org.eclipse.core.runtime.CoreException
-
writeClassFileContents
protected void writeClassFileContents(ClassFile classfile, org.eclipse.core.resources.IFile file, String qualifiedFileName, boolean isTopLevelType, SourceFile compilationUnit) throws org.eclipse.core.runtime.CoreException - Specified by:
writeClassFileContentsin classAbstractImageBuilder- Throws:
org.eclipse.core.runtime.CoreException- See Also:
-
classFileChanged
protected boolean classFileChanged(org.eclipse.core.resources.IFile file, String fileName, byte[] newBytes) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
toString
-