Revision a1ce478d
Added by Alexander Oppermann over 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageEditorPreferencePage.java | ||
---|---|---|
13 | 13 |
import java.io.IOException; |
14 | 14 |
|
15 | 15 |
import org.apache.commons.lang.StringUtils; |
16 |
import org.eclipse.jface.dialogs.MessageDialog; |
|
16 | 17 |
import org.eclipse.jface.preference.PreferencePage; |
17 | 18 |
import org.eclipse.swt.SWT; |
18 | 19 |
import org.eclipse.swt.custom.CCombo; |
... | ... | |
25 | 26 |
import org.eclipse.swt.widgets.Label; |
26 | 27 |
import org.eclipse.ui.IWorkbench; |
27 | 28 |
import org.eclipse.ui.IWorkbenchPreferencePage; |
29 |
import org.eclipse.ui.PlatformUI; |
|
28 | 30 |
|
29 | 31 |
/** |
30 | 32 |
* @author n.hoffmann |
... | ... | |
134 | 136 |
public boolean performOk() { |
135 | 137 |
try { |
136 | 138 |
preferencesUtil.writePropertyToConfigFile(combo.getSelectionIndex()); |
139 |
boolean result = MessageDialog.openConfirm(getShell(), "Please Restart", "The Taxonomic Editor has to restart now, in order to complete the language switch.\nDo you want to restart now?"); |
|
140 |
if(result){ |
|
141 |
//Press Ok |
|
142 |
PlatformUI.getWorkbench().restart(); |
|
143 |
} |
|
137 | 144 |
} catch (IOException e) { |
138 | 145 |
e.printStackTrace(); |
139 | 146 |
} |
140 | 147 |
return super.performOk(); |
141 | 148 |
} |
149 |
|
|
142 | 150 |
} |
Also available in: Unified diff
Fixed Ticket #4535