Source:
<code>public <START> DRepresentationDescriptor createRepresentation(final <END> String name, final EObject semantic, final RepresentationDescription description, final Session session, final IProgressMonitor monitor) { DRepresentation diagram = null; DRepresentationDescriptor representationDescriptor = null; try { monitor.beginTask(MessageFormat.format(Messages.DiagramDialectServices_createDiagramMsg, name), 6); monitor.subTask(MessageFormat.format(Messages.DiagramDialectServices_createDiagramMsg, name)); diagram = createRepresentation(name, semantic, description, new SubProgressMonitor(monitor, 2)); if (diagram != null) { DialectManager.INSTANCE.refresh(diagram, new SubProgressMonitor(monitor, 26)); if (DisplayMode.NORMAL.equals(DisplayServiceManager.INSTANCE.getMode())) { DisplayServiceManager.INSTANCE.getDisplayService().refreshAllElementsVisibility((DDiagram) diagram); monitor.worked(1); } representationDescriptor = RepresentationsHelper.createDRepresentationDescriptor(diagram, (DAnalysisSessionImpl) session, semantic.eResource(), name); monitor.worked(1); Diagram gmfDiag = DiagramDialectServices.createAndStoreGMFDiagram(session, (DSemanticDiagram) diagram); monitor.worked(1); CanonicalSynchronizer canonicalSynchronizer = CanonicalSynchronizerFactory.INSTANCE.createCanonicalSynchronizer(gmfDiag); canonicalSynchronizer.storeViewsToArrange(true); canonicalSynchronizer.synchronize(); canonicalSynchronizer.postCreation(); monitor.worked(10); } } finally { monitor.done(); } return representationDescriptor; }</code><technical_language>is necessary change return type? copyRepresentation return a DRep createRepresentation(final String name, final EObject semantic, final RepresentationDescription description, final IProgressMonitor monitor) returns a DRep rate, break TransientLayerAndDecoratorTest tests of cast wil adapt more Capella code</technical_language>

Target:
public DRepresentation createRepresentation(final String name, final EObject semantic, final RepresentationDescription description, final Session session, final IProgressMonitor monitor) { DRepresentation diagram = null; try { monitor.beginTask(MessageFormat.format(Messages.DiagramDialectServices_createDiagramMsg, name), 6); monitor.subTask(MessageFormat.format(Messages.DiagramDialectServices_createDiagramMsg, name)); diagram = createRepresentation(name, semantic, description, new SubProgressMonitor(monitor, 2)); if (diagram != null) { DialectManager.INSTANCE.refresh(diagram, new SubProgressMonitor(monitor, 26)); if (DisplayMode.NORMAL.equals(DisplayServiceManager.INSTANCE.getMode())) { DisplayServiceManager.INSTANCE.getDisplayService().refreshAllElementsVisibility((DDiagram) diagram); monitor.worked(1); } DRepresentationDescriptorInternalHelper.createDRepresentationDescriptor(diagram, (DAnalysisSessionImpl) session, semantic.eResource(), name); monitor.worked(1); Diagram gmfDiag = DiagramDialectServices.createAndStoreGMFDiagram(session, (DSemanticDiagram) diagram); monitor.worked(1); CanonicalSynchronizer canonicalSynchronizer = CanonicalSynchronizerFactory.INSTANCE.createCanonicalSynchronizer(gmfDiag); canonicalSynchronizer.storeViewsToArrange(true); canonicalSynchronizer.synchronize(); canonicalSynchronizer.postCreation(); monitor.worked(10); } } finally { monitor.done(); } return diagram; }