Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
271,400 | void () { prepare(""" first line second<caret> line third line"""); copy(); verifyResult("first line\n" + maybeCaretOnLineStart(maybeSelection("second<caret> line\n")) + "third line", "second line\n" ); } | testCopyWithoutSelection |
271,401 | void () { prepare("first line\n" + "second line<caret>\n" + // this line will be wrapped and caret is positioned after the wrap "third line"); assertTrue("Failed to activate soft wrapping", EditorTestUtil.configureSoftWraps(getEditor(), 6)); copy(); verifyResult("first line\n" + maybeCaretOnLineStart(maybeSelection("se... | testCopyWithoutSelectionWithSoftWraps |
271,402 | void (String documentContents) { configureFromFileText(getTestName(false) + ".txt", documentContents); } | prepare |
271,403 | void (String expectedDocumentContents, String expectedClipboardContents) { checkResultByText(expectedDocumentContents); assertEquals("Clipboard contents mismatch", expectedClipboardContents, CopyPasteManager.getInstance().getContents(DataFlavor.stringFlavor)); } | verifyResult |
271,404 | void () { init(""" long line<caret> line long line very long line"""); cloneCaretBelow(); checkResult(""" long line<caret> line<caret> long line very long line"""); cloneCaretBelow(); checkResult(""" long line<caret> line<caret> long line<caret> very long line"""); cloneCaretBelow(); checkResult(""" long line<caret> li... | testStoringDesiredXPosition |
271,405 | void () { init(""" long line<caret> line long line"""); cloneCaretBelow(); moveCaretDown(); checkResult(""" long line line<caret> long line<caret>"""); } | testCloneAndMove |
271,406 | void () { init(""" line <caret>li<caret>ne line"""); cloneCaretBelow(); checkResult(""" line <caret>li<caret>ne <caret>li<caret>ne"""); cloneCaretAbove(); checkResult(""" line <caret>li<caret>ne line"""); cloneCaretAbove(); checkResult(""" <caret>li<caret>ne <caret>li<caret>ne line"""); cloneCaretBelow(); checkResult("... | testCloneBelowAndAbove |
271,407 | void () { init(""" long <selection>line<caret></selection> line long line"""); cloneCaretBelow(); checkResult(""" long <selection>line<caret></selection> line long <selection>line<caret></selection>"""); } | testCloneWithSelection |
271,408 | void () { myFixture.performEditorAction(IdeActions.ACTION_EDITOR_CLONE_CARET_BELOW); } | cloneCaretBelow |
271,409 | void () { myFixture.performEditorAction(IdeActions.ACTION_EDITOR_CLONE_CARET_ABOVE); } | cloneCaretAbove |
271,410 | void () { myFixture.performEditorAction(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN); } | moveCaretDown |
271,411 | void (String text) { myFixture.configureByText(getTestName(false) + ".txt", text); } | init |
271,412 | void (String text) { myFixture.checkResult(text); } | checkResult |
271,413 | void () { doTestDeleteToStart("<caret>", "<caret>"); doTestDeleteToEnd("<caret>", "<caret>"); } | testEmpty |
271,414 | void () { doTestDeleteToStart("\n<caret>\n\n", "<caret>\n\n"); doTestDeleteToEnd("\n<caret>\n\n", "\n<caret>\n"); } | testEmptyLine |
271,415 | void () { doTestDeleteToStart("\n a a a <caret>\n\n", "\n<caret>\n\n"); doTestDeleteToEnd("\n a a a <caret>\n\n", "\n a a a <caret>\n"); doTestDeleteToStart(" a a a <caret>", "<caret>"); doTestDeleteToEnd(" a a a <caret>", " a a a <caret>"); } | testEndOfNonEmptyLine |
271,416 | void () { doTestDeleteToStart("\n<caret> a a a \n\n", "<caret> a a a \n\n"); doTestDeleteToEnd("\n<caret> a a a \n\n", "\n<caret>\n\n"); doTestDeleteToStart("<caret> a a a ", "<caret> a a a "); doTestDeleteToEnd("<caret> a a a ", "<caret>"); } | testBeginningOfNonEmptyLine |
271,417 | void () { doTestDeleteToStart("\n a a <caret> b b \n\n", "\n<caret> b b \n\n"); doTestDeleteToEnd("\n a a <caret> b b \n\n", "\n a a <caret>\n\n"); doTestDeleteToStart(" a a <caret> b b ", "<caret> b b "); doTestDeleteToEnd(" a a <caret> b b ", " a a <caret>"); } | testMiddleOfNonEmptyLine |
271,418 | void () { boolean virtualSpacesBefore = EditorSettingsExternalizable.getInstance().isVirtualSpace(); EditorSettingsExternalizable.getInstance().setVirtualSpace(true); try { doTestDeleteToStart("\n a a \n b b \n", new VisualPosition(1, 10), "\n<caret>\n b b \n", new VisualPosition(1, 0)); doTestDeleteToStart("\n a a \n ... | testMoveCaretFromVirtualSpaceToRealOffset |
271,419 | void () { doTestDeleteToStart("aaa <selection>bbb \n ccc</selection><caret> ddd", "aaa <caret> ddd"); doTestDeleteToEnd("aaa <selection>bbb \n ccc</selection><caret> ddd", "aaa <caret> ddd"); } | testDeleteSelectionFirst |
271,420 | void (@NotNull String before, @NotNull String after) { doTestDelete(true, before, null, after, null); } | doTestDeleteToStart |
271,421 | void (@NotNull String before, @Nullable VisualPosition positionBefore, @NotNull String after, @Nullable VisualPosition positionAfter) { doTestDelete(true, before, positionBefore, after, positionAfter); } | doTestDeleteToStart |
271,422 | void (@NotNull String before, @NotNull String after) { doTestDelete(false, before, null, after, null); } | doTestDeleteToEnd |
271,423 | void (@NotNull String before, @Nullable VisualPosition positionBefore, @NotNull String after, @Nullable VisualPosition positionAfter) { doTestDelete(false, before, positionBefore, after, positionAfter); } | doTestDeleteToEnd |
271,424 | void (boolean toStart, @NotNull String before, @Nullable VisualPosition positionBefore, @NotNull String after, @Nullable VisualPosition positionAfter) { configureFromFileText(getTestName(false) + ".txt", before); if (positionBefore != null) mouse().clickAt(positionBefore.line, positionBefore.column); if (toStart) { del... | doTestDelete |
271,425 | void (@NotNull String text) { configureFromFileText(getTestName(false) + ".txt", text); Pair<String,String> parseResult = parse(); String textBefore = getEditor().getDocument().getText(); killRingSave(); if (parseResult.first == null) { return; } String contents = CopyPasteManager.getInstance().getContents(DataFlavor.s... | doTest |
271,426 | void () { prepare(""" first line second<caret> line third line"""); selectLine(); checkResultByText(""" first line <selection>second line </selection><caret>third line""" ); } | test |
271,427 | void () { prepare("first line\n" + "second line<caret>\n" + // this line will be wrapped and caret is positioned after the wrap "third line"); assertTrue("Failed to activate soft wrapping", EditorTestUtil.configureSoftWraps(getEditor(), 6)); selectLine(); checkResultByText(""" first line <selection>second line </select... | testWithSoftWraps |
271,428 | void () { prepare(""" first line secon<caret><selection>d line third li</selection>ne fourth line fifth line"""); selectLine(); checkResultByText(""" first line <selection>second line third line </selection><caret>fourth line fifth line""" ); selectLine(); checkResultByText(""" first line <selection>second line third l... | testWithExistingSelection |
271,429 | void (String documentContents) { configureFromFileText(getTestName(false) + ".txt", documentContents); } | prepare |
271,430 | void () { String text = "<caret>class Test {\n" + "}"; doTest(text, text); } | testZeroPosition |
271,431 | void () { doTest( "class <caret>Test {\n" + "}", "<caret>Test {\n" + "}" ); } | testNonZeroPositionOfFirstLine |
271,432 | void () { doTest( """ class Test { <caret> // This is comment string }""", "<caret> // This is comment string\n" + "} | testZeroPositionNonFirstLine |
271,433 | void () { doTest( """ class Test { // This is the comment string // <caret>int i; }""", """ class Test { <caret>int i; }""" ); } | testNonZeroPositionNonFirstLine |
271,434 | void (@NotNull String before, @NotNull String after) { configureFromFileText(getTestName(false) + ".txt", before); cutLineBackward(); checkResultByText(after); } | doTest |
271,435 | void () { verifyAction("some text", null); } | testWithoutSelection |
271,436 | void () { verifyAction("some <selection>text</selection>", " some <selection>text</selection>"); } | testWithInlineSelection |
271,437 | void () { verifyAction("some<selection> </selection>text", null); } | testWithInlineWhitespaceOnlySelection |
271,438 | void () { verifyAction("<selection>some text</selection>", "<selection> some text</selection>"); } | testWithLineSelection |
271,439 | void () { verifyAction(" <selection>some text</selection>", " <selection>some text</selection>"); } | testWithLineSelectionExcludingSpaces |
271,440 | void (String input, String expectedResult) { myFixture.configureByText(getTestName(false) + ".txt", input); IndentSelectionAction action = new IndentSelectionAction(); assertEquals(expectedResult != null, myFixture.testAction(action).isEnabled()); if (expectedResult != null) { myFixture.checkResult(expectedResult); } } | verifyAction |
271,441 | void () { doTest( "this is a test string <caret>", "this is a test <caret>" ); } | testAfterWordEnd |
271,442 | void () { doTest( "this is a test string<caret>", "this is a test <caret>" ); } | testAtWordEnd |
271,443 | void () { doTest( "this is a test str<caret>ing", "this is a test <caret>ing" ); } | testInTheMiddleOfTheWord |
271,444 | void () { doTest( "this is a test <caret>string", "this is a <caret>string" ); } | testInTheWordStart |
271,445 | void () { doTest( "this is the first string \n" + " <caret> this is the second string", "this is the first <caret> this is the second string" ); } | testInWhiteSpaceAtLineStart |
271,446 | void () { doTest( "this is the first string \n" + "<caret> this is the second string", "this is the first <caret> this is the second string" ); } | testAtLineStart |
271,447 | void () { doTest( " <caret> this is the first string", "<caret> this is the first string" ); } | testInWhiteSpaceAtDocumentStart |
271,448 | void () { doTest( "<caret> this is the first string", "<caret> this is the first string" ); } | testAtDocumentStart |
271,449 | void () { configureFromFileText(getTestName(false) + ".java", "class Foo { String s = \"a\\nb<caret>\"; }"); killToWordStart(); checkResultByText("class Foo { String s = \"a\\n<caret>\"; }"); } | testEscapeChars |
271,450 | void () { EditorSettingsExternalizable editorSettings = EditorSettingsExternalizable.getInstance(); boolean savedValue = editorSettings.isCamelWords(); editorSettings.setCamelWords(true); try { doTest("abc<caret>", "<caret>"); } finally { editorSettings.setCamelWords(savedValue); } } | testNearDocumentStartInCamelHumpsMode |
271,451 | void (@NotNull String before, @NotNull String after) { configureFromFileText(getTestName(false) + ".txt", before); killToWordStart(); checkResultByText(after); } | doTest |
271,452 | void () { doTestForward(""" ab<caret>c def """, """ abc <caret> def """); } | testForwardFromNonEmptyLine |
271,453 | void () { doTestForward(""" <caret> def """, """ def <caret> """); } | testForwardFromEmptyLine |
271,454 | void () { doTestForward("ab<caret>c\n" + "def", "abc\n" + "def<caret>"); } | testForwardWhenNoMoreBlankLines |
271,455 | void () { doTestForward(""" <caret>abc \s """, """ abc <caret> \s """); } | testForwardWhenTargetLineContainsSpaces |
271,456 | void () { doTestBackward(""" abc de<caret>f""", """ abc <caret> def"""); } | testBackwardFromNonEmptyLine |
271,457 | void () { doTestBackward(""" abc <caret> """, """ <caret> abc """); } | testBackwardFromEmptyLine |
271,458 | void () { doTestBackward("abc\n" + "de<caret>f", "<caret>abc\n" + "def"); } | testBackwardWhenNoMoreBlankLines |
271,459 | void () { doTestBackward(""" \s abc <caret> """, """ \s <caret>abc """); } | testBackwardWhenTargetLineContainsSpaces |
271,460 | void () { doTestBackward(" \n" + "ab<caret>c", " \n" + "<caret>abc"); } | testBackwardWhenPreviousLineContainsSpaces |
271,461 | void () { doTestBackward(""" ttt \s <caret>abc""", """ <caret> ttt \s abc"""); } | testBackwardAtLineStartWhenPreviousLineContainsSpaces |
271,462 | void () { doTestForwardWithSelection(""" ab<caret>c def """, """ ab<selection>c <caret></selection> def """); } | testForwardWithSelection |
271,463 | void () { doTestBackwardWithSelection(""" abc de<caret>f""", """ abc <selection><caret> de</selection>f"""); } | testBackwardWithSelection |
271,464 | void (String initialText, String resultText) { doTest(initialText, resultText, IdeActions.ACTION_EDITOR_FORWARD_PARAGRAPH); } | doTestForward |
271,465 | void (String initialText, String resultText) { doTest(initialText, resultText, IdeActions.ACTION_EDITOR_BACKWARD_PARAGRAPH); } | doTestBackward |
271,466 | void (String initialText, String resultText) { doTest(initialText, resultText, IdeActions.ACTION_EDITOR_FORWARD_PARAGRAPH_WITH_SELECTION); } | doTestForwardWithSelection |
271,467 | void (String initialText, String resultText) { doTest(initialText, resultText, IdeActions.ACTION_EDITOR_BACKWARD_PARAGRAPH_WITH_SELECTION); } | doTestBackwardWithSelection |
271,468 | void (String initialText, String resultText, String action) { initText(initialText); executeAction(action); checkResultByText(resultText); } | doTest |
271,469 | void () { myFixture.configureByText("a.txt", "<foo<caret>>"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD); myFixture.checkResult("<foo><caret>"); } | testNextWordFromPreLastPosition |
271,470 | void () { myFixture.configureByText("a.txt", "<<caret>foo>"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_PREVIOUS_WORD); myFixture.checkResult("<caret><foo>"); } | testPrevWordFrom1 |
271,471 | void () { myFixture.configureByText("Foo.java", "class Foo { String s = \"a\\<caret>nb\"; }"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD); myFixture.checkResult("class Foo { String s = \"a\\n<caret>b\"; }"); } | testNextWordWithEscapeChars |
271,472 | void () { myFixture.configureByText("Foo.java", "class Foo { String s = \"a\\nb<caret>\"; }"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_PREVIOUS_WORD); myFixture.checkResult("class Foo { String s = \"a\\n<caret>b\"; }"); } | testPrevWordWithEscapeChars |
271,473 | void () { myFixture.configureByText("Foo.java", "class Foo { String s = \"a\\xb<caret>\"; }"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_PREVIOUS_WORD); myFixture.checkResult("class Foo { String s = \"a\\x<caret>b\"; }"); } | testPrevWordWithIllegalEscapeChar |
271,474 | void () { myFixture.configureByText("Foo.java", "class Foo { boolean b = 1 <caret>>= 2; }"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD); myFixture.checkResult("class Foo { boolean b = 1 >=<caret> 2; }"); } | testNextWordAtGreaterThanEqualOperator |
271,475 | void () { myFixture.configureByText("a.txt", "<caret>brown fox"); EditorTestUtil.addFoldRegion(myFixture.getEditor(), 4, 7, "...", true); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD); myFixture.checkResult("brow<caret>n fox"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD); myFix... | testPrevNextWordWithFolding |
271,476 | void () { myFixture.configureByText("a.txt", "<caret>brown fox"); EditorTestUtil.addFoldRegion(myFixture.getEditor(), 4, 7, "...", true); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD_WITH_SELECTION); myFixture.checkResult("<selection>brow<caret></selection>n fox"); myFixture.performEditorAction(IdeA... | testPrevNextWordWithSelectionAndFolding |
271,477 | void () { FileType regExpFileType = FileTypeManagerEx.getInstanceEx().findFileTypeByName("RegExp"); assertNotNull(regExpFileType); myFixture.configureByText(regExpFileType, "<caret>abc"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD); myFixture.checkResult("abc<caret>"); } | testRegexpCharsAreNotTreatedAsSeparateWords |
271,478 | void () { init("<caret>text", PlainTextFileType.INSTANCE); final EditorSettings editorSettings = getEditor().getSettings(); final boolean old = editorSettings.isCaretInsideTabs(); try { editorSettings.setCaretInsideTabs(true); executeAction("EditorDownWithSelection"); checkResultByText("<selection>text<caret></selectio... | testDownWithSelectionWhenCaretsAreAllowedInsideTabs |
271,479 | void () { init("<caret>line 1\n" + "line 2", PlainTextFileType.INSTANCE); setEditorVisibleSize(100, 100); final EditorSettings editorSettings = getEditor().getSettings(); final boolean old = editorSettings.isCaretInsideTabs(); try { editorSettings.setCaretInsideTabs(true); executeAction("EditorPageDownWithSelection"); ... | testPageDownWithSelectionWhenCaretsAreAllowedInsideTabs |
271,480 | void () { init("long long t<caret>ext", PlainTextFileType.INSTANCE); EditorTestUtil.configureSoftWraps(getEditor(), 10); executeAction("EditorDuplicate"); checkResultByText("long long text\n" + "long long t<caret>ext"); } | testDuplicateFirstLineWhenSoftWrapsAreOn |
271,481 | void () { init("some<selection> <caret></selection>text", PlainTextFileType.INSTANCE); executeAction("EditorTab"); checkResultByText("some <caret>text"); } | testTabWithSelection |
271,482 | void () { String text = """ line 1 <selection>line 2 </selection>line 3"""; init(text, PlainTextFileType.INSTANCE); deleteLine(); checkResultByText( "line 1\n" + "line 3" ); } | testLineDeleteWithSelectionEndAtLineStart |
271,483 | void () { String text = """ 1 2<caret> 3"""; init(text, PlainTextFileType.INSTANCE); deleteLine(); deleteLine(); checkResultByText("1"); } | testDeleteLastLine |
271,484 | void () { init("<caret>1\n", PlainTextFileType.INSTANCE); deleteLine(); checkResultByText(""); } | testDeleteLastNonEmptyLine |
271,485 | void () { init(""" <caret>text #""", PlainTextFileType.INSTANCE); getEditor().getDocument().createGuardedBlock(5, 7); // "\n#" deleteLine(); checkResultByText("\n" + "#"); } | testDeleteLineBeforeGuardedBlock |
271,486 | void () { init(""" xxxx bla <selection><caret>bla bla</selection> bla yyy""", PlainTextFileType.INSTANCE); deleteLine(); checkResultByText("xxxx\n" + "yyy<caret>"); } | testDeleteLineHonorSelection |
271,487 | void () { init("<caret> ", PlainTextFileType.INSTANCE); executeAction("EditorIndentLineOrSelection"); checkResultByText(" <caret> "); } | testIndentWhitespaceLineWithCaretAtLineStart |
271,488 | void () { init("te<caret>xt", PlainTextFileType.INSTANCE); executeAction(IdeActions.ACTION_EDITOR_TOGGLE_STICKY_SELECTION); executeAction(IdeActions.ACTION_EDITOR_MOVE_CARET_RIGHT); executeAction(IdeActions.ACTION_EDITOR_BACKSPACE); checkResultByText("te<caret>t"); assertFalse(((EditorEx)getEditor()).isStickySelection(... | testBackspaceWithStickySelection |
271,489 | void () { init("line1<caret>\nline2\nline3", PlainTextFileType.INSTANCE); addCollapsedFoldRegion(5, 7, "..."); executeAction(IdeActions.ACTION_EDITOR_MOVE_CARET_RIGHT); assertEquals(new VisualPosition(0, 6), getEditor().getCaretModel().getVisualPosition()); } | testMoveRightAtFoldedLineEnd |
271,490 | void () { init("text<caret>", PlainTextFileType.INSTANCE); executeAction(IdeActions.ACTION_EDITOR_TOGGLE_OVERWRITE_MODE); executeAction(IdeActions.ACTION_EDITOR_ENTER); checkResultByText("text\n<caret>"); } | testEnterOnLastLineInOverwriteMode |
271,491 | void () { init("", PlainTextFileType.INSTANCE); ((EditorEx)getEditor()).setOneLineMode(true); CopyPasteManager.getInstance().setContents(new StringSelection("a\rb")); executeAction(IdeActions.ACTION_EDITOR_PASTE); checkResultByText("a b<caret>"); } | testPasteInOneLineMode |
271,492 | void () { initText(""" blah blah blah <selection>bl<caret>ah</selection> blah blah"""); executeAction(IdeActions.ACTION_EDITOR_MOVE_CARET_UP_WITH_SELECTION); checkResultByText(""" blah bl<selection><caret>ah blah blah</selection> blah blah"""); } | testUpWithSelectionOnCaretInsideSelection |
271,493 | void () { initText(""" blah blah blah <selection>bl<caret>ah</selection> blah blah"""); executeAction(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN_WITH_SELECTION); checkResultByText(""" blah blah blah <selection>blah blah bl<caret></selection>ah"""); } | testDownWithSelectionOnCaretInsideSelection |
271,494 | void () { initText(""" A mad boxer shot a quick<selection>, gloved jab to the jaw of<caret></selection> his\s dizzy opponent. """); up(); checkResultByText(""" A mad b<caret>oxer shot a quick, gloved jab to the jaw of his\s dizzy opponent. """); } | testUpOnCaretOnSelectionEnd |
271,495 | void () { initText(""" A mad boxer shot a quick<selection>, gloved<caret> jab to the jaw of</selection> his\s dizzy opponent. """); up(); checkResultByText(""" A mad b<caret>oxer shot a quick, gloved jab to the jaw of his\s dizzy opponent. """); } | testUpOnCaretInsideSelection |
271,496 | void () { initText(""" A mad boxer shot a quick<selection><caret>, gloved jab to the jaw of</selection> his\s dizzy opponent. """); down(); checkResultByText(""" A mad boxer shot a quick, gloved jab to the jaw of his\s dizzy opponen<caret>t. """); } | testDownOnCaretOnSelectionStart |
271,497 | void () { initText(""" A mad boxer shot a quick<selection>, gloved<caret> jab to the jaw of</selection> his\s dizzy opponent. """); down(); checkResultByText(""" A mad boxer shot a quick, gloved jab to the jaw of his\s dizzy opponen<caret>t. """); } | testDownOnCaretInsideSelection |
271,498 | void () { initText(" <caret> text"); unindent(); checkResultByText(" <caret>text"); } | testCaretComesBeforeTextOnUnindent |
271,499 | void () { initText("a<selection>b<caret></selection>c"); executeAction(IdeActions.ACTION_EDITOR_SWAP_SELECTION_BOUNDARIES); left(); checkResultByText("a<caret>bc"); } | testSwapSelectionBoundaries |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.