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 38303 - TODO List is not refreshed correctly on file deletion
Summary: TODO List is not refreshed correctly on file deletion
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 3.x
Hardware: PC Windows 95/98
: P3 blocker (vote)
Assignee: tasklist-issues@contrib
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-23 21:26 UTC by vbrabant
Modified: 2004-08-13 12:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vbrabant 2003-12-23 21:26:18 UTC
Steps to reproduce:

1) I Install Build 20031222.
2) I edit the file ColorPreview and add TODO in
the Sun Public Licence and save it
3) I select Windows | TODOs
4) the todo windows appears with the TODO row.
5) I select property 'Skip ...
6) I click on All files, then on Current File. No
more TODO row.  ==> OK
7) I click on All Files, click on Refresh. One
TODO row appears  ==> That is Wrong.
8) I unlect property 'Skip ...'
9) I click on All files, then on Current File. No
more TODO row ===> That is Wrong.
Comment 1 vbrabant 2003-12-23 21:34:33 UTC
It seems that problem is even more general. The cache is never
correctly updated.

Just another simple steps to do:

1. Install the build 20031222
2. Display the TODO List and select tab "All files". Empty List 
       ==> Correct
3. Open the ColorPreview.java file.
4. Add TODO in Comments. Save File
5. click on Refresh. List is always empty ==> Wrong
6. Add @TODO in Javadoc Comments. Don't Save File
7. Click on Refresh. List is updated. Two rows appears. ==> Correct

Conclusion: 
When I update a file and save it. Refresh is done correctly.
When I update a file and don't save it => Refresh is done correctly.
Comment 2 vbrabant 2003-12-23 21:35:17 UTC
It seems that problem is even more general. The cache is never
correctly updated.

Just another simple steps to do:

1. Install the build 20031222
2. Display the TODO List and select tab "All files". Empty List 
       ==> Correct
3. Open the ColorPreview.java file.
4. Add TODO in Comments. Save File
5. click on Refresh. List is always empty ==> Wrong
6. Add @TODO in Javadoc Comments. Don't Save File
7. Click on Refresh. List is updated. Two rows appears. ==> Correct

Conclusion: 
When I update a file and save it. Refresh is NOT done correctly.
When I update a file and don't save it => Refresh is done correctly.
Comment 3 vbrabant 2003-12-23 21:41:25 UTC
But, when I delete a TODO, save the file, click on refresh, it's well
refreshed. It disappear from the list. 

I can't understand exactly what's happens.

When I add TODO and click on refresh, it refreshs the list only if
file has not been saved.
When I delete TODO and click on refresh, it refreshs always.
Comment 4 vbrabant 2003-12-23 21:48:58 UTC
I updated the summary, because it's not linked to property. It's a
more general problem.

I also constated the following.

I add a TODO in ColorPreview.
I add a @TODO in ColorPreviewBean. 
I save none of those file.
I select TAB ALL Files. Two rows appears.
I click on the ColorPreview node
I select Current File.
I see one TODO Row. I double click on it.
The correct line is highlighted for ColorPreview.
I double click on the ColorPreviewBeanInfo node.
So, the node is selected and editor is selected.
But the Current File TODO list is not updated. 
I click on ALL Files Tab, and reclick on Current File Tab, then the TO
DO list is updated.

Very annoying behaviour. So I set Priority as P2
Comment 5 _ pkuzel 2004-01-05 12:59:51 UTC
The code cached all files that contained no TODOs and cache validity
was  file timestamp based.
Comment 6 _ pkuzel 2004-01-14 13:05:58 UTC
It was resolved in 3.6 time or earlier.
Comment 7 Milan Kubec 2004-03-02 08:47:55 UTC
Please, reporter, could you verify fixed issues. Thanks a lot.
Comment 8 vbrabant 2004-03-02 20:14:20 UTC
Sorry, but it's not yet working totally correctly.
So I reopen it.

I tested with Build20040226 (the last one available at this moment).

I select Windows TODOs,
I click on Selected Folder and choose the sampledir
Nothing appears in the todo list. ==> OK
I edit the file colorpreview and add a System.out.println("TODO")
somewhere in the code and I save it.
I click on the button refresh, and I see the TODO row.
I click on Current File => One row appears ==> OK
I check the property Skip ... No more rows appears (in current file)
==> OK
I uncheck the property Skip ... Nothing appears ==> BAD
And I can't invoke the refresh. (because I am on Current File)
I click on Selected Folder, Nothing appears  ==> Normal because it
comes from the cache.
I click on Current File => Nothing appears ==> WRONG
I click anew on Selected Folder, Click on Refresh. Nothing appears ==>
Not normal because I asked a REFRESH. 
I click anew on Refresh. Then, the row appears. 
I click on Current File => a row appears ==> GOOD

Another problem I encounter was the following.
I was on the Editor, with something in Current File.
I close the editor.
Rows are always displayed for Current File (they are no more current
file. No one is opened).
I delete Color Preview file. The row continue to be displayed in
current file.
I double click on the row, and I obtain obviously the message the
document could not be loaded.

Summary:
- I have in somes cases to click two times on the refresh button to
have a refresh of the list.
- Displayed Rows for current files are not correct updated when I
uncheck the property Skip ...
- When I close the editor, the table for current file is not reseted.
- When I delete the current file, the table is not reseted.

Hope that my feedback is helpful.
If you have any question, please ask me.
Comment 9 _ pkuzel 2004-03-04 09:41:42 UTC
I tried:

I check the property Skip ... No more rows appears (in current file)
==> OK
I uncheck the property Skip ... Nothing appears ==> BAD

and I cannot reproduce. The list changes immediately without need to
close settings window. Disillusion :-). I tried in latest dev build.

Other problems do not justify priority:
 - When I close the editor, the table for current file is not reseted.
 - When I delete the current file, the table is not reseted.

Comment 10 _ pkuzel 2004-03-04 09:46:41 UTC
Playing further I discovered the key, you need to save file between
unchecking and checking. Hopefully first edit restores right behaviour.

Do you see the same behaviour?
Comment 11 _ hair 2004-03-29 08:44:17 UTC
Shouldn't the priority be higher?
My suggestions list (TODOs and other tasklist plugins) hang
frequently, and it seems nothing short of a restart fixes it. This
complete breakage of the tasklist modules surely is higher than P3?
Comment 12 _ hair 2004-03-29 14:23:26 UTC
For me, it seems to consistantly hang after editing a jsp..
This is for the (TODOs in the) Suggestions window (not the TODOs window).
Comment 13 _ pkuzel 2004-04-14 16:44:37 UTC
I asked Mike to file separate bug with more details.
Comment 14 _ pkuzel 2004-07-22 16:05:08 UTC
>- When I close the editor, the table for current file is not reseted.
>- When I delete the current file, the table is not reseted.

FIXED

SuggestionsBroker.java
new revision: 1.43

> Playing further I discovered the key, you need to save file between
> unchecking and checking. Hopefully first edit restores right 
> behaviour.

WONTFIX