NEW DATE! Bugzilla will undergo maintenance 2024-03-28 18h00 CET. Bugzilla will be placed in read-only mode at that time.

Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 530817 - Export representations action from aird close the session of the modeling project
Summary: Export representations action from aird close the session of the modeling pro...
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 6.0.0   Edit
Assignee: Project inbox CLA
QA Contact: Guillaume Coutable CLA
URL:
Whiteboard:
Keywords: triaged
Depends on: 497469 530875 531144
Blocks:
  Show dependency tree
 
Reported: 2018-02-07 05:27 EST by Florian Barbin CLA
Modified: 2018-06-27 11:54 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 Florian Barbin CLA 2018-02-07 05:27:04 EST
+++ This bug was initially created as a clone of Bug #497469 +++

Steps to reproduce: 
. Create/open any modeling project with a semantic model and some representation
. Right clic the aird, clic "Export representations as images" and OK
. The session is closed, there is no decorator or children displayed under the aird and the semantic resources.
. The user needs to close/open or collapse/expand the ModelingProject to reopen it.

Note that if the project does not have the modeling project nature, it is also disturbing, the aird file has no more children as the session has been closed by the action and the user need to double click the aird or use the open menu to reopen the session. 

Looking at the code of org.eclipse.sirius.ui.tools.internal.actions.export.ExportRepresentationsFromFileAction, it looks like we get the current session or open a session on the selected aird (line 68:   Session session = SessionManager.INSTANCE.getSession..)

Then we take all representations and display the directory/imageType dialog and we execute a WorkspaceModifyingOperation in which we call SessionManager.openSession() (line 90) before calling the exportAction. 

After the export, ExportRepresentationsFromFileAction closes the session (line 98). 


There is a !isOpen check which seems to be here to avoid to close the session if it was already open before running the action but it is initalized at false and never updated. 
Before calling SessionManager.openSession line 90, we should get the status of the session created or retrieved line 68.
Comment 1 Eclipse Genie CLA 2018-02-21 05:24:32 EST
New Gerrit change created: https://git.eclipse.org/r/117850
Comment 3 Guillaume Coutable CLA 2018-05-24 05:24:59 EDT
Verified with Sirius 6.0M7
Comment 4 Laurent Redor CLA 2018-06-27 11:54:56 EDT
Available in Sirius 6.0.0, see https://wiki.eclipse.org/Sirius/6.0.0 for details