Add 1-2 tablespoons of the olive oil to the pan. Saute the onions over low heat until they are translucent but not brown. Add the chopped tomatoes and cook until softened, about 5 minutes. Add the vinegar, wine and rosemary and cook over medium heat until most of the liquid in the pan has evaporated. Season to taste with salt and pepper.