Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[swtbot-dev] Display.getCursorPosition with SWTBot test

Hi,
Recently I experienced that Display.getCursorPosition does not return correct coordinates when SWTBot/JUnit Plugin Test is run.

The same problem is described in commit messages at https://git.eclipse.org/r/#/c/55052/ and https://git.eclipse.org/r/#/c/53515/.
In these cases, the alternative way of using absolute coordinates from event seems to be used in application.
But it may not be possible to modify application, if it depends on some codebase, e.g. JFace (HyperlinkManager uses JFaceTextUtil.getOffsetForCursorLocation).

In my case, JUnit plugin test also shows the same problem.
Display.getCursorPosition gives some positive values for absolute coordinates but their relative conversion gives negative coordinates.
Is there any workaround/solution to this problem if one cannot modify application?
Regards,
Aparna



Back to the top