DESCRIPTION

Bug 520250 / 520251 - Highlight matches by CamelCase and pattern

Change-Id: I3ab4b2ef1f1698c2fd84d90b3440e1fe7d69ad22
Signed-off-by: Leah Wolf xxx@xxx.xxx


COMMENTS

author: Chase Horton
date: 2017-09-13 13:48:07.000000000

Patch Set 6: Patch Set 5 was rebased

-------------------------------------
author: Brenden Conley
date: 2017-09-13 13:48:16.000000000

Patch Set 6:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/13491/

-------------------------------------
author: Brenden Conley
date: 2017-09-13 14:19:28.000000000

Patch Set 6: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/13491/ : SUCCESS

-------------------------------------
author: Isis Velasquez
date: 2017-09-20 16:33:04.000000000

Patch Set 6:

Could we have a bunch of automated tests for this?

-------------------------------------
author: Leah Wolf
date: 2017-10-02 21:05:09.000000000

Patch Set 6:

> Could we have a bunch of automated tests for this?

@Mickael For writing test I am running into some trouble. I am unable to directly interact with the highlighting logic as it is private. I instead init a FilteredResourcesSelectionDialog but am unable to get the results in the table as the test is run in the UI thread and so is the displaying of the search results so waiting for the table to be populated stops the table from being loaded. Is there a better way to be doing this testing or should I refactor the highlighting logic to be external so that it would be accessible for direct testing (and possible reuse)?

-------------------------------------
author: Isis Velasquez
date: 2017-10-03 10:06:22.000000000

Patch Set 6:

Indeed, you'll need to wait for filtering to update UI. To do so in a the UI Thread, tests usually provide a DisplayHelper class to implement with a condition and that has a waitForCondition() method. The condition could be the amount of visible items in the table.
In this case you could retrieve via reflection (using the Accessor utility) the TableViewer field from the dialog, and from there get the Table and check that the label of the elements seem correct.

-------------------------------------
