Bug 485324 - Export as image doesn't works
Summary: Export as image doesn't works
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 3.1.0   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: 4.0.0M7   Edit
Assignee: Maxime Porhel CLA
QA Contact: Maxime Porhel CLA
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 492516 492517
  Show dependency tree
 
Reported: 2016-01-07 03:58 EST by Esteban DUGUEPEROUX CLA
Modified: 2016-06-24 07:59 EDT (History)
4 users (show)

See Also:


Attachments
Sample project to reproduce (169.51 KB, application/zip)
2016-01-07 03:58 EST, Esteban DUGUEPEROUX CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Esteban DUGUEPEROUX CLA 2016-01-07 03:58:30 EST
Created attachment 259043 [details]
Sample project to reproduce

A popup "Cannot modify resource set without a write transaction" is displayed when exporting as image for the diagram in attachment.

Scenario to reproduce :
1. Import projects from the attached archive
2. Launch a runtime from them
3. Import AQLBug.test in this second runtime
4. Open the diagram
5. Export as diagram using the action from tabbar => KO the popup appears

The popup appears because of IllegalStateException which is thrown from TransactionChangeRecorder.assertWriting() because DiagramDialectUIServices
.synchronizeDiagram() is not called in a EMF Command.
In addition non GMF model change is done by DDiagramCanonicalSynchronizer, it is only a touch notification from RegionContainerUpdateLayoutOperation which could be avoided.
Comment 1 Eclipse Genie CLA 2016-01-07 04:02:03 EST
New Gerrit change created: https://git.eclipse.org/r/63697
Comment 2 Esteban DUGUEPEROUX CLA 2016-01-07 08:06:50 EST
This occurs with diagram having compartment.
Comment 3 Eclipse Genie CLA 2016-04-27 04:01:20 EDT
New Gerrit change created: https://git.eclipse.org/r/71496
Comment 5 Maxime Porhel CLA 2016-04-29 05:43:12 EDT
The provided correction allows to avoid useless touch notifications in regions layout.
With this, the IllegalStateException does not occur anymore on up-to-date diagrams. 

Bug 492516 has been created to analyse the need for this canonical refresh done at export time. The first proposed patchset has been moved to Bug 492516. We kept only the touch notification part for the current bugzilla
Comment 6 Maxime Porhel CLA 2016-05-24 11:15:27 EDT
Validated on Sirius 4.0.0.201605180923 (4.0.0 RC1)
Comment 7 Pierre-Charles David CLA 2016-06-24 07:59:20 EDT
Available in Sirius 4.0.0.