Amazon For those of you who use Eclipse IDE to develop your code in Java or PHP you may have come across the issue where code completion or Content Assist feature simply does NOT work. You Googled and tried every possible solution you found to combat the problem only to find that it does not work.
This article will detail EVERY SINGLE solution to this nasty issue! If you've tried them all and still have this issue please let me know and I promise I'll help you solve it!
Since I am working with PHP projects my solutions apply to 'Eclipse for PHP Developers' version eclipse-php-3.0.2.v20120611144-Win32. Codename is Indigo. If you work with Java Eclipse IDE these solutions may or may not apply.
In my situation I checked out several PHP projects via SVN and realized Content Assist feature no longer worked. After several hours of trial and error I finally solved them. My solutions will attempt to solve ALL of the following problems:
1. When you Control + Click a PHP core function such as strlen() or dirname() you are NOT taken to the source.
2. When you Control + Click a function you've defined you are NOT taken to the function declaration, whether the function is defined in the same file or in a separate PHP file.
3. When you type part of a PHP core function such as 'str' and press Control + Space Bar you don't see a tool tip suggesting complete PHP functions. In this case it's strlen(). In other words code completion or content assist does not work.
4. When you type part of a PHP function or a PHP variable you've defined in the same or a separate PHP file and click Control + Space Bar you don't see a tool tip suggesting every available choice. In other words content assist is not working.
5. The auto-completion, code completion or content assist feature has worked before but stopped working now.
Also my solutions will help you whether the function or variable in question is defined in the same file or in a separate PHP file or even in a separate PROJECT (but in the same workspace)!
In Eclipse 'Auto Activation' refers to whether the Content Assist feature is activated automatically and 'Auto activation delay' refers to the time it takes before Content assist function occurs without you having to press Control + Space Bar.
Solution #0: Feature Enabled?
First if the content assist function enabled? Go to Window -> Preferences -> PHP -> Editor -> Content Assist and see if you have proper settings. Mine is the following:
If Control + Space Bar is not the keys to invoke code completion adjust it at Window -> Preferences -> General -> Keys.
Next we'll first present the first solution that worked for me. You need to do both Solution #1A and #1B to fix all of the problems described above!
If you have any questions let me know and I will do my best to help you!
Main Fix For Eclipse Content Assist Issues ▶