Community
Participate
Working Groups
Build Identifier: Currently (Graphiti 0.9.0) DiagramEditorInternal.updateViewerGridProperties() sets: PROPERTY_GRID_ENABLED => from diagram (snapToGrid) PROPERTY_GRID_SPACING => from diagram (verticalGridUnit/horizontalGridUnit) PROPERTY_GRID_VISIBLE => implicit (horizontalGridUnit > 0, verticalGridUnit > 0) PROPERTY_SNAP_ENABLED => from the toolbehaviourprovider.isShowGuides() (however, my diagram.ecore has a showGuides attribute ... which seems not in synch with Diagram class) AFAIJK there is little to do if the user wants to change these settings in runtime, as most editors allow. In particular, Graphiti should: - allow a more flexible way of set PROPERTY_GRID_VISIBLE (perhaps from the toolbehaviourprovider) - add some hook or support in the editor so that these changes are passed to GEF viewer on change. - discuss/clarify which settings should be saved in the diagram (what about that diagram.showGuides in graphiti.ecore?) , which are set by the editor, which can be changed in runtime, as preferences. It seems reasonable to me that the grid spacing is saved in the diagram. More arguable is snapToGrid (sounds more like an editor setting to me; it would be strange that when the user toggles "show grid/hide grid" the diagram is marked as dirty - actually, it's also strange for the grid unit... but less so). Reproducible: Always
The part about the showGuides attribute has already been adressed in Graphiti 0.9.0 for Juno M2. The relevant setting is the one in the tool behaviour provider, the attribute in the diagram is kept only for compatibility, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=352220