[英]How do I refactor 2 statements to 1 in IntelliJ IDEA
Suppose, I have code like 假设我有类似的代码
long i = foo();
int j = goo(i);
How do I refactor this in IntelliJ IDEA IDE so that it gets converted to: 如何在IntelliJ IDEA IDE中进行重构,以便将其转换为:
int j = goo(foo());
Essentially, it is compressing 2 statements to 1. 本质上,它将2条语句压缩为1条。
Place the cursor on the i
variable, click it to select it and press OSX CTRL COMMAND N to inline
the statement. 广场上的光标
i
变量,单击以选中它,然后按CTRL OSX COMMAND N到inline
的声明。
On Windows it is CTRL ALT N 在Windows上是CTRL ALT N
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.