void (Presentation presentation, int toImplement, int toOverride) { if (toImplement > 0) { presentation.setEnabledAndVisible(true); presentation.setText(toImplement == 1 ? JavaBundle.message("action.implement.method") : JavaBundle.message("action.implement.methods")); } else { presentation.setEnabledAndVisible(false); } }