import org.simantics.db.common.request.WriteRequest;
import org.simantics.db.common.request.WriteResultRequest;
import org.simantics.db.common.utils.ListUtils;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.common.utils.OrderedSetUtils;
import org.simantics.db.common.utils.VersionInfo;
import org.simantics.utils.datastructures.Triple;
import org.simantics.utils.datastructures.hints.HintContext;
import org.simantics.utils.ui.dialogs.ListDialog;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Hannu Niemistö
*/
public class ModelingUtils {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ModelingUtils.class);
+
private ReadGraph g;
private WriteGraph wg;
public Layer0 b;
} catch (Exception e) {
- Logger.defaultLogError(e);
+ LOGGER.error("Model import failed", e);
}
}
}
public static void untrackDependencies() {
- untrackDependencies(Simantics.getSession());
+ Session s = Simantics.peekSession();
+ if (s != null)
+ untrackDependencies(s);
}
public static void untrackDependencies(RequestProcessor processor) {
});
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("untrackDependenices failed", e);
}
}
});
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("trackDependenices failed", e);
}
}
return advisor.getRoot();
} catch (Throwable t) {
- Logger.defaultLogError("Unexpected exception while importing diagram template.", t);
+ LOGGER.error("Unexpected exception while importing diagram template.", t);
} finally {
}
Variant draftStatus = dc.metadata.get(DraftStatusBean.EXTENSION_KEY);
return MigrationUtils.importSharedOntology(Simantics.getSession(), tg, draftStatus == null);
} catch (Exception e) {
- Logger.defaultLogError(e);
+ LOGGER.error("importSharedOntologyWithResult failed", e);
throw e;
}
}