private static Variables.Root GenerateVariables(File file) { AbstractLanguageFileHandler handler = GetLanguageHandler(file); Variables.Root variables = new Variables.Root(); handler.SetupProject(variables); handler.Process(file, variables); handler.FinalizeProject(variables); return(variables); }
private void listBoxFiles_SelectedValueChange(object sender, EventArgs e) { RelativeFile item = listBoxFiles.SelectedItem as RelativeFile; if (item == null) { return; } AbstractLanguageFileHandler handler = GetLanguageHandler(item.File); SetTextBoxContents(handler.PrepareFileContents(item.File.Contents)); treeViewData.Nodes.Clear(); foreach (Node node in handler.GenerateTreeViewData(GenerateVariables(item.File), item.File)) { treeViewData.Nodes.Add(ConvertNode(node)); } }