congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ProjectFileIndex$SERVICE.getInstance
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using com.intellij.openapi.roots.ProjectFileIndex$SERVICE.getInstance (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: 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());
}
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: JetBrains/Grammar-Kit

boolean hasPackage = StringUtil.isNotEmpty(targetPackage);
ProjectRootManager rootManager = ProjectRootManager.getInstance(project);
ProjectFileIndex fileIndex = ProjectFileIndex.SERVICE.getInstance(project);
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)) {
com.intellij.openapi.rootsProjectFileIndex$SERVICEgetInstance

Popular methods of ProjectFileIndex$SERVICE

    Popular in Java

    • Making http post requests using okhttp
    • requestLocationUpdates (LocationManager)
    • setScale (BigDecimal)
    • setContentView (Activity)
    • ByteBuffer (java.nio)
      A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
    • Permission (java.security)
      Legacy security code; do not use.
    • MessageFormat (java.text)
      Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
    • Arrays (java.util)
      This class contains various methods for manipulating arrays (such as sorting and searching). This cl
    • Callable (java.util.concurrent)
      A task that returns a result and may throw an exception. Implementors define a single method with no
    • JOptionPane (javax.swing)
    • Top 17 Plugins for Android Studio
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

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