Beispiel #1
0
        public Thread processCodeViewerContents(bool useAstCachedData)
        {
            "Processing source code: {0}".info(MethodStreamFile);

            //O2AstResolver cachedO2AstResolver = null;
            //if (AstData_MethodStream != null)
            //	cachedO2AstResolver = AstData_MethodStream.O2AstResolver;
            ParametersTreeView.backColor(Color.LightPink);
            MethodsCalledTreeView.backColor(Color.LightPink);
            return(O2Thread.mtaThread(
                       () => {
                mapTaintRules();
                //AstData_MethodStream = new O2MappedAstData();
                //AstData_MethodStream.loadFile(MethodStreamFile);
                if (AstData_MethodStream.notNull() && useAstCachedData.isFalse())
                {
                    "Disposing previously used AstData_MethodStream".debug();
                    AstData_MethodStream.dispose();
                    PublicDI.config.gcCollect();
                }

                AstData_MethodStream = MethodStreamFile.getAstData(useAstCachedData);                                //new List<string>(),false);

                AstData_MethodStream.showMethodStreamDetailsInTreeViews(ParametersTreeView, MethodsCalledTreeView);
                ParametersTreeView.backColor(Color.White);
                MethodsCalledTreeView.backColor(Color.White);
            }));
        }
Beispiel #2
0
            public void createMethodStream(IMethod iMethod)
            {
                MethodStream     = AstEngine.AstData.createO2MethodStream(iMethod);
                MethodStreamFile = MethodStream.csharpCode().saveWithExtension(".cs");

                CodeViewer.open(MethodStreamFile);
                CodeStreamCodeViewer.open(MethodStreamFile);
                if (AstData_MethodStream.notNull())
                {
                    AstData_MethodStream.Dispose();
                }
                AstData_MethodStream = new O2MappedAstData();
                AstData_MethodStream.loadFile(MethodStreamFile);
            }