Bug 364441 - enable preference controlled grid settings
Summary: enable preference controlled grid settings
Status: ASSIGNED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-22 02:42 EST by Henrik Rentz-Reichert CLA
Modified: 2012-08-21 09:44 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Rentz-Reichert CLA 2011-11-22 02:42:52 EST
I refer to the discussion in the newsgroup thread "grid settings should be controlled by preferences rather than being diagram properties".

It seems to be clear that the diagram is not the right place to store grid settings like horizontal and vertical units and 'snap to grid' in the diagram itself. Rather, a change should be reflected immediately in open editors and should also apply to diagrams opened after the settings changed without changing the graphical model.

To cover the different needs expressed in the newsgroup thread I would propose to add the grid settings to the diagram provider and add API in an appropriate place that lets the framework update the settings for a given diagram type.

The AbstractDiagramTypeProvider could be extended by methods (supplying current defaults):

public boolean isGridVisible() {
    return true;
}
public boolean isSnapToGrid() {
    return false;
}
public int getHorizontalGridUnits() {
    return 10;
}
public int getVerticalGridUnits() {
    return 10;
}

I don't see which service should receive the update method. But the interface could be extended by
public void updateGridSettings(String diagramTypeId)

This method would consult the corresponding diagram type provider and use the new settings in the open and new editors for this diagram type.


Having the proposed API at hand the framework user can easily implement its own preferences as appropriate for him.

This enhancement is also related to bug 361300.
Comment 1 Michael Wenz CLA 2012-08-21 09:44:42 EDT
Due to limited team capacity this is out of scope for Kepler, unless there are contributions