0
votes

I am currently migration an Eclipse RCP application from Eclipse 3.0 to 4.4. There are language.property files where the texts for the buttons and also the keyboard shortcuts are specified.

For example, it looks like this: BenutzerNeu=&Benutzer...@STRG+ALT+B

This doesen' work.

When I change it to BenutzerNeu=&Benutzer...@CTRL+ALT+B it works fine, but now in the application the shortcut displayed also looks like CTRL+ALT+B. But because it is an application used by german speaking users it should look like this: STRG+ALT+B.

I tried to change the language to german in the program arguments of my Run configuration and in my .product-file which is then used to export it as "Eclipse product", but both didn't work.

In the old version of the program based on Eclipse 3.0 the keyboard shortcuts did work.

I think i have to configure the language somewhere else, but I can't find where to do this.

1
Migrating from 3.0 to 4.4 and you are only struggeling with keyboard shortcuts? I would assume you need to rewrite the whole application to make it fully E4 compliant (maybe except non-jface/swt relevant business parts)gia
:-D yeah, thought it would be harder. When the application was written I was still in 10th grade I think. There are only minor errors like the keyboard shortcuts and some english dialogs which where german before. But those can be tricky.Pascal Petruch
So its just an attempt "to make it work" with e4-runtime, not using all the new (and fancy) features of e4?gia
Just to make it work. I think these errors are all associated with the locale of the application. But I already configured the language to german everywherePascal Petruch

1 Answers

3
votes

Consider defining key bindings via the application model with the help of OS-independent names of the modifier keys, (e.g., M1 for CTRL), and let the operating system in conjunction with the locale set by the user herself take care of displaying the correct key name for the locale.

This works fine for my 4.5-based RCP on Ubuntu (cf. screenshot with German locale), and I imagine should work just as well for other OSs.

Screenshot of my Eclipse 4.5-based RCP app showing localized key names for shortcuts