Leo
Leo

Reputation: 6580

Eclipse and Ctrl+Shift+T

This is how it seems to work.

  1. if you don't have any file open, it assumes you're working in the "java mode" and shows the window.
  2. if there's one or more file open, if the focus is on a non-java file (for example, a TCL file) it ignores the key binding if, but if the focus is on a java file, then it works

Since this key binding is used to open a new file, and not to change the current one that has focus, why it considers the current one's type to work or not?

Upvotes: 0

Views: 413

Answers (1)

Chandrayya G K
Chandrayya G K

Reputation: 8849

Key bindings have scopes. This helps to use the same keys bindings for multiple commands based on the scopes.

Why it considers the current one's type to work or not?

Because this command is meaningful in this context/scope(i.e If active editor file is of java type).

Click here `Windows > Preferences. Go to General > Keys.

For Ctrl + Shift + T,

enter image description here Here Ctrl + Shift + T short cut is binded to 3 commands. If the C file is active then this short cut is consumed by the first command, if C/C++ view is active then by second command etc.

Note that you can change the scope in When selection box and choose the appropriate scope for your need.

Upvotes: 1

Related Questions