Community
Participate
Working Groups
The JFace text tests in org.eclipse.jface.text.tests.codemining.CodeMiningTest fail in the nightly build as below Windows 1) testCodeMiningCtrlEnd 2) testCodeMiningCtrlHome 3) testCodeMiningFirstLine Mac 1) testCodeMiningFirstLine
The link to the test failure report is https://download.eclipse.org/eclipse/downloads/drops4/I20210217-1800/testResults.php
Failed in the IBuild I20210224-1800 https://download.eclipse.org/eclipse/downloads/drops4/I20210224-1800/testResults.php
Please feel free to move the Target Milestone to 4.19 RC2 if you plan to fix it for 4.19.
In the build I20210407-1800, the below tests failed on Mac and Windows Windows 1) testCodeMiningCtrlEnd 2) testCodeMiningCtrlHome 3) testCodeMiningFirstLine Mac 1) testCodeMiningFirstLine The link for the tests report is below https://download.eclipse.org/eclipse/downloads/drops4/I20210407-1800/testResults.php
In the build I20210519-1800, the below tests failed on Mac and Windows Windows 1) testCodeMiningCtrlEnd 2) testCodeMiningCtrlHome 3) testCodeMiningFirstLine Mac 1) testCodeMiningFirstLine The link for the tests report is below https://download.eclipse.org/eclipse/downloads/drops4/I20210519-1800/testResults.php
In the build I20210526-2310, the below tests failed on Mac and Windows Windows 1) testCodeMiningCtrlEnd 2) testCodeMiningCtrlHome 3) testCodeMiningFirstLine Mac 1) testCodeMiningFirstLine The link for the tests report is below https://download.eclipse.org/eclipse/downloads/drops4/I20210526-2310/testResults.php
In the build I20210603-0040, the below tests failed on Mac and Windows Windows Windows 1) testCodeMiningCtrlEnd 2) testCodeMiningCtrlHome 3) testCodeMiningFirstLine Mac 1) testCodeMiningFirstLine The link for the tests report is below https://download.eclipse.org/eclipse/downloads/drops4/I20210603-0040/testResults.php
Mass move out of 4.20
In the build I20210707-1800, the below tests failed on Mac and Windows Windows Windows 1) testCodeMiningCtrlEnd 2) testCodeMiningCtrlHome 3) testCodeMiningFirstLine Mac 1) testCodeMiningFirstLine The link for the tests report is below https://download.eclipse.org/eclipse/downloads/drops4/I20210707-1800/testResults.php
Actually not the tests were guilty!, the code is not working, at least on Windows. The issue in bug 541415 comment 14 can still be reproduced on Windows! Because of that, tests fail. *Exact* these steps from Dani aren't working (enable ALL code minings in Java -> Editor -> Code Mining, and have org.eclipse.jface.text project in the workspace): ##################################### 1. Use Open Type to open TextViewer 2. Wait until the code minings are visible (also the one above class TextViewer This takes about 5s 2. Press Ctrl+End ==> no code minings When I now click somewhere, the minings appear. ##################################### And the test is also hangs around and fails with assertion except I click somewhere inside the opened text widget during test.
Mass move out of 4.22
In the build I20220106-0000, the below tests failed on Windows 1. CodeMiningProjectionViewerTest.testCodeMiningDoesntAlterFocus 2. CodeMiningTest.testCodeMiningCtrlEnd 3. CodeMiningTest.testCodeMiningCtrlHome 4. CodeMiningTest.testCodeMiningFirstLine
I'm unfortunately not able to debug at all on Mac, and hardly able to debug on Windows for some time (need to reset a VM and so on and have a lot of higher important stuff in the backlog). Any help is welcome!
(In reply to Andrey Loskutov from comment #10) > Actually not the tests were guilty!, the code is not working, at least on > Windows. > > The issue in bug 541415 comment 14 can still be reproduced on Windows! > > Because of that, tests fail. > > *Exact* these steps from Dani aren't working (enable ALL code minings in > Java -> Editor -> Code Mining, and have org.eclipse.jface.text project in > the workspace): > > ##################################### > 1. Use Open Type to open TextViewer > 2. Wait until the code minings are visible (also the one above class > TextViewer > This takes about 5s > 2. Press Ctrl+End > ==> no code minings > > When I now click somewhere, the minings appear. > ##################################### > > And the test is also hangs around and fails with assertion except I click > somewhere inside the opened text widget during test. I've checked a bit deeper. Bug 541415 comment 20 linked to a very interesting observation made by Eric, in https://www.eclipse.org/lists/platform-dev/msg01475.html he said: ########## I am dealing with an issue where StyledText is not sending SWT.Selection events when doing selecting text in a certain way while using the Eclipse Java editor. Specifically, StyledText.sendSelectionEvent() is not being triggered. For example: 1) Open any Java file in the IDE 2) Press Ctrl + Home 3) Press Shift + End This will select an entire line, but StyledText.sendSelectionEvent() is not called. If I hit the down arrow (moving the caret one line down and clearing the selection), I see the method being called. But doing Shift + End on any line is not triggering it at all. ########## In fact, the Shift+End is not "seen" by StyledText *inside Java editor*, even more, there is NO "key down" event received at all (!!!) by org.eclipse.swt.custom.StyledText.handleKeyDown(Event). At same time, this is very well working in a plain Shell - use Snippet25 with this patch: diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java index 1dd67cd..7afafa1 100644 --- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java +++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java @@ -24,2 +24,3 @@ import org.eclipse.swt.*; +import org.eclipse.swt.custom.*; import org.eclipse.swt.layout.*; @@ -145,4 +146,4 @@ }; - shell.addListener (SWT.KeyDown, listener); - shell.addListener (SWT.KeyUp, listener); +// shell.addListener (SWT.KeyDown, listener); +// shell.addListener (SWT.KeyUp, listener); shell.setLayout(new FillLayout()); @@ -151,2 +152,5 @@ label.setText("Start typing to see key state, code and character in console."); + StyledText text = new StyledText(shell, 0); + text.addListener (SWT.KeyDown, listener); + text.addListener (SWT.KeyUp, listener); shell.open (); This means, somewhere between StyledText and org.eclipse.ui.editors.text.TextEditor the key down event for "SWT.End" key is actively filtered out. Once we can find the code that filters that out, we can fix Code Minings on Windows (and tests).
(In reply to Andrey Loskutov from comment #14) > This means, somewhere between StyledText and > org.eclipse.ui.editors.text.TextEditor the key down event for "SWT.End" key > is actively filtered out. > > Once we can find the code that filters that out, we can fix Code Minings on > Windows (and tests). The event is filtered by "org.eclipse.ui.edit.text.select.lineEnd" command that is bound to the "Shift+End" shortcut stack: at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:578) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:647) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1280) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1059) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1069) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1111) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1107) at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1792) at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:5162) at org.eclipse.swt.widgets.Canvas.WM_KEYDOWN(Canvas.java:406) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4785) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5002) at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630) This patch fixes the issue from bug 541415 comment 14, but doesn't fix tests (???): diff --git a/bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/keys/KeyBindingDispatcher.java b/bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/keys/KeyBindingDispatcher.java index a7dae34..64e882a 100644 --- a/bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/keys/KeyBindingDispatcher.java +++ b/bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/keys/KeyBindingDispatcher.java @@ -132,3 +132,3 @@ try { - outOfOrderKeys = KeySequence.getInstance("ESC DEL"); //$NON-NLS-1$ + outOfOrderKeys = KeySequence.getInstance("ESC DEL CTRL+END CTRL+HOME"); //$NON-NLS-1$ } catch (ParseException e) { Probably tests have other problem. As I've mentioned already, once the test starts to hang, it is enough to click inside the StyledText to "fix" the hang.
The below tests fail on windows in the build I20220223-1800 1) testCodeMiningDoesntAlterFocus 2) testCodeMiningCtrlEnd 3) testCodeMiningCtrlHome 4) testCodeMiningFirstLine https://download.eclipse.org/eclipse/downloads/drops4/I20220223-1800/testresults/html/org.eclipse.jface.text.tests_ep423I-unit-win32-java11_win32.win32.x86_64_11.html
The below tests fail on windows in the build I20220302-1800 1) testCodeMiningDoesntAlterFocus 2) testCodeMiningCtrlEnd 3) testCodeMiningCtrlHome 4) testCodeMiningFirstLine https://download.eclipse.org/eclipse/downloads/drops4/I20220302-1800/testresults/html/org.eclipse.jface.text.tests_ep423I-unit-win32-java11_win32.win32.x86_64_11.html
The below tests fail on windows in the build I20220519-0130 1) testCodeMiningDoesntAlterFocus 2) testCodeMiningCtrlEnd 3) testCodeMiningCtrlHome 4) testCodeMiningFirstLine https://download.eclipse.org/eclipse/downloads/drops4/I20220519-0130/testresults/html/org.eclipse.jface.text.tests_ep424I-unit-win32-java11_win32.win32.x86_64_11.html
The below tests fail on windows in the build I20220525-1800 1) testCodeMiningDoesntAlterFocus 2) testCodeMiningCtrlEnd 3) testCodeMiningCtrlHome 4) testCodeMiningFirstLine https://download.eclipse.org/eclipse/downloads/drops4/I20220525-1800/testresults/html/org.eclipse.jface.text.tests_ep424I-unit-win32-java11_win32.win32.x86_64_11.html
Moved to https://github.com/eclipse-platform/eclipse.platform.text/issues/34