/// <summary>
 /// Analyzes the current project
 /// </summary>
 private void AnalyzeProject(Object sender, System.EventArgs e)
 {
     if (PluginBase.CurrentProject != null)
     {
         String pmdDir   = Path.Combine(PathHelper.ToolDir, "flexpmd");
         String pmdJar   = Path.Combine(pmdDir, "flex-pmd-command-line-1.2.jar");
         String ruleFile = Path.Combine(this.GetProjectPath(), "Ruleset.xml");
         if (!File.Exists(ruleFile))
         {
             ruleFile = settingObject.PMDRuleset;                         // Use default...
         }
         PMDRunner.Analyze(pmdJar, this.GetProjectPath(), this.GetSourcePath(), ruleFile);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Runs the pmd analyzer process
 /// </summary>
 public static void Analyze(String pmdPath, String projectPath, String sourcePath, String pmdRuleset)
 {
     try
     {
         PMDRunner pr = new PMDRunner();
         String objDir = Path.Combine(projectPath, "obj");
         if (!Directory.Exists(objDir)) Directory.CreateDirectory(objDir);
         pr.RunPMD(pmdPath, objDir, sourcePath, pmdRuleset);
         pr.WatchFile(objDir);
     }
     catch (Exception ex)
     {
         ErrorManager.ShowError(ex);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Runs the pmd analyzer process
 /// </summary>
 public static void Analyze(String pmdPath, String projectPath, String sourcePath, String pmdRuleset)
 {
     try
     {
         PMDRunner pr     = new PMDRunner();
         String    objDir = Path.Combine(projectPath, "obj");
         if (!Directory.Exists(objDir))
         {
             Directory.CreateDirectory(objDir);
         }
         pr.RunPMD(pmdPath, objDir, sourcePath, pmdRuleset);
         pr.WatchFile(objDir);
     }
     catch (Exception ex)
     {
         ErrorManager.ShowError(ex);
     }
 }