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


Java StringUtil.isNotEmpty方法代码示例

本文整理汇总了Java中com.intellij.openapi.util.text.StringUtil.isNotEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtil.isNotEmpty方法的具体用法?Java StringUtil.isNotEmpty怎么用?Java StringUtil.isNotEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.util.text.StringUtil的用法示例。


在下文中一共展示了StringUtil.isNotEmpty方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: actionPerformed

import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
  final IdeView view = e.getData(LangDataKeys.IDE_VIEW);
  final Project project = e.getData(CommonDataKeys.PROJECT);
  if (view == null || project == null) {
    return;
  }
  final String courseId = Messages.showInputDialog("Please, enter course id", "Get Course From Stepik", null);
  if (StringUtil.isNotEmpty(courseId)) {
    ProgressManager.getInstance().run(new Task.Modal(project, "Creating Course", true) {
      @Override
      public void run(@NotNull final ProgressIndicator indicator) {
        createCourse(project, courseId);
      }
    });
  }
}
 
开发者ID:medvector,项目名称:educational-plugin,代码行数:18,代码来源:CCGetCourseFromStepic.java

示例2: actionPerformed

import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent var1) {
    DataContext var2 = var1.getDataContext();
    CopyProvider var3 = (CopyProvider) PlatformDataKeys.COPY_PROVIDER.getData(var2);
    if (var3 != null) {
        var3.performCopy(var2);
        String var4 = (String) CopyPasteManager.getInstance().getContents(DataFlavor.stringFlavor);
        if (StringUtil.isNotEmpty(var4)) {
            BrowserUtil.browse("https://translate.google.com/#en/zh-CN/" + URLEncoder.encode(var4));
        }
    }
}
 
开发者ID:kookob,项目名称:mybatis-log-plugin,代码行数:12,代码来源:GoogleTranslateAction.java

示例3: actionPerformed

import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent var1) {
    DataContext var2 = var1.getDataContext();
    CopyProvider var3 = (CopyProvider) PlatformDataKeys.COPY_PROVIDER.getData(var2);
    if (var3 != null) {
        var3.performCopy(var2);
        String var4 = (String) CopyPasteManager.getInstance().getContents(DataFlavor.stringFlavor);
        if (StringUtil.isNotEmpty(var4)) {
            BrowserUtil.browse("https://www.baidu.com/s?wd=" + URLEncoder.encode(var4));
        }
    }
}
 
开发者ID:kookob,项目名称:mybatis-log-plugin,代码行数:12,代码来源:BaiduSearchAction.java

示例4: getProperties

import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
@NotNull
public Properties getProperties(@NotNull PsiDirectory directory) {

    this.myProperties.setProperty("NAME", this.getName());
    String namespace = this.getNamespace();
    if(StringUtil.isNotEmpty(namespace)) {
        this.myProperties.setProperty("NAMESPACE", namespace);
    }

    return this.myProperties;
}
 
开发者ID:aurimasniekis,项目名称:idea-php-class-templates,代码行数:12,代码来源:PhpNewClassDialog.java

示例5: doValidate

import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
protected ValidationInfo doValidate() {
    String name = this.getName();
    if(!PhpNameUtil.isValidClassName(name)) {
        return new ValidationInfo(
            PhpBundle.message(
                "validation.class.not.valid.name",
                    name),
            this.myNameTextField
        );
    } else {
        String namespace = this.getNamespace();
        if(StringUtil.isNotEmpty(namespace) && !PhpNameUtil.isValidNamespaceFullName(namespace)) {
            return new ValidationInfo(
                PhpBundle.message(
                    "validation.namespace.not.valid.name",
                        namespace),
                this.myNamespaceCombobox
            );
        } else {
            PsiDirectory directory = this.getDirectory();
            if(directory == null) {
                return new ValidationInfo(
                    PhpBundle.message(
                        "validation.value.is.not.specified.or.invalid",
                            "directory")
                );
            } else {
                String errorMessage = this.isValidFilePath(this.getFilePath(), directory);
                return errorMessage != null?new ValidationInfo(errorMessage, this.myFileNameTextField):null;
            }
        }
    }
}
 
开发者ID:aurimasniekis,项目名称:idea-php-class-templates,代码行数:34,代码来源:PhpNewClassDialog.java

示例6: getProperties

import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
@NotNull
public Properties getProperties(@NotNull PsiDirectory directory) {
    super.getProperties(directory);

    this.myProperties.setProperty("EXCEPTION", (String)((Trinity)this.myKindComboBox.getSelectedItem()).getFirst());
    String exceptionMessage = this.myMessageTextField.getText();

    if (StringUtil.isNotEmpty(exceptionMessage)) {
        this.myProperties.setProperty("EXCEPTION_MESSAGE", exceptionMessage);
    }

    return this.myProperties;
}
 
开发者ID:aurimasniekis,项目名称:idea-php-class-templates,代码行数:14,代码来源:PhpNewExceptionClassDialog.java

示例7: checkOk

import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
public void checkOk() {
  if (StringUtil.isNotEmpty(errorInfo)) {
    throw new RequestFailedException(errorInfo);
  }

  List<String> validationErrs = validate();
  if (!validationErrs.isEmpty()) {
    throw new RequestFailedException("Invalid data received: " + StringUtil.join(validationErrs, "\n"));
  }
}
 
开发者ID:mmm444,项目名称:ijphab,代码行数:11,代码来源:MethodResponse.java

示例8: isValid

import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
public boolean isValid() {
    return StringUtil.isNotEmpty(getClassNameVm()) && StringUtil.isNotEmpty(getName())
           && StringUtil.isNotEmpty(getCodeTemplate()) && classNumber != -1;
}
 
开发者ID:zeng198821,项目名称:CodeGenerate,代码行数:5,代码来源:CodeTemplate.java

示例9: isConfigured

import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
@Override
public boolean isConfigured() {
  return super.isConfigured() && StringUtil.isNotEmpty(myPassword);
}
 
开发者ID:mmm444,项目名称:ijphab,代码行数:5,代码来源:PhabricatorRepository.java


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