Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
300,500
void () { myFixture.configureByText(HtmlFileType.INSTANCE, "<div>\n <caret>\n</div>"); myFixture.type("checkAmp&n"); type("bs\n"); type("blockq\n"); type("blockq"); EditorActionManager.getInstance(); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN); type("\n"); myFixture.checkResult("<div>\n checkAmp&nbsp;blockq\n <blockquote<caret>\n</div>"); }
testTypingInHtmlText
300,501
void () { myFixture.configureByText(HtmlFileType.INSTANCE, "<div>The<caret></div>"); type(" p"); myFixture.type("\n"); myFixture.checkResult("<div>The p\n</div>"); }
testTypingInHtmlText2
300,502
void () { myFixture.configureByText(HtmlFileType.INSTANCE, "<caret>"); type("p"); assertNull(getLookup().getCurrentItemOrEmpty()); myFixture.type("\n"); myFixture.checkResult("p\n"); }
testTypingInHtmlTextEmptyFile
300,503
void () { myFixture.configureByText(HtmlFileType.INSTANCE, "<caret>"); try { HtmlSettings.getInstance().AUTO_POPUP_TAG_CODE_COMPLETION_ON_TYPING_IN_TEXT = false; type("p"); assertNull(getLookup()); myFixture.completeBasic(); assertContainsElements(myFixture.getLookupElementStrings(), "<pre", "<p", "<picture"); } finally { HtmlSettings.getInstance().AUTO_POPUP_TAG_CODE_COMPLETION_ON_TYPING_IN_TEXT = true; } }
testTypingInHtmlDisabledAutopopup
300,504
void () { myFixture.configureByText(HtmlFileType.INSTANCE, "<html lang='en'><caret>"); type("la"); assertSameElements(ContainerUtil.map(getLookup().getItems(), i -> i.getLookupString()), "<label"); myFixture.completeBasic(); assertSameElements(myFixture.getLookupElementStrings(), "lang", "<label", "<template"); }
testStartsWithCharMatchingAutoPopup
300,505
void (FileType fileType, String fileText, String typeString) { myFixture.configureByText(fileType, fileText); type(typeString); assertNotNull(getLookup()); }
doTestPopup
300,506
void (FileType fileType, String fileText, String typeString) { myFixture.configureByText(fileType, fileText); type(typeString); assertNull(getLookup()); }
doTestNoPopup
300,507
String () { return "/xml/tests/testData/completion/"; }
getBasePath
300,508
void (final String url, final String location) { final ExternalResourceManager manager = ExternalResourceManager.getInstance(); final String old = manager.getResourceLocation(url, (String)null); if (old != null && !old.equals(url) //strange hack: ERM returns url as location sometimes ) { return; } ExternalResourceManagerExImpl.registerResourceTemporarily(url, location, myFixture.getTestRootDisposable()); }
addResource
300,509
void () { String location = "29.xsd"; addResource("aaa",location); configureByFiles("29.xml", location); complete(); checkResultByFile("29_after.xml"); }
testCompleteWithAnyInSchema
300,510
void (String s) { myFixture.checkResultByFile(s); }
checkResultByFile
300,511
LookupElement[] () { return myFixture.completeBasic(); }
complete
300,512
void (String... files) { myFixture.configureByFiles(files); }
configureByFiles
300,513
void () { configureByFiles("32.xml", "32.xsd", "32_2.xsd"); complete(); checkResultByFile("/32_after.xml"); configureByFiles("32_2.xml", "32.xsd", "32_2.xsd"); complete(); checkResultByFile("32_2_after.xml"); }
testCompleteWithAnyInSchema2
300,514
void () { addResource("http://www.springframework.org/schema/tx", getTestDataPath() + "/spring-tx-2.0.xsd"); addResource("http://www.springframework.org/schema/util", getTestDataPath() + "/spring-util-2.0.xsd"); configureByFiles("36.xml"); complete(); checkResultByFile("36_after.xml"); configureByFiles("36_2.xml"); complete(); checkResultByFile("36_2_after.xml"); configureByFiles("36_3.xml"); complete(); myFixture.type('\n'); checkResultByFile("36_3_after.xml"); }
testCompleteWithAnyInSchema3
300,515
void () { String location = "25.xsd"; String url = "http://www.dummy-temp-address"; addResource(url,location); configureByFiles("25.xml", location); complete(); checkResultByFile("25_after.xml"); }
testXmlNonQualifiedElementCompletion
300,516
void () { String location = "xslt.xsd"; String location2 = "xhtml1-strict.xsd"; String url = "http://www.w3.org/1999/XSL/Transform"; addResource(url, location); String url2 = "http://www.w3.org/1999/xhtml"; addResource(url2, location2); configureByFiles("10.xml", location, location2); complete(); checkResultByFile("/10_after.xml"); configureByFiles("11.xml", location, location2); complete(); checkResultByFile("/11_after.xml"); }
testXmlCompletion
300,517
void () { configureByFiles("XmlCompletionWhenTagsWithSemicolon.xml", "XmlCompletionWhenTagsWithSemicolon.dtd"); complete(); checkResultByFile("XmlCompletionWhenTagsWithSemicolon_after.xml"); }
testXmlCompletionWhenTagsWithSemicolon
300,518
void () { final String testName = getTestName(false); String url = "urn:test"; doCompletionTest("xml", url, testName + ".xsd"); }
testCompleteTagWithXsiTypeInParent
300,519
void () { TemplateManagerImpl.setTemplateTesting(myFixture.getTestRootDisposable()); configureByFile(getTestName(false) + ".xml"); type('b'); type('e'); type('a'); type('n'); type(' '); checkResultByFile(getTestName(false) + "_after.xml"); }
testAttributesTemplateFinishWithSpace
300,520
void (String s) { myFixture.configureByFile(s); myFixture.completeBasic(); }
configureByFile
300,521
void () { TemplateManagerImpl.setTemplateTesting(myFixture.getTestRootDisposable()); configureByFile(getTestName(false) + ".xml"); type('d'); type('e'); type(' '); checkResultByFile(getTestName(false) + "_after.xml"); }
testNoAttributesTemplateFinishWithSpace
300,522
void (char c) { myFixture.type(c); }
type
300,523
void (final String ext, final String url, final String location) { final String testName = getTestName(false); addResource(url, location); configureByFiles(testName + "." + ext, location); complete(); checkResultByFile(testName + "_after." + ext); }
doCompletionTest
300,524
void () { addResource("http://www.springframework.org/dtd/spring-beans.dtd", getTestDataPath() + "/spring-beans-2.0.dtd"); basicDoTest(""); }
testSingleCompletionVariantAtRootTag
300,525
void () { final String baseTestFileName = getTestName(false); configureByFile(baseTestFileName + ".dtd"); selectItem(myFixture.getLookupElements()[0], (char)0); checkResultByFile(baseTestFileName + "_after.dtd"); doCompletionTest(baseTestFileName + "2"); configureByFile(baseTestFileName + "3.dtd"); checkResultByFile(baseTestFileName + "3_after.dtd"); configureByFile(baseTestFileName + "4.dtd"); checkResultByFile(baseTestFileName + "4_after.dtd"); configureByFile(baseTestFileName + "5.dtd"); checkResultByFile(baseTestFileName + "5_after.dtd"); // todo uncomment // doCompletionTest("DtdElementCompletion"); }
testDtdCompletion
300,526
void (String name) { configureByFile(name + ".dtd"); checkResultByFile(name + "_after.dtd"); }
doCompletionTest
300,527
void () { addResource("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd", getTestDataPath() + "/web-app_2_4.xsd"); configureByFile("12.xml"); complete(); checkResultByFile("12_after.xml"); configureByFile("12_3.xml"); complete(); checkResultByFile("12_3_after.xml"); configureByFiles("12_4.xml", "12_4_sample.xsd", "12_4_included-sample.xsd"); complete(); checkResultByFile("12_4_after.xml"); }
testSchemaEnumerationCompletion
300,528
void () { configureByFile("13.xml"); checkResultByFile("13_after.xml"); }
testEntityRefCompletion
300,529
void () { configureByFile("13_2.xml"); checkResultByFile("13_2_after.xml"); }
testEntityRefCompletion_2
300,530
void () { configureByFiles("28.xml", "28.ent"); complete(); type('\n'); checkResultByFile("28_after.xml"); }
testEntityRefCompletion2
300,531
void () { configureByFile("13_3.xml"); checkResultByFile("13_3_after.xml"); }
testEntityRefCompletion3
300,532
void () { boolean old = CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION; CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = false; try { configureByFile("27.xsd"); selectItem(myFixture.getLookupElements()[0], '\''); checkResultByFile("27_after.xsd"); } finally { CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = old; } }
testElementRefCompletionInSchema
300,533
void () { configureByFile("14.xml"); checkResultByFile("14_after.xml"); }
testFilePathCompletionInSystem
300,534
void () { configureByFile("15.xml"); checkResultByFile("15_after.xml"); }
testFilePathCompletionInSchema
300,535
void () { String url = "http://www.w3.org/1999/xhtml"; String location = "xhtml1-strict.xsd"; addResource(url,location); configureByFile("16.xml"); assertNullOrEmpty(myFixture.getLookupElementStrings()); checkResultByFile("16_after.xml"); configureByFile("17.xml"); assertNullOrEmpty(myFixture.getLookupElementStrings()); checkResultByFile("17_after.xml"); configureByFile("31.xml"); assertNullOrEmpty(myFixture.getLookupElementStrings()); checkResultByFile("31_after.xml"); }
testUrlCompletionInSchema
300,536
void () { configureByFile("37.xml"); selectItem(myFixture.getLookupElements()[0], '\t'); checkResultByFile("37_after.xml"); }
testInsertExtraRequiredAttribute
300,537
void () { final HtmlCodeStyleSettings settings = getHtmlSettings(); final CodeStyleSettings.QuoteStyle quote = settings.HTML_QUOTE_STYLE; try { settings.HTML_QUOTE_STYLE = CodeStyleSettings.QuoteStyle.Single; configureByFile(getTestName(true) + ".html"); checkResultByFile(getTestName(true) + "_after.html"); } finally { settings .HTML_QUOTE_STYLE = quote; } }
testInsertExtraRequiredAttributeSingleQuote
300,538
void () { final HtmlCodeStyleSettings settings = getHtmlSettings(); final CodeStyleSettings.QuoteStyle quote = settings.HTML_QUOTE_STYLE; try { settings.HTML_QUOTE_STYLE = CodeStyleSettings.QuoteStyle.None; configureByFile(getTestName(true) + ".html"); checkResultByFile(getTestName(true) + "_after.html"); } finally { settings.HTML_QUOTE_STYLE = quote; } }
testInsertExtraRequiredAttributeNoneQuote
300,539
void () { configureByFile(getTestName(true) + ".xml"); assertEmpty(myFixture.getLookupElements()); checkResultByFile(getTestName(true) + ".xml"); }
testBeforeAttributeValue
300,540
void () { boolean oldInsertQuotes = WebEditorOptions.getInstance().isInsertQuotesForAttributeValue(); WebEditorOptions.getInstance().setInsertQuotesForAttributeValue(false); try { configureByFile(getTestName(false) + ".xml"); selectItem(myFixture.getLookupElements()[0], '\t'); checkResultByFile(getTestName(false) + "_after.xml"); } finally { WebEditorOptions.getInstance().setInsertQuotesForAttributeValue(oldInsertQuotes); } }
testAttributeNoQuotes
300,541
void () { configureByFile(getTestName(true) + ".xml"); selectItem(myFixture.getLookupElements()[0], '\t'); checkResultByFile(getTestName(true) + "_after.xml"); }
testBeforeAttributeNameWithPrefix
300,542
void () { configureByFile("20.xml"); complete(); checkResultByFile("20_after.xml"); }
testUrlCompletionInDtd
300,543
void () { String location = "21.xsd"; String location2 = "21_2.xsd"; addResource(location, location); addResource(location2, location2); configureByFiles("21.xml", location, location2); complete(); checkResultByFile("21_after.xml"); }
testElementFromSchemaIncludeCompletion
300,544
void () { configureByFile("22.xsd"); checkResultByFile("22_after.xsd"); }
testSchemaTypeReferenceCompletion
300,545
void () { configureByFile("23.xsd"); checkResultByFile("23_after.xsd"); }
testSchemaTypeReferenceCompletion2
300,546
void () { configureByFile("34.xsd"); checkResultByFile("34_after.xsd"); }
testSchemaTypeReferenceCompletion3
300,547
void () { configureByFile("35.xsd"); checkResultByFile("35_after.xsd"); }
testSchemaTypeReferenceCompletion4
300,548
void () { configureByFiles("33.xml", "33.xsd", "33_2.xsd"); complete(); checkResultByFile("33_after.xml"); configureByFiles("33_2.xml", "33.xsd", "33_2.xsd"); complete(); checkResultByFile("33_2_after.xml"); }
testSchemaNonAllowedElementCompletion
300,549
void () { configureByFile("SchemaBooleanCompletion.xsd"); checkResultByFile("SchemaBooleanCompletion_after.xsd"); }
testSchemaBooleanCompletion
300,550
void () { configureByFile("XIncludeCompletion.xsd"); checkResultByFile("XIncludeCompletion_after.xsd"); }
testXIncludeCompletion
300,551
void () { configureByFile("CorrectPrefixInsertion.xml"); checkResultByFile("CorrectPrefixInsertion_after.xml"); }
testCorrectPrefixInsertion
300,552
void () { basicDoTest(""); }
testDoNotSuggestAbstractElementsFromSchema
300,553
void (String ext) { final String testName = getTestName(false) + ext; configureByFile(testName + ".xml"); checkResultByFile(testName + "_after.xml"); }
basicDoTest
300,554
void () { basicDoTest(""); }
testDoNotSuggestTagsFromOtherNsInXslt
300,555
void () { final String testName = getTestName(false); configureByFile(testName + ".xml"); myFixture.type('\n'); checkResultByFile(testName + "_after.xml"); }
testDoNotSuggestTagsFromOtherNsInXslt_2
300,556
void () { final String testName = getTestName(false); configureByFile(testName + ".xml"); myFixture.type('\n'); checkResultByFile(testName + "_after.xml"); }
testDoNotSuggestTagsFromOtherNsInXslt_3
300,557
void () { basicDoTest(""); }
testDoNotSuggestTagsInXHtml
300,558
void () { basicDoTest(""); basicDoTest("_2"); }
testSuggestTagsInXHtml
300,559
void () { configureByFiles(getTestName(false) + ".xml", "mule.xsd", "mule-management.xsd"); complete(); myFixture.type('\n'); checkResultByFile(getTestName(false) + "_after.xml"); }
testCompleteWithSubstitutionGroup
300,560
void () { ((StatisticsManagerImpl)StatisticsManager.getInstance()).enableStatistics(myFixture.getTestRootDisposable()); addResource("http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd", getTestDataPath() + "/hibernate-mapping-3.0.dtd"); configureByFile("CorrectSelectionInsertion.xml"); selectItem(myFixture.getLookupElements()[4], '\t'); checkResultByFile("CorrectSelectionInsertion_after.xml"); StatisticsUpdate.applyLastCompletionStatisticsUpdate(); configureByFile("CorrectSelectionInsertion2.xml"); myFixture.getEditor().getSelectionModel().removeSelection(); selectItem(myFixture.getLookupElements()[0], '\t'); checkResultByFile("CorrectSelectionInsertion2_after.xml"); }
testCorrectSelectionInsertion
300,561
void () { final int old = CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE; CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE = CodeInsightSettings.NONE; String location = "30.dtd"; try { addResource(location, location); configureByFiles("30.xml", location); complete(); assertOrderedEquals(myFixture.getLookupElementStrings(), "map", "Map"); } finally { CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE = old; } }
testCasePreference
300,562
void () { basicDoTest(""); basicDoTest("_2"); }
testCompleteXmlLang
300,563
void () { boolean old = CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION; CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = false; try { final String testName = getTestName(false); configureByFiles(testName + ".xml", testName + ".xsd"); complete(); selectItem(myFixture.getLookupElements()[0], '\"'); checkResultByFile(testName + "_after.xml"); } finally { CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = old; } }
testCompleteWhenNoNsSchemaLocation
300,564
void () { final String testName = getTestName(false); configureByFiles(testName + ".xml", testName + ".xsd"); complete(); checkResultByFile(testName + "_after.xml"); }
testCompleteWhenUnqualifiedElements
300,565
void () { final String testName = getTestName(false); configureByFiles(testName + ".xml", testName + ".xsd", testName + "-vm.xsd", testName + "-jms.xsd", testName + "-stdio.xsd", testName + "-schemadoc.xsd"); complete(); checkResultByFile(testName + "_after.xml"); }
_testIDEADEV_32773
300,566
void () { final String testName = getTestName(false); configureByFiles(testName + ".xml", testName + "_importedSchema.xsd", testName + "_outerSchema.xsd"); complete(); checkResultByFile(testName + "_after.xml"); }
testCompleteEnumeration
300,567
void () { configureByFile(getTestName(false) + ".xml"); complete(); assertEmpty(myFixture.getLookupElements()); checkResultByFile(getTestName(false) + "_after.xml"); }
testAttributeNameInAttributeValue
300,568
void () { basicDoTest(""); }
testNoFixedAttrComplete
300,569
void () { myFixture.addClass("public class ABxxZ {}"); final String testName = getTestName(false); myFixture.configureByFile(testName + ".xml"); myFixture.complete(CompletionType.BASIC, 2); assertEquals("ABxxZ", myFixture.getLookupElements()[0].getLookupString()); assertEquals("ABxxCDEF", myFixture.getLookupElements()[1].getLookupString()); selectItem(myFixture.getLookupElements()[1], Lookup.NORMAL_SELECT_CHAR); checkResultByFile(testName + "_after.xml"); }
testCompleteWords
300,570
void () { myFixture.addClass("package foo; public class SomeClass {}"); final String testName = getTestName(false); myFixture.configureByFile(testName + ".xml"); myFixture.complete(CompletionType.BASIC, 2); selectItem(assertOneElement(myFixture.getLookupElements()), Lookup.NORMAL_SELECT_CHAR); checkResultByFile(testName + "_after.xml"); }
testClassNamesOutrankWords
300,571
void () { configureByFile(getTestName(false) + ".xml"); type('f'); type('o'); type('o'); type(':'); assertNotNull(LookupManager.getActiveLookup(myFixture.getEditor())); }
testColonInTagName
300,572
void () { configureByFile("doNotInsertClosingTagB4Text.xml"); selectItem(myFixture.getLookupElements()[0], '>'); checkResultByFile("doNotInsertClosingTagB4Text_after.xml"); }
testDoNotInsertClosingTagB4Text
300,573
void (LookupElement element, char ch) { final LookupImpl lookup = (LookupImpl)LookupManager.getActiveLookup(myFixture.getEditor()); lookup.setCurrentItem(element); lookup.finishLookup(ch); }
selectItem
300,574
void () { configureByFile("doNotInsertClosingTagWithoutTagName.xml"); type('>'); //assertNotNull(myItems); //selectItem(myItems[0], '>'); checkResultByFile("doNotInsertClosingTagWithoutTagName_after.xml"); }
testDoNotInsertClosingTagWithoutTagName
300,575
void () { addResource("http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd", getTestDataPath() + "archetype-descriptor-1.0.0.xsd"); basicDoTest(""); }
testCompleteXmlTag
300,576
void () { basicDoTest(""); }
testCompleteXsl
300,577
void () { configureByFiles("foo.xsd", "bar.xsd"); basicDoTest(""); }
testAttributeWildcardFromAnotherNamespace
300,578
void () { configureByFiles("foo.xsd", "bar.xsd"); basicDoTest(""); }
testCompleteQualifiedTopLevelTags
300,579
void () { myFixture.copyFileToProject("UnqualifiedElement.xsd"); myFixture.testCompletionVariants("UnqualifiedElement.xml", "code"); }
testUnqualifiedElement
300,580
void () { myFixture.configureByFile("DoNotSuggestExistingAttributes.xml"); myFixture.completeBasic(); List<String> strings = myFixture.getLookupElementStrings(); assertNotNull(strings); assertFalse(strings.contains("xsi:schemaLocation")); assertSameElements(strings, "attributeFormDefault", "blockDefault", "elementFormDefault", "finalDefault", "id", "targetNamespace", "version", "xml:base", "xml:id", "xml:lang", "xml:space", "xsi:nil", "xsi:noNamespaceSchemaLocation", "xsi:type"); }
testDoNotSuggestExistingAttributes
300,581
void () { myFixture.configureByText("foo.html", "<img <caret>"); myFixture.completeBasic(); List<String> strings = myFixture.getLookupElementStrings(); assertNotNull(strings); assertEquals("alt", strings.get(0)); assertEquals("src", strings.get(1)); assertEquals("align", strings.get(2)); }
testRequiredAttributesOnTop
300,582
void () { myFixture.configureByText("foo.xsd", """ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <<caret> </xs:schema>"""); myFixture.completeBasic(); assertSameElements(myFixture.getLookupElementStrings(), "xs:annotation", "xs:attribute", "xs:attributeGroup", "xs:complexType", "xs:element", "xs:group", "xs:import", "xs:include", "xs:notation", "xs:redefine", "xs:simpleType"); }
testDoNotProcessAnyInRestrictions
300,583
void () { myFixture.configureByFiles("Substitute/schema-a.xsd", "Substitute/schema-b.xsd"); myFixture.testCompletionVariants("Substitute/test.xml", "b:instance", "instance"); }
testSubstitute
300,584
void () { myFixture.testCompletion("Substitute/testAfterPrefix.xml", "Substitute/testAfterPrefix_after.xml", "Substitute/schema-a.xsd", "Substitute/schema-b.xsd"); }
testAfterPrefix
300,585
void () { myFixture.configureByFile("tagValue/enumerated.xsd"); myFixture.testCompletionVariants("tagValue/completeEnum.xml", "none", "standard"); myFixture.testCompletionVariants("tagValue/completeBoolean.xml", "false", "true"); }
testEnumeratedTagValue
300,586
void () { myFixture.configureByFiles("InheritedAttr/test.xsd", "InheritedAttr/library.xsd"); myFixture.testCompletionVariants("InheritedAttr/test.xml", "buz", "library:boo", "xml:base", "xml:id", "xml:lang", "xml:space"); }
testInheritedAttribute
300,587
void () { myFixture.configureByFiles("spring-beans.xsd"); myFixture.testCompletionVariants("SchemaLocation.xml", "http://www.springframework.org/schema/beans ", "http://www.w3.org/2001/XMLSchema ", "http://www.w3.org/2001/XMLSchema-instance "); myFixture.testCompletionVariants("SchemaLocation2.xml", "http://www.w3.org/2001/XMLSchema.xsd"); }
testSchemaLocation
300,588
void () { myFixture.configureByText("foo.xml", "<schema xmlns=\"<caret>\"/>"); LookupElement[] elements = myFixture.completeBasic(); assertEquals("http://www.w3.org/2001/XMLSchema", elements[0].getLookupString()); myFixture.configureByText("unknown.xml", "<unknown_tag_name xmlns=\"<caret>\"/>"); myFixture.completeBasic(); assertTrue(myFixture.getLookupElementStrings().size() > 3); // all standard schemas actually }
testNamespaceCompletion
300,589
void () { myFixture.configureByFiles("main.xsd", "sub.xsd"); LookupElement[] elements = myFixture.completeBasic(); assertTrue(Arrays.stream(elements).anyMatch(element -> "http://www.test.com/sub".equals(element.getLookupString()))); }
testCustomNamespaceCompletion
300,590
void () { boolean old = CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION; CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = false; try { myFixture.configureByText("foo.xml", "<schem<caret>"); myFixture.completeBasic(); myFixture.type('\n'); myFixture.checkResult("<schema xmlns=\"http://www.w3.org/2001/XMLSchema\"<caret>"); } finally { CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = old; } }
testRootTagCompletion
300,591
void () { myFixture.configureByText("foo.xml", "<<caret>"); myFixture.completeBasic(); myFixture.type('?'); myFixture.type('\n'); myFixture.checkResult("<?xml version=\"1.0\" encoding=\"<caret>\" ?>"); }
testPi
300,592
void () { myFixture.configureByText("foo.xml", """ <schema xmlns="http://www.w3.org/2001/XMLSchema"> <element name="a" abstract=<caret>""/> </schema>"""); LookupElement[] elements = myFixture.completeBasic(); assertEquals(0, elements.length); }
testAttributeValueToken
300,593
void () { List<String> variants = myFixture.getCompletionVariants("MultipleImports/agg.xsd", "MultipleImports/toimport1.xsd", "MultipleImports/toimport2.xsd"); assertSameElements(variants, "int", "integer", "invisibleType"); }
testMultipleImports
300,594
void () { List<String> variants = myFixture.getCompletionVariants("enumerations.xml", "enumerations.xsd"); assertSameElements(variants, "A", "B"); }
testEnumeratedTypeUnion
300,595
HtmlCodeStyleSettings () { return CodeStyle.getSettings(myFixture.getProject()) .getCustomSettings(HtmlCodeStyleSettings.class); }
getHtmlSettings
300,596
void () { doTest("<div<caret>></div>", "v", "<divv></divv>"); }
testStartToEnd
300,597
void () { doTest("<div></div<caret>>", "v", "<divv></divv>"); }
testEndToStart
300,598
void () { doTest("<div<caret>></div>", "v", "<divv></divv>"); myFixture.getEditor().getCaretModel().moveToOffset(12); type("\b"); myFixture.checkResult("<div></div>"); }
testStartToEndAndEndToStart
300,599
void () { doTest("<div<caret>></div>", "\b\b\b", "<></>"); }
testLastCharDeleted