Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsShow dialog on startup in JFace application
https://www.eclipse.org/forums/index.php/mv/msg/1075392/1725673/#msg_1725673
I have a JFace application and want to have the GUI in different languages. For that I have a flag in a config file. Dependding on this flag I later load the ResourceBundle.
Now I have the problem that I'm adding a SWT.Show listener to the shell and then load the config file. But this doesn't work because the createContents() method of the ApplicationWindow is called before the show event triggers so all controls will appear in the default language.
Then I thought to move the config loading process to the createContents() method but there's another point to consider: The user should be able to load config files from several locations. So I also built a selection dialog in which the user can choose the right file and this window has to be opened directly on startup.
So my workflow is now as follows:
Immediately after starting the program, the selection dialog has to popup. In this dialog the user can choose the right config file. If the user clicked the ok button then the main window is opened and the GUI controls should get my internationalized labels. But if the user clicked the cancel button then the program should be exited.
So far so well, but I have some problems to find the right way to realize this workflow or rather which method is the best one to place the code?
]]>Kay Schröer2016-03-06T15:36:51-00:00