// Attach the same symbol contributions to the created typical\r
// diagram type as are attached to the model-designated\r
// contribution source diagram type.\r
+ boolean clonedIndexRootContribution = false;\r
for (Resource symbolContributionSource : cloneSymbolContributionsFrom) {\r
for (Resource contribution : graph.getObjects(symbolContributionSource, DIA.HasSymbolContribution)) {\r
graph.claim(diagramType, DIA.HasSymbolContribution, contribution);\r
+ clonedIndexRootContribution |= graph.isInstanceOf(contribution, DIA.IndexRootSymbolContribution);\r
}\r
}\r
\r
- Resource indexContribution = graph.newResource();\r
- graph.claim(indexContribution, L0.InstanceOf, DIA.IndexRootSymbolContribution);\r
- graph.claim(diagramType, DIA.HasSymbolContribution, indexContribution);\r
+ if (!clonedIndexRootContribution) {\r
+ Resource indexContribution = graph.newResource();\r
+ graph.claim(indexContribution, L0.InstanceOf, DIA.IndexRootSymbolContribution);\r
+ graph.claim(diagramType, DIA.HasSymbolContribution, indexContribution);\r
+ }\r
\r
// Add comment to change set.\r
CommentMetadata cm = graph.getMetadata(CommentMetadata.class);\r