Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 453119

Summary: Add support for registering and querying adapters via type literals.
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF CommonAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M4   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 452677    

Description Alexander Nyßen CLA 2014-11-24 16:15:38 EST
Currently, adapter keys can only be based on classes, i.e. using parameterized types is not possible. We should add support for using type literals (as offered by Google Guice) as adapter keys, so parameterized types may be used as well. This would allow to differentiate a 'Provider<IFXAdapter>' adapter key from a 'Provider<IGeometry>' one. Up to now, only the raw type 'Provider' can be used within an adapter key.
Comment 1 Alexander Nyßen CLA 2014-11-28 05:38:57 EST
Added support for registering und retrieving adapters via com.google.common.reflect.TypeTokens, which allows to use parameterized types as well. Added tests to (newly created) org.eclipse.gef4.common.tests bundle to demonstrate the behavior. 

All changes pushed to origin/master. Resolving as fixed in 3.10.0M4.