Follow this Blog!

Sep 5, 2012

f Comment

Main Fix For Solving Eclipse Autocomplete and Content Assist Issues!

MenuFixing Eclipse Content Assist Issues
Main Fix For Eclipse Content Assist Issues
Other Fixes For Eclipse Content Assist Issues
Amazon Let's look at the main fix for solving the Auto completion or Content Assist issues in Eclipse IDE. This is the fix that worked for me and I believe it'd most likely work for you too!

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.
Solution #1A: Delete Indexes
Eclipse by default builds indices when you create a new project and when you create new files in the project so that when you use Content Assist Eclipse is able to find the related information as quickly as possible. When those indexes are stale or corrupted you won't be able to use Content Assist properly. Therefore simply delete those indexes and ask Eclipse to rebuild them. Here's a complete tutorial on how to do that: How Do You Ask Eclipse To Rebuild Index?

Solution #1B: Link Related Projected Together
Suppose you have two separate projects in the same workspace, and project #1 contains references to PHP code in project #2. You need to tell Eclipse this fact by right clicking project #1's root folder in PHP Explorer and going to 'Include Path' -> 'Configure Include Path...' like shown in the screenshot below.

PHP Eclipse Configure Include Path for a Project

You should be in 'PHP Include Path' property. Click 'Projects' tab and click 'Add...' and select project #2 and click OK.

Now in project #1 find any reference to any PHP class defined in project #2. Then Control + Click the reference and see that you are jumping to the reference in project #2!

Let me tell you a little secret. Suppose in project #2 you have two possible places that match the said reference in project #1. Content Assist would suggest both places. If you'd like Content Assist to pinpoint the correct place simply put a static String in your importing function (i.e. require(), include(), etc.). For example I have require('../project/number2/someClass.php'); in index.php in project #1; in index.php Content Assist would take you to the correct place in '../project/number2/someClass.php' even though the same class is also defined somewhere else!
After you do both Solution #1A and #1B your problems should've been fixed! If not read on.

If you have any questions let me know and I will do my best to help you!

◀ Fixing Eclipse Content Assist IssuesOther Fixes For Eclipse Content Assist Issues ▶
Please leave a comment here!
One Minute Information - by Michael Wen
Find Michael on Google or Facebook
ADVERTISING WITH US - Direct your advertising requests to Michael