public static IScanTarget forJava(string folderWithFilesToScan, string directoryToCreateOunceProjectFiles)
        {
            var scanTarget = new ScanTarget_Java();

            scanTarget.useFileNameOnWorkDirecory = false;
            scanTarget.WorkDirectory             = directoryToCreateOunceProjectFiles;
            scanTarget.Target = folderWithFilesToScan;
            DI.log.info("Created Java ScanTraget on {0} for files in {1} ", directoryToCreateOunceProjectFiles, folderWithFilesToScan);
            return(scanTarget);
        }
        public static IScanTarget createScanTargetsFromFile(String fileToProcess, string workDirectory,
                                                            bool autoAppendTargetName)
        {
            IScanTarget scanTarget = null;

            switch (Path.GetExtension(fileToProcess))
            {
            case ".sln":
            case ".paf":
            case ".gaf":
            case ".ewf":
                scanTarget = new ScanTarget_Paf();
                break;

            case ".java":
            case ".class":
                scanTarget = new ScanTarget_Java();
                break;

            case ".dll":
            case ".exe":
                scanTarget = new ScanTarget_DotNet();
                break;

            case ".epf":
            case ".ppf":
            case ".gpf":
                scanTarget    = new ScanTarget_Paf();
                fileToProcess = Utils.ScanSupport.createTempApplicationFileForProject(fileToProcess, true, workDirectory);
                break;

            default:
                DI.log.debug("in addFileToProcess, file type not supported: {0}:",
                             Path.GetExtension(fileToProcess));
                break;
            }
            if (scanTarget != null)
            {
                scanTarget.useFileNameOnWorkDirecory = autoAppendTargetName;
                scanTarget.WorkDirectory             = workDirectory;
                scanTarget.Target = fileToProcess;
            }
            return(scanTarget);
        }
예제 #3
0
 public static IScanTarget createScanTargetsFromFile(String fileToProcess, string workDirectory,
                                                     bool autoAppendTargetName)
 {
     IScanTarget scanTarget = null;
     switch (Path.GetExtension(fileToProcess))
     {
         case ".sln":
         case ".paf":
         case ".gaf":
         case ".ewf":
             scanTarget = new ScanTarget_Paf();
             break;
         case ".java":
         case ".class":                
             scanTarget = new ScanTarget_Java();
             break;
         case ".dll":
         case ".exe":
             scanTarget = new ScanTarget_DotNet();
             break;
         case ".epf":
         case ".ppf":
         case ".gpf":
             scanTarget = new ScanTarget_Paf();
             fileToProcess = Utils.ScanSupport.createTempApplicationFileForProject(fileToProcess, true, workDirectory);
             break;
         default:
             DI.log.debug("in addFileToProcess, file type not supported: {0}:",
                          Path.GetExtension(fileToProcess));
             break;
     }
     if (scanTarget != null)
     {
         scanTarget.useFileNameOnWorkDirecory = autoAppendTargetName;
         scanTarget.WorkDirectory = workDirectory;
         scanTarget.Target = fileToProcess;
     }
     return scanTarget;
 }
예제 #4
0
 public static IScanTarget forJava(string folderWithFilesToScan, string directoryToCreateOunceProjectFiles)
 {
     var scanTarget = new ScanTarget_Java();
     scanTarget.useFileNameOnWorkDirecory = false;
     scanTarget.WorkDirectory = directoryToCreateOunceProjectFiles;
     scanTarget.Target = folderWithFilesToScan;
     DI.log.info("Created Java ScanTraget on {0} for files in {1} ", directoryToCreateOunceProjectFiles, folderWithFilesToScan);
     return scanTarget;
 }