Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
37,300
List<GrField> (@NotNull GrTypeDefinition clazz) { final GrField[] fields = clazz.getCodeFields(); return ContainerUtil.filter(fields, field -> { final GrModifierList list = field.getModifierList(); return list != null && list.hasModifierProperty(PsiModifier.FINAL); }); }
getFinalFields
37,301
void (boolean isStatic, @NotNull List<? extends GrField> fields, @NotNull Set<? super GrVariable> initializedFields) { for (GrField field : fields) { if (field.hasModifierProperty(PsiModifier.STATIC) == isStatic && field.getInitializerGroovy() != null) { initializedFields.add(field); } } }
appendFieldInitializedInDeclaration
37,302
void (GrClassInitializer @NotNull [] initializers, @Nullable GrClassInitializer initializerToStop, boolean isStatic, @NotNull List<? extends GrField> fields, @NotNull Set<? super GrVariable> initializedFields) { for (GrClassInitializer curInit : initializers) { if (curInit.isStatic() != isStatic) continue; if (curInit ...
appendFieldsInitializedInClassInitializer
37,303
void (@NotNull GrMethod constructor, @NotNull List<? extends GrField> fields, @NotNull Set<? super GrVariable> initializedFields) { final List<GrMethod> chained = getChainedConstructors(constructor); chained.remove(0); for (GrMethod method : chained) { final GrOpenBlock block = method.getBlock(); if (block == null) con...
appendInitializationFromChainedConstructors
37,304
Set<GrVariable> (@NotNull List<? extends GrField> fields, boolean isStatic) { Set<GrVariable> result = new HashSet<>(); for (GrField field : fields) { if (field.hasModifierProperty(PsiModifier.STATIC) == isStatic) { result.add(field); } } return result; }
buildVarSet
37,305
boolean (@NotNull GrField field) { if (field instanceof GrEnumConstant) return true; if (field.getInitializerGroovy() != null) return true; if (isImmutableField(field)) return true; if (isInitializedInTupleConstructor(field)) return true; final boolean isStatic = field.hasModifierProperty(PsiModifier.STATIC); final GrT...
isFieldInitialized
37,306
boolean (@NotNull GrField field) { var containingClass = field.getContainingClass(); if (containingClass == null) { return false; } PsiAnnotation anno = containingClass.getAnnotation(GroovyCommonClassNames.GROOVY_TRANSFORM_TUPLE_CONSTRUCTOR); if (anno == null) { return false; } AffectedMembersCache cache = GrGeneratedC...
isInitializedInTupleConstructor
37,307
boolean (@NotNull GrField field) { GrModifierList fieldModifierList = field.getModifierList(); if (fieldModifierList != null && fieldModifierList.hasExplicitVisibilityModifiers()) return false; PsiClass aClass = field.getContainingClass(); if (aClass == null) return false; return GrImmutableUtils.hasImmutableAnnotation...
isImmutableField
37,308
List<GrMethod> (@NotNull GrMethod constructor) { Set<Object> visited = new HashSet<>(); List<GrMethod> result = new SmartList<>(constructor); while (true) { final GrConstructorInvocation invocation = PsiUtil.getConstructorInvocation(constructor); if (invocation != null && invocation.isThisCall()) { final PsiMethod meth...
getChainedConstructors
37,309
GroovyControlFlow (@NotNull GrOpenBlock block) { return ControlFlowBuilder.buildControlFlow(block, GrFieldControlFlowPolicy.getInstance()); }
buildFlowForField
37,310
void (@NotNull GrVariable variable) { super.visitVariable(variable); if (!(variable instanceof PsiField) && variable.hasModifierProperty(PsiModifier.FINAL)) { final PsiElement varScope = findScope(variable); if (varScope != null) { scopes.putValue(varScope, variable); } } }
visitVariable
37,311
GroovyControlFlow (@NotNull PsiElement element) { return element instanceof GrControlFlowOwner ? ControlFlowUtils.getGroovyControlFlow((GrControlFlowOwner)element) : ControlFlowBuilder.buildControlFlow((GroovyPsiElement)element); }
getFlow
37,312
PsiElement (@NotNull GrVariable variable) { GroovyPsiElement result = PsiTreeUtil.getParentOfType(variable, GrControlStatement.class, GrControlFlowOwner.class); if (result instanceof GrForStatement) { final GrStatement body = ((GrForStatement)result).getBody(); if (body != null) { result = body; } } return result; }
findScope
37,313
List<ReadWriteVariableInstruction> (@NotNull GroovyControlFlow flow, @NotNull Set<? extends GrVariable> variables, @NotNull Set<? extends GrVariable> alreadyInitialized) { DFAEngine<MyData> engine = new DFAEngine<>(flow.getFlow(), new MyDFAInstance(), new MySemilattice()); final List<@Nullable MyData> dfaResult = engin...
findInvalidWriteAccess
37,314
MyData (@NotNull MyData e, @NotNull Instruction instruction) { if (instruction instanceof ReadWriteVariableInstruction && ((ReadWriteVariableInstruction)instruction).isWrite()) { return e.add(((ReadWriteVariableInstruction)instruction).getDescriptor()); } else { return e; } }
fun
37,315
MyData (@NotNull List<? extends MyData> ins) { return new MyData(ins); }
join
37,316
MyData (Integer var) { if (myInitialized.contains(var)) { Set<Integer> newOverInitialized; if (myOverInitialized.contains(var)) { newOverInitialized = myOverInitialized; } else { newOverInitialized = new HashSet<>(myOverInitialized); newOverInitialized.add(var); } return new MyData(myInitialized, newOverInitialized); }...
add
37,317
boolean (Object obj) { return obj instanceof MyData && myInitialized.equals(((MyData)obj).myInitialized) && myOverInitialized.equals(((MyData)obj).myOverInitialized); }
equals
37,318
boolean (int var) { return myOverInitialized.contains(var); }
isOverInitialized
37,319
boolean (int var) { return myInitialized.contains(var); }
isInitialized
37,320
boolean (@NotNull GrVariable var, GroovyControlFlow controlFlow) { DFAEngine<Boolean> engine = new DFAEngine<>(controlFlow.getFlow(), new MyDfaInstance(controlFlow.getIndex(VariableDescriptorFactory.createDescriptor(var))), new MySemilattice()); final List<Boolean> result = engine.performDFAWithTimeout(); if (result ==...
isVariableDefinitelyInitialized
37,321
boolean (@NotNull GrVariable var, @NotNull GroovyPsiElement context, @NotNull GroovyControlFlow controlFlow) { Map<GroovyPsiElement, Boolean> map = CachedValuesManager.getCachedValue(var, () -> Result.create(new HashMap<>(), var)); final Boolean cached = map.get(context); if (cached != null) return cached.booleanValue(...
isVariableDefinitelyInitializedCached
37,322
Boolean (@NotNull Boolean e, @NotNull Instruction instruction) { if (instruction instanceof ReadWriteVariableInstruction && ((ReadWriteVariableInstruction)instruction).getDescriptor() == myVar) { return true; } return e; }
fun
37,323
Boolean (@NotNull List<? extends Boolean> ins) { if (ins.isEmpty()) { return false; } boolean b = true; for (boolean candidate : ins) { b &= candidate; } return b; }
join
37,324
boolean (@NotNull Boolean e1, @NotNull Boolean e2) { return e1.equals(e2); }
eq
37,325
String () { // used to enable inspection in tests // remove when inspection class will match its short name return "GroovyUnusedAssignment"; }
getShortName
37,326
void (@NotNull final GrControlFlowOwner owner, @NotNull final ProblemsHolder problemsHolder) { final Instruction[] flow = owner.getControlFlow(); final ReachingDefinitionsDfaInstance dfaInstance = new ReachingDefinitionsDfaInstance(); final ReachingDefinitionsSemilattice lattice = new ReachingDefinitionsSemilattice(); ...
check
37,327
void (@NotNull PsiElement element) { if (element instanceof GrControlFlowOwner) { // don't go deeper } else if (element instanceof GrVariable variable && !(element instanceof GrField)) { if (checked.contains(variable) || variable.getInitializerGroovy() != null) return; if (ReferencesSearch.search(variable, variable.get...
visitElement
37,328
void (@Nullable PsiElement element, Set<PsiElement> checked, ProblemsHolder problemsHolder, final @InspectionMessage String message) { if (element == null) return; if (!checked.add(element)) return; if (isLocalAssignment(element) && isUsedInTopLevelFlowOnly(element) && !isIncOrDec(element)) { PsiElement toHighlight = g...
process
37,329
PsiElement (PsiElement element) { PsiElement toHighlight = null; if (element instanceof GrReferenceExpression) { PsiElement parent = element.getParent(); if (parent instanceof GrAssignmentExpression) { toHighlight = ((GrAssignmentExpression)parent).getLValue(); } if (parent instanceof GrUnaryExpression && ((GrUnaryExpr...
getHighlightElement
37,330
boolean (PsiElement element) { PsiElement parent = element.getParent(); if (!(parent instanceof GrUnaryExpression)) return false; IElementType type = ((GrUnaryExpression)parent).getOperationTokenType(); return type == GroovyTokenTypes.mINC || type == GroovyTokenTypes.mDEC; }
isIncOrDec
37,331
boolean (PsiElement element) { GrVariable var = null; if (element instanceof GrVariable) { var = (GrVariable)element; } else if (element instanceof GrReferenceExpression) { final PsiElement resolved = ((GrReferenceExpression)element).resolve(); if (resolved instanceof GrVariable) var = (GrVariable)resolved; } if (var !...
isUsedInTopLevelFlowOnly
37,332
boolean (PsiElement element) { if (element instanceof GrVariable) { return isLocalVariable((GrVariable)element, false); } else if (element instanceof GrReferenceExpression) { final PsiElement resolved = ((GrReferenceExpression)element).resolve(); return resolved instanceof GrVariable && isLocalVariable((GrVariable)reso...
isLocalAssignment
37,333
boolean (GrVariable var, boolean parametersAllowed) { return !(var instanceof GrField || var instanceof GrParameter && !parametersAllowed); }
isLocalVariable
37,334
void (@NotNull TransformationContext context) { if (!(context.getCodeClass() instanceof GroovyScriptClass scriptClass)) return; LightMethodBuilder mainMethod = new LightMethodBuilder(scriptClass.getManager(), GroovyLanguage.INSTANCE, "main") .setMethodReturnType(PsiTypes.voidType()) .addParameter("args", new PsiArrayTy...
applyTransformation
37,335
PsiClassType (@NotNull GroovyScriptClass scriptClass) { PsiClassType type = CachedValuesManager.getCachedValue(scriptClass, () -> CachedValueProvider.Result.create( getSuperClassTypeFromBaseScriptAnnotation(scriptClass), scriptClass.getContainingFile() )); if (type != null) { PsiClass resolved = type.resolve(); if (res...
getBaseClassType
37,336
boolean (Set<PsiClass> forbidden, GrTypeDefinition root) { for (PsiClass aSuper : root.getSupers(false)) { if (forbidden.contains(aSuper)) { return true; } forbidden.add(aSuper); if (aSuper instanceof GrTypeDefinition && reachableInHierarchy(forbidden, (GrTypeDefinition)aSuper)) { return true; } } return false; }
reachableInHierarchy
37,337
PsiClassType (@NotNull GroovyScriptClass scriptClass) { //Groovy BaseScriptASTTransformation works exactly with this priorities PsiClassType fromVariable = getSuperClassTypeFromBaseScriptAnnotatedVariable(scriptClass); if (fromVariable != null) { return fromVariable; } PsiClassType fromImport = getSuperClassTypeFromBas...
getSuperClassTypeFromBaseScriptAnnotation
37,338
PsiClassType (@NotNull GroovyScriptClass scriptClass) { GrImportStatement[] importStatements = scriptClass.getContainingFile().getImportStatements(); for (GrImportStatement importStatement : importStatements) { GrModifierList annotations = importStatement.getAnnotationList(); PsiAnnotation baseScriptAnnotation = annota...
getSuperClassTypeFromBaseScriptAnnotatedImportDefinition
37,339
PsiClassType (@NotNull GroovyScriptClass scriptClass) { GrPackageDefinition packageDefinition = scriptClass.getContainingFile().getPackageDefinition(); if (packageDefinition == null) { return null; } PsiModifierList modifierList = packageDefinition.getModifierList(); if (modifierList == null) { return null; } PsiAnnota...
getSuperClassTypeFromBaseScriptAnnotatedPackageDefinition
37,340
PsiClassType (GroovyScriptClass scriptClass, PsiAnnotation baseScriptAnnotation) { PsiClass clazz = GrAnnotationUtil.getPsiClass(findDeclaredDetachedValue(baseScriptAnnotation, "value")); if (clazz != null) { String className = clazz.getQualifiedName(); if (className == null) clazz.getName(); if (className != null) { r...
getSuperClassTypeFromAnnotationValue
37,341
PsiClassType (GroovyScriptClass scriptClass) { GrVariableDeclaration declaration = findDeclaration(scriptClass.getContainingFile()); if (declaration != null) { GrTypeElement typeElement = declaration.getTypeElementGroovy(); if (typeElement != null) { PsiType type = typeElement.getType(); if (type instanceof PsiClassTyp...
getSuperClassTypeFromBaseScriptAnnotatedVariable
37,342
GrVariableDeclaration (GroovyFile file) { if (!PsiSearchHelper.getInstance(file.getProject()).hasIdentifierInFile(file, "BaseScript")) { return null; } for (GrVariableDeclaration declaration : file.getScriptDeclarations(false)) { if (declaration.getModifierList().hasAnnotation(GROOVY_TRANSFORM_BASE_SCRIPT)) { return de...
findDeclaration
37,343
boolean (@NotNull GrTypeDefinition clazz) { PsiAnnotation annotation = AnnotationUtil.findAnnotation(clazz, true, BINDABLE_FQN); if (annotation != null) return true; for (GrField method : clazz.getCodeFields()) { if (AnnotationUtil.findAnnotation(method, true, BINDABLE_FQN) != null) { return true; } } return false; }
isApplicable
37,344
void (@NotNull TransformationContext context) { GrTypeDefinition clazz = context.getCodeClass(); if (!isApplicable(clazz)) return; final PsiManager manager = clazz.getManager(); final GlobalSearchScope scope = clazz.getResolveScope(); final JavaPsiFacade facade = JavaPsiFacade.getInstance(clazz.getProject()); final Psi...
applyTransformation
37,345
void (@NotNull TransformationContext context) { if (GrRecordUtils.isRecordTransformationApplied(context)) { // record's properties have their own names, so default property syntax is inapplicable return; } for (GrField field : context.getFields()) { if (!field.isProperty()) continue; GrModifierList modifierList = field...
applyTransformation
37,346
boolean (@NotNull TransformationContext helper, String name, boolean isSetter) { Collection<PsiMethod> methods = helper.findMethodsByName(name, true); final int paramCount = isSetter ? 1 : 0; for (PsiMethod method : methods) { if (paramCount != method.getParameterList().getParametersCount()) continue; if (helper.getCod...
hasContradictingMethods
37,347
void (@NotNull TransformationContext context) { final GrTypeDefinition codeClass = context.getCodeClass(); if (codeClass.isInterface() && !codeClass.isTrait()) return; if (codeClass.isTrait() && codeClass.getQualifiedName() != null) { for (GrField field : codeClass.getCodeFields()) { context.addField(new GrTraitField(f...
applyTransformation
37,348
void (@NotNull TransformationContext context, @NotNull PairConsumer<? super PsiClass, ? super PsiSubstitutor> consumer) { Deque<Pair<PsiClass, PsiSubstitutor>> stack = new ArrayDeque<>(); for (PsiClassType superType : context.getSuperTypes()) { ClassResolveResult result = superType.resolveGenerics(); PsiClass superClas...
process
37,349
List<PsiMethod> (@NotNull PsiClass containingClass, @NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor) { List<PsiMethod> result = new SmartList<>(); for (PsiMethod expanded : GrClassImplUtil.expandReflectedMethods(method)) { result.add(new GrTraitMethod(containingClass, expanded, substitutor)); } return re...
getExpandingMethods
37,350
void (@NotNull TransformationContext context) { PsiClassType type = GdkMethodUtil.getCategoryType(context.getCodeClass()); if (type == null) return; for (GrMethod method : context.getCodeClass().getCodeMethods()) { context.removeMethod(method); context.addMethods(GrReflectedMethodImpl.doCreateReflectedMethods(method, t...
applyTransformation
37,351
void (@NotNull TransformationContext context) { if (!(context.getCodeClass() instanceof GroovyScriptClass scriptClass)) return; final GroovyFile containingFile = scriptClass.getContainingFile(); Project project = containingFile.getProject(); if (isGroovySourceFile(containingFile) && !PsiSearchHelper.getInstance(project...
applyTransformation
37,352
void (@NotNull TransformationContext context) { Map<PsiType, PsiAnnotation> declaredTypes = new LinkedHashMap<>(); GrTypeDefinition codeClass = context.getCodeClass(); for (GrField field : context.getFields()) { final PsiAnnotation annotation = PsiImplUtil.getAnnotation(field, GroovyCommonClassNames.GROOVY_LANG_DELEGAT...
applyTransformation
37,353
boolean (@NotNull PsiElement element, @NotNull ResolveState state) { if (!(element instanceof PsiMethod method)) return true; if (!myIgnoreCondition.value(method)) return true; PsiSubstitutor substitutor = state.get(PsiSubstitutor.KEY); if (substitutor == null) substitutor = PsiSubstitutor.EMPTY; myContext.addMethod(cr...
execute
37,354
PsiMethod (@NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor) { final LightMethodBuilder builder = new LightMethodBuilder(myContext.getManager(), GroovyLanguage.INSTANCE, method.getName()); builder.setMethodReturnType(substitutor.substitute(method.getReturnType())); builder.setContainingClass(myContext.get...
createDelegationMethod
37,355
Condition<PsiMethod> (@NotNull PsiAnnotation annotation) { Condition<PsiMethod> result = method -> { if (method.isConstructor() || method.hasModifierProperty(PsiModifier.STATIC)) return false; final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) return false; final String qname = c...
buildCondition
37,356
boolean (PsiMethod method) { if (GroovyObjectTransformationSupport.isGroovyObjectSupportMethod(method)) return true; final String name = method.getName(); if (!OBJECT_METHODS.contains(name) && !GROOVY_OBJECT_METHODS.contains(name)) return false; final PsiMethod superMethod = PsiSuperMethodImplUtil.findDeepestSuperMetho...
overridesObjectOrGroovyObject
37,357
boolean (int start) { return charAt(start) == '\\' && start + 1 < getBufferEnd() && charAt(start + 1) == '/'; }
checkForSimpleValidEscape
37,358
boolean (int start) { return false; }
checkForInvalidSimpleEscape
37,359
boolean (int start) { return charAt(start) == '\\' && start + 1 < getBufferEnd() && charAt(start + 1) == 'u'; }
checkForHexCodeStart
37,360
void () { // Register GroovyDoc Highlighter SyntaxHighlighter groovyDocHighlighter = new GroovyDocSyntaxHighlighter(); final LayerDescriptor groovyDocLayer = new LayerDescriptor(groovyDocHighlighter, "\n", GroovySyntaxHighlighter.DOC_COMMENT_CONTENT); registerLayer(GroovyDocElementTypes.GROOVY_DOC_COMMENT, groovyDocLay...
registerGroovydocHighlighter
37,361
Lexer () { return new GroovyHighlightingLexer(); }
getHighlightingLexer
37,362
boolean (int start) { return charAt(start) == '$' && start + 1 < getBufferEnd() && (charAt(start + 1) == '$' || charAt(start + 1) == '/'); }
checkForSimpleValidEscape
37,363
boolean (int start) { return false; }
checkForInvalidSimpleEscape
37,364
boolean (int start) { return false; }
checkForHexCodeStart
37,365
void (@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) { if (buffer.length() < endOffset) { LOG.error("buffer Length: " + buffer.length() + ", endOffset: " + endOffset, new Attachment("",buffer.toString())); } myBuffer = buffer; myEnd = startOffset; myBufferEnd = endOffset; myTokenType = ...
start
37,366
IElementType () { if (myEnd >= myBufferEnd) return null; myStart = myEnd; if (checkForSimpleValidEscape(myStart)) { myEnd = myStart + 2; return StringEscapesTokenTypes.VALID_STRING_ESCAPE_TOKEN; } else if (checkForHexCodeStart(myStart)) { for (myEnd = myStart + 2; myEnd < myStart + 6; myEnd++) { if (myEnd >= myBufferEn...
locateToken
37,367
int () { return 0; }
getState
37,368
IElementType () { return myTokenType; }
getTokenType
37,369
int () { return myStart; }
getTokenStart
37,370
int () { return myEnd; }
getTokenEnd
37,371
void () { myTokenType = locateToken(); }
advance
37,372
CharSequence () { return myBuffer; }
getBufferSequence
37,373
int () { return myBufferEnd; }
getBufferEnd
37,374
char (int i) { return myBuffer.charAt(i); }
charAt
37,375
StringPartInfo (@NotNull PsiFile file, int startOffset, int endOffset) { final PsiElement start = file.findElementAt(startOffset); final PsiElement fin = file.findElementAt(endOffset - 1); if (start == null || fin == null) return null; final PsiElement psi = PsiTreeUtil.findCommonParent(start, fin); if (psi == null) re...
findStringPart
37,376
boolean (int startOffset, int endOffset, GrLiteral literal) { if (isWholeLiteralContentSelected(literal, startOffset, endOffset)) { return false; } if (literal instanceof GrString) { if (areInjectionsCut((GrString)literal, startOffset, endOffset)) { return false; } } if (isEscapesCut(literal, startOffset, endOffset)) {...
checkSelectedRange
37,377
boolean (GrLiteral literal, int startOffset, int endOffset) { String rawContent = GrStringUtil.removeQuotes(literal.getText()); int[] offsets = new int[rawContent.length() + 1]; if (GrStringUtil.isSingleQuoteString(literal) || GrStringUtil.isDoubleQuoteString(literal)) { GrStringUtil.parseStringCharacters(rawContent, n...
isEscapesCut
37,378
boolean (GrLiteral literal, int startOffset, int endOffset) { TextRange literalRange = literal.getTextRange(); String literalText = literal.getText(); String startQuote = GrStringUtil.getStartQuote(literalText); String endQuote = GrStringUtil.getEndQuote(literalText); return literalRange.getStartOffset() <= startOffset...
isWholeLiteralContentSelected
37,379
boolean (GrString literal, int startOffset, int endOffset) { TextRange selectionRange = new TextRange(startOffset, endOffset); GrStringInjection[] injections = literal.getInjections(); for (GrStringInjection injection : injections) { TextRange range = injection.getTextRange(); if (!selectionRange.contains(range) && !ra...
areInjectionsCut
37,380
GrLiteral (@NotNull PsiElement psi) { PsiElement parent = psi.getParent(); if (isStringLiteral(parent)) { return (GrLiteral)parent; } if (parent == null) return null; PsiElement gParent = parent.getParent(); if (isStringLiteral(gParent)) { return (GrLiteral)gParent; } if (psi instanceof GrString) { return (GrLiteral)ps...
findLiteral
37,381
boolean (@Nullable PsiElement psi) { return psi instanceof GrLiteral && TokenSets.STRING_LITERAL_SET.contains(GrLiteralImpl.getLiteralType((GrLiteral)psi)) || psi instanceof GrString; }
isStringLiteral
37,382
GrExpression (@Nullable String varName) { String prefix = preparePrefix(); String suffix = prepareSuffix(); StringBuilder buffer = new StringBuilder(); boolean prefixExists = !GrStringUtil.removeQuotes(prefix).isEmpty(); if (prefixExists) { buffer.append(prefix).append('+'); } buffer.append(varName != null ? varName : ...
replaceLiteralWithConcatenation
37,383
String () { String content = myRange.substring(myLiteral.getText()); return prepareLiteral(content); }
prepareSelected
37,384
String () { return myStartQuote + myText.substring(myRange.getEndOffset()); }
prepareSuffix
37,385
String () { String prefix = myText.substring(0, myRange.getStartOffset()); String content = GrStringUtil.removeQuotes(prefix); return prepareLiteral(content); }
preparePrefix
37,386
String (String content) { if (GrStringUtil.isSlashyString(myLiteral)) { if (content.endsWith("\\")) { String unescaped = GrStringUtil.unescapeSlashyString(content); return prepareGString(unescaped); } } else if (GrStringUtil.isDollarSlashyString(myLiteral)) { if (content.endsWith("$")) { String unescaped = GrStringUtil...
prepareLiteral
37,387
String (@NotNull String content) { StringBuilder buffer = new StringBuilder(); boolean multiline = content.contains("\n"); buffer.append(multiline ? GrStringUtil.TRIPLE_DOUBLE_QUOTES : GrStringUtil.DOUBLE_QUOTES); GrStringUtil.escapeSymbolsForGString(content, multiline, false, buffer); buffer.append(multiline ? GrStrin...
prepareGString
37,388
GrLiteral () { return myLiteral; }
getLiteral
37,389
TextRange () { return myRange; }
getRange
37,390
List<GrStringInjection> () { return myInjections; }
getInjections
37,391
GrLiteral () { return (GrLiteral)GroovyPsiElementFactory.getInstance(myLiteral.getProject()).createExpressionFromText(prepareSelected()); }
createLiteralFromSelected
37,392
String () { return myPropertyName; }
getPropertyName
37,393
String () { return "property for rename"; }
toString
37,394
boolean () { return true; }
isWritable
37,395
void (@NotNull GrTypeArgumentList typeArgumentList) { PsiElement parent = typeArgumentList.getParent(); if (!(parent instanceof GrReferenceElement)) return; if (parent instanceof GrCodeReferenceElement && !mayContainTypeArguments((GrCodeReferenceElement)parent)) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyB...
visitTypeArgumentList
37,396
void (@NotNull GrNamedArgument argument) { PsiElement parent = argument.getParent(); if (parent instanceof GrArgumentList) { final PsiElement pParent = parent.getParent(); if (pParent instanceof GrIndexProperty) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("named.arguments.are.not.allowed.insi...
visitNamedArgument
37,397
void (@NotNull GroovyPsiElement element) { if (element.getParent() instanceof GrDocReferenceElement) { checkGrDocReferenceElement(myHolder, element); } }
visitElement
37,398
void (@NotNull GrTryCatchStatement statement) { final GrCatchClause[] clauses = statement.getCatchClauses(); if (statement.getResourceList() == null && clauses.length == 0 && statement.getFinallyClause() == null) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("try.without.catch.finally")).range(...
visitTryStatement
37,399
void (@NotNull GrCatchClause clause) { final GrParameter parameter = clause.getParameter(); if (parameter == null) return; final GrTypeElement typeElement = parameter.getTypeElementGroovy(); if (typeElement != null) { final PsiType type = typeElement.getType(); if (type instanceof PsiClassType && ((PsiClassType)type).r...
visitCatchClause