Invalid project contents directory error
After using chown command on my www folder recursively, the problem was gone. I think the problem was that eclipse can't create new files inside those folders. (Duh!)
So:
sudo chown -R /var/www user:group
There is another workaround: you can run the eclipse via terminal using sudo command.