Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
34,400 | String () { return "Groovy script"; } | toString |
34,401 | boolean (@NotNull PsiClass aClass) { return addImportForClass(aClass) != null; } | importClass |
34,402 | void (GrVariable variable) { PsiImplUtil.removeVariable(variable); } | removeVariable |
34,403 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitFile(this); } | accept |
34,404 | void (@NotNull GroovyElementVisitor visitor) { PsiElement child = getFirstChild(); while (child != null) { if (child instanceof GroovyPsiElement) { ((GroovyPsiElement) child).accept(visitor); } child = child.getNextSibling(); } } | acceptChildren |
34,405 | void () { super.clearCaches(); myControlFlow = null; } | clearCaches |
34,406 | Instruction[] () { return getGroovyControlFlow().getFlow(); } | getControlFlow |
34,407 | GroovyControlFlow () { assert isValid(); GroovyControlFlow result = dereference(myControlFlow); if (result == null) { result = ControlFlowBuilder.buildControlFlow(this); myControlFlow = new SoftReference<>(result); } return result; } | getGroovyControlFlow |
34,408 | boolean () { return false; } | isTopControlFlowOwner |
34,409 | boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, @Nullable PsiElement lastParent, @NotNull PsiElement place) { for (PsiScopeProcessor each : MultiProcessor.allProcessors(processor)) { if (!shouldProcessMembers(each)) continue; if (!getAppropriateHolder(getAnnotationHint(processor)).processDec... | processDeclarations |
34,410 | DeclarationHolder (@Nullable AnnotationHint hint) { boolean mayUseCache = useCache(); if (hint == null) { if (mayUseCache || myAnnotationsCache.hasUpToDateValue() && myDeclarationsCache.hasUpToDateValue()) { return myAllCachedDeclarations; } } else if (hint.isAnnotationResolve()) { if (mayUseCache || myAnnotationsCache... | getAppropriateHolder |
34,411 | boolean () { if (!isPhysical()) return false; if (ApplicationManager.getApplication().isDispatchThread()) return false; return getUserData(PsiFileEx.BATCH_REFERENCE_PROCESSING) == Boolean.TRUE; } | useCache |
34,412 | DeclarationHolder (boolean annotationCache) { FileCacheBuilderProcessor processor = new FileCacheBuilderProcessor(annotationCache); processDeclarationsNoCache(processor, ResolveState.initial(), this); return processor.buildCache(); } | buildCache |
34,413 | boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, @NotNull PsiElement place) { if (!processClassesInFile(this, processor, state)) return false; final GroovyFileImports imports = getImports(); if (!imports.processAllNamedImports(processor, state, place)) return false; if (!processClassesInPacka... | processDeclarationsNoCache |
34,414 | boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, @NotNull PsiElement place) { final GroovyFileImports imports = getImports(); if (!imports.processAllStarImports(processor, state, place)) return false; return imports.processDefaultImports(processor, state, place); } | processComplexImports |
34,415 | PsiType (String key) { return myStringEntries.get(key); } | getTypeByStringKey |
34,416 | Set<String> () { return myStringEntries.keySet(); } | getStringKeys |
34,417 | List<Couple<PsiType>> () { return myOtherEntries; } | getOtherEntries |
34,418 | boolean () { for (PsiType type : myStringEntries.values()) { if (type != null && !type.isValid()) { return false; } } for (Couple<PsiType> entry : myOtherEntries) { if (entry.first != null && !entry.first.isValid()) { return false; } if (entry.second != null && !entry.second.isValid()) { return false; } } return true; ... | isValid |
34,419 | boolean () { return myStringEntries.isEmpty() && myOtherEntries.isEmpty(); } | isEmpty |
34,420 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GrMapTypeImpl type = (GrMapTypeImpl)o; if (!myStringEntries.equals(type.myStringEntries)) return false; if (!myOtherEntries.equals(type.myOtherEntries)) return false; return true; } | equals |
34,421 | int () { int result = super.hashCode(); result = 31 * result + myStringEntries.hashCode(); result = 31 * result + myOtherEntries.hashCode(); return result; } | hashCode |
34,422 | PsiElement (@NotNull PsiReference ref, int flags) { PsiElement sourceElement = ref.getElement(); if (sourceElement instanceof GrCodeReferenceElement) { GrNewExpression newExpr; PsiElement parent = sourceElement.getParent(); if (parent instanceof GrNewExpression) { newExpr = (GrNewExpression)parent; } else if (parent in... | getElementByReference |
34,423 | PsiElement (@Nullable PsiElement target) { if (target instanceof ClsMethodImpl) { PsiElement mirror = ((ClsMethodImpl)target).getSourceMirrorMethod(); if (mirror != null) { return mirror.getNavigationElement(); } } if (target != null && !(target instanceof GrAccessorMethod) && target.getUserData(NAVIGATION_ELEMENT_IS_N... | correctSearchTargets |
34,424 | Collection<PsiElement> (@NotNull PsiReference reference) { if (reference instanceof GrReferenceExpression referenceExpression) { if (referenceExpression.hasMemberPointer()) { GroovyResolveResult[] results = referenceExpression.multiResolve(false); if (results.length > 0) { return collapseReflectedMethods(mapNotNull(res... | getTargetCandidates |
34,425 | PsiElement (Editor editor, int offset, int flags, @NotNull PsiElement targetElement) { if (targetElement instanceof GrPropertyForCompletion) { return ((GrPropertyForCompletion)targetElement).getOriginalAccessor(); } return super.adjustTargetElement(editor, offset, flags, targetElement); } | adjustTargetElement |
34,426 | PsiType (@NotNull GrReferenceExpression refExpr, boolean honorCompileStatic) { if (honorCompileStatic && !CompileStaticUtil.isCompileStatic(refExpr) || refExpr.getQualifier() != null) { return null; } final PsiElement resolved = refExpr.resolve(); if (!PsiUtil.isLocalVariable(resolved)) { return null; } assert resolved... | getReassignedVarType |
34,427 | PsiType (@NotNull final GrVariable var) { return RecursionManager.doPreventingRecursion(var, false, (NullableComputable<PsiType>)() -> { final Collection<PsiReference> all = ReferencesSearch.search(var, var.getUseScope()).findAll(); final GrExpression initializer = var.getInitializerGroovy(); if (initializer == null &&... | getLeastUpperBoundByVar |
34,428 | boolean (PsiElement element, String expectedName, GroovyFile file) { if (!(element instanceof PsiClass psiClass)) return false; if (!expectedName.equals(psiClass.getName())) return false; final String qname = psiClass.getQualifiedName(); if (qname == null) return false; if (ArrayUtil.contains(qname, GroovyFileBase.IMPL... | isImplicitlyImported |
34,429 | LinkedHashSet<String> (@NotNull GroovyFile file) { final LinkedHashSet<String> result = new LinkedHashSet<>(); ContainerUtil.addAll(result, GroovyFileBase.IMPLICITLY_IMPORTED_PACKAGES); final GroovyFileImports fileImports = file.getImports(); for (StarImport starImport : fileImports.getStarImports()) { if (!fileImports... | getImplicitlyImportedPackages |
34,430 | String () { return CommonClassNames.JAVA_UTIL_LIST; } | getJavaClassName |
34,431 | String () { List<PsiType> types = getComponentTypes(); StringBuilder builder = new StringBuilder(); builder.append("["); for (int i = 0; i < types.size(); i++) { if (i >= 2) { builder.append(",..."); break; } if (i > 0) builder.append(", "); builder.append(getInternalCanonicalText(types.get(i))); } builder.append("]");... | getInternalCanonicalText |
34,432 | boolean (Object obj) { if (obj instanceof GrTupleType) { List<PsiType> componentTypes = getComponentTypes(); List<PsiType> otherComponents = ((GrTupleType)obj).getComponentTypes(); return componentTypes.size() == otherComponents.size() && componentTypes.equals(otherComponents); } return super.equals(obj); } | equals |
34,433 | boolean (@NotNull PsiType type) { if (type instanceof GrTupleType) { List<PsiType> otherComponents = ((GrTupleType)type).getComponentTypes(); List<PsiType> componentTypes = getComponentTypes(); for (int i = 0; i < Math.min(componentTypes.size(), otherComponents.size()); i++) { PsiType componentType = componentTypes.get... | isAssignableFrom |
34,434 | List<PsiType> () { return myComponents.getValue(); } | getComponentTypes |
34,435 | PsiClassType (@NotNull LanguageLevel languageLevel) { return new GrImmediateTupleType(getComponentTypes(), myFacade, getResolveScope()); } | setLanguageLevel |
34,436 | String (@NotNull PsiAnnotation annotation, @NlsSafe @NotNull String attributeName) { final PsiAnnotationMemberValue targetValue = annotation.findAttributeValue(attributeName); return getString(targetValue); } | inferStringAttribute |
34,437 | GrClosableBlock (@NotNull PsiAnnotation annotation, @NlsSafe @NotNull String attributeName) { PsiAnnotationMemberValue targetValue = annotation.findAttributeValue(attributeName); if (targetValue instanceof GrClosableBlock) { return (GrClosableBlock)targetValue; } return null; } | inferClosureAttribute |
34,438 | String (@Nullable PsiAnnotationMemberValue targetValue) { if (targetValue instanceof PsiLiteral) { final Object value = ((PsiLiteral)targetValue).getValue(); if (value instanceof String) return (String)value; } return null; } | getString |
34,439 | Integer (@NotNull PsiAnnotation annotation, @NlsSafe @NotNull String attributeName) { final PsiAnnotationMemberValue targetValue = annotation.findAttributeValue(attributeName); if (targetValue instanceof PsiLiteral) { final Object value = ((PsiLiteral)targetValue).getValue(); if (value instanceof Integer) return (Integ... | inferIntegerAttribute |
34,440 | Boolean (@NotNull PsiAnnotation annotation, @NlsSafe @NotNull String attributeName) { final PsiAnnotationMemberValue targetValue = annotation.findAttributeValue(attributeName); if (targetValue instanceof PsiLiteral) { final Object value = ((PsiLiteral)targetValue).getValue(); if (value instanceof Boolean) return (Boole... | inferBooleanAttribute |
34,441 | boolean (@NotNull PsiAnnotation annotation, @NlsSafe @NotNull String attributeName) { Boolean result = inferBooleanAttribute(annotation, attributeName); return result != null && result; } | inferBooleanAttributeNotNull |
34,442 | PsiClass (@NotNull PsiAnnotation annotation, @NlsSafe @NotNull String attributeName) { final PsiAnnotationMemberValue targetValue = annotation.findAttributeValue(attributeName); return getPsiClass(targetValue); } | inferClassAttribute |
34,443 | PsiClass (@Nullable PsiAnnotationMemberValue targetValue) { if (targetValue instanceof PsiClassObjectAccessExpression) { PsiType type = ((PsiClassObjectAccessExpression)targetValue).getOperand().getType(); if (type instanceof PsiClassType) { return ((PsiClassType)type).resolve(); } } else if (targetValue instanceof GrR... | getPsiClass |
34,444 | PsiType (PsiAnnotationMemberValue targetValue) { if (targetValue instanceof PsiClassObjectAccessExpression) { return ((PsiClassObjectAccessExpression)targetValue).getOperand().getType(); } else if (targetValue instanceof GrReferenceExpression) { if ("class".equals(((GrReferenceExpression)targetValue).getReferenceName()... | extractClassTypeFromClassAttributeValue |
34,445 | PsiElement (GrAnnotation annotation) { PsiAnnotationOwner owner = annotation.getOwner(); if (owner instanceof PsiModifierList) return ((PsiModifierList)owner).getParent(); return (PsiElement)owner; } | getActualOwner |
34,446 | List<PsiClass> (@NotNull PsiAnnotation annotation, @NlsSafe @NotNull String attributeName, boolean declared) { PsiAnnotationMemberValue value = declared ? annotation.findDeclaredAttributeValue(attributeName) : annotation.findAttributeValue(attributeName); return ContainerUtil.mapNotNull(AnnotationUtil.arrayAttributeVal... | getClassArrayValue |
34,447 | List<String> (@NotNull PsiAnnotation annotation, @NlsSafe @NotNull String attributeName, boolean declared) { PsiAnnotationMemberValue value = findDetachedAttributeValue(annotation, attributeName, declared); if (value == null) return Collections.emptyList(); return getArrayValue(value, AnnotationUtil::getStringAttribute... | getStringArrayValue |
34,448 | PsiAnnotationMemberValue (@NotNull PsiAnnotation annotation, @NlsSafe @Nullable String attributeName, boolean declared) { PsiAnnotationMemberValue declaredValue = findDeclaredDetachedValue(annotation, attributeName); if (declaredValue != null) return declaredValue; if (declared) return null; return annotation.findAttri... | findDetachedAttributeValue |
34,449 | PsiElement (@NotNull String refName) { GroovyFileBase file = createGroovyFileChecked("a." + refName); GrTopStatement statement = file.getTopStatements()[0]; if (!(statement instanceof GrReferenceExpression)) { throw new IncorrectOperationException("Incorrect reference name: " + refName); } final PsiElement element = ((... | createReferenceNameFromText |
34,450 | PsiElement (@NotNull String idText) { GrDocMemberReference reference = createDocMemberReferenceFromText("Foo", idText); LOG.assertTrue(reference != null, idText); return reference.getReferenceNameElement(); } | createDocMemberReferenceNameFromText |
34,451 | GrDocMemberReference (@NotNull String className, @NotNull String text) { PsiFile file = createGroovyFileChecked("/** @see " + className + "#" + text + " */"); PsiElement element = file.getFirstChild(); assert element instanceof GrDocComment; GrDocTag tag = PsiTreeUtil.getChildOfType(element, GrDocTag.class); assert tag... | createDocMemberReferenceFromText |
34,452 | GrDocReferenceElement (@NotNull String qName) { PsiFile file = createGroovyFileChecked("/** @see " + qName + " */"); PsiElement element = file.getFirstChild(); assert element instanceof GrDocComment; GrDocTag tag = PsiTreeUtil.getChildOfType(element, GrDocTag.class); assert tag != null : "Doc tag points to null"; retur... | createDocReferenceElementFromFQN |
34,453 | GrCodeReferenceElement (@NotNull String text, @Nullable PsiElement context) { return createElementFromText(text, context, CODE_REFERENCE, GrCodeReferenceElement.class); } | createCodeReference |
34,454 | GrReferenceExpression (@NotNull String idText) { GroovyFileBase file = createGroovyFileChecked(idText); final GrTopStatement[] statements = file.getTopStatements(); if (!(statements.length == 1 && statements[0] instanceof GrReferenceExpression)) throw new IncorrectOperationException(idText); return (GrReferenceExpressi... | createReferenceExpressionFromText |
34,455 | GrReferenceExpression (@NotNull String idText, PsiElement context) { GroovyFile file = createGroovyFileChecked(idText, false, context); GrTopStatement[] statements = file.getTopStatements(); if (statements.length != 1) throw new IncorrectOperationException("refText: " + idText); if (!(statements[0] instanceof GrReferen... | createReferenceExpressionFromText |
34,456 | GrReferenceExpression (@NotNull PsiClass aClass) { final String text; if (aClass instanceof PsiAnonymousClass) { text = ((PsiAnonymousClass)aClass).getBaseClassType().getPresentableText(); } else { text = aClass.getName(); } return createReferenceExpressionFromText(text); } | createReferenceElementForClass |
34,457 | GrExpression (@NotNull String text, PsiElement context) { GroovyFile file = createGroovyFile(text, false, context); GrTopStatement[] topStatements = file.getTopStatements(); if (topStatements.length == 0 || !(topStatements[0] instanceof GrExpression)) { throw new IncorrectOperationException("incorrect expression = '" +... | createExpressionFromText |
34,458 | GrCodeReferenceElement (PsiClassType type) { if (type instanceof GrClassReferenceType) { return ((GrClassReferenceType)type).getReference(); } final PsiClassType.ClassResolveResult resolveResult = type.resolveGenerics(); final PsiClass refClass = resolveResult.getElement(); assert refClass != null : type; return create... | createReferenceElementByType |
34,459 | PsiTypeParameterList () { return createMethodFromText("def <> void foo(){}").getTypeParameterList(); } | createTypeParameterList |
34,460 | PsiTypeParameter (@NotNull String name, PsiClassType @NotNull [] superTypes) { @NlsSafe StringBuilder builder = new StringBuilder(); builder.append("def <").append(name); if (superTypes.length > 1 || superTypes.length == 1 && !superTypes[0].equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) { builder.append(" extends ");... | createTypeParameter |
34,461 | GrVariableDeclaration (String @Nullable [] modifiers, @Nullable GrExpression initializer, @Nullable PsiType type, String... identifiers) { String initializerText; if (initializer != null) { if (initializer instanceof GrApplicationStatement && !GroovyConfigUtils.getInstance().isVersionAtLeast(initializer, GroovyConfigUt... | createVariableDeclaration |
34,462 | GrVariableDeclaration (String @Nullable [] modifiers, @Nullable String initializer, @Nullable PsiType type, String... identifiers) { @NlsSafe StringBuilder text = writeModifiers(modifiers); if (type != null && type != PsiTypes.nullType()) { final PsiType unboxed = TypesUtil.unboxPrimitiveTypeWrapper(type); final String... | createVariableDeclaration |
34,463 | GrEnumConstant (@NotNull String text) { GroovyFile file = createGroovyFileChecked("enum E{" + text + "}"); final GrEnumTypeDefinition enumClass = (GrEnumTypeDefinition)file.getClasses()[0]; return enumClass.getEnumConstants()[0]; } | createEnumConstantFromText |
34,464 | GrVariableDeclaration (String @NotNull [] modifiers, @NotNull String identifier, @Nullable GrExpression initializer, @Nullable PsiType type) { final String varDeclaration = createVariableDeclaration(modifiers, initializer, type, identifier).getText(); final GroovyFileBase file = createGroovyFileChecked("class A { " + v... | createFieldDeclaration |
34,465 | GrVariableDeclaration (@NotNull String text) { final GroovyFile file = createGroovyFileChecked("class X{\n" + text + "\n}"); final PsiClass psiClass = file.getClasses()[0]; return (GrVariableDeclaration)psiClass.getFields()[0].getParent(); } | createFieldDeclarationFromText |
34,466 | StringBuilder (String[] modifiers) { StringBuilder text = new StringBuilder(); if (!(modifiers == null || modifiers.length == 0)) { for (String modifier : modifiers) { text.append(modifier); text.append(" "); } } return text; } | writeModifiers |
34,467 | String (PsiType type) { if (!(type instanceof PsiArrayType)) { final String canonical = type.getCanonicalText(); final String text = canonical != null ? canonical : type.getPresentableText(); if (PsiKeyword.NULL.equals(text)) { return ""; } else { return text; } } else { return getTypeText(((PsiArrayType)type).getCompo... | getTypeText |
34,468 | GrTopStatement (@NotNull String text) { GroovyFile dummyFile = createGroovyFileChecked(text); final GrTopStatement[] topStatements = dummyFile.getTopStatements(); if (topStatements.length != 1) throw new IncorrectOperationException("text = '" + text + "'"); return topStatements[0]; } | createTopElementFromText |
34,469 | GroovyFileImpl (@NotNull CharSequence text, boolean physical) { final String fileName = DUMMY_FILE_NAME + '.' + GroovyFileType.GROOVY_FILE_TYPE.getDefaultExtension(); final long stamp = System.currentTimeMillis(); final PsiFileFactory factory = PsiFileFactory.getInstance(myProject); return (GroovyFileImpl) factory.crea... | createDummyFile |
34,470 | PsiClassType (@NotNull PsiClass aClass) { return JavaPsiFacade.getElementFactory(myProject).createType(aClass); } | createType |
34,471 | GrParenthesizedExpression (@NotNull GrExpression expression, @Nullable PsiElement context) { return ((GrParenthesizedExpression)createExpressionFromText("(" + expression.getText() + ")", context)); } | createParenthesizedExpr |
34,472 | PsiElement (@NotNull String text) { return createLiteralFromValue(text).getFirstChild(); } | createStringLiteralForReference |
34,473 | PsiElement (@NotNull String name) { final GroovyFileBase file = createGroovyFileChecked(name + " foo() {}"); final GrTopStatement[] definitions = file.getTopStatements(); if (definitions.length != 1) throw new IncorrectOperationException(name); return definitions[0].getFirstChild().getFirstChild(); } | createModifierFromText |
34,474 | GrCodeBlock (@NotNull String text) { final GroovyFileBase file = createGroovyFileChecked("def foo () {" + text + "}"); final GrMethod method = (GrMethod) file.getTopStatements()[0]; return method.getBlock(); } | createMethodBodyFromText |
34,475 | GrVariableDeclaration (@NotNull String name, @NotNull String typeText) { String classText; if (Character.isLowerCase(typeText.charAt(0))) { classText = "class A { def " + typeText + " " + name + "}"; } else { classText = "class A { " + typeText + " " + name + "}"; } GroovyFileBase file = createGroovyFileChecked(classTe... | createSimpleVariableDeclaration |
34,476 | PsiElement (@NotNull String newDot) { return createReferenceExpressionFromText("a" + newDot + "b").getDotToken(); } | createDotToken |
34,477 | GrMethod (@NotNull String constructorName, String @Nullable [] paramTypes, String @NotNull [] paramNames, @Nullable String body, @Nullable PsiElement context) { final CharSequence text = generateMethodText(null, constructorName, null, paramTypes, paramNames, body, true); return createConstructorFromText(constructorName... | createConstructorFromText |
34,478 | GrMethod (String constructorName, CharSequence constructorText, @Nullable PsiElement context) { GroovyFile file = createGroovyFileChecked("class " + constructorName + "{" + constructorText + "}", false, context); GrTypeDefinition definition = file.getTypeDefinitions()[0]; if (definition == null) { throw new IncorrectOp... | createConstructorFromText |
34,479 | GrMethod (String methodText, @Nullable PsiElement context) { if (methodText == null) throw new IncorrectOperationException("Method text not provided"); GroovyFile file = createGroovyFile(methodText, false, context); GrTopStatement[] definitions = file.getTopStatements(); if (definitions.length != 1) { throw new Incorre... | createMethodFromText |
34,480 | GrAnnotation (@NotNull @NonNls String annotationText, @Nullable PsiElement context) { return createElementFromText(annotationText, context, ANNOTATION, GrAnnotation.class); } | createAnnotationFromText |
34,481 | GrAnnotationNameValuePair (@NotNull String text, @Nullable PsiElement context) { return createElementFromText(text, context, ANNOTATION_MEMBER_VALUE_PAIR, GrAnnotationNameValuePair.class); } | createAnnotationAttribute |
34,482 | GrMethod (@NotNull String name, @NotNull GrSignature signature) { StringBuilder builder = new StringBuilder(PsiKeyword.PUBLIC); final PsiType returnType = signature.getReturnType(); if (returnType != null && returnType != PsiTypes.nullType()) { builder.append(' '); builder.append(returnType.getCanonicalText()); } build... | createMethodFromSignature |
34,483 | GrAnnotation (@NotNull String annoText) { return createAnnotationFromText(annoText, null); } | createAnnotationFromText |
34,484 | GroovyFile (@NlsSafe @NotNull CharSequence idText) { return createGroovyFileChecked(idText, false, null); } | createGroovyFileChecked |
34,485 | GroovyFile (@NlsSafe @NotNull CharSequence idText, boolean isPhysical, @Nullable PsiElement context) { final GroovyFileImpl file = createDummyFile(idText, isPhysical); if (ErrorUtil.containsError(file)) { throw new IncorrectOperationException("cannot create file from text: " + idText); } file.setContext(context); retur... | createGroovyFileChecked |
34,486 | GroovyFile (@NotNull CharSequence idText, boolean isPhysical, @Nullable PsiElement context) { GroovyFileImpl file = createDummyFile(idText, isPhysical); file.setContext(context); return file; } | createGroovyFile |
34,487 | PsiElement () { PsiFile dummyFile = createDummyFile(" ", false); return dummyFile.getFirstChild(); } | createWhiteSpace |
34,488 | PsiElement (int length) { String text = length <= 1 ? "\n" : ""; if (length > 1) { text = StringUtil.repeatSymbol('\n', length); } return createLineTerminator(text); } | createLineTerminator |
34,489 | PsiElement (@NotNull String text) { PsiFile dummyFile = createGroovyFileChecked(text); PsiElement child = dummyFile.getFirstChild(); assert child != null; return child; } | createLineTerminator |
34,490 | GrArgumentList (GrExpression... expressions) { @NonNls StringBuilder text = new StringBuilder(); text.append("ven ("); for (GrExpression expression : expressions) { text.append(expression.getText()).append(", "); } if (expressions.length > 0) { text.delete(text.length() - 2, text.length()); } text.append(')'); PsiFile ... | createExpressionArgumentList |
34,491 | GrNamedArgument (@NotNull final String name, @NotNull final GrExpression expression) { PsiFile file = createGroovyFileChecked("foo (" + name + ":" + expression.getText() + ")"); assert file.getChildren()[0] != null; GrCall call = (GrCall)file.getChildren()[0]; return call.getArgumentList().getNamedArguments()[0]; } | createNamedArgument |
34,492 | GrStatement (@NotNull CharSequence text) { return createStatementFromText(text, null); } | createStatementFromText |
34,493 | GrStatement (@NotNull CharSequence text, @Nullable PsiElement context) { GroovyFile file = createGroovyFileChecked(text, false, context); GrTopStatement[] statements = file.getTopStatements(); if (statements.length != 1) { throw new IncorrectOperationException("count = " + statements.length + ", " + text); } if (!(stat... | createStatementFromText |
34,494 | GrMethodCallExpression (@NotNull GrApplicationStatement callExpr) { StringBuilder text = new StringBuilder(); text.append(callExpr.getInvokedExpression().getText()); text.append("("); final GrCommandArgumentList argumentList = callExpr.getArgumentList(); if (argumentList != null) text.append(argumentList.getText()); te... | createMethodCallByAppCall |
34,495 | GrCodeReferenceElement (@NotNull PsiClass aClass) { String qualifiedName = aClass.getQualifiedName(); if (qualifiedName == null) { throw new IncorrectOperationException("cannot create code reference element for class " + aClass.getText()); } return createCodeReference(qualifiedName); } | createCodeReferenceElementFromClass |
34,496 | GrReferenceExpression (@Nullable PsiClass psiClass) { final String text; if (psiClass == null) { text = "this"; } else { final String qname = psiClass.getQualifiedName(); if (StringUtil.isEmpty(qname)) { text = "this"; } else { text = qname + ".this"; } } return createReferenceExpressionFromText(text, psiClass); } | createThisExpression |
34,497 | GrBlockStatement (@NotNull String text, @Nullable PsiElement context) { return createElementFromText(text, context, BLOCK_STATEMENT, GrBlockStatement.class); } | createBlockStatementFromText |
34,498 | GrModifierList (@NotNull CharSequence text) { final GrMethod method = createMethodFromText(text + " void foo()"); return method.getModifierList(); } | createModifierList |
34,499 | GrCaseSection (@NotNull String text) { final GrStatement statement = createStatementFromText("switch (a) {\n" + text + "\n}"); if (!(statement instanceof GrSwitchElement)) { throw new IncorrectOperationException("Cannot create switch section from text: " + text); } final GrCaseSection[] sections = ((GrSwitchElement)sta... | createSwitchSection |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.