| Summary: | GraphicsAlgorithm properties update and IGraphicsAlgorithmRenderer repaint | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Graphiti | Reporter: | Romain Raugi <romain.raugi> | ||||
| Component: | Core | Assignee: | Michael Wenz <michael.wenz> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | michael.wenz, romain.raugi | ||||
| Version: | 0.7.0 | Flags: | michael.wenz:
indigo+
|
||||
| Target Milestone: | 0.8.0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | Indigo M4 theme_bug | ||||||
| Attachments: |
|
||||||
|
Description
Romain Raugi
Created attachment 180009 [details]
The tutorial modified to highlight the need for such requirement
Hi Michael, Although it can be seen as minor, it has a great importance for us. We cannot make our GraphicsAlgorithms automatically refreshed when our domain objects are updated. When do you think you will be able to provide a solution for this? Or do you have any idea for a workaround? Thanks a lot, Regards, Romain Hi Michael, I would prefer to extend PlatformGraphicsAlgorithm to add my custom attributes. It is a nicer way to do that. Such extension is nearly possible. A priori, only the refresh is problematic. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=330035. Thanks a lot, Regards, Romain Hi Romain, by setting this from "enhancement" to "minor" I was just reflecting that this is rather a bug than an enhancement request. From my feeling it was rather "minor" than "major", but since you require that feature you may also rise its importance. Anyway, I had a deeper look onto this and found that the missing update was caused by that old obsolete check in PictogramElementDelegate.refreshFigureForGraphicsAlgorithm you pointed out in Bugzilla 330035. I have removed that check now, so the original issue is fixed. Michael Hello Michael, It is not completely fixed yet :(. It works when a property is added or removed from the GraphicsAlgorithm's properties because the notifier is a PictogramElement. But there is still an issue when a property is simply updated: DiagramChangeListener.calculateActiveContainerPe(EObject) returns null in this case (because the notifier is a IProperty object). DiagramChangeListener.calculateActiveContainerPe(EObject) should also be updated. In my use case I use custom attributes to change colors but also other kind of IFigure properties (line style for example). As far as I understand, PictogramElementDelegate.refreshFigureColors() has for effect to refresh entirely the renderer, what is fine. Thanks Michael, Romain Of course you're perfectly right. I added a check for properties in DiagramChangeListener.calculateActiveContainerPe to update the corresponding shape. Thanks for pointing that out. Michael Hi Michael, I confirm that the fix works. Nevertheless, https://bugs.eclipse.org/bugs/show_bug.cgi?id=330035 is still a high priority. For each node, we have several custom properties and so, persisted files are much more verbose (and large) - (<properties key="..." value="..."/>*) than if these properties were declared as XML attributes. And we can have many nodes... Thanks a lot, Romain Fix was verified. We'll have a closer look into https://bugs.eclipse.org/bugs/show_bug.cgi?id=330035 and see what is possible there. Michael Part of Graphiti Indigo 0.8.0 |