Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Elements are disappearing in Tree Editor
Elements are disappearing in Tree Editor [message #58860] Tue, 03 October 2006 11:06
Eclipse UserFriend
Originally posted by: dont.spam.net

This is a multi-part message in MIME format.
--------------090002060003040700040005
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi!

I'm working with the Tree View, generated out of the .genmodel Model.

The Problem is that the Editor doesn't work like (I think :) ) it is
described in the .ecore Model. I would like to have a Tree like this:

Editor Canvas
-Display A
| - Variant A1
| - Variant A2
| | - Variant A21
| | - Text "Variant Something"
| | - Key 5
| - Key 1
| - Key 5
| - Text "Something"
| - Text "Another something"
-Display B
| - Variant B1
| | - Variant B11
| - Text "Something else"

But the Editor works like this:

Editor Canvas
-Display A
| - Key 1
| - Text "Something"
-Display B
| - Text "Something else"
-Variant C
-Variant D

I can assign a "Variant" to a "Display" through the Properties of the
"Display" Element. But once a "Variant" is assigned to a "Display" it
will disappear from the Tree (it's still visible in the Properties of
the Display Element).

How can I modify the Model that the Editor provides me a hierarchy of
the Elements like this:
Editor Canvas->Display->Key, Text, Inherited Text, Placeholder,
(Variant->Key, Text, Inherited Text, Placeholder, Variant)

Best regards
Christian

--------------090002060003040700040005
Content-Type: text/xml;
name="ATEDisplay.genmodel"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ATEDisplay.genmodel"

<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/DisplayGMF/src"
modelPluginID="DisplayGMF" modelName="ATEDisplay" importerID="org.eclipse.emf.importer.ecore">
<foreignModel>ATEDisplay.ecore</foreignModel>
<genPackages prefix="Eads" disposableProviderFactory="true" ecorePackage="ATEDisplay.ecore#/">
<genEnums ecoreEnum="ATEDisplay.ecore#//KeyType">
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key1"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key2"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key3"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key4"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key5"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key6"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key7"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key8"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key9"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//KeyType/key10"/>
</genEnums>
<genEnums ecoreEnum="ATEDisplay.ecore#//TextStatus">
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//TextStatus/normal"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//TextStatus/invers"/>
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//TextStatus/blinking"/ >
<genEnumLiterals ecoreEnumLiteral="ATEDisplay.ecore#//TextStatus/ignore"/>
</genEnums>
<genClasses ecoreClass="ATEDisplay.ecore#//Display">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference ATEDisplay.ecore#//Display/variants"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ATEDisplay.ecore#//Display/keys"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ATEDisplay.ecore#//Display/fields"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference ATEDisplay.ecore#//Display/documentation"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Display/id"/>
</genClasses>
<genClasses ecoreClass="ATEDisplay.ecore#//Variant"/>
<genClasses ecoreClass="ATEDisplay.ecore#//Field">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Field/size"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Field/inheritable"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Field/x"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Field/y"/>
</genClasses>
<genClasses ecoreClass="ATEDisplay.ecore#//Key">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Key/id"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference ATEDisplay.ecore#//Key/linkedDisplay"/>
</genClasses>
<genClasses ecoreClass="ATEDisplay.ecore#//Text">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Text/content"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Text/status"/>
</genClasses>
<genClasses ecoreClass="ATEDisplay.ecore#//InheritedText"/>
<genClasses ecoreClass="ATEDisplay.ecore#//Placeholder"/>
<genClasses ecoreClass="ATEDisplay.ecore#//Documentation">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Documentation/title"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ATEDisplay.ecore#//Documentation/content"/>
</genClasses>
<genClasses ecoreClass="ATEDisplay.ecore#//EditorCanvas">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ATEDisplay.ecore#//EditorCanvas/displays"/>
</genClasses>
</genPackages>
</genmodel:GenModel>

--------------090002060003040700040005
Content-Type: text/xml;
name="ATEDisplay.ecore"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ATEDisplay.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="eads"
nsURI="http://www.eads.com" nsPrefix="eads">
<eAnnotations source="EAnnotation1"/>
<eClassifiers xsi:type="ecore:EClass" name="Display">
<eStructuralFeatures xsi:type="ecore:EReference" name="variants" upperBound="-1"
eType="#//Variant" defaultValueLiteral="" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="keys" upperBound="10" eType="#//Key"
defaultValueLiteral="" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="fields" upperBound="-1"
eType="#//Field" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="documentation" eType="#//Documentation"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Variant" eSuperTypes="#//Display"/>
<eClassifiers xsi:type="ecore:EClass" name="Field" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="size" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="inheritable" unique="false"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="x" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="y" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Key">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" lowerBound="1" eType="#//KeyType"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="linkedDisplay" eType="#//Display"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="KeyType">
<eLiterals name="key1" value="1"/>
<eLiterals name="key2" value="2"/>
<eLiterals name="key3" value="3"/>
<eLiterals name="key4" value="4"/>
<eLiterals name="key5" value="5"/>
<eLiterals name="key6" value="6"/>
<eLiterals name="key7" value="7"/>
<eLiterals name="key8" value="8"/>
<eLiterals name="key9" value="9"/>
<eLiterals name="key10" value="10"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Text" eSuperTypes="#//Field">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="content" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="status" lowerBound="1"
eType="#//TextStatus"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="TextStatus">
<eLiterals name="normal"/>
<eLiterals name="invers" value="1"/>
<eLiterals name="blinking" value="2"/>
<eLiterals name="ignore" value="3"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="InheritedText" eSuperTypes="#//Field"/>
<eClassifiers xsi:type="ecore:EClass" name="Placeholder" eSuperTypes="#//Field"/>
<eClassifiers xsi:type="ecore:EClass" name="Documentation">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral=""/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="content" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EditorCanvas">
<eStructuralFeatures xsi:type="ecore:EReference" name="displays" upperBound="-1"
eType="#//Display" containment="true"/>
</eClassifiers>
</ecore:EPackage>

--------------090002060003040700040005--
Previous Topic:Changing font of element during runtime
Next Topic:Getting the Source and target connections of an element during runtime
Goto Forum:
  


Current Time: Mon Jun 02 20:20:45 EDT 2025

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

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

Back to the top