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


Java ValidationResult.OK属性代码示例

本文整理汇总了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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:FrameworkLibraryValidatorImpl.java

示例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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:FacetLibrariesValidatorImpl.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:AppEngineSdkUtil.java

示例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));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:FrameworkLibraryValidatorImpl.java

示例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));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:FacetLibrariesValidatorImpl.java

示例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);
}
 
开发者ID:medvector,项目名称:educational-plugin,代码行数:9,代码来源:PyCCProjectGenerator.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:BuildoutConfigPanel.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:PythonBaseProjectGenerator.java

示例9: validate

@Override
public ValidationResult validate() {
  return ValidationResult.OK;
}
 
开发者ID:medvector,项目名称:educational-plugin,代码行数:4,代码来源:EduIntellijCourseProjectGeneratorBase.java

示例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;
    }
  };

}
 
开发者ID:medvector,项目名称:educational-plugin,代码行数:43,代码来源:EduKotlinCourseProjectGenerator.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:WebProjectGenerator.java

示例12: warningValidation

public ValidationResult warningValidation(@Nullable final Sdk sdk) {
  return ValidationResult.OK;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:PythonProjectGenerator.java

示例13: validate

@NotNull
@Override
public ValidationResult validate(@NotNull String baseDirPath) {
    return ValidationResult.OK;
}
 
开发者ID:shvetsgroup,项目名称:squirrel-lang-idea-plugin,代码行数:5,代码来源:SquirrelProjectGenerator.java


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