CakePHP .ctp语法高亮在Eclipse中 [英] CakePHP .ctp syntax highlighting in Eclipse

查看:306
本文介绍了CakePHP .ctp语法高亮在Eclipse中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么CakePHP决定构建自己的文件格式而不是.tpl是超出我的...尽管如此,我无法得到语法高亮在Eclipse中工作...我遵循了本指南:
http:// planetcakephp .org / aggregator / items / 5452-opening-ctp-file-with-syntax-highlight-in-eclipse 死链接),但它不起作用,我看到有关此文件不受支持的内容类型的错误。我已经为这个文件类型的PHP编辑器添加了一个关联,它仍然显示出问题。



有关如何使语法突出显示工作的任何想法? >

解决方案

确保您设置了正确的编辑器关联和内容类型



转到设置(窗口 - >首选项



内容类型


  1. 在搜索框中输入内容类型(应显示在下) - >类型

  2. 点击 Text 旁边的箭头,选择 PHP内容类型

  3. 点击右侧的添加按钮添加 *。ctp

文件关联


  1. 在左边的搜索框中输入文件关联

  2. 添加* .ctp(点击右上角的添加按钮侧)

  3. 关联正确的edi点击添加(右下方)并选择PHP编辑器


Why CakePHP decided to build their own file format instead of .tpl is beyond me... despite that, i can't get syntax highlighting to work in Eclipse... I've followed this guide: http://planetcakephp.org/aggregator/items/5452-opening-ctp-file-with-syntax-highlight-in-eclipse (dead link) but it doesn't work, I see an error about an unsupported content type for this file. I've added an association to the PHP editor for this file type and it still shows the issue.

Any ideas on how to get syntax highlighting to work?

解决方案

Make sure you have set the correct editor associations and content types

Go to settings (Window -> preferences)

Content Types

  1. Type in Content Types in the search box (should show under General -> Types
  2. Click on the arrow next to Text, select PHP Content Type
  3. Add *.ctp by clicking on the Add button on the right side

File Association

  1. Type in File Associations in the search box on the left
  2. Add *.ctp (click the Add button on the top right side)
  3. Associate the proper editor for it by clicking Add (on the bottom right side) and selecting PHP Editor

这篇关于CakePHP .ctp语法高亮在Eclipse中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆