Eclipse键盘快捷键跳转到作用域/方法结尾

3

是否有可能通过键盘快捷键跳转到作用域的末尾,例如方法、循环、if语句、switch语句等?

我知道可以使用controlshiftp实现,但它只能跳转到闭合大括号的开头,而不能跳过它。例如:

这是我的代码。

if (x < 10) {
    System.out.println("X is less than ten.");| //my cursor is '|'
}

当我按下 control+shift+P 时,我的光标跳到这里:
if (x < 10) {
    System.out.println("X is less than ten.");
|}   //my cursor is '|'

但是我想让它在这里显示。
if (x < 10) {
    System.out.println("X is less than ten.");
}|   //my cursor is '|'

这是可能的吗?

我正在搜索 Control + shift + p 快捷键,却在你的问题中找到了它,而不是答案! :) - Arashsoft
1个回答

1
你的按键似乎与我的不同,但是请查看首选项(通用 -> 键)以了解您的Eclipse版本和操作系统可用的确切命令。我认为最接近你所寻找的命令是“运行到行”(您必须指向带有闭合花括号的行)。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接