class SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> {

    @Override
    public void setValue(Condition value) {
        super.setValue(value);
        clear();
        if (value != null) {
            if (value.getParams().size() >= 1) {
                String type = variableSearchService.getOptionType(value.getParams().get(0));
                if (type != null) {
                    functionSearchService.reload(type, () -> onSetValue(value));
                } else {
                    view.setVariableError(translationService.getValue(VARIABLE_NOT_FOUND_ERROR, value.getParams().get(0)));
                }
            } else {
                //uncommon case
                view.setConditionError(translationService.getValue(CONDITION_MAL_FORMED));
            }
        }
    }

    @Inject public  SimpleConditionEditorPresenter(final View view,
                                          final ManagedInstance<ConditionParamPresenter> paramInstance,
                                          final VariableSearchService variableSearchService,
                                          final FunctionSearchService functionSearchService,
                                          final FunctionNamingService functionNamingService,
                                          final ClientTranslationService translationService);

}