Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
32,800 | String () { return myOriginalInfo; } | getOriginInfo |
32,801 | void (String originalInfo) { myOriginalInfo = originalInfo; } | setOriginalInfo |
32,802 | String () { return mySource; } | getSource |
32,803 | PsiClass () { return myClass; } | getSourceClass |
32,804 | String () { return myOriginalInfo; } | getOriginInfo |
32,805 | void (String originalInfo) { myOriginalInfo = originalInfo; } | setOriginalInfo |
32,806 | PsiType (@NotNull GrFunctionalExpression expression, int index) { final PsiElement parent = expression.getParent(); if (parent instanceof GrNamedArgument) { final Pair<PsiMethod, PsiSubstitutor> pair = getOverriddenMethod((GrNamedArgument)parent); if (pair != null) { final PsiParameter[] parameters = pair.first.getPara... | getClosureParameterType |
32,807 | PsiType[] (final Pair<PsiMethod, PsiSubstitutor> pair) { return ContainerUtil.map2Array(pair.first.getParameterList().getParameters(), PsiType.class, psiParameter -> pair.second.substitute(psiParameter.getType())); } | getParameterTypes |
32,808 | boolean (PsiMethod method) { return method.getModifierList().hasAnnotation("org.mbte.groovypp.runtime.HasDefaultImplementation"); } | hasTraitImplementation |
32,809 | List<TypeConstraint> (@NotNull GrExpression expression) { final PsiElement parent = expression.getParent(); if (parent instanceof GrListOrMap list) { if (!list.isMap()) { final PsiType listType = list.getType(); if (!(listType instanceof GrTupleType)) { return Collections.emptyList(); } return addExpectedConstructorPar... | calculateTypeConstraints |
32,810 | List<TypeConstraint> (GrListOrMap list, GrExpression arg) { GroovyConstructorReference reference = list.getConstructorReference(); if (reference == null) { return Collections.emptyList(); } GrExpression[] args = list.getInitializers(); List<TypeConstraint> result = new ArrayList<>(); for (GroovyResolveResult constructo... | addExpectedConstructorParameters |
32,811 | boolean (PsiElement element) { return element instanceof PsiFile; } | isStopElement |
32,812 | boolean (@NotNull Project project, Editor editor, PsiFile file) { return findMatchingElement(file, editor) != null; } | isAvailable |
32,813 | boolean () { return true; } | startInWriteAction |
32,814 | String () { final Class<? extends Intention> aClass = getClass(); final String name = aClass.getSimpleName(); final StringBuilder buffer = new StringBuilder(name.length() + 10); buffer.append(Character.toLowerCase(name.charAt(0))); for (int i = 1; i < name.length(); i++) { final char c = name.charAt(i); if (Character.i... | getPrefix |
32,815 | String () { return GroovyIntentionsBundle.message(getPrefix() + ".family.name"); } | getFamilyName |
32,816 | ModCommand (@NotNull ActionContext context) { final PsiElement matchingElement = findMatchingElement(context); if (matchingElement == null) { return ModCommand.nop(); } return ModCommand.psiUpdate(matchingElement, (e, updater) -> processIntention(e, context, updater)); } | perform |
32,817 | boolean (PsiElement element) { return element instanceof PsiFile; } | isStopElement |
32,818 | String () { final Class<? extends GrPsiUpdateIntention> aClass = getClass(); final String name = aClass.getSimpleName(); final StringBuilder buffer = new StringBuilder(name.length() + 10); buffer.append(Character.toLowerCase(name.charAt(0))); for (int i = 1; i < name.length(); i++) { final char c = name.charAt(i); if (... | getPrefix |
32,819 | String () { return GroovyIntentionsBundle.message(getPrefix() + ".family.name"); } | getFamilyName |
32,820 | void (@NotNull PsiType qualifierType, @Nullable PsiClass clazz, @NotNull PsiScopeProcessor processor, @NotNull PsiElement place, @NotNull ResolveState state) { if (clazz == null) return; String name = ResolveUtil.getNameHint(processor); if (name == null) return; if (!ResolveUtilKt.shouldProcessDynamicMethods(processor)... | processDynamicElements |
32,821 | String () { return "groovy.json.StreamingJsonBuilder"; } | getParentClassName |
32,822 | String () { return "groovy.json.StreamingJsonBuilder.StreamingJsonDelegate"; } | getDelegateClassName |
32,823 | GrLightMethodBuilder (@NotNull String name, @NotNull PsiElement place, @NotNull PsiType returnType, @NotNull PsiClass clazz) { GrLightMethodBuilder method = new GrLightMethodBuilder(place.getManager(), name); method.setModifiers(GrModifierFlags.PUBLIC_MASK); method.setReturnType(returnType); UtilsKt.setContainingClass(... | createMethod |
32,824 | void (GrLightMethodBuilder method) { GrLightParameter closureParam = method.addAndGetParameter("closure", GROOVY_LANG_CLOSURE); closureParam.putUserData(DELEGATES_TO_TYPE_KEY, getDelegateClassName()); closureParam.putUserData(DELEGATES_TO_STRATEGY_KEY, Closure.OWNER_FIRST); } | addClosureParameter |
32,825 | String () { return FQN; } | getParentClassName |
32,826 | GrLightMethodBuilder (@NotNull String name, @NotNull PsiClass clazz, @NotNull PsiElement context) { GrLightMethodBuilder method = new GrLightMethodBuilder(context.getManager(), name); method.setOriginInfo(ORIGIN_INFO); method.addModifier(PsiModifier.PUBLIC); method.setReturnType(JAVA_UTIL_MAP, context.getResolveScope()... | createMethod |
32,827 | String () { return getDelegateClassName(); } | getParentClassName |
32,828 | GrLightMethodBuilder (@NotNull String name, @NotNull PsiElement place, @NotNull PsiClass clazz) { GrLightMethodBuilder method = new GrLightMethodBuilder(place.getManager(), name); method.setModifiers(GrModifierFlags.PUBLIC_MASK); method.setReturnType(TypesUtil.getJavaLangObject(place)); UtilsKt.setContainingClass(metho... | createMethod |
32,829 | String () { return DELEGATE_FQN; } | getParentClassName |
32,830 | GrLightMethodBuilder (@NotNull String name, @NotNull PsiClass clazz, @NotNull PsiElement context) { GrLightMethodBuilder method = new GrLightMethodBuilder(context.getManager(), name); method.setOriginInfo(JsonBuilderContributor.ORIGIN_INFO); method.addModifier(PsiModifier.PUBLIC); UtilsKt.setContainingClass(method, cla... | createMethod |
32,831 | String () { return FQN; } | getParentClassName |
32,832 | GrLightMethodBuilder (@NotNull String name, @NotNull PsiClass clazz, @NotNull PsiElement place) { GrLightMethodBuilder res = new GrLightMethodBuilder(place.getManager(), name); res.setReturnType(JAVA_LANG_STRING, place.getResolveScope()); res.setOriginInfo(ORIGIN_INFO); UtilsKt.setContainingClass(res, clazz); return re... | createMethod |
32,833 | GroovyApplicationSettings () { return this; } | getState |
32,834 | void (@NotNull GroovyApplicationSettings groovyApplicationSettings) { XmlSerializerUtil.copyBean(groovyApplicationSettings, this); } | loadState |
32,835 | GroovyApplicationSettings () { return ApplicationManager.getApplication().getService(GroovyApplicationSettings.class); } | getInstance |
32,836 | GroovyConfigUtils () { return ourGroovyConfigUtils; } | getInstance |
32,837 | boolean (@NotNull String name) { return GROOVY_ALL_JAR_PATTERN.matcher(name).matches() && !name.contains("src") && !name.contains("doc"); } | matchesGroovyAll |
32,838 | boolean (@NotNull PsiElement element) { return getInstance().isVersionAtLeast(element, GROOVY2_5); } | isAtLeastGroovy25 |
32,839 | boolean (@NotNull PsiElement element) { return getInstance().isVersionAtLeast(element, GROOVY4_0); } | isAtLeastGroovy40 |
32,840 | boolean (Library library) { if (library == null) return false; return LibrariesUtil.getGroovyLibraryHome(library.getFiles(OrderRootType.CLASSES)) != null; } | isSDKLibrary |
32,841 | String (@NotNull final Module module) { return GroovyConfigUtilsKt.getSdkVersion(module); } | getSDKVersion |
32,842 | boolean (PsiElement psiElement, String version) { return isVersionAtLeast(psiElement, version, true); } | isVersionAtLeast |
32,843 | boolean (PsiElement psiElement, String version, boolean unknownResult) { Module module = ModuleUtilCore.findModuleForPsiElement(psiElement); if (module == null) return unknownResult; final String sdkVersion = getSDKVersion(module); if (sdkVersion == null) return unknownResult; return compareSdkVersions(sdkVersion, vers... | isVersionAtLeast |
32,844 | int (@NotNull String leftVersion, @NotNull String rightVersion) { String[] leftVersionParts = leftVersion.split("[.-]"); String[] rightVersionParts = rightVersion.split("[.-]"); int sizes = Math.max(leftVersionParts.length, rightVersionParts.length); for (int i = 0; i < sizes; ++i) { int leftNumber = getVersionPart(lef... | compareSdkVersions |
32,845 | boolean (@NotNull String version) { return version.contains(ALPHA) || version.contains(BETA) || version.contains(RC); } | isUnstable |
32,846 | int (String[] parts, int index) { String part = index < parts.length ? parts[index] : "-4"; return switch (part) { case SNAPSHOT -> 999; case ALPHA -> -3; case BETA -> -2; case RC -> -1; default -> { try { yield Integer.parseInt(part); } catch (NumberFormatException __) { yield -4; } } }; } | getVersionPart |
32,847 | String (PsiElement psiElement) { final Module module = ModuleUtilCore.findModuleForPsiElement(psiElement); if (module == null) { return NO_VERSION; } final String s = getSDKVersion(module); return s != null ? s : NO_VERSION; } | getSDKVersion |
32,848 | boolean (VirtualFile file) { if (file != null && file.isDirectory()) { final String path = file.getPath(); GroovyHomeKind kind = GroovyHomeKind.fromString(path); return kind != null; } return false; } | isSDKHome |
32,849 | Collection<String> (Library[] libraries) { return ContainerUtil.map(libraries, library -> getSDKVersion(LibrariesUtil.getGroovyLibraryHome(library))); } | getSDKVersions |
32,850 | String (@NlsSafe @NotNull String path) { String version = getSDKVersionOrNull(path); return version == null ? UNDEFINED_VERSION : version; } | getSDKVersion |
32,851 | String (String jarPath, final String jarRegex, String manifestPath) { return getSDKJarVersion(jarPath, Pattern.compile(jarRegex), manifestPath); } | getSDKJarVersion |
32,852 | String (String jarPath, final Pattern jarPattern, String manifestPath) { return getSDKJarVersion(jarPath, jarPattern, manifestPath, VERSION_GROUP_NAME); } | getSDKJarVersion |
32,853 | String (String jarPath, final Pattern jarPattern, String manifestPath, String versionGroupName) { try { File[] jars = LibrariesUtil.getFilesInDirectoryByPattern(jarPath, jarPattern); if (jars.length == 0) { return null; } if (jars.length > 1) { Arrays.sort(jars); } try (JarFile jarFile = new JarFile(jars[0])) { JarEntr... | getSDKJarVersion |
32,854 | Library[] (Project project) { if (project == null || project.isDisposed()) return Library.EMPTY_ARRAY; final LibraryTable table = LibraryTablesRegistrar.getInstance().getLibraryTable(project); final List<Library> all = ContainerUtil.findAll(table.getLibraries(), LIB_SEARCH_CONDITION); return all.toArray(Library.EMPTY_A... | getProjectSDKLibraries |
32,855 | Library[] (@Nullable Project project) { return ArrayUtil.mergeArrays(getGlobalSDKLibraries(), getProjectSDKLibraries(project)); } | getAllSDKLibraries |
32,856 | Library[] (Project project) { final List<Library> libraries = new ArrayList<>(); for (Module module : ModuleManager.getInstance(project).getModules()) { libraries.addAll(Arrays.asList(getSDKLibrariesByModule(module))); } return libraries.toArray(Library.EMPTY_ARRAY); } | getAllUsedSDKLibraries |
32,857 | Library[] () { return LibrariesUtil.getGlobalLibraries(LIB_SEARCH_CONDITION); } | getGlobalSDKLibraries |
32,858 | Library[] (final Module module) { return LibrariesUtil.getLibrariesByCondition(module, LIB_SEARCH_CONDITION); } | getSDKLibrariesByModule |
32,859 | boolean (PsiScopeProcessor processor, PsiElement place, ResolveState state) { JavaPsiFacade facade = JavaPsiFacade.getInstance(place.getProject()); PsiClass browserClass = facade.findClass("geb.Browser", place.getResolveScope()); if (browserClass != null) { if (!browserClass.processDeclarations(processor, state, null, ... | contributeMembersInsideTest |
32,860 | PsiField (@NotNull PsiClass pageOrModuleClass, @NotNull PsiType objectType, String name, @NotNull GrExpression invokedExpression, @NotNull GrClosableBlock block) { GrLightField field = new GrLightField(pageOrModuleClass, name, objectType, invokedExpression) { @Override @NotNull public PsiType getType() { PsiType type =... | extractFieldForContent |
32,861 | PsiType () { PsiType type = block.getReturnType(); return type != null ? type : super.getType(); } | getType |
32,862 | PsiType () { return null; } | getDeclaredType |
32,863 | PsiMethod (@NotNull PsiClass pageOrModuleClass, @NotNull String name, @NotNull GrExpression invokedExpression, @NotNull GrClosableBlock block) { GrLightMethodBuilder method = new GrLightMethodBuilder(pageOrModuleClass.getManager(), name) { @Override public PsiType getReturnType() { return block.getReturnType(); } }; me... | extractMethodForContent |
32,864 | PsiType () { return block.getReturnType(); } | getReturnType |
32,865 | String () { return "geb.Browser"; } | getParentClassName |
32,866 | void (@NotNull PsiType qualifierType, @Nullable PsiClass aClass, @NotNull PsiScopeProcessor processor, @NotNull PsiElement place, @NotNull ResolveState state) { if (aClass == null) return; PsiClass pageClass = JavaPsiFacade.getInstance(aClass.getProject()).findClass("geb.Page", place.getResolveScope()); if (pageClass !... | processDynamicElements |
32,867 | String () { return "geb.Module"; } | getParentClassName |
32,868 | String () { return "geb.Page"; } | getParentClassName |
32,869 | void (@NotNull PsiType qualifierType, @Nullable PsiClass aClass, @NotNull PsiScopeProcessor processor, @NotNull PsiElement place, @NotNull ResolveState state) { if (!ResolveUtilKt.shouldProcessMethods(processor) && !ResolveUtilKt.shouldProcessProperties(processor)) return; if (aClass == null) return; PsiElement grCall ... | processDynamicElements |
32,870 | boolean (PsiScopeProcessor processor, @NotNull PsiClass pageClass, ResolveState state) { Map<String, PsiClass> supers = ClassUtil.getSuperClassesWithCache(pageClass); String nameHint = ResolveUtil.getNameHint(processor); for (PsiClass psiClass : supers.values()) { Map<String, PsiMember> contentElements = GebUtil.getCon... | processPageElements |
32,871 | String () { return "geb.spock.GebSpec"; } | getParentClassName |
32,872 | void (@NotNull PsiType qualifierType, @Nullable PsiClass aClass, @NotNull PsiScopeProcessor processor, @NotNull PsiElement place, @NotNull ResolveState state) { GebUtil.contributeMembersInsideTest(processor, place, state); } | processDynamicElements |
32,873 | String () { return "geb.junit4.GebTest"; } | getParentClassName |
32,874 | void (@NotNull PsiType qualifierType, @Nullable PsiClass aClass, @NotNull PsiScopeProcessor processor, @NotNull PsiElement place, @NotNull ResolveState state) { GebUtil.contributeMembersInsideTest(processor, place, state); } | processDynamicElements |
32,875 | String () { return "geb.testng.GebTest"; } | getParentClassName |
32,876 | void (@NotNull PsiType qualifierType, @Nullable PsiClass aClass, @NotNull PsiScopeProcessor processor, @NotNull PsiElement place, @NotNull ResolveState state) { GebUtil.contributeMembersInsideTest(processor, place, state); } | processDynamicElements |
32,877 | void (@NotNull PsiElement element, int offsetInElement, @NotNull Consumer<? super PomTarget> consumer) { PsiElement grCall = element.getParent(); if (!(grCall instanceof GrMethodCall)) return; PsiElement grClosure = grCall.getParent(); if (!(grClosure instanceof GrClosableBlock)) return; PsiElement contentField = grClo... | findDeclarationsAt |
32,878 | void (@NotNull GrCall call, @NotNull GroovyResolveResult resolveResult, @Nullable String argumentName, boolean forCompletion, @NotNull Map<String, NamedArgumentDescriptor> result) { PsiElement resolve = resolveResult.getElement(); PsiType returnType = resolve == null ? null : ((PsiMethod)resolve).getReturnType(); PsiCl... | getNamedArguments |
32,879 | PsiElement () { PsiElement res = super.getNavigationElement(); if (res != this || myNavigationClass == null) return res; PsiClass aClass = JavaPsiFacade.getInstance(getProject()).findClass(myNavigationClass, getResolveScope()); if (aClass == null) return res; PsiMethod[] methods = aClass.findMethodsByName("newInstance"... | getNavigationElement |
32,880 | void (String navigationClass) { myNavigationClass = navigationClass; } | setNavigationClass |
32,881 | PsiType (@NotNull String typeName) { PsiType res = myTypeMap.get(typeName); if (res == null) { res = myFactory.createTypeByFQClassName(typeName, myResolveScope); myTypeMap.put(typeName, res); } return res; } | type |
32,882 | void (@NotNull PsiMethod method) { myResult.putValue(method.getName(), method); } | add |
32,883 | MyMethodBuilder (String name, String returnType, @Nullable String navigationClass) { MyMethodBuilder res = new MyMethodBuilder(myManager, name); res.setModifiers(GrModifierFlags.PUBLIC_MASK); res.setReturnType(type(returnType)); res.setContainingClass(mySwingBuilderClass); if (navigationClass != null) { assert navigati... | method |
32,884 | void (@NlsSafe String name, String returnType, @Nullable String navigationClass) { methodObject(name, returnType, navigationClass, null); } | methodObject |
32,885 | void (@NlsSafe String name, @NlsSafe String returnType, @Nullable String navigationClass, @Nullable Map<@NlsSafe String, NamedArgumentDescriptor> namedArg) { MyMethodBuilder method = method(name, returnType, navigationClass); method.addParameter("map", type(CommonClassNames.JAVA_UTIL_MAP), true); method.addParameter("p... | methodObject |
32,886 | void (String name, String realMethodName) { for (PsiMethod method : mySwingBuilderClass.findMethodsByName(realMethodName, false)) { add(GrMethodWrapper.wrap(method)); } } | registerExplicitMethod |
32,887 | void () { // registerSupportNodes() methodObject("action", "javax.swing.Action", "groovy.swing.factory.ActionFactory"); methodObject("actions", CommonClassNames.JAVA_UTIL_LIST, "groovy.swing.factory.CollectionFactory"); methodObject("map", CommonClassNames.JAVA_UTIL_MAP, "groovy.swing.factory.MapFactory"); methodObject... | generateMethods |
32,888 | void (@NotNull PsiType qualifierType, @Nullable PsiClass aClass, @NotNull PsiScopeProcessor processor, @NotNull PsiElement place, @NotNull ResolveState state) { if (aClass == null) return; if (!ResolveUtil.shouldProcessMethods(processor.getHint(ElementClassHint.KEY))) return; MultiMap<String, PsiMethod> methodMap = aCl... | processDynamicElements |
32,889 | String () { return "groovy.swing.SwingBuilder"; } | getParentClassName |
32,890 | void (@NotNull GrCall call, @NotNull GroovyResolveResult resolveResult, @Nullable String argumentName, boolean forCompletion, @NotNull Map<String, NamedArgumentDescriptor> result) { GrArgumentList argumentList = call.getArgumentList(); if (argumentList == null) return; GrExpression[] expressionArguments = argumentList.... | getNamedArguments |
32,891 | void (@NotNull GrCall call, PsiClassType type, @Nullable String argumentName, final Map<String, NamedArgumentDescriptor> result) { if (argumentName == null) { final HashMap<String, Trinity<PsiType, PsiElement, PsiSubstitutor>> map = new HashMap<>(); MyPsiScopeProcessor processor = new MyPsiScopeProcessor() { @Override ... | processClass |
32,892 | void (String propertyName, PsiType type, PsiElement element, PsiSubstitutor substitutor) { if (result.containsKey(propertyName)) return; Trinity<PsiType, PsiElement, PsiSubstitutor> pair = map.get(propertyName); if (pair != null) { if (element instanceof PsiMethod && pair.second instanceof PsiField) { // methods should... | addNamedArgument |
32,893 | void (String propertyName, PsiType type, PsiElement element, PsiSubstitutor substitutor) { if (result.containsKey(propertyName)) return; result.put(propertyName, new TypeCondition(type, element, substitutor, NamedArgumentDescriptor.Priority.AS_LOCAL_VARIABLE)); } | addNamedArgument |
32,894 | boolean (PsiClass aClass) { PsiMethod[] constructors = aClass.getConstructors(); if (constructors.length == 0) return true; for (PsiMethod constructor : constructors) { PsiParameterList parameterList = constructor.getParameterList(); PsiParameter[] parameters = parameterList.getParameters(); if (parameters.length == 0)... | isClassHasConstructorWithMap |
32,895 | boolean (@NotNull PsiElement element, @NotNull ResolveState state) { if (element instanceof PsiMethod || element instanceof PsiField) { String propertyName; PsiType type; if (element instanceof PsiMethod method) { if (!myResolveTargetKinds.contains(DeclarationKind.METHOD)) return true; if (!GroovyPropertyUtils.isSimple... | execute |
32,896 | boolean (@NotNull DeclarationKind kind) { return myResolveTargetKinds.contains(kind); } | shouldProcess |
32,897 | String (@NotNull ResolveState state) { return myNameHint; } | getName |
32,898 | void (String nameHint) { myNameHint = nameHint; } | setNameHint |
32,899 | void (EnumSet<DeclarationKind> resolveTargetKinds) { myResolveTargetKinds = resolveTargetKinds; } | setResolveTargetKinds |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.