Révision 1762
| tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/views/RConsole.java (revision 1762) | ||
|---|---|---|
| 38 | 38 |
import org.eclipse.ui.PlatformUI; |
| 39 | 39 |
import org.eclipse.ui.part.ViewPart; |
| 40 | 40 |
import org.txm.Toolbox; |
| 41 |
import org.txm.core.engines.Engine; |
|
| 41 | 42 |
import org.txm.core.engines.EngineType; |
| 43 |
import org.txm.core.engines.EnginesManager; |
|
| 42 | 44 |
import org.txm.rcp.IImageKeys; |
| 43 | 45 |
import org.txm.statsengine.r.core.RWorkspace; |
| 44 | 46 |
import org.txm.statsengine.r.core.exceptions.RWorkspaceException; |
| ... | ... | |
| 229 | 231 |
} |
| 230 | 232 |
|
| 231 | 233 |
public void connectToRWorkspace() {
|
| 232 |
if (!readyToDisplay && Toolbox.getEngineManager(EngineType.STATS).isCurrentEngineAvailable()) {
|
|
| 234 |
EnginesManager<? extends Engine> engine = Toolbox.getEngineManager(EngineType.STATS); |
|
| 235 |
if (!readyToDisplay&& engine != null && engine.isCurrentEngineAvailable()) {
|
|
| 233 | 236 |
RWorkspace rw = null; |
| 234 | 237 |
Log.fine(RUIMessages.connectingRConsoleToRWorkspaceStdoutAndStderr); |
| 238 |
|
|
| 235 | 239 |
try {
|
| 236 | 240 |
rw = RWorkspace.getRWorkspaceInstance(); |
| 237 | 241 |
if (rw == null) return; |
| tmp/org.txm.utils/src/org/txm/utils/StreamHog.java (revision 1762) | ||
|---|---|---|
| 99 | 99 |
} |
| 100 | 100 |
|
| 101 | 101 |
printMessage(line); |
| 102 |
Log.fine(this.getName()+">" + line); //$NON-NLS-1$
|
|
| 102 |
Log.info(this.getName()+">" + line); //$NON-NLS-1$
|
|
| 103 | 103 |
lastline = line; |
| 104 | 104 |
} |
| 105 | 105 |
} catch (Throwable e) {
|
| tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java (revision 1762) | ||
|---|---|---|
| 1521 | 1521 |
if (logging && inputLogger != null ) inputLogger.printMessage(expr); //$NON-NLS-1$ |
| 1522 | 1522 |
lastSafeevalExpr = expr; |
| 1523 | 1523 |
|
| 1524 |
expr = "try({" + expr + "}, silent=TRUE)";
|
|
| 1524 |
//expr = "try({" + expr + "}, silent=FALSE)";
|
|
| 1525 | 1525 |
|
| 1526 |
if(this.isLoggingEvalCommandLines()) {
|
|
| 1526 |
if(isLoggingEvalCommandLines()) {
|
|
| 1527 | 1527 |
//TODO Log.finest("R safeEval: " + expr, 8); //$NON-NLS-1$
|
| 1528 |
Log.finest("R safeEval: " + expr); //$NON-NLS-1$
|
|
| 1528 |
Log.info("R safeEval: " + expr); //$NON-NLS-1$
|
|
| 1529 | 1529 |
} |
| 1530 | 1530 |
|
| 1531 | 1531 |
REXP r = null; |
| ... | ... | |
| 1623 | 1623 |
|
| 1624 | 1624 |
String out = null; |
| 1625 | 1625 |
try {
|
| 1626 |
if(this.isLoggingEvalCommandLines()) {
|
|
| 1627 |
Log.finest("R userEval: " + exp ); //$NON-NLS-1$
|
|
| 1626 |
if (isLoggingEvalCommandLines()) {
|
|
| 1627 |
Log.info("R userEval: " + exp ); //$NON-NLS-1$
|
|
| 1628 | 1628 |
} |
| 1629 | 1629 |
//out = connection.eval("paste(capture.output(print(" + trybegin + trybegin +"("+ exp+")" + tryend + tryend + ")),collapse=\"\\n\")").asString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
| 1630 | 1630 |
//String cmd = "paste(capture.output(print(" + trybegin + "("+ exp+")" + tryend + ")),collapse=\"\\n\")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
| tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/StartRserve.java (revision 1762) | ||
|---|---|---|
| 145 | 145 |
|
| 146 | 146 |
//Log.info(Messages.StartRserve_0+Arrays.toString(cmdline)); |
| 147 | 147 |
StreamHog errStream = new StreamHog(rProcess.getErrorStream(), RWorkspace.isLoggingEvalCommandLines()); |
| 148 |
errStream.setName("R-err");
|
|
| 148 | 149 |
StreamHog inStream = new StreamHog(rProcess.getInputStream(), RWorkspace.isLoggingEvalCommandLines()); |
| 150 |
inStream.setName("R");
|
|
| 149 | 151 |
RWorkspace.getRWorkspaceInstance().registerLogger(errStream, inStream); |
| 150 | 152 |
|
| 151 | 153 |
//if (!debug && !isWindows) Rserveprocess.waitFor(); |
Formats disponibles : Unified diff