Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
300,800 | void () { String lorem = new LoremGenerator().generate(10, false).toLowerCase(); List<String> wordsIn = StringUtil.getWordsIn(lorem); Sets.SetView<String> difference = Sets.difference(Sets.newHashSet(LoremGenerator.COMMON_P), Sets.newHashSet(wordsIn)); assertFalse(difference.isEmpty()); } | testCommonStart2 |
300,801 | void (Editor editor, int... offsets) { final List<Caret> carets = editor.getCaretModel().getAllCarets(); assertEquals("Carets count mismatch", offsets.length, carets.size()); for (int i = 0; i < offsets.length; i++) { assertEquals("Position mismatch for caret " + i, offsets[i], carets.get(i).getOffset()); } } | assertCarets |
300,802 | void (Editor editor, int... expected) { EditorTestUtil.executeAction(editor, "EmmetPreviousEditPoint"); assertCarets(editor, expected); } | moveBackward |
300,803 | void (Editor editor, int... expected) { EditorTestUtil.executeAction(editor, "EmmetNextEditPoint"); assertCarets(editor, expected); } | moveForward |
300,804 | void () { myFixture.configureByText(HtmlFileType.INSTANCE, "<caret><a href=\"\">\n\t<b></b>\n\t\n</a>"); final Editor editor = myFixture.getEditor(); assertCarets(editor, 0); moveForward(editor, 9); // Moved caret into empty attribute moveForward(editor, 16); // Moved caret into <b> tag moveForward(editor, 22); // Move... | testForward |
300,805 | void () { myFixture.configureByText(HtmlFileType.INSTANCE, "<a href=\"\">\n\t<b></b>\n\t\n</a><caret>"); final Editor editor = myFixture.getEditor(); assertCarets(editor, editor.getDocument().getTextLength()); moveBackward(editor, 22); // Moved caret into empty line moveBackward(editor, 16); // Moved caret into <b> tag... | testBackward |
300,806 | void () { myFixture.configureByText(HtmlFileType.INSTANCE, "<caret><a>\n\t\n\t\n</a>"); final Editor editor = myFixture.getEditor(); assertCarets(editor, 0); moveForward(editor, 5); moveForward(editor, 7); } | testWhitespaceForward |
300,807 | void () { myFixture.configureByText(HtmlFileType.INSTANCE, "<a>\n\t\n\t\n</a><caret>"); final Editor editor = myFixture.getEditor(); assertCarets(editor, editor.getDocument().getTextLength()); moveBackward(editor, 7); moveBackward(editor, 5); } | testWhitespaceBackward |
300,808 | void () { myFixture.configureByText(HtmlFileType.INSTANCE, """ <ul> <li><caret><a href=""></a></li> <li><caret><a href=""></a></li> </ul> """); final Editor editor = myFixture.getEditor(); assertCarets(editor, 13, 42); moveForward(editor, 22, 51); moveForward(editor, 24, 53); moveForward(editor, 28, 57); moveForward(ed... | testMultiCursorForward |
300,809 | void () { myFixture.configureByText(HtmlFileType.INSTANCE, """ <ul> <li><a href=""></a><caret></li> <li><a href=""></a><caret></li> </ul> """); final Editor editor = myFixture.getEditor(); assertCarets(editor, 28, 57); moveBackward(editor, 24, 53); moveBackward(editor, 22, 51); moveBackward(editor, 13, 42); moveBackwar... | testMultiCursorBackward |
300,810 | void () { String text = "<div id=\"idName\"></div>"; doFilterText(text, text + "\n<!-- /#idName -->"); } | testCommentTagWithId |
300,811 | void () { String text = "<div class=\"clName\"></div>"; doFilterText(text, text + "\n<!-- /.clName -->"); } | testCommentTagWithClass |
300,812 | void () { String text = "<div id=\"idName\" class=\"clName\"></div>"; doFilterText(text, text + "\n<!-- /#idName.clName -->"); } | testCommentTagWithIdAndClass |
300,813 | void () { String text = "<div></div>"; doFilterText(text, text); } | testDoNotCommentTagWithoutClassAndId |
300,814 | void () { expand("div.className|c"); checkResultByText("<div class=\"className\"></div>\n<!-- /.className -->"); } | testInvokeByPrefix |
300,815 | ZenCodingFilter () { return myFilter; } | getFilter |
300,816 | String () { return "html"; } | getExtension |
300,817 | Test () { return new BemEmmetFilterTest(); } | suite |
300,818 | void () { addTest(".b_m|bem", "<div class=\"b b_m\"></div>"); addTest(".b_m1._m2|bem", "<div class=\"b b_m1 b_m2\"></div>"); addTest(".b>._m|bem", "<div class=\"b\">\n\t<div class=\"b b_m\"></div>\n</div>"); addTest(".b>._m1>._m2|bem", "<div class=\"b\">\n\t<div class=\"b b_m1\">\n\t\t<div class=\"b b_m2\"></div>\n\t</... | addBemTests |
300,819 | void () { addTest(".b_m1._m2|bem", "<div class=\"b b_m1 b_m2\"></div>"); addTest(".b._mod|bem", "<div class=\"b b_mod\"></div>"); } | addBem2Tests |
300,820 | void () { addTest(".name__name2__name3__name4|bem", "<div class=\"name__name2__name3__name4\"></div>"); addTest(".name__name2__name3|bem", "<div class=\"name__name2__name3\"></div>"); addTest(".news(.title.-title(.-text))|bem", """ <div class="news"> <div class="title news__title"> <div class="title__text"></div> </div... | addRegressionTests |
300,821 | void () { addTest(".b9m|bem", "<div class=\"b b9m\"></div>", createBemTestInitializer("__", "9", "-"), "html"); addTest(".b9m|bem", "<div class=\"b9mb9m\"></div>", createBemTestInitializer("", "", ""), "html"); addTest(".b>.Ыe|bem", """ <div class="b"> <div class="bЫe"></div> </div>""", createBemTestInitializer("Ы", "_... | addConfigurableTests |
300,822 | TestInitializer (String elementSeparator, String modifierSeparator, String shortPrefix) { return (fixture, testRootDisposable) -> { EmmetOptions options = EmmetOptions.getInstance(); String oldElementSeparator = options.getBemElementSeparator(); String oldModifierSeparator = options.getBemModifierSeparator(); String ol... | createBemTestInitializer |
300,823 | void (String sourceData, String expectedData) { addTest(sourceData, expectedData, "html"); } | addTest |
300,824 | void () { expandAndCheck("div>p|s", "<div><p></p></div>"); } | testSingleLineFilter |
300,825 | void () { expandAndCheck("ul>li*4|s", "<ul><li></li><li></li><li></li><li></li></ul>"); } | testSingleLineFilter2 |
300,826 | void () { expandAndCheck(".g>.gg>.ggg^^.gggg|s", "<div class=\"g\"><div class=\"gg\"><div class=\"ggg\"></div></div></div><div class=\"gggg\"></div>"); } | testSingleLineFilterWithClimbUpOperation |
300,827 | ZenCodingFilter () { return myFilter; } | getFilter |
300,828 | String () { return "html"; } | getExtension |
300,829 | void () { expandAndCheck("{1. test}|t", "test"); } | testTrimFilter1 |
300,830 | void () { expandAndCheck("{ 1 test}|t", "test"); } | testTrimFilter2 |
300,831 | void () { expandAndCheck("{ * test}|t", "test"); } | testTrimFilter3 |
300,832 | void () { emmetWrap(""" 1. list item one 2. list item two 3. list item three""", "div*", """ <div>1. list item one</div> <div>2. list item two</div> <div>3. list item three</div>"""); emmetWrap(""" 1. list item one 2. list item two 3. list item three""", "div*|t", """ <div>list item one</div> <div>list item two</div> <... | testTrimFilterWithWrapping |
300,833 | ZenCodingFilter () { return myFilter; } | getFilter |
300,834 | String () { return "html"; } | getExtension |
300,835 | void (String sourceData, String expectedData) { configureFromFileText("test." + getExtension(), sourceData); HashMap<String, String> attribute2value = new HashMap<>(); TemplateToken templateToken = new TemplateToken("div", attribute2value); templateToken.setTemplateText(sourceData, getFile()); XmlTag tag = templateToke... | doFilterText |
300,836 | void () { String text = "<div id=\"&idName\"></div>"; doFilterText(text, "<div id=\"&idName\"></div>"); } | testEscape |
300,837 | void () { String text = "<div id=\"&idName\"></div>"; String expectedText1 = "<div id=\"&idName\"></div>"; doFilterText(text, expectedText1); doFilterText(expectedText1, "&lt;div id=\"&amp;idName\"&gt;&lt;/div&gt;"); } | testDoubleEscape |
300,838 | void () { expandAndCheck("a>b|e", "<a href=\"\"><b></b></a>"); } | testInvokeByPrefix |
300,839 | void () { expandAndCheck("a>b|e|e", "&lt;a href=\"\"&gt;&lt;b&gt;&lt;/b&gt;&lt;/a&gt;"); } | testInvokeByDoublePrefix |
300,840 | ZenCodingFilter () { return myFilter; } | getFilter |
300,841 | String () { return "html"; } | getExtension |
300,842 | void () { expand("vare|xsl"); checkResultByText("<xsl:variable name=\"\" select=\"\"/>"); } | testXsl1 |
300,843 | void () { expand("vare>p|xsl"); checkResultByText("<xsl:variable name=\"\">\n <p></p>\n</xsl:variable>"); } | testXsl2 |
300,844 | ZenCodingFilter () { return myFilter; } | getFilter |
300,845 | String () { return "xsl"; //todo make xsl template available in xml with |xsl filter } | getExtension |
300,846 | void () { doTest("<<<", "html", "<<<"); } | testSimpleHtml |
300,847 | void () { doTest(">>>", "xml", ">>>"); } | testSimpleXml |
300,848 | void () { doTest(N_DASH, "html", "–"); } | testVeryWide |
300,849 | void () { doTest(COPY, "html", "®"); } | testWide |
300,850 | void () { doTest("<a alt='" + N_DASH + "'></a>", "html", "<a alt='–'></a>"); } | testAttributeValue |
300,851 | void () { doTest("<a><</a>", "html", "<a><</a>"); } | testTag |
300,852 | void () { doTest("<<<", "xml", "<<<"); } | testXmlStart |
300,853 | void () { doTest(""" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">""", "html", """ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"""); } | testDoctypeSystemPublic |
300,854 | void () { doTest(""" <component> amp & U+0026 (38) XML 1.0 ampersand </component>""", "xml", """ <component> amp & U+0026 (38) XML 1.0 ampersand </component>"""); } | testXmlAmp |
300,855 | void () { doTest(""" <component> lt < U+003C (60) XML 1.0 less-than sign </component>""", "xml", """ <component> lt < U+003C (60) XML 1.0 less-than sign </component>"""); } | testXmlLt |
300,856 | void () { doTest(""" <a><selection><</selection></a> <a><selection><</selection></a> <a><selection><</selection></a> """, "html", """ <a><</a> <a><</a> <a><</a> """); } | testMultiCaret |
300,857 | void (String text, final String extension, final String expected) { String finalText = !text.contains("<selection>") ? "<selection>" + text + "</selection>" : text; PlatformTestUtil.withEncoding("UTF-8", () -> { myFixture.configureByText(getTestName(true) + "." + extension, finalText); myFixture.performEditorAction("Es... | doTest |
300,858 | void () { WebEditorOptions.getInstance().setSelectWholeCssIdentifierOnDoubleClick(true); doTest(); } | testSelectClassNames |
300,859 | void () { WebEditorOptions.getInstance().setSelectWholeCssIdentifierOnDoubleClick(false); doTest(); } | testSelectClassNamesWithDisabledSelectSelectorOption |
300,860 | void () { doTest(); } | testSelectTag |
300,861 | void () { CodeInsightTestUtil.doWordSelectionTestOnDirectory(myFixture, getTestName(true), "html"); } | doTest |
300,862 | String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/selectWord"; } | getTestDataPath |
300,863 | void (String contents) { init(contents, XmlFileType.INSTANCE); } | configureEditor |
300,864 | void () { handler.execute(getEditor(), null, null); } | run |
300,865 | String () { return "/mover"; } | getBasePath |
300,866 | String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData"; } | getTestDataPath |
300,867 | String () { return getFullRelativeTestName(".xml"); } | getFullRelativeTestName |
300,868 | String (String ext) { return BASE_PATH + getTestName(false) + ext; } | getFullRelativeTestName |
300,869 | boolean () { return myTestJustJaxpValidation; } | forceExternalValidation |
300,870 | void () { configureByFiles(null, BASE_PATH + getTestName(false) + ".xml", BASE_PATH + getTestName(false) + ".xsd"); final String url = "http://www.foo.org/schema"; ExternalResourceManagerExImpl.registerResourceTemporarily(url, getTestName(false) + ".xsd", getTestRootDisposable()); final String url2 = "http://www.bar.or... | testduplicateAttribute2 |
300,871 | void (@NotNull XmlAttributeValue value) { final PsiElement[] children = value.getChildren(); for (PsiElement child : children) { if (child instanceof XmlEntityRef) { PsiElement psiElement = child.getReferences()[0].resolve(); assertNotNull(psiElement); assertEquals(getTestName(false) + ".ent", psiElement.getContainingF... | visitXmlAttributeValue |
300,872 | void (final @NotNull XmlAttribute attribute) { refs.add(attribute.getReference()); } | visitXmlAttribute |
300,873 | void (final @NotNull XmlTag tag) { refs.add(tag.getReference()); super.visitXmlTag(tag); } | visitXmlTag |
300,874 | void (final XmlTag tag, final String name, final List<? super PsiReference> refs) { if (tag.getAttributeValue(name) != null) { ContainerUtil.addAll(refs, tag.getAttribute(name, null).getValueElement().getReferences()); } } | addRefsInPresent |
300,875 | void () { final String testName = getTestName(false); doTestWithLocations( new String[][] { {"http://www.springframework.org/schema/beans",testName + ".xsd"}, {"http://www.springframework.org/schema/util",testName + "_2.xsd"} }, "xml" ); } | testComplexSchemaValidation11 |
300,876 | void (String[] @Nullable [] resources, String ext) { doConfigureWithLocations(resources, ext); doDoTest(true,false); } | doTestWithLocations |
300,877 | void (final String[][] resources, final String ext) { String[] testNames = new String[(resources != null? resources.length:0) + 1]; testNames[0] = BASE_PATH + getTestName(false) + "." + ext; if (resources != null) { int curResource = 0; for(String[] resource:resources) { ExternalResourceManagerExImpl .registerResourceT... | doConfigureWithLocations |
300,878 | void () { final String[][] resources = {{"http://www.test.com/test", getTestName(false) + ".dtd"}}; doConfigureWithLocations(resources, "xml"); doDoTest(true,true); WriteCommandAction.runWriteCommandAction(null, () -> myEditor.getDocument().insertString(myEditor.getDocument().getCharsSequence().toString().indexOf("?>")... | testXercesCachingProblem |
300,879 | void () { doTestWithLocations(new String[][] { {"urn:test", getTestName(false) + "_2.xsd"} }, "xsd"); } | testComplexSchemaValidation13 |
300,880 | void () { doTestWithLocations(new String[][]{{"parent", getTestName(false) + ".xsd"}}, "xml"); } | testComplexSchemaValidation14 |
300,881 | void () { doTestWithLocations( new String[][] { {"http://www.linkedin.com/lispring", getTestName(false) + ".xsd"}, {"http://www.springframework.org/schema/beans", getTestName(false) + "_2.xsd"} }, "xml" ); } | testComplexSchemaValidation15 |
300,882 | void () { doTestWithLocations( new String[][] { {"http://www.inversoft.com/schemas/savant-2.0/project", getTestName(false) + ".xsd"}, {"http://www.inversoft.com/schemas/savant-2.0/base", getTestName(false) + "_2.xsd"} }, "xml" ); } | testComplexSchemaValidation16 |
300,883 | void () { doTestWithLocations( new String[][]{ {"urn:test", getTestName(false) + ".xsd"} }, "xml" ); } | testComplexSchemaValidation17 |
300,884 | void () { String url = "antlib:org.apache.maven.artifact.ant"; enableInspectionTool(new AntResolveInspection()); doTestWithLocations(new String[][]{{url, getTestName(false) + ".xsd"}}, "xml"); } | testXercesMessagesBinding4 |
300,885 | void (final @NotNull XmlAttribute attribute) { if (attribute.getDescriptor() != null) attrs.add(attribute); } | visitXmlAttribute |
300,886 | boolean () { return !methodOfTestHasAnnotation(getClass(), getTestName(false), HighlightingFlag.SkipExternalValidation) && super.doExternalValidation(); } | doExternalValidation |
300,887 | void (XmlTag tag,String schemaAttrName, String resolveFileName) { String attributeValue = tag.getAttributeValue(schemaAttrName); if (attributeValue != null) { XmlAttribute attribute = tag.getAttribute(schemaAttrName, null); PsiReference[] references = attribute.getValueElement().getReferences(); assertTrue( "There shou... | checkOneTagForSchemaAttribute |
300,888 | void () { ExternalResourceManagerExImpl.registerResourceTemporarily("sample.dtd", getTestDataPath() + BASE_PATH + "sample.dtd", getTestRootDisposable()); configureByFiles(null, BASE_PATH + "sample.xml", BASE_PATH + "sample.dtd"); doDoTest(true, false); } | testDoctypeSystemConfigured |
300,889 | void () { configureByText(XmlFileType.INSTANCE, "<!DOCTYPE rules [\n" + IntStream.range(0, 10000).mapToObj(i -> "<!ENTITY pnct" + i + " \"x\">\n").collect(Collectors.joining()) + "]>\n" + "<rules/>"); PlatformTestUtil .startPerformanceTest("highlighting", 4_500, () -> doHighlighting()) .setup(() -> getPsiManager().drop... | testBigPrologHighlightingPerformance |
300,890 | boolean (final Class testClass, final String testName, final HighlightingFlag flag) { Method method; try { method = testClass.getMethod("test" + testName); } catch (Exception e) { throw new RuntimeException(e); } final HighlightingFlags annotation = method.getAnnotation(HighlightingFlags.class); if (annotation != null)... | methodOfTestHasAnnotation |
300,891 | void () { // 10 // 0123456789012 String text = "<html></html>"; EditorHighlighter xhtmlHighlighter = HighlighterFactory .createHighlighter(XHtmlFileType.INSTANCE, EditorColorsManager.getInstance().getGlobalScheme(), myProject); xhtmlHighlighter.setText(text); HighlighterIterator iterator = xhtmlHighlighter.createIterat... | testXHtmlEditorHighlighting |
300,892 | void () { // 10 20 // 012345678901234567890 123456 789 String text = "<!ENTITY % Charsets \"CDATA\">"; EditorHighlighter dtdHighlighter = HighlighterFactory.createHighlighter(DTDFileType.INSTANCE, EditorColorsManager.getInstance().getGlobalScheme(), myProject); dtdHighlighter.setText(text); HighlighterIterator iterator... | testDTDEditorHighlighting |
300,893 | void () { final String testName = getTestName(false); configureByFiles( null, BASE_PATH + testName +".xsd", BASE_PATH +testName +"2.xsd" ); doDoTest(true, false, true); } | testImportProblems |
300,894 | void () { doTestWithLocations(new String[][]{{"http://www.springframework.org/schema/beans", "ComplexSchemaValidation11.xsd"}}, "xsd"); } | testSchemaImportHighlightingAndResolve |
300,895 | void () { doTestWithLocations( new String[][] { {"http://docbook.org/ns/docbook", "DocBookV5.xsd"}, {"http://www.w3.org/1999/xlink", "xlink.xsd"}, {"http://www.w3.org/XML/1998/namespace", "xml.xsd"} }, "xml" ); doTestWithLocations( new String[][] { {"http://www.w3.org/1999/xlink", "xlink.xsd"}, {"http://www.w3.org/XML/... | testDocBookV5 |
300,896 | void () { doTestWithLocations( new String[][] { {"http://docbook.org/ns/docbook", "DocBookV5.xsd"}, {"http://www.w3.org/1999/xlink", "xlink.xsd"}, {"http://www.w3.org/XML/1998/namespace", "xml.xsd"} }, "xml" ); } | testDocBook5 |
300,897 | void () { doTestWithLocations( new String[][] { {"http://docbook.org/ns/docbook", "DocBookV5.xsd"}, {"http://www.w3.org/1999/xlink", "xlink.xsd"}, {"http://www.w3.org/XML/1998/namespace", "xml.xsd"} }, "xml" ); } | testDocBookRole |
300,898 | Collection<HighlightInfo> (final Collection<HighlightInfo> highlightInfos) { highlightInfos.removeIf(highlightInfo -> highlightInfo.getSeverity() == HighlightSeverity.INFORMATION); return highlightInfos; } | filterInfos |
300,899 | void () { doTestWithLocations(null, "xsd"); } | testUsingSchemaDtd |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.