/** * @param accumulator * @param data * @throws UnableToCompleteException */ private void descendIntoSubEditor(List<EditorData> accumulator, EditorData data) throws UnableToCompleteException { EditorModel superModel = parentModel; while (superModel != null) { if (superModel.editorType.isAssignableFrom(data.getEditorType()) || data.getEditorType().isAssignableFrom(superModel.editorType)) { poison(cycleErrorMessage(data.getEditorType(), superModel.getPath(), data.getPath())); return; } superModel = superModel.parentModel; } if (data.isDelegateRequired()) { EditorModel subModel = new EditorModel(this, data.getEditorType(), data, calculateEditedType(logger, data.getEditorType())); accumulator.addAll(accumulator.indexOf(data) + 1, Arrays.asList(subModel.getEditorData())); poisoned |= subModel.poisoned; } }
/** * @param accumulator * @param data * @throws UnableToCompleteException */ private void descendIntoSubEditor(List<EditorData> accumulator, EditorData data) throws UnableToCompleteException { EditorModel superModel = parentModel; while (superModel != null) { if (superModel.editorType.isAssignableFrom(data.getEditorType()) || data.getEditorType().isAssignableFrom(superModel.editorType)) { poison(cycleErrorMessage(data.getEditorType(), superModel.getPath(), data.getPath())); return; } superModel = superModel.parentModel; } if (data.isDelegateRequired()) { EditorModel subModel = new EditorModel(this, data.getEditorType(), data, calculateEditedType(logger, data.getEditorType())); accumulator.addAll(accumulator.indexOf(data) + 1, Arrays.asList(subModel.getEditorData())); poisoned |= subModel.poisoned; } }