createFactRows( toolkit,
composite );
}
protected void addDeleteAction() {
ImageHyperlink delWholeLink = addImage( parent,
"icons/delete_obj.gif" );
delWholeLink.addHyperlinkListener( new IHyperlinkListener() {
public void linkActivated(HyperlinkEvent e) {
MessageBox dialog = new MessageBox( Display.getCurrent().getActiveShell(),
SWT.YES | SWT.NO | SWT.ICON_WARNING );
dialog.setMessage( "Remove this ENTIRE condition, " + "and all the field constraints that belong to it." );
dialog.setText( "Remove this entire condition?" );
if ( dialog.open() == SWT.YES ) {
if ( getModeller().getModel().removeLhsItem( index ) ) {
getModeller().reloadLhs();
getModeller().setDirty( true );
} else {
showMessage( "Can't remove that item as it is used in the action part of the rule." );
}
}
}
public void linkEntered(HyperlinkEvent e) {
}
public void linkExited(HyperlinkEvent e) {
}
} );
delWholeLink.setToolTipText( "Remove the entire composite condition." );
}