This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 163125 - JavaScript task list is not refreshed
Summary: JavaScript task list is not refreshed
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jan Jancura
URL:
Keywords: REGRESSION
: 163126 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-20 15:00 UTC by Martin Schovanek
Modified: 2009-06-12 21:56 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Nb 6.5 Tasklist for .js files (73.50 KB, image/png)
2009-05-29 17:28 UTC, Martin Schovanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2009-04-20 15:00:09 UTC
[#200904192254-6.7-beta, jdk1.5.0]

to reproduce:
-------------
1) create a .js like (| represents the cursor):
  function ffff() {|}
2) open Tasks window and enable JS in the Default filter
3) type . (it introduce a error)
4) save the file
ERROR: the Tasks list is not refreshed till you edit the filter
Comment 1 Marek Fukala 2009-04-20 15:06:10 UTC
Reproducible.
Comment 2 Marek Fukala 2009-04-20 15:12:41 UTC
*** Issue 163126 has been marked as a duplicate of this issue. ***
Comment 3 Marek Fukala 2009-05-07 11:29:44 UTC
This is a generic CSL problem, the hints are refreshed only if the PushTaskScanner.setScope() is called which you can do
in the tasklist UI. 

In java it works the way that the hints update is triggered by the RepositoryUpdater, resp. java indexer through
TaskCache class. I am not sure if it ever worked in GSF (some of the method copied from JavaTaskScanner still exist) or
just un/indentionally disabled during the CSL migration. 

Reassigniong to Vita since he is the most experienced person here.
Comment 4 Vitezslav Stejskal 2009-05-11 09:58:44 UTC
Umm, when looking at 'Show tasks for all opened projects' the error in the jhavascript file never shows up, but when
looking at 'Show tasks for currently edited file' the error shows up after manually refreshing the list. So, I assume
this is the problem you are referring to - the necessity to manually refresh the task list.
Comment 5 Marek Fukala 2009-05-11 16:14:07 UTC
Yep, switching the views triggers PushTaskScanner.setScope() which updates the tasks.
Comment 6 Marian Mirilovic 2009-05-27 10:00:34 UTC
if you plan to fix this for NB 6.7 please rise the priority
Comment 7 Petr Jiricka 2009-05-27 13:49:08 UTC
We just discussed with Marek, this is a regression since 6.5. Moreover, this issue apparently affects all CSL-based
languages (HTML, CSS, Ruby, PHP, ...). Martine, what's your opinion, is this a 6.7 stopper?
Comment 8 Martin Schovanek 2009-05-28 08:53:55 UTC
Yes, please fix it for 6.7.
Comment 9 Petr Jiricka 2009-05-28 09:23:13 UTC
Just found out that Groovy is affected too.
Comment 10 Martin Schovanek 2009-05-29 17:26:58 UTC
It is regression against 6.5 where Task list displays tasks from all .js files. See the attached image.   
Comment 11 Martin Schovanek 2009-05-29 17:28:09 UTC
Created attachment 82992 [details]
Nb 6.5 Tasklist for .js files
Comment 12 Marian Mirilovic 2009-06-01 11:46:30 UTC
Ok, this issue is considered as a stopper for RC2/FCS. Proceed with bugfix into release67 ASAP, thanks in advance.
Comment 13 Jan Jancura 2009-06-09 10:44:44 UTC
fixed in http://hg.netbeans.org/jet-main/rev/09dc12b5d333
Comment 14 Marian Mirilovic 2009-06-09 14:55:55 UTC
Ok Hanz - thanks for the fix. Martin is waiting for a build where we'll test it. Keep it opened until fixed into
release67. Thanks in advance.
Comment 15 Vitezslav Stejskal 2009-06-09 15:01:12 UTC
I can see several problems with the patch:

vs1: When calling QuerySupport.forRoots you should pass null as a value for the sourceIds parameter, because you are
interested for all source roots and not just ClassPath.SOURCE, which denotes java source roots.

vs2: The id and version of TLIndexerFactory should be static fields rather than adhoc constants scattered around the
sources.

vs3: Implement TLIF.filesDeleted() and TLIF.filesDirty() accordingly. It should be enough to just pass the indexable to
the similar methods in IndexingSupport.

vs4: Why are you calling SupportAccessor.getInstance ().store (indexingSupport); directly? You are not supposed to do this.

Otherwise it looks ok. I haven't tested the code.
Comment 16 Petr Jiricka 2009-06-10 14:40:22 UTC
I found that this is not only a problem with JavaScript, but also with TODO tasks. I filed a separate issue 166858.
Comment 17 Jiri Prox 2009-06-10 17:15:37 UTC
The second patch look better. 

The only problems I've found are in embeddings:
the following xhtml fragment does not show todo for css and javascript in tasklist
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>
        <title>TODO supply a title</title>
        <style type="text/css">

            div {
                /* TODO css todo */
            }
        </style>
        <script type="text/javasctipt">
            function aaaa() {
            }
            // TODO js todo           
        </script>
    </head>


also error and todo in inline css are not recognized, but the errors are not highlighted as well so I'm not sure it it
should work.
<p style="margin:auto; /* TODO inline*/"></p>

For separate files all works fine (tested with html, xhtml, php, java, js)
Comment 18 Quality Engineering 2009-06-11 08:39:39 UTC
Integrated into 'main-golden', will be available in build *200906110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/09dc12b5d333
User: Jan Jancura <jjancura@netbeans.org>
Log: #163125: JavaScript task list is not refreshed
Comment 19 Petr Jiricka 2009-06-11 08:57:19 UTC
Jirko, you are right the TODO tasks don't work well in these cases. However, this does not work for me even before
Hanz's patch. So shouldn't this be filed as a separate issue? (Also, I believe this needs to be fixed on Standa's side.)

BTW, the second patch is this one, right?
http://hg.netbeans.org/jet-main/rev/f7f37c37265e
Comment 20 Quality Engineering 2009-06-11 18:43:09 UTC
Integrated into 'main-golden', will be available in build *200906111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f7f37c37265e
User: Jan Jancura <jjancura@netbeans.org>
Log: #163125: JavaScript task list is not refreshed2
Comment 21 Quality Engineering 2009-06-12 09:24:09 UTC
Integrated into 'main-golden', will be available in build *200906120201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9dfec1c435aa
User: Jan Jancura <jjancura@netbeans.org>
Log: #163125: JavaScript task list is not refreshed3
Comment 23 Jiri Prox 2009-06-12 21:56:05 UTC
VERIFIED IN 6.7RC3