Is there a way to delete if clause keeping its body with a hotkey?
I have a code like
if (someCondition)
doThat();
}
And want to remove if (someCondition), but leave doThat() invocation. I'd like to do it with a single hotkey when caret is on "if" keyword. I want to do the same trick with for, while etc. Is that possible, or should I file a issue request?
请先登录再写评论。
Ctrl-Shift-Delete (called "Unwrap..." action)
Max Ishchenko wrote:
Not as far as I know, and this is something I've wanted too for a long
time...
N.
control + shift + delete
Max Ishchenko wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Yeeehaah! I knew that ) Thanks, guys
Taras Tielkes wrote:
Excellent!
I have been using IntelliJ for over 5 years and did not know about this shortcut! It would have saved me much pain over the years...
I will make good use of it for now on!
The same story for me.
Try looking through Help -> Productivity Guide and find some goodies you never used because never knew that it is possible. Though "Unwrap" intention is not listed there.
Indeed, it's a good candidate for the tips that show during compiles.
And/or a "Tip of the Day".