Bug 510040 - Provide a proper Eclipse editor for .aird files with direct access to session operations
Summary: Provide a proper Eclipse editor for .aird files with direct access to session...
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 4.1.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 5.0.0   Edit
Assignee: Pierre-Charles David CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-01-06 09:15 EST by Pierre-Charles David CLA
Modified: 2017-11-27 14:05 EST (History)
3 users (show)

See Also:


Attachments
Rough mockup (90.01 KB, image/png)
2017-01-06 09:41 EST, Pierre-Charles David CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2017-01-06 09:15:14 EST
The default workflow associated with a Sirius session is non standard, with most important features (session opening/closing associated "magically" with project opening/closing, viewpoint selection and representation creation only available in context menus, etc.) not easily discoverable in the UI. In addition, because these operations are tied to the Model Explorer/Modeling perspecitve, many of them are not available or do not work as expected in other perspectives.

The goal of this ticket is to provide a proper Eclipse editor associated to the .aird files that will be available from everywhere and that will offer direct access to most general session-level operations. Details will be specified later, but to give an idea of the kind of operations I'm thinking of:
* Viewpoint selection: an embedded version of the Viewpoint Selection Dialog UI.
* Semantic model browsing: an embedded version of the semantic model, as visible currently in the Model Explorer.
* Semantic model management (add/remove/control/uncontrol semantic resources).
* Representation creation, deletion, renaming, fragmentation.

The editor should be a multi-page form-like editor. The first iteration will implement a single hard-coded page with the kind of information and operations listed above, but the goal is to make it extensible in various ways after that. This extensibility, while it should be taken into account in the architecture of the first iteration, is not in the scope of this particular ticket.
Comment 1 Pierre-Charles David CLA 2017-01-06 09:41:44 EST
Created attachment 266162 [details]
Rough mockup

This is not to be taken as a specification, but only a rough mockup to give an more concrete idea of the UI that could be provided.
Comment 2 Eclipse Genie CLA 2017-01-09 05:23:46 EST
New Gerrit change created: https://git.eclipse.org/r/88258
Comment 3 Pierre-Charles David CLA 2017-01-09 05:35:33 EST
Some code pointers:
* org.eclipse.ui.forms.editor.FormEditor or org.eclipse.ui.forms.editor.SharedHeaderFormEditor should probably be used as base class
* org.eclipse.sirius.ui.tools.api.wizards.page.ViewpointsSelectionWizardPage already contains some code to display viewpoints and their rendered documentation in a way similar to what is visible on the mockup (top-left element)
* SiriusCommonContentProvider, SiriusCommonLabelProvider and other classes in the org.eclipse.sirius.ui.tools.internal.views.common.navigator (and neighbours) are the ones used in the "Model Explorer" view. The same code should be used in the various tree viewers in the form editor. See org.eclipse.ui.navigator.CommonViewer for the CNF class which makes use of them and takes all extension points/configuration options properly into account.
Comment 4 Pierre-Charles David CLA 2017-01-09 05:44:32 EST
Not that currently, the org.eclipse.sirius.ui plug-in defines a default editor for "*.aird" files, which is just a plain text editor: https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins/org.eclipse.sirius.ui/plugin.xml#n557

The plain text editor should probably be made non-default, while the new, optional (for now) form-based editor will be set as the default. When the new plug-in is not present, it should not have any impact (only the basic text editor is present, so default or non-default should have the same behavior). When the new plug-in is installed, it's editor will take precedence over the text-based one.
Comment 5 Pierre-Charles David CLA 2017-01-09 05:45:54 EST
(In reply to Pierre-Charles David from comment #1)
> Created attachment 266162 [details]
> Rough mockup
> 
> This is not to be taken as a specification, but only a rough mockup to give
> an more concrete idea of the UI that could be provided.

The "Reresentations" block should probably have the same kind of search/filter field as the semantic Models block.
Comment 6 Pierre-Charles David CLA 2017-01-09 06:07:38 EST
We'll probably need a proper specification document, but for now I'm putting my raw ideas/comments here.

One aspect that will need clarification is how the lifecycle of the editor is tied to the sesssion's.
* When using a "Modeling Project", if the user has access to the .aird file, it means the project has been opened/expanded, and so the Sirius session is already opened.
* When not using a "Modeling Project", or when not in the "Modeling" perspective, the user can double-click/select open on the aird while the session may not already be opened. In that case the editor should open the session (in a non-blocking way) if it is not already.
* When closing the editor, we should probably not close the session (opening a session can be a costly operation). The leaves a kind of "leak", with no obvious hint to the user that potentially large models are still loaded in memory. From the user's point of view, opening and then closing an editor should understandably leave the system in the same state as before. This problem is not new or specific to this ticket however, it is already present in the asymetry between: automatic loading of a session when expanding a modeling project, but no automatic closing when the project is collapsed (one needs to explictly close the project to close the session and release the resources).
Comment 7 Eclipse Genie CLA 2017-01-11 08:41:39 EST
New Gerrit change created: https://git.eclipse.org/r/88462
Comment 9 Eclipse Genie CLA 2017-02-28 12:13:06 EST
New Gerrit change created: https://git.eclipse.org/r/92031
Comment 10 Eclipse Genie CLA 2017-03-01 12:18:01 EST
New Gerrit change created: https://git.eclipse.org/r/92110
Comment 12 Eclipse Genie CLA 2017-03-07 04:47:21 EST
New Gerrit change created: https://git.eclipse.org/r/92462
Comment 14 Eclipse Genie CLA 2017-03-08 11:57:21 EST
New Gerrit change created: https://git.eclipse.org/r/92634
Comment 15 Eclipse Genie CLA 2017-03-09 10:47:57 EST
New Gerrit change created: https://git.eclipse.org/r/92706
Comment 16 Eclipse Genie CLA 2017-03-10 10:44:55 EST
New Gerrit change created: https://git.eclipse.org/r/92788
Comment 17 Eclipse Genie CLA 2017-03-13 04:47:35 EDT
New Gerrit change created: https://git.eclipse.org/r/92878
Comment 18 Eclipse Genie CLA 2017-03-13 09:49:31 EDT
New Gerrit change created: https://git.eclipse.org/r/92925
Comment 19 Eclipse Genie CLA 2017-03-13 09:49:33 EDT
New Gerrit change created: https://git.eclipse.org/r/92924
Comment 21 Eclipse Genie CLA 2017-03-13 10:36:11 EDT
New Gerrit change created: https://git.eclipse.org/r/92932
Comment 24 Eclipse Genie CLA 2017-03-14 06:29:21 EDT
New Gerrit change created: https://git.eclipse.org/r/93006
Comment 26 Eclipse Genie CLA 2017-03-14 10:40:25 EDT
New Gerrit change created: https://git.eclipse.org/r/93027
Comment 28 Eclipse Genie CLA 2017-03-14 12:19:21 EDT
New Gerrit change created: https://git.eclipse.org/r/93038
Comment 29 Eclipse Genie CLA 2017-03-14 13:03:46 EDT
New Gerrit change created: https://git.eclipse.org/r/93048
Comment 32 Eclipse Genie CLA 2017-03-15 04:56:20 EDT
New Gerrit change created: https://git.eclipse.org/r/93091
Comment 34 Eclipse Genie CLA 2017-04-10 05:58:56 EDT
New Gerrit change created: https://git.eclipse.org/r/94740
Comment 36 Eclipse Genie CLA 2017-04-14 08:09:59 EDT
New Gerrit change created: https://git.eclipse.org/r/95059
Comment 37 Eclipse Genie CLA 2017-04-14 09:14:56 EDT
New Gerrit change created: https://git.eclipse.org/r/95067
Comment 40 Eclipse Genie CLA 2017-04-25 10:58:01 EDT
New Gerrit change created: https://git.eclipse.org/r/95703
Comment 41 Eclipse Genie CLA 2017-04-27 10:08:29 EDT
New Gerrit change created: https://git.eclipse.org/r/95914
Comment 42 Eclipse Genie CLA 2017-05-02 08:10:59 EDT
New Gerrit change created: https://git.eclipse.org/r/96155
Comment 43 Eclipse Genie CLA 2017-05-02 11:26:56 EDT
New Gerrit change created: https://git.eclipse.org/r/96181
Comment 44 Eclipse Genie CLA 2017-05-12 03:30:39 EDT
New Gerrit change created: https://git.eclipse.org/r/96923
Comment 45 Eclipse Genie CLA 2017-05-12 03:30:41 EDT
New Gerrit change created: https://git.eclipse.org/r/96922
Comment 46 Eclipse Genie CLA 2017-05-12 03:30:43 EDT
New Gerrit change created: https://git.eclipse.org/r/96924
Comment 52 Eclipse Genie CLA 2017-05-12 10:53:02 EDT
New Gerrit change created: https://git.eclipse.org/r/96959
Comment 53 Eclipse Genie CLA 2017-05-15 03:40:45 EDT
New Gerrit change created: https://git.eclipse.org/r/97043
Comment 58 Eclipse Genie CLA 2017-05-15 11:33:58 EDT
New Gerrit change created: https://git.eclipse.org/r/97121
Comment 59 Eclipse Genie CLA 2017-05-15 11:34:00 EDT
New Gerrit change created: https://git.eclipse.org/r/97120
Comment 62 Eclipse Genie CLA 2017-05-15 11:59:49 EDT
New Gerrit change created: https://git.eclipse.org/r/97125
Comment 64 Eclipse Genie CLA 2017-05-16 05:35:54 EDT
New Gerrit change created: https://git.eclipse.org/r/97199
Comment 66 Eclipse Genie CLA 2017-05-16 09:17:08 EDT
New Gerrit change created: https://git.eclipse.org/r/97230
Comment 67 Eclipse Genie CLA 2017-05-16 10:32:57 EDT
New Gerrit change created: https://git.eclipse.org/r/97243
Comment 71 Eclipse Genie CLA 2017-05-17 09:39:22 EDT
New Gerrit change created: https://git.eclipse.org/r/97336
Comment 72 Eclipse Genie CLA 2017-05-18 09:06:37 EDT
New Gerrit change created: https://git.eclipse.org/r/97440
Comment 75 Eclipse Genie CLA 2017-05-18 12:11:45 EDT
New Gerrit change created: https://git.eclipse.org/r/97471
Comment 76 Eclipse Genie CLA 2017-05-19 12:09:13 EDT
New Gerrit change created: https://git.eclipse.org/r/97591
Comment 77 Eclipse Genie CLA 2017-05-23 03:49:37 EDT
New Gerrit change created: https://git.eclipse.org/r/97733
Comment 79 Eclipse Genie CLA 2017-05-24 05:51:51 EDT
New Gerrit change created: https://git.eclipse.org/r/97832
Comment 80 Eclipse Genie CLA 2017-05-30 10:49:18 EDT
New Gerrit change created: https://git.eclipse.org/r/98232
Comment 81 Eclipse Genie CLA 2017-05-30 10:49:23 EDT
New Gerrit change created: https://git.eclipse.org/r/98233
Comment 84 Eclipse Genie CLA 2017-05-30 12:32:04 EDT
New Gerrit change created: https://git.eclipse.org/r/98244
Comment 86 Eclipse Genie CLA 2017-06-06 03:35:56 EDT
New Gerrit change created: https://git.eclipse.org/r/98677
Comment 89 Eclipse Genie CLA 2017-06-07 05:13:21 EDT
New Gerrit change created: https://git.eclipse.org/r/98766
Comment 90 Eclipse Genie CLA 2017-06-07 05:15:55 EDT
New Gerrit change created: https://git.eclipse.org/r/98768
Comment 91 Eclipse Genie CLA 2017-06-07 08:16:43 EDT
New Gerrit change created: https://git.eclipse.org/r/98787
Comment 92 Eclipse Genie CLA 2017-06-07 09:01:49 EDT
New Gerrit change created: https://git.eclipse.org/r/98797
Comment 97 Eclipse Genie CLA 2017-06-07 11:50:28 EDT
New Gerrit change created: https://git.eclipse.org/r/98823
Comment 98 Eclipse Genie CLA 2017-06-09 11:51:09 EDT
New Gerrit change created: https://git.eclipse.org/r/99037
Comment 99 Eclipse Genie CLA 2017-06-13 04:13:24 EDT
New Gerrit change created: https://git.eclipse.org/r/99201
Comment 102 Pierre-Charles David CLA 2017-06-13 05:36:24 EDT
We're done here. Remaingin bugfixes and enhancements will be treated in separate tickets for future versions.
Comment 103 Eclipse Genie CLA 2017-06-16 09:44:49 EDT
New Gerrit change created: https://git.eclipse.org/r/99500
Comment 105 Pierre-Charles David CLA 2017-06-29 03:31:35 EDT
Available in Sirius 5.0.0, see https://wiki.eclipse.org/Sirius/5.0.0 for details.
Comment 106 Eclipse Genie CLA 2017-11-10 10:17:36 EST
New Gerrit change created: https://git.eclipse.org/r/111392