sourceTable.removeAll();
constraintsTable.removeAll();
sourceMap.clear();
constraintMap.clear();
descriptionText.setText("");
Toolbox toolbox = (Toolbox) parentPackage.eContainer();
if (fromTemplateButton.getSelection()) {
for (PredefinedConstraintSet template : toolbox
.getPredefinedContraintsSetCatalogue().getCatalogueItems()) {
TableItem item = new TableItem(sourceTable, SWT.NONE);
String name = template.getName();
item.setText(name != null ? name : "");
String description = template.getDescription();
descriptionText.setText(description != null ? description : "");
sourceMap.put(item, template);
}
} else if (fromQueryButton.getSelection()) {
for (GSSQuery query : toolbox.getQueryContainment().getGssQueries()) {
TableItem item = new TableItem(sourceTable, SWT.NONE);
String name = query.getName();
item.setText(name != null ? name : "");
String description = query.getDescription();
descriptionText.setText(description != null ? description : "");