Révision 1777
tmp/org.txm.chartsengine.r.core/src/org/txm/stat/engine/r/RWorkspaceRenderer.java (revision 1777) | ||
---|---|---|
162 | 162 |
} |
163 | 163 |
|
164 | 164 |
// ok, so the device should be fine - let's plot |
165 |
workspace.voidEval(expr); |
|
165 |
boolean state = workspace.voidEval(expr);
|
|
166 | 166 |
workspace.voidEval("dev.off()"); //$NON-NLS-1$ |
167 |
|
|
168 |
if(!state) { |
|
169 |
file.delete(); |
|
170 |
return null; |
|
171 |
} |
|
172 |
else { |
|
173 |
return file; |
|
174 |
} |
|
167 | 175 |
} |
168 | 176 |
catch (Exception e) { |
169 | 177 |
e.printStackTrace(); |
170 | 178 |
return null; |
171 | 179 |
} |
172 |
|
|
173 |
return file; |
|
174 | 180 |
} |
175 | 181 |
|
176 | 182 |
/** |
tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java (revision 1777) | ||
---|---|---|
1670 | 1670 |
* @param exp the exp |
1671 | 1671 |
* @throws RWorkspaceException the r workspace exception |
1672 | 1672 |
*/ |
1673 |
public void voidEval(String exp) throws RWorkspaceException {
|
|
1673 |
public boolean voidEval(String exp) throws RWorkspaceException {
|
|
1674 | 1674 |
|
1675 | 1675 |
if (exp.endsWith(";")) //$NON-NLS-1$ |
1676 | 1676 |
exp = exp.substring(0, exp.length()-1); |
1677 | 1677 |
|
1678 | 1678 |
try { |
1679 | 1679 |
safeEval(exp); |
1680 |
} catch (Exception e) { |
|
1680 |
} |
|
1681 |
catch (Exception e) { |
|
1681 | 1682 |
org.txm.utils.logger.Log.printStackTrace(e); |
1683 |
return false; |
|
1682 | 1684 |
} |
1685 |
return true; |
|
1683 | 1686 |
} |
1684 | 1687 |
|
1685 | 1688 |
|
Formats disponibles : Unified diff