Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
26,900 | void () { myFixture.copyDirectoryToProject(getTestName(true), getTestName(true)); final AbstractProjectViewPane pane = setupPane(true); String structure = """ -Project -PsiDirectory: src -PsiDirectory: bundle yyy.properties -Resource Bundle 'xxx' xxx.properties xxx_en.properties xxx_ru_RU.properties X.txt External Libr... | testBundle |
26,901 | void () { myFixture.copyDirectoryToProject(getTestName(true), getTestName(true)); final AbstractProjectViewPane pane = setupPane(true); String structure = """ -Project -PsiDirectory: src -PsiDirectory: standAlone a.properties xxx.properties xxx2.properties yyy.properties X.txt External Libraries """; PlatformTestUtil.a... | testStandAlone |
26,902 | void () { myFixture.copyDirectoryToProject(getTestName(true), getTestName(true)); AbstractProjectViewPane pane = setupPane(true); String structure = """ -Project -PsiDirectory: src -PsiDirectory: sortByType a.properties xxx2.properties yyy.properties -Resource Bundle 'xxx' xxx.properties xxx_en.properties X.txt Externa... | testSortByType |
26,903 | void () { myFixture.copyDirectoryToProject(getTestName(true), getTestName(true)); List<PropertiesFile> customBundleFiles = new ArrayList<>(2); PropertiesReferenceManager.getInstance(getProject()).processAllPropertiesFiles((baseName, propertiesFile) -> { customBundleFiles.add(propertiesFile); return true; }); ResourceBu... | testCustomBundle |
26,904 | void () { myFixture.copyDirectoryToProject(getTestName(true), getTestName(true)); List<PropertiesFile> customBundleFiles = new ArrayList<>(2); PropertiesReferenceManager.getInstance(getProject()).processAllPropertiesFiles((baseName, propertiesFile) -> { if (baseName.contains("custom")) { customBundleFiles.add(propertie... | testFewBundles |
26,905 | AbstractProjectViewPane (final boolean sortByType) { myStructure.setProviders(new ResourceBundleGrouper(getProject())); final AbstractProjectViewPane pane = myStructure.createPane(); pane.installComparator(new GroupByTypeComparator(sortByType)); PropertiesReferenceManager.getInstance(getProject()).processAllPropertiesF... | setupPane |
26,906 | String () { return PluginPathManager.getPluginHomePath("properties") + "/tests/testData"; } | getTestDataPath |
26,907 | void () { type('\n'); } | typeEnter |
26,908 | void () { doTest(); } | testEndLine |
26,909 | void () { doTest(); } | testComment |
26,910 | void () { doTest(); } | testKey |
26,911 | void () { doTest(); } | testValue |
26,912 | void () { doTest(); } | testBackslash |
26,913 | void () { doTest(); } | testBeforeComment |
26,914 | void () { String line = "some.relatively.long.property.name=And here's some property value for that really unique key, nice to have\n"; String text = StringUtil.repeat(line, 20000) + "<caret>\n" + StringUtil.repeat(line, 10000); configureFromFileText("performance.properties", text); PlatformTestUtil.startPerformanceTes... | testPerformance |
26,915 | void () { configureByFile(BASE_PATH + getTestName(false)+".properties"); typeEnter(); checkResultByFile(BASE_PATH + getTestName(false)+"_after.properties"); } | doTest |
26,916 | void () { final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "#xxxxx")); WriteCommandAction.runWriteCommandAction(getProject(), () -> { propertiesFile.addProperty(myPropertyToAdd); }); PsiTestUtil.checkFileStructure((PsiFile)propertiesFile);... | testAddPropertyAfterComment |
26,917 | void () { final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "#xxxxx\n")); WriteCommandAction.runWriteCommandAction(getProject(), () -> { propertiesFile.addProperty(myPropertyToAdd); }); PsiTestUtil.checkFileStructure((PsiFile)propertiesFile... | testAddPropertyAfterComment2 |
26,918 | void (final IProperty property, @NonNls String name, @NonNls String value) { assertEquals(name, property.getName()); assertEquals(value, property.getValue()); } | assertPropertyEquals |
26,919 | void () { final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "xxx=yyy")); WriteCommandAction.runWriteCommandAction(null, () -> { propertiesFile.addProperty(myPropertyToAdd); }); PsiTestUtil.checkFileStructure((PsiFile)propertiesFile); List<I... | testAddPropertyAfterProperty |
26,920 | void () { PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "xxx=yyy\n#s\nzzz=ttt\n\n")); final List<IProperty> properties = propertiesFile.getProperties(); assertEquals(2, properties.size()); assertPropertyEquals(properties.get(0), "xxx", "yyy")... | testDeleteProperty |
26,921 | void () { PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "xxx=yyy\nxxx2=tyrt\nxxx3=ttt\n\n")); final Property property = (Property)propertiesFile.findPropertyByKey("xxx2"); WriteCommandAction.runWriteCommandAction(null, property::delete); PsiT... | testDeletePropertyWhitespaceAround |
26,922 | void () { PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "xxx=yyy\nxxx2=tyrt\nxxx3=ttt\n\n")); final Property property = (Property)propertiesFile.findPropertyByKey("xxx"); WriteCommandAction.runWriteCommandAction(null, property::delete); PsiTe... | testDeletePropertyWhitespaceAhead |
26,923 | void () { PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "a=b\\nc\\u0063c")); assertEquals("b\nccc", propertiesFile.getProperties().get(0).getUnescapedValue()); } | testUnescapedValue |
26,924 | void () { PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "a=b\\\n\t c")); assertEquals("bc", propertiesFile.getProperties().get(0).getUnescapedValue()); } | testUnescapedLineBreak |
26,925 | void () { final PropertiesCodeStyleSettings codeStyleSettings = PropertiesCodeStyleSettings.getInstance(getProject()); codeStyleSettings.KEY_VALUE_DELIMITER_CODE = 1; final PropertyImpl property = (PropertyImpl)PropertiesElementFactory.createProperty(getProject(), "xxx", "yyy", null); final char delimiter = property.ge... | testNonDefaultKeyValueDelimiter |
26,926 | void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { executeAction("EditorEnter"); checkResult(testName); } | doAction |
26,927 | void (@NotNull final String testName) { final String expectedFilePath = getBasePath() + "/after" + testName; checkResultByFile("In file: " + expectedFilePath, expectedFilePath, false); } | checkResult |
26,928 | void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { executeAction("EditorStartNewLineBefore"); checkResult(testName); } | doAction |
26,929 | void (@NotNull final String testName) { final String expectedFilePath = getBasePath() + "/after" + testName; checkResultByFile("In file: " + expectedFilePath, expectedFilePath, false); } | checkResult |
26,930 | void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { executeAction("EditorJoinLines"); checkResult(testName); } | doAction |
26,931 | void (@NotNull final String testName) { final String expectedFilePath = getBasePath() + "/after" + testName; checkResultByFile("In file: " + expectedFilePath, expectedFilePath, false); } | checkResult |
26,932 | void () { doTextTest(""" qwe=asd #comment key1 = value1""", """ qwe=asd #comment key1=value1"""); } | testSimple1 |
26,933 | void () { mySettings.ALIGN_GROUP_FIELD_DECLARATIONS = true; doTextTest(""" qwe_very_big_property = asd #comment key1 = value1""", """ qwe_very_big_property=asd #comment key1 =value1"""); } | testSimple2 |
26,934 | void () { mySettings.ALIGN_GROUP_FIELD_DECLARATIONS = true; myCustomSettings.SPACES_AROUND_KEY_VALUE_DELIMITER = true; doTextTest(""" qwe_very_big_property = asd #comment key1 = value1""", """ qwe_very_big_property = asd #comment key1 = value1"""); } | testSimple3 |
26,935 | void () { doTextTest("k v", "k v"); } | testWhitespaceDelimiter |
26,936 | void () { myCustomSettings.KEEP_BLANK_LINES = true; String propertiesWithBlankLines = """ #comment key1=value1 key2=value2 """; doTextTest(propertiesWithBlankLines, propertiesWithBlankLines); } | testKeepBlankLines |
26,937 | void () { myCustomSettings.KEEP_BLANK_LINES = false; doTextTest(""" #comment key1=value1 key2=value2 """, """ #comment key1=value1 key2=value2 """); } | testDoNotKeepBlankLines |
26,938 | void (String text) { doTextTest(text, text); } | doTextTest |
26,939 | String () { return ""; } | getBasePath |
26,940 | String () { return PropertiesFileType.DEFAULT_EXTENSION; } | getFileExtension |
26,941 | void () { doTest(); } | testUnsorted |
26,942 | void () { doTest(); } | testSorted |
26,943 | void () { ExtensionTestUtil.maskExtensions(AlphaUnsortedPropertiesFileInspectionSuppressor.EP_NAME, Collections.<AlphaUnsortedPropertiesFileInspectionSuppressor>singletonList(new AlphaUnsortedPropertiesFileInspectionSuppressor() { @Override public boolean suppressInspectionFor(@NotNull PropertiesFile propertiesFile) { ... | testUnsortedSuppressed |
26,944 | boolean (@NotNull PropertiesFile propertiesFile) { return propertiesFile.getName().toLowerCase(Locale.ENGLISH).contains("suppress"); } | suppressInspectionFor |
26,945 | void () { myFixture.configureByText("p.properties", """ a= c= b=\\r\\n\\ f"""); myFixture.enableInspections(new AlphaUnsortedPropertiesFileInspection()); final IntentionAction intention = myFixture.getAvailableIntention("Sort resource bundle files", "p.properties"); assertNotNull(intention); myFixture.launchAction(inte... | testFix |
26,946 | void () { myFixture.configureByText("p.properties", """ a=a d=d # some comment on "e" # this is multiline comment e=e b=b c=b"""); myFixture.enableInspections(new AlphaUnsortedPropertiesFileInspection()); final IntentionAction intention = myFixture.getAvailableIntention("Sort resource bundle files", "p.properties"); as... | testFixComments |
26,947 | void () { myFixture.testInspection(getTestName(true), new LocalInspectionToolWrapper(new AlphaUnsortedPropertiesFileInspection())); } | doTest |
26,948 | String () { return PluginPathManager.getPluginHomePath("properties") + "/tests/testData/alphaUnsorted/"; } | getTestDataPath |
26,949 | String () { return PluginPathManager.getPluginHomePath("properties") + "/tests/testData/propertiesFile/psi"; } | getTestDataPath |
26,950 | void () { doTest(true); } | testProp1 |
26,951 | void () { doTest(true); } | testComments |
26,952 | void () { doTest(true); } | testHeader |
26,953 | void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { final int offset = getEditor().getCaretModel().getOffset(); final PsiElement psiElement = getFile().findElementAt(offset); assert psiElement != null; final Property property = PsiTreeUtil.getParentOfType(psiElement, Property... | doAction |
26,954 | String () { return PluginPathManager.getPluginHomePath("properties") + "/tests/testData"; } | getTestDataPath |
26,955 | void () { myFixture.configureByFile("/propertiesFile/highlighting/web-urls.properties"); myFixture.checkHighlighting(true, true, true); } | testSimple |
26,956 | void () { doTest("duplicateProperty/" + getTestName(true), myTool); } | doTest |
26,957 | void () { doTest(); } | testDuplicateValues |
26,958 | void () { doTest(); } | testDuplicateValuesCurrentFileAnalysis |
26,959 | void () { myTool.CURRENT_FILE = false; myTool.MODULE_WITH_DEPENDENCIES = true; doTest(); } | testDuplicateValuesInDifferentFiles |
26,960 | void () { myTool.CURRENT_FILE = false; myTool.MODULE_WITH_DEPENDENCIES = true; myTool.CHECK_DUPLICATE_KEYS = false; myTool.CHECK_DUPLICATE_VALUES = false; myTool.CHECK_DUPLICATE_KEYS_WITH_DIFFERENT_VALUES = true; doTest(); } | testDuplicateKeysWithDifferentValues |
26,961 | void () { myTool.CURRENT_FILE = false; myTool.MODULE_WITH_DEPENDENCIES = true; myTool.CHECK_DUPLICATE_KEYS = true; myTool.CHECK_DUPLICATE_VALUES = false; myTool.CHECK_DUPLICATE_KEYS_WITH_DIFFERENT_VALUES = false; doTest(); } | testDuplicateKeys |
26,962 | void () { myTool.CURRENT_FILE = false; myTool.MODULE_WITH_DEPENDENCIES = true; myTool.CHECK_DUPLICATE_KEYS = true; myTool.CHECK_DUPLICATE_VALUES = false; myTool.CHECK_DUPLICATE_KEYS_WITH_DIFFERENT_VALUES = true; doTest(); } | testDuplicateKeysWithAndWithoutDifferent |
26,963 | String () { return PluginPathManager.getPluginHomePath("properties") + "/tests/testData"; } | getTestDataPath |
26,964 | void () { EncodingProjectManager.getInstance(getProject()).setNative2AsciiForPropertiesFiles(null, false); EncodingProjectManager.getInstance(getProject()).setDefaultCharsetForPropertiesFiles(null, StandardCharsets.ISO_8859_1); PlatformTestUtil.withEncoding("UTF-8", () -> { configureByText("\\u1234\\uxxxx\\n\\t\\y=\\u3... | testCharsetOff |
26,965 | void () { EncodingProjectManager.getInstance(getProject()).setNative2AsciiForPropertiesFiles(null, false); EncodingProjectManager.getInstance(getProject()).setDefaultCharsetForPropertiesFiles(null, null); EncodingProjectManager.getInstance(getProject()).setEncoding(null, StandardCharsets.UTF_8); PlatformTestUtil.withEn... | testDefaultCharset |
26,966 | void () { myFixture.enableInspections(new SpellCheckingInspection()); myFixture.configureByText("test.properties", """ valid.key=value # comment is <TYPO descr="Typo: In word 'cheked'">cheked</TYPO> validWord<TYPO descr="Typo: In word 'Buuundary'">Buuundary</TYPO>=value i3<TYPO descr="Typo: In word 'nvalid'">nvalid</TY... | testPropertiesSpellcheckingStrategy |
26,967 | void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { myPropertiesSettings.KEY_VALUE_DELIMITER_CODE = actionHint.getExpectedText().charAt(0); executeAction("ReformatCode"); checkResult(testName); } | doAction |
26,968 | void (@NotNull final String testName) { final String expectedFilePath = getBasePath() + "/after" + testName; checkResultByFile("In file: " + expectedFilePath, expectedFilePath, false); } | checkResult |
26,969 | void () { final PsiFile file = myFixture.addFileToProject("prop_core_en.properties", ""); final PsiFile file2 = myFixture.addFileToProject("prop_core_fi.properties", ""); final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(file); final PropertiesFile propertiesFile2 = PropertiesImplUtil.getProper... | testPropertiesFilesDefaultCombiningToResourceBundle |
26,970 | void () { final PsiFile file = myFixture.addFileToProject("some_property_file.properties", ""); final PsiFile file2 = myFixture.addFileToProject("some_property_fil.properties", ""); final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(file); assertNotNull(propertiesFile); final ResourceBundle reso... | testPropertiesFileNotAssociatedWhileLanguageCodeNotRecognized |
26,971 | void () { final PsiFile file = myFixture.addFileToProject("p.properties", ""); final PsiFile file2 = myFixture.addFileToProject("p_asd.properties", ""); final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(file); final PropertiesFile propertiesFile2 = PropertiesImplUtil.getPropertiesFile(file2); a... | testLanguageCodeNotRecognized |
26,972 | void () { final PropertiesFile file = PropertiesImplUtil.getPropertiesFile(myFixture.addFileToProject("resources-dev/my-app-dev.properties", "")); final PropertiesFile file2 = PropertiesImplUtil.getPropertiesFile(myFixture.addFileToProject("resources-prod/my-app-prod.properties", "")); assertNotNull(file); assertNotNul... | testCombineToCustomResourceBundleAndDissociateAfter |
26,973 | void () { final PsiFile file = myFixture.addFileToProject("Base_Page.properties", ""); final PsiFile file2 = myFixture.addFileToProject("Base_Page_en.properties", ""); final String baseName = PropertiesUtil.getDefaultBaseName(map(Arrays.asList(file, file2), psiFile -> PropertiesImplUtil.getPropertiesFile(file))); asser... | testSuggestedCustomResourceBundleName |
26,974 | void () { myFixture.addFileToProject("qwe/asd/p.properties", ""); final PsiFile file = myFixture.addFileToProject("qwe/asd/p_en.properties", ""); final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(file); assertNotNull(propertiesFile); final ResourceBundleManager resourceBundleManager = ResourceB... | testResourceBundleManagerUpdatesProperlyWhileDirRemoval |
26,975 | void () { final PropertiesFile propFile1 = PropertiesImplUtil.getPropertiesFile(myFixture.addFileToProject("qwe/p.properties", "")); final PropertiesFile propFile2 = PropertiesImplUtil.getPropertiesFile(myFixture.addFileToProject("qwe/p_abc.properties", "")); assertNotNull(propFile1); assertNotNull(propFile2); myFixtur... | testResourceBundleManagerUpdatesProperlyWhileDirMove |
26,976 | String () { return PluginPathManager.getPluginHomePath("properties") + "/tests/testData/propertiesFile/joinLines/"; } | getTestDataPath |
26,977 | void () { doTest(); } | testProperties |
26,978 | void () { doTest(); } | testPropertiesBackSlash |
26,979 | void () { doTest(); } | testPropertiesBackSlashSlash |
26,980 | void () { configureByFile(getTestName(false) + ".properties"); performAction(); checkResultByFile(getTestName(false) + "_after.properties"); } | doTest |
26,981 | void () { EditorActionManager actionManager = EditorActionManager.getInstance(); EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_JOIN_LINES); actionHandler.execute(getEditor(), null, DataManager.getInstance().getDataContext()); } | performAction |
26,982 | String () { return PluginPathManager.getPluginHomePath("properties") + "/tests/testData/wrongPropertyKeyDelimiter"; } | getTestDataPath |
26,983 | void () { myFixture.configureByFile("Test1.properties"); myFixture.checkHighlighting(); } | testSimple |
26,984 | void (@NonNls String text, @NonNls String[] expectedTokens) { Lexer lexer = new PropertiesLexer(); doTest(text, expectedTokens, lexer); } | doTest |
26,985 | void (@NonNls String text, @NonNls String[] expectedTokens) { Lexer lexer = new PropertiesHighlightingLexer(); doTest(text, expectedTokens, lexer); } | doTestHL |
26,986 | void (String text, String[] expectedTokens,Lexer lexer) { lexer.start(text); int idx = 0; while (lexer.getTokenType() != null) { if (idx >= expectedTokens.length) fail("Too many tokens"); String tokenName = lexer.getTokenType().toString(); String expectedTokenType = expectedTokens[idx++]; String expectedTokenText = exp... | doTest |
26,987 | void () { doTest("xxx=yyy", new String[]{ "Properties:KEY_CHARACTERS", "xxx", "Properties:KEY_VALUE_SEPARATOR", "=", "Properties:VALUE_CHARACTERS", "yyy", }); } | testSimple |
26,988 | void () { doTest("xxx=yyy zzz", new String[]{ "Properties:KEY_CHARACTERS", "xxx", "Properties:KEY_VALUE_SEPARATOR", "=", "Properties:VALUE_CHARACTERS", "yyy zzz", }); } | testTwoWords |
26,989 | void () { doTest("a b\n \nx\ty", new String[]{ "Properties:KEY_CHARACTERS", "a", "WHITE_SPACE", " ", "Properties:VALUE_CHARACTERS", "b", "WHITE_SPACE", "\n \n", "Properties:KEY_CHARACTERS", "x", "WHITE_SPACE", "\t", "Properties:VALUE_CHARACTERS", "y" }); } | testMulti |
26,990 | void () { doTest("a", new String[]{ "Properties:KEY_CHARACTERS", "a" }); } | testIncompleteProperty |
26,991 | void () { doTest("a.2=", new String[]{ "Properties:KEY_CHARACTERS", "a.2", "Properties:KEY_VALUE_SEPARATOR", "=" }); } | testIncompleteProperty2 |
26,992 | void () { doTest("sdlfkjsd\\l\\\\\\:\\=gk = s\\nsssd", new String[]{ "Properties:KEY_CHARACTERS", "sdlfkjsd\\l\\\\\\:\\=gk", "WHITE_SPACE", " ", "Properties:KEY_VALUE_SEPARATOR", "=", "WHITE_SPACE", " ", "Properties:VALUE_CHARACTERS", "s\\nsssd" }); } | testEscaping |
26,993 | void () { doTest("sdlfkjsdsssd:a\\\nb", new String[]{ "Properties:KEY_CHARACTERS", "sdlfkjsdsssd", "Properties:KEY_VALUE_SEPARATOR", ":", "Properties:VALUE_CHARACTERS", "a\\\nb" }); } | testCRLFEscaping |
26,994 | void () { doTest("x\\\ny:z", new String[]{ "Properties:KEY_CHARACTERS", "x\\\ny", "Properties:KEY_VALUE_SEPARATOR", ":", "Properties:VALUE_CHARACTERS", "z" }); } | testCRLFEscapingKey |
26,995 | void () { doTest("x y", new String[]{ "Properties:KEY_CHARACTERS", "x", "WHITE_SPACE", " ", "Properties:VALUE_CHARACTERS", "y" }); } | testWhitespace |
26,996 | void () { doTest("x=# y", new String[]{ "Properties:KEY_CHARACTERS", "x", "Properties:KEY_VALUE_SEPARATOR", "=", "Properties:VALUE_CHARACTERS", "# y" }); } | testHashInValue |
26,997 | void () { doTest("#hhhh kkkk \n\n", new String[]{ "Properties:END_OF_LINE_COMMENT", "#hhhh kkkk ", "WHITE_SPACE", "\n\n", }); } | testComments |
26,998 | void () { doTest("install/htdocs/imcms/html/link_editor.jsp/1002 = URL\\n\\\n" + "\t\\t\\teller meta_id:", new String[]{ "Properties:KEY_CHARACTERS", "install/htdocs/imcms/html/link_editor.jsp/1002", "WHITE_SPACE", " ", "Properties:KEY_VALUE_SEPARATOR", "=", "WHITE_SPACE", " ", "Properties:VALUE_CHARACTERS", "URL\\n\\\... | testTabs |
26,999 | void () { doTest(" #comm1\n#comm2=n\n\t#comm3", new String[]{ "WHITE_SPACE", " ", "Properties:END_OF_LINE_COMMENT", "#comm1", "WHITE_SPACE", "\n", "Properties:END_OF_LINE_COMMENT", "#comm2=n", "WHITE_SPACE", "\n\t", "Properties:END_OF_LINE_COMMENT", "#comm3", }); } | testIndentedComments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.