if (action != null && action.isEnabled()) {
action.runWithEvent(event );
}
}
};
toolAction.addPropertyChangeListener(new IPropertyChangeListener(){
public void propertyChange( PropertyChangeEvent event ) {
if( event.getProperty().equals(IAction.ENABLED)){
toolAction.setEnabled((Boolean) event.getNewValue());
}