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
  10. GMF Troubleshooting 10

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.


Opening a GMF diagram editor is slow. or
Closing a GMF diagram editor is slow. or
generateUUID() is slow.

The EMF generateUUID() method can be slow on Windows NT-based systems because the random number generator is seeded by listing all of the files in your temporary directory; and if you are like me, your temporary directory is filled with tens of thousands of files. Try emptying your temp folder.

You can also use a batch script: C:\Documents and Settings\xxx\Local Settings\Temp>del * /s /q /f


When trying to generate the diagram editor from a .gmfgen file, I get the following exception:
java.lang.NullPointerException
at org.eclipse.gmf.internal.common.codegen.GeneratorBase.doGenerateJavaClass(GeneratorBase.java:367)
at org.eclipse.gmf.internal.common.codegen.GeneratorBase.doGenerateJavaClass(GeneratorBase.java:321)
at org.eclipse.gmf.codegen.util.Generator.generateDomainNavigatorItem(Generator.java:726)
at org.eclipse.gmf.codegen.util.Generator.customRun(Generator.java:254)
at org.eclipse.gmf.internal.common.codegen.GeneratorBase$1.run(GeneratorBase.java:473)

The destination of the plugin you are trying to generate may be out of sync with Eclipse. Try refreshing the plugin directory (F5).


Validation failed unexpectedly for 'Node Mapping'. See log for details. -- java.lang.ArrayStoreException

See this newsgroup posting.
Categories: GMF | GMF | Technology | Code Snippets
edit this page - what links to here? - page history - top
Last edited by jevon jevon 78 months ago