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
ConstructorsConstructorDescriptionLocaleChangeServiceImpl(MApplication application) Create a newLocaleChangeServiceImplfor the givenIEclipseContext. -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeApplicationLocale(String localeString) Change theLocalein the application context.voidchangeApplicationLocale(Locale locale) Change theLocalein the application context.protected voidupdateLocalization(List<? extends MUIElement> children) Will iterate over the given list ofMUIElements and inform them about the Locale change if necessary.
-
Constructor Details
-
LocaleChangeServiceImpl
Create a newLocaleChangeServiceImplfor the givenIEclipseContext.- Parameters:
application- The application to retrieve the context from.
-
-
Method Details
-
changeApplicationLocale
Description copied from interface:ILocaleChangeServiceChange theLocalein the application context.- Specified by:
changeApplicationLocalein interfaceILocaleChangeService- Parameters:
locale- TheLocaleto set to the application context.
-
changeApplicationLocale
Description copied from interface:ILocaleChangeServiceChange theLocalein the application context.If the given String is not a valid
LocaleString representation, there will be no locale change performed.- Specified by:
changeApplicationLocalein interfaceILocaleChangeService- Parameters:
localeString- The String representation of theLocaleto set to the application context.
-
updateLocalization
Will iterate over the given list ofMUIElements and inform them about the Locale change if necessary.- Parameters:
children- The list ofMUIElements that should be checked for Locale updates.
-