|
|
|
|
@ -212,6 +212,8 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -212,6 +212,8 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
resolveResult.Item2 |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return CreateCompletionData( |
|
|
|
|
location, |
|
|
|
|
resolveResult.Item1, |
|
|
|
|
@ -312,11 +314,13 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -312,11 +314,13 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
return null; |
|
|
|
|
case '>': |
|
|
|
|
if (!IsInsideDocComment()) { |
|
|
|
|
if (offset > 2 && document.GetCharAt (offset - 2) == '-' && !IsInsideCommentStringOrDirective()) { |
|
|
|
|
return HandleMemberReferenceCompletion(GetExpressionBeforeCursor()); |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
string lineText = document.GetText(document.GetLineByNumber(location.Line)); |
|
|
|
|
int startIndex = Math.Min(location.Column - 1, lineText.Length - 1); |
|
|
|
|
|
|
|
|
|
while (startIndex >= 0 && lineText [startIndex] != '<') { |
|
|
|
|
--startIndex; |
|
|
|
|
if (lineText [startIndex] == '/') { |
|
|
|
|
@ -2293,6 +2297,10 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -2293,6 +2297,10 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
IType type = resolveResult.Type; |
|
|
|
|
if (resolvedNode.Parent is PointerReferenceExpression && (type is PointerType)) { |
|
|
|
|
type = ((PointerType)type).ElementType; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//var typeDef = resolveResult.Type.GetDefinition();
|
|
|
|
|
var result = new CompletionDataWrapper(this); |
|
|
|
|
bool includeStaticMembers = false; |
|
|
|
|
@ -2525,7 +2533,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -2525,7 +2533,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
|
|
|
|
|
baseUnit = ParseStub("a", false); |
|
|
|
|
var curNode = baseUnit.GetNodeAt(location); |
|
|
|
|
|
|
|
|
|
// hack for local variable declaration missing ';' issue - remove that if it works.
|
|
|
|
|
if (curNode is EntityDeclaration || baseUnit.GetNodeAt<Expression>(location) == null && baseUnit.GetNodeAt<MemberType>(location) == null) { |
|
|
|
|
baseUnit = ParseStub("a"); |
|
|
|
|
@ -2550,6 +2557,11 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
@@ -2550,6 +2557,11 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
|
|
|
|
|
if (type != null) { |
|
|
|
|
return new ExpressionResult((AstNode)type.Target, baseUnit); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var pref = baseUnit.GetNodeAt<PointerReferenceExpression>(location); |
|
|
|
|
if (pref != null) { |
|
|
|
|
return new ExpressionResult((AstNode)pref.Target, baseUnit); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
AstNode expr = null; |
|
|
|
|
if (mref != null) { |
|
|
|
|
|