|
|
|
|
@ -657,13 +657,15 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -657,13 +657,15 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
AddKeywords(dataList, linqKeywords); |
|
|
|
|
return dataList.Result; |
|
|
|
|
} |
|
|
|
|
if (currentType != null && currentType.Kind == TypeKind.Enum) { |
|
|
|
|
var contextList = new CompletionDataWrapper(this); |
|
|
|
|
var identifierStart = GetExpressionAtCursor(); |
|
|
|
|
|
|
|
|
|
if (currentType != null && currentType.Kind == TypeKind.Enum && identifierStart == null) { |
|
|
|
|
if (!char.IsLetter(completionChar)) |
|
|
|
|
return null; |
|
|
|
|
return HandleEnumContext(); |
|
|
|
|
} |
|
|
|
|
var contextList = new CompletionDataWrapper(this); |
|
|
|
|
var identifierStart = GetExpressionAtCursor(); |
|
|
|
|
|
|
|
|
|
if (!(char.IsLetter(completionChar) || completionChar == '_') && (!controlSpace || identifierStart == null)) { |
|
|
|
|
return controlSpace ? HandleAccessorContext() ?? DefaultControlSpaceItems(identifierStart) : null; |
|
|
|
|
} |
|
|
|
|
@ -1076,6 +1078,24 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -1076,6 +1078,24 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
} |
|
|
|
|
return DefaultControlSpaceItems(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var attribute = syntaxTree.GetNodeAt<Attribute>(location); |
|
|
|
|
Console.WriteLine(syntaxTree.GetText ()); |
|
|
|
|
Console.WriteLine("---"); |
|
|
|
|
Console.WriteLine("attr:"+attribute); |
|
|
|
|
if (attribute != null) { |
|
|
|
|
var contextList = new CompletionDataWrapper(this); |
|
|
|
|
var astResolver = CompletionContextProvider.GetResolver(GetState (), syntaxTree); |
|
|
|
|
|
|
|
|
|
var csResolver = astResolver.GetResolverStateBefore(attribute); |
|
|
|
|
|
|
|
|
|
AddContextCompletion( |
|
|
|
|
contextList, |
|
|
|
|
csResolver, |
|
|
|
|
attribute |
|
|
|
|
); |
|
|
|
|
return contextList.Result; |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|