Class com.symantec.itools.vcafe.openapi.ProjectFile
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class com.symantec.itools.vcafe.openapi.ProjectFile
Object
   |
   +----com.symantec.itools.vcafe.openapi.ProjectFile
  -  public abstract class ProjectFile
  
-  extends Object
  
The API used to represent and access a Project File in a 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.
  -  Version:
  
 -  1.0
  
 -  Author:
  
 -  Symantec Internet Tools Division
  
 -  Since:
  
 -  VCafe 3.0
    
 -  See Also:
    
 -  getProjectFiles, getProjectFiles(int), getProjectFile(String), getProjectFile(int), InvalidProjectFileException
 
  
  -  
	ALL_FILE_ADDED
   -   Specifies a file added by any source.
  
 -  
	COMPILER_ADDED
   -   Indicates this file was added by the compiler.
  
 -  
	ERAD_WIZARD_ADDED
   -   Indicates this file was added by one of the ERAD wizards.
  
 -  
	PARSER_ADDED
   -   Indicates this file was added by the parser.
  
 -  
	SHARED_DATABASE_ADDED
   -   Indicates this file was added by the database.
  
 -  
	UNKNOWN_ADDED
   -   Indicates this file was added by an unknown source.
  
 -  
	USER_ADDED
   -   Indicates this file was added by the user.
 
  
  -  
	com.symantec.itools.vcafe.openapi.ProjectFile()
   -  
 
  
  -  
	checkValidity()
   -   Checks that this object is valid, and throws a 
RuntimeException if not.
   -  
	equals(ProjectFile)
   -   Determine if two 
ProjectFile objects represent the same file in a VisualProject.
   -  
	getClasses()
   -   Gets an array of 
DTClass objects reflecting all the classes and interfaces
 declared in this ProjectFile.
   -  
	getClosestClass(int)
   -   Gets the closest class to the given 
ProjectFile location.
   -  
	getClosestMember(int)
   -   Gets the closest member to the given 
ProjectFile location..
   -  
	getDeclaredClasses()
   -   Gets an array of 
DTClass objects reflecting all the top-level classes and
 interfaces declared in this ProjectFile.
   -  
	getFile()
   -   Get the 
File that corresponds to this ProjectFile.
   -  
	getFileAddedBy()
   -   Determines who added this file to the project.
  
 -  
	getFileId()
   -   Gets a number that uniquely identifies this file within its project.
  
 -  
	getFullName()
   -   Gets the complete filename (including path) of the 
File associated with
 this ProjectFile.
   -  
	getImports()
   -   Determines the list of imports in this 
ProjectFile.
   -  
	getPackageName()
   -   Determines the package name for classes in this 
ProjectFile.
   -  
	getProject()
   -   Gets the 
VisualProject that owns this ProjectFile.
   -  
	getSourceFile()
   -   Get a 
SourceFile associated with this ProjectFile.
   -  
	isRADEnabled()
   -   Gets the Rapid Application Development (RAD) state of this 
ProjectFile.
   -  
	isValid()
   -   Determine if this 
ProjectFile corresponds to a valid file in its VisualProject.
   -  
	remove()
   -   Remove this 
ProjectFile from its VisualProject.
   -  
	rename(String, boolean)
   -   Renames this 
ProjectFile.
   -  
	toString()
   -   Gets a 
String representation of this ProjectFile.
 
  
ALL_FILE_ADDED
public static final int ALL_FILE_ADDED
  -  Specifies a file added by any source.
 
COMPILER_ADDED
public static final int COMPILER_ADDED
  -  Indicates this file was added by the compiler.
 
ERAD_WIZARD_ADDED
public static final int ERAD_WIZARD_ADDED
  -  Indicates this file was added by one of the ERAD wizards.
 
PARSER_ADDED
public static final int PARSER_ADDED
  -  Indicates this file was added by the parser.
 
SHARED_DATABASE_ADDED
public static final int SHARED_DATABASE_ADDED
  -  Indicates this file was added by the database.
 
UNKNOWN_ADDED
public static final int UNKNOWN_ADDED
  -  Indicates this file was added by an unknown source.
 
USER_ADDED
public static final int USER_ADDED
  -  Indicates this file was added by the user.
 
  
ProjectFile
public ProjectFile()
  
checkValidity
public void checkValidity() throws InvalidProjectFileException
  -  Checks that this object is valid, and throws a 
RuntimeException if not.
 Note that the implementation of all of ProjectFile's abstract methods first call
 checkValidity().  Any method could therefore throw an InvalidProjectFileException.
   
 
    -  Throws: InvalidProjectFileException
    
 -  l.gŠlL
  
 
 
 
equals
public abstract boolean equals(ProjectFile projectFile)
  -  Determine if two 
ProjectFile objects represent the same file in a VisualProject.
   
 
    -  Parameters:
    
 -  projectFile - the 
ProjectFile to test against.
     -  Returns:
    
 -  
true if the two ProjectFile objects represent the same file.
   
 
 
getClasses
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTClass[] getClasses()
  -  Gets an array of 
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.
   
 
    -  Returns:
    
 -  an array of 
DTClass objects for all ProjectFile classes.
     -  See Also:
    
 -  getDeclaredClasses
  
 
 
 
getClosestClass
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTClass getClosestClass(int location)
  -  Gets the closest class to the given 
ProjectFile location.  The closest class is the
 innermost class with a source range or Javadoc range that surrounds the given location.
   
 
    -  Parameters:
    
 -  location - the location offset, in zero-based bytes.
    
 -  Returns:
    
 -  the 
DTClass object of the closest class.
   
 
 
getClosestMember
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTMember getClosestMember(int location)
  -  Gets the closest member to the given 
ProjectFile location..  The closest member is the
 member of the  innermost class with a source range or Javadoc range that surrounds the given location.
   
 
    -  Parameters:
    
 -  location - the location offset, in zero-based bytes.
    
 -  Returns:
    
 -  the 
DTMember object of the closest member.
     -  See Also:
    
 -  getClosestMember
  
 
 
 
getDeclaredClasses
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTClass[] getDeclaredClasses()
  -  Gets an array of 
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.
   
 
    -  Returns:
    
 -  an array of 
DTClass objects for top-level classes.
     -  See Also:
    
 -  getClasses
  
 
 
 
getFile
public abstract java.io.File getFile()
  -  Get the 
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).
   
 
getFileAddedBy
public abstract int getFileAddedBy()
  -  Determines who added this file to the project.
  
 
 
    -  Returns:
    
 -  the source that added this file to the project, is a mask containing any of:
 - USER_ADDED - the file was added by the user.
 
 - COMPILER_ADDED - the file was added by the compiler.
 
 - PARSER_ADDED - the file was added by the parser.
 
 - UNKNOWN_ADDED - the file was added by an unknown source.
 
 - SHARED_DATABASE_ADDED - the file was added by the database.
 
 - ERAD_WIZARD_ADDED - the file was added by one of the ERAD wizards.
 
 
   
 
 
getFileId
public abstract int getFileId()
  -  Gets a number that uniquely identifies this file within its project.
  
 
 
    -  Returns:
    
 -  a unique numeric ID within the project.
  
 
 
 
getFullName
public abstract java.lang.String getFullName()
  -  Gets the complete filename (including path) of the 
File associated with
 this ProjectFile.
   
 
    -  Returns:
    
 -  the complete filename of this 
ProjectFile.
   
 
 
getImports
public abstract java.lang.String[] getImports()
  -  Determines the list of imports in this 
ProjectFile.
   
 
    -  Returns:
    
 -  the list of imports.
  
 
 
 
getPackageName
public abstract java.lang.String getPackageName()
  -  Determines the package name for classes in this 
ProjectFile.
   
 
    -  Returns:
    
 -  the package name.
  
 
 
 
getProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject getProject()
  -  Gets the 
VisualProject that owns this ProjectFile.
   
 
    -  Returns:
    
 -  the owning 
VisualProject.
   
 
 
getSourceFile
public abstract com.symantec.itools.vcafe.openapi.SourceFile getSourceFile()
  -  Get a 
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).
   
 
isRADEnabled
public abstract boolean isRADEnabled()
  -  Gets the Rapid Application Development (RAD) state of this 
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.
   
 
    -  Returns:
    
 -  
trueif RAD is enabled, false otherwise.
   
 
 
isValid
public abstract boolean isValid()
  -  Determine if this 
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.
   
 
    -  Returns:
    
 -  
true if the ProjectFile is still valid.
   
 
 
remove
public abstract void remove()
  -  Remove this 
ProjectFile from its VisualProject.
   
 
rename
public abstract void rename(String newName,
                            boolean replace)
  -  Renames this 
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.
   
 
    -  Parameters:
    
 -  newName -   the new fully qualified name for this file.
    
-  replace -   
true to overwrite any file that might already have the new name.
    
 
 
toString
public java.lang.String toString()
  -  Gets a 
String representation of this ProjectFile.
   
 
    -  Returns:
    
 -  the 
String, formatted as "ProjectFile[full path name]".
     -  Overrides:
    
 -  toString in class Object
  
 
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index