Community
Participate
Working Groups
From aird editor, you can semantic model in your session. You can do that clicking "Add". But the button "Remove" is always disabled. I know it is because a modeling project is opened and every semantic resource in the project is included in the session. Nevertheless, we could image something to, at least give more feedback to the user. Perhaps, in addition, a "Delete" button could be added.
Another thing is that the remove button is deactivated if the model contains active representations. In this case we don't have any feedback to know this is the case other than checking all model element to see if it has a representation. And that is for a person that knows this constraint. The remove mechanism should be rethink to give better feedback. First solution is to always activate the button and if the remove cannot be done, then an error message is shown to user. We also can change the button label to know this will not work but that we will have an error message like (Remove*) Another solution could be to put a tooltip to the disabled button that explain why it is disabled.
In general in this kind of situations where the enablement condition is not immediatly obvious, we should follow a strategy where the action is always enabled, and when the user tries to trigger it we tell him it can not be executed. It has these advantages: * it makes for more responsive UI: in the 99.9% cases where the user selects an element but will not trigger this particular action, we don't have to spend time checking if the action can be performed. This can sometimes be *very* costly; * it can be confusing for the user if some actions are sometimes enabled and sometimes not for reasons he can not easily determine. Having the action always available gives us the opportunity to provide actually meaningful feedback when the action can not be performed (for example a popup "Resource R can not be removed from the session because XXX."). The dialog can even indicate possible alternative actions.
New Gerrit change created: https://git.eclipse.org/r/99755
Gerrit change https://git.eclipse.org/r/99755 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5c38f146d07050375cc8771a2cf5f56d1a1f29d9
The documentation must be updated to describe the new behaviors of "Remove" button
New Gerrit change created: https://git.eclipse.org/r/100101
Gerrit change https://git.eclipse.org/r/100101 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d320406fcbd1a67cbdb0b6d055332cfca706c449
The remove button is enabled on fragment model but do nothing: To reproduce. - Create an Ecore model with a root package. - Create 2 subPackages named it P1 and P2 - Control P1 and P2 - In the session editor you can see the 2 models fragmented MyEcore_p2.ecore and MyEcore_P1.ecore. - If you select the model and you click on Remove you have a error popup OK! - If you select p2 in MyEcore_p2.ecore or on MyEcore_P1.ecore and click on remove does nothing. Ko!
New Gerrit change created: https://git.eclipse.org/r/100193
Gerrit change https://git.eclipse.org/r/100193 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2045b88acbd8bf2ee0317a16fd13e98e85f91c72
Updated behavior: -Remove button is now available only if current selection is a root model resource item. - Representations cannot be removed by using this button anymore. - if removal cannot be done ither because the model belongs to a modeling project or is a controlled resource or contains a representation from activated or not viewpoint, then an error message should show up informing user of the reason.
Available in Sirius 5.0.1, see https://wiki.eclipse.org/Sirius/5.0.1 for details.