JFace databinding [message #1793534] |
Thu, 09 August 2018 16:17 |
Frank Benoit Messages: 179 Registered: July 2009 |
Senior Member |
|
|
Hi
In WindowBuilder generated code for databinding has lots of compiler warnings.
They can be silenced with @SuppressWarnings({ "rawtypes", "unchecked" })
However, i tried to see how the code can be fixed.
IObservableValue observeTextProjectObserveWidget = WidgetProperties.text(SWT.Modify).observe(txtProjectName);
IObservableValue projectModelObserveValue = BeanProperties.value("project").observe(model);
bindingContext.bindValue(observeTextProjectObserveWidget, projectModelObserveValue, null, null);
1. line, i can replace IObservableValue with ISWTObservableValue.
2. line,
IObservableValue<String> projectModelObserveValue =
BeanProperties.value(CreateNodeData.class, "project", String.class).observe(model);
here i added all types, for the result, the model type, the value type.
Still i have "Type safety: The expression of type IObservableValue needs unchecked conversion to conform to IObservableValue<String>"
how can i fix this?
regards
Frank
|
|
|
|
Powered by
FUDForum. Page generated in 0.03706 seconds