Is there such a plugin...?

Before I go and write something, I was wondering if anyone knew of a plugin
that would suggest via intention to replace, for example

if (someNumber != null && !someNumber.equals("")) {
//stuff
}

with

if (StringUtils.isNotBlank(someNumber)) {
//stuff
}

Where I could specify the "before" and "after" as a Structural Search (or
something similar)?

Thanks...

;ted


2 comments
Comment actions Permalink

Hello Ted,

There's a built-in feature for that: the structural search inspection.

Before I go and write something, I was wondering if anyone knew of a
plugin that would suggest via intention to replace, for example

if (someNumber != null && !someNumber.equals("")) {
//stuff
}
with

if (StringUtils.isNotBlank(someNumber)) {
//stuff
}
Where I could specify the "before" and "after" as a Structural Search
(or something similar)?

Thanks...

;ted

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Oh wow, that's awesome...never noticed that before...after 7 versions, I'm
still learning about IDEA. :)

;ted

"Dmitry Jemerov" <yole@jetbrains.com> wrote in message
news:609b4cc9873fc8ca3e39b08e661a@news.jetbrains.com...

Hello Ted,

>

There's a built-in feature for that: the structural search inspection.

>
>> Before I go and write something, I was wondering if anyone knew of a
>> plugin that would suggest via intention to replace, for example
>>
>> if (someNumber != null && !someNumber.equals("")) {
>> //stuff
>> }
>> with
>>
>> if (StringUtils.isNotBlank(someNumber)) {
>> //stuff
>> }
>> Where I could specify the "before" and "after" as a Structural Search
>> (or something similar)?
>>
>> Thanks...
>>
>> ;ted
>>

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"

>



0

Please sign in to leave a comment.