Esempio n. 1
0
        public void ShowTree()
        {
            treeView.Nodes.Clear();
            visualizator vs = new visualizator(treeView.Nodes);

            if (showAllCheckBox.Checked)
            {
                foreach (SyntaxTreeSelectComboBoxItem item in syntaxTreeSelectComboBox.Items)
                {
                    vs.prepare_node(item.Node, "compilation_unit");
                }
            }
            else
            if (syntaxTreeSelectComboBox.SelectedItem != null)
            {
                vs.prepare_node((syntaxTreeSelectComboBox.SelectedItem as SyntaxTreeSelectComboBoxItem).Node, "compilation_unit");
            }
        }
Esempio n. 2
0
        private void prepare_node_with_text(syntax_tree_node subnode, string text)
		{
			if (subnode==null)
			{
				return;
			}
			TreeNode tn=new TreeNode();
			tn.Text=text;
			tn.Tag=subnode;
			string s=get_node_info.node(subnode);
			if (s!=null)
			{
				tn.Text+="     "+s;
			}
			//tn.Nodes.Clear();
			visualizator vs=new visualizator(tn.Nodes);
			subnode.visit(vs);
			nodes.Add(tn);
		}
Esempio n. 3
0
        private void prepare_node_with_text(syntax_tree_node subnode, string text)
        {
            if (subnode == null)
            {
                return;
            }
            TreeNode tn = new TreeNode();

            tn.Text = text;
            tn.Tag  = subnode;
            string s = get_node_info.node(subnode);

            if (s != null)
            {
                tn.Text += "     " + s;
            }
            //tn.Nodes.Clear();
            visualizator vs = new visualizator(tn.Nodes);

            subnode.visit(vs);
            nodes.Add(tn);
        }
 public void ShowTree()
 {
     treeView.Nodes.Clear();
     visualizator vs = new visualizator(treeView.Nodes);
     if (showAllCheckBox.Checked)
         foreach (SyntaxTreeSelectComboBoxItem item in syntaxTreeSelectComboBox.Items)
             vs.prepare_node(item.Node, "compilation_unit");
     else
         if (syntaxTreeSelectComboBox.SelectedItem!=null)
             vs.prepare_node((syntaxTreeSelectComboBox.SelectedItem as SyntaxTreeSelectComboBoxItem).Node, "compilation_unit");
 }