Java 类com.intellij.psi.file.FileLookupInfoProvider 实例源码

项目:intellij-ce-playground    文件:FileInfoManager.java   
@Nullable
private String _getInfo(PsiElement psiElement) {
  if (!(psiElement instanceof PsiFile) || !(psiElement.isPhysical())) {
    return null;
  }

  final PsiFile psiFile = (PsiFile)psiElement;
  final FileLookupInfoProvider provider = myFileType2InfoProvider.get(psiFile.getFileType());
  if (provider != null) {
    final VirtualFile virtualFile = psiFile.getVirtualFile();
    if (virtualFile != null) {
      final Pair<String, String> info = provider.getLookupInfo(virtualFile, psiElement.getProject());
      return info == null ? null : info.second;
    }
  }

  return null;
}
项目:tools-idea    文件:FileInfoManager.java   
@Nullable
private String _getInfo(PsiElement psiElement) {
  if (!(psiElement instanceof PsiFile) || !(psiElement.isPhysical())) {
    return null;
  }

  final PsiFile psiFile = (PsiFile)psiElement;
  final FileLookupInfoProvider provider = myFileType2InfoProvider.get(psiFile.getFileType());
  if (provider != null) {
    final VirtualFile virtualFile = psiFile.getVirtualFile();
    if (virtualFile != null) {
      final Pair<String, String> info = provider.getLookupInfo(virtualFile, psiElement.getProject());
      return info == null ? null : info.second;
    }
  }

  return null;
}
项目:consulo    文件:FileInfoManager.java   
@Nullable
private String _getInfo(PsiElement psiElement) {
  if (!(psiElement instanceof PsiFile) || !(psiElement.isPhysical())) {
    return null;
  }

  final PsiFile psiFile = (PsiFile)psiElement;
  final FileLookupInfoProvider provider = myFileType2InfoProvider.get(psiFile.getFileType());
  if (provider != null) {
    final VirtualFile virtualFile = psiFile.getVirtualFile();
    if (virtualFile != null) {
      final Pair<String, String> info = provider.getLookupInfo(virtualFile, psiElement.getProject());
      return info == null ? null : info.second;
    }
  }

  return null;
}
项目:intellij-ce-playground    文件:FileInfoManager.java   
public FileInfoManager() {
  final FileLookupInfoProvider[] providers = FileLookupInfoProvider.EP_NAME.getExtensions();
  for (final FileLookupInfoProvider provider : providers) {
    final FileType[] types = provider.getFileTypes();
    for (FileType type : types) {
      myFileType2InfoProvider.put(type, provider);
    }
  }
}
项目:tools-idea    文件:FileInfoManager.java   
public FileInfoManager() {
  final FileLookupInfoProvider[] providers = FileLookupInfoProvider.EP_NAME.getExtensions();
  for (final FileLookupInfoProvider provider : providers) {
    final FileType[] types = provider.getFileTypes();
    for (FileType type : types) {
      myFileType2InfoProvider.put(type, provider);
    }
  }
}
项目:consulo    文件:FileInfoManager.java   
public FileInfoManager() {
  final FileLookupInfoProvider[] providers = FileLookupInfoProvider.EP_NAME.getExtensions();
  for (final FileLookupInfoProvider provider : providers) {
    final FileType[] types = provider.getFileTypes();
    for (FileType type : types) {
      myFileType2InfoProvider.put(type, provider);
    }
  }
}