return promptToSaveMultiple(dirtyParts);
}
private Save[] promptToSaveMultiple(Collection<MPart> dirtyParts)
{
CheckedListSelectionDialog dialog = new CheckedListSelectionDialog(Display.getDefault().getActiveShell(),
new PartLabelProvider());
dialog.setTitle(Messages.SaveHandlerTitle);
dialog.setMessage(Messages.SaveHandlerMsgSelectFileToSave);
dialog.setElements(dirtyParts);
int returnCode = dialog.open();
Save[] answer = new Save[dirtyParts.size()];
if (returnCode == Dialog.OK)
{
Arrays.fill(answer, Save.NO);
if (dialog.getResult() != null)
{
List<MPart> parts = new ArrayList<MPart>(dirtyParts);
for (Object toBeSaved : dialog.getResult())
answer[parts.indexOf(toBeSaved)] = Save.YES;
}
}
else if (returnCode == Dialog.CANCEL)
{