public class InvisibleCompilationUnit extends Object implements IInvisibleCompilationUnit
IInvisibleCompilationUnit.ICompilationUnit.Operation, ICompilationUnit.UnitType| Constructor and Description |
|---|
InvisibleCompilationUnit(CompilationUnitBase delegate,
IFileSpecificationGetter fileSpecGetter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clean()
Invalidates the processing results of this
IInvisibleCompilationUnit. |
boolean |
clean(Map<ICompilerProject,Set<File>> invalidatedSWCFiles,
Map<ICompilerProject,Set<ICompilationUnit>> cusToUpdate,
boolean clearFileScope)
Removes all data created during a compile Clients should not call this
method directly, as it can potentially leave the ICompilationUnit in an
invalid state.
|
void |
clearProject()
Called by
ICompilerProject's when an ICompilationUnit
is removed from a project. |
IRequest<IABCBytesRequestResult,ICompilationUnit> |
getABCBytesRequest()
Gets the request object from which the caller can extract the abc bytes
generated for this ICompilationUnit.
|
String |
getAbsoluteFilename()
Gets the path to the compilation unit instance.
|
ICompilationUnit.UnitType |
getCompilationUnitType() |
void |
getCompilerProblems(Collection<ICompilerProblem> problems)
Finds all the
ICompilerProblem's in this IInvisibleCompilationUnit. |
IDefinitionPriority |
getDefinitionPriority()
Gets the definition priority for definitions defined by the compilation
unit.
|
List<IDefinition> |
getDefinitionPromises() |
CompilationUnitBase |
getDelegate() |
Collection<String> |
getEmbeddedFilenames() |
IRequest<IFileScopeRequestResult,ICompilationUnit> |
getFileScopeRequest()
Gets the request object from which the caller can extract the root scope,
AST, and any parsing ICompilerProblems, for the CompilationUnit.
|
String |
getName()
Gets a string that is unique to the compilation unit instance and can be
used to produce an ordering of compilation units that is stable across
different compilation runs.
|
IRequest<IOutgoingDependenciesRequestResult,ICompilationUnit> |
getOutgoingDependenciesRequest()
Gets the request object from which the caller cause the dependency graph to be updated
with all the dependencies from this compilation unit.
|
ICompilerProject |
getProject() |
List<String> |
getQualifiedNames() |
List<String> |
getShortNames() |
IRequest<ISWFTagsRequestResult,ICompilationUnit> |
getSWFTagsRequest()
Gets the request object with which the caller can add the SWF tags
generated for this ICompilationUnit to a ISWF.
|
IRequest<ISyntaxTreeRequestResult,ICompilationUnit> |
getSyntaxTreeRequest()
Gets the request object from which the caller can extract the syntax tree
and any source file parsing
ICompilerProblem's
for this ICompilationUnit. |
boolean |
isInvisible() |
void |
remove()
Explicitly removes this
IInvisibleCompilationUnit from an
IASProject. |
void |
startBuildAsync(ITarget.TargetType targetType)
This method starts to build the compilation unit asynchronously.
|
void |
waitForBuildFinish(Collection<ICompilerProblem> problems,
ITarget.TargetType targetType)
Wait till the compilation unit finishes building, and collect compiler
problems.
|
public InvisibleCompilationUnit(CompilationUnitBase delegate, IFileSpecificationGetter fileSpecGetter)
delegate - CompilationUnitBase that this class will delegate
to.fileSpecGetter - IFileSpecificationGetter that should be
used to open files.public ICompilerProject getProject()
getProject in interface ICompilationUnitpublic IRequest<ISyntaxTreeRequestResult,ICompilationUnit> getSyntaxTreeRequest()
ICompilationUnitICompilerProblem's
for this ICompilationUnit. Implementations may update the dependency
graph in the project as a side
affect of this operation.getSyntaxTreeRequest in interface ICompilationUnitpublic IRequest<IFileScopeRequestResult,ICompilationUnit> getFileScopeRequest()
ICompilationUnitgetFileScopeRequest in interface ICompilationUnitpublic IRequest<IOutgoingDependenciesRequestResult,ICompilationUnit> getOutgoingDependenciesRequest()
ICompilationUnitgetOutgoingDependenciesRequest in interface ICompilationUnitpublic IRequest<IABCBytesRequestResult,ICompilationUnit> getABCBytesRequest()
ICompilationUnitgetABCBytesRequest in interface ICompilationUnitpublic IRequest<ISWFTagsRequestResult,ICompilationUnit> getSWFTagsRequest()
ICompilationUnitgetSWFTagsRequest in interface ICompilationUnitpublic List<String> getShortNames() throws InterruptedException
getShortNames in interface ICompilationUnitInterruptedExceptionpublic List<String> getQualifiedNames() throws InterruptedException
getQualifiedNames in interface ICompilationUnitInterruptedExceptionpublic String getName()
ICompilationUnitgetName in interface ICompilationUnitpublic String getAbsoluteFilename()
ICompilationUnitgetAbsoluteFilename in interface ICompilationUnitpublic List<IDefinition> getDefinitionPromises()
getDefinitionPromises in interface ICompilationUnitpublic ICompilationUnit.UnitType getCompilationUnitType()
getCompilationUnitType in interface ICompilationUnitpublic boolean clean(Map<ICompilerProject,Set<File>> invalidatedSWCFiles, Map<ICompilerProject,Set<ICompilationUnit>> cusToUpdate, boolean clearFileScope)
ICompilationUnitclean in interface ICompilationUnitinvalidatedSWCFiles - Map of SWC filenames and depending projects
which have been invalidated by this callcusToUpdate - Map from ICompilerProject to
Set of ICompilationUnits in the project whose externally
visible symbols need to be re-registered with the symbol table of the
containing ICompilerProject when cleaning is complete.clearFileScope - Whether to clear the file scopepublic IDefinitionPriority getDefinitionPriority()
ICompilationUnitgetDefinitionPriority in interface ICompilationUnitpublic void clearProject()
ICompilationUnitICompilerProject's when an ICompilationUnit
is removed from a project. Implementations should clear an references
to the containing project when this method is called. After this
method is called ICompilationUnit.getProject() should return null.clearProject in interface ICompilationUnitpublic void waitForBuildFinish(Collection<ICompilerProblem> problems, ITarget.TargetType targetType) throws InterruptedException
ICompilationUnitwaitForBuildFinish in interface ICompilationUnitproblems - Problems from executing the requests.targetType - type of the active TargetInterruptedException - Concurrency error.ICompilationUnit.startBuildAsync(org.apache.flex.compiler.targets.ITarget.TargetType)public void startBuildAsync(ITarget.TargetType targetType)
ICompilationUnitstartBuildAsync in interface ICompilationUnittargetType - type of the active Targetpublic boolean isInvisible()
isInvisible in interface ICompilationUnitICompilationUnit does *not*
put its global definitions in the ICompilerProject's
symbol table, false otherwise.public void getCompilerProblems(Collection<ICompilerProblem> problems) throws InterruptedException
IInvisibleCompilationUnitICompilerProblem's in this IInvisibleCompilationUnit.getCompilerProblems in interface IInvisibleCompilationUnitproblems - Collection the ICompilerProblem's should be added to.InterruptedExceptionpublic void clean()
IInvisibleCompilationUnitIInvisibleCompilationUnit. Should be called by clients when ever
any of the inputs of this IInvisibleCompilationUnit change.
Changes to the IASProject's settings do *not* automatically
invalidate the processing results of this
IInvisibleCompilationUnit. Clients should manually call this
methods after changing a IASProject settings ( we should fix
this in the future... ).clean in interface IInvisibleCompilationUnitpublic void remove()
IInvisibleCompilationUnitIInvisibleCompilationUnit from an
IASProject. This method will ensure that various cache entries
in the IASProject and IWorkspace are purged.
Clients don't need to call this, but calling it allows certain resource cleanups to happen earlier than would normally.
remove in interface IInvisibleCompilationUnitpublic Collection<String> getEmbeddedFilenames()
getEmbeddedFilenames in interface ICompilationUnitICompilationUnit through Embed metadata. This
will never return null.public CompilationUnitBase getDelegate()
InvisibleCompilationUnitCopyright © 2016 The Apache Software Foundation. All rights reserved.