Cook the pasta in lightly salted boiling water until al dente. Drain, retaining a very little of the cooking water to keep moist. Set aside to cool while you make the pesto.
Blend or process the basil, garlic, Parmesan and pine nuts until roughly chopped. With the motor running, add the oil in a thin stream until well combined.
Put the pasta in a large bowl, stir in the pesto and mix well. Add the tomatoes, onion and olives. Stir gently. Chill for 1 hour, then serve.