From e4c5a4ad0d7417d1f50b073a3e17375991354ae8 Mon Sep 17 00:00:00 2001 From: ngat_di Date: Wed, 11 Oct 2023 09:05:26 +0200 Subject: [PATCH] Task#463 Update of the BeanDisciplineTest --- .../types/roles/BeanDisciplineTest.java | 2 +- .../editor/snippets/general/CustomDialog.java | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/de.dlr.sc.virsat.model.edit.test/src/de/dlr/sc/virsat/model/concept/types/roles/BeanDisciplineTest.java b/de.dlr.sc.virsat.model.edit.test/src/de/dlr/sc/virsat/model/concept/types/roles/BeanDisciplineTest.java index 618a44d9c..f57fd66de 100644 --- a/de.dlr.sc.virsat.model.edit.test/src/de/dlr/sc/virsat/model/concept/types/roles/BeanDisciplineTest.java +++ b/de.dlr.sc.virsat.model.edit.test/src/de/dlr/sc/virsat/model/concept/types/roles/BeanDisciplineTest.java @@ -52,8 +52,8 @@ public void testGetAndSet() { // Create an expected list of users EList expectedUsers = new BasicEList<>(); - expectedUsers.add(USER); assertEquals(expectedUsers, beanDiscipline.getUsers()); + expectedUsers.add(USER); beanDiscipline.addUser(USER); // Check if the actualUsers list contains the added user diff --git a/de.dlr.sc.virsat.uiengine.ui/src/de/dlr/sc/virsat/uiengine/ui/editor/snippets/general/CustomDialog.java b/de.dlr.sc.virsat.uiengine.ui/src/de/dlr/sc/virsat/uiengine/ui/editor/snippets/general/CustomDialog.java index 33eb2faff..4f31991b2 100644 --- a/de.dlr.sc.virsat.uiengine.ui/src/de/dlr/sc/virsat/uiengine/ui/editor/snippets/general/CustomDialog.java +++ b/de.dlr.sc.virsat.uiengine.ui/src/de/dlr/sc/virsat/uiengine/ui/editor/snippets/general/CustomDialog.java @@ -32,10 +32,27 @@ import org.eclipse.swt.widgets.Text; /** - * CustomDialog class extends the Dialog class to create a custom dialog. - * Allows user interaction to modify a list of users. + * CustomDialog is a custom dialog that extends the Dialog class, allowing user interaction to modify a list of users. + * The dialog provides options to add, remove, update, and rearrange users in the list. It also notifies the parent application + * of user changes using a callback mechanism. + * + * This dialog is primarily used to interact with and manage a list of features displayed to the user, enabling them to make necessary modifications. + * + * This dialog includes the following features: + * - Adding a new feature to the list + * - Removing an existing feature from the list + * - Updating an existing feature in the list + * - Moving a feature up or down in the list + * + * The dialog is configured to have a specified size and is centered on the screen for user convenience. + * + * Usage: + * 1. Create an instance of CustomDialog, providing the parent shell, initial features to display, and a callback for feature updates. + * 2. Open the dialog using the open() method. + * * @author ngat_di */ + public class CustomDialog extends Dialog { // Fields