Verify Content Assist Configuration
The most common reason for missing suggestions is a misconfigured Content Assist setting. Open the Eclipse preferences by navigating to Window > Preferences. In the left-hand tree, expand Java > Editor > Content Assist. Ensure that the checkbox labeled Enable Auto-Activation is checked. This setting allows Eclipse to automatically trigger suggestion popups after a short delay without requiring you to press Ctrl+Space manually.
Below the auto-activation option, verify the Auto-activation triggers for java field. It should contain at least the dot character (.) followed by alphanumeric characters. A default configuration typically looks like .abcdefghijklmnopqrstuvwxyz_. If this field is empty or contains incorrect characters, Eclipse will not recognize when to offer references. Additionally, ensure that the Advanced... button settings under Content Assist have valid proposal categories selected. Clicking Advanced... reveals a list of proposal kinds such as Type names, Variable names, and Method names. Make sure these are checked so that relevant symbols appear in your suggestions.
If you recently updated Eclipse, it is possible that preference defaults were reset or overridden by a profile. Resetting these specific settings to their defaults can often restore functionality without affecting other customizations. Look for a Reset Defaults button within the Content Assist preference page if available.
Clean and Rebuild the Project
A corrupted build path or stale compiled classes frequently prevent the indexer from generating accurate reference data. To resolve this, select your problematic project in the Package Explorer view. Right-click the project name and choose Clean... from the context menu. In the dialog box, ensure that Clean all projects is unchecked unless you suspect widespread corruption across multiple modules. Instead, select only the current project to target the specific issue.
After cleaning, wait for the progress bar to disappear, indicating that the build has completed. Observe the Console view at the bottom of the screen. It should display output related to compilation. If there are errors listed here, they may be blocking the indexer from processing source files correctly. Fix any syntax errors or missing dependencies reported in the console before proceeding.
Once the build succeeds, try typing a dot after an object instance or class name. The suggestion popup should now appear. If it does not, proceed to refreshing the workspace index, as local file changes might not have been detected by the IDE.
Refresh the Workspace Index
Eclipse relies on an internal resource tracker to know which files exist in your project structure. Sometimes, external modifications to files made outside the IDE (such as using a terminal or another editor) cause the index to become out of sync. To fix this, right-click the root node of your project in the Package Explorer and select Refresh, or simply press the F5 key. This forces Eclipse to re-read the filesystem and update its internal representation of the project.
If refreshing does not help, try rebuilding the Java model entirely. Select the project again and choose Properties. Navigate to Project Facets and verify that the Java facet is installed and matches the version of your source code. For example, if you are writing Java 17 code, the project facet must be set to Java 17. Mismatches here can cause the compiler to ignore certain features or fail to generate metadata needed for suggestions.
In some cases, particularly after major updates or plugin installations, the workspace metadata itself becomes unstable. Restarting Eclipse with the -clean argument clears cached state information. You can do this by launching Eclipse from the command line with eclipse -clean or by adding this parameter to your desktop shortcut or launcher configuration. This step is more invasive than cleaning a single project but often resolves persistent indexing failures.
Check for Conflicting Plugins
Sometimes, third-party plugins interfere with the core Java development tools. If you have recently installed new extensions, such as advanced refactoring tools or language servers, they might conflict with the native Content Assist engine. Disable recently added plugins temporarily by going to Help > Install New Software and clicking Work with: All Installed Sites. Uncheck suspicious entries and restart Eclipse to see if suggestions return.
Additionally, ensure that no text selection is active when you expect suggestions. If you have highlighted text, Eclipse may prioritize completion for the selected snippet rather than general references. Clear selections and try again. Also, verify that the editor is in the correct mode. Switching between Source and Design views (if applicable) can sometimes reset the context for code assistance.
Frequently Asked Questions
Why does Content Assist work in one project but not another?
This usually indicates a difference in project configuration, such as the Java version or build path. Check the Project Facets in properties to ensure both projects use compatible Java versions. Also, verify that the affected project has no unresolved errors in the Problems view that might block indexing.
How do I manually trigger code suggestions in Eclipse?
You can always press Ctrl+Space to open the Content Assist popup regardless of auto-activation settings. If auto-activation is off, this manual trigger is the primary way to get reference lists. Hold the key down briefly to activate it without waiting for the timer.
What causes the "No proposals matched" error in suggestions?
This error appears when the indexer finds no valid completions for the current cursor position. It often happens if you type invalid syntax or if the variable you are referencing has not been declared yet. Ensure your code compiles cleanly first, then retry the suggestion request.
Can corrupted metadata prevent Java suggestions from appearing?
Yes. Corrupted .metadata files in the workspace directory can break the relationship between the IDE and the project. Running Eclipse with the -clean flag or deleting the .metadata/.plugins/org.eclipse.core.resources folder (after backing up) can force a full rebuild of the index.
Does reinstalling Eclipse fix missing reference suggestions?
Reinstallation is rarely necessary and often unnecessary. Most issues stem from configuration or cache problems. Try cleaning the project and resetting preferences first. Only consider a fresh installation if all other troubleshooting steps fail and the problem persists across multiple workspaces.