/**
* Since OK was pressed, write widget values to the dialog store so that
* they will persist into the next invocation of this dialog
*/
protected void saveWidgetValues() {
IDialogSettings settings = getDialogSettings();
// Collect the ids of the all expanded categories
Object[] expandedElements = tree.getExpandedElements();
String[] expandedCategoryIds = new String[expandedElements.length];
for (int i = 0; i < expandedElements.length; ++i)
expandedCategoryIds[i] = ((OperationCategory) expandedElements[i]).getId();
// Save them for next time.
settings.put(STORE_EXPANDED_CATEGORIES_ID, expandedCategoryIds);
String selectedOperationID = ""; //$NON-NLS-1$
if (opActions.length > 0) {
// in the case of a multi-selection, it's probably less confusing
// to store just the first rather than the whole multi-selection
selectedOperationID = opActions[0].getId();
}
settings.put(STORE_SELECTED_OPERATION_ID, selectedOperationID);
}