GWT:编辑器框架要求使用Has/Setter方法

GWT:编辑器框架要求使用Has/Setter方法,gwt,gwt-editors,Gwt,Gwt Editors,我创建了一个编辑器,其中包含一些编辑嵌套字段的子编辑器,但gwt抱怨它需要has/setter方法 这是我的编辑器代码。CompInfo类有一个UIInfo。在UIInfo类中,displayName只是一个字符串。我已经有了setter方法,但它仍然在抱怨 // top level editors @UiField @Path("attrName") TextField attributeName; @UiField @Path("compName") TextField componentN

我创建了一个编辑器,其中包含一些编辑嵌套字段的子编辑器,但gwt抱怨它需要has/setter方法

这是我的编辑器代码。CompInfo类有一个UIInfo。在UIInfo类中,displayName只是一个字符串。我已经有了setter方法,但它仍然在抱怨

// top level editors
@UiField @Path("attrName") TextField attributeName;
@UiField @Path("compName") TextField componentName;
@UiField @Path("compInterfaceName") TextField interfaceName;
@UiField @Path("compType") TextField componentType;
@UiField TextField defaultValue;
@UiField @Path("auxData") TextField crossReference;
@UiField BooleanToggleButton nonUserComponent;
@UiField BooleanToggleButton mandatory;
@UiField TextField annotation;
// ui info editor
@UiField @Path("UIInfo.disabled") CheckBox uiDisabled;
@UiField @Path("UIInfo.displayName") TextField uiDisplayName;
以下是错误:

[ERROR] [onboardingtool] - Errors in 'generated://03A84A085FC6AAD2AC9A5323F65AA50F/com/algorithmics/mdc/client/widget/CompInfoEditor_UIInfo_displayName_Context.java'
[ERROR] [onboardingtool] - Line 17: The method hasDisplayName() is undefined for the type String
[ERROR] [onboardingtool] - Line 20: The method setDisplayName(String) is undefined for the type String
以下是它生成的代码:

public class CompInfoEditor_UIInfo_displayName_Context extends com.google.gwt.editor.client.impl.AbstractEditorContext<java.lang.String> {
  private final com.algorithmics.uds.dmob.input.CompInfo parent;
  public CompInfoEditor_UIInfo_displayName_Context(com.algorithmics.uds.dmob.input.CompInfo parent, com.google.gwt.editor.client.Editor<java.lang.String> editor, String path) {
    super(editor,path);
    this.parent = parent;
  }
  @Override public boolean canSetInModel() {
    return parent != null && true && parent.getUIInfo() != null && parent.getUIInfo().getDisplayName() != null;
  }
  @Override public java.lang.String checkAssignment(Object value) {
    return (java.lang.String) value;
  }
  @Override public Class getEditedType() { return java.lang.String.class; }
  @Override public java.lang.String getFromModel() {
    return (parent != null && parent.getUIInfo() != null && parent.getUIInfo().getDisplayName() != null) ? parent.getUIInfo().getDisplayName().hasDisplayName() : null;
  }
  @Override public void setInModel(java.lang.String data) {
    parent.getUIInfo().getDisplayName().setDisplayName(data);
  }
}
更新:

我的UIInfo类有setDisplayName、getDisplayName和hasDisplayName方法。
这看起来像一个bug,因为当我删除hasDisplayName方法时,它工作正常。有人找到这个报告给谷歌了吗?但UIInfo实际上是一个遗留类,我无法删除hasDisplayName。有什么建议吗?或者我应该停止使用编辑器框架吗?

你也可以发布CompInfo和UIInfo类吗?仅从错误消息来看,您的类中似乎有什么东西可能会混淆它,猜测是否存在额外的hasDisplayName方法-请参阅GWT编辑器中有关此当前限制的更多讨论。@ColinAlworth,是的,我有一个hasDisplayName方法。请参阅我的更新。然后是的,这就是我描述的问题,Thomas Broyer在我提供的链接中对这一问题进行了评论-如果编辑器对您的属性应该是什么类型感到困惑,那么您不能同时拥有get和has,因为bean可能使用get或has返回值。