本文整理汇总了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);
}
});
}
}
示例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));
}
}
}
示例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));
}
}
}
示例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;
}
示例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;
}
}
}
}
示例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;
}
示例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"));
}
}
示例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;
}
示例9: isConfigured
import com.intellij.openapi.util.text.StringUtil; //导入方法依赖的package包/类
@Override
public boolean isConfigured() {
return super.isConfigured() && StringUtil.isNotEmpty(myPassword);
}