Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Create generator model failed
Create generator model failed [message #42405] Thu, 07 September 2006 18:57 Go to next message
Eclipse UserFriend
Hi.
I'm getting

Diagnosis of org.eclipse.gmf.mappings.impl.MappingImpl@1e5a42c{platform:/resource/test1/model/test1.gmfmap#/}
Validation failed unexpectedly for 'Mapping'. See log for details.
Validation failed unexpectedly for 'Label Mapping '. See log for details.

and

!ENTRY org.eclipse.gmf.validate 4 300 2006-09-08 01:49:14.663
!MESSAGE Validation failed unexpectedly for 'Label Mapping '. See log for details.
!STACK 0
java.lang.ClassCastException: org.eclipse.gmf.gmfgraph.impl.LabelImpl
at org.eclipse.gmf.mappings.impl.LabelMappingImpl.getDiagramLab el(LabelMappingImpl.java:159)
at org.eclipse.gmf.mappings.impl.LabelMappingImpl.eGet(LabelMap pingImpl.java:323)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:594)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:586)
at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:416)
at org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryPr oxyResolves(EObjectValidator.java:328)
at org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:183)
at org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:168)
at org.eclipse.gmf.internal.validate.ValidatorChain.validate(Va lidatorChain.java:70)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:127)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)

in the .log after trying to 'Create generator model...' on the following
fileset:


test1.ecore:
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="test1">
<eClassifiers xsi:type="ecore:EClass" name="Entity">
<eStructuralFeatures xsi:type="ecore:EReference" name="forms" eType="#//Form"
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Form"/>
</ecore:EPackage>

test1.gmfgraph:
<?xml version="1.0" encoding="UTF-8"?>
<gmfgraph:Canvas xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gmfgraph="http://www.eclipse.org/gmf/2005/GraphicalDefinition" name="test1">
<figures
name="Default">
<figures
xsi:type="gmfgraph:Rectangle"
referencingElements="EntityNode"
name="EntityFigure">
<children
xsi:type="gmfgraph:Label"
referencingElements="EntityNameLabel"
name="EntityNameLabel"
text="entity">
<foregroundColor
xsi:type="gmfgraph:ConstantColor"
value="black"/>
</children>
<backgroundColor
xsi:type="gmfgraph:ConstantColor"
value="lightBlue"/>
</figures>
<figures
xsi:type="gmfgraph:RoundedRectangle"
referencingElements="FormNode"
name="FormFigure">
<children
xsi:type="gmfgraph:Label"
referencingElements="FormNameLabel"
name="FormNameLabel"
text="form">
<foregroundColor
xsi:type="gmfgraph:ConstantColor"
value="black"/>
</children>
<backgroundColor
xsi:type="gmfgraph:ConstantColor"
value="lightGray"/>
</figures>
<figures
xsi:type="gmfgraph:PolylineConnection"
referencingElements="forms"
name="forms">
<children
xsi:type="gmfgraph:PolylineDecoration"/>
</figures>
</figures>
<nodes
name="FormNode"
figure="FormFigure"/>
<nodes
name="EntityNode"
figure="EntityFigure"/>
<connections
name="forms"
figure="forms"/>
<labels
name="EntityNameLabel"
figure="EntityNameLabel"/>
<labels
name="FormNameLabel"
figure="FormNameLabel"/>
</gmfgraph:Canvas>

test1.gmftool:
<?xml version="1.0" encoding="UTF-8"?>
<gmftool:ToolRegistry xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
<palette>
<tools
xsi:type="gmftool:ToolGroup"
title="test1">
<tools
xsi:type="gmftool:CreationTool"
title="Entity"
description="Create new Entity">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="Form"
description="Create new Form">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
</tools>
</palette>
</gmftool:ToolRegistry>

test1.gmfmap:
<?xml version="1.0" encoding="UTF-8"?>
<gmfmap:Mapping xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gmfmap="http://www.eclipse.org/gmf/2005/mappings"
xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
<nodes>
<ownedChild>
<domainMetaElement
href="test1.ecore#//Entity"/>
<labelMappings
viewPattern="">
<diagramLabel
href="test1.gmfgraph#EntityNameLabel"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="test1.gmftool#//@palette/@tools.0/@tools.0"/>
<diagramNode
href="test1.gmfgraph#EntityNode"/>
</ownedChild>
</nodes>
<diagram>
<diagramCanvas
href="test1.gmfgraph#test1"/>
<domainModel
href="test1.ecore#/"/>
<domainMetaElement
href="test1.ecore#//Entity"/>
<palette
href="test1.gmftool#//@palette"/>
</diagram>
</gmfmap:Mapping>

Also there is

java.lang.ArrayStoreException
at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:188)
at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList. java:666)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUn ique(NotifyingListImpl.java:384)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:368)

when i'm trying to open test1.gmfmap. What i did wrong?



wbr, eugen.
Re: Create generator model failed [message #42478 is a reply to message #42405] Thu, 07 September 2006 19:51 Go to previous message
Eclipse UserFriend
Hi,

The problem is that you have Label (in particular
Default::EntityFigure::EntityNodeLabel) and DiagramLabel with same name.

Name attribute is used to reference gmfgraph elements from other resources,
so you need always have different names at least for all externally
referenced notions.

Regards,
Michael

"
Previous Topic:GeoShapes PaletteContainer
Next Topic:Problems using Node.createStyle(eClass)
Goto Forum:
  


Current Time: Tue Jul 22 19:09:21 EDT 2025

Powered by FUDForum. Page generated in 0.24184 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top