Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
61,800
void () { addPluginXml("xxx", """ <id>com.intellij.xxx</id> <extensionPoints> <extensionPoint name="completion.contributor"/> </extensionPoints> """); myFixture.copyFileToProject(getTestName(false) + "_main.xml", "META-INF/plugin.xml"); myFixture.configureFromExistingVirtualFile(myFixture.copyFileToProject(getTestName(...
testResolveExtensionsFromDependentDescriptor
61,801
void () { myFixture.addClass("package foo; public class FooFooFooFooFoo { }"); myFixture.addClass("package foo; public interface ExtIntf { }"); myFixture.configureByFile(getTestName(false) + ".xml"); myFixture.completeBasic(); myFixture.type('\''); myFixture.checkResultByFile(getTestName(false) + "_after.xml"); }
testNoWordCompletionInClassPlaces
61,802
void () { myFixture.addClass("package foo; public class FooFooFooFooFoo { }"); myFixture.configureByFile(getTestName(false) + ".xml"); myFixture.completeBasic(); myFixture.checkResultByFile(getTestName(false) + "_after.xml"); }
testNoClassCompletionOutsideJavaReferences
61,803
void () { myFixture.addClass("package foo.bar; public class BarAction extends com.intellij.openapi.actionSystem.AnAction { }"); myFixture.addClass("package foo.goo; public class GooAction extends com.intellij.openapi.actionSystem.AnAction { }"); myFixture.configureByFile(getTestName(false) + ".xml"); myFixture.complete...
testShowPackagesInActionClass
61,804
void () { myFixture.addClass("package foo.bar; public class BarAction extends com.intellij.openapi.actionSystem.AnAction { }"); myFixture.addClass("package foo.goo; public class GooAction extends com.intellij.openapi.actionSystem.AnAction { }"); myFixture.addClass("package another.goo; public class AnotherAction extend...
testShowAnActionInheritorsOnSmartCompletion
61,805
void () { doHighlightingTest("extensionsSpecifyDefaultExtensionNs.xml"); }
testExtensionsSpecifyDefaultExtensionNs
61,806
void () { myFixture.enableInspections(DeprecatedClassUsageInspection.class); doHighlightingTest("deprecatedExtensionAttribute.xml", "MyExtBean.java"); }
testDeprecatedExtensionAttribute
61,807
void () { doHighlightingTest("deprecatedAttributes.xml"); }
testDeprecatedAttributes
61,808
void () { doHighlightingTest("extensionAttributeWithAccessors.xml", "ExtBeanWithAccessors.java"); }
testExtensionAttributeDeclaredUsingAccessors
61,809
void () { doHighlightingTest("extensionWithInnerTags.xml", "ExtBeanWithInnerTags.java"); }
testExtensionWithInnerTags
61,810
void () { doHighlightingTest("extensionWithDefaultValuesInAnnotations.xml", "ExtBeanWithDefaultValuesInAnnotations.java"); }
testExtensionBeanWithDefaultValuesInAnnotations
61,811
void () { doHighlightingTest("extensionDefinesWithAttributeViaAnnotation.xml", "ExtensionDefinesWithAttributeViaAnnotation.java"); }
testExtensionDefinesWithAttributeViaAnnotation
61,812
void () { myFixture.copyFileToProject("ExtensionDefinesWithAttributeViaAnnotation.java"); myFixture.testCompletionVariants("extensionDefinesWithAttributeViaAnnotation-completion.xml", "customAttributeName", "myAttributeWithoutAnnotation"); }
testExtensionDefinesWithAttributeViaAnnotationCompletion
61,813
void () { doHighlightingTest("extensionDefinesWithTagViaAnnotation.xml", "ExtensionDefinesWithTagViaAnnotation.java"); }
testExtensionDefinesWithTagViaAnnotation
61,814
void () { myFixture.copyFileToProject("ExtensionDefinesWithTagViaAnnotation.java"); myFixture.testCompletionVariants("extensionDefinesWithTagViaAnnotation-completion.xml", "myTag", "myTagWithoutAnnotation"); }
testExtensionDefinesWithTagViaAnnotationCompletion
61,815
void () { myFixture.addClass("package foo.bar; public class BarAction extends com.intellij.openapi.actionSystem.AnAction { }"); doHighlightingTest("actionExtensionPointAttribute.xml", "MyActionAttributeEPBean.java"); }
testActionExtensionPointAttributeHighlighting
61,816
void () { myFixture.allowTreeAccessForFile(myFixture.copyFileToProject("MyLanguage.java")); doHighlightingTest("languageAttribute.xml", "MyLanguageAttributeEPBean.java"); }
testLanguageAttributeHighlighting
61,817
void () { myFixture.allowTreeAccessForFile(myFixture.copyFileToProject("MyLanguage.java")); myFixture.allowTreeAccessForFile(myFixture.copyFileToProject("MyLanguageAttributeEPBean.java")); myFixture.configureByFile("languageAttribute.xml"); LookupElement[] lookupElements = myFixture.complete(CompletionType.BASIC); asse...
testLanguageAttributeCompletion
61,818
void () { myFixture.addClass("package foo; public class FooAction extends com.intellij.openapi.actionSystem.AnAction { }"); myFixture.enableInspections(DeprecatedClassUsageInspection.class); addIconClasses(); doHighlightingTest("iconAttribute.xml", "MyIconAttributeEPBean.java"); }
testIconAttribute
61,819
void () { addIconClasses(); myFixture.configureByFile("iconAttributeCompletion.xml"); Registry.get("ide.completion.variant.limit").setValue("5000", getTestRootDisposable()); myFixture.completeBasic(); List<String> lookupElementStrings = myFixture.getLookupElementStrings(); assertContainsElements(lookupElementStrings, "...
testIconAttributeCompletion
61,820
void () { myFixture.addClass("package icons; " + "public class MyIcons {" + " public static final javax.swing.Icon MyCustomIcon = null; " + "}"); myFixture.addClass("package my; " + "public class FqnIcons {" + " public static final javax.swing.Icon MyFqnIcon = null; " + " " + " public static class Inner {" + " public s...
addIconClasses
61,821
void () { doHighlightingTest("pluginWithModules.xml"); }
testPluginWithModules
61,822
void () { myFixture.addFileToProject("com/intellij/package-info.java", "package com.intellij;"); myFixture.testHighlighting(true, true, true, "pluginAttributes.xml"); }
testPluginAttributes
61,823
void () { doHighlightingTest("pluginWith99InUntilBuild.xml"); }
testPluginWith99InUntilBuild
61,824
void () { doHighlightingTest("pluginWith9999InUntilBuild.xml"); }
testPluginWith9999InUntilBuild
61,825
void () { doHighlightingTest("pluginForOldIdeWith9999InUntilBuild.xml"); }
testPluginForOldIdeWith9999InUntilBuild
61,826
void () { doHighlightingTest("pluginWith10000InUntilBuild.xml"); }
testPluginWith10000InUntilBuild
61,827
void () { doHighlightingTest("pluginWithStarInUntilBuild.xml"); }
testPluginWithStarInUntilBuild
61,828
void () { doHighlightingTest("pluginWithBranchNumberInUntilBuild.xml"); }
testPluginWithBranchNumberInUntilBuild
61,829
void () { doHighlightingTest("pluginWithInvalidSinceUntilBuild.xml"); }
testPluginWithInvalidSinceUntilBuild
61,830
void () { myFixture.configureByFile("pluginWithBigNumberInUntilBuild_before.xml"); myFixture.launchAction(myFixture.findSingleIntention("Change 'until-build'")); myFixture.checkResultByFile("pluginWithBigNumberInUntilBuild_after.xml"); }
testReplaceBigNumberInUntilBuildWithStarQuickFix
61,831
void () { myFixture.copyFileToProject("pluginWithXInclude.xml", "META-INF/pluginWithXInclude.xml"); myFixture.copyFileToProject("pluginWithXInclude-extensionPoints.xml", "META-INF/pluginWithXInclude-extensionPoints.xml"); myFixture.copyFileToProject("pluginWithXInclude-extensionPointsWithModule.xml", "META-INF/pluginWi...
testPluginWithXInclude
61,832
void () { testHighlightingInIdeaProject("pluginWithoutVendor.xml"); }
testPluginXmlInIdeaProjectWithoutVendor
61,833
void () { testHighlightingInIdeaProject("pluginWithThirdPartyVendor.xml"); }
testPluginXmlInIdeaProjectWithThirdPartyVendor
61,834
void () { testHighlightingInIdeaProject("pluginWithJetBrainsAsVendor.xml"); }
testPluginWithJetBrainsAsVendor
61,835
void () { testHighlightingInIdeaProject("pluginWithJetBrainsAndMeAsVendor.xml"); }
testPluginWithJetBrainsAndMeAsVendor
61,836
void () { testHighlightingInIdeaProject("pluginWithAndroidIdVendor.xml"); }
testPluginXmlInIdeaProjectWithAndroidId
61,837
void () { PsiUtil.markAsIdeaProject(getProject(), true); try { myFixture.configureByFile("pluginWithoutVendor_before.xml"); IntentionAction fix = myFixture.findSingleIntention("Specify JetBrains"); myFixture.launchAction(fix); myFixture.checkResultByFile("pluginWithoutVendor_after.xml"); } finally { PsiUtil.markAsIdeaP...
testSpecifyJetBrainsAsVendorQuickFix
61,838
void () { doHighlightingTest("pluginWithoutVersion.xml"); testHighlightingInIdeaProject("pluginWithoutVersion.xml"); }
testPluginWithoutVersion
61,839
void () { doHighlightingTest("orderAttributeHighlighting.xml"); }
testOrderAttributeHighlighting
61,840
void () { myFixture.testCompletionVariants(getTestName(true) + ".xml", LoadingOrder.FIRST_STR, LoadingOrder.LAST_STR, LoadingOrder.BEFORE_STR.trim(), LoadingOrder.AFTER_STR.trim()); }
testOrderAttributeCompletionKeywordsInEmptyValue
61,841
void () { myFixture.testCompletion(getTestName(true) + ".xml", getTestName(true) + "_after.xml"); }
testOrderAttributeCompletionBeforeKeyword
61,842
void () { // no first/last because there's already 'first' myFixture.testCompletionVariants(getTestName(true) + ".xml", LoadingOrder.BEFORE_STR.trim(), LoadingOrder.AFTER_STR.trim()); }
testOrderAttributeCompletionKeywords
61,843
void () { myFixture.testCompletionVariants(getTestName(true) + ".xml", "id1", "id2", "id3"); }
testOrderAttributeCompletionIds
61,844
void () { myFixture.testCompletionVariants(getTestName(true) + ".xml", "id1", "id2", "id3"); }
testOrderAttributeCompletionIdsWithFirst
61,845
void () { myFixture.testCompletion(getTestName(true) + ".xml", getTestName(true) + "_after.xml"); }
testOrderAttributeCompletionFirstKeywordWithId
61,846
void () { myFixture.testCompletionVariants(getTestName(true) + ".xml", "anyLanguage", "javaLanguage1", "withoutLanguage"); }
testOrderAttributeCompletionLanguage
61,847
void () { myFixture.testCompletionVariants(getTestName(true) + ".xml", "javaFiletype1", "withoutFiletype"); }
testOrderAttributeCompletionFileType
61,848
void (String path) { PsiUtil.markAsIdeaProject(getProject(), true); try { doHighlightingTest(path); } finally { PsiUtil.markAsIdeaProject(getProject(), false); } }
testHighlightingInIdeaProject
61,849
void () { myFixture.addClass(""" import com.intellij.openapi.diagnostic.ErrorReportSubmitter; public class MyErrorHandler extends ErrorReportSubmitter {} """); doHighlightingTest("errorHandlerExtensionInJetBrainsPlugin.xml"); }
testErrorHandlerExtensionInJetBrainsPlugin
61,850
void () { myFixture.addClass(""" import com.intellij.openapi.diagnostic.ErrorReportSubmitter; public class MyErrorHandler extends ErrorReportSubmitter {} """); doHighlightingTest("errorHandlerExtensionInNonJetBrainsPlugin.xml"); }
testErrorHandlerExtensionInNonJetBrainsPlugin
61,851
void () { myFixture.configureByFile(getTestName(true) + ".xml"); final PsiElement element = TargetElementUtil.findTargetElement(myFixture.getEditor(), TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED); assertNotNull(element); assertEquals("Extension Point", ElementDescriptionUtil.getElementDescription(element, UsageViewTy...
testExtensionPointPresentation
61,852
void () { configureByFile(); myFixture.testHighlighting(true, true, true); }
testLoadForDefaultProject
61,853
void () { configureByFile(); myFixture.testHighlighting(true, true, true); }
testSkipForDefaultProject
61,854
void () { myFixture.configureByFile(getTestName(true) + ".xml"); myFixture.launchAction(myFixture.findSingleIntention("Define class attribute")); myFixture.checkResultByFile(getTestName(true) + "_after.xml"); }
testCreateRequiredAttribute
61,855
void () { configureByFile(); myFixture.addClass("package foo.bar; public class BarAction extends com.intellij.openapi.actionSystem.AnAction { }"); myFixture.copyFileToProject("ActionCompletionBundle.properties"); myFixture.completeBasic(); LookupElement[] lookupElements = myFixture.getLookupElements(); assertLookupElem...
testActionCompletion
61,856
void () { configureByFile(); myFixture.addClass("public interface CustomPlaces { String CUSTOM=\"custom\"; }"); myFixture.completeBasic(); LookupElement[] lookupElements = myFixture.getLookupElements(); assertLookupElement(lookupElements, "FavoritesPopup", " (FAVORITES_VIEW_POPUP)", "ActionPlaces"); assertLookupElement...
testActionOverrideTextPlaceCompletion
61,857
void () { configureByFile(); PsiReference reference = myFixture.getReferenceAtCaretPositionWithAssertion(); PsiField resolvedField = assertInstanceOf(reference.resolve(), PsiField.class); assertEquals("FAVORITES_VIEW_POPUP", resolvedField.getName()); }
testActionOverrideTextPlaceResolve
61,858
void () { doHighlightingTestWithWeakWarnings(getTestName(true) + ".xml"); }
testExtensionPointNameValidity
61,859
void () { doHighlightingTest(getTestName(true) + ".xml"); }
testExtensionPointValidity
61,860
List<IntentionAction> (HighlightInfo info) { List<IntentionAction> result = new ArrayList<>(); info.findRegisteredQuickFix((descriptor,range) -> { result.add(descriptor.getAction()); return null; }); return result; }
actions
61,861
void () { doHighlightingTest("ValuesMaxLengths.xml"); }
testValuesMaxLengths
61,862
void () { doHighlightingTest("ValuesRequired.xml"); }
testValuesRequired
61,863
void () { doHighlightingTest("ValuesTemplateTexts.xml"); }
testValuesTemplateTexts
61,864
void () { doHighlightingTest("pluginWithSinceBuildGreaterThanUntilBuild.xml"); }
testPluginWithSinceBuildGreaterThanUntilBuild
61,865
void () { doHighlightingTest("productDescriptor.xml"); }
testProductDescriptor
61,866
void () { doHighlightingTest("productDescriptorWithPlaceholders.xml"); }
testProductDescriptorWithPlaceholders
61,867
void () { doHighlightingTest("productDescriptorInvalid.xml"); }
testProductDescriptorInvalid
61,868
void () { myFixture.addFileToProject("pluginIcon.svg", "fake SVG"); myFixture.testHighlighting(true, true, true, "pluginIconFound.xml"); }
testPluginIconFound
61,869
void () { myFixture.testHighlighting(true, true, true, "pluginIconNotNecessaryForImplementationDetail.xml"); }
testPluginIconNotNecessaryForImplementationDetail
61,870
void () { myFixture.testHighlighting(true, true, true, "pluginIconNotFound.xml"); }
testPluginIconNotFound
61,871
void () { doHighlightingTest("redundantComponentInterfaceClass.xml"); }
testRedundantComponentInterfaceClass
61,872
void (String... filePaths) { myFixture.testHighlighting(true, false, false, filePaths); }
doHighlightingTest
61,873
void (String... filePaths) { myFixture.testHighlighting(true, false, true, filePaths); }
doHighlightingTestWithWeakWarnings
61,874
void (LookupElement[] variants, String lookupText, String tailText, String typeText) { LookupElement lookupElement = ContainerUtil.find(variants, it -> lookupText.equals(it.getLookupString())); assertNotNull(toString(variants, "\n"), lookupElement); LookupElementPresentation presentation = new LookupElementPresentation...
assertLookupElement
61,875
String () { return DevkitJavaTestsUtil.TESTDATA_PATH + "codeInsight/contentDependencyDescriptor"; }
getBasePath
61,876
void () { doHighlightingTest(ArrayUtil.EMPTY_STRING_ARRAY); }
testNonJetBrainsHighlighting
61,877
void () { doHighlightingTest(ArrayUtil.EMPTY_STRING_ARRAY); }
testEmptyContentDependenciesHighlighting
61,878
void () { doHighlightingTest(); }
testDependencyDescriptorHighlighting
61,879
void () { setupModules("anotherModule"); myFixture.configureFromTempProjectFile(MAIN_MODULE_NAME + "/META-INF/plugin.xml"); myFixture.completeBasic(); List<String> lookupElements = myFixture.getLookupElementStrings(); assertSameElements(lookupElements, "mainModule/sub-descriptor", "anotherModule", "anotherModule/second...
testContentDescriptorModuleNameCompletion
61,880
void () { doHighlightingTest(); }
testContentDescriptorHighlighting
61,881
void () { doHighlightingTest(); }
testContentDescriptorDuplicatedHighlighting
61,882
void () { doHighlightingTest(); }
testContentDescriptorNoModuleDescriptorFileHighlighting
61,883
void () { doHighlightingTest(); }
testContentDescriptorPackageMismatchHighlighting
61,884
void () { doHighlightingTest(); }
testContentDescriptorNoPackageInMainHighlighting
61,885
void () { doHighlightingTest("anotherModule"); }
doHighlightingTest
61,886
void (String... dependencyModuleNames) { setupModules(dependencyModuleNames); myFixture.enableInspections(new PluginXmlDomInspection()); myFixture.testHighlighting(true, false, false, "mainModule/META-INF/plugin.xml"); }
doHighlightingTest
61,887
void (String... dependencyModuleNames) { addModule(MAIN_MODULE_NAME); for (String moduleName : dependencyModuleNames) { addModule(moduleName); } }
setupModules
61,888
void (String moduleName) { String testName = getTestName(true); final VirtualFile dependencyModuleRoot = myFixture.copyDirectoryToProject("/" + testName + "/" + moduleName, "/" + moduleName); Module dependencyModule = PsiTestUtil.addModule(getProject(), StdModuleTypes.JAVA, moduleName, dependencyModuleRoot); PsiTestUti...
addModule
61,889
LookupElementPresentation (String lookupString) { final LookupElement lookupElement = findLookupElement(lookupString); return LookupElementPresentation.renderElement(lookupElement); }
getLookupElementPresentation
61,890
LookupElement (String lookupString) { final LookupElement lookupElement = ContainerUtil.find(myFixture.getLookupElements(), element -> element.getLookupString().equals(lookupString)); assertNotNull(lookupString, lookupElement); return lookupElement; }
findLookupElement
61,891
void (String lookupString, double expectedPriority) { LookupElement lookupElement = findLookupElement(lookupString); final PrioritizedLookupElement<?> prioritizedLookupElement = lookupElement.as(PrioritizedLookupElement.CLASS_CONDITION_KEY); assertNotNull(prioritizedLookupElement); assertEquals(expectedPriority, priori...
assertPrioritizedLookupElement
61,892
void () { doBuilderTest("pluginXmlStubs.xml", """ File:idea-plugin Element:idea-plugin Attribute:package:idea.plugin.package Element:id:com.intellij.myPlugin Element:name:pluginName Element:depends:anotherPlugin Attribute:config-file:anotherPlugin.xml Attribute:optional:true Element:module Attribute:value:myModule Elem...
testStubs
61,893
void () { prepareFile("pluginWithXInclude-extensionPoints.xml"); prepareFile("pluginWithXInclude-main.xml"); prepareFile("pluginWithXInclude.xml"); myFixture.testHighlighting("pluginWithXInclude.xml"); }
testXInclude
61,894
void () { prepareFile("XIncludeWithActions.xml"); DomFileElement<IdeaPlugin> element = prepare("XIncludeWithActions-main.xml", IdeaPlugin.class); XmlTag[] tags = element.getRootTag().getSubTags(); assertEquals(2, tags.length); XmlTag included = tags[0]; assertTrue(included instanceof IncludedXmlTag); assertEquals("acti...
testIncludedActions
61,895
String () { return DevkitJavaTestsUtil.TESTDATA_PATH + "pluginXmlDomStubs"; }
getBasePath
61,896
String () { return DevkitJavaTestsUtil.TESTDATA_PATH + "codeInsight"; }
getBasePath
61,897
void () { doHighlightingTest("pluginWithoutVersionInPluginModule.xml"); }
testPluginWithoutVersionInPluginModule
61,898
void () { myFixture.addClass("public class MyCollectionWithoutDefaultCTOR implements java.util.Collection {" + " public MyCollectionWithoutDefaultCTOR(String something) {}" + "}"); doHighlightingTest("Listeners.xml"); }
testListeners
61,899
void () { doHighlightingTest("ListenersNoSinceBuild.xml"); }
testListenersNoSinceBuild