class PropertyEditorHelper {

    static PropertyEditorItemLabel createLabel(final PropertyEditorFieldInfo field) {
        PropertyEditorItemLabel item = GWT.create(PropertyEditorItemLabel.class);
        item.setText(field.getLabel());
        item.setFor(String.valueOf(field.hashCode()));
        if (field.hasHelpInfo()) {
            item.setHelpTitle(field.getHelpHeading());
            item.setHelpContent(field.getHelpText());
        }
        return item;
    }

}