import org.simantics.graph.representation.old.OldValue1;
import org.simantics.graph.store.GraphStore;
import org.simantics.graph.store.IdentityStore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-import gnu.trove.list.array.TIntArrayList;
-import gnu.trove.map.hash.TIntIntHashMap;
import gnu.trove.set.hash.TIntHashSet;
public class GraphRefactoringUtils {
-
+ private static final Logger LOGGER = LoggerFactory.getLogger(GraphRefactoringUtils.class);
/**
* Moves an external resource. Returns true if did something.
* @param parentsAffected
// Find parent id
int toParentId = ids.createPathToId(to.parent);
if(ids.hasChild(toParentId, to.name)) {
- System.err.println("refactor statements from " + from + " to " + to);
+ LOGGER.info("refactor statements from " + from + " to " + to);
//throw new GraphRefactoringException("External reference to " + to + " already exists.");
int toId = ids.pathToId(to);
int[] statements = tg.statements;
if(!(rule.to instanceof PathChild))
throw new GraphRefactoringException("Invalid target URI " + rule.to);
if(!moveExternal(tg, ids, rule.from, (PathChild)rule.to, parentsAffected))
- System.err.println("Didn't find " + rule.from);
+ LOGGER.warn("Didn't find " + rule.from);
}
}