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

项目:Buck-IntelliJ-Plugin    文件:BuckFileTypeFactory.java   
@Override
public void createFileTypes(FileTypeConsumer fileTypeConsumer) {
  fileTypeConsumer.consume(
      BuckFileType.INSTANCE, new FileNameMatcherEx() {
        @Override
        public String getPresentableString() {
          return BuckFileUtil.getBuildFileName();
        }

        @Override
        public boolean acceptsCharSequence(CharSequence fileName) {
          String buildFileName = BuckFileUtil.getBuildFileName();
          return StringUtilRt.endsWithIgnoreCase(fileName, buildFileName) ||
            Comparing.equal(fileName, buildFileName, true);
        }
      });
}
项目:buck    文件:BuckFileTypeFactory.java   
@Override
public void createFileTypes(FileTypeConsumer fileTypeConsumer) {
  fileTypeConsumer.consume(
      BuckFileType.INSTANCE,
      new FileNameMatcherEx() {
        @Override
        public String getPresentableString() {
          return BuckFileUtil.getBuildFileName();
        }

        @Override
        public boolean acceptsCharSequence(CharSequence fileName) {
          String buildFileName = BuckFileUtil.getBuildFileName();
          return StringUtilRt.endsWithIgnoreCase(fileName, buildFileName)
              || Comparing.equal(fileName, buildFileName, true);
        }
      });
}
项目:EmojiPrefix    文件:EmojiResourceFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(EmojiResourceFileType.INSTANCE, new FileNameMatcher() {
        @Override
        public boolean accept(@NotNull String s) {
            return s.equals(".emojirc");
        }

        @NotNull
        @Override
        public String getPresentableString() {
            return ".emojirc";
        }
    });
}
项目:hybris-integration-intellij-idea-plugin    文件:FlexibleSearchTypeFactory.java   
@Override
public void createFileTypes(@NotNull final FileTypeConsumer consumer) {
    consumer.consume(
        FlexibleSearchFileType.getInstance(),
        FlexibleSearchFileType.getInstance().getDefaultExtension()
    );
}
项目:mule-intellij-plugins    文件:WeaveFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    WeaveFileType weaveFileType = WeaveFileType.getInstance();

    for (String extension : weaveFileType.getExtensions())
        fileTypeConsumer.consume(weaveFileType, extension);
}
项目:cs-intellij-plugin    文件:CloudSlangFileTypeFactory.java   
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    super.createFileTypes(fileTypeConsumer);
    fileTypeConsumer.consume(CloudSlangFileType.INSTANCE, new FileNameMatcher() {
        @Override
        public boolean accept(@NonNls @NotNull String s) {
            return CloudSlangFileUtils.isCloudSlangFile(s);
        }

        @NotNull
        @Override
        public String getPresentableString() {
            return "sl;sl.yaml;sl.yml;prop.sl";
        }
    });
}
项目:protobuf-jetbrains-plugin    文件:ProtostuffPluginController.java   
@NotNull
private List<FileNameMatcher> parse(@Nullable String semicolonDelimited) {
    if (semicolonDelimited == null) {
        return Collections.emptyList();
    }

    StringTokenizer tokenizer = new StringTokenizer(semicolonDelimited, FileTypeConsumer.EXTENSION_DELIMITER, false);
    ArrayList<FileNameMatcher> list = new ArrayList<>();
    while (tokenizer.hasMoreTokens()) {
        list.add(new ExtensionFileNameMatcher(tokenizer.nextToken().trim()));
    }
    return list;
}
项目:intellij-ce-playground    文件:ImageFileTypeManagerImpl.java   
public void createFileTypes(final @NotNull FileTypeConsumer consumer) {
  final Set<String> processed = new THashSet<String>();

  final String[] readerFormatNames = ImageIO.getReaderFormatNames();
  for (String format : readerFormatNames) {
    final String ext = format.toLowerCase();
    processed.add(ext);
  }

  processed.add(IfsUtil.ICO_FORMAT.toLowerCase());

  consumer.consume(imageFileType, StringUtil.join(processed, FileTypeConsumer.EXTENSION_DELIMITER));
}
项目:intellij-ce-playground    文件:XmlFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull final FileTypeConsumer consumer) {
  consumer.consume(HtmlFileType.INSTANCE, "html;htm;sht;shtm;shtml");
  consumer.consume(XHtmlFileType.INSTANCE, "xhtml");
  consumer.consume(DTDFileType.INSTANCE, "dtd;ent;mod;elt");

  consumer.consume(XmlFileType.INSTANCE, "xml;xsd;tld;xsl;jnlp;wsdl;jhm;ant;xul;xslt;rng;fxml;jrxml");
  TypedHandler.registerBaseLanguageQuoteHandler(XMLLanguage.class, TypedHandler.getQuoteHandlerForType(XmlFileType.INSTANCE));
}
项目:intellij-ce-playground    文件:AndroidFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer consumer) {
  consumer.consume(AndroidIdlFileType.ourFileType, AndroidIdlFileType.DEFAULT_ASSOCIATED_EXTENSION);
  consumer.consume(AndroidRenderscriptFileType.INSTANCE,
                   AndroidRenderscriptFileType.fileNameMatchers());
  consumer.consume(AndroidNinePatchFileType.INSTANCE, AndroidNinePatchFileType.EXTENSION);
  consumer.consume(AndroidNavigationFileType.INSTANCE, AndroidNavigationFileType.EXTENSION);
}
项目:intellij    文件:ProjectViewFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull final FileTypeConsumer consumer) {
  FileNameMatcher[] matchers =
      ProjectViewStorageManager.VALID_EXTENSIONS
          .stream()
          .map(ExtensionFileNameMatcher::new)
          .toArray(ExtensionFileNameMatcher[]::new);
  consumer.consume(ProjectViewFileType.INSTANCE, matchers);
}
项目:intellij    文件:BuildFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull final FileTypeConsumer consumer) {
  ImmutableList<FileNameMatcher> fileNameMatchers =
      ImmutableList.<FileNameMatcher>builder()
          .addAll(BuildSystemProvider.defaultBuildSystem().buildLanguageFileTypeMatchers())
          .add()
          .build();
  consumer.consume(BuildFileType.INSTANCE, fileNameMatchers.toArray(new FileNameMatcher[0]));
}
项目:consulo-unity3d    文件:Unity3dFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer consumer)
{
    consumer.consume(Unity3dMetaFileType.INSTANCE);
    consumer.consume(Unity3dBinaryAssetFileType.INSTANCE);
    consumer.consume(Unity3dYMLAssetFileType.INSTANCE);
}
项目:consulo-visual-studio    文件:VisualStudioFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer consumer)
{
    consumer.consume(VisualStudioSolutionFileType.INSTANCE);

    for(KeyedLazyInstanceEP<VisualStudioLanguageImportProvider> ep : VisualStudioLanguageImportProvider.EP_NAME.getExtensions())
    {
        consumer.consume(VisualStudioProjectFileType.INSTANCE, ep.getKey());
    }
}
项目:tools-idea    文件:XmlFileTypeFactory.java   
public void createFileTypes(@NotNull final FileTypeConsumer consumer) {
  consumer.consume(HtmlFileType.INSTANCE, "html;htm;sht;shtm;shtml");
  consumer.consume(XHtmlFileType.INSTANCE, "xhtml");
  consumer.consume(DTDFileType.INSTANCE, "dtd;ent;mod;elt");

  consumer.consume(XmlFileType.INSTANCE, "xml;xsd;tld;xsl;jnlp;wsdl;jhm;ant;xul;xslt;rng;fxml");
  TypedHandler.registerBaseLanguageQuoteHandler(XMLLanguage.class, TypedHandler.getQuoteHandlerForType(XmlFileType.INSTANCE));
}
项目:idea-gitignore    文件:IgnoreFileTypeFactory.java   
/**
 * Assigns file types with languages.
 *
 * @param consumer file types consumer
 */
@Override
public void createFileTypes(@NotNull FileTypeConsumer consumer) {
    consume(consumer, IgnoreFileType.INSTANCE);
    for (final IgnoreLanguage language : IgnoreBundle.LANGUAGES) {
        consume(consumer, language.getFileType());
    }
}
项目:consulo    文件:SandFileTypeFactory.java   
@Override
public void createFileTypes(@Nonnull FileTypeConsumer consumer) {
  for (LanguageVersion languageVersion : SandLanguage.INSTANCE.getVersions()) {
    BaseSandLanguageVersion sandLanguageVersion = (BaseSandLanguageVersion) languageVersion;
    consumer.consume(sandLanguageVersion.getFileType());
  }
}
项目:consulo-xml    文件:XmlFileTypeFactory.java   
public void createFileTypes(@NotNull final FileTypeConsumer consumer) {
  consumer.consume(HtmlFileType.INSTANCE, "html;htm;sht;shtm;shtml");
  consumer.consume(XHtmlFileType.INSTANCE, "xhtml");
  consumer.consume(DTDFileType.INSTANCE, "dtd;ent;mod;elt");

  consumer.consume(XmlFileType.INSTANCE, "xml;xsd;tld;xsl;jnlp;wsdl;jhm;ant;xul;xslt;rng;");
  TypedHandler.registerBaseLanguageQuoteHandler(XMLLanguage.class, TypedHandler.getQuoteHandlerForType(XmlFileType.INSTANCE));
}
项目:consulo-apache-velocity    文件:VelocityFileTypeFactory.java   
@Override
public void createFileTypes(final @NotNull FileTypeConsumer consumer)
{
    for(String exp : VtlFileType.INSTANCE.getExtensions())
    {
        consumer.consume(VtlFileType.INSTANCE, exp);
    }
}
项目:consulo-java    文件:JavaFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull final FileTypeConsumer consumer)
{
    consumer.consume(JarArchiveFileType.INSTANCE, "jar;war;apk");
    consumer.consume(JavaClassFileType.INSTANCE);
    consumer.consume(JavaFileType.INSTANCE);
    consumer.consume(JModFileType.INSTANCE);
}
项目:TS-IJ    文件:TSFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(TSFileType.INSTANCE, "cs" + FileTypeConsumer.EXTENSION_DELIMITER + "gui");
    fileTypeConsumer.consume(TSMisFileType.INSTANCE, "mis");
}
项目:AppleScript-IDEA    文件:AppleScriptFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
  fileTypeConsumer.consume(AppleScriptFileType.INSTANCE, 
      StringUtil.join(AppleScriptFileType.INSTANCE.getExtensions(), FileTypeConsumer.EXTENSION_DELIMITER));
}
项目:reasonml-idea-plugin    文件:OclFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(OclFileType.INSTANCE, "ml");
}
项目:reasonml-idea-plugin    文件:RmlInterfaceFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(RmlInterfaceFileType.INSTANCE, "rei");
}
项目:reasonml-idea-plugin    文件:OclInterfaceFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(OclInterfaceFileType.INSTANCE, "mli");
}
项目:reasonml-idea-plugin    文件:RmlFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(RmlFileType.INSTANCE, "re");
}
项目:reasonml-idea-plugin    文件:Ml4FileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(Ml4FileType.INSTANCE, "ml4");
}
项目:greycat-idea-plugin    文件:GCMFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(GCMLanguageType.INSTANCE, GCMLanguageType.INSTANCE.getDefaultExtension());
}
项目:bamboo-soy    文件:SoyFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
  fileTypeConsumer.consume(SoyFileType.INSTANCE, "soy");
}
项目:intellij-bpmn-editor    文件:BPMNFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer consumer) {
    final FileType fileType = consumer.getStandardFileTypeByName("XML");
    assert fileType != null;
    consumer.consume(fileType, BPMN_EXTENSION);
}
项目:hybris-integration-intellij-idea-plugin    文件:ImpexFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull final FileTypeConsumer consumer) {
    consumer.consume(ImpexFileType.getInstance(), ImpexFileType.getInstance().getDefaultExtension());
}
项目:intellij-plugin    文件:CoffigYamlFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(CoffigYamlFileType.INSTANCE, new ExactFileNameMatcher("application.yaml"), new ExactFileNameMatcher("application.yml"));
}
项目:Simple-Intellij-Plugin    文件:SimpleFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(SimpleFileType.INSTANCE, "s");
}
项目:GravSupport    文件:GravConfigurationFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer consumer) {
    consumer.consume(ThemeBlueprintsFileType.INSTANCE);
}
项目:intellij-csv-validator    文件:CsvFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(CsvFileType.INSTANCE, String.join(FileTypeConsumer.EXTENSION_DELIMITER, new String[]{"csv", "CSV", "Csv"}));
}
项目:Goal-Intellij-Plugin    文件:PrologFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer consumer) {
    consumer.consume(PrologFileType.INSTANCE);
}
项目:mule-intellij-plugins    文件:RamlFileTypeFactory.java   
public void createFileTypes(@NotNull FileTypeConsumer consumer)
{
    consumer.consume(RamlFileType.INSTANCE, RamlFileType.EXTENSIONS);
}
项目:mule-intellij-plugins    文件:MelFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(MelFileType.getInstance(), "mel");
}
项目:nix-idea    文件:NixFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(NixFileType.INSTANCE, "nix");
}
项目:weex-language-support    文件:WeexFileTypeFactory.java   
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    fileTypeConsumer.consume(WeexFileType.INSTANCE);
}