import org.simantics.databoard.util.URIStringUtils;
import org.simantics.structural.synchronization.protocol.SynchronizationEventHandler;
+import org.simantics.structural.synchronization.utils.ComponentBase;
+import org.simantics.structural.synchronization.utils.Solver;
+import org.slf4j.Logger;
abstract public class ReferenceResolverBase<T extends ComponentBase<T>> {
String message = "Couldn't resolve " + connectionPoint +
", because child " + segment + " does not exist.";
if(eventHandler == null)
- System.err.println(message);
+ getLogger().warn(message);
else
eventHandler.reportProblem(message);
return;
private static void fullPathOfComponent(StringBuilder b, ComponentBase<?> component) {
if(component != null) {
- fullPathOfComponent(b, component.parent);
+ fullPathOfComponent(b, component.getParent());
b.append("/").append(component.solverComponentName);
}
}
}
});
Collections.sort(pending);
- System.out.println("Still pending:");
+ getLogger().info("Still pending:");
for(String p : pending)
- System.out.println(" " + p);
+ getLogger().info(" " + p);
}
}
public void resolvePendingSelfReferences() {
// Can be customized in subclasses
}
-
+
+ public abstract Logger getLogger();
}