edu.rice.cs.drjava.project
Class XMLProjectFileParser

java.lang.Object
  extended by edu.rice.cs.drjava.project.ProjectFileParserFacade
      extended by edu.rice.cs.drjava.project.XMLProjectFileParser

public class XMLProjectFileParser
extends ProjectFileParserFacade

This parser loads XML configuration files using the XMLConfig class in the util package.

If at some point new information is to be stored in the project file, the following places in the code that need to changed:

  • If the new information pertains to a document, the DocFile class should be augmented to store the new info.
  • The interface for the DocumentInfoGetter should be expanded to allow for the new data to be retrieved.
  • Add a new clause to the else-if ladder in the FilePropertyVisitor.
  • Add the new information to the DocFile form the DocumentInfoGetter in the ProjectFileBuilder's addSourceDocument method.

    If the change is at the top level, you must modify the evaluateExpression method in this parser and add the corresponding methods to the ProjectFileIR, ProjectFileIRImpl, and ProjectFileBuilder


    Field Summary
    protected  String _parent
               
    protected  String _srcFileBase
               
    protected  XMLConfig _xc
               
    static XMLProjectFileParser ONLY
              Singleton instance of XMLProjectFileParser
     
    Fields inherited from class edu.rice.cs.drjava.project.ProjectFileParserFacade
    _projectFile, _xmlProjectFile
     
    Method Summary
     ProjectFileIR parse(File projFile)
               
    protected  List<FileRegion> readBookmarks()
               
    protected  List<DebugBreakpointData> readBreakpoints()
               
    protected  List<String> readCollapsed()
               
    protected  List<File> readFiles(String path)
               
    protected  List<DocFile> readSourceFiles(String path, String rootPath)
               
    protected  List<DebugWatchData> readWatches()
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    ONLY

    public static final XMLProjectFileParser ONLY
    Singleton instance of XMLProjectFileParser


    _parent

    protected String _parent

    _srcFileBase

    protected String _srcFileBase

    _xc

    protected XMLConfig _xc
    Method Detail

    parse

    public ProjectFileIR parse(File projFile)
                        throws IOException,
                               FileNotFoundException,
                               MalformedProjectFileException
    Overrides:
    parse in class ProjectFileParserFacade
    Parameters:
    projFile - the file to parse
    Returns:
    the project file IR
    Throws:
    IOException
    FileNotFoundException
    MalformedProjectFileException

    readSourceFiles

    protected List<DocFile> readSourceFiles(String path,
                                            String rootPath)
                                     throws MalformedProjectFileException
    Throws:
    MalformedProjectFileException

    readFiles

    protected List<File> readFiles(String path)

    readCollapsed

    protected List<String> readCollapsed()

    readBreakpoints

    protected List<DebugBreakpointData> readBreakpoints()

    readWatches

    protected List<DebugWatchData> readWatches()

    readBookmarks

    protected List<FileRegion> readBookmarks()