Bug 435878 - Not possible to display grid on new version of Linux
Summary: Not possible to display grid on new version of Linux
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 1.0.0M7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-05-27 05:44 EDT by Laurent Redor CLA
Modified: 2016-02-19 02:35 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2014-05-27 05:44:20 EDT
This problem is specific to Linux, there is no problem on Windows.
Currently, it is not possible to display the grid on new version of Linux:
* KO on Ubuntu 13.10, Ubuntu 14.04 and on OpenSuse 13.1
* OK on Ubuntu 12.04, Xubuntu 12.10 and on Debian 7.5

There is also the same problem on the GMF examples, steps to reproduce:
* Install a new Eclipse 4.4 M7 SDK
* Install GMF Examples
* Create a new Project
* Create a new Logic diagram
* In Properties view, enable "Show Grid"
* OK: The grid is visible
* Create a new Geoshape diagram
* In Properties view, enable "Show Grid"
KO: The grid is not visible (even by modifying other properties: Color, Style, Ruler Units and Grid Spacing)

The different is on the measurementUnit property of notation:Diagram ("Pixel" for Geoshape, "Himetric" for Logic).

On Sirius, I try to modify the method org.eclipse.sirius.diagram.ui.internal.view.factories.DDiagramViewFactory.getMeasurementUnit() to return MeasurementUnit.HIMETRIC_LITERAL instead of MeasurementUnit.PIXEL_LITERAL. The grid appears on the new diagram but there are several problems:
* the coordinates and size are not the same in aird file (50 pixels equals to 1296 ???)
* the label are not displayed exactly at the same place
* it is not possible to create a node with an initial size (click and drag with the mouse during creation)
* export of diagram is impossible, the error message "...could no be exported because thay are too large..." is displayed probably because of a wrong computing based on himetric values
* and problably others problems
Comment 1 Laurent Redor CLA 2014-05-27 10:11:47 EDT
For information: The method org.eclipse.gef.editparts.GridLayer.setSpacing(Dimension) is called when modifying the "Grid Spacying" property and all seems OK in spacing values...
Comment 2 Laurent Redor CLA 2014-06-05 05:14:14 EDT
Post added on GMF forum: https://www.eclipse.org/forums/index.php/t/780844/