If I type Ctrl+Shift+T in Eclipse, an Open Type window opens. But this works only if I am in a Java file (or in the Package Explorer area).
I want to open the same window when I press Ctrl+Shift+T regardless of the resource (E.g.: if the open file is .js, .class or .xml).
How can I achieve this?
Details:
- Operating system: Windows 7
- IDE: Eclipse Luna (4.4)
I tried to:
- go to Window> Preferences> General> Keys> type "Open Type" / "Ctrl+Shift+T"
let only the following line for
Ctrl+Shift+T/Open Type:Command: Open Type Binding: Ctrl+Shift+T When: In Windows Category: Navigate
but it doesn't work.
5 Answers 5
You should filter by the binding, not the command:
- go to Window> Preferences> General> Keys
- Type "Ctrl+Shift+T"
- Press Unbind Command for all bindings except the one you described above
After applying the changes, the "Open (Java) Type" dialog should also open when in a JavaScript editor.
1 Comment
This occurs because there are two different "Open Type" commands that share the same key binding (one of which only applies to Javascript files). This can be changed as follows:
- Go to Window - Preferences.
- Open General - Keys.
- Type "Open Type" in the filter text box at the top.
- In the default setup there are two "Open Type" entries, each with a binding of CTRL+SHIFT+T: Select the one with a description of "Open a type in a Java editor" (with "When:" set to "Javascript View").
- Move the cursor into the "Binding:" field and either delete it (e.g. with the delete or backspace key) or if preferred assign it with a different (unused) combination such as ALT+CTRL+SHIFT+T.
- Press the Apply button followed by the OK button.
Comments
I have it When -> Editing JavaScript Source and it works fine whatever I use it on xml, properties or sql files. Running on Luna version.
1 Comment
It happened to me because I was in the Resource perspective. Switching to the Java perspective fixed it.
Comments
I had to set "Open Type" when in "JavaScript View" and now it works for me. I'm using Spring Tool Suite:
Version: 3.6.3.SR1 Platform: Eclipse Luna SR1 (4.4.1)
And this bug was reported
Comments
Explore related questions
See similar questions with these tags.