Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
300,900
void () { doTestWithLocations( new String[] [] { {"http://example.com/persistence","XIncludeTestSchema.xsd"} }, "xml" ); }
testDtdElementRefs
300,901
void () { doTestWithLocations(null, "xsd"); doTestWithLocations(null, "dtd"); doTestWithLocations(null, "xml"); }
testDuplicates
300,902
void () { doTestWithLocations(null, "xsd"); }
testMinMaxOccursInSchema
300,903
void () { doTestWithLocations(null, "xsl"); }
testXslt2
300,904
void () { doTestWithLocations(null, "xsd"); }
testDefaultAndFixedInSchema
300,905
void () { doTestWithLocations( new String[] [] { {"http://www.foo.org/test",getTestName(false)+".xsd"}, {"http://www.bar.org/test",getTestName(false)+"_2.xsd"} }, "xml" ); }
testAnyAttributesInAttrGroup
300,906
void () { final String testName = getTestName(false); configureByFiles( null, BASE_PATH + testName +".xml", BASE_PATH +testName +"-inc.xml", BASE_PATH +testName +"TestSchema.xsd" ); ExternalResourceManagerEx.getInstanceEx().addIgnoredResources(Collections.singletonList("oxf:/apps/somefile.xml"), getTestRootDisposable()...
testXInclude
300,907
void () { final String[][] urls = { {"http://www.springframework.org/schema/beans/spring-beans-2.0.xsd", "spring-beans-2.0.xsd"}, {"http://www.springframework.org/schema/tool", "spring-tool-2.5.xsd"}, {"http://www.springframework.org/schema/context/spring-context-2.5.xsd", "spring-context-2.5.xsd"}, {"urn:xxx","mule.xs...
testMuleConfigHighlighting
300,908
void () { String path = getTestName(false) + File.separatorChar; final String[][] urls = { {"http://www.springframework.org/schema/beans/spring-beans-2.0.xsd", "spring-beans-2.0.xsd"}, {"http://www.springframework.org/schema/tool", "spring-tool-2.5.xsd"}, {"http://www.springframework.org/schema/context/spring-context-2...
testMuleConfigHighlighting2
300,909
boolean () { return "testComplexRedefine3".equals(getName()); }
clearModelBeforeConfiguring
300,910
void () { final String testName = getTestName(false); String[][] urls = { {"http://extended", testName + ".xsd"}, {"http://simple", testName + "_2.xsd"} }; doTestWithLocations(urls, "xml"); }
testComplexRedefine5
300,911
void () { final String testName = getTestName(false); String[][] urls = { {"urn:jboss:bean-deployer:2.0", testName + ".xsd"}, {"", testName + "_2.xsd"} }; doTestWithLocations(urls,"xml"); }
testComplexRedefine6
300,912
void () { configureByFiles(null,BASE_PATH + getTestName(false) + ".xml", BASE_PATH + "mylib.jar"); String path = myFile.getVirtualFile().getParent().getPath() + "/"; String[][] urls = { {"http://graphml.graphdrawing.org/xmlns",path + "mylib.jar!/graphml.xsd"}, {"http://graphml.graphdrawing.org/xmlns/1.0/graphml-structu...
testComplexRedefineFromJar
300,913
void () { doTestWithLocations(null, "xml"); final List<XmlAttribute> attrs = new ArrayList<>(2); myFile.acceptChildren(new XmlRecursiveElementVisitor() { @Override public void visitXmlAttribute(final @NotNull XmlAttribute attribute) { if (!attribute.isNamespaceDeclaration()) attrs.add(attribute); } }); assertEquals(4,a...
testUnqualifiedAttributePsi
300,914
void (final @NotNull XmlAttribute attribute) { if (!attribute.isNamespaceDeclaration()) attrs.add(attribute); }
visitXmlAttribute
300,915
void (final XmlAttribute xmlAttribute, String expectedNs) { final String attrNs = xmlAttribute.getNamespace(); assertEquals(expectedNs, attrNs); final XmlTag parent = xmlAttribute.getParent(); assertEquals(parent.getAttribute(xmlAttribute.getLocalName(), attrNs), xmlAttribute); //final String parentNs = parent.getNames...
checkAttribute
300,916
void () { doTestWithLocations(null, "xsd"); }
testProblemWithImportedNsReference
300,917
void () { doTestWithLocations(null, "xsd"); }
testProblemWithMemberTypes
300,918
void () { final String testName = getTestName(false); doTestWithLocations( new String[][] { {"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-inlstyle-1.mod",testName + ".mod"} }, "dtd" ); }
testDtdHighlighting
300,919
void () { doTestWithLocations(new String[][]{ {"schemas/Forms.xsd", "Forms.xsd"} }, "xml"); }
testMappedSchemaLocation
300,920
void () { configureByFiles(null, BASE_PATH + "anyAttribute.xml", BASE_PATH + "services-1.0.xsd"); doDoTest(true, false); }
testAnyAttribute
300,921
void () { configureByFiles(null, BASE_PATH + "UnityEngine.xml", BASE_PATH + "UnityEngine.UIElements.xsd"); doDoTest(true, false); }
testAnyAttributeDefaultNamespace
300,922
void () { configureByFiles(null, BASE_PATH + "qualified.xml", BASE_PATH + "qualified.xsd"); doDoTest(true, false); }
testQualifiedAttributeReference
300,923
void () { configureByFiles(null, BASE_PATH + "UnqualifiedElement.xml", BASE_PATH + "UnqualifiedElement.xsd"); doDoTest(true, false); }
testUnqualifiedElement
300,924
void () { configureByFiles(null, BASE_PATH + "EnumeratedBoolean.xml", BASE_PATH + "EnumeratedBoolean.xsd"); doDoTest(true, false); }
testEnumeratedBoolean
300,925
void () { configureByFiles(null, BASE_PATH + "servers.xml", BASE_PATH + "servers.xsd"); doDoTest(true, false); }
testEnumeratedList
300,926
void () { configureByFiles(null, BASE_PATH + "enumerations.xml", BASE_PATH + "enumerations.xsd"); doDoTest(true, false); }
testEnumeratedExtension
300,927
void () { configureByFiles(null, BASE_PATH + "CustomBoolean.xml", BASE_PATH + "CustomBoolean.xsd"); doDoTest(true, false); }
testCustomBoolean
300,928
void () { configureByFiles(null, BASE_PATH + "XMLSchema_1_1.xsd"); doHighlighting(); }
testStackOverflowInSchema
300,929
void () { configureByFiles(null, BASE_PATH + "Versioning.xsd"); doDoTest(true, false); }
testSchemaVersioning
300,930
void () { configureByFiles(null, BASE_PATH + "BillionLaughs.xml"); XmlFile file = (XmlFile)getFile(); int[] count = {0}; XmlUtil.processXmlElements(file.getRootTag(), element -> { count[0]++; return true;}, false); assertEquals(9, count[0]); }
testBillionLaughs
300,931
void () { Locale locale = Locale.getDefault(); try { Locale.setDefault(Locale.ENGLISH); configureByFiles(null, BASE_PATH + "BillionLaughs.xml"); doDoTest(false, false); } finally { Locale.setDefault(locale); } }
testBillionLaughsValidation
300,932
void () { configureByFiles(null, BASE_PATH + "MaxOccurLimit.xml", BASE_PATH + "MaxOccurLimit.xsd"); assertTrue(doHighlighting().stream().anyMatch(info -> info.getSeverity() == HighlightSeverity.ERROR)); configureByFiles(null, BASE_PATH + "MaxOccurLimit.xml", BASE_PATH + "MaxOccurLimit.xsd"); System.setProperty(Validate...
testMaxOccurLimitValidation
300,933
void () { configureByFiles(null, BASE_PATH + "ImportedAttr/main.xml", BASE_PATH + "ImportedAttr/main.xsd", BASE_PATH + "ImportedAttr/include.xsd"); doHighlighting(); }
testImportedAttr
300,934
void () { configureByFiles(null, BASE_PATH + "test.xhtml"); doDoTest(true, false); }
testXhtml
300,935
LocalInspectionTool[] () { return new LocalInspectionTool[]{ new RequiredAttributesInspection(), new XmlDuplicatedIdInspection(), new XmlInvalidIdInspection(), new CheckDtdReferencesInspection(), new XmlUnboundNsPrefixInspection(), new XmlPathReferenceInspection() }; }
configureLocalInspectionTools
300,936
void () { final ExternalResourceManagerEx manager = ExternalResourceManagerEx.getInstanceEx(); myOldDoctype = manager.getDefaultHtmlDoctype(getProject()); manager.setDefaultHtmlDoctype("fake", getProject()); }
disableHtmlSupport
300,937
void () { ExternalResourceManagerEx.getInstanceEx().setDefaultHtmlDoctype(myOldDoctype, getProject()); }
enableHtmlSupport
300,938
String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/"; }
getTestDataPath
300,939
void () { myFixture.enableInspections(new XmlDefaultAttributeValueInspection()); myFixture.configureByText(XmlFileType.INSTANCE, "<schema xmlns=\"http://www.w3.org/2001/XMLSchema\" elementFormDefault=<warning descr=\"Redundant default attribute value assignment\">\"unqua<caret>lified\"</warning>>\n" + "</schema>"); myF...
testDefaultAttributeValue
300,940
void () { myFixture.enableInspections(new XmlDefaultAttributeValueInspection()); myFixture.configureByText(HtmlFileType.INSTANCE, """ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <form action="index.php"> <input type="hidden" name="name_1" value="val_1"> <input type...
testHtmlFromRncSchema
300,941
void () { myFixture.enableInspections(new XmlDefaultAttributeValueInspection()); myFixture.configureByText(HtmlFileType.INSTANCE, "<input type=\"text\"/>"); myFixture.checkHighlighting(); }
testDefaultAttributeInHtml
300,942
void () { myFixture.enableInspections(new XmlDefaultAttributeValueInspection()); myFixture.testHighlighting("def.xml", "def.xsd"); }
testRequiredFixedAttribute
300,943
void () { myFixture.enableInspections(new XmlDefaultAttributeValueInspection()); myFixture.addFileToProject("foo.xsd", """ <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="def/attr"> <element name="foo"> <complexType> <attribute name="bar" default=""/> </complexType> </element> </schema>"""); myFixture...
testEmptyDefaultAttributeValue
300,944
void () { myFixture.enableInspections(new XmlDeprecatedElementInspection()); myFixture.testHighlighting("deprecated.xml", "deprecated.xsd"); }
testDeprecations
300,945
void () { myFixture.testHighlighting("cdataEndHighlighting.xml"); }
testCDataEndHighlightingXml
300,946
void () { myFixture.testHighlighting("cdataEndHighlighting.html"); }
testCDataEndHighlightingHtml
300,947
String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/xml"; }
getTestDataPath
300,948
LocalInspectionTool[] () { return new LocalInspectionTool[]{ new RequiredAttributesInspection(), new XmlDuplicatedIdInspection(), new XmlInvalidIdInspection(), new CheckDtdReferencesInspection(), new XmlUnboundNsPrefixInspection(), new XmlPathReferenceInspection() }; }
configureLocalInspectionTools
300,949
String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/"; }
getTestDataPath
300,950
void () { checkValidation("<idea-plugin xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n" + "</idea-plugin>"); }
testCannotFindDeclaration
300,951
void () { checkValidation(""" <idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="extensionPoints.xml" xpointer="xpointer(/extensionPoints/*)"/> </idea-plugin>"""); }
testUnsupportedIncludeScheme
300,952
void (String text) { myFixture.enableInspections(CheckXmlFileWithXercesValidatorInspection.class); myFixture.configureByText(XmlFileType.INSTANCE, text); myFixture.testHighlighting(); }
checkValidation
300,953
String () { return "/quickFix/ignoreExternalResources"; }
getBasePath
300,954
void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { findActionAndCheck(actionHint, testFullPath); }
doAction
300,955
String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/"; }
getTestDataPath
300,956
void () { XmlFile file = (XmlFile)myFixture.configureByText(XmlFileType.INSTANCE, "<a b=\" &<caret>\"/>"); PsiElement element = file.getRootTag().getAttribute("b").getValueElement(); LanguageInjectionSupport support = TemporaryPlacesRegistry.getInstance(getProject()).getLanguageInjectionSupport(); assertTrue(support.ad...
testEscapeAmpersandInInjected
300,957
String () { return "/codeInsight/daemonCodeAnalyzer/quickFix/removeExtraClosingTag"; }
getBasePath
300,958
String () { return XmlTestUtil.getXmlTestDataPath(); }
getTestDataPath
300,959
String () { return "/quickFix/fetchExternalResources"; }
getBasePath
300,960
void () { doExtractionOfEmbeddedFiles( "1.dtd", "xhtml-lat1.ent", "xhtml-symbol.ent", "xhtml-special.ent"); doExtractionOfEmbeddedFiles( "1.xsd", "j2ee_1_4.xsd", "jsp_2_0.xsd"); doExtractionOfEmbeddedFiles( new String[] { "2.dtd", "2.mod" }, new String[][] { new String[] {"dbnotnx.mod", "dbcentx.mod", "dbpoolx.mod", "d...
testExtractionOfEmbeddedFiles
300,961
void () { doExtractionOfEmbeddedFiles( "6.xml", "http://jboss.com/products/seam/components-1.2.xsd"); }
testSeamImport
300,962
void () { doExtractionOfEmbeddedFiles("BPMN20.xsd", "BPMNDI.xsd", "Semantic.xsd"); }
testBPMN
300,963
void () { doExtractionOfEmbeddedFiles("web-1.1", "http://geronimo.apache.org/xml/ns/geronimo-naming-1.1.xsd", "http://geronimo.apache.org/xml/ns/geronimo-security-1.1.xsd", "http://geronimo.apache.org/xml/ns/geronimo-module-1.1.xsd"); }
testGeronimo
300,964
void (String shortFileName,String... expectedFileNames) { doExtractionOfEmbeddedFiles(new String[] {shortFileName}, new String[][] {expectedFileNames} ); }
doExtractionOfEmbeddedFiles
300,965
void (String[] shortFileName,String[][] expectedFileNames) { final List<VirtualFile> files = new ArrayList<>(shortFileName.length); for(String s: shortFileName) { if (FileUtilRt.getExtension(s).length() < 3) { s += ".xsd"; } files.add(getVirtualFile( getBasePath() + "/"+ s )); } int fileIndex = 0; for (int i = 0; i < e...
doExtractionOfEmbeddedFiles
300,966
String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/"; }
getTestDataPath
300,967
String () { return "/quickFix/manuallySetupExternalResources"; }
getBasePath
300,968
void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { findActionAndCheck(actionHint, testFullPath); }
doAction
300,969
String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/"; }
getTestDataPath
300,970
String () { return "/codeInsight/daemonCodeAnalyzer/quickFix/createTypeElementAttributeEtcInSchema"; }
getBasePath
300,971
String () { return XmlTestUtil.getXmlTestDataPath(); }
getTestDataPath
300,972
String () { return "/codeInsight/daemonCodeAnalyzer/quickFix/renameToSimilarAttribute"; }
getBasePath
300,973
String () { return XmlTestUtil.getXmlTestDataPath(); }
getTestDataPath
300,974
String () { return "/quickFix/replaceTagEmptyBodyWithEmptyEnd"; }
getBasePath
300,975
String () { return XmlTestUtil.getXmlTestDataPath(); }
getTestDataPath
300,976
void () { final String url = "http://java.sun.com/dtd/preferences.dtd"; assertEquals(url, ExternalResourceManager.getInstance().getResourceLocation(url, getProject())); myFixture.configureByText(XmlFileType.INSTANCE, "<!DOCTYPE images SYSTEM \"http://java.sun.com/dtd/prefer<caret>ences.dtd\">"); invokeFetchIntention(ur...
testFetchDtd
300,977
void (String url) { IntentionAction intention = myFixture.getAvailableIntention(XmlBundle.message("xml.intention.fetch.name")); assertNotNull(intention); try { intention.invoke(getProject(), myFixture.getEditor(), myFixture.getFile()); } catch (Throwable e) { Throwable cause = ExceptionUtil.getRootCause(e); if (cause.g...
invokeFetchIntention
300,978
void () { final String url = "https://community.rti.com/schema/6.0.0/rti_dds_qos_profiles.xsd"; assertEquals(url, ExternalResourceManager.getInstance().getResourceLocation(url, getProject())); myFixture.configureByText(XmlFileType.INSTANCE, """ <dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceS...
testRelativePath
300,979
void () { final String url = "https://community.rti.com/schema/6.0.0/rti_dds_profiles.xsd"; assertEquals(url, ExternalResourceManager.getInstance().getResourceLocation(url, getProject())); myFixture.configureByText(XmlFileType.INSTANCE, """ <?xml version="1.0" encoding="UTF-8" ?> <dds xmlns:xsi="http://www.w3.org/2001/...
testNestedRelativePath
300,980
void () { String url = "https://csrc.nist.gov/schema/xccdf/1.2/xc<caret>cdf_1.2.xsd"; myFixture.configureByText(XmlFileType.INSTANCE, """ <Benchmark xmlns="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 https://csrc.ni...
testAbsolutePath
300,981
String () { return "/quickFix/fetchExternalResources"; }
getBasePath
300,982
void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { IntentionAction action = findActionAndCheck(actionHint, testFullPath); if (action != null && testName.equals("5.xml")) { final String uri = FetchExtResourceAction.findUri(getFile(), getEditor().getCaretModel().getOffset()); ...
doAction
300,983
String () { return XmlTestUtil.getXmlTestDataPath(); }
getTestDataPath
300,984
void () { PsiFile file = myFixture.configureByText(XmlFileType.INSTANCE, "<a> <caret> </a>"); assertTrue(new CollapseTagIntention().isAvailable(getProject(), myFixture.getEditor(), file)); }
testAvailable
300,985
void () { PsiFile file = myFixture.configureByText(XmlFileType.INSTANCE, "<a> <caret> <b/> </a>"); assertFalse(new CollapseTagIntention().isAvailable(getProject(), myFixture.getEditor(), file)); }
testNotAvailable
300,986
void () { PsiFile file = myFixture.configureByText(XmlFileType.INSTANCE, "<a/>"); assertFalse(new CollapseTagIntention().isAvailable(getProject(), myFixture.getEditor(), file)); }
testAlreadyCollapsed
300,987
void () { myFixture.enableInspections(new CheckTagEmptyBodyInspection()); PsiFile file = myFixture.configureByText(XmlFileType.INSTANCE, """ <a> <b><caret></b> </a>"""); assertTrue(new CollapseTagIntention().isAvailable(getProject(), myFixture.getEditor(), file)); IntentionAction action = myFixture.findSingleIntention(...
testCollapseInnerTag
300,988
void () { FileType[] MARKUP_FILE_TYPES = {XmlFileType.INSTANCE, HtmlFileType.INSTANCE, XHtmlFileType.INSTANCE}; mySettings.setDefaultRightMargin(60); for (FileType fileType : MARKUP_FILE_TYPES) { checkWrapOnTyping( fileType, "12345", "<my-tag-with-long-name attr='this.is.my.attribute.that.is.already.<caret>rather.long'...
testWrapInAttributeValue
300,989
void () { XmlFile file = (XmlFile)PsiFileFactory.getInstance(getProject()) .createFileFromText("a.xhtml", XHtmlFileType.INSTANCE, """ <a> <b/> </a>"""); XmlTag rootTag = file.getDocument().getRootTag(); XmlTag finalRootTag = rootTag; WriteCommandAction.runWriteCommandAction(null, () -> finalRootTag.getSubTags()[0].dele...
testXHTML
300,990
void () { XmlTag tag = XmlElementFactory.getInstance(getProject()) .createTagFromText(""" <fabrique-element element="wpd" name="Index"> <wpd/> </fabrique-element>"""); tag.add(tag.createChildTag("layout", "", """ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http...
testAddLayoutSubTag
300,991
void () { Project ideaProject = getProject(); PsiManager psiManager = PsiManager.getInstance(ideaProject); XmlFile fileFromText = (XmlFile)PsiFileFactory.getInstance(psiManager.getProject()) .createFileFromText("sample.xhtml", XHtmlFileType.INSTANCE, "<html><body><p/></body></html>", LocalTimeCounter.currentTime(), tru...
testAddTag
300,992
void (Runnable runnable) { ApplicationManager.getApplication().runWriteAction(() -> CommandProcessor.getInstance() .executeCommand(getProject(), runnable, "", null, UndoConfirmationPolicy.DO_NOT_REQUEST_CONFIRMATION)); }
execute
300,993
void () { XmlTag aTag = XmlElementFactory.getInstance(getProject()).createTagFromText("<a>a <b>123 <z/> ff</b> c</a>"); XmlTag bTag = aTag.findFirstSubTag("b"); CodeStyle.getSettings(getProject()).getCustomSettings(XmlCodeStyleSettings.class).XML_KEEP_WHITESPACES = true; XmlTagChild[] valueChildren = bTag.getValue().ge...
testKuralenok_DeleteTagKeepingContent
300,994
void () { String html = "<html><head /><body><hr /></body>\n</html>"; XmlFile file = (XmlFile)PsiFileFactory.getInstance(getProject()).createFileFromText("a.html", HtmlFileType.INSTANCE, html); XmlTag body = file.getDocument().getRootTag().findFirstSubTag("body"); XmlTag hr = body.getSubTags()[0]; XmlText text = XmlEle...
testSCR1542
300,995
void () { XmlFile file = (XmlFile)PsiFileFactory.getInstance(getProject()).createFileFromText("a.xhtml", XHtmlFileType.INSTANCE, """ <html> <body xmlns:fabrique="https://www.jetbrains.com/schemas/fabrique/page-template"><p> ujhgjhgjhg<table style="width: 82px; height: 84px"><tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><t...
testDeleteTable
300,996
void () { String html = """ <html> <head /> <body xmlns:fabrique="https://www.jetbrains.com/schemas/fabrique/page-template"> <div style="border: 1px solid green; margin: 2px; padding: 2px;"><p><span style="color: red"><span style="font-size: 15pt">12345678</span></span></p></div> </body> </html>"""; XmlFile file = (Xml...
testReplaceTag
300,997
void () { PsiFile file = myFixture.configureByText(XmlFileType.INSTANCE, "<!-- foo -->"); XmlComment element = (XmlComment)file.findElementAt(0).getParent(); assertEquals(" foo ", element.getCommentText()); }
testXmlComment
300,998
XmlFile (@NonNls final String xml) { return (XmlFile)createLightFile("a.xml", XmlFileType.INSTANCE, xml); }
createXmlFile
300,999
PsiFile (final String fileName, final FileType fileType, final String text) { return PsiFileFactory.getInstance(getProject()).createFileFromText(fileName, fileType, text); }
createLightFile