Improved handling of multiple and big diagrams
hallvard opened this issue · 0 comments
Today's design only allows a DiagramTextProvider to contribute one diagram and will need to produce it completely. It can neither contribute several (alternative) diagrams or do it lazily. There is a need to separate the contribution of the actual diagram from the ability/intention to contribute one or more diagrams (and allow the user to select which).
The current idea is to introduce a DiagramInfo object with information about a diagram that may be provided, with methods for getting meta-data about the diagram and the actual diagram text. This allows the diagram to be computed lazily. Another interface DiagramInfoProvider and corresponding extension will allow to provide a collection of DiagramInfo objects for a specific editor and selection. The old DiagramTextProvider can be wrapped in a DiagramInfoProvider to support existing extensions.
If several diagrams (or DiagramInfo) objects are available, one can be provided by default (perhaps based on priority) and the user should be able to select an alternative one. The DiagramInfo object should contain enough meta-data to give a good UX, e.g. label text and/or icon.