Community
Participate
Working Groups
Currently, XWT will instantiate all types internally. It is obvious that instantiating (or being able to instantiate) types through the DI will add extra benefits. XWT could provide a switch to do this or do this automatically when a 'type factory' is provided in the options, e.g.: options.put("XWT.TypeFactory", eclipseContextTypeFactory); XWT.loadWithOptions(options); eclipseContextTypeFactory must provide a mechanism to instantiate a class on its own. For example, this could use the ContextFactory of e4 to instantiate the type...
It should also be possible to inject the named bindings, e.g.: <Composite x:Class="com.example.MyHandler"> <Button x:Name="myButton" SelectionEvent="handleButton" /> </Composite> class MyHandler { @Inject @Named("myButton") Button myButton; void handleButton() { ... } }