StringPattern (final @NonNls @NotNull String s) { return with(new PatternCondition<String>("startsWith") { @Override public boolean accepts(final @NotNull String str, final ProcessingContext context) { return StringUtil.startsWith(str, s); } }); }