Community
Participate
Working Groups
I encountered 2 problems with decorations : 1) "Image expression" can use only 3 variables ("container", "containerView" and "diagram"). We miss variables on the element we're decorating like "element" and "view" variables". Fortunately, self points to the semantic in the context. 2) When there is an error within the expression, no exception is visible in Error log view despite a call to RuntimeLoggerManager.INSTANCE.error() in DescribedDecorationDescriptorProvider and "Image not found" is displayed on the diagram.
If I may add something, I think that the default behavior should be that if the image expression evaluates to null or empty string then no decorator should be created. As for now, we have a "Not found image" in this case.
> 1) "Image expression" can use only 3 variables ("container", "containerView" > and "diagram"). > We miss variables on the element we're decorating like "element" and "view" > variables". > Fortunately, self points to the semantic in the context. Technical information: This points seems to be like bug 522193 for precondition expression.
Scenario1: * import both vsp and sample projects * open the diagram -> image not found in SOUTH_WEST.(It is normal because element variable that is used does not exists as variable). BUT, at least a message should be logged in the error log view -> image not found in NORTH_WEST.(It is normal because the expression returns null). Feature request: in that case, there should not be any decoration Scenario2: * open decoration.odesign * select a decorationDescription * hover the image Expression tooltip -> element and view variables should be available.
Created attachment 271832 [details] decoration VSP and Sample