Class AbstractImageBuilder
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.builder.AbstractImageBuilder
- All Implemented Interfaces:
ICompilerRequestor,ICompilationUnitLocator
- Direct Known Subclasses:
BatchImageBuilder,IncrementalImageBuilder
public abstract class AbstractImageBuilder
extends Object
implements ICompilerRequestor, ICompilationUnitLocator
The abstract superclass of Java builders.
Provides the building and compilation mechanism
in common with the batch and incremental builders.
-
Field Summary
FieldsModifier 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
ConstructorsModifierConstructorDescriptionprotectedAbstractImageBuilder(JavaBuilder javaBuilder, boolean buildStarting, State newState, CompilationGroup compilationGroup) -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptResult(CompilationResult result) Accept a compilation result.protected voidacceptSecondaryType(ClassFile classFile) protected voidaddAllSourceFiles(LinkedHashSet<SourceFile> sourceFiles) protected voidcleanUp()protected voidcompile(SourceFile[] units) protected voidcompile(SourceFile[] units, SourceFile[] additionalUnits, boolean compilingFirstGroup) 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 voiddeleteGeneratedFiles(org.eclipse.core.resources.IFile[] deletedGeneratedFiles) protected SourceFilefindSourceFile(org.eclipse.core.resources.IFile file, boolean mustExist) protected voidfinishedWith(String sourceLocator, CompilationResult result, char[] mainTypeName, ArrayList definedTypeNames, ArrayList duplicateTypeNames) fromIFile(org.eclipse.core.resources.IFile file) 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 abstract voidprotected 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 voidupdateProblemsFor(SourceFile sourceFile, CompilationResult result) protected voidupdateTasksFor(SourceFile sourceFile, CompilationResult result) protected char[]writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) protected abstract voidwriteClassFileContents(ClassFile classFile, org.eclipse.core.resources.IFile file, String qualifiedFileName, boolean isTopLevelType, SourceFile compilationUnit) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.ICompilerRequestor
endBatch, flushBatch, startBatch
-
Field Details
-
javaBuilder
-
newState
-
nameEnvironment
-
sourceLocations
-
notifier
-
compiler
-
workQueue
-
problemSourceFiles
-
compiledAllAtOnce
protected boolean compiledAllAtOnce -
keepStoringProblemMarkers
protected boolean keepStoringProblemMarkers -
filesWithAnnotations
-
MAX_AT_ONCE
public static int MAX_AT_ONCE -
JAVA_PROBLEM_MARKER_ATTRIBUTE_NAMES
-
S_ERROR
-
S_WARNING
-
S_INFO
-
P_HIGH
-
P_NORMAL
-
P_LOW
-
COMPILER_FACTORY_KEY
- See Also:
-
-
Constructor Details
-
AbstractImageBuilder
protected AbstractImageBuilder(JavaBuilder javaBuilder, boolean buildStarting, State newState, CompilationGroup compilationGroup)
-
-
Method Details
-
acceptResult
Description copied from interface:ICompilerRequestorAccept a compilation result.- Specified by:
acceptResultin interfaceICompilerRequestor
-
acceptSecondaryType
-
addAllSourceFiles
protected void addAllSourceFiles(LinkedHashSet<SourceFile> sourceFiles) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
cleanUp
protected void cleanUp() -
compile
-
compile
protected void compile(SourceFile[] units, SourceFile[] additionalUnits, boolean compilingFirstGroup) -
copyResource
protected void copyResource(org.eclipse.core.resources.IResource source, org.eclipse.core.resources.IResource destination) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
createProblemFor
-
deleteGeneratedFiles
protected void deleteGeneratedFiles(org.eclipse.core.resources.IFile[] deletedGeneratedFiles) -
findSourceFile
-
finishedWith
protected void finishedWith(String sourceLocator, CompilationResult result, char[] mainTypeName, ArrayList definedTypeNames, ArrayList duplicateTypeNames) -
createFolder
protected org.eclipse.core.resources.IContainer createFolder(org.eclipse.core.runtime.IPath packagePath, org.eclipse.core.resources.IContainer outputFolder) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
fromIFile
- Specified by:
fromIFilein interfaceICompilationUnitLocator
-
initializeAnnotationProcessorManager
-
internalException
-
isExcludedFromProject
protected boolean isExcludedFromProject(org.eclipse.core.runtime.IPath childPath) throws JavaModelException - Throws:
JavaModelException
-
newCompiler
-
notifyParticipants
-
processAnnotationResults
-
processAnnotations
-
recordParticipantResult
-
storeProblemsFor
protected void storeProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems) throws org.eclipse.core.runtime.CoreException Creates a marker from each problem and adds it to the resource. The marker is as follows: - its type is T_PROBLEM - its plugin ID is the JavaBuilder's plugin ID - its message is the problem's message - its priority reflects the severity of the problem - its range is the problem's range - it has an extra attribute "ID" which holds the problem's id - it'sIMarker.SOURCE_IDattribute is positioned toJavaBuilder.SOURCE_IDif the problem was generated by JDT; else theIMarker.SOURCE_IDattribute is carried from the problem to the marker in extra attributes, if present.- Throws:
org.eclipse.core.runtime.CoreException
-
storeTasksFor
protected void storeTasksFor(SourceFile sourceFile, CategorizedProblem[] tasks) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
updateProblemsFor
protected void updateProblemsFor(SourceFile sourceFile, CompilationResult result) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
updateTasksFor
protected void updateTasksFor(SourceFile sourceFile, CompilationResult result) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
writeClassFile
protected char[] writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
writeClassFileContents
protected abstract void writeClassFileContents(ClassFile classFile, org.eclipse.core.resources.IFile file, String qualifiedFileName, boolean isTopLevelType, SourceFile compilationUnit) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-