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

Bug 395737

Summary: Improve ResourceManager API
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: mknauer, rsternberg, tbuschto
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Tim Buschtoens CLA 2012-12-04 12:05:26 EST
The new JavaScriptLoader makes it possible to load JavaScript resources lazily. It should also be possible to register them lazily, especially since there is no common way to register resources for workbench, non-workbench and RWT-standalone applications. It's currently already possible, but requires an nonsatisfying amount of code.
Comment 1 Tim Buschtoens CLA 2012-12-05 04:55:24 EST
commit ed9f140763a184856b39be0500aa22a6e4054dc7 adds ResourceManagerImpl#registerOnce( String resource, ResourceLoader loader ).

It's not yet in then ResourceManager interface.
Comment 2 Ralf Sternberg CLA 2014-12-09 06:03:06 EST
Now that we have Application-scoped singletons you could use something like

    SingletonUtil.getUniqueInstance(Resources.class, RWT.getApplicationContext())

Resources would be an application scoped singleton that registers resources in its constructor.