} else if (t != null && ("Widget is disposed".equals(t.getMessage()))){
MessagingUtils.warn(this.getClass(), t);
- if (PreferencesUtil.isDebugMode()){
+ if (PreferencesUtil.isShowUpWidgetIsDisposedMessages()){
MessagingUtils.errorDialog("Widget is disposed",
null,
MessagingUtils.WIDGET_IS_DISPOSED_MESSAGE,
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.preference;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * @author k.luther
+ * @date 01.04.2016
+ *
+ */
+public class DebugPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(PreferencesUtil.getPreferenceStore());
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ protected void createFieldEditors() {
+ addField(new BooleanFieldEditor(IPreferenceKeys.IS_SHOW_UP_WIDGET_IS_DISPOSED,
+ "Show up widget is disposed error messages.",
+ getFieldEditorParent()));
+
+ }
+
+}
public static final String DEFAULT_LANGUAGE_EDITOR = "eu.etaxonomy.taxeditor.default.language";
- public static final String IS_DEBUG_MODE = "eu.etaxonomy.taxeditor.idDebugMode";
+ public static final String IS_SHOW_UP_WIDGET_IS_DISPOSED = "eu.etaxonomy.taxeditor.isShowUpWidgetIsDisposed";
/**
* Key for the saved P2 repositories
/**
* @return
*/
- public static boolean isDebugMode() {
- return getPreferenceStore().getBoolean(IS_DEBUG_MODE);
+ public static boolean isShowUpWidgetIsDisposedMessages() {
+ return getPreferenceStore().getBoolean(IS_SHOW_UP_WIDGET_IS_DISPOSED);
}
- public static void setDebugMode(boolean selection) {
- getPreferenceStore().setValue(IS_DEBUG_MODE, selection);
+ public static void setShowUpWidgetIsDisposedMessages(boolean selection) {
+ getPreferenceStore().setValue(IS_SHOW_UP_WIDGET_IS_DISPOSED, selection);
}
}