-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/463 multiple users per discipline #1172
Feature/463 multiple users per discipline #1172
Conversation
- by modifying the method addButtonSelectionListeners, createTableColumns and the class EListStringCellEditingSupport which extends EStringCellEditingSupport from the class UiSnippetRoleManagement. -by adding the method setUser inside the Discipline class - by implementing the method setUser in the class DisciplineImpl
- by modifying the method addButtonSelectionListeners, createTableColumns and the class EListStringCellEditingSupport which extends EStringCellEditingSupport from the class UiSnippetRoleManagement. -by adding the method setUser inside the Discipline class - by implementing the method setUser in the class DisciplineImpl - by updating the RightsHelper class to handle the list of users for a discipline. -by setting the list of users accordingly, when creating a new discipline in the class UiSnippetRoleManagement
Modify the addButtonSelectionListeners method, createTableColumns method, and the EListStringCellEditingSupport class that extends EStringCellEditingSupport within the UiSnippetRoleManagement class. Correct any errors resulting from the modifications made in the DVLM.Ecore model. Specifically, replace the cardinality of 1 with -1 for the user in the Discipline table.
Modify the addButtonSelectionListeners method, createTableColumns method, and the EListStringCellEditingSupport class that extends EStringCellEditingSupport within the UiSnippetRoleManagement class. Correct any errors resulting from the modifications made in the DVLM.Ecore model. Specifically, replace the cardinality of 1 with -1 for the user in the Discipline table.
to handle the adding of new user in the Discipline.
Doing it for the clarity of the right syntax to adopt during the add of a new user in the list of user.
ElistStringCellEditingSupport class, update of the UiSnippetRoleManagement class and creating of the FeatureUpdateCallback interface.
discipline Implement the CustomDialog class, extending the Dialog class to create a custom dialog that allows user interaction to modify a list of users for a discipline. The dialog provides functionality to add, remove, update, move up, and move down users in the list. Additionally, an interface FeatureUpdateCallback is defined to handle feature update callbacks. Also, introduce EListStringCellEditingSupport to handle cell editing in a table viewer for EList of strings in the context of editing a Discipline. Files affected: - CustomDialog.java (new created file) - FeatureUpdateCallback.java(new created file) - EListStringCellEditingSupport.java (new created file) - UiSnippetRoleManagement.java (exited file before the custom Dialog) - EStringCellEditingSupport (existing before)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, pretty cool! I really like your changes! Also how you documented your code 👍 I think I found some minor things you could improve... The most importand thing is to make sure you only comited those changes you actually did on purpose... :)
de.dlr.sc.virsat.model.extension.requirements/concept/concept_v0_7.xmi
Outdated
Show resolved
Hide resolved
...src/de/dlr/sc/virsat/uiengine/ui/cellEditor/emfattributes/EListStringCellEditingSupport.java
Outdated
Show resolved
Hide resolved
...irsat.uiengine.ui/src/de/dlr/sc/virsat/uiengine/ui/editor/snippets/general/CustomDialog.java
Outdated
Show resolved
Hide resolved
...irsat.uiengine.ui/src/de/dlr/sc/virsat/uiengine/ui/editor/snippets/general/CustomDialog.java
Outdated
Show resolved
Hide resolved
...ine.ui/src/de/dlr/sc/virsat/uiengine/ui/editor/snippets/general/UiSnippetRoleManagement.java
Outdated
Show resolved
Hide resolved
Nice, now there is the green arrow 👍 🚀 |
@@ -155,8 +155,8 @@ | |||
</eAnnotations> | |||
</eClassifiers> | |||
<eClassifiers xsi:type="ecore:EClass" name="EcoreImport"> | |||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="importedNsURI" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> | |||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="importedGenModel" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> | |||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="importedNsURI" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the change from platform:/plugin to ../.. have some implications? @franzTobiasDLR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the difference is just weather you have the dependency in you local worksapce or in the target plattform cache... It will switch automatically... As far as I know we don't have a polixy what to commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I talked with @pchrszon-dlr and we think that the change should be reverted sothat no change shows up in the history
assertTrue("Discipline should be added to Disciplines", repository.getRoleManagement().getDisciplines().contains(discipline)); | ||
|
||
// Verify that the user is added to the Discipline | ||
assertTrue("User should not be added to Discipline", discipline.getUsers().contains("SampleUser")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the "not" can be removed in the string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the "not" can be removed in the string?
Thanks 👍. I removed the "not".
On small screens not all buttons are visible and the size of the window cannot be adjusted. As a result the Down Button is not visible: Ah nice usability feature would be, if the add button is in focus. Then it would be easier to add multiple users in a short time. Also I think "users" should be capatilized, since it is a heading. @DimitriDiantos Despite that it the pull request looks good and can be merged from my side :) |
of the dialog to "USERS_DISCIPLINE" increase the size of the window, so that all buttons are visible. Add the "add button" as focus.
@DimitriDiantos Looks good. But I think you forgot to push the changes, right? |
of the dialog to "USERS_DISCIPLINE" increase the size of the window, so that all buttons are visible. Add the "add button" as focus.
Hey @DimitriDiantos , It is not saved on the disk, but may cause confusion. As you can see, I can open the dialog, even though I do not have the permission to press the other buttons. |
You probably ahve to check the EditingSupport of the table. |
I fixed by adding a method to check, if the actual user belong to the list of users. else he cannot make a change. below you can find the screen of the result. |
|
access can make modifications,and solving the refresh problem.
Hi @franzTobiasDLR @dellerDLR Now the data is stored in the database and when you press the refresh button it always displays all the data. |
To enable the storage of multiple users, follow these steps:
Modify the addButtonSelectionListeners method, createTableColumns method, and the EListStringCellEditingSupport class that extends EStringCellEditingSupport within the UiSnippetRoleManagement class.
add the CustomDialog, which is a custom dialog that extends the Dialog class, allowing user interaction to modify a list of users.
Correct any errors resulting from the modifications made in the DVLM.Ecore model. Specifically, replace the cardinality of 1 with -1 for the user in the Discipline table.