CodeIgniter Forums

Full Version: Eclipse PDT Plugin for CodeIgniter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I´m a long time java developer, used to Eclipse tools. Now I´m starting development with PHP and CodeIgniter. I'm trying to use Eclipse PDT, but as far as I looked, there's no support for work with CodeIgniter (code completion).

Does anyone knows how to get this working?

Thanks
(03-17-2018, 08:31 AM)carlospauluk Wrote: [ -> ]Hi,

I´m a long time java developer, used to Eclipse tools. Now I´m starting development with PHP and CodeIgniter. I'm trying to use Eclipse PDT, but as far as I looked, there's no support for work with CodeIgniter (code completion).

Does anyone knows how to get this working?

Thanks

I use Eclipse and PDT with CodeIgniter4. I think CI3 should work also. You got to add the system folder to the PHP include path.
Quote:You got to add the system folder to the PHP include path.
How do you do that?
I think that the main problem is that CI 3 doesn´t support full PHP namespace.

I never saw how it is on CI 4. Hope that they write in this way.
I use Eclipse Oxygen. Right click (Ctrl click) to get the Properties menu. Select PHP > Source Paths > Include Path. Then use the "Add External Source Folder" button to add the CI system directory.
Thanks donpwinston

It seems that it doesn't work on CI 3. After adding system folder I couldn't get code completions. Screenshot attached.
It's my understanding (and I could be wrong) that the way CI is structured doesn't lend itself to code completion. For example, form_validation is not declared as a class property but is rather dynamically attached to the controller. The lack of autocomplete functionality in CI is due to a combination of dynamically attached/loaded properties and the way that Eclipse relies on class declarations and/or javadoc comments to generate your autocomplete options.

I have achieved some autocomplete happiness by extending the CI_Controller class with my own and declaring my own custom controller properties in it.