I am trying to convert some values from integers to strings using a converter.
observerViewerValue = ViewerProperties.input().observe(tableViewer);
UpdateValueStrategy strategy = new UpdateValueStrategy();
strategy.setConverter(new ItemConverter());
IObservableValue observeItemValue = props[0].observe(peopleList);
bindingContext.bindValue(observerViewerValue, observeItemValue, strategy, strategy);
tableViewer.setInput(peopleList);
it doesn't like the fact that it has been given a list, I tried iterating through and doing:
IObservableValue observeItemValue = props[0].observe(peopleList.get(i));
where i is the index, no exceptions are thrown but the values aren't converted. props[0]
just contains the property that will be watched.
I ended up overriding the
ObservableMapLabelProvider
and adding the converter in thegetColumnText
method, it did the trick...