Modifier and Type | Class and Description |
---|---|
static class |
SourcePathManager.QNameFile |
Constructor and Description |
---|
SourcePathManager(ASProject compilerProject)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
addFile(File f)
Notifies this
SourcePathManager that a file as been added to the
file system. |
void |
collectionCompilationUnitsForRootSourceFile(File rootSourceFile,
Collection<ICompilationUnit> units)
Adds all the
ICompilationUnit 's whose root source file is the
specified File to the specified collection. |
static String |
computeQName(File ancestor,
File descendent) |
static String |
getSourceFileInPath(File path,
String file) |
List<File> |
getSourcePath() |
boolean |
hasCompilationUnitsForRootSourceFile(File rootSourceFile)
Determines of the specified file is the root source file of any
ICompilationUnit created by this SourcePathManager . |
boolean |
isFileOnSourcePath(File file)
Test if a file is on the source path or not.
|
boolean |
removeFile(File f)
Notifies this
SourcePathManager that a file as been deleted from
the file system. |
String |
toString()
For debugging only.
|
public SourcePathManager(ASProject compilerProject)
public boolean isFileOnSourcePath(File file)
file
- The file to test. May not be null.public boolean addFile(File f)
SourcePathManager
that a file as been added to the
file system.
This SourcePathManager
will determine if any source path entries
contain the specified file and if so, will create new
ICompilationUnit
's and add them to the project.
f
- File that has been added to the file system.ICompilationUnit
's were created and added to
the project.public boolean removeFile(File f)
SourcePathManager
that a file as been deleted from
the file system.
This SourcePathManager
will determine if any source path entries
contain the specified file and if so, will remove
ICompilationUnit
's from the project.
f
- File that has been removed from the file system.ICompilationUnit
's were removed from the
project.public void collectionCompilationUnitsForRootSourceFile(File rootSourceFile, Collection<ICompilationUnit> units)
ICompilationUnit
's whose root source file is the
specified File to the specified collection.rootSourceFile
- File to search for.units
- Collection to add to.public boolean hasCompilationUnitsForRootSourceFile(File rootSourceFile)
ICompilationUnit
created by this SourcePathManager
.rootSourceFile
- File to search for.ICompilationUnit
's created by this SourcePathManager
.public static String getSourceFileInPath(File path, String file)
path
- Path to search for file in. May be null.file
- Filename to search for. Can't be null.Copyright © 2016 The Apache Software Foundation. All rights reserved.