Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 247
ROMANIA_engineer Avatar asked Sep 19 '14 12:09

ROMANIA_engineer


People also ask

How do I open all windows in Eclipse?

To open multiple Eclipse windows using the same workspace, select Window→ New Window. It's a good idea to use this technique if you want to work in two different perspectives (such as the Java and Debug perspectives) at the same time in different windows.

How do I switch between windows in Eclipse?

CTRL - F6 in Eclipse, like ALT - TAB (on windows), brings up a list of tabs/windows available (if you keep the CTRL / ALT key depressed) and highlights the one you will jump to when you let go of this key. You do not have to select the window.

What does Ctrl Shift t'do on Windows?

It re-opens the last closed tab. We've all been there: Accidently closing a browser tab that you meant to keep open. Hit Ctrl-Shift-T and your tab will come back. Hit it multiple times to bring back the last several closed tabs in your history.


5 Answers

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.

like image 76
Tillmann Seidel Avatar answered Oct 02 '22 17:10

Tillmann Seidel


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.
like image 36
Steve Chambers Avatar answered Oct 03 '22 17:10

Steve Chambers


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.

like image 34
Santiago Avatar answered Oct 02 '22 17:10

Santiago


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

like image 42
jdksflajkldasjfklasjklfjakljsk Avatar answered Oct 01 '22 17:10

jdksflajkldasjfklasjklfjakljsk


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

like image 28
Iwo Kucharski Avatar answered Oct 04 '22 17:10

Iwo Kucharski