import org.springframework.remoting.RemoteConnectFailureException;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
return;
}
previousT = t;
+
+
+
// NOTE : Currently we only allow RuntimeExceptions since
// allowing all kinds of exceptions would also include
// those in generated status objects coming from from logging triggers
t,
true);
+ } else if (t != null && ("Widget is disposed".equals(t.getMessage()))){
+ MessagingUtils.warn(this.getClass(), t.getMessage());
+ if (PreferencesUtil.isDebugMode()){
+ MessagingUtils.warningDialog("Widget is disposed", null, status);
+ }
+ }{
+
}
}
}
* @return
*/
private static String getPreferenceKey(ICdmBase cdmBase) {
- cdmBase = (ICdmBase) HibernateProxyHelper.deproxy(cdmBase);
+ cdmBase = HibernateProxyHelper.deproxy(cdmBase);
String key = cdmBase.getClass().getName().concat(".")
.concat(cdmBase.getUuid().toString());
* @return
*/
public static String getPreferenceKey(ISimpleTerm simpleTerm) {
- simpleTerm = (ISimpleTerm) HibernateProxyHelper.deproxy(simpleTerm);
+ simpleTerm = HibernateProxyHelper.deproxy(simpleTerm);
String key = simpleTerm.getClass().getName().concat(".")
.concat(simpleTerm.getUuid().toString());
if (key.contains("javassist")) {
* @return
*/
public static String getPreferenceKey(IDefinedTerm definedTerm) {
- definedTerm = (IDefinedTerm) HibernateProxyHelper.deproxy(definedTerm);
+ definedTerm = HibernateProxyHelper.deproxy(definedTerm);
String key = definedTerm.getClass().getName().concat(".")
.concat(definedTerm.getUuid().toString());
if (key.contains("javassist")) {
private static String getMarkerTypeEditingPreferenceKey(
MarkerType markerType) {
- markerType = (MarkerType) HibernateProxyHelper.deproxy(markerType);
+ markerType = HibernateProxyHelper.deproxy(markerType);
return markerType.getClass().getName() + EDIT_MARKER_TYPE_PREFIX;
}
ctrl.setEnabled(enabled);
}
}
-
+
/**
* <p>
* getSortRanksNaturally
public static boolean getSortNodesNaturally() {
return getPreferenceStore().getBoolean(SORT_NODES_NATURALLY);
}
-
+
/**
* <p>
* setSortRanksNaturally
getPreferenceStore().setValue(SORT_NODES_NATURALLY, selection);
}
-
+
/**
* <p>
* getSortRanksNaturally
public static boolean getSortNodesStrictlyAlphabetically() {
return getPreferenceStore().getBoolean(SORT_NODES_ALPHABETICALLY);
}
-
+
/**
* <p>
* setSortRanksNaturally
*/
public static boolean isStoreNavigatorState() {
return getPreferenceStore().getBoolean(RESTORE_NAVIGATOR_STATE);
-
+
}
-
+
/**
* <p>
* setStoreNavigatorState
*/
public static void setStoreNavigatorState(boolean selection) {
getPreferenceStore().setValue(RESTORE_NAVIGATOR_STATE, selection);
-
+
}
-
+
+ /**
+ * @return
+ */
+ public static boolean isDebugMode() {
+ return getPreferenceStore().getBoolean(IS_DEBUG_MODE);
+ }
+ public static void setDebugMode(boolean selection) {
+ getPreferenceStore().setValue(IS_DEBUG_MODE, selection);
+ }
}