Révision 3855
TXM/trunk/bundles/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RScriptEngine.java (revision 3855) | ||
---|---|---|
21 | 21 |
public class RScriptEngine extends ScriptEngine { |
22 | 22 |
|
23 | 23 |
public RScriptEngine() { |
24 |
super("R", "R"); |
|
24 |
super("R", "R"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
25 | 25 |
} |
26 | 26 |
|
27 | 27 |
@Override |
TXM/trunk/bundles/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/InstallRUserPart.java (revision 3855) | ||
---|---|---|
12 | 12 |
@Override |
13 | 13 |
public boolean do_install(Workspace workspace) { |
14 | 14 |
File txmhomedir = new File(Toolbox.getTxmHomePath()); |
15 |
File dir = new File(txmhomedir, "R/libraries"); |
|
15 |
File dir = new File(txmhomedir, "R/libraries"); //$NON-NLS-1$
|
|
16 | 16 |
dir.mkdirs(); |
17 | 17 |
|
18 |
File scriptsDirectory = new File(dir, "scripts"); |
|
18 |
File scriptsDirectory = new File(dir, "scripts"); //$NON-NLS-1$
|
|
19 | 19 |
scriptsDirectory.mkdirs(); |
20 |
BundleUtils.copyFiles("org.txm.statsengine.r.core", "", "", "R/", scriptsDirectory, true); |
|
20 |
BundleUtils.copyFiles("org.txm.statsengine.r.core", "", "", "R/", scriptsDirectory, true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
21 | 21 |
|
22 | 22 |
return dir.exists() && scriptsDirectory.exists(); |
23 | 23 |
} |
24 | 24 |
|
25 | 25 |
@Override |
26 | 26 |
public String getName() { |
27 |
return "R (org.txm.statengine.r.core)"; |
|
27 |
return "R (org.txm.statengine.r.core)"; //$NON-NLS-1$
|
|
28 | 28 |
} |
29 | 29 |
|
30 | 30 |
@Override |
31 | 31 |
public boolean needsReinstall(Workspace workspace) { |
32 | 32 |
File txmhomedir = new File(Toolbox.getTxmHomePath()); |
33 |
File dir = new File(txmhomedir, "R/libraries"); |
|
33 |
File dir = new File(txmhomedir, "R/libraries"); //$NON-NLS-1$
|
|
34 | 34 |
return !dir.exists(); |
35 | 35 |
} |
36 | 36 |
} |
TXM/trunk/bundles/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/StartRserve.java (revision 3855) | ||
---|---|---|
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 |
errStream.setName("R-err"); //$NON-NLS-1$
|
|
149 | 149 |
StreamHog inStream = new StreamHog(rProcess.getInputStream(), RWorkspace.isLoggingEvalCommandLines()); |
150 |
inStream.setName("R"); |
|
150 |
inStream.setName("R"); //$NON-NLS-1$
|
|
151 | 151 |
RWorkspace.getRWorkspaceInstance().registerLogger(errStream, inStream); |
152 | 152 |
|
153 | 153 |
// if (!debug && !isWindows) Rserveprocess.waitFor(); |
... | ... | |
184 | 184 |
|
185 | 185 |
attempts--; |
186 | 186 |
} |
187 |
Log.fine("R connection attemps done."); |
|
187 |
Log.fine("R connection attemps done."); //$NON-NLS-1$
|
|
188 | 188 |
return false; |
189 | 189 |
} |
190 | 190 |
|
... | ... | |
289 | 289 |
|
290 | 290 |
|
291 | 291 |
public static void main(String[] args) { |
292 |
System.out.println("result=" + checkLocalRserve(8212, false, "", "")); |
|
292 |
System.out.println("result=" + checkLocalRserve(8212, false, "", "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|
293 | 293 |
try { |
294 |
System.out.println("Start RServe"); |
|
295 |
RConnection c = new RConnection("localhost", 8212); |
|
296 |
System.out.println("Stop RServe"); |
|
297 |
c.eval("print(1+1)"); |
|
298 |
c.eval("2+2"); |
|
294 |
System.out.println("Start RServe"); //$NON-NLS-1$
|
|
295 |
RConnection c = new RConnection("localhost", 8212); //$NON-NLS-1$
|
|
296 |
System.out.println("Stop RServe"); //$NON-NLS-1$
|
|
297 |
c.eval("print(1+1)"); //$NON-NLS-1$
|
|
298 |
c.eval("2+2"); //$NON-NLS-1$
|
|
299 | 299 |
c.shutdown(); |
300 |
System.out.println("Done"); |
|
300 |
System.out.println("Done"); //$NON-NLS-1$
|
|
301 | 301 |
} |
302 | 302 |
catch (Exception x) { |
303 | 303 |
x.printStackTrace(); |
TXM/trunk/bundles/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/exceptions/RWorkspaceException.java (revision 3855) | ||
---|---|---|
75 | 75 |
} |
76 | 76 |
|
77 | 77 |
public String getMessage() { |
78 |
return "R error: "+super.getMessage(); |
|
78 |
return "R error: "+super.getMessage(); //$NON-NLS-1$
|
|
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
} |
TXM/trunk/bundles/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java (revision 3855) | ||
---|---|---|
350 | 350 |
// Updating the main frequency table header |
351 | 351 |
String text = TXMCoreMessages.common_frequency; |
352 | 352 |
if (this.getResult().hasBeenComputedOnce()) { |
353 |
text += " " + SpecificitiesUIMessages.t + " " + this.getResult().getFrequenciesSum(); |
|
353 |
text += " " + SpecificitiesUIMessages.t + " " + this.getResult().getFrequenciesSum(); //$NON-NLS-1$ //$NON-NLS-2$
|
|
354 | 354 |
} |
355 | 355 |
typeFrequencyColumn.setText(text); |
356 | 356 |
typeFrequencyColumn.setToolTipText(typeFrequencyColumn.getText()); |
... | ... | |
368 | 368 |
TableColumn freqpartTableColumn = specificitesTable.getColumn(firstLexicalTableColumnIndex); |
369 | 369 |
text = lexicalTableColumnNames[i]; |
370 | 370 |
if (this.getResult().hasBeenComputedOnce()) { |
371 |
text += " t=" + lexicalTableColumnTotalFrequencies[i]; |
|
371 |
text += " t=" + lexicalTableColumnTotalFrequencies[i]; //$NON-NLS-1$
|
|
372 | 372 |
} |
373 | 373 |
freqpartTableColumn.setText(text); |
374 | 374 |
freqpartTableColumn.setToolTipText(freqpartTableColumn.getText()); |
TXM/trunk/bundles/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/RAdaptor.java (revision 3855) | ||
---|---|---|
11 | 11 |
|
12 | 12 |
|
13 | 13 |
public static String sendToR(TXMResult result) { |
14 |
return ""; |
|
14 |
return ""; //$NON-NLS-1$
|
|
15 | 15 |
} |
16 | 16 |
|
17 | 17 |
/** |
TXM/trunk/bundles/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRScript.java (revision 3855) | ||
---|---|---|
114 | 114 |
} |
115 | 115 |
dialog.setFilterExtensions(new String[] { "*.R" }); //$NON-NLS-1$ |
116 | 116 |
|
117 |
String scriptCurrentDir = Toolbox.getTxmHomePath() + "/scripts"; |
|
117 |
String scriptCurrentDir = Toolbox.getTxmHomePath() + "/scripts"; //$NON-NLS-1$
|
|
118 | 118 |
|
119 | 119 |
dialog.setFilterPath(scriptCurrentDir); |
120 | 120 |
result = dialog.open(); |
TXM/trunk/bundles/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/decorators/RDecorator.java (revision 3855) | ||
---|---|---|
72 | 72 |
// Overlay custom image over base image |
73 | 73 |
try { |
74 | 74 |
Image image2; |
75 |
OverlayImageIcon overlayIcon = new OverlayImageIcon(image, "platform:/plugin/"+ FrameworkUtil.getBundle(RDecorator.class).getSymbolicName() + "/icons/decorators/R.png"); //$NON-NLS-1$ |
|
75 |
OverlayImageIcon overlayIcon = new OverlayImageIcon(image, "platform:/plugin/"+ FrameworkUtil.getBundle(RDecorator.class).getSymbolicName() + "/icons/decorators/R.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
76 | 76 |
image2 = overlayIcon.getImage(); |
77 | 77 |
return image2; |
78 | 78 |
} |
Formats disponibles : Unified diff