GMF增加自定义的properties Sheets

EMF注意点:

1、创建模型时,主要要有句柄ShapesDiagram。

2、实体关系要创建正确。

3、创建model.gmfmap图形映射关系时,到Map domain model elements这一步的时候,除掉多余的Links,保证connections对应关系正确,可以点击chang按钮查看修改。

GEF注意点:

1、自定义的properties Sheets时,可以自己创建一个新的properties插件。这时你需要注释digram插件的plugin.xml系统默认的属性页扩展点:①org.eclipse.ui.views.properties.tabbed.propertyTabs、②org.eclipse.ui.views.properties.tabbed.propertySections。

2、在properties的plugin.xm中扩展①、②、org.eclipse.ui.popupMenus3个扩展点,

(1)在①扩展点中需要添加:<input type="org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart"/>;

(2)contributorId属性值一定要与digram插件的一致。

3、属性页过滤之类的可以参照源代码。

4、过滤器实现IFilter,属性页继承AbstractPropertySection

猜你喜欢

转载自athena20009.iteye.com/blog/1068179