addButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent e )
{
ExtendedOperation newExtendedOperation = new ExtendedOperation( getNewName() );
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() )
{
ExtendedOperation extendedOperation = ( ExtendedOperation ) selection.getFirstElement();
extendedOperations.remove( extendedOperation );
viewer.refresh();
setEditorDirty();
}