Révision 3871
TXM/trunk/bundles/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java (revision 3871) | ||
---|---|---|
86 | 86 |
public File exportResultToFile(ChartResult result, File file, int imageWidth, int imageHeight, String outputFormat) { |
87 | 87 |
Object chart = result.getChart(); |
88 | 88 |
if (chart == null) { |
89 |
Log.warning("Error: no chart to export (null). The result was never computed?");
|
|
89 |
Log.warning(Messages.ErrorNoChartToExport);
|
|
90 | 90 |
return null; |
91 | 91 |
} |
92 | 92 |
|
93 | 93 |
if (!(chart instanceof File)) { |
94 |
Log.warning("Error: RChartEngine only manage File charts: " + chart);
|
|
94 |
Log.warning(Messages.RChartEngineOnlyManageFileChartsP0 + chart);
|
|
95 | 95 |
return null; |
96 | 96 |
} |
97 | 97 |
|
... | ... | |
103 | 103 |
return exportChartToFile(chart, file, outputFormat, imageWidth, imageHeight); |
104 | 104 |
} |
105 | 105 |
else { |
106 |
Log.warning(NLS.bind("Error: RChartEngine export format ({0}) cannot differ from the current display format ({1})", outputFormat, this.getOutputFormat()));
|
|
106 |
Log.warning(NLS.bind(Messages.RChartEngineExportFormatP0CannotDiffferFromTheCurrent, outputFormat, this.getOutputFormat()));
|
|
107 | 107 |
} |
108 | 108 |
return null; |
109 | 109 |
} |
TXM/trunk/bundles/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/preferences/RChartsEnginePreferences.java (revision 3871) | ||
---|---|---|
15 | 15 |
public class RChartsEnginePreferences extends TXMPreferences { |
16 | 16 |
|
17 | 17 |
|
18 |
public final static String PREFERENCES_PREFIX = RChartsEngine.NAME + "_"; |
|
18 |
public final static String PREFERENCES_PREFIX = RChartsEngine.NAME + "_"; //$NON-NLS-1$
|
|
19 | 19 |
|
20 | 20 |
|
21 | 21 |
public static final String OUTPUT_FORMAT = PREFERENCES_PREFIX + "output_format"; //$NON-NLS-1$ |
TXM/trunk/bundles/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/messages.properties (revision 3871) | ||
---|---|---|
1 |
ErrorNoChartToExport=Error: no chart to export (null). The result was never computed? |
|
2 |
ErrorRChartWasNullInP0=Error: R chart was null in: |
|
3 |
RChartEngineExportFormatP0CannotDiffferFromTheCurrent=Error: RChartEngine export format ({0}) cannot differ from the current display format ({1}) |
|
4 |
RChartEngineOnlyManageFileChartsP0=Error: RChartEngine only manage File charts: |
|
0 | 5 |
TXM/trunk/bundles/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartCreator.java (revision 3871) | ||
---|---|---|
55 | 55 |
createChart(result, (File) chart); |
56 | 56 |
} |
57 | 57 |
else { |
58 |
Log.warning("Error: R chart was null in: " + result);
|
|
58 |
Log.warning(Messages.ErrorRChartWasNullInP0 + result);
|
|
59 | 59 |
} |
60 | 60 |
} |
61 | 61 |
|
TXM/trunk/bundles/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/Messages.java (revision 3871) | ||
---|---|---|
1 |
package org.txm.chartsengine.r.core; |
|
2 |
|
|
3 |
import org.eclipse.osgi.util.NLS; |
|
4 |
import org.txm.utils.messages.Utf8NLS; |
|
5 |
|
|
6 |
public class Messages extends NLS { |
|
7 |
|
|
8 |
public static String ErrorNoChartToExport; |
|
9 |
public static String ErrorRChartWasNullInP0; |
|
10 |
public static String RChartEngineExportFormatP0CannotDiffferFromTheCurrent; |
|
11 |
public static String RChartEngineOnlyManageFileChartsP0; |
|
12 |
|
|
13 |
static { |
|
14 |
// initialize resource bundle |
|
15 |
Utf8NLS.initializeMessages(Messages.class); |
|
16 |
} |
|
17 |
|
|
18 |
private Messages() { |
|
19 |
} |
|
20 |
} |
|
0 | 21 |
TXM/trunk/bundles/org.txm.chartsengine.r.core/src/org/txm/stat/engine/r/Messages.java (revision 3871) | ||
---|---|---|
1 |
package org.txm.stat.engine.r; |
|
2 |
|
|
3 |
import org.eclipse.osgi.util.NLS; |
|
4 |
|
|
5 |
public class Messages extends NLS { |
|
6 |
private static final String BUNDLE_NAME = Messages.class.getPackageName() + ".messages"; //$NON-NLS-1$ |
|
7 |
public static String ErrorCanNotWriteInFileP0; |
|
8 |
static { |
|
9 |
// initialize resource bundle |
|
10 |
NLS.initializeMessages(BUNDLE_NAME, Messages.class); |
|
11 |
} |
|
12 |
|
|
13 |
private Messages() { |
|
14 |
} |
|
15 |
} |
|
0 | 16 |
TXM/trunk/bundles/org.txm.chartsengine.r.core/src/org/txm/stat/engine/r/RWorkspaceRenderer.java (revision 3871) | ||
---|---|---|
109 | 109 |
return null; |
110 | 110 |
} |
111 | 111 |
if (!file.canWrite()) { |
112 |
Log.severe(TXMCoreMessages.bind("** Error: can not write in file {0}.", file));
|
|
112 |
Log.severe(TXMCoreMessages.bind(Messages.ErrorCanNotWriteInFileP0, file));
|
|
113 | 113 |
} |
114 | 114 |
String devicename = device.getName(); |
115 | 115 |
|
... | ... | |
129 | 129 |
} |
130 | 130 |
|
131 | 131 |
try { |
132 |
if (devicename.equals("devSVG")) { |
|
133 |
workspace.voidEval("library(RSvgDevice);"); |
|
132 |
if (devicename.equals("devSVG")) { //$NON-NLS-1$
|
|
133 |
workspace.voidEval("library(RSvgDevice);"); //$NON-NLS-1$
|
|
134 | 134 |
} |
135 | 135 |
|
136 | 136 |
|
TXM/trunk/bundles/org.txm.chartsengine.r.core/src/org/txm/stat/engine/r/RDevice.java (revision 3871) | ||
---|---|---|
72 | 72 |
public String getCurrentSVGDevice() { |
73 | 73 |
//TODO: temporary commented |
74 | 74 |
String dev = null; //Toolbox.getParam("r_svg_device"); |
75 |
if (dev == null || dev.length() == 0) dev = "svg"; |
|
75 |
if (dev == null || dev.length() == 0) dev = "svg"; //$NON-NLS-1$
|
|
76 | 76 |
return dev; |
77 | 77 |
} |
78 | 78 |
|
TXM/trunk/bundles/org.txm.chartsengine.r.core/src/org/txm/stat/engine/r/messages.properties (revision 3871) | ||
---|---|---|
1 |
ErrorCanNotWriteInFileP0=** Error: can not write in file {0}. |
|
0 | 2 |
Formats disponibles : Unified diff