|
|
|
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// CSharpCompletionEngine.cs
|
|
|
|
|
//
|
|
|
|
|
// Author:
|
|
|
|
@ -262,7 +262,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -262,7 +262,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
return contextList.Result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
foreach (var m in initializerResult.Item1.Type.GetMembers (m => !m.IsSynthetic && m.IsPublic && (m.EntityType == EntityType.Property || m.EntityType == EntityType.Field))) { |
|
|
|
|
foreach (var m in initializerResult.Item1.Type.GetMembers (m => m.IsPublic && (m.EntityType == EntityType.Property || m.EntityType == EntityType.Field))) { |
|
|
|
|
contextList.AddMember(m); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1321,8 +1321,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -1321,8 +1321,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
if (currentType != null) { |
|
|
|
|
for (var ct = currentType; ct != null; ct = ct.DeclaringTypeDefinition) { |
|
|
|
|
foreach (var nestedType in ct.NestedTypes) { |
|
|
|
|
if (nestedType.IsSynthetic) |
|
|
|
|
continue; |
|
|
|
|
string name = nestedType.Name; |
|
|
|
|
if (IsAttributeContext(node) && name.EndsWith("Attribute") && name.Length > "Attribute".Length) { |
|
|
|
|
name = name.Substring(0, name.Length - "Attribute".Length); |
|
|
|
@ -1351,8 +1349,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -1351,8 +1349,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
if (member is IMethod && ((IMethod)member).FullName == "System.Object.Finalize") { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (member.IsSynthetic) |
|
|
|
|
continue; |
|
|
|
|
if (member.EntityType == EntityType.Operator) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
@ -1369,7 +1365,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -1369,7 +1365,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
} |
|
|
|
|
var declaring = def.DeclaringTypeDefinition; |
|
|
|
|
while (declaring != null) { |
|
|
|
|
foreach (var member in declaring.GetMembers (m => m.IsStatic && !m.IsSynthetic)) { |
|
|
|
|
foreach (var member in declaring.GetMembers (m => m.IsStatic)) { |
|
|
|
|
if (memberPred == null || memberPred(member)) { |
|
|
|
|
wrapper.AddMember(member); |
|
|
|
|
} |
|
|
|
@ -1916,7 +1912,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -1916,7 +1912,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
foreach (var m in curType.GetMembers ().Reverse ()) { |
|
|
|
|
if (m.IsSynthetic || curType.Kind != TypeKind.Interface && !m.IsOverridable) { |
|
|
|
|
if (curType.Kind != TypeKind.Interface && !m.IsOverridable) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
// filter out the "Finalize" methods, because finalizers should be done with destructors.
|
|
|
|
@ -2151,8 +2147,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -2151,8 +2147,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
var nr = (NamespaceResolveResult)resolveResult; |
|
|
|
|
if (!(resolvedNode.Parent is UsingDeclaration || resolvedNode.Parent != null && resolvedNode.Parent.Parent is UsingDeclaration)) { |
|
|
|
|
foreach (var cl in nr.Namespace.Types) { |
|
|
|
|
if (cl.IsSynthetic) |
|
|
|
|
continue; |
|
|
|
|
string name = cl.Name; |
|
|
|
|
if (hintType != null && hintType.Kind != TypeKind.Array && cl.Kind == TypeKind.Interface) { |
|
|
|
|
continue; |
|
|
|
@ -2291,8 +2285,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -2291,8 +2285,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
var namespaceContents = new CompletionDataWrapper(this); |
|
|
|
|
|
|
|
|
|
foreach (var cl in nr.Namespace.Types) { |
|
|
|
|
if (cl.IsSynthetic) |
|
|
|
|
continue; |
|
|
|
|
IType addType = typePred != null ? typePred(cl) : cl; |
|
|
|
|
if (addType != null) |
|
|
|
|
namespaceContents.AddType(addType, addType.Name); |
|
|
|
@ -2393,8 +2385,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -2393,8 +2385,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
|
|
|
|
|
var filteredList = new List<IMember>(); |
|
|
|
|
foreach (var member in type.GetMembers ()) { |
|
|
|
|
if (member.IsSynthetic) |
|
|
|
|
continue; |
|
|
|
|
if (member.EntityType == EntityType.Indexer || member.EntityType == EntityType.Operator || member.EntityType == EntityType.Constructor || member.EntityType == EntityType.Destructor) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
@ -2445,7 +2435,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -2445,7 +2435,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (resolveResult is TypeResolveResult || includeStaticMembers) { |
|
|
|
|
foreach (var nested in type.GetNestedTypes (t => !t.IsSynthetic)) { |
|
|
|
|
foreach (var nested in type.GetNestedTypes ()) { |
|
|
|
|
if (!lookup.IsAccessible(nested.GetDefinition(), isProtectedAllowed)) |
|
|
|
|
continue; |
|
|
|
|
IType addType = typePred != null ? typePred(nested) : nested; |
|
|
|
|