예제 #1
0
 private void AddSourceFileFullPathHierachy(string basePath, List <string> sourceFileFullPathList)
 {
     try
     {
         FileAttributes attr = File.GetAttributes(basePath);
         if (attr.HasFlag(FileAttributes.Directory)) // IsDirectory
         {
             foreach (string subFile in DexterUtil.GetAllFilesAndDirectoriesInDirectory(basePath))
             {
                 if (hasValidDirectoryName(subFile))
                 {
                     AddSourceFileFullPathHierachy(subFile, sourceFileFullPathList);
                 }
                 else
                 {
                     continue;
                 }
             }
         }
         else
         {
             if (DexterConfig.Instance.IsFileSupportedForAnalysis(basePath) == false)
             {
                 return;
             }
             sourceFileFullPathList.Add(DexterUtil.RefinePath(basePath));
         }
     }
     catch (Exception e)
     {
         CliLog.Error("There is no file :" + e.Message);
         Environment.Exit(0);
     }
 }
예제 #2
0
 private string GetExistingModuleFullPathWithSourceDirList()
 {
     foreach (string srcDir in SourceDirList)
     {
         string moduleFullPath = DexterUtil.RefinePath(srcDir + "/" + ModulePath);
         if (File.Exists(moduleFullPath))
         {
             return(moduleFullPath);
         }
     }
     return("");
 }
예제 #3
0
 public void AddHeaderAndSourceConfiguration(List <ProjectAnalysisConfiguration> projectAnalysisConfigurationList)
 {
     foreach (var param in projectAnalysisConfigurationList)
     {
         if (param.ProjectName.Equals(ProjectName) &&
             DexterUtil.RefinePath(param.ProjectFullPath).Equals(ProjectFullPath))
         {
             foreach (string dir in param.SourceDirs)
             {
                 AddSourceBaseDirList(dir);
             }
             foreach (string dir in param.HeaderDirs)
             {
                 AddHeaderBaseDirList(dir);
             }
         }
     }
 }
예제 #4
0
 public void ChangeDexterHome(string homePath)
 {
     HomePath   = DexterUtil.RefinePath(homePath);
     dexterHome = HomePath;
 }