EditorAccess access = EditorAccess.root(subEditorType); EditorData subEditor = new EditorData.Builder(logger).access(access).parent( editorSoFar).build(); List<EditorData> accumulator = new ArrayList<EditorData>(); descendIntoSubEditor(accumulator, subEditor);
EditorAccess access = EditorAccess.root(subEditorType); EditorData subEditor = new EditorData.Builder(logger).access(access).parent( editorSoFar).build(); List<EditorData> accumulator = new ArrayList<EditorData>(); descendIntoSubEditor(accumulator, subEditor);
private List<EditorData> createEditorData(EditorAccess access) throws UnableToCompleteException { TreeLogger subLogger = logger.branch(TreeLogger.DEBUG, "Examining " + access.toString()); List<EditorData> toReturn = new ArrayList<EditorData>(); // Are we looking at a view that implements IsEditor? if (access.isEditor()) { EditorAccess subAccess = EditorAccess.via(access, calculateIsEditedType(subLogger, access.getEditorType())); toReturn = createEditorData(subAccess); // If an object only implements IsEditor, return now if (!editorIntf.isAssignableFrom(access.getEditorType())) { return toReturn; } } // Determine the Foo in Editor<Foo> JClassType expectedToEdit = calculateEditedType(subLogger, access.getEditorType()); EditorData.Builder builder = new EditorData.Builder(subLogger); builder.access(access); builder.parent(editorSoFar); // Find the bean methods on the proxy interface findBeanPropertyMethods(access.getPath(), expectedToEdit, builder); toReturn.add(builder.build()); return toReturn; }
private List<EditorData> createEditorData(EditorAccess access) throws UnableToCompleteException { TreeLogger subLogger = logger.branch(TreeLogger.DEBUG, "Examining " + access.toString()); List<EditorData> toReturn = new ArrayList<EditorData>(); // Are we looking at a view that implements IsEditor? if (access.isEditor()) { EditorAccess subAccess = EditorAccess.via(access, calculateIsEditedType(subLogger, access.getEditorType())); toReturn = createEditorData(subAccess); // If an object only implements IsEditor, return now if (!editorIntf.isAssignableFrom(access.getEditorType())) { return toReturn; } } // Determine the Foo in Editor<Foo> JClassType expectedToEdit = calculateEditedType(subLogger, access.getEditorType()); EditorData.Builder builder = new EditorData.Builder(subLogger); builder.access(access); builder.parent(editorSoFar); // Find the bean methods on the proxy interface findBeanPropertyMethods(access.getPath(), expectedToEdit, builder); toReturn.add(builder.build()); return toReturn; }
public EditorData build() throws UnableToCompleteException { if (data == null) { throw new IllegalStateException(); } try { data.editorExpression = (parent == null ? "" : (parent.getExpression() + ".")) + access.getExpresson(); data.path = (parent == null ? "" : (parent.getPath() + ".")) + access.getPath(); if (data.isCompositeEditor) { TreeLogger compositeLogger = logger.branch(TreeLogger.DEBUG, "Examining composite editor at " + data.path); JClassType subEditorType = EditorModel.calculateCompositeTypes(data.editorType)[1]; data.composedData = new Builder(compositeLogger).access( EditorAccess.root(subEditorType)).parent(data).build(); } return data; } finally { data = null; } }
public EditorData build() throws UnableToCompleteException { if (data == null) { throw new IllegalStateException(); } try { data.editorExpression = (parent == null ? "" : (parent.getExpression() + ".")) + access.getExpresson(); data.path = (parent == null ? "" : (parent.getPath() + ".")) + access.getPath(); if (data.isCompositeEditor) { TreeLogger compositeLogger = logger.branch(TreeLogger.DEBUG, "Examining composite editor at " + data.path); JClassType subEditorType = EditorModel.calculateCompositeTypes(data.editorType)[1]; data.composedData = new Builder(compositeLogger).access( EditorAccess.root(subEditorType)).parent(data).build(); } return data; } finally { data = null; } }
public EditorData getRootData() throws UnableToCompleteException { TreeLogger rootLogger = logger.branch(TreeLogger.DEBUG, "Calculating root data for " + getEditorType().getParameterizedQualifiedSourceName()); return new EditorData.Builder(rootLogger).access( EditorAccess.root(getEditorType())).build(); }
public EditorData getRootData() throws UnableToCompleteException { TreeLogger rootLogger = logger.branch(TreeLogger.DEBUG, "Calculating root data for " + getEditorType().getParameterizedQualifiedSourceName()); return new EditorData.Builder(rootLogger).access( EditorAccess.root(getEditorType())).build(); }