Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How do I set the Grid In Front property
How do I set the Grid In Front property [message #160711] Thu, 15 November 2007 14:45 Go to next message
Eclipse UserFriend
Originally posted by: martin.tauber.t-online.de

I would like to set the "Grid in Front" property as a default, when a
new diagram is created. How do I do this?

Regards
Martin
Re: How do I set the Grid In Front property [message #160771 is a reply to message #160711] Thu, 15 November 2007 18:54 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Martin,

See http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg09332.html

-----------------
Alex Shatalin
Re: How do I set the Grid In Front property [message #179874 is a reply to message #160771] Mon, 31 March 2008 08:17 Go to previous message
Zac Wolfe is currently offline Zac WolfeFriend
Messages: 11
Registered: July 2009
Junior Member
I know this is an old thread but I recently ran into this problem and
found a solution.

For some reason the property for controlling the "grid in front"
behavior is not included in IPreferenceConstants, unlike the other grid
properties (PREF_SHOW_GRID, PREF_GRID_SPACING, etc.). To make the grid
show behind the figures by default I had to override
addDefaultPreferences() in XXXDiagramEditor and add the following line:

getWorkspaceViewerPreferenceStore().setDefault(WorkspaceView erProperties.GRIDORDER,
false);

So the entire overridden method is:

@Override
protected void addDefaultPreferences() {
// TODO Auto-generated method stub
super.addDefaultPreferences();

getWorkspaceViewerPreferenceStore().setDefault(WorkspaceView erProperties.GRIDORDER,
false);
}



Alex Shatalin wrote:
> Hello Martin,
>
> See
> http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg09332.html
>
> -----------------
> Alex Shatalin
>
>
Previous Topic:Remove menu contribution when generating the diagram plugin
Next Topic:GMF and workspace-dependency in RCP
Goto Forum:
  


Current Time: Fri Apr 19 11:50:35 GMT 2024

Powered by FUDForum. Page generated in 0.01672 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top