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 170130

Summary: create(..., ActionListener) broken when used with persistant indexes
Product: platform Reporter: Jaroslav Tulach <jtulach>
Component: Action ItemsAssignee: Jan Peska <JPESKA>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jaroslav Tulach 2009-08-10 12:41:33 UTC
While reviewing issue 169987 I have noticed comment that makes one of the API methods useless for file based scanners:

+     <p>Since version 1.4 the Task List implementation uses Indexing API to persist
+     * tasks created by FileTaskScanners. If a file hasn't changed since the last scan
+     * then the tasks associated with that file are loaded from cache to improve
+     * Task List performance. Therefore task's ActionListener and popup Actions
+     * aren't available when the task is restored from cache. Task providers must
+     * switch to PushTaskScanner if ActionListener and popup actions are required
+     * to be available at all times.</p>

Imho this is fully unnecessary. As soon as such task is invoked (and there is no ActionListener) associated to it, the 
infrastructure shall trigger rescan of the given file. Such rescan will ask the associated provider to generate new 
list of Tasks (with live ActionListener) and then the listener can be invoked. All the infrastructure needs to do is 
to match the old tasks with the new ones. However that shall be quite easy:

- the file is up-to-date: otherwise the parsing API would trigger a refresh
- the FileBasedScanners are supposed to yield its results based on the content of one file
- thus the result after rescan shall be 100% same as the previous run

As a result matching task with the same String groupNam and String description.