Java 类com.intellij.openapi.fileTypes.FileTypeExtensionPoint 实例源码

项目:intellij-ce-playground    文件:BraceMatchingUtil.java   
@Nullable
private static BraceMatcher getBraceMatcherByFileType(@NotNull FileType fileType) {
  BraceMatcher braceMatcher = BRACE_MATCHERS.get(fileType);
  if (braceMatcher != null) return braceMatcher;

  for (FileTypeExtensionPoint<BraceMatcher> ext : Extensions.getExtensions(BraceMatcher.EP_NAME)) {
    if (fileType.getName().equals(ext.filetype)) {
      braceMatcher = ext.getInstance();
      BRACE_MATCHERS.put(fileType, braceMatcher);
      return braceMatcher;
    }
  }
  return null;
}
项目:tools-idea    文件:BraceMatchingUtil.java   
@Nullable
private static BraceMatcher getBraceMatcherByFileType(final FileType fileType) {
  BraceMatcher braceMatcher = BRACE_MATCHERS.get(fileType);
  if (braceMatcher != null) return braceMatcher;

  for (FileTypeExtensionPoint<BraceMatcher> ext : Extensions.getExtensions(BraceMatcher.EP_NAME)) {
    if (fileType.getName().equals(ext.filetype)) {
      braceMatcher = ext.getInstance();
      BRACE_MATCHERS.put(fileType, braceMatcher);
      return braceMatcher;
    }
  }
  return null;
}
项目:consulo    文件:BraceMatchingUtil.java   
@Nullable
private static BraceMatcher getBraceMatcherByFileType(@Nonnull FileType fileType) {
  BraceMatcher braceMatcher = BRACE_MATCHERS.get(fileType);
  if (braceMatcher != null) return braceMatcher;

  for (FileTypeExtensionPoint<BraceMatcher> ext : Extensions.getExtensions(BraceMatcher.EP_NAME)) {
    if (fileType.getName().equals(ext.filetype)) {
      braceMatcher = ext.getInstance();
      BRACE_MATCHERS.put(fileType, braceMatcher);
      return braceMatcher;
    }
  }
  return null;
}