@Override public <Q> void endVisit(EditorContext<Q> ctx) { // Flush ValueAware editors ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); AbstractEditorDelegate<?, ?> delegate; if (ctx.getEditorDelegate() == null) { delegate = delegateStack.peek(); } else { delegate = delegateStack.pop(); } assert delegate != null; if (asValue != null) { if (delegate.shouldFlush()) { asValue.flush(); } } // Pull value from LeafValueEditors and update edited object LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (delegate.shouldFlush() && asLeaf != null && ctx.canSetInModel()) { ctx.setInModel(asLeaf.getValue()); } }
@Override public <Q> void endVisit(EditorContext<Q> ctx) { // Flush ValueAware editors ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); AbstractEditorDelegate<?, ?> delegate; if (ctx.getEditorDelegate() == null) { delegate = delegateStack.peek(); } else { delegate = delegateStack.pop(); } assert delegate != null; if (asValue != null) { if (delegate.shouldFlush()) { asValue.flush(); } } // Pull value from LeafValueEditors and update edited object LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (delegate.shouldFlush() && asLeaf != null && ctx.canSetInModel()) { ctx.setInModel(asLeaf.getValue()); } }
@Override public <Q> void endVisit(EditorContext<Q> ctx) { // Flush ValueAware editors ValueAwareEditor<Q> asValue = ctx.asValueAwareEditor(); AbstractEditorDelegate<?, ?> delegate; if (ctx.getEditorDelegate() == null) { delegate = delegateStack.peek(); } else { delegate = delegateStack.pop(); } assert delegate != null; if (asValue != null) { if (delegate.shouldFlush()) { asValue.flush(); } } // Pull value from LeafValueEditors and update edited object LeafValueEditor<Q> asLeaf = ctx.asLeafValueEditor(); if (delegate.shouldFlush() && asLeaf != null && ctx.canSetInModel()) { ctx.setInModel(asLeaf.getValue()); } }