示例#1
0
		public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
		{
			var evt = (IEvent)dataObject;
			nodeInfo.Label = MonoDevelop.Ide.TypeSystem.Ambience.EscapeText (evt.GetDisplayString ());
			var accessor = evt.AddAccessor ?? evt.RemoveAccessor;

			if (!accessor.IsPublic ())
				nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate (nodeInfo.Label);

			nodeInfo.Icon = Context.GetIcon (GetStockIcon (evt));
		}
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var type = (ITypeDefinition)dataObject;

            nodeInfo.Label = Ide.TypeSystem.Ambience.EscapeText(treeBuilder.NodeName);
            if (!type.IsPublic())
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }
            nodeInfo.Icon = Context.GetIcon(GetStockIcon(type));
        }
示例#3
0
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var type = (TypeDefinition)dataObject;

            nodeInfo.Label = MonoDevelop.Ide.TypeSystem.Ambience.EscapeText(CSharpLanguage.Instance.FormatTypeName(type));
            if (!type.IsPublic)
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }
            nodeInfo.Icon = Context.GetIcon(GetStockIcon(type));
        }
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var field = (FieldDefinition)dataObject;

            nodeInfo.Label = MonoDevelop.Ide.TypeSystem.Ambience.EscapeText(field.Name + " : " + CSharpLanguage.Instance.TypeToString(field.FieldType, false, field));

            if (!field.IsPublic)
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }
            nodeInfo.Icon = Context.GetIcon(GetStockIcon(field));
        }
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var field = (IField)dataObject;

            nodeInfo.Label = MonoDevelop.Ide.TypeSystem.Ambience.EscapeText(field.GetDisplayString());

            if (!field.IsPublic())
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }
            nodeInfo.Icon = Context.GetIcon(GetStockIcon(field));
        }
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var field = (FieldDefinition)dataObject;

            nodeInfo.Label = field.Name + " : " + CSharpLanguage.Instance.TypeToString(field.FieldType, false, field);

            if (((FieldAttributes.Private | FieldAttributes.Assembly) & field.Attributes) != 0)
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }
            nodeInfo.Icon = Context.GetIcon(GetStockIcon(field));
        }
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var evt = (EventDefinition)dataObject;

            nodeInfo.Label = evt.Name + " : " + CSharpLanguage.Instance.TypeToString(evt.EventType, false, evt);
            var accessor = evt.AddMethod ?? evt.RemoveMethod;

            if (((MethodAttributes.Private | MethodAttributes.Assembly) & accessor.Attributes) != 0)
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }

            nodeInfo.Icon = Context.GetIcon(GetStockIcon(evt));
        }
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var evt = (EventDefinition)dataObject;

            nodeInfo.Label = MonoDevelop.Ide.TypeSystem.Ambience.EscapeText(evt.Name + " : " + CSharpLanguage.Instance.TypeToString(evt.EventType, false, evt));
            var accessor = evt.AddMethod ?? evt.RemoveMethod;

            if (!accessor.IsPublic)
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }

            nodeInfo.Icon = Context.GetIcon(GetStockIcon(evt));
        }
示例#9
0
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var property = (PropertyDefinition)dataObject;

            nodeInfo.Label = MonoDevelop.Ide.TypeSystem.Ambience.EscapeText(GetText(property, property.IsIndexer()));

            var accessor = property.GetMethod ?? property.SetMethod;

            if (!accessor.IsPublic)
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }

            nodeInfo.Icon = Context.GetIcon(GetStockIcon(property));
        }
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var method = (IMethod)dataObject;

            var ambience = new CSharpAmbience();

            nodeInfo.Label = Ide.TypeSystem.Ambience.EscapeText(method.GetDisplayString());

            if (method.IsPrivate())
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }

            nodeInfo.Icon = Context.GetIcon(GetStockIcon(method));
        }
        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            var method = (MethodDefinition)dataObject;

            var ambience = new CSharpAmbience();

            try {
                nodeInfo.Label = MonoDevelop.Ide.TypeSystem.Ambience.EscapeText(GetText(method));
            } catch (Exception) {
                nodeInfo.Label = method.Name;
            }

            if (method.IsPrivate || method.IsAssembly)
            {
                nodeInfo.Label = MethodDefinitionNodeBuilder.FormatPrivate(nodeInfo.Label);
            }

            nodeInfo.Icon = Context.GetIcon(GetStockIcon(method));
        }