本文整理汇总了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);
}
});
}
示例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);
}
});
}
示例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";
}
});
}
示例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);
}
示例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";
}
});
}
示例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;
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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]));
}
示例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);
}
示例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());
}
}
示例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));
}