MenuItem MakeItem(List <string> definitions, IMember member) { if (member == null) { return(null); } if (definitions.Contains(member.DotNetName)) { return(null); } definitions.Add(member.DotNetName); MenuItem item = MakeItem(MemberNode.Create(member), member.DeclaringType.CompilationUnit, member.Region); MenuItem declaringType = MakeItem(null, member.DeclaringType); if (declaringType != null) { declaringType.Header = StringParser.Parse("${res:SharpDevelop.Refactoring.DeclaringType}: ") + declaringType.Header; item.Items.Add(declaringType); } return(item); }
ToolStripMenuItem MakeItem(List <string> definitions, IMember member) { if (member == null) { return(null); } if (definitions.Contains(member.DotNetName)) { return(null); } definitions.Add(member.DotNetName); ToolStripMenuItem item = MakeItem(member.FullyQualifiedName, MemberNode.Create(member), member.DeclaringType.CompilationUnit, member.Region); ToolStripMenuItem declaringType = MakeItem(null, member.DeclaringType); if (declaringType != null) { item.DropDown.Items.Add(new ToolStripSeparator()); declaringType.Text = StringParser.Parse("${res:SharpDevelop.Refactoring.DeclaringType}: ") + declaringType.Text; item.DropDown.Items.Add(declaringType); } return(item); }