Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » JFace databinding(WindowBuilders generated code has warning)
JFace databinding [message #1793534] Thu, 09 August 2018 16:17 Go to next message
Frank Benoit is currently offline Frank BenoitFriend
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
Re: JFace databinding [message #1793540 is a reply to message #1793534] Thu, 09 August 2018 18:10 Go to previous message
Frank Benoit is currently offline Frank BenoitFriend
Messages: 179
Registered: July 2009
Senior Member
I just found this thread on platform-ui-dev mailing list
Seems it is really not possible due to the half way implementation. :-(
Previous Topic:Where to get Jface source code including compile information
Next Topic:JFace Action that supports drop-down AND checkbox
Goto Forum:
  


Current Time: Fri Mar 29 10:41:23 GMT 2024

Powered by FUDForum. Page generated in 0.03046 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top