本文整理汇总了Java中org.jboss.forge.addon.ui.input.UIInput类的典型用法代码示例。如果您正苦于以下问题:Java UIInput类的具体用法?Java UIInput怎么用?Java UIInput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UIInput类属于org.jboss.forge.addon.ui.input包,在下文中一共展示了UIInput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDelegate
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
@Override
protected UIInput<String> createDelegate() {
topLevelPackage.addValidator(new PackageUIValidator()).addValidator(context -> {
if (topLevelPackage.getValue() != null
&& SPECIAL_CHARS.matcher(topLevelPackage.getValue()).matches())
context.addValidationError(topLevelPackage,
"Top level package must not contain spaces or special characters.");
}).setDescription("The following characters are accepted: -_.a-zA-Z0-9");
return topLevelPackage;
}
示例2: createDelegate
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
@Override
protected UIInput<String> createDelegate() {
named.addValidator(context -> {
if (named.getValue() != null
&& !SPECIAL_CHARS.matcher(named.getValue()).matches())
context.addValidationError(named,
"Project name must not contain spaces or special characters.");
}).setDescription("The following characters are accepted: -a-z0-9 and the name cannot start or end with a dash");
return named;
}
示例3: validateFileDoesNotExist
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
/**
* Validates that the given selected directory and fileName are valid and that the file doesn't already exist
*/
public void validateFileDoesNotExist(UIInput<String> directory, UIInput<String> fileName, UIValidationContext validator) {
String resourcePath = CamelXmlHelper.createFileName(directory, fileName);
if (files.contains(resourcePath)) {
validator.addValidationError(fileName, "A file with that name already exists!");
}
}
示例4: CamelComponentsCompleter
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
public CamelComponentsCompleter(Project project, CamelCatalog camelCatalog, UIInput<String> filter,
boolean excludeComponentsOnClasspath, boolean includeCatalogComponents,
boolean consumerOnly, boolean producerOnly, boolean mustHasOptions) {
this.project = project;
this.camelCatalog = camelCatalog;
this.filter = filter;
this.excludeComponentsOnClasspath = excludeComponentsOnClasspath;
this.includeCatalogComponents = includeCatalogComponents;
this.consumerOnly = consumerOnly;
this.producerOnly = producerOnly;
this.mustHaveOptions = mustHasOptions;
// need to find camel-core so we known the camel version
core = CamelProjectHelper.findCamelCoreDependency(project);
}
示例5: createDelegate
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
@Override
protected UIInput<String> createDelegate()
{
topLevelPackage.addValidator(new PackageUIValidator()).addValidator(context -> {
if (topLevelPackage.getValue() != null
&& SPECIAL_CHARS.matcher(topLevelPackage.getValue()).matches())
context.addValidationError(topLevelPackage,
"Top level package must not contain spaces or special characters.");
}).setDescription("The following characters are accepted: -_.a-zA-Z0-9");
return topLevelPackage;
}
示例6: createDelegate
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
@Override
protected UIInput<String> createDelegate()
{
named.addValidator(context -> {
if (named.getValue() != null
&& !SPECIAL_CHARS.matcher(named.getValue()).matches())
context.addValidationError(named,
"Project name must not contain spaces or special characters.");
}).setDescription("The following characters are accepted: -a-z0-9 and the name cannot start or end with a dash");
return named;
}
示例7: getGitHubRepositoryName
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected UIInput<String> getGitHubRepositoryName() {
return gitHubRepositoryName;
}
示例8: getGroupId
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected UIInput<String> getGroupId() {
return groupId;
}
示例9: getArtifactId
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected UIInput<String> getArtifactId() {
return artifactId;
}
示例10: getVersion
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected UIInput<String> getVersion() {
return version;
}
示例11: setIfNotBlank
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected void setIfNotBlank(UIInput<String> input, String value) {
if (Strings.isNotBlank(value)) {
input.setValue(value);
}
}
示例12: setInitialComponentValue
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
/**
* If the initial value is not blank lets set the value on the underlying component
*/
public static <T> void setInitialComponentValue(UIInput<T> inputComponent, T value) {
if (value != null) {
inputComponent.setValue(value);
}
}
示例13: isValueTrue
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected static boolean isValueTrue(UIInput<Boolean> value) {
Boolean verboseValue = value.getValue();
return verboseValue != null && verboseValue;
}
示例14: createFileName
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
public static String createFileName(UIInput<String> directory, UIInput<String> name) {
return directory.getValue() != null ? directory.getValue() + File.separator + name.getValue() : name.getValue();
}
示例15: RouteCompleter
import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
public RouteCompleter(JolokiaCamelController controller, UIInput<String> name) {
this.controller = controller;
this.name = name;
}