registration = (Registration) system.query(new GetRegistration(idRegistration));
List<RegistrationItem> registrationItems = registration.getRegistrationItems();
int countercouses = 1;
for (int i = 0; i < registrationItems.size(); i++) {
Course course = registrationItems.get(i).getCourse();
// if (course.getCoursesInThisPackage().size() > 0) {
// for (int j = 0; j < course.getCoursesInThisPackage().size(); j++) {
// TreeItem treeItem = new TreeItem(courses, SWT.NONE);
// treeItem.setText(course.getCoursesInThisPackage().get(j).getDescription());
// treeItem.setImage(new Image(getShell().getDisplay(), "img/course.png"));
// treeItem.setText(0, (countercouses++) + "");
// treeItem.setText(1, course.getCoursesInThisPackage().get(j).getDescription());
// treeItem.setText(2, new Money(course.getCoursesInThisPackage().get(j).getValue()).getFormatedValue());
// treeItem.setText(3, course.getCoursesInThisPackage().get(j).getDuration());
// oldNumberOfParcels += Integer.parseInt(course.getCoursesInThisPackage().get(j).getDuration());
// }
// } else {
TreeItem treeItem = new TreeItem(courses, SWT.NONE);
treeItem.setText(course.getDescription());
treeItem.setImage(new Image(getShell().getDisplay(), "img/course.png"));
treeItem.setText(0, (countercouses++) + "");
treeItem.setText(1, course.getDescription());
treeItem.setText(2, new Money(course.getValue()).getFormatedValue());
treeItem.setText(3, course.getDuration());
oldNumberOfParcels += Integer.parseInt(course.getDuration());
// }
}
List<Parcel> registrationParcelList = registration.getParcels();
MergeSortAlgorithm sort = new MergeSortAlgorithm();