Bug 564255 - RegistryCSSElementProvider getElement only returns the 1st match
Summary: RegistryCSSElementProvider getElement only returns the 1st match
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.10   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-12 13:27 EDT by Page CLA
Modified: 2023-11-09 08:48 EST (History)
2 users (show)

See Also:


Attachments
Sample code to show the issue (221.32 KB, application/octet-stream)
2020-06-12 13:27 EDT, Page CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Page CLA 2020-06-12 13:27:50 EDT
Created attachment 283264 [details]
Sample code to show the issue

Our project has a requirement to use CSS to define colors for Section, including the title foreground color.

Using extension org.eclipse.e4.ui.css.core.propertyHandler, I have provided my own handler and my own element provider through org.eclipse.e4.ui.css.core.elementProvider. However, the handler registered for Section sometimes are ignored.

Further debug shows Eclipse has a SectionElement and handler (org.eclipse.ui.internal.forms.css.properties.css2.CSSPropertyTitleFormsHandler) defined in org.eclipse.ui.forms. Sometimes this handler from Eclipse is found and used instead of my own handler/element.

RegistryCSSElementProvider getElement() should have a better logic to find the needed handler.

I have attached sample program to show the issue.

Note1: I notice the issue is easier to duplicate on Linux than on Win.

Note2: The problem is not consistent. Sometimes my custom handler is invoked; sometimes it is not. I think RegistryCSSElementProvider.getElement() returns the 1st match found; but the order is not always same.
Comment 1 Seema Sonawane CLA 2023-11-09 08:48:49 EST
experiencing the same issue