-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AQL is not interpreted correctly in style customizations for image workspacePath
#865
Comments
Required application data pins have a black bar on the right side. Provided ones keep the bar on the left. This commit also refactors the style customizations to use a service and a more predictable pattern of finding the right image. In the end, the number of style customizations required for this feature is down from 8 to 1 and most of the complexity is handled in the metamodel's service which concatenates the path for a single pin. The same logic is used for changing the image for the computed data pin. Due to a bug in Sirius Components, AQL does not work correctly in style customizations. This means this change breaks images in Sirius Web. See eclipse-sirius/sirius-web#865 Related to #24
This reverts commit e97d2fd. It breaks Sirius Web due to a bug in Sirius Components: eclipse-sirius/sirius-web#865 Related to #24
It looks like in: we should interpret the value as an AQL expression instead of using it raw. See for the reference behavior in Sirius Desktop. |
@Gelio can you try your use case with // @formatter:off
String workspacePath = this.eAttributeCustomizationProvider.getEAttributeCustomization(this.workspaceImageDescription, WORKSPACE_PATH)
.map(EAttributeCustomization::getValue)
.flatMap(expression -> this.interpreter.evaluateExpression(this.variableManager.getVariables(), expression).asString())
.orElse(this.workspaceImageDescription.getWorkspacePath());
// @formatter:on in |
@pcdavid Sorry, I don't have my own fork of sirius-components set up to be consumed in Sirius Web. I am only using the public version of sirius-components. I don't have the bandwidth right now to set up a fork to test it out |
EAttributeCustomization.value is defined as an InterpretedExpression in the Sirius Desktop metamodal, and should be interpreted as such. Bug: #865 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
EAttributeCustomization.value is defined as an InterpretedExpression in the Sirius Desktop metamodel, and should be interpreted as such. Bug: #865 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
EAttributeCustomization.value is defined as an InterpretedExpression in the Sirius Desktop metamodel, and should be interpreted as such. Bug: #865 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
@Gelio the fix mentioned in my earlier comment should now be available starting from version 2021.12.6. Could you confirm if it fixes the issue for you? |
There were some pretty heavy changes since the last time I updated my fork of sirius-web. I have just spent 1.5h trying to apply those 20 commits, but I probably messed something up, as I missed the changes from some of the commits. I don't have the bandwidth right now to redo the process. |
This re-applies commit e97d2fd (which was reverted in a8fc6c6) since eclipse-sirius/sirius-web#865 was fixed. Use dynamic logic to compute data pin icon paths instead of hardcoding style customizations for each possible configuration of data-multiplicity and token-multiplicity (and provided/required for application data pins). This simplifies the metamodel a bit.
This re-applies commit e97d2fd (which was reverted in a8fc6c6) since eclipse-sirius/sirius-web#865 was fixed. Use dynamic logic to compute data pin icon paths instead of hardcoding style customizations for each possible configuration of data-multiplicity and token-multiplicity (and provided/required for application data pins). This simplifies the metamodel a bit.
Good news, thanks for your feedback! |
Screenshots
Some of my style customizations in the odesign file use AQL. An example style customization:
getDataPinIconPath
is defined in my metamodel'sServices
.It works well in Sirius Desktop:
But there are no images shown in Sirius Web:
The image path that Sirius Web wants to load is:
whereas it should be:
Steps to reproduce
workspacePath
of an image of a nodeExpected behavior
The image is loaded correctly using the same logic as in Sirius Desktop.
Actual behavior
The image is not loaded due to a malformed URL.
The text was updated successfully, but these errors were encountered: