Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
267,300 | Alignment () { return myAlignment; } | getAlignment |
267,301 | ASTNode (@Nullable Block block) { return block instanceof ASTBlock ? ((ASTBlock)block).getNode() : null; } | getNode |
267,302 | IElementType (@Nullable Block block) { ASTNode node = getNode(block); return node == null ? null : node.getElementType(); } | getElementType |
267,303 | PsiElement (@Nullable Block block) { ASTNode obj = getNode(block); return obj == null ? null : obj.getPsi(); } | getPsiElement |
267,304 | boolean (@Nullable IElementType parentType, @Nullable IElementType childType1, @Nullable IElementType childType2) { return parentType != null && childType1 != null && childType2 != null && myRuleCondition.matches(parentType, childType1, childType2); } | matches |
267,305 | boolean (@Nullable ASTBlock parentBlock, @Nullable ASTBlock childBlock1, @Nullable ASTBlock childBlock2) { return matches(ASTBlock.getElementType(parentBlock), ASTBlock.getElementType(childBlock1), ASTBlock.getElementType(childBlock2)); } | matches |
267,306 | boolean (@NotNull IElementType parentType, @NotNull IElementType firstChildType, @NotNull IElementType secondChildType) { return ((myParentType == null || myParentType.contains(parentType)) && (myChild1Type == null || myChild1Type.contains(firstChildType)) && (myChild2Type == null || myChild2Type.contains(secondChildTy... | matches |
267,307 | SpacingBuilder () { return spaces(0); } | none |
267,308 | SpacingBuilder (boolean option) { return spaceIf(option, false); } | spaceIf |
267,309 | SpacingBuilder (boolean option, boolean useParentDependentLFSpacing) { return spaces(option ? 1 : 0, useParentDependentLFSpacing); } | spaceIf |
267,310 | SpacingBuilder (int count) { return spaces(count, false); } | spaces |
267,311 | SpacingBuilder (int count, boolean useParentDependentLFSpacing) { if (useParentDependentLFSpacing) { return parentDependentLFSpacing(count, count, myCodeStyleSettings.KEEP_LINE_BREAKS, myCodeStyleSettings.KEEP_BLANK_LINES_IN_CODE); } else { return spacing(count, count, 0, myCodeStyleSettings.KEEP_LINE_BREAKS, myCodeSty... | spaces |
267,312 | SpacingBuilder (int count) { int blankLines = count + 1; for (RuleCondition condition : myConditions) { myRules.add(new SpacingRule(condition, 0, 0, blankLines, myCodeStyleSettings.KEEP_LINE_BREAKS, myCodeStyleSettings.KEEP_BLANK_LINES_IN_DECLARATIONS)); } return SpacingBuilder.this; } | blankLines |
267,313 | SpacingBuilder (boolean option) { return option ? lineBreakInCode() : SpacingBuilder.this; } | lineBreakInCodeIf |
267,314 | SpacingBuilder () { for (RuleCondition condition : myConditions) { myRules.add(new SpacingRule(condition, 1, 0, 1, myCodeStyleSettings.KEEP_LINE_BREAKS, myCodeStyleSettings.KEEP_BLANK_LINES_IN_CODE)); } return SpacingBuilder.this; } | lineBreakInCode |
267,315 | SpacingBuilder (boolean lbOption, boolean spaceOption) { if (lbOption) { return lineBreakInCode(); } int count = spaceOption ? 1 : 0; return spacing(count, count, 0, false, 0); } | lineBreakOrForceSpace |
267,316 | SpacingBuilder (int minSpaces, int maxSpaces, int minLF, boolean keepLineBreaks, int keepBlankLines) { for (RuleCondition condition : myConditions) { myRules.add(new SpacingRule(condition, minSpaces, maxSpaces, minLF, keepLineBreaks, keepBlankLines)); } return SpacingBuilder.this; } | spacing |
267,317 | SpacingBuilder (int minSpaces, int maxSpaces, boolean keepLineBreaks, int keepBlankLines) { for (RuleCondition condition : myConditions) { myRules.add(new DependentLFSpacingRule(condition, minSpaces, maxSpaces, keepLineBreaks, keepBlankLines)); } return SpacingBuilder.this; } | parentDependentLFSpacing |
267,318 | RuleBuilder (IElementType elementType) { return new RuleBuilder(new RuleCondition(null, TokenSet.create(elementType), null)); } | after |
267,319 | RuleBuilder (TokenSet tokenSet) { return new RuleBuilder(new RuleCondition(null, tokenSet, null)); } | after |
267,320 | RuleBuilder (IElementType elementType, IElementType parentType) { return new RuleBuilder(new RuleCondition(TokenSet.create(parentType), TokenSet.create(elementType), null)); } | afterInside |
267,321 | RuleBuilder (IElementType elementType, TokenSet parentType) { return new RuleBuilder(new RuleCondition(parentType, TokenSet.create(elementType), null)); } | afterInside |
267,322 | RuleBuilder (TokenSet tokenSet, IElementType parentType) { return new RuleBuilder(new RuleCondition(TokenSet.create(parentType), tokenSet, null)); } | afterInside |
267,323 | RuleBuilder (TokenSet tokenSet, TokenSet parentType) { return new RuleBuilder(new RuleCondition(parentType, tokenSet, null)); } | afterInside |
267,324 | RuleBuilder (IElementType elementType) { return before(TokenSet.create(elementType)); } | before |
267,325 | RuleBuilder (TokenSet tokenSet) { return new RuleBuilder(new RuleCondition(null, null, tokenSet)); } | before |
267,326 | RuleBuilder (TokenSet tokenSet, IElementType parentType) { return new RuleBuilder(new RuleCondition(TokenSet.create(parentType), null, tokenSet)); } | beforeInside |
267,327 | RuleBuilder (IElementType elementType, IElementType parentType) { return new RuleBuilder(new RuleCondition(TokenSet.create(parentType), null, TokenSet.create(elementType))); } | beforeInside |
267,328 | RuleBuilder (IElementType elementType, TokenSet parentTypes) { return new RuleBuilder(new RuleCondition(parentTypes, null, TokenSet.create(elementType))); } | beforeInside |
267,329 | RuleBuilder (IElementType left, IElementType right) { return new RuleBuilder(new RuleCondition(null, TokenSet.create(left), TokenSet.create(right))); } | between |
267,330 | RuleBuilder (IElementType left, TokenSet rightSet) { return new RuleBuilder(new RuleCondition(null, TokenSet.create(left), rightSet)); } | between |
267,331 | RuleBuilder (TokenSet leftSet, IElementType right) { return new RuleBuilder(new RuleCondition(null, leftSet, TokenSet.create(right))); } | between |
267,332 | RuleBuilder (TokenSet leftType, TokenSet rightType) { return new RuleBuilder(new RuleCondition(null, leftType, rightType)); } | between |
267,333 | RuleBuilder (IElementType leftType, IElementType rightType, IElementType parentType) { return new RuleBuilder(new RuleCondition(TokenSet.create(parentType), TokenSet.create(leftType), TokenSet.create(rightType))); } | betweenInside |
267,334 | RuleBuilder (TokenSet leftSet, TokenSet rightSet, IElementType parentType) { return new RuleBuilder(new RuleCondition(TokenSet.create(parentType), leftSet, rightSet)); } | betweenInside |
267,335 | RuleBuilder (IElementType pairFirst, IElementType pairSecond) { RuleCondition before = new RuleCondition(null, TokenSet.create(pairFirst), null); RuleCondition after = new RuleCondition(null, null, TokenSet.create(pairSecond)); return new RuleBuilder(before, after); } | withinPair |
267,336 | RuleBuilder (IElementType pairFirst, IElementType pairSecond, IElementType parent) { TokenSet parentSet = TokenSet.create(parent); RuleCondition before = new RuleCondition(parentSet, TokenSet.create(pairFirst), null); RuleCondition after = new RuleCondition(parentSet, null, TokenSet.create(pairSecond)); return new Rule... | withinPairInside |
267,337 | RuleBuilder (IElementType elementType) { return around(TokenSet.create(elementType)); } | around |
267,338 | RuleBuilder (TokenSet tokenSet) { RuleCondition before = new RuleCondition(null, null, tokenSet); RuleCondition after = new RuleCondition(null, tokenSet, null); return new RuleBuilder(before, after); } | around |
267,339 | RuleBuilder (TokenSet tokenSet, TokenSet parent) { RuleCondition before = new RuleCondition(parent, null, tokenSet); RuleCondition after = new RuleCondition(parent, tokenSet, null); return new RuleBuilder(before, after); } | aroundInside |
267,340 | RuleBuilder (TokenSet tokenSet, IElementType parent) { RuleCondition before = new RuleCondition(TokenSet.create(parent), null, tokenSet); RuleCondition after = new RuleCondition(TokenSet.create(parent), tokenSet, null); return new RuleBuilder(before, after); } | aroundInside |
267,341 | RuleBuilder (IElementType token, IElementType parent) { final TokenSet tokenSet = TokenSet.create(token); RuleCondition before = new RuleCondition(TokenSet.create(parent), null, tokenSet); RuleCondition after = new RuleCondition(TokenSet.create(parent), tokenSet, null); return new RuleBuilder(before, after); } | aroundInside |
267,342 | RuleBuilder (IElementType token, TokenSet parent) { final TokenSet tokenSet = TokenSet.create(token); RuleCondition before = new RuleCondition(parent, null, tokenSet); RuleCondition after = new RuleCondition(parent, tokenSet, null); return new RuleBuilder(before, after); } | aroundInside |
267,343 | SpacingBuilder (SpacingBuilder builder) { myRules.addAll(builder.myRules); return this; } | append |
267,344 | Spacing (@NotNull Block parentBlock, @Nullable IElementType parentType, @Nullable IElementType child1Type, @Nullable IElementType child2Type) { for (SpacingRule rule : myRules) { if (rule.matches(parentType, child1Type, child2Type)) { return rule.createSpacing(parentBlock.getTextRange()); } } return null; } | getSpacing |
267,345 | Spacing (@Nullable Block parent, @Nullable Block child1, @Nullable Block child2) { if (!(parent instanceof ASTBlock) || !(child1 instanceof ASTBlock) || !(child2 instanceof ASTBlock)) { return null; } for (SpacingRule rule : myRules) { if (rule.matches((ASTBlock)parent, (ASTBlock)child1, (ASTBlock) child2)) { return ru... | getSpacing |
267,346 | Wrap (final int type, final boolean wrapFirstElement) { return Formatter.getInstance().createWrap(WrapType.byLegacyRepresentation(type), wrapFirstElement); } | createWrap |
267,347 | Wrap (final WrapType type, final boolean wrapFirstElement) { return Formatter.getInstance().createWrap(type, wrapFirstElement); } | createWrap |
267,348 | Wrap (final Wrap parentWrap, final WrapType wrapType, final boolean wrapFirstElement) { return Formatter.getInstance().createChildWrap(parentWrap, wrapType, wrapFirstElement); } | createChildWrap |
267,349 | void (final Block block, int indent, PrintStream stream) { StringBuilder builder = new StringBuilder(); dumpFormattingModel(block, indent, builder); stream.print(builder); } | dumpFormattingModel |
267,350 | String (final Block block) { StringBuilder builder = new StringBuilder(); dumpFormattingModel(block, 0, builder); return builder.toString(); } | dumpFormattingModelToString |
267,351 | void (final Block block, int indent, final StringBuilder builder) { if (indent == 0) { builder.append("--- FORMATTING MODEL ---\n"); } builder.append(StringUtil.repeatSymbol(' ', indent)); List<Block> subBlocks = block.getSubBlocks(); if (subBlocks.isEmpty()) { dumpTextBlock(block, builder); } else { dumpBlock(block, b... | dumpFormattingModel |
267,352 | void (final Block block, final StringBuilder builder) { builder.append("\"").append(getBlockText(block)).append("\""); dumpBlockProperties(block, builder); builder.append("\n"); } | dumpTextBlock |
267,353 | String (final Block block) { if (block instanceof ASTBlock && ((ASTBlock)block).getNode() != null) { return ((ASTBlock)block).getNode().getText(); } else { return "unknown block " + block.getClass(); } } | getBlockText |
267,354 | void (final Block block, final StringBuilder builder) { builder.append("<block "); if (block instanceof ASTBlock && ((ASTBlock)block).getNode() != null) { builder.append(((ASTBlock)block).getNode().getElementType()); } else { builder.append(block.getClass().getSimpleName()); } dumpBlockProperties(block, builder); build... | dumpBlock |
267,355 | void (final Block block, final StringBuilder blockData) { TextRange textRange = block.getTextRange(); blockData.append(" ").append(textRange.getStartOffset()).append(":").append(textRange.getEndOffset()); Wrap wrap = block.getWrap(); if (wrap != null) { blockData.append(" ").append(wrap); } Indent indent = block.getInd... | dumpBlockProperties |
267,356 | void (final Spacing spacing, final int indent, final StringBuilder out) { out.append(StringUtil.repeatSymbol(' ', indent)); out.append("spacing: ").append(spacing).append("\n"); } | dumpSpacing |
267,357 | WrapType (int value) { WrapType result = LEGACY_MAPPINGS.get(value); return result == null ? CHOP_DOWN_IF_LONG : result; } | byLegacyRepresentation |
267,358 | int () { return myLegacyRepresentation; } | getLegacyRepresentation |
267,359 | Spacing (int minSpaces, int maxSpaces, int minLineFeeds, boolean keepLineBreaks, int keepBlankLines) { return Formatter.getInstance().createSpacing(minSpaces, maxSpaces, minLineFeeds, keepLineBreaks, keepBlankLines); } | createSpacing |
267,360 | Spacing (int minSpaces, int maxSpaces, int minLineFeeds, boolean keepLineBreaks, int keepBlankLines, int prefLineFeeds) { return Formatter.getInstance().createSpacing(minSpaces, maxSpaces, minLineFeeds, keepLineBreaks, keepBlankLines, prefLineFeeds); } | createSpacing |
267,361 | Spacing () { return Formatter.getInstance().getReadOnlySpacing(); } | getReadOnlySpacing |
267,362 | Spacing (int minSpaces, int maxSpaces, @NotNull TextRange dependency, boolean keepLineBreaks, int keepBlankLines) { return createDependentLFSpacing(minSpaces, maxSpaces, dependency, keepLineBreaks, keepBlankLines, DependentSpacingRule.DEFAULT); } | createDependentLFSpacing |
267,363 | Spacing (int minSpaces, int maxSpaces, @NotNull List<TextRange> dependency, boolean keepLineBreaks, int keepBlankLines) { return Formatter.getInstance().createDependentLFSpacing(minSpaces, maxSpaces, dependency, keepLineBreaks, keepBlankLines, DependentSpacingRule.DEFAULT); } | createDependentLFSpacing |
267,364 | Spacing (int minSpaces, int maxSpaces, @NotNull TextRange dependencyRange, boolean keepLineBreaks, int keepBlankLines, @NotNull DependentSpacingRule rule) { return Formatter.getInstance().createDependentLFSpacing(minSpaces, maxSpaces, dependencyRange, keepLineBreaks, keepBlankLines, rule); } | createDependentLFSpacing |
267,365 | Spacing (boolean keepLineBreaks, int keepBlankLines) { return Formatter.getInstance().createSafeSpacing(keepLineBreaks, keepBlankLines); } | createSafeSpacing |
267,366 | Spacing (final int minSpaces, final int maxSpaces, final boolean keepLineBreaks, final int keepBlankLines) { return Formatter.getInstance().createKeepingFirstColumnSpacing(minSpaces, maxSpaces, keepLineBreaks, keepBlankLines); } | createKeepingFirstColumnSpacing |
267,367 | FormattingModel (PsiFile file, @NotNull Block rootBlock, CodeStyleSettings settings) { return Formatter.getInstance().createFormattingModelForPsiFile(file, rootBlock, settings); } | createFormattingModelForPsiFile |
267,368 | FormattingContext (@NotNull PsiElement psiElement) { // fixme should we overwrite range here? return new FormattingContext(psiElement, myFormattingRange, myCodeStyleSettings, myFormattingMode); } | withPsiElement |
267,369 | PsiFile () { return Objects.requireNonNull(myPsiElement.getContainingFile()); } | getContainingFile |
267,370 | ASTNode () { return myPsiElement.getNode(); } | getNode |
267,371 | Project () { return myPsiElement.getProject(); } | getProject |
267,372 | PsiElement () { return myPsiElement; } | getPsiElement |
267,373 | TextRange () { return myFormattingRange; } | getFormattingRange |
267,374 | CodeStyleSettings () { return myCodeStyleSettings; } | getCodeStyleSettings |
267,375 | FormattingMode () { return myFormattingMode; } | getFormattingMode |
267,376 | String () { return "FormattingContext{" + "myPsiElement=" + myPsiElement + ", myFormattingRange=" + myFormattingRange + ", myCodeStyleSettings=" + myCodeStyleSettings + ", myFormattingMode=" + myFormattingMode + '}'; } | toString |
267,377 | FormattingContext (@NotNull PsiElement psiElement, @NotNull TextRange formattingRange, @NotNull CodeStyleSettings codeStyleSettings, @NotNull FormattingMode formattingMode) { return new FormattingContext(psiElement, formattingRange, codeStyleSettings, formattingMode); } | create |
267,378 | FormattingContext (@NotNull PsiElement psiElement, @NotNull CodeStyleSettings codeStyleSettings, @NotNull FormattingMode formattingMode) { return new FormattingContext(psiElement, psiElement.getTextRange(), codeStyleSettings, formattingMode); } | create |
267,379 | FormattingContext (@NotNull PsiElement psiElement, @NotNull CodeStyleSettings codeStyleSettings) { return new FormattingContext(psiElement, psiElement.getTextRange(), codeStyleSettings, FormattingMode.REFORMAT); } | create |
267,380 | Trigger () { return myTrigger; } | getTrigger |
267,381 | DependentSpacingRule (@NotNull Anchor anchor, int data) { myData.put(anchor, data); return this; } | registerData |
267,382 | boolean (@NotNull Anchor anchor) { return myData.containsKey(anchor); } | hasData |
267,383 | boolean (@NotNull PsiFile psiFile) { return true; } | matches |
267,384 | String () { return TYPE; } | getType |
267,385 | void (@Nullable String pattern) { throw new UnsupportedOperationException(); } | setPattern |
267,386 | void (@NotNull FormattingRequestImpl formattingRequest, @Nullable ProgressIndicator indicator) { try { formattingRequest.runTask(indicator); } finally { myPendingRequests.remove(formattingRequest); } } | runAsyncFormat |
267,387 | boolean () { return true; } | needToUpdate |
267,388 | Duration () { return DEFAULT_TIMEOUT; } | getTimeout |
267,389 | String () { return myDocument.getText(); } | getDocumentText |
267,390 | boolean () { FormattingTask formattingTask = myTask; if (formattingTask != null && myStateRef.compareAndSet(FormattingRequestState.RUNNING, FormattingRequestState.CANCELLING)) { if (formattingTask.cancel()) { myStateRef.set(FormattingRequestState.CANCELLED); myTaskSemaphore.release(); return true; } } return false; } | cancel |
267,391 | Document () { return myDocument; } | getDocument |
267,392 | List<TextRange> () { return myRanges; } | getFormattingRanges |
267,393 | boolean () { return myCanChangeWhitespaceOnly; } | canChangeWhitespaceOnly |
267,394 | FormattingContext () { return myContext; } | getContext |
267,395 | void (@Nullable FormattingTask formattingTask) { myTask = formattingTask; } | setTask |
267,396 | void (@Nullable ProgressIndicator indicator) { FormattingTask task = myTask; if (task != null && myStateRef.compareAndSet(FormattingRequestState.NOT_STARTED, FormattingRequestState.RUNNING)) { try { myTaskSemaphore.acquire(); task.run(); long waitTime = 0; while (waitTime < getTimeout().getSeconds() * 1000L) { if (myTa... | runTask |
267,397 | void (@NotNull String newText) { if (!needToUpdate()) return; if (myDocument.getModificationStamp() > myInitialModificationStamp) { for (DocumentMerger merger : DocumentMerger.EP_NAME.getExtensionList()) { if (merger.updateDocument(myDocument, newText)) break; } } else { myDocument.setText(newText); } } | updateDocument |
267,398 | boolean () { return myQuickFormat; } | isQuickFormat |
267,399 | void (final @Nullable String updatedText) { if (myStateRef.compareAndSet(FormattingRequestState.RUNNING, FormattingRequestState.COMPLETED)) { myResult = updatedText; myTaskSemaphore.release(); } } | onTextReady |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.