当前位置: 首页>>代码示例>>Java>>正文


Java UIInput类代码示例

本文整理汇总了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;
}
 
开发者ID:fabric8-launcher,项目名称:launcher-backend,代码行数:12,代码来源:TopLevelPackage.java

示例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;
}
 
开发者ID:fabric8-launcher,项目名称:launcher-backend,代码行数:11,代码来源:ProjectName.java

示例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!");
    }
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:10,代码来源:SpringBootConfigurationFileCompleter.java

示例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);
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:16,代码来源:CamelComponentsCompleter.java

示例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;
}
 
开发者ID:fabric8-launcher,项目名称:launchpad-addon,代码行数:13,代码来源:TopLevelPackage.java

示例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;
}
 
开发者ID:fabric8-launcher,项目名称:launchpad-addon,代码行数:12,代码来源:ProjectName.java

示例7: getGitHubRepositoryName

import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected UIInput<String> getGitHubRepositoryName() {
    return gitHubRepositoryName;
}
 
开发者ID:fabric8-launcher,项目名称:launcher-backend,代码行数:4,代码来源:ProjectInfoStep.java

示例8: getGroupId

import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected UIInput<String> getGroupId() {
    return groupId;
}
 
开发者ID:fabric8-launcher,项目名称:launcher-backend,代码行数:4,代码来源:ProjectInfoStep.java

示例9: getArtifactId

import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected UIInput<String> getArtifactId() {
    return artifactId;
}
 
开发者ID:fabric8-launcher,项目名称:launcher-backend,代码行数:4,代码来源:ProjectInfoStep.java

示例10: getVersion

import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
protected UIInput<String> getVersion() {
    return version;
}
 
开发者ID:fabric8-launcher,项目名称:launcher-backend,代码行数:4,代码来源:ProjectInfoStep.java

示例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);
    }
}
 
开发者ID:fabric8-launcher,项目名称:launcher-backend,代码行数:6,代码来源:AbstractGitSetupCredentialsStep.java

示例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);
    }
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:9,代码来源:CommandHelpers.java

示例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;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:5,代码来源:CamelGetComponentsCommand.java

示例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();
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:4,代码来源:CamelXmlHelper.java

示例15: RouteCompleter

import org.jboss.forge.addon.ui.input.UIInput; //导入依赖的package包/类
public RouteCompleter(JolokiaCamelController controller, UIInput<String> name) {
    this.controller = controller;
    this.name = name;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:5,代码来源:RouteCompleter.java


注:本文中的org.jboss.forge.addon.ui.input.UIInput类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。