Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 166890 - selection will not be cleared - yellow underline is remaining
selection will not be cleared - yellow underline is remaining
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure)
6.x
All All
: P3 (vote)
: 6.x
Assigned To: mslama
issues@editor
JA_COMMUNITY
: NETFIX
: 162470 171536 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-11 02:35 UTC by Masaki Katakai
Modified: 2009-10-17 11:26 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
screenshot (39.32 KB, image/png)
2009-06-11 02:37 UTC, Masaki Katakai
Details
suggested patch (712 bytes, patch)
2009-09-16 21:30 UTC, dynamite
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2009-06-11 02:35:36 UTC
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.
Comment 1 Masaki Katakai 2009-06-11 02:37:23 UTC
Created attachment 83425 [details]
screenshot
Comment 2 Petr Hejl 2009-09-11 11:42:07 UTC
*** Issue 171536 has been marked as a duplicate of this issue. ***
Comment 3 Petr Hejl 2009-09-14 16:45:25 UTC
*** Issue 162470 has been marked as a duplicate of this issue. ***
Comment 4 dynamite 2009-09-15 23:56:32 UTC
I'd like to NetFIX [1] this bug. Is it possible? [1] http://wiki.netbeans.org/NetFIX.
Comment 5 Jiri Kovalsky 2009-09-16 09:15:38 UTC
Petr, are you willing to review and integrate possible Daniel Sheppard's patch? Thanks for your answer!
Comment 6 Petr Hejl 2009-09-16 10:15:06 UTC
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. 
Comment 7 dynamite 2009-09-16 21:30:54 UTC
Created attachment 87800 [details]
suggested patch
Comment 8 dynamite 2009-09-16 21:50:13 UTC
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.

I have checked my fix against Groovy and JavaScript.  I'll use this build intensively tomorrow to give it a more
extensive test.
Comment 9 Petr Hejl 2009-09-17 10:20:48 UTC
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.
Comment 10 Vitezslav Stejskal 2009-09-22 15:46:10 UTC
The fix looks ok to me as well. Thanks. Marek, could you please test and integrate it. Thanks
Comment 11 Jiri Kovalsky 2009-10-14 13:49:08 UTC
Marku, can you please review & integrate this patch? Thanks a lot!
Comment 12 Petr Hejl 2009-10-16 09:34:12 UTC
Does not seem to be controversial. Fixed in web-main c5ad6c7334db.
Comment 13 Jiri Kovalsky 2009-10-16 10:49:17 UTC
Thank you very much Petre!
Comment 14 Quality Engineering 2009-10-17 11:26:42 UTC
Integrated into 'main-golden', will be available in build *200910170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c5ad6c7334db
User: phejl@netbeans.org
Log: #166890 selection will not be cleared - yellow underline is remaining


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo