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.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199

5 Answers5

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.

Tillmann Seidel
  • 1,032
  • 1
  • 12
  • 20
  • 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. – ROMANIA_engineer Sep 19 '14 at 13:43
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.
Steve Chambers
  • 37,270
  • 24
  • 156
  • 208
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.

Santiago
  • 379
  • 3
  • 14
1

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

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

Iwo Kucharski
  • 3,735
  • 3
  • 50
  • 66