private static PropertyDescriptor<Boolean> booleanPropertyFor(String id, String label) { PropertyDescriptor<Boolean> prop = PROPERTY_DESCRIPTORS_BY_ID.get(id); if (prop != null) { return prop; } prop = PropertyFactory.booleanProperty(id).defaultValue(true).desc("Include " + label + " column").build(); PROPERTY_DESCRIPTORS_BY_ID.put(id, prop); return prop; }
private static GenericPropertyBuilder<CommentRequirement> requirementPropertyBuilder(String name, String commentType) { DESCRIPTOR_NAME_TO_COMMENT_TYPE.put(name, commentType); return PropertyFactory.enumProperty(name, CommentRequirement.mappings()) .desc(commentType + ". Possible values: " + CommentRequirement.labels()) .defaultValue(CommentRequirement.Required); } }
private static PropertyDescriptor<Boolean> booleanPropertyFor(String id, String label) { PropertyDescriptor<Boolean> prop = PROPERTY_DESCRIPTORS_BY_ID.get(id); if (prop != null) { return prop; } prop = PropertyFactory.booleanProperty(id).defaultValue(true).desc("Include " + label + " column").build(); PROPERTY_DESCRIPTORS_BY_ID.put(id, prop); return prop; }
private static GenericPropertyBuilder<CommentRequirement> requirementPropertyBuilder(String name, String commentType) { DESCRIPTOR_NAME_TO_COMMENT_TYPE.put(name, commentType); return PropertyFactory.enumProperty(name, CommentRequirement.mappings()) .desc(commentType + ". Possible values: " + CommentRequirement.labels()) .defaultValue(CommentRequirement.Required); } }
public MockRule() { super(); setLanguage(LanguageRegistry.getLanguage("Dummy")); definePropertyDescriptor(PropertyFactory.intProperty("testIntProperty").desc("testIntProperty").require(inRange(1, 100)).defaultValue(1).build()); }
public MockRule() { super(); setLanguage(LanguageRegistry.getLanguage("Dummy")); definePropertyDescriptor(PropertyFactory.intProperty("testIntProperty").desc("testIntProperty").require(inRange(1, 100)).defaultValue(1).build()); }