如何在 Eclipse 中为 PHP 核心功能启用自动完成/语法高亮? [英] How to enable autocomplete/syntax-highlight for PHP core functions in Eclipse?

查看:20
本文介绍了如何在 Eclipse 中为 PHP 核心功能启用自动完成/语法高亮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了很多,检查了很多必要的步骤,但仍然不起作用.

我的环境是:

  1. PHP 开发人员包的最新 Eclipse

  2. 项目是新的,不是直接从SVN签出

  3. .project 有一行

    <块引用>

    org.eclipse.php.core.PHPNature

  4. .buildpath 有一行

    <块引用>

    <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>

  5. .settings/org.eclipse.core.resources.prefs有一条线

    <块引用>

    include_path=0;/projectname

  6. 确保在 PHP 编辑器中打开的文件

有些办法:

  1. 鼠标悬停时显示PHP核心函数定义,Ctrl+单击将打开其定义的文件,但输入'arr'没有任何反应,而应为数组函数列表
  2. 自动完成功能适用于内部函数/变量,例如类成员但对 PHP 核心函数不起作用,语法高亮也不行

解决方案

右键单击您的项目 -> 配置 -> 添加 PHP 支持...

适用于 Eclipse 3.5/PDT 2.1

I searched a lot, checked many times the neccesary steps, but it still don't work.

My environment is :

  1. Latest eclipse for PHP developer package

  2. Project is newed, not check out directly from SVN

  3. .project has a line

    <nature>org.eclipse.php.core.PHPNature</nature>
    

  4. .buildpath has a line

    <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
    

  5. .settings/org.eclipse.core.resources.prefs has a line

    include_path=0;/projectname
    

  6. file ensured opened in PHP Editor

Something works:

  1. PHP core function defination displayed when mouse over, and Ctrl+Click will open its defined file, but input 'arr' nothing happens, while a list of array functions expected
  2. Autocomplete does work for internal functios/variables such as class members But never works for PHP core functions, neither syntax highlighting

解决方案

Right-Click on your project -> Configure -> Add PHP Support...

Works for me on Eclipse 3.5 / PDT 2.1

这篇关于如何在 Eclipse 中为 PHP 核心功能启用自动完成/语法高亮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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