Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
272,900 | int (Object parent) { pause(); return super.getChildCount(parent); } | getChildCount |
272,901 | int (Object parent, Object child) { pause(); return super.getIndexOfChild(parent, child); } | getIndexOfChild |
272,902 | boolean (Object child) { pause(); return super.isLeaf(child); } | isLeaf |
272,903 | void (TreePath path, Object value) { pause(); super.valueForPathChanged(path, value); } | valueForPathChanged |
272,904 | Invoker () { return invoker; } | getInvoker |
272,905 | void () { JBUIScale.setUserScaleFactor((float)1); Control.Painter painter = new ClassicPainter(true, 7, 11, null); Control even = new TestControl(10, 10); testRendererOffset(painter, even, false, 18, 36, 54, 72, 90, 108); testRendererOffset(painter, even, true, 18, 36, 54, 72, 90, 108); testControlOffset(painter, even,... | testClassicDefault |
272,906 | void () { JBUIScale.setUserScaleFactor((float)1); Control.Painter painter = new ClassicPainter(false, 7, 11, 0); Control even = new TestControl(10, 10); testRendererOffset(painter, even, false, 18, 36, 54, 72, 90, 108); testRendererOffset(painter, even, true, 0, 18, 36, 54, 72, 90); testControlOffset(painter, even, 2, ... | testClassicDefaultLeafIndent |
272,907 | void () { JBUIScale.setUserScaleFactor((float)1); Control.Painter painter = new ClassicPainter(true, 0, 0, null); Control even = new TestControl(10, 10); testRendererOffset(painter, even, false, 12, 17, 22, 27, 32, 37); testRendererOffset(painter, even, true, 12, 17, 22, 27, 32, 37); testControlOffset(painter, even, 0,... | testClassicCompact |
272,908 | void () { JBUIScale.setUserScaleFactor((float)1); Control.Painter painter = new ClassicPainter(false, 0, 0, 0); Control even = new TestControl(10, 10); testRendererOffset(painter, even, false, 12, 17, 22, 27, 32, 37); testRendererOffset(painter, even, true, 0, 5, 10, 15, 20, 25); testControlOffset(painter, even, 0, 5, ... | testClassicCompactLeafIndent |
272,909 | void () { JBUIScale.setUserScaleFactor((float)1); for (int i = 0; i < 4; i++) { Control.Painter painter = new CompactPainter(true, i, i, -1); Control even = new TestControl(10, 10); testRendererOffset(painter, even, false, 10 + 2 * i, 12 + 3 * i, 14 + 4 * i, 16 + 5 * i, 18 + 6 * i, 20 + 7 * i); testRendererOffset(paint... | testCompact |
272,910 | void () { JBUIScale.setUserScaleFactor((float)1); for (int i = 0; i < 4; i++) { Control.Painter painter = new CompactPainter(false, i, i, 0); Control even = new TestControl(10, 10); testRendererOffset(painter, even, false, 10 + 2 * i, 12 + 3 * i, 14 + 4 * i, 16 + 5 * i, 18 + 6 * i, 20 + 7 * i); testRendererOffset(paint... | testCompactLeafIndent |
272,911 | void (Control.Painter painter, Control control, int depth, boolean leaf) { Assert.assertTrue("depth=" + depth, painter.getRendererOffset(control, depth, leaf) < 0); } | assertRendererOffset |
272,912 | void (Control.Painter painter, Control control, int depth, boolean leaf, int expected) { Assert.assertEquals("depth=" + depth, expected, painter.getRendererOffset(control, depth, leaf)); } | assertRendererOffset |
272,913 | void (Control.Painter painter, Control control, boolean leaf, int... expected) { for (int depth : new int[]{Integer.MIN_VALUE, -1, -10}) { assertRendererOffset(painter, control, depth, leaf); } assertRendererOffset(painter, control, 0, leaf, 0); for (int depth = 0; depth < expected.length; depth++) { assertRendererOffs... | testRendererOffset |
272,914 | void (Control.Painter painter, Control control, int depth, boolean leaf) { Assert.assertTrue("depth=" + depth, painter.getControlOffset(control, depth, leaf) < 0); } | assertControlOffset |
272,915 | void (Control.Painter painter, Control control, int depth, int expected) { Assert.assertEquals("depth=" + depth, expected, painter.getControlOffset(control, depth, false)); } | assertControlOffset |
272,916 | void (Control.Painter painter, Control control, int... expected) { for (int depth : new int[]{Integer.MIN_VALUE, -1, -10, 0}) { assertControlOffset(painter, control, depth, true); assertControlOffset(painter, control, depth, false); } for (int depth = 0; depth < expected.length; depth++) { assertControlOffset(painter, ... | testControlOffset |
272,917 | Icon (boolean expanded, boolean selected) { return icon; } | getIcon |
272,918 | int () { return icon.getIconWidth(); } | getWidth |
272,919 | int () { return icon.getIconHeight(); } | getHeight |
272,920 | void (@NotNull Component c, @NotNull Graphics g, int x, int y, int width, int height, boolean expanded, boolean selected) { } | paint |
272,921 | String () { return PlatformTestUtil.getPlatformTestDataPath(); } | getTestDataPath |
272,922 | void () { doTest(); } | testPl1 |
272,923 | void () { doTest(); } | testPl2 |
272,924 | String () { return PlatformTestUtil.getPlatformTestDataPath(); } | getTestDataPath |
272,925 | void () { doTest(); } | testDifferentBrackets |
272,926 | void () { @NonNls String path = "/codeInsight/backspace/"; configureByFile(path + getTestName(false) + ".txt"); backspace(); checkResultByFile(path + getTestName(false) + "_after.txt"); } | doTest |
272,927 | void (@NonNls FileType fileType, final char ... chars) { doTest(fileType, () -> { for (char c : chars) { type(c); } }); } | doTest |
272,928 | void (@NonNls FileType fileType, Runnable action) { CommonCodeStyleSettings.IndentOptions indentOptions = mySettings.getIndentOptions(null); indentOptions.USE_TAB_CHARACTER = true; indentOptions.INDENT_SIZE = 4; indentOptions.TAB_SIZE = 4; indentOptions.CONTINUATION_INDENT_SIZE = 4; UISettings.getInstance().setFontFace... | doTest |
272,929 | String () { return PlatformTestUtil.getPlatformTestDataPath(); } | getTestDataPath |
272,930 | void () { doTextTest("txt", "abc <caret> ", "abc \n<caret> "); } | testEnterWithSpacesAfterCaret |
272,931 | void () { doTextTest("txt", "//file/text/<caret>text/text", "//file/text/\n" + "<caret>text/text"); } | testSCR2236 |
272,932 | void () { // Inspired by IDEA-64060 doTextTest( "txt", " class Foo {<caret>", """ class Foo { <caret> }\ """ ); } public void testInJavaDocLikeStringOfPlainTextFile() { // Inspired by IDEA-65108 doTextTest( "txt", "Here is a list of bullet points:\n" + "* Bullet one. <caret>Bullet two.", """ Here is a list of bullet po... | testUnmatchedBraceAtPlainTextFile |
272,933 | void () { // Inspired by IDEA-65108 doTextTest( "txt", "Here is a list of bullet points:\n" + "* Bullet one. <caret>Bullet two.", """ Here is a list of bullet points: * Bullet one. \s <caret>Bullet two.""" ); } | testInJavaDocLikeStringOfPlainTextFile |
272,934 | void () { doTextTest("txt", "\t<caret>\tabc", "\t\n\t<caret>\tabc"); } | testIndentCalculationWithTabsInIndent |
272,935 | String () { return PlatformTestUtil.getPlatformTestDataPath(); } | getTestDataPath |
272,936 | void () { doTest("txt"); } | testPlainTextSentence |
272,937 | void () { doTest("txt"); } | testPlainTextEmptyLine |
272,938 | void () { doTest("txt"); } | testLeadingWhitespace |
272,939 | void () { doTest("txt"); } | testInnerWhitespace |
272,940 | String () { return PlatformTestUtil.getPlatformTestDataPath(); } | getTestDataPath |
272,941 | void () { configureByFile("/codeInsight/commentInCustomFileType/block1.cs"); performBlockCommentAction(); checkResultByFile("/codeInsight/commentInCustomFileType/block1_after.cs"); configureByFile("/codeInsight/commentInCustomFileType/block1_after.cs"); performBlockCommentAction(); checkResultByFile("/codeInsight/comme... | testBlockComment |
272,942 | void () { configureByFile("/codeInsight/commentInCustomFileType/line1.cs"); performLineCommentAction(); checkResultByFile("/codeInsight/commentInCustomFileType/line1_after.cs"); configureByFile("/codeInsight/commentInCustomFileType/line2.cs"); performLineCommentAction(); checkResultByFile("/codeInsight/commentInCustomF... | testLineComment |
272,943 | void () { PlatformTestUtil.invokeNamedAction(IdeActions.ACTION_COMMENT_BLOCK); } | performBlockCommentAction |
272,944 | void () { PlatformTestUtil.invokeNamedAction(IdeActions.ACTION_COMMENT_LINE); } | performLineCommentAction |
272,945 | String () { return PlatformTestUtil.getPlatformTestDataPath(); } | getTestDataPath |
272,946 | void () { mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN = true; mySettings.setDefaultRightMargin(27); doTest(PlainTextFileType.INSTANCE, 'o', 'p'); } | testAutoWrapOnTypingAtLineEnd |
272,947 | void () { boolean oldWrapValue = mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN; int oldMarginValue = mySettings.getDefaultRightMargin(); mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN = true; mySettings.setDefaultRightMargin(10); try { init("qqqq aaaa<caret>", PlainTextFileType.INSTANCE); type('b'); checkResultByT... | testAutoWrapOnTyping_WrapsOnNewlyAddedSymbol_WhenTotalLengthExceedsRightMargin |
272,948 | void () { mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN = true; mySettings.setDefaultRightMargin(14); doTest(PlainTextFileType.INSTANCE, '1', ' ', '2', ' ', '3', ' ', '4', ' ', '5'); } | testAutoWrapsMerge |
272,949 | void () { mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN = true; mySettings.setDefaultRightMargin(10); doTest(PlainTextFileType.INSTANCE, '1', '2', '3', '4', '5'); } | testAvoidAutoWrapForIndentedLine |
272,950 | void () { mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN = true; mySettings.setDefaultRightMargin(5); doTest(PlainTextFileType.INSTANCE, '1', '2', '3', '4', '5'); } | testAvoidAutoWrapForNonIndentedLine |
272,951 | void () { CodeInsightSettings settings = CodeInsightSettings.getInstance(); int oldValue = settings.REFORMAT_ON_PASTE; settings.REFORMAT_ON_PASTE = CodeInsightSettings.INDENT_BLOCK; try { doTest(PlainTextFileType.INSTANCE, () -> { // Move caret to the non-zero column. getEditor().getCaretModel().moveToOffset(3); // Sel... | testCopyPasteWithoutUnnecessaryIndent |
272,952 | void () { // Inspired by IDEA-63313 String text = """ class Test { String my1FieldWithLongName; }"""; init(text, PlainTextFileType.INSTANCE); CaretModel caretModel = getEditor().getCaretModel(); SelectionModel selectionModel = getEditor().getSelectionModel(); IntList expectedBoundaries = new IntArrayList(); expectedBou... | testCamelHumpsSelectionAndDigits |
272,953 | void () { // Inspired by IDEA-69728 String initial = """ class Test { public void test() { String s = "test <caret>string"; } }"""; init(initial, PlainTextFileType.INSTANCE); executeAction("EditorStartNewLineBefore"); String expected = """ class Test { public void test() { String s = "test string"; } }"""; checkResultB... | testNewLineAboveCurrentAction |
272,954 | void () { String s = "test <caret>string"; } | test |
272,955 | void () { String s = "test string"; } | test |
272,956 | void () { String text = " a b <caret>"; init(text, PlainTextFileType.INSTANCE); executeAction("EditorHungryBackSpace"); checkResultByText(" a b<caret>"); executeAction("EditorHungryBackSpace"); checkResultByText(" a <caret>"); executeAction("EditorHungryBackSpace"); checkResultByText(" a<caret>"); executeAction("Editor... | testHungryBackspace |
272,957 | void () { String text = "one \"two<caret>\""; init(text, PlainTextFileType.INSTANCE); executeAction("EditorPreviousWord"); checkResultByText("one \"<caret>two\""); } | testMoveToPrevWordStartInsideStringLiteral |
272,958 | void () { init("", PlainTextFileType.INSTANCE); ((EditorEx)getEditor()).setPrefixTextAndAttributes("prefix", new TextAttributes()); type("first"); type("\n"); type("\tsecond"); // Expected that no exception is thrown here } | testPrefixAwareEditorWithTabOnNonFirstLine |
272,959 | void () { init("abcd", PlainTextFileType.INSTANCE); EditorEx editor = (EditorEx)getEditor(); CaretModel caretModel = editor.getCaretModel(); caretModel.moveToOffset(1); executeAction("EditorToggleStickySelection"); caretModel.moveToOffset(3); assertEquals("bc", editor.getSelectionModel().getSelectedText()); executeActi... | testCutFromStickySelection |
272,960 | void () { init("ab<caret>cdef", PlainTextFileType.INSTANCE); EditorEx editorEx = (EditorEx)getEditor(); editorEx.setStickySelection(true); editorEx.getCaretModel().moveCaretRelatively(2, 0, false, false, false); CodeInsightSettings settings = CodeInsightSettings.getInstance(); boolean oldValue = settings.SURROUND_SELEC... | testSurroundByQuotesAndStickySelection |
272,961 | void () { init("ab<caret>cde", PlainTextFileType.INSTANCE); EditorEx editorEx = (EditorEx)getEditor(); editorEx.setStickySelection(true); editorEx.getCaretModel().moveCaretRelatively(2, 0, false, false, false); SelectionModel selectionModel = editorEx.getSelectionModel(); assertEquals(2, selectionModel.getSelectionStar... | testStickySelectionIsCanceledByEscapeAction |
272,962 | void () { String text = "testVar1 testVar2"; init(text, PlainTextFileType.INSTANCE); CaretModel caretModel = getEditor().getCaretModel(); caretModel.moveToOffset(0); Document document = getEditor().getDocument(); EditorSettings settings = getEditor().getSettings(); boolean camelModeToRestore = settings.isCamelWords(); ... | testDifferentHumpsMode |
272,963 | void () { final String longLine = StringUtil.repeatSymbol(' ', 1000000); configureFromFileText("x.txt", longLine); PlatformTestUtil.startPerformanceTest("calcOffset", 10, () -> { for (int i = 0; i < 1000; i++) { int off = getEditor().logicalPositionToOffset(new LogicalPosition(0, longLine.length() - 1)); assertEquals(l... | testCalculatingLongLinesPositionPerformanceInEditorWithNoTabs |
272,964 | String () { return PlatformTestUtil.getPlatformTestDataPath(); } | getTestDataPath |
272,965 | void () { doTest(); } | testTest1 |
272,966 | void () { EditorSettingsExternalizable.getInstance().setCamelWords(true); try { doTest(); } finally { EditorSettingsExternalizable.getInstance().setCamelWords(false); } } | testCamelHumps |
272,967 | void () { doTest(false); // UnselectWordAtCaretAction is not implemented } | doTest |
272,968 | void (boolean unselect) { @NonNls final String path = "/codeInsight/selectWordWithoutPSIAction/" + getTestName(true); final Editor editor = configureByFileWithoutPSI(path + "/before"); try { int i = 1; while (true) { final String fileName = "/after" + i; @NonNls String resultPath = path + fileName; if (new File(getTest... | doTest |
272,969 | Editor (@TestDataFile @NonNls @NotNull String filePath) { try { final File ioFile = new File(getTestDataPath() + filePath); String fileText = FileUtilRt.loadFile(ioFile, CharsetToolkit.UTF8, true); return configureFromFileTextWithoutPSI(fileText); } catch (IOException e) { throw new RuntimeException(e); } } | configureByFileWithoutPSI |
272,970 | void (@Nullable String message, @NotNull Editor editor, @TestDataFile @NotNull String filePath) { try { final File ioFile = new File(getTestDataPath() + filePath); String fileText = FileUtil.loadFile(ioFile, StandardCharsets.UTF_8); checkResultByTextWithoutPSI(message, editor, StringUtil.convertLineSeparators(fileText)... | checkResultByFile |
272,971 | EditorActionHandler () { EditorAction action = (EditorAction)ActionManager.getInstance().getAction(IdeActions.ACTION_EDITOR_SELECT_WORD_AT_CARET); return action.getHandler(); } | getHandler |
272,972 | String () { return "platform/platform-tests/testData/codeInsight/completion/customFileType/"; } | getBasePath |
272,973 | boolean () { return true; } | isCommunity |
272,974 | void () { myFixture.configureByFile("1.cs"); myFixture.complete(CompletionType.BASIC); myFixture.checkResultByFile("1_after.cs"); myFixture.configureByFile("2.cs"); myFixture.complete(CompletionType.BASIC); myFixture.checkResultByFile("2_after.cs"); } | testKeyWordCompletion |
272,975 | void () { myFixture.configureByFile("WordCompletion.cs"); myFixture.complete(CompletionType.BASIC); myFixture.assertPreferredCompletionItems(0, "while", "whiwhiwhi"); } | testWordCompletion |
272,976 | void () { myFixture.configureByFile("foo.cs"); myFixture.complete(CompletionType.BASIC); UsefulTestCase.assertEmpty(myFixture.getLookupElements()); } | testComment |
272,977 | void () { myFixture.configureByText("a.cs", "<caret>"); myFixture.complete(CompletionType.BASIC); TestCase.assertTrue(myFixture.getLookupElementStrings().contains("abstract")); TestCase.assertFalse(myFixture.getLookupElementStrings().contains("x")); } | testEmptyFile |
272,978 | void () { PsiFile file = PsiFileFactory.getInstance(getProject()).createFileFromText("a.xxx", MockLanguageFileType.INSTANCE, "aaa a<caret>", 0, true); myFixture.configureFromExistingVirtualFile(file.getViewProvider().getVirtualFile()); myFixture.complete(CompletionType.BASIC); myFixture.checkResult("aaa aaa<caret>"); } | testPlainTextSubstitution |
272,979 | boolean (PsiElement context) { return true; } | isEngagedToFormat |
272,980 | FormattingModel (@NotNull FormattingContext formattingContext) { throw new UnsupportedOperationException("com.intellij.codeInsight.actions.MockPlainTextFormattingModelBuilder.createModel(...)"); } | createModel |
272,981 | TextRange (PsiFile file, int offset, ASTNode elementAtOffset) { throw new UnsupportedOperationException("com.intellij.codeInsight.actions.MockPlainTextFormattingModelBuilder.getRangeAffectingIndent(...)"); } | getRangeAffectingIndent |
272,982 | String () { return "Test"; } | getName |
272,983 | String () { return "Test"; } | getName |
272,984 | void () { doTest( """ public class B { int a = 3; String text; Object last = null; }""", """ public class B { int a = 3; int toIndent1 = 1; String text; int toIndent2 Object last = null; }""", line(2, 2), line(4, 4) ); } | testInsertion |
272,985 | ChangedLines (int from, int to) { return new ChangedLines(from, to); } | line |
272,986 | void () { doTest( """ public class B { int a = 3; String text; Object last = null; Object first = null; Object second = null; }""", """ public class B { int newInt = 1; Object last = null; }""", line(1, 1) ); } | testDeletion |
272,987 | void () { doTest( """ public class B { int a = 3; String text; Object last = null; Object first = null; Object second = null; }""", """ public class B { int a = 3; String text; Object last = null; }""" ); } | testNoReformatOn_DeletionModification |
272,988 | void () { doTest( """ public class B { int a = 3; String text; Object last = null; Object first = null; Object second = null; }""", """ public class B { int a = 33; String text; Object last = new Object(); Object first = null; Object second = new Object(); }""", line(1, 1), line(3,3), line(5,5) ); } | testModification |
272,989 | void () { doTest( """ public class B {\r int a = 3;\r String text;\r Object last = null;\r Object first = null;\r Object second = null;\r }""", """ public class B {\r int a = 33;\r String text;\r Object last = new Object();\r Object first = null;\r Object second = new Object();\r }""", line(1, 1), line(3,3), line(5,5) ... | testModificationCRLF |
272,990 | void () { ChangedFilesStructure fs = new ChangedFilesStructure(myWorkingDirectory); PsiFile m1 = fs.createFile("Test1.java", COMMITTED, MODIFIED); PsiFile u1 = fs.createFile("Test2.java", COMMITTED, COMMITTED); fs.createDirectoryAndMakeItCurrent(); PsiFile m2 = fs.createFile("Test3.java", COMMITTED, MODIFIED); PsiFile ... | testReformatFiles |
272,991 | void () { ChangedFilesStructure fs = new ChangedFilesStructure(myWorkingDirectory); PsiFile u1 = fs.createFile("Test1.java", COMMITTED, COMMITTED); PsiFile u2 = fs.createFile("Test2.java", COMMITTED, COMMITTED); reformatDirectory(fs.getCurrentDirectory()); assertFormattedLines(NO_CHANGED_LINES, u1, u2); } | testNoChangesNoFormatting |
272,992 | void () { ChangedFilesStructure fs = new ChangedFilesStructure(myWorkingDirectory); PsiFile untouched1 = fs.createFile("Test1.java", COMMITTED, COMMITTED); PsiFile untouched2 = fs.createFile("Test2.java", COMMITTED, COMMITTED); PsiFile modified1 = fs.createFile("Test4.java", COMMITTED, MODIFIED); PsiFile modified2 = fs... | testReformatOnlyChanged |
272,993 | void () { ChangedFilesStructure fs = new ChangedFilesStructure(myWorkingDirectory); PsiFile modified11 = fs.createFile("Test4.java", COMMITTED, MODIFIED); PsiFile modified12 = fs.createFile("Test5.java", COMMITTED, MODIFIED); fs.createDirectoryAndMakeItCurrent(); PsiDirectory dirToReformat = fs.getCurrentDirectory(); P... | testReformatInAllSubtree |
272,994 | void () { ChangedFilesStructure fs = new ChangedFilesStructure(myWorkingDirectory); String initialFile = "initial file"; PsiFile toModify = fs.createFile("Modified.txt", initialFile, initialFile + " + unused import"); PsiFile toModify2 = fs.createFile("Modified2.txt", initialFile, initialFile + " + another unused impor... | testOptimizeImportsInModule |
272,995 | void (@NotNull ChangeListManager manager) { ServiceContainerUtil.replaceService(getProject(), ChangeListManager.class, manager, getTestRootDisposable()); } | registerChangeListManager |
272,996 | void (@NotNull CodeStyleManager manager) { ServiceContainerUtil.replaceService(getProject(), CodeStyleManager.class, manager, getTestRootDisposable()); } | registerCodeStyleManager |
272,997 | void (@NotNull VcsContextFactory factory) { ServiceContainerUtil.replaceService(ApplicationManager.getApplication(), VcsContextFactory.class, factory, getTestRootDisposable()); } | registerVcsContextFactory |
272,998 | void (@NotNull String committed, @NotNull String modified, ChangedLines @NotNull ... lines) { ChangedFilesStructure fs = new ChangedFilesStructure(myWorkingDirectory); PsiFile file = fs.createFile("Test.java", committed, modified); reformatDirectory(myWorkingDirectory); assertFormattedRangesEqualsTo(file, lines); } | doTest |
272,999 | void (ChangedLines @NotNull [] expectedLines, PsiFile @NotNull ... files) { for (PsiFile file : files) assertFormattedRangesEqualsTo(file, expectedLines); } | assertFormattedLines |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.