Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [nebula-dev] Major contribution to Gantt

What exactly? The Locale changes at runtime? Possibly not, as the Eclipse Translation Pattern is based on the dynamic injections. The pattern itself simply says that you move the translation mechanism to a separate method that is called via dynamic injection. So you could try to trigger it manually too if you know that the Locale changed. The question you need to answer on that is, how to get informed that the Locale has changed? The mechanism itself is listening to dynamic changes of the Locale in the context, while the pattern listens for dynamic injections of the Messages instances.

The new message extension itself is an OSGi service. Well two services to be more precise. The TranslationObjectSupplier which is an ExtendedObjectSupplier to get the @Translation annotation to work in conjunction with the IMessageFactoryService, which is an OSGi service that creates the Messages instance and fills the values dependent on the current set Locale. But you need the BundleLocalization object to get it working. If you can grab that from the registry aswell (it is also an OSGi service) than it should be possible to use the mechanism also in an 3.x application. Surely with some more pain than in an 4.x application. But that is true for almost every use case. ;-)


On Mon, Oct 7, 2013 at 3:18 PM, Wim Jongman <wim.jongman@xxxxxxxxx> wrote:
That is cool too. I was planning to ask you: can that be used without injection as well. I mean in a 3.X rcp just by grabbing the service from the registry?

Regards,

Wim


On Mon, Oct 7, 2013 at 3:05 PM, Dirk Fauth <dirk.fauth@xxxxxxxxx> wrote:
Your welcome! :) Even though I'm not sure why you appreciate it that much. It were just a few extensions and bug fixes.

The new message extension that introduces the Eclipse Translation Pattern for adding support to change the Locale at runtime in Eclipse based applications should get that attention! ;-)


On Mon, Oct 7, 2013 at 12:47 PM, Mickael Istria <mistria@xxxxxxxxxx> wrote:
Thanks Dirk!
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev



_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev



_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev



Back to the top