public class ResourceBundleCompilationUnit extends CompilationUnitBase
ICompilationUnit.Operation, ICompilationUnit.UnitType
Modifier and Type | Field and Description |
---|---|
static String |
LOCALE
Parent folder name for properties files in a swc.
|
abc, DEFAULT_DO_ABC_TAG_NAME, fileScopeRequest, problems, syntaxTreeRequest
Constructor and Description |
---|
ResourceBundleCompilationUnit(CompilerProject project,
ISWCFileEntry fileEntry,
String qname,
String locale)
Constructor.
|
ResourceBundleCompilationUnit(CompilerProject project,
String path,
DefinitionPriority.BasePriority basePriority,
String qname,
String locale)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getBundleNameInColonSyntax()
Returns the name of the bundle processed by this compilation unit.
|
ICompilationUnit.UnitType |
getCompilationUnitType() |
byte[] |
getFileContent(Collection<ICompilerProblem> problems)
Returns the content of the file processed by this compilation unit.
|
long |
getFileLastModified()
Get the time-stamp of the properties file processed by this compilation
unit.
|
String |
getLocale()
Returns the locale of the properties file associated with this
compilation unit depends on or
null if the file is not
locale dependent. |
protected IABCBytesRequestResult |
handleABCBytesRequest()
Builds a IABCBytesRequestResult.
|
protected IFileScopeRequestResult |
handleFileScopeRequest()
Builds a
IFileScopeRequestResult . |
protected IOutgoingDependenciesRequestResult |
handleOutgoingDependenciesRequest()
Builds a IOutgoingDependenciesRequestResult.
|
protected ISWFTagsRequestResult |
handleSWFTagsRequest()
Builds a ISWFTagsRequestResult.
|
protected ISyntaxTreeRequestResult |
handleSyntaxTreeRequest()
Builds a
ISyntaxTreeRequestResult . |
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.
|
addScopeToProjectScope, clean, clearIncludedFilesFromWorkspace, clearProject, getABCBytesRequest, getAbsoluteFilename, getDefinitionPriority, getDefinitionPromises, getEmbeddedFilenames, getEncodedDebugFiles, getFilenameNoPath, getFileScopeRequest, getFileSpecificationGetter, getName, getOutgoingDependenciesRequest, getProject, getQualifiedNames, getRootFileSpecification, getShortNames, getSWFTagsRequest, getSyntaxTreeRequest, handleClean, isInvisible, makeInvisible, operationsCompleted, removeAST, setFileSpecificationGetter, startParsingImports, startProfile, stopProfile, toString, updateEmbedCompilationUnitDependencies, updateStyleCompilationUnitDependencies, verifyAST
public static final String LOCALE
public ResourceBundleCompilationUnit(CompilerProject project, String path, DefinitionPriority.BasePriority basePriority, String qname, String locale)
project
- project this compilation unit is associated withpath
- path of the properties filebasePriority
- base priorityqname
- qualified name for the properties file that will be
processed by this comp unitlocale
- the locale this compilation unit depends on or null
if the compilation unit is not locale dependentpublic ResourceBundleCompilationUnit(CompilerProject project, ISWCFileEntry fileEntry, String qname, String locale)
project
- project this compilation unit is associated withfileEntry
- swc entry for the properties file that will be processed
by this compilation unitqname
- qualified name for the properties file that will be
processed by this comp unitlocale
- the locale this compilation unit depends on or null
if the compilation unit is not locale dependentpublic ICompilationUnit.UnitType getCompilationUnitType()
public String getBundleNameInColonSyntax()
public String getLocale()
null
if the file is not
locale dependent.null
if the compilation unit is not locale dependent.protected ISyntaxTreeRequestResult handleSyntaxTreeRequest() throws InterruptedException
CompilationUnitBase
ISyntaxTreeRequestResult
. In many cases the ISyntaxTreeRequestResult
is built by parsing a source file into a syntax tree.
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleSyntaxTreeRequest
in class CompilationUnitBase
ISyntaxTreeRequestResult
for this compilation unit.InterruptedException
protected IFileScopeRequestResult handleFileScopeRequest() throws InterruptedException
CompilationUnitBase
IFileScopeRequestResult
. In many cases the
IFileScopeRequestResult
is built by walking an AST produced by a parser.
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleFileScopeRequest
in class CompilationUnitBase
IFileScopeRequestResult
for this compilation unit.InterruptedException
protected IABCBytesRequestResult handleABCBytesRequest() throws InterruptedException
CompilationUnitBase
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleABCBytesRequest
in class CompilationUnitBase
InterruptedException
protected ISWFTagsRequestResult handleSWFTagsRequest() throws InterruptedException
CompilationUnitBase
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleSWFTagsRequest
in class CompilationUnitBase
InterruptedException
protected IOutgoingDependenciesRequestResult handleOutgoingDependenciesRequest() throws InterruptedException
CompilationUnitBase
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleOutgoingDependenciesRequest
in class CompilationUnitBase
InterruptedException
public void waitForBuildFinish(Collection<ICompilerProblem> problems, ITarget.TargetType targetType) throws InterruptedException
ICompilationUnit
waitForBuildFinish
in interface ICompilationUnit
waitForBuildFinish
in class CompilationUnitBase
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
startBuildAsync
in class CompilationUnitBase
targetType
- type of the active Target
public long getFileLastModified()
public byte[] getFileContent(Collection<ICompilerProblem> problems)
null
if
any problem occurs.Copyright © 2016 The Apache Software Foundation. All rights reserved.