GMF display diagram example
问题 How can I display a GMF diagram, with the file format "*.ecorediag" in Eclipse in a View? The diagram should not be editable. Is there a simple sample view that loads a diagram from say "/home/diagrams/test.ecorediag" 回答1: The GMF diagrams (including ecorediag) are rendered on the editor with the help of "org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer". So the bare minimum code to make this work DiagramGraphicalViewer viewer = new DiagramGraphicalViewer(); viewer