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

Bug 341884

Summary: [Theming] Refactor ThemeStore.js to resolve values lazily
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: tbuschto
Version: 1.4   
Target Milestone: 1.4 M7   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 338647    

Description Tim Buschtoens CLA 2011-04-05 06:29:41 EDT
The ThemeStore parses all Fonts, Gradients and Borders in defineValues. Depending on the client-system, this can take a few hundred milliseconds, so we should do it lazily instead. This will also be a good opportunity to make some other adjustments, specifically to move as much code as possible from ThemeValues to ThemeStore, and to optimize resolving rounded borders. 

I would also like to rename some internals, as "getCssValue" returns the final value in some cases (e.g. boolean), and keys in others (e.g. Borders). However, this would require some discussion, so i will skip it for now.
Comment 1 Tim Buschtoens CLA 2011-04-05 10:36:14 EDT
Fixed in CVS HEAD.

The responsibility of ThemeValues now clearly is only to hold the states object and ThemeStore reference, nothing more. Everything else is done in ThemeStore, including resolving the Borders/Gradients/Fonts lazily. 

The RoundedBorders created by ThemeStore are currently (as before) not reused like the other borders. I opend a new bug for this issue: Bug 341924.