开发者

Eclipse syntax highlighting: trying to specify it for a new file extension, and it's not working

开发者 https://www.devze.com 2023-02-21 07:25 出处:网络
I\'m working with Eclipse/PHP and just starting with Drupal 7, which needs me to use PHP files of extension .test. So I\'m trying to add the \".test\" extension to the list of files that Eclipse recog

I'm working with Eclipse/PHP and just starting with Drupal 7, which needs me to use PHP files of extension .test. So I'm trying to add the ".test" extension to the list of files that Eclipse recognises as PHP.

I've done this t开发者_Python百科wo ways: (1) By specifying it in Preferences-General-Editors-File Associations, and (2) By specifying ".test" in Preferences-General-Content Types (as described in How to manually specify syntax highlighting for a specific extension in Eclipse?).

The trouble is, nothing happens - my xyz.test file opens just fine with the PHP editor, but no syntax is highlighted (and yes, the file does start with <?php). An apparently identical technique works fine for the ".module" extension, but I did this a long time ago and I'm not sure what I may have done differently.

Any ideas appreciated. I've probably forgotten something stupid.


You only have to enable it from here

 Window > Preferences > General > Content Types > Text > PHP Content Type

and do a restart.

0

精彩评论

暂无评论...
验证码 换一张
取 消