Closed steghoja closed 4 years ago
I've looked through the commit and it seems very reasonable. What's troubling me is backwards compatibility, others that may have implemented DiagramTextProvider shouldn't have to change anything. So I'll try making a similar change, without affecting existing code. But thanks for the PR, I'll use it as a reference!
This commit generalises how PlantUml handles diagram generation. It now attaches the
DiagramTextChangedListener
not only to editors but also to views. This allows generating diagrams also when elements in, e.g., the Project Explorer are selected. Since the generation is still handled byDiagramTextProvider
instances, this should have no impact on existing code but allows more flexibility for new use cases. The code also somewhat simplifies the handling of the parts internally, but this needs to be further tested.