Jump to: navigation, search

Difference between revisions of "Graphical Modeling Framework/Troubleshooting"

 
Line 1: Line 1:
 
This "Newbie's Troubleshooting Guide" was inspired by a series of newsgroup postings contributed by Niclas Hedhman.
 
This "Newbie's Troubleshooting Guide" was inspired by a series of newsgroup postings contributed by Niclas Hedhman.
  
=== Missing classes following generation ===
+
== Missing classes following generation ==
 
* Scenario:
 
* Scenario:
  
Line 20: Line 20:
 
doing.
 
doing.
  
* What GMF could do to make it better:
+
* Suggestions:
  
 
It would be great if some form of "sanity check" be done during the
 
It would be great if some form of "sanity check" be done during the
Line 27: Line 27:
 
distinction between the two.
 
distinction between the two.
  
* Original posting
+
* Original posting:
  
 
[http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01005.html http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01005.html]
 
[http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01005.html http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01005.html]
  
* Comments
+
* Comments:
  
 
This is actually an EMF usage issue, but definitely appropriate to post in the context of GMF.
 
This is actually an EMF usage issue, but definitely appropriate to post in the context of GMF.
  
=== Generation of packages not as expected ===
+
== Generation of packages not as expected ==
  
 
* Scenario:
 
* Scenario:
Line 61: Line 61:
 
the .genmodel as described in the GMF tutorial.
 
the .genmodel as described in the GMF tutorial.
  
* Original posting
+
* Suggestions:
 +
 
 +
None.
 +
 
 +
* Original posting:
  
 
[http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01033.html http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01033.html]
 
[http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01033.html http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01033.html]
  
* Comments
+
* Comments:
  
 
None.
 
None.
 +
 +
== Compiler errors following edit code generation  ==
 +
 +
* Scenario:
 +
 +
You generate the "edit" project and gets heaps of compile errors, all
 +
referring to the Model Code that you have just generated, and is correctly
 +
in place in the "main" project.
 +
 +
* Probable cause:
 +
 +
You have possibly gotten the Manifest and plugin.xml of the main project out
 +
of sync. They don't seem to be updated correctly.
 +
 +
* Resolution:
 +
 +
Delete these two files and run the Generate Model Code again. This will
 +
update those files and the referencing between the plugins will work again.
 +
 +
* Suggestions:
 +
 +
None.
 +
 +
* Original posting:
 +
 +
[http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01035.html http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01035.html]
 +
 +
* Comments:
 +
 +
Another EMF scenario, which is a known (advertised) "feature" ;)

Revision as of 09:15, 10 February 2006

This "Newbie's Troubleshooting Guide" was inspired by a series of newsgroup postings contributed by Niclas Hedhman.

Missing classes following generation

  • Scenario:

You generate the "Model Code" and/or "Model Edit" from the .genmodel and you see compile errors, in the form of missing classes.

  • Probable cause:

When you right-click on the top-level element in the .genmodel editor, you will see the same actions available as in the 'package level' node. They are NOT the same. If you accidentally click on the package level one, and have not previously generated code/edit you will not get a warning and instead end up with mysterious compile errors.

  • Remedy:

Make sure you generate from the top-level node, unless you know what you are doing.

  • Suggestions:

It would be great if some form of "sanity check" be done during the generation phases, so that this type of confusion could be avoided. Alternatively, different popup menu items, which clearly makes a distinction between the two.

  • Original posting:

http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01005.html

  • Comments:

This is actually an EMF usage issue, but definitely appropriate to post in the context of GMF.

Generation of packages not as expected

  • Scenario:

In EMF, by giving the top level package name a fully qualified name (e.g. org.hedhman.habba), it at first looks like the base package will be generated correctly. The .genmodel will show that the Base Package has been set up correctly.

However, after generation of the Model Code, "something" resets the package name in the .ecore model and drops everything up to the last dot, i.e. "org.hedhman.habba" is reverted to "habba" for the top level package name.

  • Probable cause:

The Model Code generator seems to be the culprit, as it indeed generates Java code for both "org.hedhman.habba" and "habba" package names in the first run, although I was under the impression that the Model Code generator wouldn't even know of the existence of the .ecore.

  • Remedy:

Don't try to mess with dots in the root level package in the .ecore model, and manually remember to add the Base Package in the .genmodel as described in the GMF tutorial.

  • Suggestions:

None.

  • Original posting:

http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01033.html

  • Comments:

None.

Compiler errors following edit code generation

  • Scenario:

You generate the "edit" project and gets heaps of compile errors, all referring to the Model Code that you have just generated, and is correctly in place in the "main" project.

  • Probable cause:

You have possibly gotten the Manifest and plugin.xml of the main project out of sync. They don't seem to be updated correctly.

  • Resolution:

Delete these two files and run the Generate Model Code again. This will update those files and the referencing between the plugins will work again.

  • Suggestions:

None.

  • Original posting:

http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg01035.html

  • Comments:

Another EMF scenario, which is a known (advertised) "feature" ;)