Action (DialogWrapper dialogWrapper) { Action builtinAction = getBuiltinAction((MyDialogWrapper)dialogWrapper); if (myText != null) builtinAction.putValue(Action.NAME, myText); return builtinAction; }