public void widgetSelected( SelectionEvent e )
{
ExtendedOperationDialog dialog = new ExtendedOperationDialog( extendedOperations );
if ( Dialog.OK == dialog.open() )
{
ExtendedOperationEnum newExtendedOperation = dialog.getExtendedOperation();
extendedOperations.add( newExtendedOperation );
viewer.refresh();
viewer.setSelection( new StructuredSelection( newExtendedOperation ) );
setEditorDirty();
}
}
} );
deleteButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent e )
{
StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
if ( !selection.isEmpty() )
{
ExtendedOperationEnum extendedOperation = ( ExtendedOperationEnum ) selection.getFirstElement();
extendedOperations.remove( extendedOperation );
viewer.refresh();
setEditorDirty();
}