void () { boolean enabled = myRealAction.isEnabled(myDialog); setEnabled(enabled); putValue(Action.NAME, myRealAction.getText(myDialog, enabled)); putValue(Action.SHORT_DESCRIPTION, myRealAction.getDescription(myDialog, enabled)); }