public ClangAnalyzer(DTE2 dte2) { State = AnalyzeState.IDLE; _report = new Reporting.Report(); _dte2 = dte2; SetOutputPaneWindows(); }
public void AnalyzeFile(Solution solution, VCFile vcFile, VCConfiguration vcConfiguration) { try { ts.TraceInformation("AnalyzeFile"); ts.TraceInformation("AnalyzeFile name " + vcFile.Name); ts.TraceInformation("AnalyzeFile item name " + vcFile.ItemName); ts.TraceInformation("AnalyzeFile item type " + vcFile.ItemType); ts.TraceInformation("AnalyzeFile extension " + vcFile.Extension); ts.TraceInformation("AnalyzeFile config name " + vcConfiguration.ConfigurationName); ts.TraceInformation("AnalyzeFile config type " + vcConfiguration.ConfigurationType); _analyzeType = AnalyzeType.FILE; _solution = solution; _vcFile = vcFile; _vcConfiguration = vcConfiguration; _report = Reporting.ReportFactory.CreateReportSingleFile(solution, vcFile); OnStartAnalyze(); DoAnalyzeFile(vcFile, vcConfiguration); } catch (Exception exception) { ts.TraceData(TraceEventType.Error, 1, "AnalyzeFile exception: " + exception.Message); OnStopFile(true); } }
public void AnalyzeSolution(Solution solution) { try { _solution = solution; ts.TraceInformation("AnalyzeSolution " + solution.FullName); OnStartAnalyze(); OnStartSolution(); OutputPaneWriteln("Analyzing solution " + solution.FullName); Projects projects = solution.Projects; if ((projects == null) || (projects.Count == 0)) { ts.TraceInformation("No projects in solution"); OnStopAnalyze(true); return; } ts.TraceInformation("AnalyzeSolution #projects " + projects.Count); _vcProjectQueue = DTE2Utils.CreateVCProjectQueue(solution); _report = Reporting.ReportFactory.CreateReportFromVsSolution(solution, _vcProjectQueue); OutputPaneWriteln("Analyzing solution " + solution.FullName + ", " + _report.SolutionCurrent.NumberOfProject + " projects" + ", " + _report.SolutionCurrent.NumberOfFiles + " files"); ts.TraceInformation("AnalyzeSolution " + _vcProjectQueue.Count + " c++ projects " + " in " + _report.SolutionCurrent.NumberOfFiles + " files"); if (_vcProjectQueue.Count == 0) { ts.TraceInformation("AnalyzeSolution no c++ project found " + solution.Projects.Count); OnStopAnalyze(true); } _analyzeType = AnalyzeType.SOLUTION; AnalyseNextProject(); } catch (Exception exception) { ts.TraceData(TraceEventType.Error, 1, "AnalyzeSolution exception: " + exception.Message); OnStopSolution(true); } }
public void AnalyzeProject(Solution solution, VCProject vcProject) { try { ts.TraceInformation("AnalyzeProject " + vcProject.Name); _analyzeType = AnalyzeType.PROJECT; _vcProject = vcProject; _report = Reporting.ReportFactory.CreateReportForVCProject(solution, vcProject); OnStartAnalyze(); DoAnalyzeProject(vcProject); } catch (Exception exception) { ts.TraceData(TraceEventType.Error, 1, "AnalyzeProject exception: " + exception.Message); OnStopProject(true); } }