private StringBuilder DisplayModuleStatementWalkerVB(VNCCA.SearchTreeCommandConfiguration commandConfiguration) { long startTicks = Log.Trace15("Enter", Common.LOG_APPNAME); VNCSW.VB.VNCVBTypedSyntaxWalkerBase walker = null; if ((bool)ceShowModuleBlock.IsChecked) { walker = new VNCSW.VB.ModuleBlock(); } else { walker = new VNCSW.VB.ModuleStatement(); } commandConfiguration.WalkerPattern.UseRegEx = (bool)ceModuleStatementUseRegEx.IsChecked; commandConfiguration.WalkerPattern.RegEx = teModuleStatementRegEx.Text; commandConfiguration.CodeAnalysisOptions = CodeExplorer.configurationOptions.GetConfigurationInfo(); Log.Trace15("Exit", Common.LOG_APPNAME, startTicks); return(VNCCA.Helpers.VB.InvokeVNCSyntaxWalker(walker, commandConfiguration)); }
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)); }
private StringBuilder DisplayFieldDeclarationWalkerVB(VNCCA.SearchTreeCommandConfiguration commandConfiguration) { long startTicks = Log.Trace15("Enter", Common.LOG_APPNAME); VNCCA.SyntaxNode.FieldDeclarationLocation fieldDeclarationLocation = VNCCA.SyntaxNode.FieldDeclarationLocation.Class; // TODO(crhodes) // Go look at EyeOnLife and see how to do this in a cleaner way. switch (lbeFieldDeclarationLocation.EditValue.ToString()) { case "Class": fieldDeclarationLocation = VNCCA.SyntaxNode.FieldDeclarationLocation.Class; break; case "Module": fieldDeclarationLocation = VNCCA.SyntaxNode.FieldDeclarationLocation.Module; break; case "Structure": fieldDeclarationLocation = VNCCA.SyntaxNode.FieldDeclarationLocation.Structure; break; } VNCSW.VB.VNCVBTypedSyntaxWalkerBase walker = null; walker = new VNCSW.VB.FieldDeclaration(fieldDeclarationLocation); walker.HasAttributes = (bool)CodeExplorer.configurationOptions.ceHasAttributes.IsChecked; commandConfiguration.WalkerPattern.UseRegEx = (bool)ceFieldDeclarationUseRegEx.IsChecked; commandConfiguration.WalkerPattern.RegEx = teFieldDeclarationRegEx.Text; commandConfiguration.CodeAnalysisOptions = CodeExplorer.configurationOptions.GetConfigurationInfo(); Log.Trace15("Exit", Common.LOG_APPNAME, startTicks); return(VNCCA.Helpers.VB.InvokeVNCSyntaxWalker(walker, commandConfiguration)); }