Hi all,

[1] just landed in master. This patch introduces an AssetManager that
should always be used to get access to messages, constants, templates,
and resources. No more GWT.creating or @Injecting them into
constructors and passing them around.

If you need access to an asset in a class, use one of the following lines
of code to get at the singleton:

(in webadmin and userportal)
private final static ApplicationTemplates templates = 
AssetProvider.getTemplates();
private final static ApplicationResources resources = 
AssetProvider.getResources();
private final static ApplicationConstants constants = 
AssetProvider.getConstants();
private final static ApplicationMessages messages = AssetProvider.getMessages();

(in gwt-common)
private final static CommonApplicationTemplates templates = 
AssetProvider.getTemplates();
private final static CommonApplicationResources resources = 
AssetProvider.getResources();
private final static CommonApplicationConstants constants = 
AssetProvider.getConstants();
private final static CommonApplicationMessages messages = 
AssetProvider.getMessages();

(Please keep these standard variable names -- i.e., don't name them "TEMPLATES" 
or
"commonConstants", etc.

If you have a frontend patch pending, your rebase probably won't be clean. This
patch touches over 700 files :)

Thanks!
Greg

[1] https://gerrit.ovirt.org/#/c/38724/  (userportal, webadmin: introduce 
AssetProvider)

Greg Sheremeta
Red Hat, Inc.
Sr. Software Engineer, RHEV
Cell: 919-807-1086
[email protected]
_______________________________________________
Devel mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/devel

Reply via email to