Can anybody point me to an example which is dealing with Databinding of jface viewers with the ViewersObservables.observeInput(Viewer)?

Am looking to update the contents of a viewer (the items in the comboviewer) with some dynamic content (new set of items to the comboviewer)

Any pointers is much apreciated..

有帮助吗?

解决方案

I can provide a bit of my (working code):

libraryPathsObservable = BeansObservables.observeDetailValue(selectedToolkit, "libraryPath", Object.class);
bindingContext.bindValue(ViewersObservables.observeInput(libraryPaths), libraryPathsObservable);

Contents provider for libraryPath is ArrayContentProvider and selectedToolkit.getLibraryPath actually returns String[]

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top