NetBeans IDE 6.7 RC2 (Build 200906042131)
Java: 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 1.6.0_07-b06-57
システム: x86_64 Mac OS X 10.5.7; SJIS; ja_JP (nb)
1. Start NetBeans and create Groovy file
2. Make selection for some characters
the characters are selected and editor hint is enabled.
3. Click another point in editor to cancel the selection
The selection should be canceled, however, yellow underline is
remaining and hint is also remaining.
Created attachment 83425 [details]
*** Issue 171536 has been marked as a duplicate of this issue. ***
*** Issue 162470 has been marked as a duplicate of this issue. ***
I'd like to NetFIX  this bug. Is it possible?  http://wiki.netbeans.org/NetFIX.
Petr, are you willing to review and integrate possible Daniel Sheppard's patch? Thanks for your answer!
I don't have any objections, however there are couple of important things to know.
I believe this issue is caused by disabling the GsfCodeTemplateFilter for groovy - this is actually workaround for issue
172363 which should be fixed by CSL maintainer.
So this issue might look as simple fix, but perhaps it is not. Be extremely careful for regressions and EDT blocking.
Created attachment 87800 [details]
I tried re-enabling Groovy in GsfCodeTemplateFilter by commenting out the line that added the Groovy mime types to the
list of disabled file-types (leaving the list empty). The issue remained unfixed.
My fix was founded by comparing how selection hints are applied and removed in Java and Groovy. In Java it is handled
by AbbrevDetection and removed in hideSurroundWithHint() by passing an empty list of ErrorDescriptions to
HintsController.setErrors(). The corresponding code for Groovy is SelectionHintsTask, but its run() method just returns
when it sees that the selection range is empty. I now get it to call HintsController.setErrors() with an empty list
(like AbbrevDetection.hideSurroundWithHint()) before returning.
Seems ok, but groovy is not the best test case as it does not have many hints.
Reassigning to CSL for evaluation. Adding other scripting languages engineers on cc.
The fix looks ok to me as well. Thanks. Marek, could you please test and integrate it. Thanks
Marku, can you please review & integrate this patch? Thanks a lot!
Does not seem to be controversial. Fixed in web-main c5ad6c7334db.
Thank you very much Petre!
Integrated into 'main-golden', will be available in build *200910170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Log: #166890 selection will not be cleared - yellow underline is remaining