Replace an Attribute by another Attribute via structural search possible?

Hi.

I want to replace a attribute we used for validating by another attribute and I thougth this would be a good time to use the structural search and replace function.
However I have no idea how to specify what I want.
What I want to replace is

[ValidationFramework.LengthStringRule(50, ErrorMessage = "...")]

with

[StringLength(50)]


The only pattern that currently works is

LengthStringRule

that is not really helping.

I tried to specify parameters for the 50 and the message but the pattern does not match anymore...

Can you give me some hint?

Kind regards,
Sven

2 comments

Hello Sven,

At the moment Structural Search and Replace works on type member bodies level
only, so there's no way to replace the attributes. Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi.

I want to replace a attribute we used for validating by another
attribute and I thougth this would be a good time to use the
structural search and replace function.

However I have no idea how to specify what I want.

What I want to replace is

 = "...")]]]>


with



The only pattern that currently works is
LengthStringRule
that is not really helping.
I tried to specify parameters for the 50 and the message but the
pattern does not match anymore...

Can you give me some hint?

Kind regards,
Sven
---
Original message URL:
http://devnet.jetbrains.net/message/5298810#5298810



0

Thanks for the information, Andrey.
Is it planned to support this in RS6?

0

Please sign in to leave a comment.