Making Eclipse view different file extensions as PHP

前端 未结 4 1484
离开以前
离开以前 2021-01-03 19:29

I have several file extensions, like .module, that I would like to be understood by Eclipse to be PHP - so I get the same syntax highlighting, code completion,

相关标签:
4条回答
  • 2021-01-03 19:42

    Head to Window -> Preferences. Drill down to General -> Editors -> File Associations. From here you can add your extensions (e.g., *.module) and associate them with your preferred PHP editor.

    Then restart Eclipse for the change to take effect.

    0 讨论(0)
  • 2021-01-03 19:55

    FYI.

    window > preference > general > content types.
    Expand '▷Text' and you will find 'PHP Content Type'. Select that.
    Then click 'Add' and insert your own extension.

    0 讨论(0)
  • 2021-01-03 19:58

    Something extra to be aware of.

    I had the same problem, even after installing PDT. Turns out that there was an entry in General=>Content Types=>Text for *.php. Note that this not under General=>Content Types=>Text=>PHP Content Type, which is placed there by PDT. Removing the one under Text fixed the problem for me.

    0 讨论(0)
  • 2021-01-03 20:03

    Window > Prefrences > General > Content Types > Text > PHP Content Type add any type of file like *.module, *.install etc

    0 讨论(0)
提交回复
热议问题