Problems working with the code

For some reason, although I am able to build ArduPlane code, I get hundreds of “errors” almost in every file!
The errors are always like Type ‘AP_HAL::HAL’ could not be resolved (of for functoins/methods, etc…)
The problem is that when I want to edit the code, or writing a new function I can’t get the methods “suggestions” but I have to go look for them in… Well, I don’t know where (or in the files/class that is known).

Does anyone knows hot to solve it?

(I am working with Ubuntu 14)

Thank you!

I got the same errors