@NotNull public FileNameMatcher createMatcher(@NotNull String pattern) { if (pattern.startsWith("*.") && pattern.indexOf('*', 2) < 0 && pattern.indexOf('.', 2) < 0 && pattern.indexOf('?', 2) < 0) { return new ExtensionFileNameMatcher(pattern.substring(2).toLowerCase()); } if (pattern.contains("*") || pattern.contains("?")) { return new WildcardFileNameMatcher(pattern); } return new ExactFileNameMatcher(pattern); }
@Override public void createFileTypes(@NotNull FileTypeConsumer consumer) { consumer.consume(JetFileType.INSTANCE, "jet"); consumer.consume(JetFileType.INSTANCE, new WildcardFileNameMatcher("*.jet.html")); }