org.aspectj.org.eclipse.jdt.internal.core.builder
Class IncrementalImageBuilder

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.builder.AbstractImageBuilder
      extended by org.aspectj.org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder
All Implemented Interfaces:
ICompilerRequestor, ICompilationUnitLocator
Direct Known Subclasses:
AjIncrementalImageBuilder

public class IncrementalImageBuilder
extends AbstractImageBuilder

The incremental image builder


Field Summary
protected  int compileLoop
           
protected  boolean hasStructuralChanges
           
protected  boolean makeOutputFolderConsistent
           
static int MaxCompileLoop
           
protected  java.util.ArrayList previousSourceFiles
           
protected  StringSet qualifiedStrings
           
protected  StringSet rootStrings
           
protected  SimpleLookupTable secondaryTypesToRemove
           
protected  StringSet simpleStrings
           
protected  java.util.ArrayList sourceFiles
           
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.builder.AbstractImageBuilder
compiledAllAtOnce, compiler, filesWithAnnotations, JAVA_PROBLEM_MARKER_ATTRIBUTE_NAMES, JAVA_TASK_MARKER_ATTRIBUTE_NAMES, javaBuilder, keepStoringProblemMarkers, MAX_AT_ONCE, nameEnvironment, newState, notifier, P_HIGH, P_LOW, P_NORMAL, problemSourceFiles, S_ERROR, S_WARNING, sourceLocations, workQueue
 
Constructor Summary
protected IncrementalImageBuilder(BatchImageBuilder batchBuilder)
           
protected IncrementalImageBuilder(JavaBuilder javaBuilder)
           
protected IncrementalImageBuilder(JavaBuilder javaBuilder, State buildState)
           
 
Method Summary
protected  void addAffectedSourceFiles()
           
protected  void addAffectedSourceFiles(StringSet qualifiedSet, StringSet simpleSet, StringSet rootSet, StringSet affectedTypes)
           
protected  void addDependentsOf(IPath path, boolean isStructuralChange)
           
protected  void addDependentsOf(IPath path, boolean isStructuralChange, StringSet qualifiedNames, StringSet simpleNames, StringSet rootNames)
           
 boolean build(SimpleLookupTable deltas)
           
protected  void buildAfterBatchBuild()
           
protected  boolean checkForClassFileChanges(IResourceDelta binaryDelta, org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathMultiDirectory md, int segmentCount)
           
protected  void cleanUp()
           
protected  void compile(SourceFile[] units, SourceFile[] additionalUnits, boolean compilingFirstGroup)
           
protected  void deleteGeneratedFiles(IFile[] deletedGeneratedFiles)
           
protected  boolean findAffectedSourceFiles(IResourceDelta delta, ClasspathLocation[] classFoldersAndJars, IProject prereqProject)
           
protected  void findAffectedSourceFiles(IResourceDelta binaryDelta, int segmentCount, StringSet structurallyChangedTypes)
           
protected  boolean findSourceFiles(IResourceDelta delta)
           
protected  boolean findSourceFiles(IResourceDelta sourceDelta, org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathMultiDirectory md, int segmentCount)
           
protected  void finishedWith(java.lang.String sourceLocator, CompilationResult result, char[] mainTypeName, java.util.ArrayList definedTypeNames, java.util.ArrayList duplicateTypeNames)
           
protected  void processAnnotationResults(CompilationParticipantResult[] results)
           
protected  void removeClassFile(IPath typePath, IContainer outputFolder)
           
protected  void removeSecondaryTypes()
           
protected  void resetCollections()
           
 java.lang.String toString()
           
protected  void updateProblemsFor(SourceFile sourceFile, CompilationResult result)
           
protected  void updateTasksFor(SourceFile sourceFile, CompilationResult result)
           
protected  boolean writeClassFileCheck(IFile file, java.lang.String fileName, byte[] newBytes)
           
protected  void writeClassFileContents(ClassFile classfile, IFile file, java.lang.String qualifiedFileName, boolean isTopLevelType, SourceFile compilationUnit)
           
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.builder.AbstractImageBuilder
acceptResult, acceptSecondaryType, addAllSourceFiles, compile, copyResource, createFolder, createProblemFor, findSourceFile, fromIFile, initializeAnnotationProcessorManager, internalException, isExcludedFromProject, newCompiler, notifyParticipants, processAnnotations, recordParticipantResult, storeProblemsFor, storeTasksFor, writeClassFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sourceFiles

protected java.util.ArrayList sourceFiles

previousSourceFiles

protected java.util.ArrayList previousSourceFiles

qualifiedStrings

protected StringSet qualifiedStrings

simpleStrings

protected StringSet simpleStrings

rootStrings

protected StringSet rootStrings

secondaryTypesToRemove

protected SimpleLookupTable secondaryTypesToRemove

hasStructuralChanges

protected boolean hasStructuralChanges

compileLoop

protected int compileLoop

makeOutputFolderConsistent

protected boolean makeOutputFolderConsistent

MaxCompileLoop

public static int MaxCompileLoop
Constructor Detail

IncrementalImageBuilder

protected IncrementalImageBuilder(JavaBuilder javaBuilder,
                                  State buildState)

IncrementalImageBuilder

protected IncrementalImageBuilder(JavaBuilder javaBuilder)

IncrementalImageBuilder

protected IncrementalImageBuilder(BatchImageBuilder batchBuilder)
Method Detail

build

public boolean build(SimpleLookupTable deltas)

buildAfterBatchBuild

protected void buildAfterBatchBuild()

addAffectedSourceFiles

protected void addAffectedSourceFiles()

addAffectedSourceFiles

protected void addAffectedSourceFiles(StringSet qualifiedSet,
                                      StringSet simpleSet,
                                      StringSet rootSet,
                                      StringSet affectedTypes)

addDependentsOf

protected void addDependentsOf(IPath path,
                               boolean isStructuralChange)

addDependentsOf

protected void addDependentsOf(IPath path,
                               boolean isStructuralChange,
                               StringSet qualifiedNames,
                               StringSet simpleNames,
                               StringSet rootNames)

checkForClassFileChanges

protected boolean checkForClassFileChanges(IResourceDelta binaryDelta,
                                           org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathMultiDirectory md,
                                           int segmentCount)
                                    throws CoreException
Throws:
CoreException

cleanUp

protected void cleanUp()
Overrides:
cleanUp in class AbstractImageBuilder

compile

protected void compile(SourceFile[] units,
                       SourceFile[] additionalUnits,
                       boolean compilingFirstGroup)
Overrides:
compile in class AbstractImageBuilder

deleteGeneratedFiles

protected void deleteGeneratedFiles(IFile[] deletedGeneratedFiles)
Overrides:
deleteGeneratedFiles in class AbstractImageBuilder

findAffectedSourceFiles

protected boolean findAffectedSourceFiles(IResourceDelta delta,
                                          ClasspathLocation[] classFoldersAndJars,
                                          IProject prereqProject)

findAffectedSourceFiles

protected void findAffectedSourceFiles(IResourceDelta binaryDelta,
                                       int segmentCount,
                                       StringSet structurallyChangedTypes)

findSourceFiles

protected boolean findSourceFiles(IResourceDelta delta)
                           throws CoreException
Throws:
CoreException

findSourceFiles

protected boolean findSourceFiles(IResourceDelta sourceDelta,
                                  org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathMultiDirectory md,
                                  int segmentCount)
                           throws CoreException
Throws:
CoreException

finishedWith

protected void finishedWith(java.lang.String sourceLocator,
                            CompilationResult result,
                            char[] mainTypeName,
                            java.util.ArrayList definedTypeNames,
                            java.util.ArrayList duplicateTypeNames)
Overrides:
finishedWith in class AbstractImageBuilder

processAnnotationResults

protected void processAnnotationResults(CompilationParticipantResult[] results)
Specified by:
processAnnotationResults in class AbstractImageBuilder

removeClassFile

protected void removeClassFile(IPath typePath,
                               IContainer outputFolder)
                        throws CoreException
Throws:
CoreException

removeSecondaryTypes

protected void removeSecondaryTypes()
                             throws CoreException
Throws:
CoreException

resetCollections

protected void resetCollections()

updateProblemsFor

protected void updateProblemsFor(SourceFile sourceFile,
                                 CompilationResult result)
                          throws CoreException
Overrides:
updateProblemsFor in class AbstractImageBuilder
Throws:
CoreException

updateTasksFor

protected void updateTasksFor(SourceFile sourceFile,
                              CompilationResult result)
                       throws CoreException
Overrides:
updateTasksFor in class AbstractImageBuilder
Throws:
CoreException

writeClassFileContents

protected void writeClassFileContents(ClassFile classfile,
                                      IFile file,
                                      java.lang.String qualifiedFileName,
                                      boolean isTopLevelType,
                                      SourceFile compilationUnit)
                               throws CoreException
Overrides:
writeClassFileContents in class AbstractImageBuilder
Throws:
CoreException
See Also:
org.aspectj.org.eclipse.jdt.internal.core.builder.AbstractImageBuilder#writeClassFileContents(org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile, org.eclipse.core.resources.IFile, java.lang.String, boolean, org.aspectj.org.eclipse.jdt.internal.core.builder.SourceFile)

writeClassFileCheck

protected boolean writeClassFileCheck(IFile file,
                                      java.lang.String fileName,
                                      byte[] newBytes)
                               throws CoreException
Throws:
CoreException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object