DirectoryPathMatcher (@NotNull GotoFileModel model, @NotNull String pattern) { DirectoryPathMatcher matcher = new DirectoryPathMatcher(model, null, ""); for (int i = 0; i < pattern.length(); i++) { matcher = matcher.appendChar(pattern.charAt(i)); if (matcher == null) return null; } return matcher; }