Delete Structurally?
I want to use the Replace Structurally feature to remove generated comments. I can find them using the structural search, and I can replace them with other comments (or a blank comment), but I can't seem to remove the comment itself. Am I missing something. Is this possible?
Please sign in to leave a comment.
Hi,
This is possible indirectly, when one references construct the comment
is bound to, like:
Search for:
/** $A$ */ $T$ $Dcl$ = $Init$;
Replace by:
$T$ $Dcl$ = $Init$;
Please, file JIRA request for the direct delete support.
Bryan Young wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
I didn't have much luck with your suggestion. With 4.5.4, the structural search didn't catch any matches. The eap (3235) found matches with the structural search, but crashed when I tried to replace. I submitted a bug report for the exception, and a feature request for the delete feature.
Thanks for trying to help
Hi,
So the replace of
/* $a$ */ with empty does not work for you at all?
No. I tried replacing
/* $a$ */
with nothing in 4.5.4 and build 3235 without luck. I filled out a feature request (IDEA-719). Apparently it is fixed in build 3247 (quick work!). I'll try with that build when it's released.
As far as the work around, it didn't work at all in 4.5.4 (the search feature wouldn't even find matches). The eap (build 3235) found matches but kept throwing exceptions when trying to do the replace (request 43990).
I'll try again with a post-3247 build and report back. Thanks for the quick turn around on the request.
Bryan
It's working great in 3260. Thanks for helping. This will allow me to remove thousands of lines of useless generated comments!