use of com.intellij.testFramework.fixtures.EditorMouseFixture in project intellij-community by JetBrains.
the class EditorMultiCaretTest method testAltDragStartingFromWithinLine.
public void testAltDragStartingFromWithinLine() throws Exception {
initText("<caret>line\n" + "long line\n" + "very long line\n" + "long line\n" + "line");
setEditorVisibleSize(1000, 1000);
EditorMouseFixture mouse = mouse();
mouse.alt().pressAt(1, 6);
checkResultByText("line\n" + "long l<caret>ine\n" + "very long line\n" + "long line\n" + "line");
// still holding Alt
mouse.dragTo(4, 6);
checkResultByText("line\n" + "long l<caret>ine\n" + "very l<caret>ong line\n" + "long l<caret>ine\n" + "line<caret>");
// still holding Alt
mouse.dragTo(4, 8);
checkResultByText("line\n" + "long l<selection>in<caret></selection>e\n" + "very l<selection>on<caret></selection>g line\n" + "long l<selection>in<caret></selection>e\n" + "line");
// still holding Alt
mouse.dragTo(4, 10).release();
checkResultByText("line\n" + "long l<selection>ine<caret></selection>\n" + "very l<selection>ong <caret></selection>line\n" + "long l<selection>ine<caret></selection>\n" + "line");
}
use of com.intellij.testFramework.fixtures.EditorMouseFixture in project intellij-community by JetBrains.
the class EditorMultiCaretTest method testAltOnOffWhileDragging.
public void testAltOnOffWhileDragging() throws Exception {
initText("line1\n" + "line2\n" + "line3");
setEditorVisibleSize(1000, 1000);
EditorMouseFixture mouse = mouse();
mouse.pressAt(0, 1).dragTo(1, 2);
checkResultByText("l<selection>ine1\n" + "li<caret></selection>ne2\n" + "line3");
mouse.alt().dragTo(1, 3);
checkResultByText("l<selection>in<caret></selection>e1\n" + "l<selection>in<caret></selection>e2\n" + "line3");
mouse.noModifiers().dragTo(2, 4).release();
checkResultByText("l<selection>ine1\n" + "line2\n" + "line<caret></selection>3");
}
Aggregations