本文整理汇总了Java中com.intellij.facet.ui.ValidationResult.OK属性的典型用法代码示例。如果您正苦于以下问题:Java ValidationResult.OK属性的具体用法?Java ValidationResult.OK怎么用?Java ValidationResult.OK使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.facet.ui.ValidationResult
的用法示例。
在下文中一共展示了ValidationResult.OK属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: check
@NotNull
@Override
public ValidationResult check() {
final Set<? extends LibraryKind> libraryKinds = myLibraryDescription.getSuitableLibraryKinds();
final Ref<Boolean> found = Ref.create(false);
myContext.getRootModel().orderEntries().using(myContext.getModulesProvider()).recursively().librariesOnly().forEachLibrary(new Processor<Library>() {
@Override
public boolean process(Library library) {
if (LibraryPresentationManager.getInstance().isLibraryOfKind(library, myContext.getLibrariesContainer(), libraryKinds)) {
found.set(true);
return false;
}
return true;
}
});
if (found.get()) return ValidationResult.OK;
return new ValidationResult(IdeBundle.message("label.missed.libraries.text", myLibraryCategoryName), new LibrariesQuickFix(myLibraryDescription));
}
示例2: check
@NotNull
public ValidationResult check() {
if (myRequiredLibraries == null) {
return ValidationResult.OK;
}
List<VirtualFile> roots = collectRoots(myContext.getRootModel());
RequiredLibrariesInfo.RequiredClassesNotFoundInfo info = myRequiredLibraries.checkLibraries(VfsUtil.toVirtualFileArray(roots));
if (info == null) {
return ValidationResult.OK;
}
String missingJars = IdeBundle.message("label.missed.libraries.prefix") + " " + info.getMissingJarsText();
LibraryInfo[] missingLibraries = info.getLibraryInfos();
CustomLibraryDescription description = new OldCustomLibraryDescription(missingLibraries, myDescription.getDefaultLibraryName());
return new ValidationResult(missingJars, new LibrariesQuickFix(description));
}
示例3: checkPath
@NotNull
public static ValidationResult checkPath(String path) {
final AppEngineSdkImpl sdk = new AppEngineSdkImpl(path);
final File appCfgFile = sdk.getAppCfgFile();
if (!appCfgFile.exists()) {
return createNotFoundMessage(path, appCfgFile);
}
final File toolsApiJarFile = sdk.getToolsApiJarFile();
if (!toolsApiJarFile.exists()) {
return createNotFoundMessage(path, toolsApiJarFile);
}
return ValidationResult.OK;
}
示例4: check
@Override
public ValidationResult check() {
final Set<? extends LibraryKind> libraryKinds = myLibraryDescription.getSuitableLibraryKinds();
final Ref<Boolean> found = Ref.create(false);
myContext.getRootModel().orderEntries().using(myContext.getModulesProvider()).recursively().librariesOnly().forEachLibrary(new Processor<Library>() {
@Override
public boolean process(Library library) {
if (LibraryPresentationManager.getInstance().isLibraryOfKind(library, myContext.getLibrariesContainer(), libraryKinds)) {
found.set(true);
return false;
}
return true;
}
});
if (found.get()) return ValidationResult.OK;
return new ValidationResult(StringUtil.capitalize(myLibraryCategoryName) + " library not found in the module dependencies list", new LibrariesQuickFix(myLibraryDescription));
}
示例5: check
public ValidationResult check() {
if (myRequiredLibraries == null) {
return ValidationResult.OK;
}
List<VirtualFile> roots = collectRoots(myContext.getRootModel());
RequiredLibrariesInfo.RequiredClassesNotFoundInfo info = myRequiredLibraries.checkLibraries(VfsUtil.toVirtualFileArray(roots));
if (info == null) {
return ValidationResult.OK;
}
String missingJars = IdeBundle.message("label.missed.libraries.prefix") + " " + info.getMissingJarsText();
LibraryInfo[] missingLibraries = info.getLibraryInfos();
CustomLibraryDescription description = new OldCustomLibraryDescription(missingLibraries, myDescription.getDefaultLibraryName());
return new ValidationResult(missingJars, new LibrariesQuickFix(description));
}
示例6: validate
@NotNull
@Override
public ValidationResult validate(@NotNull String s) {
String message = "";
message = mySettingsPanel.getDescription().isEmpty() ? "Enter description" : message;
message = mySettingsPanel.getAuthors().length == 0 ? "Enter author name" : message;
message = mySettingsPanel.getName().isEmpty() ? "Enter course name" : message;
return message.isEmpty() ? ValidationResult.OK : new ValidationResult(message);
}
示例7: validateScriptName
private static ValidationResult validateScriptName(String scriptName) {
if (StringUtil.isEmpty(scriptName)) {
return new ValidationResult("Please specify buildout script");
}
try {
getScriptFile(scriptName);
}
catch (ConfigurationException e) {
return new ValidationResult(e.getMessage());
}
return ValidationResult.OK;
}
示例8: validate
@NotNull
@Override
public ValidationResult validate(@NotNull String baseDirPath) {
/*if (PythonSdkType.isRemote(myProjectAction.getSdk())) {
if (PythonRemoteInterpreterManager.getInstance() == null) {
return new ValidationResult(PythonRemoteInterpreterManager.WEB_DEPLOYMENT_PLUGIN_IS_DISABLED);
}
}*/
return ValidationResult.OK;
}
示例9: validate
@Override
public ValidationResult validate() {
return ValidationResult.OK;
}
示例10: getDirectoryProjectGenerator
@NotNull
@Override
public DirectoryProjectGenerator getDirectoryProjectGenerator() {
return new DirectoryProjectGenerator() {
@Nls
@NotNull
@Override
public String getName() {
return "Kotlin Koans generator";
}
@Nullable
@Override
public Icon getLogo() {
return KotlinIcons.SMALL_LOGO;
}
@Override
public void generateProject(@NotNull Project project, @NotNull VirtualFile baseDir, @Nullable Object settings, @NotNull Module module) {
new NewModuleAction().createModuleFromWizard(project, null, new AbstractProjectWizard("", project, baseDir.getPath()) {
@Override
public StepSequence getSequence() {
return null;
}
@Override
public ProjectBuilder getProjectBuilder() {
return new EduKotlinKoansModuleBuilder(myCourse);
}
});
setJdk(project);
setCompilerOutput(project);
}
@NotNull
@Override
public ValidationResult validate(@NotNull String baseDirPath) {
return ValidationResult.OK;
}
};
}
示例11: validate
/**
* Always returns {@link ValidationResult#OK}.
* Real validation should be done in {@link WebProjectGenerator.GeneratorPeer#validate()}.
*/
@NotNull
@Override
public final ValidationResult validate(@NotNull String baseDirPath) {
return ValidationResult.OK;
}
示例12: warningValidation
public ValidationResult warningValidation(@Nullable final Sdk sdk) {
return ValidationResult.OK;
}
示例13: validate
@NotNull
@Override
public ValidationResult validate(@NotNull String baseDirPath) {
return ValidationResult.OK;
}