[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Problems with 2.1 RC1 with gmfmap, and gmfgen, null pointers and class cast exceptions

I think i found the problem node/diagram label, and removed it, and it works now. well sorta...

on the body for the value expression, is there a setting that I need to set to have the body contents generated, as right now it is still throwing java.lang.UnsupportedOperationException(...)

thanks

Artem Tikhomirov wrote:
Hello,

Issues 1 and 3 seems to be the same, and apparently there's somthing wrong with the reference from LabelMapping to a figure/DiagramElement in .gmfgraph model. According to stacktrace, LabelMapping#diagramLabel points to a Node rather then to DiagramLabel, hence CCE. Could you please attach stripped down version of your gmfmap and gmfgen (suffice to keep one LabelMapping that causes error), both original and migrated versions (or, originals at least).
Another possible reason is that you've got a Node and a DiagramLabel in your .gmfgraph file, both with the same name. Since GMF uses DiagramElement#name to reference elements of .gmfgraph, the first one with the same name would be taken and it might happen to be a Node, not a DiagramLabel.


Regarding Issue 2, if your question is about names of generated methods for Java initializers, then yes, that has been changed in 2.1. Basically, the idea to use 'body' for name seems odd, and besides there's new option to use that 'body' value to inject implementation of a Java initializer right away, without extra '@generated NOT' step.

Best wishes,
Artem Tikhomirov


"Brian Jakubik" <brian.jakubik@xxxxxxxxxxxxxx> wrote in message news:g1klv3$l66$1@xxxxxxxxxxxxxxxxxxxx
Hi, I just started porting to 2.1 RC1 (from 2.0) and am having alot of
issues.

**********
Issue 1
**********

First I migrated my gmfmap, gmfgraph, and gmfgen to 2.1 using the menu.
Then trying to generate my gmfgen, I get the following errors on my gmfmap:


see NPE.txt for full stacktrace
Validation failed unexpectedly for 'Feature Seq Initializer'. See log
for details.
java.lang.ClassCastException: org.eclipse.gmf.gmfgraph.impl.NodeImpl
at
org.eclipse.gmf.mappings.impl.LabelMappingImpl.getDiagramLabel(LabelMappingImpl.java:93)
at
org.eclipse.gmf.mappings.impl.LabelMappingImpl.eGet(LabelMappingImpl.java:207)
at
org.eclipse.gmf.mappings.impl.FeatureLabelMappingImpl.eGet(FeatureLabelMappingImpl.java:312)
at ...

appears to be one for every sequence initializer i have...

**********
ISSUE 2
**********
The next issue is that Feature Value Spec in gmfmap now has a Value
Expression,  It seems the generated methods look like
"id_EventProcess_2020" instead of the body that was defined.

**********
ISSUE 3
**********

When I try to edit my gmfmap, such as a Feature Label Mapping or add a
Feature Value Spec..., I get the following exceptions:

see CCE.txt for full stacktrace
Unhandled event loop exception
java.lang.ClassCastException: org.eclipse.gmf.gmfgraph.impl.NodeImpl
at
org.eclipse.gmf.mappings.impl.LabelMappingImpl.getDiagramLabel(LabelMappingImpl.java:93)
at
org.eclipse.gmf.mappings.impl.LabelMappingImpl.eGet(LabelMappingImpl.java:207)
at
org.eclipse.gmf.mappings.impl.FeatureLabelMappingImpl.eGet(FeatureLabelMappingImpl.java:312)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1012)
...

Any idea if I have a bad build, or obvious things I am missing, this
works in 2.0, but not when I migrate....

If they are issues, Ill create bugs asap...

Thanks
Brian Jakubik