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 ICompilationUnit
public IRequest<ISyntaxTreeRequestResult,ICompilationUnit> getSyntaxTreeRequest()
ICompilationUnit
ICompilerProblem
's
for this ICompilationUnit
. Implementations may update the dependency
graph in the project as a side
affect of this operation.getSyntaxTreeRequest
in interface ICompilationUnit
public IRequest<IFileScopeRequestResult,ICompilationUnit> getFileScopeRequest()
ICompilationUnit
getFileScopeRequest
in interface ICompilationUnit
public IRequest<IOutgoingDependenciesRequestResult,ICompilationUnit> getOutgoingDependenciesRequest()
ICompilationUnit
getOutgoingDependenciesRequest
in interface ICompilationUnit
public IRequest<IABCBytesRequestResult,ICompilationUnit> getABCBytesRequest()
ICompilationUnit
getABCBytesRequest
in interface ICompilationUnit
public IRequest<ISWFTagsRequestResult,ICompilationUnit> getSWFTagsRequest()
ICompilationUnit
getSWFTagsRequest
in interface ICompilationUnit
public List<String> getShortNames() throws InterruptedException
getShortNames
in interface ICompilationUnit
InterruptedException
public List<String> getQualifiedNames() throws InterruptedException
getQualifiedNames
in interface ICompilationUnit
InterruptedException
public String getName()
ICompilationUnit
getName
in interface ICompilationUnit
public String getAbsoluteFilename()
ICompilationUnit
getAbsoluteFilename
in interface ICompilationUnit
public List<IDefinition> getDefinitionPromises()
getDefinitionPromises
in interface ICompilationUnit
public ICompilationUnit.UnitType getCompilationUnitType()
getCompilationUnitType
in interface ICompilationUnit
public boolean clean(Map<ICompilerProject,Set<File>> invalidatedSWCFiles, Map<ICompilerProject,Set<ICompilationUnit>> cusToUpdate, boolean clearFileScope)
ICompilationUnit
clean
in interface ICompilationUnit
invalidatedSWCFiles
- Map of SWC filenames and depending projects
which have been invalidated by this callcusToUpdate
- Map
from ICompilerProject
to
Set
of ICompilationUnit
s 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()
ICompilationUnit
getDefinitionPriority
in interface ICompilationUnit
public void clearProject()
ICompilationUnit
ICompilerProject
'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 ICompilationUnit
public void waitForBuildFinish(Collection<ICompilerProblem> problems, ITarget.TargetType targetType) throws InterruptedException
ICompilationUnit
waitForBuildFinish
in interface ICompilationUnit
problems
- Problems from executing the requests.targetType
- type of the active Target
InterruptedException
- Concurrency error.ICompilationUnit.startBuildAsync(org.apache.flex.compiler.targets.ITarget.TargetType)
public void startBuildAsync(ITarget.TargetType targetType)
ICompilationUnit
startBuildAsync
in interface ICompilationUnit
targetType
- type of the active Target
public boolean isInvisible()
isInvisible
in interface ICompilationUnit
ICompilationUnit
does *not*
put its global definitions in the ICompilerProject
's
symbol table, false otherwise.public void getCompilerProblems(Collection<ICompilerProblem> problems) throws InterruptedException
IInvisibleCompilationUnit
ICompilerProblem
's in this IInvisibleCompilationUnit
.getCompilerProblems
in interface IInvisibleCompilationUnit
problems
- Collection
the ICompilerProblem
's should be added to.InterruptedException
public void clean()
IInvisibleCompilationUnit
IInvisibleCompilationUnit
. 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 IInvisibleCompilationUnit
public void remove()
IInvisibleCompilationUnit
IInvisibleCompilationUnit
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 IInvisibleCompilationUnit
public Collection<String> getEmbeddedFilenames()
getEmbeddedFilenames
in interface ICompilationUnit
ICompilationUnit
through Embed metadata. This
will never return null.public CompilationUnitBase getDelegate()
InvisibleCompilationUnit
Copyright © 2016 The Apache Software Foundation. All rights reserved.