Change SymbolProviderFactory implementation identity to be based on diagram types, not diagram instances
Currently the Symbols view (PageBookView
) will construct a separate page for every single diagram editor. This makes way for a bad user experience since the user will have separate Symbols-view state for every single diagram editor instead of being able to share what's open and filtered into sight between same type of diagrams.
At the moment diagram instances are used in the identity of SymbolProviderFactory implementations. This is done because the SymbolContributionFilter implementations receive the diagram instance as parameter, giving the filters the possibility to do instance-specific tricks to filter out symbols from current contributions. This possibility is currently not used anywhere and all filters are essentially based on comparing the diagram types to something.
Using the diagram types (ReadGraph.getPrincipalTypes(diagram)
or ReadGraph.getTypes(diagram)
) for the identity of SymbolProviderFactory
implementations instead of diagram
will do the trick. But it must be noted that making this change will destroy the possibility to have completely diagram-specific filtering which is not obvious to symbol filter contributions and should be documented in the API.