Community
Participate
Working Groups
When typing a single character while build is runnning (or pasting a longer text from clipboard - but only a single time) then after ~ 250ms a progress Windows opens where cancel the user operation is possible.(https://bugs.eclipse.org/bugs/show_bug.cgi?id=546828#c8) After canceling the character (or longer text) is inserted into the document. It is not nice that it's need to cancel a user Operation while the insert seems to still work - but ok. But if typing more then a single character within 250ms then one needs to cancel every single of them (ugly) - but all of them are lost. Reproduce: 1) Put a breakpoint after lock.acquire(); in org.eclipse.core.internal.resources.WorkManager.checkIn(ISchedulingRule, IProgressMonitor) to simulate a longer build. 2) Start Project -> Clean.. -> All projects 3) Open Java file 4) Type "12" fast 5) Cancel user Operation (2x) 6) Type "3", wait 7) Cancel user Operation (1x) => the inserted text is "3". "1" and "2" are lost.
one problem here is that "cancel" button issues a OperationCanceledException which is converted to InterruptedException which is converted to CoreException with(serverity=CANCEL) which is just ignored in org.eclipse.ui.texteditor.AbstractTextEditor.validateState(IEditorInput) and then org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(IProgressMonitor) just continues as if validation was successful.
Sounds legit.
thanks for review, Karsten
https://github.com/eclipse-platform/eclipse.platform.text/pull/4#pullrequestreview-927183599