The bug I mentioned is fixed in the latest build. With that "query" you can find all usages of Vector.addElement() (and replace them with Vector.add()) - without finding any other methods that happen to have the same name.
But I agree: The interface is not very intuitive - I filed a couple of tickets for it. Most of the complexity is inherent though, so the UI will also be a little complicated.
I'm just wondering how the structure search works in 4.1
It looks really handy but I've got no idea how to use it. Can anyone give me an example?
Essentially, you provide a template of a piece of code that you want find. For example, I've been experimenting with it to replace calls to an assertion utility with Java assert statements.
One of the search templates looks like this:
ParamChecker.isTrue($exp$, $msg$);
And the replacement template is:
assert $exp$ : $msg$;
Ciao, Gordon
-- Gordon Tyler (Software Developer) Quest Software <http://java.quest.com/> 260 King Street East, Toronto, Ontario M5A 4L5, Canada Voice: 416-643-4846 | Fax: 416-594-1919
I'm just wondering how the structure search works in 4.1
>
It looks really handy but I've got no idea how to use it. Can anyone give me an example?
>
Essentially, you provide a template of a piece of code that you want find. For example, I've been experimenting with it to replace calls to an assertion utility with Java assert statements.
We provide help which describes all the options. The file is structuredSearch.html in ideahelp.jar!\idea\navigationSearch Please, fill free to comment it.
Thomas Singer (MoTJ) wrote:
I still hope for a good tutorial, which explains (with the help of an example) why this or that option is used.
Tom
-- Best regards, Maxim Mossienko IntelliJ Labs / JetBrains Inc. http://www.intellij.com "Develop with pleasure!"
if you make the tree of existing templates immediately visible, e.g. just show it on top left, but still also allow to enter free text - this would make it much more easier for the complete novice IMHO
It was there sometime ago but was removed for the simplicity of overall dialog :)
Michael Damberger wrote:
>>appears after Pressing'Copy existing templates'
wow - had not seen that ;) thanks for the info.
if you make the tree of existing templates immediately visible, e.g. just show it on top left, but still also allow to enter free text - this would make it much more easier for the complete novice IMHO
-- Best regards, Maxim Mossienko IntelliJ Labs / JetBrains Inc. http://www.intellij.com "Develop with pleasure!"
Look at my comments in
http://intellij.net/tracker/idea/viewSCR?publicId=34421
The bug I mentioned is fixed in the latest build. With that "query" you can find all usages of Vector.addElement() (and replace them with Vector.add()) - without finding any other methods that happen to have the same name.
But I agree: The interface is not very intuitive - I filed a couple of tickets for it. Most of the complexity is inherent though, so the UI will also be a little complicated.
Glen Stampoultzis wrote:
Essentially, you provide a template of a piece of code that you want
find. For example, I've been experimenting with it to replace calls to
an assertion utility with Java assert statements.
One of the search templates looks like this:
ParamChecker.isTrue($exp$, $msg$);
And the replacement template is:
assert $exp$ : $msg$;
Ciao,
Gordon
--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919
You are not alone. Seems to be a very powerful feature, but if nobody
can use it, it is quite useless.
Tom
it's really not intuitive yet.
Some good examples would help getting started - the
feature itself is great!
... what about the open API for structural search? ;)
"Gordon Tyler" <gordon.tyler@quest.com> wrote in message
news:cakkkn$k5u$1@is.intellij.net...
>
>
>
>
>
>
>
That is cool. Thanks.
I hope for a good tutorial.
Tom
Hi,
There is many existing predefined templates (appears after Pressing
'Copy existing templates') that one could learn and use.
Michael Damberger wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
I still hope for a good tutorial, which explains (with the help of an
example) why this or that option is used.
Tom
Hi,
We provide help which describes all the options.
The file is structuredSearch.html in ideahelp.jar!\idea\navigationSearch
Please, fill free to comment it.
Thomas Singer (MoTJ) wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
wow - had not seen that ;) thanks for the info.
if you make the tree of existing templates
immediately visible, e.g. just show it on top left,
but still also allow to enter free text - this would
make it much more easier for the complete novice IMHO
Hi,
It was there sometime ago but was removed for the simplicity of overall
dialog :)
Michael Damberger wrote:
>>appears after Pressing'Copy existing templates'
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"