import java.util.Set;
import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.osgi.framework.Bundle;
import org.simantics.Simantics;
import org.simantics.databoard.Bindings;
import org.simantics.modeling.internal.Activator;
import org.simantics.utils.FileUtils;
import org.simantics.utils.datastructures.Pair;
+import org.slf4j.LoggerFactory;
/**
* @author Antti Villberg
*/
public class CompilePGraphs {
+ private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(CompilePGraphs.class);
+
public static interface UserAgent {
void reportProblems(CompilationResult result);
}
}
public static void compilePGraphs(Resource r, UserAgent userAgent) throws IOException, DatabaseException {
+ compilePGraphs(r, userAgent, new NullProgressMonitor());
+ }
+
+ public static void compilePGraphs(Resource r, UserAgent userAgent, IProgressMonitor monitor) throws IOException, DatabaseException {
final Collection<ISource> sources = new ArrayList<>();
Collection<TransferableGraph1> dependencies = new ArrayList<>();
if (name == null) name = id;
if (name.equals(thisOntology.first))
continue;
+ if (name.contains("ModelBroker"))
+ continue;
URL tg = b.getEntry("/graph.tg");
if (tg == null) continue;
File f = url2file(FileLocator.resolve(tg), b.getSymbolicName());
}
});
}
+
+ // Delete index to get rid of floating old instances of the same ontology
+// DatabaseIndexing.deleteAllIndexes();
}
private static File extractLib(URL libURL, String libName) throws FileNotFoundException, IOException {
Logger.defaultLogError(e);
}
} else {
- System.err.println("Unsupported URL protocol '" + url + "' for FastLZ native library file '" + fileName);
+ LOGGER.warn("Unsupported URL protocol");
}
return null;
}