*
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
@Override
public boolean performFinish() {
GSSQuery query = QueryFactory.eINSTANCE.createGSSQuery();
query.setAssignedConstraintsSet(QueryFactory.eINSTANCE
.createAssignedConstraintsSet());
query.setSelectedGoalsSet(QueryFactory.eINSTANCE
.createSelectedGoalsSet());
query.setSelectedPrinciplesSet(QueryFactory.eINSTANCE
.createSelectedPrinciplesSet());
query.setSelectedGoalsPriorities(QueryFactory.eINSTANCE
.createSelectedGoalsPriorities());
query.setUsername(newGSSQueryWizardPageOne.getUsername());
query.setUuid(newGSSQueryWizardPageOne.getId());
query.setName(newGSSQueryWizardPageOne.getQueryName());
query.setDescription(newGSSQueryWizardPageOne.getQueryDescription());
query.setIncludeAll(newGSSQueryWizardPageOne.includeAll());
query.setIncludeRefactorings(newGSSQueryWizardPageOne.includeRefactorings());
query.setIncludePattern(newGSSQueryWizardPageOne.includePattern());
query.setIncludePrinciples(newGSSQueryWizardPageOne.includePrinciples());
query.setIncludeFlaws(newGSSQueryWizardPageOne.includeFlaws());
if (newGSSQueryWizardPageTwo.isLoadConstraints()) {
for (Constraint constraint : newGSSQueryWizardPageTwo
.getSelectedConstraints()) {
query.getAssignedConstraintsSet().getAssignedConstraints()
.add(ModelUtil.clone(constraint));
}
}
new AddGSSQuery(parentPackage, query).run();
ModelOpenHelper.openModel(query);