Community
Participate
Working Groups
After validating a VSM, I get the following problem: Description Resource Type Path Location Invalid Type: viewpoint::DragAndDropTarget My.odesign EMF Problem /fr.obeo.test.mm.design/description Unknown The validation do not use the correct type as context. The switch used to compute the type must be checked. Note that completion proposals show thisEObject typed by the mapping domain class: ok To reproduce: . create a diagram description on EPackage . create all possible mappings: Container, Node, sub Node, bordered nodes with semantic expression: var:self and domainClass: EClass. . in the mapping precondition fields, use the completion to enter [abstract/] . Right clic the Viewpoint and select Validate. Note: additional check should be done with feature:abstract to test another interpreter. Note: org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionTargetSwitch.caseAbstractNodeMapping(AbstractNodeMapping) seems to correctly handle the precondition case. Check the feature/feaature id computation.
Created attachment 248197 [details] viewpoint to reproduce the bug Screen shot of the viewpoint with the properties (General and Advanced)and the Error Log of the container
Hi, I think I have the same kind of bug. I'm trying to migrate my viewpoint form obeodesigner 6.2 to Sirius. I have some acceleo request which used to work on od6.2, but don't work anymore with Sirius. I have a container with a precondition expression. Whatever I put in the precondition expression, I have an error. For exemple, with this request : [thisEObject.isAllocatedByComponent->size()=0/] I have this error : Compilation error for expression [thisEObject.isAllocatedByComponent->size()=0/] : Invalid Type: viewpoint::DragAndDropTarget The end of the error (Invalid Type: viewpoint::DragAndDropTarget) is always the same, it's not depending on the request. For reproduce, create a diagram with a container and a precondition expression (see pictures in attachment).
In diagram.ecore 1 229: <details key="containerView" value="viewpoint.DragAndDropTarget | the view that sould contain the potential views of the checked elements."/> The viewpoint.DragAndDropTarget correspond to the qualified name before the metamodel split into viewpoint.ecore and diagram.ecore (Bug 423052 and Bug 427803), the correct qualified name is diagram.DragAndDropTarget. We have to check the other eAnnotations.
See https://git.eclipse.org/r/36108 which complete the tests done on the interpreted expression definitions. containerView:viewpoint.DragAndDropTarget for description/DiagramElementMapping/preconditionExpression is the only reported type error. But I have discovered some other variable potential errors for the accessible packages: several variables diagram:diagram.DDiagram are defined in the interpreted expression of viewpoint.ecore, they should not not reference a metamodel extending the core metamodel. Those expression are only used in the Diagram dialect for the moment but this could be a future issue (I will report a specific bug to track this).
See https://git.eclipse.org/r/36119 for a correction of the validation issue.
Correction submitted in commit e85c9b2593010ff337023f5b614b716730c7d001
Cloned as bug 453056 to backport for 2.0.2.