Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
41,500 | void () { doTest("xxx.properties","a.b","c.d"); } | testBundle |
41,501 | void () { try { doTest("xxx.properties","a.b","c.d"); fail("Conflict was not detected"); } catch (BaseRefactoringProcessor.ConflictsInTestsException e) { assertEquals("New property name 'c.d' hides existing property", e.getMessage()); return; } fail("Conflict was not detected"); } | testNamesConflict |
41,502 | void (final String fileName, final String key, final String newName) { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { RenamePropertyTest.this.performAction(rootDir, fileName, key, newName); } }); } | doTest |
41,503 | void (VirtualFile rootDir, VirtualFile rootAfter) { RenamePropertyTest.this.performAction(rootDir, fileName, key, newName); } | performAction |
41,504 | void (final VirtualFile rootDir, String fileName, String key, String newName) { VirtualFile child = rootDir.findChild(fileName); PropertiesFile file = (PropertiesFile)myPsiManager.findFile(child); Property property = (Property)file.findPropertyByKey(key); new RenameProcessor(myProject, property, newName, true, true).ru... | performAction |
41,505 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/"; } | getTestDataPath |
41,506 | String () { return "/testData/rename/"; } | getTestRoot |
41,507 | void () { final int offset = myEditor.getCaretModel().getOffset(); final PsiElement elementAtCaret = myFile.findElementAt(offset); assertNotNull(elementAtCaret); final PsiElement targetElement = GotoDeclarationAction.findTargetElement(myProject, myEditor, offset); final PropertiesFile propertiesFile = findPropertiesFil... | checkNavigation |
41,508 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/"; } | getTestDataPath |
41,509 | PropertiesFile () { return (PropertiesFile)myFile.getContainingDirectory().findFile("myprops.properties"); } | findPropertiesFile |
41,510 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/testData/performance/"; } | getTestDataPath |
41,511 | void (@NotNull PsiLiteralExpression expression) { PsiReference[] references = expression.getReferences(); for (PsiReference reference : references) { reference.resolve(); } } | visitLiteralExpression |
41,512 | void (@NotNull PsiLiteralExpression expression) { expression.getNode(); } | visitLiteralExpression |
41,513 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/testData/highlighting"; } | getTestDataPath |
41,514 | void (boolean checkWarnings) { myFixture.configureByFile(getTestName(false) + ".properties"); ((CodeInsightTestFixtureImpl)myFixture).setVirtualFileFilter(VirtualFileFilter.NONE); myFixture.checkHighlighting(checkWarnings, false, false); } | doTest |
41,515 | void () { doTest(false); } | testDuplicate |
41,516 | void () { myFixture.enableInspections(new UnusedPropertyInspection()); myFixture.addClass("class C { String s = \"used.prop\"; }"); doTest(true); } | testUnused |
41,517 | void () { UnusedPropertyInspection inspection = new UnusedPropertyInspection(); inspection.fileNameMask = ".*Bundle\\.properties"; myFixture.enableInspections(inspection); myFixture.addClass("class C { String s = \"used.prop\"; }"); doTest(true); } | testUnusedFileFilter |
41,518 | void () { doTest(false); } | testOk |
41,519 | void () { doTest(true); } | testInvalidEscape |
41,520 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/"; } | getTestDataPath |
41,521 | void () { configureByFiles(BASE_PATH, BASE_PATH + "conditional.properties", BASE_PATH + "Conditional.java"); PsiElement element = myFile.findElementAt(myEditor.getCaretModel().getOffset()); Property prop = PsiTreeUtil.getNonStrictParentOfType(element, Property.class); PsiReference[] usages = ReferencesSearch.search(pro... | testFindUsagesInConditionalExpression |
41,522 | void (final PsiElement element, final FindUsagesOptions options, final Processor<? super UsageInfo> processor) { FindUsagesManager findUsagesManager = ((FindManagerImpl)FindManager.getInstance(element.getProject())).getFindUsagesManager(); FindUsagesHandler handler = findUsagesManager.getFindUsagesHandler(element, fals... | processUsages |
41,523 | PsiReference[] () { PsiNamedElement namedElement = getElementAtCaret(); GlobalSearchScope searchScope = GlobalSearchScope.allScope(myProject); return ReferencesSearch.search(namedElement, searchScope, false).toArray(PsiReference.EMPTY_ARRAY); } | findReferences |
41,524 | UsageInfo[] () { PsiNamedElement namedElement = getElementAtCaret(); JavaClassFindUsagesOptions options = new JavaClassFindUsagesOptions(getProject()); options.isFieldsUsages=true; options.isMethodsUsages=true; options.isUsages=true; CommonProcessors.CollectProcessor<UsageInfo> processor = new CommonProcessors.CollectP... | findUsages |
41,525 | PsiNamedElement () { PsiElement element = myFile.findElementAt(myEditor.getCaretModel().getOffset()); PsiNamedElement namedElement = PsiTreeUtil.getParentOfType(element, PsiNamedElement.class); assertTrue("Cannot find element in caret", LanguageFindUsages.canFindUsagesFor(namedElement)); return namedElement; } | getElementAtCaret |
41,526 | void () { doTest(true); } | testTitleCapitalization |
41,527 | void () { doTest(true); } | testTitleCapitalizationExtension |
41,528 | void () { doTest(true); } | testSentenceCapitalization |
41,529 | void () { doTest(true); } | testMnemonics |
41,530 | void () { myFixture.testHighlighting(getTestName(false) + ".java"); } | testTernaryAndParentheses |
41,531 | void () { doTest(true); } | testMultipleReturns |
41,532 | void () { doTest(false); } | testEmptySentence |
41,533 | void () { doTest(false); } | testArgument |
41,534 | void () { doTest(false); } | testConstructorArgument |
41,535 | void () { doTest(false); } | testSuperConstructorArgument |
41,536 | void () { doTest(false); } | testStripHtml |
41,537 | void () { doTest(false); } | testCapitalizationMismatch |
41,538 | void () { doTest(false); } | testCapitalizationMix |
41,539 | void () { doTest(false); } | testLocalVar |
41,540 | void () { doTest(false); } | testField |
41,541 | void () { doTest(false); } | testIgnoreConcatFormat |
41,542 | void () { String props = """ property.lowercase=hello world property.titlecase=Hello World property.titlecase.html=<html><b>Hello</b> World</html> property.parameterized=Hello {0} property.choice.title=Hello {0,choice,0#World|1#Universe} property.choice.mixed=Hello {0,choice,0#World|1#universe} property.choice.lower=He... | testPropertyTest |
41,543 | void () { myFixture.testHighlighting(getTestName(false) + ".java"); assertEmpty(myFixture.filterAvailableIntentions("Properly capitalize")); } | testRecursiveMethod |
41,544 | void () { myFixture.configureByFile("Intention.java"); AnnotateCapitalizationIntention intention = new AnnotateCapitalizationIntention(); assertTrue(intention.isAvailable(getProject(), getEditor(), getFile())); intention.invoke(getProject(), getEditor(), getFile()); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(... | testIntention |
41,545 | void (boolean fix) { myFixture.testHighlighting(getTestName(false) + ".java"); if (!fix) return; final IntentionAction action = myFixture.filterAvailableIntentions("Properly capitalize").get(0); WriteCommandAction.writeCommandAction(getProject()).run(() -> action.invoke(getProject(), myFixture.getEditor(), getFile()));... | doTest |
41,546 | LightProjectDescriptor () { return JAVA_8; } | getProjectDescriptor |
41,547 | String () { return PluginPathManager.getPluginHomePathRelative("java-i18n") + "/testData/inspections/capitalization"; } | getBasePath |
41,548 | String () { return PluginPathManager.getPluginHomePathRelative("java-i18n") + "/testData/fileRename"; } | getBasePath |
41,549 | void () { final PsiFile[] files = myFixture.configureByFiles("i18n.properties", "MyClass.java"); final PsiFile propertiesFile = files[0]; final PsiFile javaSourceFile = files[1]; myFixture.renameElement(propertiesFile, "i19n.properties"); boolean[] found = {false}; PsiTreeUtil.processElements(javaSourceFile, new PsiEle... | testRenamePropertiesFile |
41,550 | boolean (@NotNull PsiElement element) { if (PlatformPatterns.psiElement(PsiField.class).withName("BUNDLE_NAME").accepts(element)) { assertEquals("i19n", ((PsiLiteralExpression)((PsiField)element).getInitializer()).getValue()); found[0] = true; } return true; } | execute |
41,551 | LightProjectDescriptor () { return JAVA_8; } | getProjectDescriptor |
41,552 | String () { return PluginPathManager.getPluginHomePathRelative("java-i18n") + "/testData/lightResolve"; } | getBasePath |
41,553 | void () { createBundles(); PsiReference reference = myFixture.getReferenceAtCaretPosition("SameNameProperty.java"); assertNotNull(reference.resolve()); } | testSameNameProperty |
41,554 | void () { myFixture.addFileToProject("Bundle1.properties", "same.name=b1"); myFixture.addFileToProject("Bundle2.properties", "same.name=b2"); } | createBundles |
41,555 | void () { createBundles(); PsiReference reference = myFixture.getReferenceAtCaretPosition("LocalVar.java"); assertNotNull(reference.resolve()); } | testLocalVar |
41,556 | void () { createBundles(); PsiReference reference = myFixture.getReferenceAtCaretPosition("TypeUse.java"); assertNotNull(reference.resolve()); } | testTypeUse |
41,557 | String () { return PluginPathManager.getPluginHomePathRelative("java-i18n") + "/testData/inspections/suspiciousLanguages"; } | getBasePath |
41,558 | void () { doTest("p.properties", "p_en.properties"); } | testSimple1 |
41,559 | void () { doTest("p.properties", "p_asd.properties", "asd"); } | testWithAdditionalLocales |
41,560 | void (final String file1, final String file2, final String... additionalLocales) { myFixture.configureByFile(getTestName(true) + "/" + file1); myFixture.configureByFile(getTestName(true) + "/" + file2); final SuspiciousLocalesLanguagesInspection inspection = new SuspiciousLocalesLanguagesInspection(); if (additionalLoc... | doTest |
41,561 | String () { return PathManager.getCommunityHomePath() + "/plugins/java-i18n/testData/quickFix/convertToBasicLatin"; } | getTestDataPath |
41,562 | LightProjectDescriptor () { return JAVA_21; } | getProjectDescriptor |
41,563 | void () { doTest(); } | testCharLiteral |
41,564 | void () { doTest(); } | testStringLiteral |
41,565 | void () { doTest(); } | testTextBlock |
41,566 | void () { doTest(); } | testStringTemplate1 |
41,567 | void () { doTest(); } | testStringTemplate2 |
41,568 | void () { doTest(); } | testStringTemplate3 |
41,569 | void () { doTest(); } | testStringTemplate4 |
41,570 | void () { doTest(); } | testStringTemplate5 |
41,571 | void () { doTest(); } | testStringTemplate6 |
41,572 | void () { doTest(); } | testPlainComment |
41,573 | void () { doTest(); } | testDocComment |
41,574 | void () { doTest(); } | testDocTag |
41,575 | void () { doTest(); } | testUnclosedStringLiteral |
41,576 | void () { doTest(); } | testUnclosedPlainComment |
41,577 | void () { doTest(); } | testUnclosedDocComment |
41,578 | void () { myFixture.configureByFiles(getTestName(false) + ".java"); final IntentionAction singleIntention = myFixture.findSingleIntention(JavaI18nBundle.message("inspection.non.basic.latin.character.quickfix")); myFixture.launchAction(singleIntention); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); myFixture.c... | doTest |
41,579 | void () { LocalInspectionToolWrapper tool = new LocalInspectionToolWrapper(new InvalidPropertyKeyInspection()); doTest("invalidPropertyKey/" + getTestName(true), tool); } | doTest |
41,580 | void () { doTest(); } | testSimple |
41,581 | void () { doTest(); } | testImplicit |
41,582 | void () { doTest(); } | testImplicit2 |
41,583 | void () { doTest(); } | testImplicit3 |
41,584 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/testData/inspections"; } | getTestDataPath |
41,585 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/testData/inspections/inconsistentResourceBundle"; } | getTestDataPath |
41,586 | void () { myInspection.enableProviders(PropertiesPlaceholdersInspectionProvider.class); doTest(); } | testInconsistentPlaceholders |
41,587 | void () { myInspection.enableProviders(InconsistentPropertiesEndsInspectionProvider.class); doTest(); } | testInconsistentValuesEnds |
41,588 | void () { myInspection.enableProviders(PropertiesKeysConsistencyInspectionProvider.class, MissingTranslationsInspectionProvider.class, DuplicatedPropertiesInspectionProvider.class); doTest(); } | testSimple |
41,589 | void () { myFixture.testInspection(getTestName(false), new GlobalInspectionToolWrapper(myInspection)); } | doTest |
41,590 | void () { myTool.setReportUnannotatedReferences(true); myFixture.enableInspections(myTool); myFixture.testHighlighting("i18n/" + getTestName(false) + ".java"); } | doTest |
41,591 | void () { boolean old = myTool.setIgnoreForAllButNls(true); try { doTest(); } finally { myTool.setIgnoreForAllButNls(old); } } | doTestNlsMode |
41,592 | LightProjectDescriptor () { return JAVA_8; } | getProjectDescriptor |
41,593 | void () { doTest(); } | testHardCodedStringLiteralAsParameter |
41,594 | void () { doTest(); } | testReturnTypeInheritsNonNlsAnnotationFromParent |
41,595 | void () { doTest(); } | testRecursiveInheritance |
41,596 | void () { doTest(); } | testParameterInheritsNonNlsAnnotationFromSuper |
41,597 | void () { doTest(); } | testLocalVariables |
41,598 | void () { doTest(); } | testFields |
41,599 | void () { doTest(); } | testInAnnotationArguments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.