private StringBuilder DisplayMethodStatementWalkerVB(VNCCA.SearchTreeCommandConfiguration commandConfiguration) { long startTicks = Log.Trace15("Enter", Common.LOG_APPNAME); VNCSW.VB.VNCVBTypedSyntaxWalkerBase walker = null; commandConfiguration.WalkerPattern.UseRegEx = (bool)ceMethodStatementUseRegEx.IsChecked; commandConfiguration.WalkerPattern.RegEx = teMethodStatementRegEx.Text; commandConfiguration.CodeAnalysisOptions = CodeExplorer.configurationOptions.GetConfigurationInfo(); if ((bool)ceShowMethodBlock.IsChecked) { walker = new VNCSW.VB.MethodBlock(); //commandConfiguration.CodeAnalysisOptions.ShowAnalysisCRC = true; } else { walker = new VNCSW.VB.MethodStatement(); } StringBuilder results = VNCCA.Helpers.VB.InvokeVNCSyntaxWalker(walker, commandConfiguration); // We may have done a deep dive on a method. Go grab the results. // TODO(crhodes) // This might only be if in MethodBlock mode. See above. CodeExplorer.teSyntaxNode.Text += walker.WalkerNode.ToString(); CodeExplorer.teSyntaxToken.Text += walker.WalkerToken.ToString(); CodeExplorer.teSyntaxTrivia.Text += walker.WalkerTrivia.ToString(); CodeExplorer.teSyntaxStructuredTrivia.Text += walker.WalkerStructuredTrivia.ToString(); Log.Trace15("Exit", Common.LOG_APPNAME, startTicks); return(results); }
private StringBuilder DisplayMethodStatementWalkerVB(StringBuilder sb, SyntaxTree tree) { VNC.CodeAnalysis.SyntaxWalkers.VB.VNCVBTypedSyntaxWalkerBase walker = null; //if ((bool)ceShowMethodBlock.IsChecked) //{ // walker = new VNC.CodeAnalysis.SyntaxWalkers.VB.MethodBlock(); //} //else //{ walker = new VNC.CodeAnalysis.SyntaxWalkers.VB.MethodStatement(); //} //return InvokeVNCSyntaxWalker(sb, // (bool)ceMethodStatementUseRegEx.IsChecked, teMethodStatementRegEx.Text, // tree, walker); return(InvokeVNCSyntaxWalker(sb, false, "", tree, walker)); }