Browse Source

Fixed unit tests.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
ef23a05edf
  1. 7
      ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs

7
ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs

@ -662,11 +662,12 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (identifierStart.Node is VariableInitializer && location <= ((VariableInitializer)identifierStart.Node).NameToken.EndLocation) { if (identifierStart.Node is VariableInitializer && location <= ((VariableInitializer)identifierStart.Node).NameToken.EndLocation) {
return controlSpace ? HandleAccessorContext() ?? DefaultControlSpaceItems(identifierStart) : null; return controlSpace ? HandleAccessorContext() ?? DefaultControlSpaceItems(identifierStart) : null;
} }
if (identifierStart.Node is CatchClause) { if (identifierStart.Node is CatchClause) {
if (((CatchClause)identifierStart.Node).VariableNameToken.Contains(location)) { if (((CatchClause)identifierStart.Node).VariableNameToken.IsInside(location)) {
return null; return null;
} }
}
if (identifierStart.Node is AstType && identifierStart.Node.Parent is CatchClause) {
return HandleCatchClauseType(identifierStart); return HandleCatchClauseType(identifierStart);
} }
} }
@ -990,7 +991,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
return type; return type;
return null; return null;
}; };
if (identifierStart.Node is CatchClause) { if (identifierStart.Node.Parent is CatchClause) {
var wrapper = new CompletionDataWrapper(this); var wrapper = new CompletionDataWrapper(this);
AddTypesAndNamespaces( AddTypesAndNamespaces(
wrapper, wrapper,

Loading…
Cancel
Save