eclipse.platform.ui
eclipse.platform.ui copied to clipboard
[e4] support injection of Optionals
Currently one can use @org.eclipse.e4.core.di.annotations.Optional to mark a parameter as optional. This has the drawback that one has do perform always a null-check (that might be overlooked) and need to import e4 specific annotation.
A more convenient way would be to have a parameter of Optional<TypeToInject> instead, that do not needs any special annotation and ensures the usual map functions and accessory can be used.