Open Type (Ctrl+Shift+T) in Eclipse from every window
Asked Answered
H

5

12

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.

Handmaid answered 19/9, 2014 at 12:58 Comment(0)
P
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.

Pentagon answered 19/9, 2014 at 13:37 Comment(1)
I don't have another binding for Ctrl + Shift + T. The only line is that one that is described above and it works only from Java files (+ Package Explorer area). I updated the post according to your suggestion.Handmaid
A
3

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:

  1. Go to Window - Preferences.
  2. Open General - Keys.
  3. Type "Open Type" in the filter text box at the top.
  4. 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").
  5. 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.
  6. Press the Apply button followed by the OK button.
Alcides answered 2/8, 2016 at 14:17 Comment(0)
E
1

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.

Egoist answered 19/9, 2014 at 13:32 Comment(1)
I also have Eclipse Luna (I updated the post), but it doesn't work.Handmaid
G
1

It happened to me because I was in the Resource perspective. Switching to the Java perspective fixed it.

Gerhan answered 29/10, 2014 at 1:39 Comment(0)
H
1

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

Hebrew answered 7/8, 2015 at 12:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.