Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CakePHP .ctp syntax highlighting in Eclipse

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?

like image 521
Webnet Avatar asked Apr 27 '11 18:04

Webnet


1 Answers

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
like image 79
JohnP Avatar answered Oct 13 '22 17:10

JohnP