@Test public void testInit() { presenter.init(); verify(view).init(presenter); verify(scriptEditor).setMode(ScriptTypeMode.FLOW_CONDITION); verify(scriptEditor).addChangeHandler(any()); verify(simpleConditionEditor).addChangeHandler(any()); verifyShowSimpleConditionEditor(); assertEquals(view, presenter.getView()); }
@PostConstruct public void init() { view.init(this); scriptEditor.setMode(ScriptTypeMode.FLOW_CONDITION); scriptEditor.addChangeHandler(this::onScriptChange); simpleConditionEditor.addChangeHandler(this::onSimpleConditionChange); if (!isServiceAvailable()) { showSimpleConditionEditor(); } else { showScriptEditor(); } }
ConditionEditorFieldEditorPresenter extends FieldEditorPresenter<ScriptTypeValue> { @PostConstruct public void init() { view.init(this); scriptEditor.setMode(ScriptTypeMode.FLOW_CONDITION); scriptEditor.addChangeHandler(this::onScriptChange); simpleConditionEditor.addChangeHandler(this::onSimpleConditionChange); if (!isServiceAvailable()) { showSimpleConditionEditor(); } else { showScriptEditor(); } } }
ConditionEditorFieldEditorPresenter extends FieldEditorPresenter<ScriptTypeValue> { @PostConstruct public void init() { view.init(this); scriptEditor.setMode(ScriptTypeMode.FLOW_CONDITION); scriptEditor.addChangeHandler(this::onScriptChange); simpleConditionEditor.addChangeHandler(this::onSimpleConditionChange); if (!isServiceAvailable()) { showSimpleConditionEditor(); } else { showScriptEditor(); } } @Inject  ConditionEditorFieldEditorPresenter(final View view,
                                               final SimpleConditionEditorPresenter simpleConditionEditor,
                                               final ScriptTypeFieldEditorPresenter scriptEditor,
                                               final ErrorPopupPresenter errorPopup,
                                               final ConditionEditorParsingService conditionEditorParsingService,
                                               final ConditionEditorGeneratorService conditionEditorGeneratorService,
                                               final ClientTranslationService translationService); }
ConditionEditorFieldEditorPresenter extends FieldEditorPresenter<ScriptTypeValue> { @PostConstruct public void init() { view.init(this); scriptEditor.setMode(ScriptTypeMode.FLOW_CONDITION); scriptEditor.addChangeHandler(this::onScriptChange); simpleConditionEditor.addChangeHandler(this::onSimpleConditionChange); if (!isServiceAvailable()) { showSimpleConditionEditor(); } else { showScriptEditor(); } } @Inject  ConditionEditorFieldEditorPresenter(final View view,
                                               final SimpleConditionEditorPresenter simpleConditionEditor,
                                               final ScriptTypeFieldEditorPresenter scriptEditor,
                                               final ErrorPopupPresenter errorPopup,
                                               final ConditionEditorParsingService conditionEditorParsingService,
                                               final ConditionEditorGeneratorService conditionEditorGeneratorService,
                                               final ClientTranslationService translationService); boolean isServiceAvailable(); @PostConstruct void init(); void init(ClientSession session); @Override void setReadOnly(boolean readOnly); @Override void setValue(ScriptTypeValue value); }
ConditionEditorFieldEditorPresenter extends FieldEditorPresenter<ScriptTypeValue> { @PostConstruct public void init() { view.init(this); scriptEditor.setMode(ScriptTypeMode.FLOW_CONDITION); scriptEditor.addChangeHandler(this::onScriptChange); simpleConditionEditor.addChangeHandler(this::onSimpleConditionChange); if (!isServiceAvailable()) { showSimpleConditionEditor(); } else { showScriptEditor(); } } @Inject  ConditionEditorFieldEditorPresenter(final View view,
                                               final SimpleConditionEditorPresenter simpleConditionEditor,
                                               final ScriptTypeFieldEditorPresenter scriptEditor,
                                               final ErrorPopupPresenter errorPopup,
                                               final ConditionEditorParsingService conditionEditorParsingService,
                                               final ConditionEditorGeneratorService conditionEditorGeneratorService,
                                               final ClientTranslationService translationService); boolean isServiceAvailable(); @PostConstruct void init(); void init(ClientSession session); @Override void setReadOnly(boolean readOnly); @Override void setValue(ScriptTypeValue value);  }