I think this else should be

else if (getProject().isBuildable())

and then an "else return null"

otherwise there will be shown a rebuild link even though the user will get an error when trying (lack of permissions or the project is disabled for example).