当前位置: 首页>>代码示例>>Java>>正文


Java FileTypeConsumer类代码示例

本文整理汇总了Java中com.intellij.openapi.fileTypes.FileTypeConsumer的典型用法代码示例。如果您正苦于以下问题:Java FileTypeConsumer类的具体用法?Java FileTypeConsumer怎么用?Java FileTypeConsumer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FileTypeConsumer类属于com.intellij.openapi.fileTypes包,在下文中一共展示了FileTypeConsumer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@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);
        }
      });
}
 
开发者ID:wangyanxing,项目名称:Buck-IntelliJ-Plugin,代码行数:18,代码来源:BuckFileTypeFactory.java

示例2: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@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);
        }
      });
}
 
开发者ID:facebook,项目名称:buck,代码行数:19,代码来源:BuckFileTypeFactory.java

示例3: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@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";
		}
	});
}
 
开发者ID:syuchan1005,项目名称:EmojiPrefix,代码行数:16,代码来源:EmojiResourceFileTypeFactory.java

示例4: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@Override
public void createFileTypes(@NotNull final FileTypeConsumer consumer) {
    consumer.consume(
        FlexibleSearchFileType.getInstance(),
        FlexibleSearchFileType.getInstance().getDefaultExtension()
    );
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:8,代码来源:FlexibleSearchTypeFactory.java

示例5: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
    WeaveFileType weaveFileType = WeaveFileType.getInstance();

    for (String extension : weaveFileType.getExtensions())
        fileTypeConsumer.consume(weaveFileType, extension);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:8,代码来源:WeaveFileTypeFactory.java

示例6: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
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";
        }
    });
}
 
开发者ID:CloudSlang,项目名称:cs-intellij-plugin,代码行数:16,代码来源:CloudSlangFileTypeFactory.java

示例7: parse

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@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;
}
 
开发者ID:protostuff,项目名称:protobuf-jetbrains-plugin,代码行数:14,代码来源:ProtostuffPluginController.java

示例8: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ImageFileTypeManagerImpl.java

示例9: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:XmlFileTypeFactory.java

示例10: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AndroidFileTypeFactory.java

示例11: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@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);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:10,代码来源:ProjectViewFileTypeFactory.java

示例12: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@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]));
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:10,代码来源:BuildFileTypeFactory.java

示例13: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@Override
public void createFileTypes(@NotNull FileTypeConsumer consumer)
{
	consumer.consume(Unity3dMetaFileType.INSTANCE);
	consumer.consume(Unity3dBinaryAssetFileType.INSTANCE);
	consumer.consume(Unity3dYMLAssetFileType.INSTANCE);
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:8,代码来源:Unity3dFileTypeFactory.java

示例14: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
@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());
	}
}
 
开发者ID:consulo,项目名称:consulo-visual-studio,代码行数:11,代码来源:VisualStudioFileTypeFactory.java

示例15: createFileTypes

import com.intellij.openapi.fileTypes.FileTypeConsumer; //导入依赖的package包/类
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));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:XmlFileTypeFactory.java


注:本文中的com.intellij.openapi.fileTypes.FileTypeConsumer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。