當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。