Example #1
0
 public List <MethodDeclaration> find(string methodToFind)
 {
     MethodToFind = methodToFind;
     foreach (var compilationUnit in O2AstResolver.parsedCompilationUnits.Values)
     {
         //graphAstVisitor.parseInformation.SetCompilationUnit(compilationUnit);
         O2AstResolver.setCurrentCompilationUnit(compilationUnit);
         compilationUnit.AcceptVisitor(O2AstVisitor, null);
         // var methods = compilationUnit.methods();
         // foreach (var method in methods)
         // {
         //      method.
         // }
     }
     return(foundMethods);
 }
Example #2
0
        public void loadCompilationUnit(string filePath, List <ISpecial> specials, CompilationUnit compilationUnit)
        {
            //store specials
            FileToSpecials.add(filePath, specials);
            // map all INodes
            FileToINodes.add(filePath, new GetAllINodes(compilationUnit));
            FileToCompilationUnit.add(filePath, compilationUnit);
            //Map AsT to DOM (System.DOM classes)
            MapAstToDom.loadCompilationUnit(compilationUnit);
            //Map AST to NRefactory (ICompilationUnit, IClass, IMethod)
            MapAstToNRefactory.loadCompilationUnit(compilationUnit);

            // update variable for CodeComplete
            O2AstResolver.setCurrentCompilationUnit(compilationUnit);
            var iCompilationUnit = MapAstToNRefactory.CompilationUnitToICompilationUnit[compilationUnit];

            O2AstResolver.myProjectContent.UpdateCompilationUnit(null, iCompilationUnit, "");
        }