在Eclipse中的CakePHP .ctp语法突出显示 [英] CakePHP .ctp syntax highlighting in Eclipse

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

问题描述

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



有关如何获得语法高亮的工作的任何想法? >

解决方案

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



设置(窗口 - >首选项



内容类型


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

  2. 单击文本旁边的箭头,选择 PHP内容类型

  3. 通过单击右侧的添加按钮添加 *。ctp li>

档案关联




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

  2. 添加* .ctp(单击右上角的添加按钮


  3. 通过点击添加(右下角)并选择PHP编辑器来关联适当的编辑器
  4. 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

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

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