Revision 1755

tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteImportScript.java (revision 1755)
136 136
//			Toolbox.getEngineManager(EngineType.SEARCH).stopEngines();
137 137
//		}
138 138
		
139
		JobHandler jobhandler = new JobHandler(TXMUIMessages.scriptExecution
140
				+ project.getImportModuleName()) { //$NON-NLS-1$
139
		JobHandler jobhandler = new JobHandler(TXMUIMessages.scriptExecution + " " + project.getImportModuleName()) { //$NON-NLS-1$
141 140
			@Override
142 141
			protected IStatus run(IProgressMonitor monitor) {
143 142
				this.runInit(monitor);
tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/RunGroovyScript.java (revision 1755)
27 27
//
28 28
package org.txm.rcp.actions;
29 29

  
30
import groovy.lang.Binding;
31

  
32 30
import java.io.File;
33 31
import java.io.IOException;
34 32
import java.util.ArrayList;
......
45 43
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
46 44
import org.eclipse.ui.plugin.AbstractUIPlugin;
47 45
import org.txm.Toolbox;
48
import org.txm.core.preferences.TBXPreferences;
49
import org.txm.core.preferences.TXMPreferences;
50 46
import org.txm.importer.scripting.GroovyImportScriptRunner;
51 47
import org.txm.rcp.Application;
52 48
import org.txm.rcp.IImageKeys;
53 49
import org.txm.rcp.messages.TXMUIMessages;
54 50
import org.txm.rcp.swt.dialog.LastOpened;
55 51
import org.txm.rcp.utils.JobHandler;
52
import org.txm.utils.logger.Log;
56 53

  
54
import groovy.lang.Binding;
55

  
57 56
// TODO: Auto-generated Javadoc
58 57
/**
59 58
 * The Class RunGroovyScript.
......
127 126
		}
128 127

  
129 128
		if (gse != null) {
130
			JobHandler jobhandler = new JobHandler(TXMUIMessages.scriptExecution,
131
					null) {
129
			JobHandler jobhandler = new JobHandler(TXMUIMessages.scriptExecution, null) {
132 130
				@Override
133 131
				protected IStatus run(IProgressMonitor monitor) {
134 132
					this.runInit(monitor);
......
141 139
					} catch (ThreadDeath td) {
142 140
						return Status.CANCEL_STATUS;
143 141
					} catch (Exception e) {
144
						System.out.println(NLS.bind(TXMUIMessages.errorWhileRunningScriptColonP0,
145
								e));
142
						Log.severe(NLS.bind(TXMUIMessages.errorWhileRunningScriptColonP0, e));
146 143
					} finally {
147 144
						monitor.done();
148 145
					}
tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java (revision 1755)
93 93
	 */
94 94
	public void plot(File file, String cmd, ChartResult result, String title, String subtitle)	{
95 95
		try {
96

  
97
			if (!cmd.endsWith(";") && !cmd.endsWith("\n")) { //$NON-NLS-1$
98
				cmd += ";"; //$NON-NLS-1$
99
			}
96 100
			
97 101
			// FIXME: margin tests
98
			//cmd += "par(mar = c(10,4,4,2) + 0.1);\n"; //$NON-NLS-1$
102
			//cmd += "windows.options(width=100, height=10);\n"; //$NON-NLS-1$
103
			//cmd += "par(mar = c(50,6,4,1) + .1);\n"; //$NON-NLS-1$
99 104
			
100 105
			// FIXME: outer margin to not cut of title
101 106
			//cmd += "par(oma = c(10,2,2,2));\n"; //$NON-NLS-1$
......
104 109
			//cmd += "par(cex.main = 3.5);\n"; //$NON-NLS-1$
105 110
			//cex.lab=1.5, cex.axis=1.5, cex.main=1.5, cex.sub=1.5
106 111
			
107
			if (!cmd.endsWith(";")) { //$NON-NLS-1$
108
				cmd += ";"; //$NON-NLS-1$
109
			}
110 112
			if(result != null)	{
111 113
				// draw grid
112 114
				if(result.isGridVisible())	{
......
154 156
//			      col.lab ="darkblue"
155 157
//			      )
156 158
		
157
		return String.format("title(main = \"%s\");\n", title); //$NON-NLS-1$
159
		//return String.format("title(main = \"%s\");\n", title); //$NON-NLS-1$
160
		
161
		// FIXME: tests for adaptive not truncated title 
162
		return String.format("title(main = paste(strwrap(\"%s\", width = 50), collapse = \"\n\"));\n", title); //$NON-NLS-1$
163
		
164
		
158 165
	}
159 166

  
160 167
	/**
......
163 170
	 * @return
164 171
	 */
165 172
	public String getSubtitlePlotCmd(String subtitle)	{
166
		// NOTE: SJ: sub title always draw the string at bottom of the plot
173
		// NOTE: SJ: sub title always drawn the string at bottom of the plot
167 174
		//return String.format("title(sub = \"%s\");\n", subtitle); //$NON-NLS-1$
168
		return String.format("title(main = \"\n\n%s\");\n", subtitle); //$NON-NLS-1$
175
		return String.format("title(main = \"\n\n\n%s\");\n", subtitle); //$NON-NLS-1$
169 176
	}
170 177

  
171 178
	
tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/messages/messages_fr.properties (revision 1755)
1 1
restartingToolboxSearchengines=Redémarrage des moteurs de recherche...
2 2
startingTheP0GroovyImportScript=Démarrage du script d'import Groovy {0}.
3 3
errorImportNotCorrectlyEndedSeeConsoleMessages=** Erreur: l'import ne s'est pas terminé correctement. Voir les messages précédent.
4
errorTreeTaggerAnnotationEngineIsNotReady=**Erreur : l'annotation treetagger n'est pas possible. Veuillez vérifier les préférences de la page TXM > Avancé > TAL > TreeTagger. Abandon.
4
errorTreeTaggerAnnotationEngineIsNotReady=** Erreur : l'annotation treetagger n'est pas possible. Veuillez vérifier les préférences de la page TXM > Avancé > TAL > TreeTagger. Abandon.

Also available in: Unified diff