public void Add(ContextAction action)
 {
     this.AddControls(action.Controls);
     this.actions.Add(action);
 }
        private ToolStripMenuItem CreateMenuItem(ContextAction action, NodeInfo node)
        {
            string text;

            if (action.FormattedText)
            {
                string name, fullname;
                fullname = node.AnalysisObject.FullName;
                if (node.AnalysisObject.IsMethodContainer)
                {
                    name = ((MethodContainer)node.AnalysisObject).Name;
                }
                else
                {
                    name = node.Node.Text;
                }

                text = string.Format(action.Text, node.Node.Text, name, fullname);
            }
            else
            {
                text = action.Text;
            }

            ToolStripMenuItem item = new ToolStripMenuItem(text);
            action.MenuItem = item;
            item.Click += new EventHandler(MenuItem_Click);
            return item;
        }