Package org.aspectj.ajde.ui

Examples of org.aspectj.ajde.ui.BuildConfigModel


  public BuildConfigModel buildModel(String configFilePath) {
    File configFile = new File(configFilePath);
    String rootPath = configFile.getParent();
    String configFileName = configFile.getName();
    BuildConfigModel model = new BuildConfigModel(configFilePath);
    List configFiles = new ArrayList();
    List importedFiles = new ArrayList();
    List badEntries = null;
    try {
        LstBuildConfigFileParser configParser = new LstBuildConfigFileParser(configFilePath);
          configParser.parseConfigFile(new File(configFilePath));
          configFiles = configParser.getFiles();
          importedFiles = configParser.getImportedFiles();
          badEntries = configParser.getProblemEntries();
    } catch (ConfigParser.ParseException pe) {
//      String filePath = "<unknown>";
//      if (pe.getFile() != null) filePath = pe.getFile().getAbsolutePath();
            IMessage message = new Message(
                pe.getMessage(),
                IMessage.ERROR,
                pe,
                new SourceLocation(pe.getFile(), pe.getLine(), 1));
            Ajde.getDefault().getMessageHandler().handleMessage(message);
      }
     
      List relativePaths = relativizeFilePaths(configFiles, rootPath);
        BuildConfigNode root = new BuildConfigNode(configFileName, BuildConfigNode.Kind.FILE_LST, rootPath);         
        buildDirTree(root, rootPath, importedFiles, configFileName);
        model.setRoot(root);
        addFilesToDirTree(model, relativePaths, badEntries);
       
        pruneEmptyDirs(root);
        sortModel(model.getRoot(), ALPHABETICAL_COMPARATOR);
        //addImportedFilesToDirTree(model, importedFiles);
       
        addProblemEntries(root, badEntries);
    return model;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.ajde.ui.BuildConfigModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.