Package org.eclipse.e4.ui.internal
Class LocaleChangeServiceImpl
java.lang.Object
org.eclipse.e4.ui.internal.LocaleChangeServiceImpl
- All Implemented Interfaces:
ILocaleChangeService
Default implementation of
ILocaleChangeService
that changes the Locale
in the
specified IEclipseContext
and additionally fires an event on the event bus.- Author:
- Dirk Fauth
-
Field Summary
Fields inherited from interface org.eclipse.e4.core.services.nls.ILocaleChangeService
LOCALE_CHANGE, TOPIC
-
Constructor Summary
ConstructorDescriptionLocaleChangeServiceImpl
(MApplication application) Create a newLocaleChangeServiceImpl
for the givenIEclipseContext
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeApplicationLocale
(String localeString) Change theLocale
in the application context.void
changeApplicationLocale
(Locale locale) Change theLocale
in the application context.protected void
updateLocalization
(List<? extends MUIElement> children) Will iterate over the given list ofMUIElement
s and inform them about the Locale change if necessary.
-
Constructor Details
-
LocaleChangeServiceImpl
Create a newLocaleChangeServiceImpl
for the givenIEclipseContext
.- Parameters:
application
- The application to retrieve the context from.
-
-
Method Details
-
changeApplicationLocale
Description copied from interface:ILocaleChangeService
Change theLocale
in the application context.- Specified by:
changeApplicationLocale
in interfaceILocaleChangeService
- Parameters:
locale
- TheLocale
to set to the application context.
-
changeApplicationLocale
Description copied from interface:ILocaleChangeService
Change theLocale
in the application context.If the given String is not a valid
Locale
String representation, there will be no locale change performed.- Specified by:
changeApplicationLocale
in interfaceILocaleChangeService
- Parameters:
localeString
- The String representation of theLocale
to set to the application context.
-
updateLocalization
Will iterate over the given list ofMUIElement
s and inform them about the Locale change if necessary.- Parameters:
children
- The list ofMUIElement
s that should be checked for Locale updates.
-