10

如果我在EclipseCtrl中键入++ ,Shift则会打开一个Open Type窗口。但这仅在我位于 Java 文件(或 Package Explorer 区域)中时才有效。T

无论资源如何(例如:如果打开的文件是 .js、.class 或 .xml),我都想在按下Ctrl++时打开同一个窗口。ShiftT

我怎样才能做到这一点?


详情

  • 操作系统:Windows 7
  • IDE:Eclipse Luna (4.4)

我尝试过了:

  • 转到Window > Preferences > General > Keys > 键入“Open Type”/“Ctrl+Shift+T”
  • 只让Ctrl+Shift+T/的以下行Open Type

    Command:   Open Type
    Binding:   Ctrl+Shift+T
    When:      In Windows
    Category:  Navigate
    

但它不起作用。

4

5 回答 5

4

您应该按绑定过滤,而不是命令:

  • 转到Window > Preferences > General > Keys
  • 键入“Ctrl+Shift+T”
  • 为除上述绑定之外的所有绑定按Unbind Command

应用更改后,“打开 (Java) 类型”对话框也应在 JavaScript 编辑器中打开。

于 2014-09-19T13:37:10.407 回答
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.
于 2016-08-02T14:17:06.993 回答
1

我有它When -> Editing JavaScript Source,无论我在 xml、属性或 sql 文件上使用它,它都能正常工作。在 Luna 版本上运行。

于 2014-09-19T13:32:01.777 回答
1

它发生在我身上,因为我处于资源视角。切换到 Java 透视图修复了它。

于 2014-10-29T01:39:45.113 回答
1

在“JavaScript View”中我必须设置“Open Type”,现在它对我有用。我正在使用 Spring 工具套件: Version: 3.6.3.SR1 Platform: Eclipse Luna SR1 (4.4.1)

并且报告了这个错误

于 2015-08-07T12:40:11.420 回答