Bug 170130 - create(..., ActionListener) broken when used with persistant indexes
create(..., ActionListener) broken when used with persistant indexes
Status: NEW
Product: platform
Classification: Unclassified
Component: Action Items
6.x
All All
: P3 (vote)
: TBD
Assigned To: Jan Peska
tasklist-issues@contrib
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-10 12:41 UTC by Jaroslav Tulach
Modified: 2011-09-01 16:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


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.


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