edit this page - page history - about editing

GMF Troubleshooting 9

GMF
  1. GMF Troubleshooting
  2. GMF Troubleshooting 2
  3. GMF Troubleshooting 3
  4. GMF Troubleshooting 4
  5. GMF Troubleshooting 5
  6. GMF Troubleshooting 6
  7. GMF Troubleshooting 7
  8. GMF Troubleshooting 8
  9. GMF Troubleshooting 9
Conflict for xxx.LoadResourceAction':HandlerActivation(commandId=xxx.LoadResourceAction, handler=xxx.part.LoadResourceAction, expression=,sourcePriority=0) HandlerActivation(commandId=xxx.LoadResourceAction, handler=xxx.part.LoadResourceAction, expression=,sourcePriority=0)

This can occur if, in your generated plugin.xml, there are multiple org.eclipse.ui.commands extensions with the same ID.

In my case this occured because my .gmfgen had two Gen Editor Generator > Context Menu items. Perhaps this is from a previous migration. Removing them ensured the error would not happen again.

I wrote this test case to check against existing gmfgen's to ensure this problem did not regress.


Error initializing element type "org.eclipse.gmf.tests.runtime.emf.type.core.employee": element type with same ID already exists.

These errors can be ignored. These errors come from the org.eclipse.gmf.tests.runtime.emf.type.core JUnit test plug-in, which can be removed from your launch configuration.


java.lang.NullPointerException
at org.eclipse.gmf.runtime.diagram.ui.layout.FreeFormLayoutEx.layout(FreeFormLayoutEx.java:38)

This occured when I upgraded to GMF 2.2.2. The problem is that I was adding an IFigure programatically to another IFigure without properly adding a new Constraint for the LayoutManager.

The solution was to add a new Rectangle constraint, as in r1740 of IAML. This also removed the requirement to add a LayoutListener.


Top level node 'Containment Feature' must be available in the diagram 'Domain Element' or its super-class

This is a validation warning that you can ignore, but it is actually fatal. Trying to generate the diagram code from this .gmfgen will create an invalid line in XXXDiagramUpdater#getXXXSemanticChildren(), looking for a containment feature that doesn't exist.


The "Appearance" Tab in my generated GMF editor is disabled, but only for some nodes.
I can't change the colour or font of a label or node in my GMF editor.

If you specify your own Font style in a .gmfgraph, by default the generated .gmfgen will have "fixed font" set to true for this node, in Gen Diagram > Gen Top Level Node XXXEditPart > Inner Class Viewmap XXXFigure > Style Attributes.

If you set this to false, the font can now be modified. There was a request in 2007 to disable this "feature" by default.

I added an automated test to remove this in r2302 of IAML.

Categories: GMF | GMF | Technology | Code Snippets

edit this page - what links to here? - page history - top
Last edited by jevon jevon 3 months ago