Porting PHPEclipse syntax coloring to Eclipse PDT

Posted February 1st, 2011 in Razno by Metod

I was pushed into the “eclipse php world” with Eclipse + PHPEclipse setup. Although I knew about Eclipse PDT I never bothered to install it since PHPEclipse worked fine. Up untill I wanted to work with the newest PHP 5.3 features. PHPEclipse just doesn’t support that. So I had to move to PDT. It supports PHP 5.3 and is indeed a better tool. But what bothered me was the syntax coloring which is a bit different from PHPEclipse. So I’m publishing this “migration” post for anyone who has or will have the same problem. You can also use this guide to migrate to Zend Studio, since it is based on Eclipse PDT. Including me at some future time.

Eclipse PDT / Zend Studio:

  • Multi-line comment: #3F7F5F
  • Single-line comment: #3F7F5F
  • PHP tags: #FF0080
  • Keyword: #7F0055
  • Functions: #7F7F9F (no italic)
  • Variable: #7F7F9F
  • Parameter variables: #7F7F9F
  • Fields: #7F7F9F
  • Static fields: #7F7F9F
  • Superglobal variables: #7F7F9F
  • Internal constants: #7F0055
  • Constants: #7F0055
  • String: #2A00FF

Also in Zend Studio, line highlight is not the same as in PHPEclipse or Eclipse PDT.

  • Current line highlight: #E8F2FE