-package org.simantics.browsing.ui.swt;
+package org.simantics.browsing.ui.common.state;
import java.io.File;
import java.nio.file.Files;
import org.simantics.browsing.ui.NodeContext;
import org.simantics.browsing.ui.StatePersistor;
import org.simantics.databoard.util.StringUtil;
-import org.simantics.db.common.utils.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Tuukka Lehtonen
*/
public class IdentifiedStatePersistor implements StatePersistor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(IdentifiedStatePersistor.class);
+
protected final String id;
public IdentifiedStatePersistor(String id) {
if (bean != null && memento != null)
Files.write(memento, bean.serialize());
} catch (Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("Failed to serialize ExplorerState " + state, t);
}
}
stateBean.deserialize( Files.readAllBytes(path) );
return toState(stateBean);
} catch (Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("Failed to deserialize ExplorerState from " + path, t);
return ExplorerState.EMPTY;
}
}