Frage

i try to display a dialog for selection the fields of a source. i like to use the ListSelectionDialog, but i'm not sure what to use for the input parameter. all the examples in the web uses the ResourcesPlugin.getWorkspace().getRoot() as input and yeah, all the projects are displayed. but i have a list of Fields (IField[]) that i want to show for selection. the constructor of ListSelectionDialog accept the parameter, but the dialog shows nothing... :( does anybody has an idea? thanks a lot! Sven

War es hilfreich?

Lösung

I don't think using BaseWorkbenchContentProvider is right. Try ArrayContentProvider.

So something like:

new ListSelectionDialog(shell, fields, new ArrayContentProvider(), labelProvider, msg);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top