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
Modifier and TypeFieldDescriptionprotected boolean
protected Compiler
protected Set<SourceFile>
static String[]
protected JavaBuilder
protected boolean
static int
protected NameEnvironment
protected State
protected BuildNotifier
static Integer
static Integer
static Integer
protected LinkedHashSet<SourceFile>
static Integer
static Integer
static Integer
protected ClasspathMultiDirectory[]
protected WorkQueue
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractImageBuilder(JavaBuilder javaBuilder, boolean buildStarting, State newState, CompilationGroup compilationGroup)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptResult(CompilationResult result)
Accept a compilation result.protected void
acceptSecondaryType(ClassFile classFile)
protected void
addAllSourceFiles(LinkedHashSet<SourceFile> sourceFiles)
protected void
cleanUp()
protected void
compile(SourceFile[] units)
protected void
compile(SourceFile[] units, SourceFile[] additionalUnits, boolean compilingFirstGroup)
protected void
copyResource(org.eclipse.core.resources.IResource source, org.eclipse.core.resources.IResource destination)
protected org.eclipse.core.resources.IContainer
createFolder(org.eclipse.core.runtime.IPath packagePath, org.eclipse.core.resources.IContainer outputFolder)
protected void
createProblemFor(org.eclipse.core.resources.IResource resource, IMember javaElement, String message, String problemSeverity)
protected void
deleteGeneratedFiles(org.eclipse.core.resources.IFile[] deletedGeneratedFiles)
protected SourceFile
findSourceFile(org.eclipse.core.resources.IFile file, boolean mustExist)
protected void
finishedWith(String sourceLocator, CompilationResult result, char[] mainTypeName, ArrayList definedTypeNames, ArrayList duplicateTypeNames)
fromIFile(org.eclipse.core.resources.IFile file)
protected void
initializeAnnotationProcessorManager(Compiler newCompiler)
protected RuntimeException
internalException(org.eclipse.core.runtime.CoreException t)
protected boolean
isExcludedFromProject(org.eclipse.core.runtime.IPath childPath)
protected Compiler
protected CompilationParticipantResult[]
notifyParticipants(SourceFile[] unitsAboutToCompile)
protected abstract void
processAnnotationResults(CompilationParticipantResult[] results)
protected void
processAnnotations(CompilationParticipantResult[] results)
protected void
protected void
storeProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems)
Creates a marker from each problem and adds it to the resource.protected void
storeTasksFor(SourceFile sourceFile, CategorizedProblem[] tasks)
protected void
updateProblemsFor(SourceFile sourceFile, CompilationResult result)
protected void
updateTasksFor(SourceFile sourceFile, CompilationResult result)
protected char[]
writeClassFile(ClassFile classFile, SourceFile compilationUnit, boolean isTopLevelType)
protected void
writeClassFileContents(ClassFile classFile, org.eclipse.core.resources.IFile file, String qualifiedFileName, boolean isTopLevelType, SourceFile compilationUnit)
-
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
-
-
Constructor Details
-
AbstractImageBuilder
protected AbstractImageBuilder(JavaBuilder javaBuilder, boolean buildStarting, State newState, CompilationGroup compilationGroup)
-
-
Method Details
-
acceptResult
Description copied from interface:ICompilerRequestor
Accept a compilation result.- Specified by:
acceptResult
in 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:
fromIFile
in 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.CoreExceptionCreates 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_ID
attribute is positioned toJavaBuilder.SOURCE_ID
if the problem was generated by JDT; else theIMarker.SOURCE_ID
attribute 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 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
-