Reporter | Alexander Shvedov (shvedov) |
---|---|
Created | Feb 18, 2012 3:20:31 AM |
Updated | Feb 18, 2012 3:20:31 AM |
Priority | Show-stopper |
Type | Bug |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Unassigned |
Subsystem | Search |
Affected versions | 6.1.1 |
Fixed in build | No Fixed in build |
Code:
Pattern to replace string.IsNullOrEmpty with extension method, using argument placeholder:
Matches 1, replace result:
Pattern #2 (expression placeholder):
Matches: 1, result is uncompilable:
Pattern to replace string.IsNullOrEmpty with extension method, using argument placeholder:
Matches 1, replace result:
Cannot find ICSharpArgument for element '0' --- EXCEPTION #1/2 [ElementFactoryException] Message = “Cannot find ICSharpArgument for element '0'” ExceptionPath = Root.InnerException ClassName = JetBrains.ReSharper.Psi.ElementFactoryException HResult = COR_E_EXCEPTION=80131500 Source = JetBrains.ReSharper.Psi.CSharp StackTraceString = “ at JetBrains.ReSharper.Psi.CSharp.Impl.CSharpElementFactoryImpl.SubstituteNodes(ITreeNode root, ParameterMarker[] markers, Object[] args) at JetBrains.ReSharper.Psi.CSharp.Impl.CSharpElementFactoryImpl.CreateExpression(String format, Object[] args) at JetBrains.ReSharper.Psi.Services.CSharp.StructuralSearch.CSharpStructuralSearchReplacer.DoReplace(ITreeNode elementToReplace, String replacePattern, IDictionary`2 placeholders, Func`2 getMatchedElement, Func`2 getMatchedText, IEnumerable`1 elementsToRemove, Boolean formatAfterReplace, Boolean shortenReferences) ” --- Outer --- --- EXCEPTION #2/2 [LoggerException] Message = “Cannot find ICSharpArgument for element '0'” ExceptionPath = Root ClassName = JetBrains.Util.LoggerException InnerException = “Exception #1 at Root.InnerException” HResult = COR_E_APPLICATION=80131600 StackTraceString = “ at JetBrains.ReSharper.Psi.Services.CSharp.StructuralSearch.CSharpStructuralSearchReplacer.DoReplace(ITreeNode elementToReplace, String replacePattern, IDictionary`2 placeholders, Func`2 getMatchedElement, Func`2 getMatchedText, IEnumerable`1 elementsToRemove, Boolean formatAfterReplace, Boolean shortenReferences) at JetBrains.ReSharper.Psi.Services.CSharp.StructuralSearch.CSharpStructuralSearchReplacer.Replace(IStructuralMatchResult match, String replacePattern, IDictionary`2 placeholders, Boolean formatAfterReplace, Boolean shortenReferences) at JetBrains.ReSharper.Psi.Services.CSharp.StructuralSearch.CSharpStructuralSearchReplacer.Replace(IEnumerable`1 matches, String replacePattern, IDictionary`2 placeholders, Boolean formatAfterReplace, Boolean shortenReferences) at JetBrains.ReSharper.Psi.Services.CSharp.StructuralSearch.CSharpStructuralSearcherFactory.Replace(IEnumerable`1 targets, IStructuralSearchPattern pattern) at JetBrains.ReSharper.Features.StructuralSearch.StructuralSearchActionManager.<>c__DisplayClass11.<>c__DisplayClass13.<DoReplace>b__10() at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action) at JetBrains.Threading.ReentrancyGuard.ExecuteOrQueue(String name, Action action) at JetBrains.ReSharper.Features.StructuralSearch.StructuralSearchActionManager.<>c__DisplayClass11.<>c__DisplayClass13.<DoReplace>b__f(Object , EventArgs ) at JetBrains.ReSharper.Features.StructuralSearch.UI.ReplaceOccurenciesForm.OnOkClick() at JetBrains.ReSharper.Features.StructuralSearch.UI.ReplaceOccurenciesForm.<.ctor>b__4(Object , CancelEventArgs ) at System.Windows.Forms.Form.OnClosing(CancelEventArgs e) at System.Windows.Forms.Form.WmClose(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, Int32 wParam, Int32 lParam) at System.Windows.Forms.Control.SendMessage(Int32 msg, Int32 wparam, Int32 lparam) at System.Windows.Forms.Form.Close() at JetBrains.ReSharper.Features.StructuralSearch.UI.ReplaceOccurenciesForm.<>c__DisplayClass18.<InitializeFooter>b__13(Object sender, EventArgs args) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ”
Pattern #2 (expression placeholder):
Matches: 1, result is uncompilable: