在rcp应用程序中,我创建了一个ListSelectionDialog:
final ListSelectionDialog listDialog = new ListSelectionDialog(getShell(), allElements, new ArrayContentProvider(), new LabelProvider(), ""); //$NON-NLS-1$
listDialog.setTitle("my title"); //$NON-NLS-1$
listDialog.setMessage("my msg"); //$NON-NLS-1$
listDialog.setInitialElementSelections(init);
// listDialog.setBlockOnOpen(false); does not help
int open = listDialog.open();
if (open == ListSelectionDialog.OK) {
return convertToList(listDialog.getResult());
}
当此对话框打开时,我希望能够修改对话框后面的应用程序,但这只有在我在对话框中单击“确定”后才可能。如何在对话框中按“确定”之前让用户使用该应用程序?