Put the flour in a bowl and season with salt and pepper. Add the spread and rub in with the fingertips until the mixture resembles fine breadcrumbs. Stir in half the thyme, then add enough of the measurement water to bring the mixture together into a firm dough.
Roll the dough out on a lightly floured surface and use to line a 23 cm (9 inch) fluted flan tin. Chill until ready to use.
Heat 1 tablespoon of the oil in a frying pan, add the onion and cook over a medium-high heat for 5–6 minutes until softened and golden. Stir in the remaining thyme leaves and cook for a further 1 minute. Spoon the onion mixture into the pastry case and smooth over.
Toss the tomatoes in a bowl with the remaining oil, salt flakes and plenty of pepper. Arrange on top of the onion in the pastry case and bake in a preheated oven, 220°C (425°F), Gas Mark 7, for 20–25 minutes until the pastry is golden and the tomatoes softened and lightly charred in places. Garnish with thyme leaves to serve.