本文整理汇总了Java中org.jboss.forge.addon.ui.hints.InputType类的典型用法代码示例。如果您正苦于以下问题:Java InputType类的具体用法?Java InputType怎么用?Java InputType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InputType类属于org.jboss.forge.addon.ui.hints包,在下文中一共展示了InputType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initializeUI
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
public void initializeUI(UIBuilder builder) throws Exception {
Project project = getSelectedProject(builder.getUIContext());
JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class);
targetPackage.setCompleter(new PackageNameCompleter(facet));
targetPackage.addValidator(new PackageNameValidator());
targetPackage.getFacet(HintsFacet.class).setInputType(InputType.JAVA_PACKAGE_PICKER);
// if there is only one package then use that as default
Set<String> packages = new RouteBuilderCompleter(facet).getPackages();
if (packages.size() == 1) {
targetPackage.setDefaultValue(first(packages));
}
name.addValidator(new ClassNameValidator(false));
name.getFacet(HintsFacet.class).setInputType(InputType.JAVA_CLASS_PICKER);
builder.add(targetPackage).add(name);
}
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:20,代码来源:CamelNewRouteBuilderCommand.java
示例2: initializeUI
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
public void initializeUI(UIBuilder builder) throws Exception {
Project project = getSelectedProject(builder.getUIContext());
final JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class);
// filter the list of components based on consumer and producer only
configureComponentName(project, componentName, false, false);
targetPackage.setCompleter(new PackageNameCompleter(facet));
targetPackage.addValidator(new PackageNameValidator());
targetPackage.getFacet(HintsFacet.class).setInputType(InputType.JAVA_PACKAGE_PICKER);
// if there is only one package then use that as default
Set<String> packages = new RouteBuilderCompleter(facet).getPackages();
if (packages.size() == 1) {
targetPackage.setDefaultValue(first(packages));
}
className.addValidator(new ClassNameValidator(false));
className.getFacet(HintsFacet.class).setInputType(InputType.JAVA_CLASS_PICKER);
builder.add(componentName).add(instanceName).add(targetPackage).add(className);
}
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:23,代码来源:CamelNewComponentCommand.java
示例3: initializeUI
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
public void initializeUI(UIBuilder builder) throws Exception {
Project project = getSelectedProject(builder.getUIContext());
boolean blueprint = CamelCommandsHelper.isBlueprintProject(project);
boolean spring = CamelCommandsHelper.isSpringProject(project);
directory.getFacet(HintsFacet.class).setInputType(InputType.DIRECTORY_PICKER);
if (blueprint) {
directory.setDefaultValue("OSGI-INF/blueprint");
} else if (spring) {
directory.setDefaultValue("META-INF/spring");
}
XmlFileCompleter xmlFileCompleter = createXmlFileCompleter(builder.getUIContext(), null);
Set<String> directories = xmlFileCompleter.getDirectories();
if (directories.size() == 1) {
directory.setDefaultValue(first(directories));
}
if (!directories.isEmpty()) {
directory.setCompleter(new StringCompleter(directories));
}
name.addValidator(new ResourceNameValidator("xml"));
name.getFacet(HintsFacet.class).setInputType(InputType.FILE_PICKER);
builder.add(directory).add(name);
}
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:27,代码来源:CamelNewCamelContextXmlCommand.java
示例4: initializeUI
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
public void initializeUI(UIBuilder builder) throws Exception {
InputComponentFactory inputFactory = builder.getInputComponentFactory();
targetPackage = inputFactory.createInput("targetPackage", String.class)
.setLabel("Package Name")
.setRequired(true)
.setDescription("The package name where this type will be created");
targetPackage.getFacet(HintsFacet.class).setInputType(InputType.JAVA_PACKAGE_PICKER);
targetPackage.setValueConverter(new PackageRootConverter(getProjectFactory(), builder));
targetPackage.setDefaultValue(calculateDefaultPackage(builder.getUIContext()));
named = inputFactory.createInput("named", String.class)
.setLabel("Type Name").setRequired(true)
.setDescription("The type name");
named.addValidator((context) -> {
if (!Types.isSimpleName(named.getValue()))
context.addValidationError(named, "Invalid java type name.");
});
asClient = inputFactory.createInput(WildFlySwarmConfiguration.TEST_AS_CLIENT_FLAG_CONFIGURATION_ELEMENT, Boolean.class)
.setLabel("As Client").setDescription("Sets test mode to as client.");
mainClass = inputFactory.createInput(WildFlySwarmConfiguration.MAIN_CLASS_CONFIGURATION_ELEMENT, String.class)
.setLabel("Main Class").setDescription("Main Class to use as boot up during test execution.");
archiveType = inputFactory.createSelectOne(WildFlySwarmConfiguration.TEST_TYPE_CONFIGURATION_ELEMENT, String.class)
.setLabel("Archive Type")
.setDescription("Sets type of default archive")
.setValueChoices(ARCHIVE_TYPES);
builder.add(targetPackage)
.add(named)
.add(asClient)
.add(mainClass)
.add(archiveType);
}
开发者ID:forge,项目名称:wildfly-swarm-addon,代码行数:41,代码来源:CreateTestClassCommand.java
示例5: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.RADIO;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:RadioComponentBuilder.java
示例6: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.TEXTBOX;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:TextBoxComponentBuilder.java
示例7: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.TEXTBOX;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:TextBoxMultipleComponentBuilder.java
示例8: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.CHECKBOX;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:CheckBoxTableComponentBuilder.java
示例9: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.DIRECTORY_PICKER;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:DirectoryChooserMultipleComponentBuilder.java
示例10: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.JAVA_CLASS_PICKER;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:JavaClassChooserMultipleComponentBuilder.java
示例11: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.FILE_PICKER;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:FileChooserMultipleComponentBuilder.java
示例12: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.SECRET;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:PasswordComponentBuilder.java
示例13: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.DROPDOWN;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:ComboComponentBuilder.java
示例14: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.TEXTAREA;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:TextAreaComponentBuilder.java
示例15: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.DEFAULT;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:SpinnerComponentBuilder.java
示例16: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
protected String getSupportedInputType()
{
return InputType.JAVA_PACKAGE_PICKER;
}
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:6,代码来源:JavaPackageChooserComponentBuilder.java
示例17: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
public String getSupportedInputType()
{
return InputType.TEXTBOX;
}
开发者ID:forgeide,项目名称:forgeide,代码行数:6,代码来源:TextBoxControl.java
示例18: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
public String getSupportedInputType()
{
return InputType.RADIO;
}
开发者ID:forgeide,项目名称:forgeide,代码行数:6,代码来源:RadioControl.java
示例19: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
public String getSupportedInputType()
{
return InputType.DIRECTORY_PICKER;
}
开发者ID:forgeide,项目名称:forgeide,代码行数:6,代码来源:ResourceChooserControl.java
示例20: getSupportedInputType
import org.jboss.forge.addon.ui.hints.InputType; //导入依赖的package包/类
@Override
public String getSupportedInputType()
{
return InputType.DROPDOWN;
}
开发者ID:forgeide,项目名称:forgeide,代码行数:6,代码来源:ComboControl.java
注:本文中的org.jboss.forge.addon.ui.hints.InputType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论