|
|
|
@ -354,7 +354,13 @@ namespace ICSharpCode.SharpDevelop.Refactoring
@@ -354,7 +354,13 @@ namespace ICSharpCode.SharpDevelop.Refactoring
|
|
|
|
|
// strip the index from the expression to resolve the underlying expression
|
|
|
|
|
string newExpr = expressionFinder.RemoveLastPart(expr.Expression); |
|
|
|
|
if (newExpr.Length >= expr.Expression.Length) { |
|
|
|
|
throw new ApplicationException("new expression must be shorter than old expression"); |
|
|
|
|
//throw new ApplicationException("new expression must be shorter than old expression");
|
|
|
|
|
|
|
|
|
|
// If the exception finder doesn't work as expected, we just pretend this wasn't an indexer.
|
|
|
|
|
// This method of 'Find References' will become obsolete with the new NRefactory anyways,
|
|
|
|
|
// so since we likely won't spend time to track down the EF bug, we just ignore it and accept
|
|
|
|
|
// that 'find references' might sometimes miss some results.
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
expr.Expression = newExpr; |
|
|
|
|
return true; |
|
|
|
|