Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #142 from tomas-pluskal/rtest
Browse files Browse the repository at this point in the history
Reverting last Gauthier's commit to Rsession.java
  • Loading branch information
tomas-pluskal committed Dec 14, 2015
2 parents 92c9b17 + 5fb8279 commit a536ade
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/main/java/net/sf/mzmine/util/R/Rsession/Rsession.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@ public class Rsession implements Logger {
private static String tmpDir = null;
public static final Object R_SESSION_SEMAPHORE = new Object();
public static ArrayList<Integer> PORTS_REG = new ArrayList<Integer>();
//** GLG HACK: Logging fix **//
// No sink file (Passed to false) a lot faster not to sink the output
// We never need this feature in MZmine anyway...
boolean SINK_OUTPUT = false; //true;
// GLG HACK: fixed sink file in case of multiple instances
// (Appending the port number of the instance to file name)
String SINK_FILE_BASE = ".Rout";
String SINK_FILE = null;
String lastOuput = "";


void cleanupListeners() {
if (loggers != null) {
Expand Down Expand Up @@ -499,9 +489,6 @@ public Rsession(final Logger console, RserverConf serverconf,

loggers = new LinkedList<Logger>();
loggers.add(console);

// Make sink file specific to current Rserve instance
SINK_FILE = SINK_FILE_BASE + "-" + serverconf.port;

startup();
}
Expand Down Expand Up @@ -624,8 +611,6 @@ void begin(boolean tryLocal) {
// int port = (rServeConf.port != -1) ? rServeConf.port :
// RserverConf.getNewAvailablePort();
if (port_tmp != port) {
// Keep sink file specific to current Rserve instance
SINK_FILE = SINK_FILE_BASE + "-" + port;
println("WARNING: Changed the original requested port from "
+ port_tmp + " to " + port + "!", Level.WARNING);
}
Expand Down Expand Up @@ -1146,6 +1131,10 @@ public boolean silentlyVoidEval(String expression) {
return silentlyVoidEval(expression, TRY_MODE_DEFAULT);
}

boolean SINK_OUTPUT = true;
String SINK_FILE = ".Rout";

String lastOuput = "";

public String getLastOutput() {
if (!SINK_OUTPUT) {
Expand Down

0 comments on commit a536ade

Please sign in to comment.