All Packages Class Hierarchy This Package Previous Next Index
Object | +----com.symantec.itools.vcafe.openapi.ProjectFile
VisualProject
.
Each ProjectFile
corresponds to an entry in the "Files" tab of Visual Cafe's
project window.
A plug-in can use the methods in this class to update file attributes.
The implementation of all of ProjectFile
's abstract methods first calls
checkValidity(). Any method could therefore throw an InvalidProjectFileException
.
This exception extends RuntimeException
, so doesn't have to be explicity declared or
caught. A ProjectFile
can become invalid if it is removed from its project, or its
project is closed, and the corresponding ProjectListener
message is ignored, for example.
RuntimeException
if not.
ProjectFile
objects represent the same file in a VisualProject
.
DTClass
objects reflecting all the classes and interfaces
declared in this ProjectFile
.
ProjectFile
location.
ProjectFile
location..
DTClass
objects reflecting all the top-level classes and
interfaces declared in this ProjectFile
.
File
that corresponds to this ProjectFile
.
File
associated with
this ProjectFile
.
ProjectFile
.
ProjectFile
.
VisualProject
that owns this ProjectFile
.
SourceFile
associated with this ProjectFile
.
ProjectFile
.
ProjectFile
corresponds to a valid file in its VisualProject
.
ProjectFile
from its VisualProject
.
ProjectFile
.
String
representation of this ProjectFile
.
public static final int ALL_FILE_ADDED
public static final int COMPILER_ADDED
public static final int ERAD_WIZARD_ADDED
public static final int PARSER_ADDED
public static final int SHARED_DATABASE_ADDED
public static final int UNKNOWN_ADDED
public static final int USER_ADDED
public ProjectFile()
public void checkValidity() throws InvalidProjectFileException
RuntimeException
if not.
Note that the implementation of all of ProjectFile
's abstract methods first call
checkValidity(). Any method could therefore throw an InvalidProjectFileException
.
public abstract boolean equals(ProjectFile projectFile)
ProjectFile
objects represent the same file in a VisualProject
.
ProjectFile
to test against.
true
if the two ProjectFile
objects represent the same file.
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTClass[] getClasses()
DTClass
objects reflecting all the classes and interfaces
declared in this ProjectFile
. This includes public, protected, default
(package) access, and private classes and interfaces declared in the ProjectFile
.
This includes nested classes.
To only get top-level classes (and not nested ones), use the getDeclaredClasses
method.
DTClass
objects for all ProjectFile
classes.
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTClass getClosestClass(int location)
ProjectFile
location. The closest class is the
innermost class with a source range or Javadoc range that surrounds the given location.
DTClass
object of the closest class.
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTMember getClosestMember(int location)
ProjectFile
location.. The closest member is the
member of the innermost class with a source range or Javadoc range that surrounds the given location.
DTMember
object of the closest member.
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTClass[] getDeclaredClasses()
DTClass
objects reflecting all the top-level classes and
interfaces declared in this ProjectFile
. This includes public, protected, default
(package) access, and private classes and interfaces declared in the ProjectFile
.
To also get nested classes, use the getClasses()
method.
DTClass
objects for top-level classes.
public abstract java.io.File getFile()
File
that corresponds to this ProjectFile
.
This method never returns null
, but the actual file may not exist on disk
(i.e. File.exists() == false
).
public abstract int getFileAddedBy()
public abstract int getFileId()
public abstract java.lang.String getFullName()
File
associated with
this ProjectFile
.
ProjectFile
.
public abstract java.lang.String[] getImports()
ProjectFile
.
public abstract java.lang.String getPackageName()
ProjectFile
.
public abstract com.symantec.itools.vcafe.openapi.VisualProject getProject()
VisualProject
that owns this ProjectFile
.
VisualProject
.
public abstract com.symantec.itools.vcafe.openapi.SourceFile getSourceFile()
SourceFile
associated with this ProjectFile
.
This method never returns null
, but the actual file may not exist on disk
(i.e. SourceFile.getFile().exists() == false
).
public abstract boolean isRADEnabled()
ProjectFile
. This determines whether this
ProjectFile
is parsed for Rapid Application Development or not. It is shown by the 'Start RAD'/'Stop RAD'
menu item in the project window.
true
if RAD is enabled, false
otherwise.
public abstract boolean isValid()
ProjectFile
corresponds to a valid file in its VisualProject
.
A ProjectFile
can become invalid if it has been removed from its project, or its
project has been closed, for example.
true
if the ProjectFile
is still valid.
public abstract void remove()
ProjectFile
from its VisualProject
.
public abstract void rename(String newName, boolean replace)
ProjectFile
. The new file name must be fully qualified.
This method optionally overwrites any existing file with the same new name.
The old file with the original name is deleted.
NOTE: This function assumes the file contents/type will remain the same.
If it is a .java
source file it will still be marked as a source file
even if the extension changes. If you want to make sure that the file type
in the build system is correct, remove the old file and add a new file instead.
true
to overwrite any file that might already have the new name.
public java.lang.String toString()
String
representation of this ProjectFile
.
String
, formatted as "ProjectFile[full path name]".
All Packages Class Hierarchy This Package Previous Next Index