Eclipse 中 PHP Editor 关联 CakePHP *.ctp 文件
最近在玩CakePHP,这个框架的View文件扩展名全是.ctp,这样编辑的时候没有php的高亮显示感觉很不爽,所以就试了试让他用Eclipse自带的PHP Editor:
1>在打开的ctp文件中点击右键,选择preferences

2>在弹出的窗口中点击Editor
3>点击File Associations,在弹出的窗口的File type列表框旁边点击Add,添加*.ctp.然后保持选中*.ctp的状态不变,在下面的列表框附近点击Add,为*.ctp添加Associated Editor,选中PHP Editor

4>在2>中弹出的窗口中选择Content Types,展开Text,找到PHP Content Type,然后添加*.ctp.

5>到此设置完成,你再打开ctp文件的时候高亮显示就是php的了。