Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
287,900 | ElementPatternCondition<T> (PatternCondition<? super T> condition) { return new ElementPatternCondition<>(this, condition); } | append |
287,901 | ElementPattern<String> () { return getValuePattern(); } | getNamePattern |
287,902 | String (final @NotNull Object o) { return o instanceof PsiNamedElement ? ((PsiNamedElement)o).getName() : null; } | getPropertyValue |
287,903 | boolean (final @NotNull PomTargetPsiElement element, final ProcessingContext context) { return targetPattern.accepts(element.getTarget(), context); } | accepts |
287,904 | IElementTypePattern () { return new IElementTypePattern(); } | elementType |
287,905 | VirtualFilePattern () { return new VirtualFilePattern(); } | virtualFile |
287,906 | ElementPattern () { return myValuePattern; } | getValuePattern |
287,907 | boolean (final @NotNull Target t, final ProcessingContext context) { return !processValues(t, context, this); } | accepts |
287,908 | boolean (Value p, ProcessingContext context) { return !myValuePattern.accepts(p, context); } | process |
287,909 | boolean (T t, ProcessingContext context, PairProcessor<? super P, ? super ProcessingContext> processor) { return processor.process(getPropertyValue(t), context); } | processValues |
287,910 | StringPattern () { return StringPattern.STRING_PATTERN; } | string |
287,911 | CharPattern () { return new CharPattern(); } | character |
287,912 | boolean (final @Nullable Object o, final ProcessingContext context) { context.put(key, (T)o); return true; } | accepts |
287,913 | void (final @NotNull @NonNls StringBuilder builder, final String indent) { builder.append("save(").append(key).append(")"); } | append |
287,914 | ElementPattern (final @NotNull @NonNls String key) { return new ObjectPattern.Capture(new InitialPatternCondition(Object.class) { @Override public boolean accepts(final @Nullable Object o, final ProcessingContext context) { return Comparing.equal(o, context.get(key)); } @Override public void append(final @NotNull @NonNls StringBuilder builder, final String indent) { builder.append("get(").append(key).append(")"); } }); } | get |
287,915 | boolean (final @Nullable Object o, final ProcessingContext context) { return Comparing.equal(o, context.get(key)); } | accepts |
287,916 | void (final @NotNull @NonNls StringBuilder builder, final String indent) { builder.append("get(").append(key).append(")"); } | append |
287,917 | boolean (final @Nullable Object o, final ProcessingContext context) { for (ElementPattern<?> pattern : patterns) { if (pattern.accepts(o, context)) { return true; } } return false; } | accepts |
287,918 | void (final @NotNull @NonNls StringBuilder builder, final String indent) { boolean first = true; for (ElementPattern<?> pattern : patterns) { if (!first) { builder.append("\n").append(indent); } first = false; pattern.getCondition().append(builder, indent + " "); } } | append |
287,919 | boolean (final @Nullable Object o, final ProcessingContext context) { for (final InitialPatternCondition pattern : initial) { if (!pattern.accepts(o, context)) return false; } return true; } | accepts |
287,920 | void (final @NotNull @NonNls StringBuilder builder, final String indent) { boolean first = true; for (final InitialPatternCondition pattern : initial) { if (!first) { builder.append("\n").append(indent); } first = false; pattern.append(builder, indent + " "); } } | append |
287,921 | boolean (final @Nullable Object o, final ProcessingContext context) { return !pattern.accepts(o, context); } | accepts |
287,922 | void (final @NotNull @NonNls StringBuilder builder, final String indent) { pattern.getCondition().append(builder.append("not("), indent + " "); builder.append(")"); } | append |
287,923 | boolean (final @Nullable Object o, final ProcessingContext context) { pattern.accepts(o, context); return true; } | accepts |
287,924 | boolean (@Nullable Object o) { return false; } | accepts |
287,925 | boolean (@Nullable Object o, ProcessingContext context) { return false; } | accepts |
287,926 | ElementPatternCondition () { return new ElementPatternCondition(new InitialPatternCondition(Object.class) { @Override public boolean accepts(@Nullable Object o, ProcessingContext context) { return false; } }); } | getCondition |
287,927 | boolean (@Nullable Object o, ProcessingContext context) { return false; } | accepts |
287,928 | IElementTypePattern (final IElementType @NotNull ... types) { return tokenSet(TokenSet.create(types)); } | or |
287,929 | IElementTypePattern (final @NotNull TokenSet tokenSet) { return with(new PatternCondition<IElementType>("tokenSet") { @Override public boolean accepts(final @NotNull IElementType type, final ProcessingContext context) { return tokenSet.contains(type); } }); } | tokenSet |
287,930 | boolean (final @NotNull IElementType type, final ProcessingContext context) { return tokenSet.contains(type); } | accepts |
287,931 | VirtualFilePattern (final FileType type) { // Avoid capturing FileType instance if plugin providing the file type is unloaded String fileTypeName = type.getName(); return with(new PatternCondition<VirtualFile>("ofType") { @Override public boolean accepts(final @NotNull VirtualFile virtualFile, final ProcessingContext context) { return virtualFile.getFileType().getName().equals(fileTypeName); } }); } | ofType |
287,932 | boolean (final @NotNull VirtualFile virtualFile, final ProcessingContext context) { return virtualFile.getFileType().getName().equals(fileTypeName); } | accepts |
287,933 | VirtualFilePattern (final String name) { return withName(StandardPatterns.string().equalTo(name)); } | withName |
287,934 | VirtualFilePattern (@NotNull @NonNls String @NotNull ... alternatives) { return with(new PatternCondition<VirtualFile>("withExtension") { @Override public boolean accepts(final @NotNull VirtualFile virtualFile, final ProcessingContext context) { final String extension = virtualFile.getExtension(); return ArrayUtil.contains(extension, alternatives); } }); } | withExtension |
287,935 | boolean (final @NotNull VirtualFile virtualFile, final ProcessingContext context) { final String extension = virtualFile.getExtension(); return ArrayUtil.contains(extension, alternatives); } | accepts |
287,936 | VirtualFilePattern (final @NonNls @NotNull String extension) { return with(new PatternCondition<VirtualFile>("withExtension") { @Override public boolean accepts(final @NotNull VirtualFile virtualFile, final ProcessingContext context) { return extension.equals(virtualFile.getExtension()); } }); } | withExtension |
287,937 | boolean (final @NotNull VirtualFile virtualFile, final ProcessingContext context) { return extension.equals(virtualFile.getExtension()); } | accepts |
287,938 | VirtualFilePattern (final ElementPattern<String> namePattern) { return with(new PatternCondition<VirtualFile>("withName") { @Override public boolean accepts(final @NotNull VirtualFile virtualFile, final ProcessingContext context) { return namePattern.accepts(virtualFile.getName(), context); } }); } | withName |
287,939 | boolean (final @NotNull VirtualFile virtualFile, final ProcessingContext context) { return namePattern.accepts(virtualFile.getName(), context); } | accepts |
287,940 | VirtualFilePattern (final ElementPattern<String> pathPattern) { return with(new PatternCondition<VirtualFile>("withName") { @Override public boolean accepts(final @NotNull VirtualFile virtualFile, final ProcessingContext context) { return pathPattern.accepts(virtualFile.getPath(), context); } }); } | withPath |
287,941 | boolean (final @NotNull VirtualFile virtualFile, final ProcessingContext context) { return pathPattern.accepts(virtualFile.getPath(), context); } | accepts |
287,942 | VirtualFile (final @NotNull VirtualFile t) { return t.getParent(); } | getParent |
287,943 | VirtualFile[] (final @NotNull VirtualFile file) { return file.getChildren(); } | getChildren |
287,944 | boolean (final @Nullable Object o, final ProcessingContext context) { return o instanceof String; } | accepts |
287,945 | void (final @NotNull @NonNls StringBuilder builder, final String indent) { builder.append("string()"); } | append |
287,946 | 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); } }); } | startsWith |
287,947 | boolean (final @NotNull String str, final ProcessingContext context) { return StringUtil.startsWith(str, s); } | accepts |
287,948 | StringPattern (final @NonNls @NotNull String s) { return with(new PatternCondition<String>("endsWith") { @Override public boolean accepts(final @NotNull String str, final ProcessingContext context) { return StringUtil.endsWith(str, s); } }); } | endsWith |
287,949 | boolean (final @NotNull String str, final ProcessingContext context) { return StringUtil.endsWith(str, s); } | accepts |
287,950 | StringPattern (final @NonNls @NotNull String s) { return with(new PatternCondition<String>("contains") { @Override public boolean accepts(final @NotNull String str, final ProcessingContext context) { return StringUtil.contains(str, s); } }); } | contains |
287,951 | boolean (final @NotNull String str, final ProcessingContext context) { return StringUtil.contains(str, s); } | accepts |
287,952 | StringPattern (final @NonNls @NotNull String s) { return with(new PatternCondition<String>("containsChars") { @Override public boolean accepts(final @NotNull String str, final ProcessingContext context) { return StringUtil.containsAnyChar(str, s); } }); } | containsChars |
287,953 | boolean (final @NotNull String str, final ProcessingContext context) { return StringUtil.containsAnyChar(str, s); } | accepts |
287,954 | StringPattern (final @NonNls @NotNull String s) { final String escaped = StringUtil.escapeToRegexp(s); if (escaped.equals(s)) { return equalTo(s); } // may throw PatternSyntaxException here final Pattern pattern = Pattern.compile(s); return with(new ValuePatternCondition<String>("matches") { @Override public boolean accepts(final @NotNull String str, final ProcessingContext context) { return pattern.matcher(newBombedCharSequence(str)).matches(); } @Override public Collection<String> getValues() { return Collections.singleton(s); } }); } | matches |
287,955 | boolean (final @NotNull String str, final ProcessingContext context) { return pattern.matcher(newBombedCharSequence(str)).matches(); } | accepts |
287,956 | Collection<String> () { return Collections.singleton(s); } | getValues |
287,957 | StringPattern (final @NonNls @NotNull ElementPattern<Character> pattern) { return with(new PatternCondition<String>("contains") { @Override public boolean accepts(final @NotNull String str, final ProcessingContext context) { for (int i = 0; i < str.length(); i++) { if (pattern.accepts(str.charAt(i))) return true; } return false; } }); } | contains |
287,958 | boolean (final @NotNull String str, final ProcessingContext context) { for (int i = 0; i < str.length(); i++) { if (pattern.accepts(str.charAt(i))) return true; } return false; } | accepts |
287,959 | StringPattern (final int minLength) { return with(new PatternCondition<String>("longerThan") { @Override public boolean accepts(final @NotNull String s, final ProcessingContext context) { return s.length() > minLength; } }); } | longerThan |
287,960 | boolean (final @NotNull String s, final ProcessingContext context) { return s.length() > minLength; } | accepts |
287,961 | StringPattern (final int maxLength) { return with(new PatternCondition<String>("shorterThan") { @Override public boolean accepts(final @NotNull String s, final ProcessingContext context) { return s.length() < maxLength; } }); } | shorterThan |
287,962 | boolean (final @NotNull String s, final ProcessingContext context) { return s.length() < maxLength; } | accepts |
287,963 | StringPattern (final int length) { return with(new PatternCondition<String>("withLength") { @Override public boolean accepts(final @NotNull String s, final ProcessingContext context) { return s.length() == length; } }); } | withLength |
287,964 | boolean (final @NotNull String s, final ProcessingContext context) { return s.length() == length; } | accepts |
287,965 | StringPattern (final @NonNls String @NotNull ... values) { return super.oneOf(values); } | oneOf |
287,966 | StringPattern (final @NonNls String... values) { return with(new CaseInsensitiveValuePatternCondition("oneOfIgnoreCase", values)); } | oneOfIgnoreCase |
287,967 | StringPattern (final @NonNls Collection<String> set) { return super.oneOf(set); } | oneOf |
287,968 | CharSequence (@NotNull CharSequence sequence) { if (sequence instanceof StringUtil.BombedCharSequence) return sequence; return new StringUtil.BombedCharSequence(sequence) { @Override protected void checkCanceled() { ProgressManager.checkCanceled(); } }; } | newBombedCharSequence |
287,969 | void () { ProgressManager.checkCanceled(); } | checkCanceled |
287,970 | CharPattern () { return with(new PatternCondition<Character>("javaIdentifierPart") { @Override public boolean accepts(final @NotNull Character character, final ProcessingContext context) { return Character.isJavaIdentifierPart(character.charValue()); } }); } | javaIdentifierPart |
287,971 | boolean (final @NotNull Character character, final ProcessingContext context) { return Character.isJavaIdentifierPart(character.charValue()); } | accepts |
287,972 | CharPattern () { return with(new PatternCondition<Character>("javaIdentifierStart") { @Override public boolean accepts(final @NotNull Character character, final ProcessingContext context) { return Character.isJavaIdentifierStart(character.charValue()); } }); } | javaIdentifierStart |
287,973 | boolean (final @NotNull Character character, final ProcessingContext context) { return Character.isJavaIdentifierStart(character.charValue()); } | accepts |
287,974 | CharPattern () { return with(new PatternCondition<Character>("whitespace") { @Override public boolean accepts(final @NotNull Character character, final ProcessingContext context) { return Character.isWhitespace(character.charValue()); } }); } | whitespace |
287,975 | boolean (final @NotNull Character character, final ProcessingContext context) { return Character.isWhitespace(character.charValue()); } | accepts |
287,976 | CharPattern () { return with(new PatternCondition<Character>("letterOrDigit") { @Override public boolean accepts(final @NotNull Character character, final ProcessingContext context) { return Character.isLetterOrDigit(character.charValue()); } }); } | letterOrDigit |
287,977 | boolean (final @NotNull Character character, final ProcessingContext context) { return Character.isLetterOrDigit(character.charValue()); } | accepts |
287,978 | CharPattern () { return ourJavaIdentifierStartCharacter; } | javaIdentifierStartCharacter |
287,979 | CharPattern () { return ourJavaIdentifierPartCharacter; } | javaIdentifierPartCharacter |
287,980 | CharPattern () { return ourLetterOrDigitCharacter; } | letterOrDigitCharacter |
287,981 | CharPattern () { return ourWhitespaceCharacter; } | whitespaceCharacter |
287,982 | boolean (final @Nullable Object o, final ProcessingContext context) { return aClass.isInstance(o); } | accepts |
287,983 | boolean (@Nullable Object t) { return accepts(t, new ProcessingContext()); } | accepts |
287,984 | boolean (final @Nullable Object o, final ProcessingContext context) { if (!myInitialCondition.accepts(o, context)) return false; if (myConditions == null) return true; if (o == null) return false; if (myConditions instanceof PatternCondition) { return ((PatternCondition)myConditions).accepts(o, context); } List<PatternCondition<T>> list = (List<PatternCondition<T>>)myConditions; final int listSize = list.size(); //noinspection ForLoopReplaceableByForEach for (int i = 0; i < listSize; i++) { if (!list.get(i).accepts((T)o, context)) return false; } return true; } | accepts |
287,985 | ElementPatternCondition<T> () { if (myConditions == null) { return new ElementPatternCondition<>(myInitialCondition); } if (myConditions instanceof PatternCondition) { PatternCondition<? super T> singleCondition = (PatternCondition)myConditions; return new ElementPatternCondition<>(myInitialCondition, Collections.singletonList(singleCondition)); } return new ElementPatternCondition<>(myInitialCondition, (List)myConditions); } | getCondition |
287,986 | Self (final ElementPattern pattern) { ElementPattern<T> not = StandardPatterns.not(pattern); return and(not); } | andNot |
287,987 | Self (ElementPattern @NotNull ... patterns) { ElementPattern or = StandardPatterns.or(patterns); return and(or); } | andOr |
287,988 | Self (final ElementPattern pattern) { return with(new PatternConditionPlus<T, T>("and", pattern) { @Override public boolean processValues(T t, ProcessingContext context, PairProcessor<? super T, ? super ProcessingContext> processor) { return processor.process(t, context); } }); } | and |
287,989 | boolean (T t, ProcessingContext context, PairProcessor<? super T, ? super ProcessingContext> processor) { return processor.process(t, context); } | processValues |
287,990 | Self (final @NotNull T o) { return with(new ValuePatternCondition<T>("equalTo") { @Override public boolean accepts(final @NotNull T t, final ProcessingContext context) { return t.equals(o); } @Override public Collection<T> getValues() { return Collections.singletonList(o); } }); } | equalTo |
287,991 | boolean (final @NotNull T t, final ProcessingContext context) { return t.equals(o); } | accepts |
287,992 | Collection<T> () { return Collections.singletonList(o); } | getValues |
287,993 | Self (final T @NotNull ... values) { final Collection<T> list; final int length = values.length; if (length == 1) { list = Collections.singletonList(values[0]); } else if (length >= 11) { list = ContainerUtil.newHashSet(values); } else { list = Arrays.asList(values); } return with(new ValuePatternCondition<T>("oneOf") { @Override public Collection<T> getValues() { return list; } @Override public boolean accepts(@NotNull T t, ProcessingContext context) { return list.contains(t); } }); } | oneOf |
287,994 | Collection<T> () { return list; } | getValues |
287,995 | boolean (@NotNull T t, ProcessingContext context) { return list.contains(t); } | accepts |
287,996 | Self (final Collection<T> set) { return with(new ValuePatternCondition<T>("oneOf") { @Override public Collection<T> getValues() { return set; } @Override public boolean accepts(@NotNull T t, ProcessingContext context) { return set.contains(t); } }); } | oneOf |
287,997 | Collection<T> () { return set; } | getValues |
287,998 | boolean (@NotNull T t, ProcessingContext context) { return set.contains(t); } | accepts |
287,999 | Self () { //noinspection Convert2Diamond (would break compilation: IDEA-168317) return adapt(new ElementPatternCondition<T>(new InitialPatternCondition(Object.class) { @Override public boolean accepts(final @Nullable Object o, final ProcessingContext context) { return o == null; } })); } | isNull |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.