What worked for me is deleting the .metadata/.plugins/org.eclipse.jdt.core folder inside workspace. And then restarting Eclipse.
.metadata/.plugins/org.eclipse.jdt.core
That forces reindexing of project.