public abstract class ASProject extends CompilerProject implements IASProject
dependencyGraph, problems, targets| Constructor and Description |
|---|
ASProject(Workspace workspace,
boolean useAS3)
Constructor
|
ASProject(Workspace workspace,
boolean useAS3,
IASDocBundleDelegate asDocBundleDelegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIncludeSourceFile(File file)
Adds a new include source file to the project.
|
void |
addIncludeSourceFile(File file,
boolean overrideSourcePath)
Adds a new include source file to the project.
|
void |
addProjectDependeny(IASProject project,
String swcFilename)
Adds a new project dependency to this project.
|
boolean |
addSourcePathFile(File f)
Adds a file to the project if that file is on the project's
source path.
|
void |
attachExternalLibrarySourcePath(File library,
File sourceDir)
Attach the source directory to an external SWC library.
|
void |
attachInternalLibrarySourcePath(File library,
File sourceDir)
Attach the source directory to a SWC library.
|
void |
collectionCompilationUnitsForRootSourceFile(File rootSourceFile,
Collection<ICompilationUnit> units)
Finds all the
ICompilationUnit's in this project whose root source file is the specified file. |
void |
collectProblems(Collection<ICompilerProblem> problems)
Gets project level
ICompilerProblem's target are not specific to any
one target created by the project. |
IInvisibleCompilationUnit |
createInvisibleCompilationUnit(String rootSourceFile,
IFileSpecificationGetter fileSpecGetter)
Creates an
IInvisibleCompilationUnit for the specified absolute
file name. |
IInvisibleCompilationUnit |
createInvisibleCompilationUnit(String rootSourceFile,
IFileSpecificationGetter fileSpecGetter,
String qName)
Creates an
IInvisibleCompilationUnit for the specified absolute
file name, specifying a qualified name. |
IASDocBundleDelegate |
getASDocBundleDelegate() |
String |
getAttachedSourceDirectory(String libraryFilename)
Get the Directory for the specified library.
|
Integer |
getCompatibilityVersion()
Returns the compatibility version encoded as an integer.
|
String |
getCompatibilityVersionString()
Returns the compatibility version encoded as a string.
|
Set<IASProject> |
getDependingProjects() |
List<ISWC> |
getLibraries()
The libraries available to compiler source in this project.
|
SourceCompilationUnitFactory |
getSourceCompilationUnitFactory() |
ISWCFileEntry |
getSourceFileFromLibraryPath(String file)
Iterate through the library path list looking for the specified file.
|
String |
getSourceFileFromSourcePath(String file)
Iterate through the source path list looking for the specified file.
|
List<File> |
getSourcePath()
Get the list of source paths set.
|
boolean |
handleAddedFile(File addedFile)
Called by
Workspace.fileAdded(org.apache.flex.compiler.filespecs.IFileSpecification)
for each project in the workspace. |
boolean |
hasCompilationUnitForRootSourceFile(File rootSourceFile) |
boolean |
invalidateLibraries(Collection<File> swcFiles)
Removes any calculated data related to a collection of libraries.
|
void |
invalidateLibrary(ISWC swc)
Removes any calculated data related to a SWC.
|
boolean |
isAssetEmbeddingSupported()
Test whether the project supports the embedding of assets.
|
boolean |
isFileOnSourcePath(File f)
Test if a file is on the source path or not.
|
boolean |
isSupportedSourceFileType(String fileExtension)
Determines if the specified file extension ( without the dot eg:
as, not .as ) corresponds to a source file type that this
project can create ICompilationUnits for. |
void |
removeIncludeSourceFile(File file)
Removes an include source file to the project.
|
void |
removeProjectDependeny(IASProject project)
Removes a project dependency from this project.
|
void |
removeSourceFile(File f)
Removes a source file to the project, removing any references in the various
managers - SourcePathManager, SourceListManager etc
|
void |
setCompatibilityVersion(int major,
int minor,
int revision)
Sets the SDK compatibility version.
|
void |
setDependencies(Map<IASProject,String> newIProjectsDependencies)
Resets the set of projects that this project depends on.
|
void |
setIncludeSources(File[] files)
Sets the include sources list for the project.
|
void |
setLibraries(List<File> libraries)
The libraries used to compile source files in a project.
|
void |
setSourcePath(List<File> paths)
Sets the source path for the project.
|
addCompilationUnit, addCompilationUnits, addCompilationUnitsAndUpdateDefinitions, addConfigVariable, addConfigVariables, addDependency, addDependency, addDependency, addEmbedCompilationUnit, addGlobalUsedNamespacesToNamespaceSet, addToASTCache, addUnfoundDefinitionDependency, addUnfoundReferencedSourceFileDependency, clean, clearScopeCacheForCompilationUnit, collectConfigProblems, createSWFTarget, delete, doubleCheckAmbiguousDefinition, getActualPackageName, getBuiltinType, getCacheForScope, getCompilationUnit, getCompilationUnits, getCompilationUnits, getDependencies, getDependenciesOnDefinition, getDependenciesOnUnfoundDefinition, getDependenciesOnUnfoundReferencedSourceFile, getDependencyGraph, getDirectDependencies, getDirectReverseDependencies, getFatalProblems, getIncludingCompilationUnits, getProblems, getProjectConfigVariables, getReachableCompilationUnitsInSWFOrder, getScope, getUndefinedValue, getUseParallelCodeGeneration, getWorkspace, initProjectScope, isCompatibleOverrideReturnType, isInliningEnabled, isValidTypeConversion, removeAnyUnfoundDependencies, removeCompilationUnit, removeCompilationUnits, removeDependencies, resetScopeCacheForCompilationUnit, resolveQNameToCompilationUnit, resolveQNameToDefinition, setEnableInlining, setProblems, setUseParallelCodeGeneration, unitTestingEntryPointForRemovingCompilationUnit, updatePublicAndInternalDefinitionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclean, createSWFTarget, delete, doubleCheckAmbiguousDefinition, getActualPackageName, getBuiltinType, getCompilationUnits, getCompilationUnits, getDirectDependencies, getDirectReverseDependencies, getIncludingCompilationUnits, getProblems, getReachableCompilationUnitsInSWFOrder, getScope, getUndefinedValue, getWorkspace, isCompatibleOverrideReturnType, isInliningEnabled, isValidTypeConversion, resolveQNameToCompilationUnit, resolveQNameToDefinition, setProblems, setUseParallelCodeGenerationpublic ASProject(Workspace workspace, boolean useAS3)
workspace - The Workspace in which this project lives.useAS3 - Indicate whether or not the AS3 namespace should
be opened in all compilation units in the project.public ASProject(Workspace workspace, boolean useAS3, IASDocBundleDelegate asDocBundleDelegate)
public List<ISWC> getLibraries()
IASProjectgetLibraries in interface IASProjectpublic void attachInternalLibrarySourcePath(File library, File sourceDir)
IASProjectattachInternalLibrarySourcePath in interface IASProjectlibrary - SWC librarysourceDir - directory that contains the source for the SWC librarypublic void attachExternalLibrarySourcePath(File library, File sourceDir)
IASProjectattachExternalLibrarySourcePath in interface IASProjectlibrary - SWC librarysourceDir - directory that contains the source for the SWC librarypublic String getAttachedSourceDirectory(String libraryFilename)
IASProjectgetAttachedSourceDirectory in interface IASProjectpublic void setSourcePath(List<File> paths)
IASProjectsetSourcePath in interface IASProjectpaths - List of directories that should be searched for source files.public List<File> getSourcePath()
IASProjectgetSourcePath in interface IASProjectpublic boolean addSourcePathFile(File f)
f - The file to be added.ICompilationUnit's were created
as a result of this operation, false otherwise.public boolean isFileOnSourcePath(File f)
f - The file to test. May not be null.public void setIncludeSources(File[] files) throws InterruptedException
IASProjectsetIncludeSources in interface IASProjectInterruptedExceptionpublic void addIncludeSourceFile(File file) throws InterruptedException
IASProjectaddIncludeSourceFile in interface IASProjectfile - File to add.InterruptedExceptionpublic void addIncludeSourceFile(File file, boolean overrideSourcePath) throws InterruptedException
IASProjectaddIncludeSourceFile in interface IASProjectfile - File to add.overrideSourcePath - Set to true to add the file to the source list
even if it exists on the source path.InterruptedExceptionpublic void removeIncludeSourceFile(File file) throws InterruptedException
IASProjectremoveIncludeSourceFile in interface IASProjectfile - File to remove.InterruptedExceptionIASProject.addIncludeSourceFile(File)public void removeSourceFile(File f)
f - File to remove.addIncludeSourceFile(File)public SourceCompilationUnitFactory getSourceCompilationUnitFactory()
public Set<IASProject> getDependingProjects()
getDependingProjects in interface IASProjectpublic void addProjectDependeny(IASProject project, String swcFilename)
IASProjectaddProjectDependeny in interface IASProjectproject - IASProject dependency to add to this project.swcFilename - The SWC filename the project dependency generatespublic void removeProjectDependeny(IASProject project)
IASProjectremoveProjectDependeny in interface IASProjectproject - IASProject to remove from this projects dependencies.public void setDependencies(Map<IASProject,String> newIProjectsDependencies)
IASProjectsetDependencies in interface IASProjectnewIProjectsDependencies - The new map of IASProjects that
this project depends on. The value to the map is the SWC filename the
IASProject generates.public void collectProblems(Collection<ICompilerProblem> problems)
CompilerProjectICompilerProblem's target are not specific to any
one target created by the project.collectProblems in class CompilerProjectpublic void collectionCompilationUnitsForRootSourceFile(File rootSourceFile, Collection<ICompilationUnit> units)
ICompilationUnit's in this project whose root source file is the specified file.public boolean hasCompilationUnitForRootSourceFile(File rootSourceFile)
public boolean invalidateLibraries(Collection<File> swcFiles)
IASProjectinvalidateLibraries in interface IASProjectswcFiles - Collection of SWC files to invalidate.public void invalidateLibrary(ISWC swc)
IASProjectinvalidateLibrary in interface IASProjectswc - ISWC to invalidatepublic boolean handleAddedFile(File addedFile)
CompilerProjectWorkspace.fileAdded(org.apache.flex.compiler.filespecs.IFileSpecification)
for each project in the workspace. Each subclass of this class must
decide when an added file is interesting or should be ignored.handleAddedFile in class CompilerProjectaddedFile - File that was added.public String getSourceFileFromSourcePath(String file)
IASProjectgetSourceFileFromSourcePath in interface IASProjectfile - filename to look forpublic ISWCFileEntry getSourceFileFromLibraryPath(String file)
file - to look forpublic IASDocBundleDelegate getASDocBundleDelegate()
public void setLibraries(List<File> libraries)
IASProjectsetLibraries in interface IASProjectlibraries - The libraries in priority order, may not be null.public void setCompatibilityVersion(int major,
int minor,
int revision)
major - The major version. For this release, this value must be 2.minor - The minor version. For this release, this value must be 0.revision - For this release, this value must be 1.public Integer getCompatibilityVersion()
IASProjectgetCompatibilityVersion in interface IASProjectpublic String getCompatibilityVersionString()
IASProjectgetCompatibilityVersionString in interface IASProjectpublic IInvisibleCompilationUnit createInvisibleCompilationUnit(String rootSourceFile, IFileSpecificationGetter fileSpecGetter)
IASProjectIInvisibleCompilationUnit for the specified absolute
file name.createInvisibleCompilationUnit in interface IASProjectrootSourceFile - The name of the file to create an
IInvisibleCompilationUnit for.fileSpecGetter - A IFileSpecificationGetter that can be used
by the new IInvisibleCompilationUnit to open files.IInvisibleCompilationUnit or null if the specified.
file name is not found on the current source path of this
IASProject.public IInvisibleCompilationUnit createInvisibleCompilationUnit(String rootSourceFile, IFileSpecificationGetter fileSpecGetter, String qName)
IASProjectIInvisibleCompilationUnit for the specified absolute
file name, specifying a qualified name.
This version of createInvisibleCompilationUnit() is called when creating a
IInvisibleCompilationUnit for a source file which isn't contained
within the source path, as the qualified name of the IInvisibleCompilationUnit
to be created can't be computed automatically. This happens when creating a
IInvisibleCompilationUnit for an external file.createInvisibleCompilationUnit in interface IASProjectrootSourceFile - The name of the file to create an
IInvisibleCompilationUnit for.fileSpecGetter - A IFileSpecificationGetter that can be used
by the new IInvisibleCompilationUnit to open files.qName - The qualified name of the IInvisibleCompilationUnitIInvisibleCompilationUnit or null if the specified.
file name is not found on the current source path of this
IASProject.public boolean isAssetEmbeddingSupported()
ICompilerProjectisAssetEmbeddingSupported in interface ICompilerProjectpublic boolean isSupportedSourceFileType(String fileExtension)
IASProjectas, not .as ) corresponds to a source file type that this
project can create ICompilationUnits for.isSupportedSourceFileType in interface IASProjectfileExtension - The file extension to check without a dot, for
example mxml.Copyright © 2016 The Apache Software Foundation. All rights reserved.