if (queryToEdit == null || QueryUtils.isCanQuery(queryToEdit)) {
//add the query selection page only for new queries or predefined ones,
//not for existing custom ones
wizard.addPage(new GoogleCodeQuerySelectionPage(taskRepository, queryToEdit));
}
wizard.addPage(new GoogleCodeDefinitionQueryPage(taskRepository, queryToEdit));
return wizard;
}