兑现GEF中editor的背景为网格

实现GEF中editor的背景为网格在editor中的initializeGraphicalViewer方法中加上如下代码即可:getGraphical

实现GEF中editor的背景为网格
在editor中的initializeGraphicalViewer方法中加上如下代码即可:

getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_ENABLED,new Boolean(true));getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, true);

这个实现的效果如附件效果,只是正对editor的背景,并不会对布局有任何影响