Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
64,800
void () { doWholeFileTest(() -> getCommonSettings().KEEP_LINE_BREAKS = false); }
testSample_disableReformattingLineBreaks
64,801
void () { doWholeFileTest(() -> getCommonSettings().getIndentOptions().INDENT_SIZE = 4); }
testSample_indent4
64,802
void () { doWholeFileTest(() -> getCustomSettings().ALIGN_VALUES_PROPERTIES = YAMLCodeStyleSettings.ALIGN_ON_COLON); }
testSample_alignColon
64,803
void () { doWholeFileTest(() -> getCustomSettings().ALIGN_VALUES_PROPERTIES = YAMLCodeStyleSettings.ALIGN_ON_VALUE); }
testSample_alignValue
64,804
void () { doWholeFileTest(() -> getCustomSettings().INDENT_SEQUENCE_VALUE = true); }
testSample_indentSequenceValue
64,805
void () { doWholeFileTest(() -> getCustomSettings().SEQUENCE_ON_NEW_LINE = true); }
testSample_sequenceOnNewLine
64,806
void () { doWholeFileTest(() -> getCustomSettings().BLOCK_MAPPING_ON_NEW_LINE = true); }
testSample_blockMappingOnNewLine
64,807
void () { doWholeFileTest(); }
testJsonStyle_default
64,808
void () { doWholeFileTest(); }
testSeveralDocuments_default
64,809
void () { doWholeFileTest(); }
testMapAsRoot
64,810
void () { doPartialReformatTest(2, 3); }
testSecondItem_1
64,811
void () { doPartialReformatTest(6, 7); }
testSecondItem_2
64,812
void () { doPartialReformatTest(10, 11); }
testSecondItem_3
64,813
void () { doPartialReformatTest(7, 8); }
testPartialFormattingBugIdea197964
64,814
void () { doWholeFileTest(); }
testComments_default
64,815
void () { doWholeFileTest(() -> getCustomSettings().INDENT_SEQUENCE_VALUE = true); }
testComments_indentSequenceValue
64,816
void () { doWholeFileTest(); }
testSpaces_default
64,817
void () { doWholeFileTest(() -> getCustomSettings().SPACE_BEFORE_COLON = true); }
testSpaces_colon
64,818
void () { doWholeFileTest(() -> getCommonSettings().SPACE_WITHIN_BRACKETS = false); }
testSpaces_brackets
64,819
void () { doWholeFileTest(() -> getCommonSettings().SPACE_WITHIN_BRACES = false); }
testSpaces_braces
64,820
void () { doWholeFileTest(); }
testEmptyTrailingSequenceItemTrailingWhitespaceHasNotYetBeenFixed
64,821
void () { doWholeFileTest(); }
testRegression21787
64,822
void () { doWholeFileTest(); }
testParsingBug2
64,823
void () { doWholeFileTest(); }
testAnchorRef
64,824
CommonCodeStyleSettings () { return CodeStyle.getLanguageSettings(myFixture.getFile(), YAMLLanguage.INSTANCE); }
getCommonSettings
64,825
YAMLCodeStyleSettings () { return CodeStyle.getCustomSettings(myFixture.getFile(), YAMLCodeStyleSettings.class); }
getCustomSettings
64,826
void () { doWholeFileTest(() -> {}); }
doWholeFileTest
64,827
void (Runnable configureOptions) { doCommonTest(configureOptions, codeStyleManager -> codeStyleManager.reformat(myFixture.getFile())); }
doWholeFileTest
64,828
void (int startLine, int endLine) { doCommonTest(() -> {}, codeStyleManager -> { Editor editor = myFixture.getEditor(); int start = editor.logicalPositionToOffset(new LogicalPosition(startLine, 0)); int end = editor.logicalPositionToOffset(new LogicalPosition( endLine, 0)); codeStyleManager.reformatRange(myFixture.getF...
doPartialReformatTest
64,829
void (@NotNull Runnable configureOptions, @NotNull Consumer<CodeStyleManager> reformat) { String testName = getTestName(true); int split = testName.indexOf('_'); String source = split != -1 ? testName.substring(0, split) : testName; String resultName = testName.replace('_', '.'); myFixture.configureByFile(source + ".ym...
doCommonTest
64,830
String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/"; }
getTestDataPath
64,831
void () { doTest(); }
testAnchorsAndAliases
64,832
void () { String testName = getTestName(true); myFixture.configureByFile(testName + ".yml"); String answerFilePath = getTestDataPath() + testName + ".usage.txt"; String result = getSerializedResolveResults(); assertSameLinesWithFile(answerFilePath, result); }
doTest
64,833
String () { PsiFile file = myFixture.getFile(); List<PsiReference> referenceList = getReferencesInFile(file); Collection<PsiElement> elements = referenceList.stream() .map(ref -> ref.resolve()) .filter(e -> e != null) .collect(Collectors.toCollection(() -> new LinkedHashSet<>())); Editor editor = myFixture.getEditor();...
getSerializedResolveResults
64,834
List<PsiReference> (@NotNull PsiFile file) { final List<PsiReference> referencesList = new ArrayList<>(); file.accept(new PsiElementVisitor() { @Override public void visitElement(@NotNull PsiElement element) { referencesList.addAll(Arrays.asList(element.getReferences())); element.acceptChildren(this); } }); Collections...
getReferencesInFile
64,835
void (@NotNull PsiElement element) { referencesList.addAll(Arrays.asList(element.getReferences())); element.acceptChildren(this); }
visitElement
64,836
String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/"; }
getTestDataPath
64,837
void () { doTest(); }
testAnchorsAndAliases
64,838
void () { String testName = getTestName(true); myFixture.configureByFile(testName + ".yml"); String answerFilePath = getTestDataPath() + testName + ".resolve.txt"; String result = getSerializedResolveResults(); assertSameLinesWithFile(answerFilePath, result); }
doTest
64,839
String () { PsiFile file = myFixture.getFile(); List<PsiReference> referenceList = getReferencesInFile(file); Editor editor = myFixture.getEditor(); StringBuilder sb = new StringBuilder(); for (PsiReference reference : referenceList) { PsiElement targetElement = reference.resolve(); PsiElement sourceElement = reference...
getSerializedResolveResults
64,840
List<PsiReference> (@NotNull PsiFile file) { final List<PsiReference> referencesList = new ArrayList<>(); file.accept(new PsiElementVisitor() { @Override public void visitElement(@NotNull PsiElement element) { referencesList.addAll(Arrays.asList(element.getReferences())); element.acceptChildren(this); } }); Collections...
getReferencesInFile
64,841
void (@NotNull PsiElement element) { referencesList.addAll(Arrays.asList(element.getReferences())); element.acceptChildren(this); }
visitElement
64,842
String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/"; }
getTestDataPath
64,843
void () { doSuccessfulTest("zzz"); }
testAnchorsAndAliases
64,844
void () { doSuccessfulTest("zzz"); }
testPossibleRename1
64,845
void () { doSuccessfulTest("zzz"); }
testPossibleRename2
64,846
void () { doConflictTest("post"); }
testConflictPostTest
64,847
void () { doConflictTest("prev"); }
testConflictPrevTest
64,848
void (@NotNull String newName) { String testName = getTestName(true); myFixture.configureByFile(testName + ".yml"); myFixture.testRename(testName + ".rename.txt", newName); }
doSuccessfulTest
64,849
void (@NotNull String newName) { String testName = getTestName(true); String answerFilePath = getTestDataPath() + testName + ".conflicts.txt"; myFixture.configureByFile(testName + ".yml"); try { myFixture.renameElementAtCaret(newName); fail("Expected conflicts: \n" + FileUtil.loadFile(new File(answerFilePath))); } catc...
doConflictTest
64,850
String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/"; }
getTestDataPath
64,851
void () { doTest(); }
testAnchorsAndAliases
64,852
void () { String testName = getTestName(true); RangeHighlighter[] ranges = myFixture.testHighlightUsages(testName + ".yml"); EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme(); TextAttributes readAttributes = scheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES); TextAttributes writeA...
doTest
64,853
String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/search/data/"; }
getTestDataPath
64,854
String (@NotNull List<String> requests, @NotNull YAMLKeysSearchEverywhereContributor contributor) { StringBuilder builder = new StringBuilder(); for (String request : requests) { addRequestToResult(builder, request); ContributorSearchResult<YAMLKeyNavigationItem> result = contributor.search(request, new MockProgressInd...
collectSearchResults
64,855
void (@NotNull StringBuilder builder, @NotNull String request) { builder.append("--- "); builder.append(request); builder.append(" ---\n"); }
addRequestToResult
64,856
String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/paste/data/"; }
getTestDataPath
64,857
void () { doTest(" middle"); }
testOneLinePaste
64,858
void () { doTest(ZERO_INDENT_SAMPLE); }
testPasteValue_zeroIndent
64,859
void () { doTest(INDENTED_SAMPLE); }
testPasteValue_indented
64,860
void () { doTest(EMPTY_LINES_SAMPLE, ".empty"); }
testPasteValue_empty
64,861
void () { doTest(INDENTED_SAMPLE); }
testPasteLines
64,862
void () { doTest(ZERO_INDENT_SAMPLE); }
testPasteItem_zeroIndent
64,863
void () { doTest(INDENTED_SAMPLE); }
testPasteItem_indented
64,864
void () { doTest(EMPTY_LINES_SAMPLE, ".empty"); }
testPasteItem_empty
64,865
void () { doInsertTest(ZERO_INDENT_SAMPLE); }
testPasteWithReplace_zeroIndent
64,866
void () { doInsertTest(INDENTED_SAMPLE); }
testPasteWithReplace_indented
64,867
void () { doTest("\n" + ZERO_INDENT_SAMPLE); }
testPasteAsPlainAfterValue
64,868
void () { doTest("\n" + ZERO_INDENT_SAMPLE); }
testPasteAsPlainInsideValue
64,869
void () { doTest(ZERO_INDENT_SAMPLE + "\n"); }
testPasteValueBeforeKey_zeroIndent
64,870
void () { doTest(INDENTED_SAMPLE + "\n"); }
testPasteValueBeforeKey_indented
64,871
void () { doTest(ZERO_INDENT_SAMPLE + "\n"); }
testPasteValueInsideIndent_zeroIndent
64,872
void () { doTest(INDENTED_SAMPLE + "\n"); }
testPasteValueInsideIndent_indented
64,873
void () { doTest(ZERO_INDENT_SAMPLE); }
testPasteValueBeforeComment_zeroIndent
64,874
void () { doTest(INDENTED_SAMPLE); }
testPasteValueBeforeComment_indented
64,875
void (@NotNull String insert) { doTest(insert, ""); }
doTest
64,876
void (@NotNull String insert) { doTest(insert, "", true); }
doInsertTest
64,877
void (@NotNull String insert, @NotNull String resultSuffix) { doTest(insert, resultSuffix, false); }
doTest
64,878
void (@NotNull String insert, @NotNull String resultSuffix, boolean selectWord) { String testName = getTestName(true); String fileName = ObjectUtils.notNull(StringUtil.substringBefore(testName, "_"), testName); myFixture.configureByFile(fileName + ".before.yml"); CopyPasteManager.getInstance().setContents(new StringSel...
doTest
64,879
String () { return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/paste/data/"; }
getTestDataPath
64,880
void () { doTest("next.subKey:"); }
testPasteKeysInStart1
64,881
void () { doTest("next.subKey"); }
testPasteKeysInStart2
64,882
void () { doTest("next.subKey: "); }
testPasteKeysInMiddle1
64,883
void () { doTest("next.subKey"); }
testPasteKeysInMiddle2
64,884
void () { doTest("next.subKey"); }
testPasteKeysInMiddleWithAnchor
64,885
void () { doTest("next.subKey"); }
testPasteKeysInEnd
64,886
void () { doTest("next.subKey"); }
testPasteKeysAtEOF1
64,887
void () { doTest("next.subKey"); }
testPasteKeysAtEOF2
64,888
void () { doTest("next.subKey"); }
testPasteKeysAtEOF3
64,889
void () { doTest("next.subKey"); }
testPasteKeysAtEOF4
64,890
void () { doTest("next.subKey"); }
testDoNotPasteKeysInPlainScalar
64,891
void () { doTest("next.subKey"); }
testDoNotPasteKeysInsideKey
64,892
void () { doTest("some strange text"); }
testDoNotPasteKeysWithBadPattern
64,893
void () { doTest("some. strange. text", "simple.before.yml"); }
testDoNotPasteKeysWithBadPattern2
64,894
void () { doTest("some.strange..text", "simple.before.yml"); }
testDoNotPasteKeysWithBadPattern3
64,895
void () { doTest("'quoted.string'", "simple.before.yml"); }
testDoNotPasteKeysWithBadPattern4
64,896
void () { doTest("\"quoted.string\"", "simple.before.yml"); }
testDoNotPasteKeysWithBadPattern5
64,897
void () { doTest("[x.y]", "simple.before.yml"); }
testDoNotPasteArrayAsKeys
64,898
void () { doTest("word"); }
testDoNotPasteKeysForOneWord
64,899
void () { doTest("next.subKey"); }
testPasteKeysWithExistedPrefix