Skip to content
Snippets Groups Projects
Commit 009e872b authored by René Schöne's avatar René Schöne
Browse files

Fix access to env variables.

- all variabels of driver(s) are non-static now
parent 18f1597b
No related branches found
No related tags found
1 merge request!1All4one relast
......@@ -15,16 +15,16 @@ import java.nio.file.Path;
*/
public abstract class AbstractLiveContestDriver {
private static String ChangePath;
private static String RunIndex;
private static int Sequences;
private static String Tool;
private static String ChangeSet;
private static String Query;
private String ChangePath;
private String RunIndex;
private int Sequences;
private String Tool;
private String ChangeSet;
private String Query;
private static long stopwatch;
private long stopwatch;
private static Solution solution;
private Solution solution;
private boolean traceEvents;
private Path pathOfEventFile;
......@@ -70,19 +70,19 @@ public abstract class AbstractLiveContestDriver {
}
}
static String getChangePath() {
String getChangePath() {
return ChangePath;
}
static Solution getSolution() {
Solution getSolution() {
return solution;
}
static String getChangeSet() {
String getChangeSet() {
return ChangeSet;
}
static String getQuery() {
String getQuery() {
return Query;
}
......
......@@ -30,15 +30,16 @@ import java.util.Map;
public class LiveContestDriverEMF extends AbstractLiveContestDriver {
public static void main(String[] args) throws IOException {
// Path filename = Paths.get(String.format("events-emf-%s-%s.csv", getChangeSet(), getQuery()));
// new LiveContestDriverEMF().enableTracing(filename).mainImpl();
new LiveContestDriverEMF().mainImpl();
LiveContestDriverEMF driver = new LiveContestDriverEMF();
// Path filename = Paths.get(String.format("events-emf-%s-%s.csv", driver.getChangeSet(), driver.getQuery()));
// driver.enableTracing(filename).mainImpl();
driver.mainImpl();
}
private static ResourceSet repository;
private static Translator translator;
private ResourceSet repository;
private Translator translator;
private static Object loadFile(String path) throws IOException {
private Object loadFile(String path) throws IOException {
repository.getURIConverter().getURIMap().put(URI.createFileURI(path), URI.createFileURI(getChangePath() + "/" + path));
Resource mRes = repository.createResource(URI.createFileURI(getChangePath() + "/" + path));
System.out.println(mRes);
......
......@@ -20,8 +20,9 @@ import java.nio.file.Paths;
*/
public class LiveContestDriverXml extends AbstractLiveContestDriver {
public static void main(String[] args) {
Path filename = Paths.get(String.format("events-xml-%s-%s.csv", getChangeSet(), getQuery()));
new LiveContestDriverXml().enableTracing(filename).mainImpl();
LiveContestDriverXml driver = new LiveContestDriverXml();
Path filename = Paths.get(String.format("events-xml-%s-%s.csv", driver.getChangeSet(), driver.getQuery()));
driver.enableTracing(filename).mainImpl();
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment