Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 218903

Summary: [Viewers] support extensibility of the refresh job in FilteredTree
Product: [Eclipse Project] Platform Reporter: Mik Kersten <mik.kersten>
Component: UIAssignee: Boris Bokowski <bokowski>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse, irbull, steffen.pingel, tom.schindl
Version: 3.4   
Target Milestone: 3.4 M6   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Mik Kersten CLA 2008-02-13 19:44:24 EST
As per the previous conversations on bug 74795 and bug 128233, the current FilteredTree refresh policy does not scale well to Mylyn's Task List.  In order to address this we created an AdaptiveRefreshPolicy that delays refresh in proportion to the length of the filter text that has been entered.  While we are able to override FilteredTree.textChanged(), we cannot set the refresh job so we have had to do this reflectively on construction on our subtype of FilteredTree.  In order to get rid of the reflection hack we need just a bit more extensibility, from:

	private void createRefreshJob() { ... }
	
To:

	protected Job createRefreshJob(PatternFilter patternFilter) { ... }
	
Clients could then override the refresh job to create a custom refresh job with their additional semantics.  While this could make better sense from the point of view of consistent extensibility, since textChanged(..) is already protected, all that we need for the Mylyn case is to access the refreshJob.  So for us the just the addition of the following getter is sufficient:

	protected Job getRefreshJob() {
		return refreshJob;
	}s
Comment 1 Boris Bokowski CLA 2008-02-15 00:12:35 EST
Released a fix >20080215. There is a new method:
protected WorkbenchJob doCreateRefreshJob()
Comment 2 Mik Kersten CLA 2008-02-19 02:36:23 EST
Excellent, thanks!  
Comment 3 Ian Bull CLA 2008-02-26 14:52:58 EST
*** Bug 207638 has been marked as a duplicate of this bug. ***
Comment 4 Jason Brennan CLA 2008-03-28 14:59:10 EDT
Verified in I20080327-2251
Comment 5 Kim Horne CLA 2008-03-28 15:08:14 EDT
Marking as verified.