使用 Codeigniter 实例化 class 时,Eclipse 不会自动完成
Eclipse won't autocomplete when instantiating a class with Codeigniter
当我尝试使用 Codeigniter 实例化我的 class 时,Eclipse 不会在自动完成时显示我的方法。
这是我正在尝试的方式:
$this->load->model('myclass');
$this->myclass-> // This shows nothing
但是当我使用 php 的 classic 方式实例化我的 class 时,自动完成会显示所有方法和所有内容。
$this->load->model('myclass');
$myclass = new myclass();
$myclass-> // This shows all methods
如何让 Eclipse 在我输入 $this->myclass
时自动完成?
Eclipse 不支持像 codeigniter 这样的框架级别的自动完成扩展。它只支持 php 这样的语言级别。所以,你需要添加你自己的。这个 answer 会对你有用。
这与您的问题没有直接关系。但我建议使用 Sublimetext and it is lightweight and has tons of code snippet for not only modern framework like Codeigniter and Laravel but also frontend framework like Bootstrap and Angularjs .
希望这个回答对您有用。
当我尝试使用 Codeigniter 实例化我的 class 时,Eclipse 不会在自动完成时显示我的方法。
这是我正在尝试的方式:
$this->load->model('myclass');
$this->myclass-> // This shows nothing
但是当我使用 php 的 classic 方式实例化我的 class 时,自动完成会显示所有方法和所有内容。
$this->load->model('myclass');
$myclass = new myclass();
$myclass-> // This shows all methods
如何让 Eclipse 在我输入 $this->myclass
时自动完成?
Eclipse 不支持像 codeigniter 这样的框架级别的自动完成扩展。它只支持 php 这样的语言级别。所以,你需要添加你自己的。这个 answer 会对你有用。
这与您的问题没有直接关系。但我建议使用 Sublimetext and it is lightweight and has tons of code snippet for not only modern framework like Codeigniter and Laravel but also frontend framework like Bootstrap and Angularjs .
希望这个回答对您有用。