mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use correct modifiers in EditorMouseFixture
(fix EditorMultiCaretTest.testMiddleButtonDragStartingFromVirtualSpace)
This commit is contained in:
+5
-18
@@ -50,7 +50,7 @@ public class EditorMouseFixture {
|
||||
component.dispatchEvent(new MouseEvent(myLastComponent = component,
|
||||
myLastId = MouseEvent.MOUSE_PRESSED,
|
||||
System.currentTimeMillis(),
|
||||
getModifiers(),
|
||||
myModifiers,
|
||||
myX = p.x,
|
||||
myY = p.y,
|
||||
clickCount,
|
||||
@@ -68,7 +68,7 @@ public class EditorMouseFixture {
|
||||
myLastComponent.dispatchEvent(new MouseEvent(myLastComponent,
|
||||
myLastId = MouseEvent.MOUSE_RELEASED,
|
||||
System.currentTimeMillis(),
|
||||
getModifiers(),
|
||||
myModifiers,
|
||||
myX,
|
||||
myY,
|
||||
clickCount,
|
||||
@@ -78,7 +78,7 @@ public class EditorMouseFixture {
|
||||
myLastComponent.dispatchEvent(new MouseEvent(myLastComponent,
|
||||
myLastId = MouseEvent.MOUSE_CLICKED,
|
||||
System.currentTimeMillis(),
|
||||
getModifiers(),
|
||||
myModifiers,
|
||||
myX,
|
||||
myY,
|
||||
clickCount,
|
||||
@@ -121,7 +121,7 @@ public class EditorMouseFixture {
|
||||
component.dispatchEvent(new MouseEvent(component,
|
||||
myLastId = MouseEvent.MOUSE_MOVED,
|
||||
System.currentTimeMillis(),
|
||||
getModifiers(),
|
||||
myModifiers,
|
||||
myX = x,
|
||||
myY = y,
|
||||
0,
|
||||
@@ -141,7 +141,7 @@ public class EditorMouseFixture {
|
||||
component.dispatchEvent(new MouseEvent(component,
|
||||
myLastId = MouseEvent.MOUSE_DRAGGED,
|
||||
System.currentTimeMillis(),
|
||||
getModifiers(),
|
||||
myModifiers,
|
||||
myX = x,
|
||||
myY = y,
|
||||
1,
|
||||
@@ -183,17 +183,4 @@ public class EditorMouseFixture {
|
||||
private Point getPoint(int visualLine, int visualColumn) {
|
||||
return myEditor.visualPositionToXY(new VisualPosition(visualLine, visualColumn));
|
||||
}
|
||||
|
||||
@MagicConstant(flagsFromClass = InputEvent.class)
|
||||
private int getModifiers() {
|
||||
if (myButton == MouseEvent.BUTTON3) {
|
||||
return myModifiers | InputEvent.META_MASK;
|
||||
}
|
||||
else if (myButton == MouseEvent.BUTTON2) {
|
||||
return myModifiers | InputEvent.ALT_MASK;
|
||||
}
|
||||
else {
|
||||
return myModifiers;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user