// remove already selected items
for (DataSeries s : selectedSeries)
list.remove(s);
ListSelectionDialog dialog = new ListSelectionDialog(getShell(), new DataSeriesLabelProvider());
dialog.setTitle(Messages.ChartSeriesPickerTitle);
dialog.setMessage(Messages.ChartSeriesPickerTitle);
dialog.setElements(list);
if (dialog.open() != ListSelectionDialog.OK)
return;
Object[] result = dialog.getResult();
if (result == null || result.length == 0)
return;
for (Object object : result)
{