Browse Source

[NRefactory] Removed Browsable Attribute from GetEditorBrowsableState

- that attribute should not affect completion, only design time
editors.
newNRvisualizers
Mike Krüger 13 years ago
parent
commit
5418c1cadd
  1. 6
      ICSharpCode.NRefactory/Completion/CompletionExtensionMethods.cs

6
ICSharpCode.NRefactory/Completion/CompletionExtensionMethods.cs

@ -45,12 +45,6 @@ namespace ICSharpCode.NRefactory.Completion @@ -45,12 +45,6 @@ namespace ICSharpCode.NRefactory.Completion
if (entity == null)
throw new ArgumentNullException ("entity");
var browsable = entity.Attributes.FirstOrDefault(attr => attr.AttributeType.Name == "BrowsableAttribute" && attr.AttributeType.Namespace == "System.ComponentModel");
if (browsable != null && browsable.PositionalArguments.Count == 1 && browsable.PositionalArguments [0].ConstantValue is bool) {
if (!((bool)browsable.PositionalArguments [0].ConstantValue))
return System.ComponentModel.EditorBrowsableState.Never;
}
var browsableState = entity.Attributes.FirstOrDefault(attr => attr.AttributeType.Name == "EditorBrowsableAttribute" && attr.AttributeType.Namespace == "System.ComponentModel");
if (browsableState != null && browsableState.PositionalArguments.Count == 1) {
try {

Loading…
Cancel
Save