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.

asked Sep 19, 2014 at 12:58

5 Answers 5

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.

answered Sep 19, 2014 at 13:37
Sign up to request clarification or add additional context in comments.

1 Comment

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.
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.
answered Aug 2, 2016 at 14:17

Comments

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.

answered Sep 19, 2014 at 13:32

1 Comment

I also have Eclipse Luna (I updated the post), but it doesn't work.
1

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

Comments

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

answered Aug 7, 2015 at 12:40

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.