Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
30,300 | GroovyCodeStyleSettings () { return myGroovySettings; } | getGroovySettings |
30,301 | FormattingContext (boolean forbidWrapping, boolean forbidNewLineInSpacing) { return new FormattingContext( mySettings, myAlignmentProvider, myGroovySettings, myForbidWrapping || forbidWrapping, myForbidNewLineInSpacing || forbidNewLineInSpacing, myGroovyBlockProducer ); } | createContext |
30,302 | boolean () { return myForbidWrapping; } | isForbidWrapping |
30,303 | boolean () { return myForbidNewLineInSpacing; } | isForbidNewLineInSpacing |
30,304 | Block (@NotNull final ASTNode node, @NotNull final Indent indent, @Nullable final Wrap wrap) { return myGroovyBlockProducer.generateBlock(node, indent, wrap, this); } | createBlock |
30,305 | List<ASTNode> (final ASTNode node) { List<ASTNode> children = visibleChildren(node); if (!children.isEmpty()) { ASTNode first = children.get(0); if (first.getElementType() == mLCURLY) children.remove(0); } if (!children.isEmpty()) { ASTNode last = children.get(children.size() - 1); if (last.getElementType() == GroovyTo... | getClosureBodyVisibleChildren |
30,306 | List<Block> () { //For binary expressions PsiElement blockPsi = myNode.getPsi(); IElementType elementType = myNode.getElementType(); if (blockPsi instanceof GrBinaryExpression && !(blockPsi.getParent() instanceof GrBinaryExpression)) { return generateForBinaryExpr(); } //For multiline strings if (GroovyTokenSets.STRING... | generateSubBlocks |
30,307 | List<Block> (@NotNull List<ASTNode> astNodes) { return ContainerUtil.map(astNodes, it -> myContext.createBlock(it, getIndent(it), getChildWrap(it))); } | getGenericBlocks |
30,308 | Block (List<Block> bodyBlocks) { CommonCodeStyleSettings settings = myContext.getSettings(); return new SyntheticGroovyBlock( bodyBlocks, Wrap.createWrap(WrapType.NONE, false), GroovyIndentProcessor.getBlockIndent(settings.BRACE_STYLE), GroovyIndentProcessor.getIndentInBlock(settings.BRACE_STYLE), myContext) { @NotNull... | createSwitchBodyBlock |
30,309 | ChildAttributes (int newChildIndex) { List<Block> subBlocks = getSubBlocks(); if (newChildIndex > 0) { Block block = subBlocks.get(newChildIndex - 1); if (block instanceof GroovyBlock) { PsiElement anchorPsi = ((GroovyBlock)block).getNode().getPsi(); if (anchorPsi instanceof GrCaseSection) { boolean finished = GroovyIn... | getChildAttributes |
30,310 | Wrap (ASTNode childNode) { return myWrappingProcessor.getChildWrap(childNode); } | getChildWrap |
30,311 | List<Block> (final List<ASTNode> children) { final ArrayList<Block> subBlocks = new ArrayList<>(); List<ASTNode> flattenChildren = flattenChildren(children); calculateAlignments(flattenChildren, false); for (int i = 0; i < flattenChildren.size(); i++) { ASTNode childNode = flattenChildren.get(i); if (childNode.getEleme... | generateCodeSubBlocks |
30,312 | List<ASTNode> (List<ASTNode> children) { ArrayList<ASTNode> result = new ArrayList<>(); for (ASTNode child : children) { processNodeFlattening(result, child); } return result; } | flattenChildren |
30,313 | void (ArrayList<ASTNode> result, ASTNode child) { result.add(child); if (child.getElementType() == GroovyElementTypes.LABELED_STATEMENT) { for (ASTNode node : visibleChildren(child)) { processNodeFlattening(result, node); } } } | processNodeFlattening |
30,314 | Indent (ASTNode childNode) { return new GroovyIndentProcessor().getChildIndent(myBlock, childNode); } | getIndent |
30,315 | void (List<ASTNode> children, boolean classLevel) { List<GrStatement> currentGroup = null; boolean spock = true; for (ASTNode child : children) { PsiElement psi = child.getPsi(); if (psi instanceof GrLabeledStatement) { if (((GrLabeledStatement)psi).getLabel().getText().equals("where")) { alignGroup(currentGroup, spock... | calculateAlignments |
30,316 | boolean (boolean classLevel, PsiElement psi) { if (psi instanceof PsiComment) { PsiElement prev = psi.getPrevSibling(); if (prev != null) { if (!classLevel || !PsiUtil.isNewLine(prev) || !fieldGroupEnded(psi)) { return true; } } } if (psi.getParent() instanceof GrLabeledStatement) { if (psi instanceof GrLiteral && GrSt... | shouldSkip |
30,317 | void (@Nullable List<GrStatement> group, boolean spock, boolean classLevel) { if (group == null) { return; } if (spock) { alignSpockTable(group); } else { alignVariableDeclarations(group, classLevel); } } | alignGroup |
30,318 | void (List<GrStatement> group, boolean classLevel) { AlignmentProvider.Aligner typeElement = myAlignmentProvider.createAligner(true); AlignmentProvider.Aligner varName = myAlignmentProvider.createAligner(true); AlignmentProvider.Aligner eq = myAlignmentProvider.createAligner(true); for (GrStatement statement : group) {... | alignVariableDeclarations |
30,319 | void (List<GrStatement> group) { if (group.size() < 2) { return; } GrStatement inner = group.get(0); boolean embedded = inner != null && isTablePart(inner); GrStatement first = embedded ? inner : group.get(1); List<AlignmentProvider.Aligner> alignments = ContainerUtil .map(getSpockTable(first), leaf -> myAlignmentProvi... | alignSpockTable |
30,320 | boolean (PsiElement psi) { if (!myContext.getSettings().ALIGN_GROUP_FIELD_DECLARATIONS) { return true; } int maxBlankLines = myContext.getSettings().KEEP_BLANK_LINES_IN_DECLARATIONS; if (maxBlankLines == 0) { return false; } PsiElement prevSibling = psi.getPrevSibling(); return prevSibling != null && StringUtil.countCh... | fieldGroupEnded |
30,321 | List<LeafPsiElement> (GrStatement statement) { List<LeafPsiElement> result = new ArrayList<>(); statement.accept(new GroovyElementVisitor() { @Override public void visitBinaryExpression(@NotNull GrBinaryExpression expression) { if (isTablePart(expression)) { result.add((LeafPsiElement)expression.getOperationToken()); e... | getSpockTable |
30,322 | void (@NotNull GrBinaryExpression expression) { if (isTablePart(expression)) { result.add((LeafPsiElement)expression.getOperationToken()); expression.acceptChildren(this); } } | visitBinaryExpression |
30,323 | boolean (PsiElement psi) { return psi instanceof GrBinaryExpression && (GroovyTokenTypes.mBOR == ((GrBinaryExpression)psi).getOperationTokenType() || GroovyTokenTypes.mLOR == ((GrBinaryExpression)psi).getOperationTokenType()); } | isTablePart |
30,324 | List<ASTNode> (ASTNode node) { ArrayList<ASTNode> list = new ArrayList<>(); for (ASTNode astNode : getGroovyChildren(node)) { if (canBeCorrectBlock(astNode)) { list.add(astNode); } } return list; } | visibleChildren |
30,325 | boolean (PsiElement blockPsi, List<ASTNode> children) { // We don't want to align single call argument if it's a closure. The reason is that it looks better to have call like // // foo({ // println 'xxx' // }) // // than // // foo({ // println 'xxx' // }) if (blockPsi instanceof GrArgumentList && myContext.getSettings(... | mustAlign |
30,326 | boolean (PsiElement blockPsi) { return blockPsi instanceof GrArgumentList || blockPsi instanceof GrAssignmentExpression || blockPsi instanceof GrExtendsClause || blockPsi instanceof GrThrowsClause || blockPsi instanceof GrListOrMap || blockPsi instanceof GrTryResourceList || blockPsi instanceof GrArrayInitializer; } | isListLikeClause |
30,327 | boolean (ASTNode node) { if (node == null) return false; return TokenSets.KEYWORDS.contains(node.getElementType()) || TokenSets.BRACES.contains(node.getElementType()) && !isClosingParenthesisAfterTrailingComma(node); } | isKeyword |
30,328 | boolean (ASTNode node) { if (node.getElementType() != T_RPAREN) { return false; } if (!(node.getTreeParent().getPsi() instanceof GrArgumentList)) { return false; } PsiElement prev = PsiUtilKt.skipWhiteSpacesAndNewLinesBackward(node.getPsi()); if (prev == null) { return false; } return prev.getNode().getElementType() ==... | isClosingParenthesisAfterTrailingComma |
30,329 | List<Block> () { final ArrayList<Block> subBlocks = new ArrayList<>(); final int start = myNode.getTextRange().getStartOffset(); final int end = myNode.getTextRange().getEndOffset(); subBlocks.add( new GroovyBlockWithRange(myNode, getNoneIndent(), new TextRange(start, start + 3), Wrap.createWrap(WrapType.NONE, false), ... | generateForMultiLineString |
30,330 | boolean (final ASTNode node) { return !node.getText().trim().isEmpty(); } | canBeCorrectBlock |
30,331 | ASTNode[] (final ASTNode node) { PsiElement psi = node.getPsi(); if (psi instanceof OuterLanguageElement) { TextRange range = node.getTextRange(); ArrayList<ASTNode> childList = new ArrayList<>(); PsiFile groovyFile = psi.getContainingFile().getViewProvider().getPsi(GroovyLanguage.INSTANCE); if (groovyFile instanceof G... | getGroovyChildren |
30,332 | void (PsiElement elem, ArrayList<ASTNode> childNodes, TextRange range, PsiElement root) { ASTNode node = elem.getNode(); if (range.contains(elem.getTextRange()) && node != null && elem != root && !(elem instanceof PsiFile)) { childNodes.add(node); } else { for (PsiElement child : elem.getChildren()) { addChildNodes(chi... | addChildNodes |
30,333 | List<Block> () { final ArrayList<Block> subBlocks = new ArrayList<>(); AlignmentProvider.Aligner alignment = myContext.getSettings().ALIGN_MULTILINE_BINARY_OPERATION ? myAlignmentProvider.createAligner(false) : null; GrBinaryExpression binary = (GrBinaryExpression)myNode.getPsi(); LOG.assertTrue(binary != null); addBin... | generateForBinaryExpr |
30,334 | void (PsiElement elem, List<Block> list, Indent indent, @Nullable AlignmentProvider.Aligner aligner) { if (elem == null) return; // For binary expressions if ((elem instanceof GrBinaryExpression myExpr)) { if (myExpr.getLeftOperand() instanceof GrBinaryExpression) { addBinaryChildrenRecursively(myExpr.getLeftOperand(),... | addBinaryChildrenRecursively |
30,335 | void (@NotNull PsiElement elem, @NotNull List<Block> list, @Nullable AlignmentProvider.Aligner aligner, final boolean topLevel, @NotNull Wrap wrap) { final List<ASTNode> children = visibleChildren(elem.getNode()); List<ASTNode> nodes = flattenQualifiedReference(elem); if (nodes != null && !nodes.isEmpty()) { int i = 0;... | addNestedChildren |
30,336 | boolean (ASTNode dot) { PsiElement dotPsi = dot.getPsi(); PsiElement prev = PsiUtil.skipWhitespaces(dotPsi.getPrevSibling(), false); if (prev != null) { if (prev instanceof GrMethodCall) { final PsiElement last = prev.getLastChild(); if (last instanceof GrClosableBlock) { return last.getText().contains("\n"); } } } ret... | isAfterMultiLineClosure |
30,337 | void (List<Block> list, @Nullable AlignmentProvider.Aligner aligner, boolean topLevel, List<ASTNode> children, Wrap wrap) { LOG.assertTrue(children.size() > 0); ASTNode fst = children.get(0); if (NESTED.contains(fst.getElementType())) { addNestedChildren(fst.getPsi(), list, aligner, false, wrap); } else { Indent indent... | processNestedChildrenPrefix |
30,338 | TextRange (List<ASTNode> subStatements) { ASTNode first = subStatements.get(0); ASTNode last = subStatements.get(subStatements.size() - 1); return new TextRange(first.getTextRange().getStartOffset(), last.getTextRange().getEndOffset()); } | createTextRange |
30,339 | List<Block> () { return myBlocks; } | getSubBlocks |
30,340 | List<Block> () { if (mySubBlocks == null) { mySubBlocks = new ArrayList<>(); new GroovyBlockGenerator(this).addNestedChildrenSuffix(mySubBlocks, myTopLevel, myChildren); } return mySubBlocks; } | getSubBlocks |
30,341 | TextRange () { return new TextRange(myChildren.get(0).getTextRange().getStartOffset(), myChildren.get(myChildren.size() - 1).getTextRange().getEndOffset()); } | getTextRange |
30,342 | boolean () { return false; } | isLeaf |
30,343 | ASTNode () { return myNode; } | getNode |
30,344 | TextRange () { return myNode.getTextRange(); } | getTextRange |
30,345 | List<Block> () { if (mySubBlocks == null) { mySubBlocks = new GroovyBlockGenerator(this).generateSubBlocks(); } return mySubBlocks; } | getSubBlocks |
30,346 | Wrap () { return myWrap; } | getWrap |
30,347 | Indent () { return myIndent; } | getIndent |
30,348 | Alignment () { if (myAlignment == null) { myAlignment = myContext.getAlignmentProvider().getAlignment(myNode.getPsi()); } return myAlignment; } | getAlignment |
30,349 | Spacing (Block child1, @NotNull Block child2) { return GroovySpacingProcessor.getSpacing(child1, child2, myContext); } | getSpacing |
30,350 | ChildAttributes (final int newChildIndex) { ASTNode astNode = getNode(); final PsiElement psiParent = astNode.getPsi(); if (psiParent instanceof GroovyFileBase) { return new ChildAttributes(Indent.getNoneIndent(), null); } if (psiParent instanceof GrSwitchElement) { return new ChildAttributes(Indent.getNoneIndent(), nu... | getChildAttributes |
30,351 | boolean () { return isIncomplete(myNode); } | isIncomplete |
30,352 | boolean (@NotNull final ASTNode node) { if (node.getElementType() instanceof ILazyParseableElementType) return false; ASTNode lastChild = node.getLastChildNode(); while (lastChild != null && !(lastChild.getElementType() instanceof ILazyParseableElementType) && (lastChild.getPsi() instanceof PsiWhiteSpace || lastChild.g... | isIncomplete |
30,353 | boolean () { return myNode.getFirstChildNode() == null; } | isLeaf |
30,354 | String () { return getTextRange() + ": " + myNode; } | toString |
30,355 | FormattingContext () { return myContext; } | getContext |
30,356 | TextRange () { init(); return myTextRange; } | getTextRange |
30,357 | void () { if (mySubBlocks == null) { GroovyBlockGenerator generator = new GroovyBlockGenerator(this); List<ASTNode> children = GroovyBlockGenerator.getClosureBodyVisibleChildren(myNode.getTreeParent()); mySubBlocks = generator.generateCodeSubBlocks(children); //at least -> exists assert !mySubBlocks.isEmpty(); TextRang... | init |
30,358 | List<Block> () { init(); return mySubBlocks; } | getSubBlocks |
30,359 | ChildAttributes (int newChildIndex) { return new ChildAttributes(Indent.getNormalIndent(), null); } | getChildAttributes |
30,360 | boolean () { return true; } | isIncomplete |
30,361 | TextRange () { return myTextRange; } | getTextRange |
30,362 | boolean (ASTNode node) { _init(node); if (myChild1 == null || myChild2 == null) { return true; } PsiElement psi1 = myChild1.getPsi(); PsiElement psi2 = myChild2.getPsi(); if (psi1 == null || psi2 == null) { return true; } if (psi1.getLanguage() != GroovyLanguage.INSTANCE || psi2.getLanguage() != GroovyLanguage.INSTANCE... | init |
30,363 | void (@Nullable final ASTNode child) { if (child == null) return; ASTNode treePrev = child.getTreePrev(); while (treePrev != null && isWhiteSpace(treePrev)) { treePrev = treePrev.getTreePrev(); } if (treePrev == null) { _init(child.getTreeParent()); } else { myChild2 = child; myType2 = myChild2.getElementType(); myChil... | _init |
30,364 | boolean () { if (mySettings.KEEP_FIRST_COLUMN_COMMENT && TokenSets.COMMENT_SET.contains(myType2)) { if (!isAfterElementOrSemi(GroovyStubElementTypes.IMPORT)) { myResult = Spacing.createKeepingFirstColumnSpacing(0, Integer.MAX_VALUE, mySettings.KEEP_LINE_BREAKS, keepBlankLines()); return true; } return false; } ASTNode ... | manageComments |
30,365 | void (@NotNull GrLiteral literal) { createSpaceInCode(false); } | visitLiteralExpression |
30,366 | void (@NotNull GrStringInjection injection) { createSpaceInCode(false); } | visitGStringInjection |
30,367 | void (@NotNull GrLabeledStatement labeledStatement) { if (myType1 == GroovyTokenTypes.mCOLON) { if (myGroovySettings.INDENT_LABEL_BLOCKS && !(myType2 == GroovyElementTypes.LITERAL)) { createLF(true); } else { createSpaceInCode(true); } } } | visitLabeledStatement |
30,368 | void (@NotNull GrAnnotation annotation) { if (myType2 == GroovyEmptyStubElementTypes.ANNOTATION_ARGUMENT_LIST) { createSpaceInCode(mySettings.SPACE_BEFORE_ANOTATION_PARAMETER_LIST); } } | visitAnnotation |
30,369 | void (@NotNull GrAnnotationArgumentList annotationArgumentList) { if (isWithinParentheses()) { createSpaceInCode(mySettings.SPACE_WITHIN_ANNOTATION_PARENTHESES); } } | visitAnnotationArgumentList |
30,370 | void (@NotNull GrArgumentList list) { if (list.getParent() instanceof GrIndexProperty) { processBrackets( mySettings.SPACE_WITHIN_BRACKETS, null, mySettings.CALL_PARAMETERS_LPAREN_ON_NEXT_LINE, mySettings.CALL_PARAMETERS_RPAREN_ON_NEXT_LINE ); } else { processParentheses( mySettings.SPACE_WITHIN_METHOD_CALL_PARENTHESES... | visitArgumentList |
30,371 | void (final boolean isLineFeed, final boolean isSpace, @NotNull final TextRange range) { if (isLineFeed) { myResult = Spacing.createDependentLFSpacing(isSpace ? 1 : 0, isSpace ? 1 : 0, range, mySettings.KEEP_LINE_BREAKS, keepBlankLines()); } else { createSpaceInCode(isSpace); } } | createDependentLFSpacing |
30,372 | void (@NotNull GrLambdaExpression expression) { boolean spaceAroundArrow = mySettings.SPACE_AROUND_LAMBDA_ARROW; if (myType2 == T_ARROW) { createSpaceProperty(spaceAroundArrow, mySettings.KEEP_LINE_BREAKS, keepBlankLines()); } if (myType2 == BLOCK_LAMBDA_BODY) { createSpaceBeforeLBrace(spaceAroundArrow, mySettings.LAMB... | visitLambdaExpression |
30,373 | void (@NotNull GrBlockLambdaBody body) { if (myType2 == GroovyTokenTypes.mLCURLY) { myResult = Spacing.createSpacing(0, 0, 0, false, 0); } if (myType1 == GroovyTokenTypes.mLCURLY || myType2 == GroovyTokenTypes.mRCURLY) { boolean simpleLambda = shouldHandleAsSimpleLambda(body); int spaces = simpleLambda && mySettings.SP... | visitBlockLambdaBody |
30,374 | boolean (GrBlockLambdaBody lambda) { return mySettings.KEEP_SIMPLE_LAMBDAS_IN_ONE_LINE && !lambda.textContains('\n'); } | shouldHandleAsSimpleLambda |
30,375 | void (@NotNull GrConditionalExpression expression) { if (myType2 == GroovyTokenTypes.mQUESTION) { createSpaceInCode(mySettings.SPACE_BEFORE_QUEST); } else if (myType1 == GroovyTokenTypes.mQUESTION) { createSpaceInCode(mySettings.SPACE_AFTER_QUEST); } else if (myType2 == GroovyTokenTypes.mCOLON) { createSpaceInCode(mySe... | visitConditionalExpression |
30,376 | void (@NotNull GrElvisExpression expression) { if (myType1 == GroovyTokenTypes.mELVIS) { createSpaceInCode(mySettings.SPACE_AFTER_COLON); } else if (myType2 == GroovyTokenTypes.mELVIS) { createSpaceInCode(mySettings.SPACE_BEFORE_QUEST); } } | visitElvisExpression |
30,377 | void (@NotNull GrMethodCallExpression methodCallExpression) { if (myType2 == GroovyElementTypes.ARGUMENTS) { manageSpaceBeforeCallLParenth(); } else if (myType2 == GroovyElementTypes.CLOSABLE_BLOCK) { createSpaceInCode(myGroovySettings.SPACE_BEFORE_CLOSURE_LBRACE); } } | visitMethodCallExpression |
30,378 | void () { createSpaceInCode(mySettings.SPACE_BEFORE_METHOD_CALL_PARENTHESES); } | manageSpaceBeforeCallLParenth |
30,379 | void (@NotNull GrApplicationStatement applicationStatement) { if (myType2 == GroovyElementTypes.ARGUMENTS) manageSpaceBeforeCallLParenth(); } | visitApplicationStatement |
30,380 | void (@NotNull GrIndexProperty expression) { if (myType2 == GroovyTokenTypes.mQUESTION) createSpaceInCode(false); if (myType2 == GroovyElementTypes.ARGUMENTS) manageSpaceBeforeCallLParenth(); } | visitIndexProperty |
30,381 | void (@NotNull GrConstructorInvocation invocation) { if (myType2 == GroovyElementTypes.ARGUMENTS) manageSpaceBeforeCallLParenth(); } | visitConstructorInvocation |
30,382 | void (@NotNull GrNewExpression newExpression) { if (myType1 == GroovyTokenTypes.kNEW) { createSpaceInCode(true); } else if (myType2 == GroovyElementTypes.ARGUMENTS) { manageSpaceBeforeCallLParenth(); } else if (myType2 == GroovyElementTypes.ARRAY_DECLARATOR) { createSpaceInCode(false); } else if (myType2 == ARRAY_INITI... | visitNewExpression |
30,383 | void (@NotNull GrArrayDeclaration arrayDeclaration) { createSpaceInCode(false); } | visitArrayDeclaration |
30,384 | void (@NotNull GrArrayTypeElement typeElement) { createSpaceInCode(false); } | visitArrayTypeElement |
30,385 | void () { if (isWithinParentheses()) { createSpaceInCode(myGroovySettings.SPACE_WITHIN_TUPLE_EXPRESSION); } } | manageSpaceInTuple |
30,386 | void (@NotNull GrEnumConstant enumConstant) { if (myType1 == GroovyStubElementTypes.MODIFIER_LIST) { createSpaceInCode(true); } else { manageSpaceBeforeCallLParenth(); } } | visitEnumConstant |
30,387 | void (@NotNull GrVariableDeclaration variableDeclaration) { manageSpaceInTuple(); } | visitVariableDeclaration |
30,388 | void (@NotNull GrTuple tuple) { manageSpaceInTuple(); } | visitTuple |
30,389 | void (@NotNull GrSpreadArgument spreadArgument) { if (myType1 == GroovyTokenTypes.mSTAR) { createSpaceInCode(mySettings.SPACE_AROUND_UNARY_OPERATOR); } } | visitSpreadArgument |
30,390 | void (@NotNull GroovyFileBase file) { if (isAfterElementOrSemi(GroovyStubElementTypes.PACKAGE_DEFINITION)) { myResult = Spacing.createSpacing(0, 0, mySettings.BLANK_LINES_AFTER_PACKAGE + 1, mySettings.KEEP_LINE_BREAKS, keepBlankLines()); } else if (myType2 == GroovyStubElementTypes.PACKAGE_DEFINITION) { myResult = Spac... | visitFile |
30,391 | boolean (final IElementType elementType) { return myType1 == elementType && myType2 != GroovyTokenTypes.mSEMI || isSemiAfter(elementType); } | isAfterElementOrSemi |
30,392 | boolean (@NotNull IElementType statement) { return myType1 == GroovyTokenTypes.mSEMI && getStatementTypeBySemi(myChild1) == statement; } | isSemiAfter |
30,393 | boolean (@NotNull TokenSet set) { return myType1 == GroovyTokenTypes.mSEMI && set.contains(getStatementTypeBySemi(myChild1)); } | isSemiAfter |
30,394 | IElementType (@NotNull ASTNode semi) { final GrTopStatement statement = getStatementBySemicolon(semi.getPsi()); if (statement == null) return null; return statement.getNode().getElementType(); } | getStatementTypeBySemi |
30,395 | GrTopStatement (@NotNull PsiElement semi) { PsiElement prev = semi.getPrevSibling(); while (prev != null && TokenSets.WHITE_SPACES_OR_COMMENTS.contains(prev.getNode().getElementType()) && prev.getText().indexOf('\n') < 0) { prev = prev.getPrevSibling(); } if (prev instanceof GrTopStatement) return (GrTopStatement)prev;... | getStatementBySemicolon |
30,396 | void (@NotNull GrClosableBlock closure) { ASTNode rBraceAtTheEnd = GeeseUtil.getClosureRBraceAtTheEnd(myChild1); boolean spacesWithinBraces = closure.getParent() instanceof GrStringInjection ? myGroovySettings.SPACE_WITHIN_GSTRING_INJECTION_BRACES : mySettings.SPACE_WITHIN_BRACES; boolean simpleClosure = shouldHandleAs... | visitClosure |
30,397 | void (@NotNull GrOpenBlock block) { boolean isMethod = block.getParent() instanceof GrMethod; boolean keepInOneLine = myForbidNewLineInSpacing || isMethod ? mySettings.KEEP_SIMPLE_METHODS_IN_ONE_LINE : mySettings.KEEP_SIMPLE_BLOCKS_IN_ONE_LINE; if (myType1 == GroovyTokenTypes.mLCURLY && myType2 == GroovyTokenTypes.mRCU... | visitOpenBlock |
30,398 | void (@NotNull GrTypeDefinition typeDefinition) { if (myType2 == GroovyEmptyStubElementTypes.CLASS_BODY) { if (typeDefinition instanceof GrAnonymousClassDefinition) { createSpaceProperty(mySettings.SPACE_BEFORE_CLASS_LBRACE, true, 100); //don't manually remove line feeds because this line is ambiguous } else { PsiEleme... | visitTypeDefinition |
30,399 | void (@NotNull GrTypeDefinitionBody typeDefinitionBody) { if (myType1 == GroovyTokenTypes.mLCURLY && myType2 == GroovyTokenTypes.mRCURLY) { if (mySettings.KEEP_SIMPLE_CLASSES_IN_ONE_LINE) { createSpaceInCode(false); } else { createLF(true); } } else if (myType1 == GroovyTokenTypes.mLCURLY) { myResult = Spacing.createSp... | visitTypeDefinitionBody |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.