Bug 549817 - Editor Area's CTabFolder Chevron: Highlight matching regions
Summary: Editor Area's CTabFolder Chevron: Highlight matching regions
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.13   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2019-08-06 09:12 EDT by Matthias Becker CLA
Modified: 2020-11-30 05:45 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Becker CLA 2019-08-06 09:12:31 EDT
When the Editor Areas' CTabFolder has more tabs then it can display the chevron is drawn.
Clicking on this opens a list with all editor. This list contains a filter line at top.
I propose to adapt the highlighting according to 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=549254

Ünal already made a first anaylsis in https://bugs.eclipse.org/bugs/show_bug.cgi?id=549254#c9
He writes:

"When user have more editors open then there is space for tabs a chevron is displayed on the right side which can be shown.
There are all editors, visible and hidden (in bold), listed and a filter text field is on top.

I tried to add this feature with highlighting the matching regions to the filtering of editors but failed.

The filtering is done in the ViewerFilter.filter(viewer, parent, elements) method.
At some point the CTabFolder.onSelection(e) is called and for the chevronItem the method showList(e) for all folderListerners are called.
This triggers the creation and update of all editors to show.

Among other logic the item in the Table will be updated. The class AbstractTableViewer is doing this in doUpdateItem(widget, element, fullMap) with the call columnViewer.refresh(cellToUpdate);

In ColumnLabelProvider the cell is updated in update(cell) and with cell.setFont(getFont(element)); for example the bold styling for hidden editors is done.
With the use of StyleRanges I tried to set the ranges which should be bold -> didn't work. Commenting out the cell.setFont(getFont(element)); didn't help.

The use of implementation IStyledLabelProvider for ColumnLabelProvider with the method getStyledText(element) doesn't work because at no point in time this method is called. I think there is something missing or can be enhanced to check if the labelProvider has implemented the IStyledLabelProvider and call the getStyledText instead of getText to render the text to show. I was not able to find such a place for enhancements.

There is also another issue to solve:
The filter pattern text needs to be known by the label provider to do the highlighting. Currently such information is not stored neither in Cell nor in CellItem."
Comment 1 Rolf Theunissen CLA 2019-08-06 10:05:37 EDT
Note that the BasicPartList can made consistent with the 'pop-ups' like Ctrl-E, see Bug 548481.
Comment 2 Ünal Akkaya CLA 2019-08-06 12:23:40 EDT
(In reply to Rolf Theunissen from comment #1)
> Note that the BasicPartList can made consistent with the 'pop-ups' like
> Ctrl-E, see Bug 548481.

Do I understand this correct:
If BasicPartList is extended by FilteredTableBaseHandler then the highlighting of matching regions for CTabFolder can be implemented in an easy way.
Are the information of the filter pattern available then?
Comment 3 Rolf Theunissen CLA 2019-08-06 12:38:03 EDT
(In reply to Ünal Akkaya from comment #2)

> Do I understand this correct:
> If BasicPartList is extended by FilteredTableBaseHandler then the
> highlighting of matching regions for CTabFolder can be implemented in an
> easy way.
> Are the information of the filter pattern available then?

The motivation to do have the other superclass is the same motivation as in Bug 504082. So I do think that the migration is a good idea.
I don't know what the impact is (e.g. styling of the two things are different). This might make you ideas easier to implement too. Just wanted you to be aware of this issue before changing something in BasicPartList.