Bug 517049 - [aird editor] The remove models functionality could be more intuitive
Summary: [aird editor] The remove models functionality could be more intuitive
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 5.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 5.0.1   Edit
Assignee: Project inbox CLA
QA Contact: Julien Dupont CLA
URL:
Whiteboard: aird_editor ux
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-05-22 04:15 EDT by Laurent Fasani CLA
Modified: 2017-06-30 09:46 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Fasani CLA 2017-05-22 04:15:46 EDT
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.
Comment 1 Pierre Guilet CLA 2017-05-31 04:35:15 EDT
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.
Comment 2 Pierre-Charles David CLA 2017-06-02 06:05:11 EDT
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.
Comment 3 Eclipse Genie CLA 2017-06-21 10:29:55 EDT
New Gerrit change created: https://git.eclipse.org/r/99755
Comment 5 Pierre Guilet CLA 2017-06-23 09:07:05 EDT
The documentation must be updated to describe the new behaviors of "Remove" button
Comment 6 Eclipse Genie CLA 2017-06-27 05:46:51 EDT
New Gerrit change created: https://git.eclipse.org/r/100101
Comment 8 Julien Dupont CLA 2017-06-27 11:59:47 EDT
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!
Comment 9 Eclipse Genie CLA 2017-06-28 05:45:02 EDT
New Gerrit change created: https://git.eclipse.org/r/100193
Comment 11 Pierre Guilet CLA 2017-06-28 09:18:11 EDT
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.
Comment 12 Pierre-Charles David CLA 2017-06-30 09:46:37 EDT
Available in Sirius 5.0.1, see https://wiki.eclipse.org/Sirius/5.0.1 for details.