예제 #1
0
        //-------------<the parsing is called from this method>-----------------------------------------------
        //-------------<it also calls the display function and XML functions>---------------------------------
        public static void processAnalysis(string[] files, string path, List <string> patterns, List <string> options)
        {
            XMLOutput xml = new XMLOutput();

            Analyzer analyze = new Analyzer();
            Display  display = new Display();

            if (options.Contains("/R") || options.Contains("/r"))
            {
                analyze.doAnalysis(files);
                analyze.doAnalysisRelationship(files);
                display.display(files, path, patterns, options);
                display.displaySummary(files);
                display.displayRelation(files);
            }
            else
            {
                analyze.doAnalysis(files);
                display.display(files, path, patterns, options);
                display.displaySummary(files);
                display.displayFunctionComplexity(files);
            }
            if (options.Contains("/X") || options.Contains("/x"))
            {
                xml.displaySummary();

                if (options.Contains("/R") || options.Contains("/r"))
                {
                    xml.displayRelation();
                }
                else
                {
                    xml.displayFunctionAnalysis();
                }
            }
        }
예제 #2
0
        // ------------------------<TestStub for XML Output>-------------------------
#if (TEST_XMLOUTPUT)
        static void Main(string[] args)
        {
            ElemRelation e = new ElemRelation();

            e.fromClass    = "Derived";
            e.toClass      = "Original";
            e.relationType = "Inheritance";

            RelationshipRepository.relationship_.Add(e);

            Elem elem = new Elem();

            elem.type  = "function";
            elem.name  = "Derived";
            elem.begin = 1;
            elem.end   = 10;
            elem.functionComplexity = 2;
            OutputRepository.output_.Add(elem);
            XMLOutput xml = new XMLOutput();

            xml.displaySummary();
            xml.displayFunctionAnalysis();
            xml.displayRelation();
        }
예제 #3
0
        //-------------<the parsing is called from this method>-----------------------------------------------
        //-------------<it also calls the display function and XML functions>---------------------------------
        public static void processAnalysis(string[] files, string path, List<string> patterns, List<string> options)
        {
            XMLOutput xml = new XMLOutput();

            Analyzer analyze = new Analyzer();
            Display display = new Display();
            if (options.Contains("/R") || options.Contains("/r"))
            {
                analyze.doAnalysis(files);
                analyze.doAnalysisRelationship(files);
                display.display(files, path, patterns, options);
                display.displaySummary(files);
                display.displayRelation(files);
            }
            else
            {
                analyze.doAnalysis(files);
                display.display(files, path, patterns, options);
                display.displaySummary(files);
                display.displayFunctionComplexity(files);
            }
            if (options.Contains("/X") || options.Contains("/x"))
            {
                xml.displaySummary();

                if (options.Contains("/R") || options.Contains("/r"))
                {
                    xml.displayRelation();
                }
                else
                {
                    xml.displayFunctionAnalysis();
                }
            }
        }
예제 #4
0
        // ------------------------<TestStub for XML Output>-------------------------
#if(TEST_XMLOUTPUT)

        static void Main(string[] args)
        {

            ElemRelation e = new ElemRelation();
            e.fromClass = "Derived";
            e.toClass = "Original";
            e.relationType = "Inheritance";

            RelationshipRepository.relationship_.Add(e);

            Elem elem = new Elem();
            elem.type = "function";
            elem.name = "Derived";
            elem.begin = 1;
            elem.end = 10;
            elem.functionComplexity = 2;
            OutputRepository.output_.Add(elem);
            XMLOutput xml = new XMLOutput();
            xml.displaySummary();
            xml.displayFunctionAnalysis();
            xml.displayRelation();
        }