用于选择变量名称/展开选择的 Eclipse 键盘快捷键是什么?

Ler*_*rve 2 eclipse keyboard-shortcuts

例子

给定变量名称myVariableName和用 表示的光标位置[cursor]

String [cursor]myVariablenName = new String()
Run Code Online (Sandbox Code Playgroud)

什么键盘快捷键可以选择整个变量?

阐述

Ctrl+ Shift+Right仅选择my.

Ctrl+ Shift+ Right+ Right+Right选择整个变量名myVariableName,但击键太多。

Ler*_*rve 5

使用Alt+Shift + Up。它调用Select Enclosing Element命令。

它适用于所有可能的情况,例如

[cursor]myVariablenName
Run Code Online (Sandbox Code Playgroud)

或者

myVar[cursor]iablenName
Run Code Online (Sandbox Code Playgroud)

或者

myVariablenName[cursor]
Run Code Online (Sandbox Code Playgroud)