The custom patterns feature
Hello,
I'm using ReSharper v8.1 with Visual Studio 2012
I'm using the custom patterns feature to find code similar to the following
class $ClassName$ : $Attribute$
{
}
and replace it with this.
class $ClassName$Attribute : $Attribute$
{
}
Now, here some code I want it to replace
namespace Ace.Web.Mvc.Ajax
{
using System.Diagnostics.Contracts;
using System.Reflection;
using System.Web.Mvc;
[<Implementation>]
public class AjaxOnly : ActionMethodSelectorAttribute
{
<Implementation>
}
}
I have the following settings.
$ClassName$ : ^(?:[_a-zA-Z]+\w+(?<!Attribute))$
$Attribute$ : System.Attribute
The issue I'm having is that it takes away all the <Implementation> from the code I want to replace, how can I capture it? or at least make sure it touches only the part I want which is the name of the class?
Please sign in to leave a comment.
Hi Eyal,
this is known issue: http://youtrack.jetbrains.com/issue/RSRP-288706 You are welcome to vote for it in YouTrack.
Sorry for the inconvience.