org.aspectj.org.eclipse.jdt.internal.core.builder
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 java.lang.Object
- implements ICompilerRequestor, ICompilationUnitLocator
The abstract superclass of Java builders.
Provides the building and compilation mechanism
in common with the batch and incremental builders.
|
Method Summary |
void |
acceptResult(CompilationResult result)
Accept a compilation result. |
protected void |
acceptSecondaryType(ClassFile classFile)
|
protected void |
addAllSourceFiles(java.util.ArrayList sourceFiles)
|
protected void |
cleanUp()
|
protected void |
compile(SourceFile[] units)
|
protected void |
compile(SourceFile[] units,
SourceFile[] additionalUnits,
boolean compilingFirstGroup)
|
protected void |
copyResource(IResource source,
IResource destination)
|
protected IContainer |
createFolder(IPath packagePath,
IContainer outputFolder)
|
protected void |
createProblemFor(IResource resource,
IMember javaElement,
java.lang.String message,
java.lang.String problemSeverity)
|
protected void |
deleteGeneratedFiles(IFile[] deletedGeneratedFiles)
|
protected SourceFile |
findSourceFile(IFile file,
boolean mustExist)
|
protected void |
finishedWith(java.lang.String sourceLocator,
CompilationResult result,
char[] mainTypeName,
java.util.ArrayList definedTypeNames,
java.util.ArrayList duplicateTypeNames)
|
ICompilationUnit |
fromIFile(IFile file)
|
protected void |
initializeAnnotationProcessorManager(Compiler newCompiler)
|
protected java.lang.RuntimeException |
internalException(CoreException t)
|
protected boolean |
isExcludedFromProject(IPath childPath)
|
protected Compiler |
newCompiler()
|
protected CompilationParticipantResult[] |
notifyParticipants(SourceFile[] unitsAboutToCompile)
|
protected abstract void |
processAnnotationResults(CompilationParticipantResult[] results)
|
protected void |
processAnnotations(CompilationParticipantResult[] results)
|
protected void |
recordParticipantResult(CompilationParticipantResult result)
|
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,
IFile file,
java.lang.String qualifiedFileName,
boolean isTopLevelType,
SourceFile compilationUnit)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
javaBuilder
protected JavaBuilder javaBuilder
newState
protected State newState
nameEnvironment
protected NameEnvironment nameEnvironment
sourceLocations
protected org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathMultiDirectory[] sourceLocations
notifier
protected BuildNotifier notifier
compiler
protected Compiler compiler
workQueue
protected WorkQueue workQueue
problemSourceFiles
protected java.util.ArrayList problemSourceFiles
compiledAllAtOnce
protected boolean compiledAllAtOnce
keepStoringProblemMarkers
protected boolean keepStoringProblemMarkers
filesWithAnnotations
protected SimpleSet filesWithAnnotations
MAX_AT_ONCE
public static int MAX_AT_ONCE
JAVA_PROBLEM_MARKER_ATTRIBUTE_NAMES
public static final java.lang.String[] JAVA_PROBLEM_MARKER_ATTRIBUTE_NAMES
JAVA_TASK_MARKER_ATTRIBUTE_NAMES
public static final java.lang.String[] JAVA_TASK_MARKER_ATTRIBUTE_NAMES
S_ERROR
public static final java.lang.Integer S_ERROR
S_WARNING
public static final java.lang.Integer S_WARNING
P_HIGH
public static final java.lang.Integer P_HIGH
P_NORMAL
public static final java.lang.Integer P_NORMAL
P_LOW
public static final java.lang.Integer P_LOW
AbstractImageBuilder
protected AbstractImageBuilder(JavaBuilder javaBuilder,
boolean buildStarting,
State newState)
acceptResult
public void acceptResult(CompilationResult result)
- Description copied from interface:
ICompilerRequestor
- Accept a compilation result.
- Specified by:
acceptResult in interface ICompilerRequestor
acceptSecondaryType
protected void acceptSecondaryType(ClassFile classFile)
addAllSourceFiles
protected void addAllSourceFiles(java.util.ArrayList sourceFiles)
throws CoreException
- Throws:
CoreException
cleanUp
protected void cleanUp()
compile
protected void compile(SourceFile[] units)
compile
protected void compile(SourceFile[] units,
SourceFile[] additionalUnits,
boolean compilingFirstGroup)
copyResource
protected void copyResource(IResource source,
IResource destination)
throws CoreException
- Throws:
CoreException
createProblemFor
protected void createProblemFor(IResource resource,
IMember javaElement,
java.lang.String message,
java.lang.String problemSeverity)
deleteGeneratedFiles
protected void deleteGeneratedFiles(IFile[] deletedGeneratedFiles)
findSourceFile
protected SourceFile findSourceFile(IFile file,
boolean mustExist)
finishedWith
protected void finishedWith(java.lang.String sourceLocator,
CompilationResult result,
char[] mainTypeName,
java.util.ArrayList definedTypeNames,
java.util.ArrayList duplicateTypeNames)
createFolder
protected IContainer createFolder(IPath packagePath,
IContainer outputFolder)
throws CoreException
- Throws:
CoreException
fromIFile
public ICompilationUnit fromIFile(IFile file)
- Specified by:
fromIFile in interface ICompilationUnitLocator
initializeAnnotationProcessorManager
protected void initializeAnnotationProcessorManager(Compiler newCompiler)
internalException
protected java.lang.RuntimeException internalException(CoreException t)
isExcludedFromProject
protected boolean isExcludedFromProject(IPath childPath)
throws JavaModelException
- Throws:
JavaModelException
newCompiler
protected Compiler newCompiler()
notifyParticipants
protected CompilationParticipantResult[] notifyParticipants(SourceFile[] unitsAboutToCompile)
processAnnotationResults
protected abstract void processAnnotationResults(CompilationParticipantResult[] results)
processAnnotations
protected void processAnnotations(CompilationParticipantResult[] results)
recordParticipantResult
protected void recordParticipantResult(CompilationParticipantResult result)
storeProblemsFor
protected void storeProblemsFor(SourceFile sourceFile,
CategorizedProblem[] problems)
throws 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's
IMarker#SOURCE_ID attribute is positioned to JavaBuilder.SOURCE_ID if
the problem was generated by JDT; else the IMarker#SOURCE_ID attribute is
carried from the problem to the marker in extra attributes, if present.
- Throws:
CoreException
storeTasksFor
protected void storeTasksFor(SourceFile sourceFile,
CategorizedProblem[] tasks)
throws CoreException
- Throws:
CoreException
updateProblemsFor
protected void updateProblemsFor(SourceFile sourceFile,
CompilationResult result)
throws CoreException
- Throws:
CoreException
updateTasksFor
protected void updateTasksFor(SourceFile sourceFile,
CompilationResult result)
throws CoreException
- Throws:
CoreException
writeClassFile
protected char[] writeClassFile(ClassFile classFile,
SourceFile compilationUnit,
boolean isTopLevelType)
throws CoreException
- Throws:
CoreException
writeClassFileContents
protected void writeClassFileContents(ClassFile classFile,
IFile file,
java.lang.String qualifiedFileName,
boolean isTopLevelType,
SourceFile compilationUnit)
throws CoreException
- Throws:
CoreException