Tabnine Logo
ProjectFileIndex$SERVICE
Code IndexAdd Tabnine to your IDE (free)

How to use
ProjectFileIndex$SERVICE
in
com.intellij.openapi.roots

Best Java code snippets using com.intellij.openapi.roots.ProjectFileIndex$SERVICE (Showing top 6 results out of 315)

origin: KronicDeth/intellij-elixir

@Nullable
public static Sdk mostSpecificSdk(@NotNull PsiElement psiElement) {
  Project project = psiElement.getProject();
  Sdk elixirSdk;
  /* ModuleUtilCore.findModuleForPsiElement can fail with NullPointerException if the
    ProjectFileIndex.SERVICE.getInstance(Project) returns {@code null}, so check that the ProjectFileIndex is
    available first */
  if (ProjectFileIndex.SERVICE.getInstance(project) != null) {
    Module module = ModuleUtilCore.findModuleForPsiElement(psiElement);
    if (module != null) {
      elixirSdk = mostSpecificSdk(module);
    } else {
      elixirSdk = mostSpecificSdk(project);
    }
  } else {
    elixirSdk = mostSpecificSdk(project);
  }
  return elixirSdk;
}
origin: JetBrains/Grammar-Kit

boolean hasPackage = StringUtil.isNotEmpty(targetPackage);
ProjectRootManager rootManager = ProjectRootManager.getInstance(project);
ProjectFileIndex fileIndex = ProjectFileIndex.SERVICE.getInstance(project);
origin: sonar-intellij-plugin/sonar-intellij-plugin

@Override
public void apply(
 @NotNull final PsiFile file,
 final AnnotationResult annotationResult,
 @NotNull final AnnotationHolder holder
) {
 if (
  null == file.getVirtualFile() ||
   null == ProjectFileIndex.SERVICE.getInstance(file.getProject()).getContentRootForFile(file.getVirtualFile()) ||
   (
    // Fixes #106: Annotations in PHPStorm shown twice per File
    "html".equalsIgnoreCase(file.getFileType().getName()) &&
     "php".equalsIgnoreCase(file.getVirtualFile().getExtension()))
  ) {
  return;
 }
 createAnnotations(file,annotationResult,holder);
}
origin: SonarSource/sonarlint-intellij

@CheckForNull
public Module findModuleForFile(VirtualFile file, Project project) {
 ApplicationManager.getApplication().assertReadAccessAllowed();
 return ProjectFileIndex.SERVICE.getInstance(project).getModuleForFile(file, false);
}
origin: jshiell/checkstyle-idea

final ProjectFileIndex projectFileIndex = ProjectFileIndex.SERVICE.getInstance(project);
if (projectFileIndex != null) {
  if (!projectFileIndex.isInSourceContent(selectedFile)) {
origin: jshiell/checkstyle-idea

private static boolean isInSource(@NotNull final PsiFile psiFile, final PluginConfigurationManager pluginConfig) {
  return pluginConfig.getCurrent().getScanScope() == ScanScope.Everything
    || ProjectFileIndex.SERVICE.getInstance(psiFile.getProject()).isInSourceContent(psiFile.getVirtualFile());
}
com.intellij.openapi.rootsProjectFileIndex$SERVICE

Most used methods

  • getInstance

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Permission (java.security)
    Legacy security code; do not use.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JOptionPane (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now