我想启动一个新的 Zend 项目,目前我面临一些有关 Eclipse PDT 的问题...我的问题是,Eclipse for PHP 中的代码完成根本不起作用。
我尝试了很多不同的教程等,例如制作一个新项目并导入文件;创建一个新的工作区并在那里导入项目;构建路径设置和库导入的几乎所有可能的组合;删除 .metadata 中的几个文件(如果你用谷歌搜索,你会发现很多这样的教程),但没有任何效果。
[编辑] PHPNature 也已设置(感谢 transisstor):
<natures>
<nature>org.eclipse.php.core.PHPNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
(如果只有 PHPNature 设置,没有其他设置,它也不起作用)
[/Edit]
The problem in detail: I made a new Zend project, and tried to start coding in the IndexController.indexAction(). First thing I did: I typed in $this->
, but no code completion came... I thought maybe I would need to add the Zend library, which I did. When I click into the Zend_Controller_Action
in class IndexController extends Zend_Controller_Action
I can see the documentation of Zend_Controller_Action
, I also can press F3 and the corrosponding file will appear... Which means, Zend is successfully added as library.
I also tried Ctrl + Space, but just nothing happens. By the way, the standard PHP functions like isset()
also won't show up in code completion
有人知道如何解决这个问题吗?我正在使用 Eclipse Juno、Eclipse PDT 3 和 Zend Framework 1.x(不太清楚,但它不是 ZF2,如果我打开它,它会很好地工作http://localhost
.
我很感激任何帮助