import org.simantics.db.layer0.adapter.DropActionFactory;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
-import org.simantics.diagram.Logger;
import org.simantics.scl.runtime.function.Function3;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class SCLDropAction implements DropActionFactory {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SCLDropAction.class);
+
final private Resource rule;
public SCLDropAction(ReadGraph graph, Resource rule) throws DatabaseException {
Function3<Resource, Object, Integer, Object> function = Simantics.getSession().syncRequest(new RuleFunctionRequest(rule));
function.apply(target, source, operation);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("SCLDropActionRunnable failed to request/apply RuleFunction {}", rule, e);
}
}