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 - create(..., ActionListener) broken when used with persistant indexes
Summary: create(..., ActionListener) broken when used with persistant indexes
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Action Items (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Peska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-10 12:41 UTC by Jaroslav Tulach
Modified: 2016-05-25 06:05 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 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.