GMF Palette Stack Tool Group [message #1061327] |
Fri, 31 May 2013 08:47  |
Eclipse User |
|
|
|
Hi
I make palette as ;
<?xml version="1.0" encoding="ASCII"?>
<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
title="contentPalette">
<tools
xsi:type="gmftool:ToolGroup"
title="Objects"
collapsible="true"
stack="true">
<tools
xsi:type="gmftool:CreationTool"
title="ContentType"
description="Create new ContentType">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="CustomList"
description="Create new CustomList">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="SiteCollection"
description="Create new SiteCollection">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="View"
description="Create new View">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="ViewField"
description="Create new ViewField">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="Web"
description="Create new Web">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="WebApplication"
description="Create new WebApplication">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:ToolGroup"
title="Fields"
collapsible="true">
<tools
xsi:type="gmftool:CreationTool"
title="TextField"
description="Create new TextField">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="NumberField"
description="Create new NumberField">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="BooleanField"
description="Create new BooleanField">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
<tools
xsi:type="gmftool:CreationTool"
title="LookUp"
description="Create new LookUp">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
</tools>
</tools>
<tools
xsi:type="gmftool:ToolGroup"
title="Connections"
collapsible="true">
<tools
xsi:type="gmftool:CreationTool"
title="ParentContentType"
description="Create new ParentContentType">
<smallIcon
xsi:type="gmftool:DefaultImage"/>
<largeIcon
xsi:type="gmftool:DefaultImage"/>
</tools>
</tools>
</palette>
</gmftool:ToolRegistry>
But When i Create Generator model i always get this error;
The opposite features 'palette' of 'Tool Group Fields' and 'groups' of 'Palette com.mdd4cca.msf.content.content.diagram.part' do not refer to each other
But why dont understand anyone can help me to solve this ?
Clearly i cant make a sub Tool Group
Regards
|
|
|
Re: GMF Palette Stack Tool Group [message #1061360 is a reply to message #1061327] |
Fri, 31 May 2013 10:23   |
Eclipse User |
|
|
|
Hi,
rightclick the root of your select validate. An error dialog will pop up. Select the error in this dialog and press OK. The node producing the error will be selected. You can now fix the error.
Ralph
|
|
|
|
|
Re: GMF Palette Stack Tool Group [message #1061696 is a reply to message #1061691] |
Mon, 03 June 2013 14:10   |
Eclipse User |
|
|
|
Hi,
i dont look gmfmap cause i generate gmf from epsilon and dont know much gmfmap
u know which relations i must look on gmfmap ?
my gmfmap is;
<?xml version="1.0" encoding="ASCII"?>
<gmfmap:Mapping
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"
xmlns:gmfmap="http://www.eclipse.org/gmf/2008/mappings"
xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
<nodes>
<containmentFeature
href="Content.ecore#//ContentModel/ownedWebApplication"/>
<ownedChild
relatedDiagrams="//@diagram">
<domainMetaElement
href="Content.ecore#//WebApplication"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Content.gmfgraph#WebApplicationLabel"/>
<features
href="Content.ecore#//ContentUnit/displayName"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.6"/>
<diagramNode
href="Content.gmfgraph#WebApplication"/>
<children
compartment="//@nodes.0/@ownedChild/@compartments.0">
<containmentFeature
href="Content.ecore#//WebApplication/ownedSiteColection"/>
<ownedChild
relatedDiagrams="//@diagram">
<domainMetaElement
href="Content.ecore#//SiteCollection"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Content.gmfgraph#SiteCollectionLabel"/>
<features
href="Content.ecore#//ContentUnit/displayName"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.2"/>
<diagramNode
href="Content.gmfgraph#SiteCollection"/>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@compartments.0">
<containmentFeature
href="Content.ecore#//SiteCollection/ownedWeb"/>
<ownedChild
relatedDiagrams="//@diagram">
<domainMetaElement
href="Content.ecore#//Web"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Content.gmfgraph#WebLabel"/>
<features
href="Content.ecore#//ContentUnit/displayName"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.5"/>
<diagramNode
href="Content.gmfgraph#Web"/>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@compartments.0">
<containmentFeature
href="Content.ecore#//Web/ownedList"/>
<ownedChild
relatedDiagrams="//@diagram">
<domainMetaElement
href="Content.ecore#//CustomList"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Content.gmfgraph#CustomListLabel"/>
<features
href="Content.ecore#//ContentUnit/displayName"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.1"/>
<diagramNode
href="Content.gmfgraph#CustomList"/>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@compartments.0">
<containmentFeature
href="Content.ecore#//CustomList/ownedContentType"/>
<ownedChild
relatedDiagrams="//@diagram">
<domainMetaElement
href="Content.ecore#//ContentType"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Content.gmfgraph#ContentTypeLabel"/>
<features
href="Content.ecore#//ContentUnit/displayName"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.0"/>
<diagramNode
href="Content.gmfgraph#ContentType"/>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@compartments.0">
<containmentFeature
href="Content.ecore#//ContentType/ownedField"/>
<ownedChild>
<domainMetaElement
href="Content.ecore#//TextField"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="{0} :' «Text»'"
editorPattern="{0} :' «Text»'"
editPattern="{0} :' «Text»'">
<diagramLabel
href="Content.gmfgraph#TextFieldLabel"/>
<features
href="Content.ecore#//ContentUnit/displayName"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.7/@tools.0"/>
<diagramNode
href="Content.gmfgraph#TextField"/>
</ownedChild>
</children>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@compartments.0">
<containmentFeature
href="Content.ecore#//ContentType/ownedField"/>
<ownedChild>
<domainMetaElement
href="Content.ecore#//NumberField"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="{0} :' «Number»'"
editorPattern="{0} :' «Number»'"
editPattern="{0} :' «Number»'">
<diagramLabel
href="Content.gmfgraph#NumberFieldLabel"/>
<features
href="Content.ecore#//ContentUnit/displayName"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.7/@tools.1"/>
<diagramNode
href="Content.gmfgraph#NumberField"/>
</ownedChild>
</children>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@compartments.0">
<containmentFeature
href="Content.ecore#//ContentType/ownedField"/>
<ownedChild>
<domainMetaElement
href="Content.ecore#//BooleanField"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="{0} :' «Boolean»'"
editorPattern="{0} :' «Boolean»'"
editPattern="{0} :' «Boolean»'">
<diagramLabel
href="Content.gmfgraph#BooleanFieldLabel"/>
<features
href="Content.ecore#//ContentUnit/displayName"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.7/@tools.2"/>
<diagramNode
href="Content.gmfgraph#BooleanField"/>
</ownedChild>
</children>
<compartments
children="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0 //@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.1 //@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.2">
<compartment
href="Content.gmfgraph#ContentTypeOwnedFieldCompartment"/>
</compartments>
</ownedChild>
</children>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@compartments.1">
<containmentFeature
href="Content.ecore#//CustomList/ownedView"/>
<ownedChild
relatedDiagrams="//@diagram">
<domainMetaElement
href="Content.ecore#//View"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Content.gmfgraph#ViewLabel"/>
<features
href="Content.ecore#//ContentUnit/displayName"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.3"/>
<diagramNode
href="Content.gmfgraph#View"/>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.1/@ownedChild/@compartments.0">
<containmentFeature
href="Content.ecore#//View/ownedViewField"/>
<ownedChild>
<domainMetaElement
href="Content.ecore#//ViewField"/>
<labelMappings
xsi:type="gmfmap:ExpressionLabelMapping">
<diagramLabel
href="Content.gmfgraph#ViewFieldLabel"/>
<viewExpression
body="self.field.displayName.concat(' : ').concat(if self.field.oclIsTypeOf(TextField) then '«Text»' else if self.field.oclIsTypeOf(NumberField) then '«Number»' else if self.field.oclIsTypeOf(BooleanField) then '«Boolean»' else if self.field.oclIsTypeOf(LookUp) then '«LookUp»' else '' endif endif endif endif)"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.4"/>
<diagramNode
href="Content.gmfgraph#ViewField"/>
</ownedChild>
</children>
<compartments
children="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.1/@ownedChild/@children.0">
<compartment
href="Content.gmfgraph#ViewOwnedViewFieldCompartment"/>
</compartments>
</ownedChild>
</children>
<compartments
children="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0">
<compartment
href="Content.gmfgraph#CustomListOwnedContentTypeCompartment"/>
</compartments>
<compartments
children="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.1">
<compartment
href="Content.gmfgraph#CustomListOwnedViewCompartment"/>
</compartments>
</ownedChild>
</children>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@compartments.1"
referencedChild="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild">
<containmentFeature
href="Content.ecore#//Web/ownedWeb"/>
</children>
<compartments
children="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.0">
<compartment
href="Content.gmfgraph#WebOwnedListCompartment"/>
</compartments>
<compartments
children="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0/@ownedChild/@children.1">
<compartment
href="Content.gmfgraph#WebOwnedWebCompartment"/>
</compartments>
</ownedChild>
</children>
<compartments
children="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0">
<compartment
href="Content.gmfgraph#SiteCollectionOwnedWebCompartment"/>
</compartments>
</ownedChild>
</children>
<compartments
children="//@nodes.0/@ownedChild/@children.0">
<compartment
href="Content.gmfgraph#WebApplicationOwnedSiteColectionCompartment"/>
</compartments>
</ownedChild>
</nodes>
<links>
<domainMetaElement
href="Content.ecore#//LookUp"/>
<labelMappings
xsi:type="gmfmap:ExpressionLabelMapping">
<diagramLabel
href="Content.gmfgraph#LookUpLabel"/>
<viewExpression
body="self.contentType.displayName.concat(' -> ').concat(self.showField.displayName).concat(' ').concat(self.displayName).concat(' : «LookUp»')"/>
</labelMappings>
<containmentFeature
href="Content.ecore#//ContentType/ownedField"/>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.0/@tools.7/@tools.3"/>
<diagramLink
href="Content.gmfgraph#LookUp"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="Content.ecore#//LookUp/contentType"/>
</links>
<links>
<labelMappings
xsi:type="gmfmap:DesignLabelMapping"
readOnly="true">
<diagramLabel
href="Content.gmfgraph#ContentTypeParentContentTypeExternalLabel"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Content.gmftool#//@palette/@tools.1/@tools.0"/>
<diagramLink
href="Content.gmfgraph#ContentTypeParentContentType"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="Content.ecore#//ContentType/parentContentType"/>
</links>
<diagram>
<diagramCanvas
href="Content.gmfgraph#content"/>
<domainModel
href="Content.ecore#/"/>
<domainMetaElement
href="Content.ecore#//ContentModel"/>
<palette
href="Content.gmftool#//@palette"/>
</diagram>
</gmfmap:Mapping>
Regards
[Updated on: Mon, 03 June 2013 14:38] by Moderator Report message to a moderator
|
|
|
Re: GMF Palette Stack Tool Group [message #1715101 is a reply to message #1061696] |
Thu, 19 November 2015 09:17  |
Eclipse User |
|
|
|
Hi, I'm learning something about GMF recently, and met the same problem as you did two years ago.
I made a Stack Tool Group, and when I generated the *.gmfgen model, an error occured as below:
"The opposite features 'palette' of 'Tool Group Relationships' and 'groups' of 'Palette mindmap.diagram.part' do not refer to each other".
My palette definition is :
<palette>
<groups
title="mindmap">
<entries
xsi:type="gmfgen:ToolEntry"
title="Topic"
description="Create new Topic"
genNodes="//@diagram/@topLevelNodes.0"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="TopicSubtopics"
description="Create new TopicSubtopics"
genLinks="//@diagram/@links.0"/>
<entries
xsi:type="gmfgen:ToolGroup"
title="Relationships"
stack="true">
<entries
xsi:type="gmfgen:ToolEntry"
title="Dependency"
description="Create new Dependency"
default="true"
genLinks="//@diagram/@links.1"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Include"
description="Create new Include"
genLinks="//@diagram/@links.2"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Extend"
description="Create new Extend"
genLinks="//@diagram/@links.3"/>
</entries>
</groups>
</palette>
Have you resolved the problem? Can you help me?
|
|
|
Powered by
FUDForum. Page generated in 0.03942 seconds