• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java NonEmptyInputValidator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.openapi.ui.NonEmptyInputValidator的典型用法代码示例。如果您正苦于以下问题:Java NonEmptyInputValidator类的具体用法?Java NonEmptyInputValidator怎么用?Java NonEmptyInputValidator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NonEmptyInputValidator类属于com.intellij.openapi.ui包,在下文中一共展示了NonEmptyInputValidator类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: actionPerformed

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent anActionEvent) {
    Project project = anActionEvent.getProject();

    if (project != null) {

        String packageName = Messages.showInputDialog(
                Strings.MESSAGE_ASK_PACKAGE_NAME_TO_FILTER,
                Strings.TITLE_ASK_PACKAGE_NAME_TO_FILTER,
                Messages.getQuestionIcon(),
                PropertiesManager.getData(project, PropertyKeys.PACKAGE_NAME),
                new NonEmptyInputValidator());

        if (!TextUtils.isEmpty(packageName)) {
            PropertiesManager.putData(project, PropertyKeys.PACKAGE_NAME, packageName);
        }
    }
}
 
开发者ID:kaygisiz,项目名称:Dependency-Injection-Graph,代码行数:19,代码来源:SetPackageFilter.java


示例2: invokeDialog

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
@NotNull
@Override
protected PsiElement[] invokeDialog(Project project, PsiDirectory psiDirectory) {
    HashMap<String,String> classConfig = new HashMap<>();

    String controllerName = Messages.showInputDialog(
            "Set Plugin Name",
            "Input Plugin Name",
            Messages.getQuestionIcon(),
            "",
            new NonEmptyInputValidator()
    );

    if (StringUtils.isBlank(controllerName)) {
        PsiElement[] psiElements = new PsiElement[1];

        return psiElements;
    }

    classConfig.put(SprykerConstants.CLASS_NAME, controllerName);

    return this.createClassType(project, psiDirectory, classConfig);
}
 
开发者ID:project-a,项目名称:idea-php-spryker-plugin,代码行数:24,代码来源:ClientPluginAction.java


示例3: invokeDialog

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
@NotNull
@Override
protected PsiElement[] invokeDialog(Project project, PsiDirectory psiDirectory) {
    HashMap<String,String> classConfig = new HashMap<>();

    String controllerName = Messages.showInputDialog(
            "Set Controller Name",
            "Input Controller Name",
            Messages.getQuestionIcon(),
            "",
            new NonEmptyInputValidator()
    );

    if (StringUtils.isBlank(controllerName)) {
        PsiElement[] psiElements = new PsiElement[1];

        return psiElements;
    }

    classConfig.put(SprykerConstants.CLASS_NAME, controllerName);

    return this.createClassType(project, psiDirectory, classConfig);
}
 
开发者ID:project-a,项目名称:idea-php-spryker-plugin,代码行数:24,代码来源:ZedControllerAction.java


示例4: actionPerformed

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
@Override
public void actionPerformed(final AnActionEvent e) {
  final Object o = getSelectedObject();
  if (o instanceof LibraryEx) {
    final LibraryEx selected = (LibraryEx)o;
    final String newName = Messages.showInputDialog("Enter library name:", "Copy Library", null, selected.getName() + "2", new NonEmptyInputValidator());
    if (newName == null) return;

    BaseLibrariesConfigurable configurable = BaseLibrariesConfigurable.this;
    final LibraryEx library = (LibraryEx)myContext.getLibrary(selected.getName(), myLevel);
    LOG.assertTrue(library != null);

    final LibrariesModifiableModel libsModel = configurable.getModelProvider().getModifiableModel();
    final Library lib = libsModel.createLibrary(newName, library.getKind());
    final LibraryEx.ModifiableModelEx model = (LibraryEx.ModifiableModelEx)libsModel.getLibraryEditor(lib).getModel();
    LibraryEditingUtil.copyLibrary(library, Collections.<String, String>emptyMap(), model);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:BaseLibrariesConfigurable.java


示例5: doAction

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
@Override
protected void doAction(AnActionEvent e) {
    final Editor editor = e.getData(CommonDataKeys.EDITOR);
    final String selectedText = editor.getSelectionModel().getSelectedText();
    final Project project = e.getProject();
    final Pair<String, Boolean> userInputPair = Messages.showInputDialogWithCheckBox("Translation key",
                                                    "Translation key", "Preserve space?",
                                                    preserveSpaces, true, Messages.getQuestionIcon(), "", new NonEmptyInputValidator());

    preserveSpaces = userInputPair.getSecond();
    if (selectedFile != null) {
        try {
            updateTranslationDocument(userInputPair, selectedText);
            replaceSelectedTextWithViewHelper(userInputPair.getFirst(), project, editor);
        } catch (IOException | InvalidXliffFileException e1) {
            e1.printStackTrace();
            myNotificationGroup.createNotification(e1.getMessage(), NotificationType.ERROR)
                    .notify(project);
        }

    }
}
 
开发者ID:onigunn,项目名称:intellij.xliff,代码行数:23,代码来源:CreateXLIFFTranslationAction.java


示例6: setPackageName

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
private void setPackageName(Project project) {
    String packageName = Messages.showInputDialog(
            Strings.MESSAGE_ASK_PACKAGE_NAME_TO_FILTER,
            Strings.TITLE_ASK_PACKAGE_NAME_TO_FILTER,
            Messages.getQuestionIcon(),
            PropertiesManager.getData(project, PropertyKeys.PACKAGE_NAME),
            new NonEmptyInputValidator());

    if (!TextUtils.isEmpty(packageName)) {
        this.packageName = packageName;
        PropertiesManager.putData(project, PropertyKeys.PACKAGE_NAME, packageName);
    }
}
 
开发者ID:kaygisiz,项目名称:Dependency-Injection-Graph,代码行数:14,代码来源:GenerateDependencyInjectionGraph.java


示例7: invokeDialog

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
@NotNull
@Override
protected PsiElement[] invokeDialog(Project project, PsiDirectory psiDirectory) {
    HashMap<String,String> classConfig = new HashMap<>();
    PsiElement[] psiElements = new PsiElement[1];

    String bundleName = Messages.showInputDialog(
            "Set Bundle Name",
            "Input Bundle Name",
            Messages.getQuestionIcon(),
            "",
            new NonEmptyInputValidator()
    );

    if (StringUtils.isBlank(bundleName)) {
        return psiElements;
    }

    this.project = project;

    if (psiDirectory.findSubdirectory(bundleName) != null) {
        Messages.showErrorDialog(project, "Bundle " + bundleName + " already exists!", "Error");
        return psiElements;
    }

    try {
        PsiDirectory bundleDirectory = this.createSubdirectory(psiDirectory, bundleName);
        String projectName = this.matchProjectName(psiDirectory);
        classConfig.put(SprykerConstants.BUNDLE_NAME, bundleName);
        classConfig.put(SprykerConstants.PROJECT_NAME, projectName);

        psiElements = this.createBundleClasses(project, bundleDirectory, classConfig, psiElements);
    } catch (Exception exception) {
        exception.printStackTrace();
        Messages.showErrorDialog(project, "Error:" + exception.getMessage(), "Error");
    }

    return psiElements;
}
 
开发者ID:project-a,项目名称:idea-php-spryker-plugin,代码行数:40,代码来源:AbstractBundleAction.java


示例8: showDialog

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
@Override
protected void showDialog(Project p, IdeaGateway gw, VirtualFile f, AnActionEvent e) {
  String labelName = Messages.showInputDialog(p, message("put.label.name"), message("put.label.dialog.title"),null,
                                              "", new NonEmptyInputValidator());
  if (labelName == null) return;
  LocalHistory.getInstance().putUserLabel(p, labelName);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:PutLabelAction.java


示例9: showSaveTemplateAsDialog

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
public static @Nullable String showSaveTemplateAsDialog(@NotNull String initial, @NotNull Project project) {
  return Messages.showInputDialog(
    project,
    SSRBundle.message("template.name.button"),
    SSRBundle.message("save.template.description.button"),
    AllIcons.General.QuestionDialog,
    initial,
    new NonEmptyInputValidator()
  );
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ConfigurationManager.java


示例10: showDialog

import com.intellij.openapi.ui.NonEmptyInputValidator; //导入依赖的package包/类
public static Goal showDialog(final ApplicationSettings settings1) {
	String[] goalsAsStrings = settings1.getAllGoalsAsStringArray();
	Goal o = null;
	String s = Messages.showEditableChooseDialog("Command line:", "New Goal", getQuestionIcon(), goalsAsStrings,
			"", new NonEmptyInputValidator());
	if (StringUtils.isNotBlank(s)) {
		o = new Goal(s);
	}
	return o;
}
 
开发者ID:krasa,项目名称:MavenHelper,代码行数:11,代码来源:ApplicationSettingsForm.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Archive类代码示例发布时间:2022-05-23
下一篇:
Java ClientMUTube类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap