When I try to use ctrl+space this error is shown:
ctrl+space
This compilation unit is not on the build path of a Java project.
I see tha
Since you imported the project as a General Project, it does not have the java nature and that is the problem.
Add the below lines in the .project file of your workspace and refresh.
org.eclipse.jdt.core.javanature