|
Re: Refreshing diagram nodes based on preference change [message #1854706 is a reply to message #1854641] |
Fri, 02 September 2022 22:04 |
|
Hi Jonathan,
There is a second refresh method with a boolean parameter to force a full refresh of diagram elements: refresh(DRepresentation, boolean, IProgressMonitor). I think that should solve your issue.
Usually these kinds of graphical settings are on a diagram level rather on a global level, but I guess here is would depend on how regularly the users would change this preference. I am just mentioning this in case you did not consider having the decorator and the number format change (as a property customization) in a different layer. That would allow to choose it on each diagram without any preference.
Best regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
Re: Refreshing diagram nodes based on preference change [message #1854945 is a reply to message #1854834] |
Mon, 19 September 2022 23:53 |
Jonathan Menzies Messages: 60 Registered: May 2020 Location: California |
Member |
|
|
Hi Steve,
So I went back through the code, we have a style configuration that extends SimpleStyleConfiguration using the "org.eclipse.sirius.diagram.styleConfigurationProvider" extension point. We have an edit part that extends AbstractNotSelectableShapeNodeEditPart, a policy provider that implements IEditPolicyProvider. And then our figures are based on the draw2d Shape class and hooked into the relevant EditPart. As far as I can see all of them are hooked up fine but when I refresh using the method it hits none of the methods on any of them.
Edit: Is there a debug path or anything I can check to see if it's just not hitting the right things on our end ? For example when I run the refresh, what should be getting hit on the edit parts ?
Cheers
Jonathan
[Updated on: Mon, 19 September 2022 23:56] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04393 seconds