Community
Participate
Working Groups
The DRefreshable type, defined in viewpoint.ecore, provides a single refresh() method. It is implemented by DView, all concrete DRepresentation and DRepresentationElement classes, and a lot of code seems to exist solely to support the implementation if these refresh methods. The problem is that this implementation seems completely parallel to the main refresh algorithms (for example DDiagramSynchronizer), and I doubt it correctly implements all the subtleties needed for a correct refresh (handling of mapping imports and reuses, representation extensions, layers, conditional styles, style feature customizations, etc. etc.). From what I could gather, all this mechanics only exists for historical reasons, when the refresh/synchronization logic was spread over all the representation elements types instead of centralized in the D*Synrchronizer classes. It had the nice property of supporting partial refresh on only a sub-set of a representation, but at this point it has not been actively maintained for years, and it's not clear if it works, or even if it is ever called in normal operation. More concrete details: * When called on a DRepresentation, DRefreshable.refresh() actually delegates to DialectManager.refresh(), so this case is fine, although redundant. * When called on a DRepresentationContainer, it refreshes all its valid representations (see the point above), and also removes all the ones with no/invalid target. That may be a valid operation, but it could be implemented without exposing an API in the metamodel. * For all the concrete DRepresentationElement types, each has its own refresh logic, which in most cases look like a simplified (and thus probably broken) version of what the global D*Synchronizers do. Further investigation is needed (hence this ticket), but it looks like quite a lot of code could be removed and/or simplified if indeed we can remove DRefreshabe.refresh().
I have a local commits which perform part of this cleanup, but they are not finished and need to be rebased on the current master (or more probably on master after we have switched to EMF 2.10 for the generation). The rebase itself will not be trivial given the amount of changes, so I'm not sure at all this will be ready for 2.0. I'll try make the changes incremental so that at least part of it can be in 2.0 even if all is not finished.
Moving to 4.0 as we do not want to break APIs for 3.1, especially for something like this, which is "just" a cleanup.
Moving out of the 4.0 scope for now, along with all the other issues which were there "by default". This does not mean some of these will not be re-integrated at some point, but for now these issues are not part of the roadmap for 4.0. If you feel strongly about this removal from 4.0 and/or are ready to sponsor the corresponding work, feel free to comment.
Adding to 6.0, but at a very low priority. I have a very old branch where I started work in this, if I can find the time I'll try to rebase it and finish the work.
Increasing priority: this is actually important for bugs #531396 and #531282. The DRefresable.refresh() implementations have dependencies to quite a lot of non-MM code (Session, SessionManager, DialectManager, several *Query, etc.) and are the sole reason for several *Spec classes to exist (which could thus be removed without this code).
New Gerrit change created: https://git.eclipse.org/r/121411
Gerrit change https://git.eclipse.org/r/121411 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=bf951b4a94361d0fb2117a8474dca30df49b6aea
Fixed by bf951b4a94361d0fb2117a8474dca30df49b6aea. Note that there is nothing particular to test/validate, this is an internal change which should not have any visible impact.
Technical issue
Available in Sirius 6.0.0, see https://wiki.eclipse.org/Sirius/6.0.0 for details