Community
Participate
Working Groups
We should change the registration of adapters within IAdaptable from using a simple class key to an explicit AdapterKey, which consists of a Class key and an (optional) String or Object qualifier. As soon as more than one adapter is bound to a class key, the qualifier should be mandatory, while it should still be possible to bind a single adapter without the need to provide a qualifier (a default qualifier could be used in this case). This way, adapter instances could be bound to the same class key but in different roles. This could e.g. be used to bind viewers as adapters to the domain (qualifying one as the "main" viewer and another one as the "palette" viewer, etc.) or registering selection feedback and selection handle geometry providers as adapter on visual parts or related behaviors.
Just an addition: This would also enable us to register different policies under the same class key but with different roles (e.g. different drag policies). The tools could decide whether they want to access all policies registered under a respective class key or just a specific one.
Revised IAdaptable and related AdapterMap bindings to use AdaperKeys rather than class keys for registering and retrieving adapters. Pushed all changes to origin/master. Resolving as fixed.