Index: tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java
===================================================================
--- tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java	(revision 1147)
+++ tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java	(revision 1148)
@@ -199,9 +199,7 @@
 				this.setQuery(this.getStringParameterValue(ConcordancePreferences.QUERY));
 			}
 
-			if (this.parent != null) {
-				this.setCQLSeparator(this.getCorpus().getCQLLimitQuery());
-			}
+			this.setCQLSeparator(this.getCorpus().getCQLLimitQuery());
 
 			
 //			this.pTopIndex = this.getIntParameterValue(ConcordancePreferences.TOP_INDEX);
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java	(revision 1147)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java	(revision 1148)
@@ -871,8 +871,7 @@
 	public boolean canCompute() {
 		try {
 			return 
-					this.parent != null
-					&& this.getLexicalTable().getNColumns() > 3
+					this.getLexicalTable().getNColumns() > 3
 					&& this.firstDimension > 0
 					&& this.secondDimension > 0
 					&& this.firstDimension != this.secondDimension
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java	(revision 1147)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java	(revision 1148)
@@ -390,7 +390,13 @@
 	 * @throws StatException the stat exception
 	 */
 	public int getCorpusSize() throws StatException {
-		return lexicalTable.getData() != null ? lexicalTable.getData().getTotal() : lexicon.nbrOfToken();
+		if (lexicalTable.getData() != null) {
+			return lexicalTable.getData().getTotal();
+		} else if (lexicon != null){
+			return lexicon.nbrOfToken();
+		} else {
+			return 0;
+		}
 	}
 
 	/**
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/statsengine/r/function/SpecificitiesR.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/statsengine/r/function/SpecificitiesR.java	(revision 1147)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/statsengine/r/function/SpecificitiesR.java	(revision 1148)
@@ -129,12 +129,9 @@
 
 		try {
 			rw.safeEval("library(textometry)");
-		} catch (RserveException e1) {
+		} catch (Exception e1) {
 			// TODO Auto-generated catch block
 			e1.printStackTrace();
-		} catch (REXPMismatchException e1) {
-			// TODO Auto-generated catch block
-			e1.printStackTrace();
 		}
 		REXP r = rw.callFunction("specificities", new QuantitativeDataStructure[] { table, row, column }, symbol); //$NON-NLS-1$
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java	(revision 1147)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java	(revision 1148)
@@ -27,23 +27,13 @@
 //
 package org.txm.rcp.handlers.scripts;
 
-import groovy.lang.Binding;
-
 import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 
-import org.codehaus.groovy.control.CompilerConfiguration;
-import org.codehaus.groovy.control.customizers.ImportCustomizer;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.internal.runtime.InternalPlatform;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
@@ -58,10 +48,7 @@
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.ide.FileStoreEditorInput;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
 import org.txm.Toolbox;
-import org.txm.core.preferences.TBXPreferences;
 import org.txm.groovy.core.GSERunner;
 import org.txm.rcp.editors.TxtEditor;
 import org.txm.rcp.messages.TXMUIMessages;
@@ -69,11 +56,17 @@
 import org.txm.rcp.swt.widget.parameters.UIParameterException;
 import org.txm.rcp.utils.JobHandler;
 import org.txm.rcp.views.corpora.CorporaView;
-import org.txm.utils.logger.Log;
-// TODO: Auto-generated Javadoc
+
+import groovy.lang.Binding;
 /**
- * Execute a Groovy script
+ * Handler to Execute a Groovy script. 
  * 
+ * 1- If no parameter "org.txm.rcp.command.parameter.file" is set
+ * 2- use the current selection
+ * 	2.1 TXTEditor text selection and opened file
+ *  2.2 File
+ * 3- then ask the user to select a script
+ * 
  * @author mdecorde
  */
 public class ExecuteGroovyScript extends AbstractHandler {
@@ -218,21 +211,23 @@
 		final String relativepath = path.substring(dir.length()+1);
 
 		//if (gse == null) {
-			gse = GSERunner.buildDefaultGSE(scriptfile);
-			if (gse == null) {
-				System.out.println("Could not create the Groovy script engine. Aborting.");
-				return;
-			}
+			
 		//}
 
-		JobHandler jobhandler = new JobHandler(NLS.bind(TXMUIMessages.ExecuteRScript_1,scriptfile.getName())) {
+		JobHandler jobhandler = new JobHandler(NLS.bind(TXMUIMessages.ExecuteScript_0, scriptfile.getName())) {
 			@Override
 			protected IStatus run(IProgressMonitor monitor) {
 				this.runInit(monitor);
 				//this.setCurrentMonitor(monitor);
-				monitor.beginTask(NLS.bind(TXMUIMessages.ExecuteRScript_1, scriptfile.getName()), 100);
+				monitor.beginTask(NLS.bind(TXMUIMessages.ExecuteScript_0, scriptfile.getName()), 100);
 
 				try {
+					gse = GSERunner.buildDefaultGSE();
+					if (gse == null) {
+						System.out.println("Could not create the Groovy script engine. Aborting.");
+						return Status.CANCEL_STATUS;
+					}
+					
 					Binding binding = new Binding();
 					binding.setVariable("editor", page); //$NON-NLS-1$
 					binding.setVariable("selection", selection); //$NON-NLS-1$
@@ -243,12 +238,12 @@
 					binding.setProperty("MONITOR", this); //$NON-NLS-1$
 					binding.setProperty("gse", gse);
 					
-					System.out.println(NLS.bind(TXMUIMessages.ExecuteRScript_1, scriptfile.getName()));
+					System.out.println(NLS.bind(TXMUIMessages.ExecuteScript_11, scriptfile.getName()));
 					long time = System.currentTimeMillis();
 					System.out.println(relativepath);
 					gse.run(relativepath, binding);
 					
-					System.out.println(TXMUIMessages.ExecuteRScript_2+(System.currentTimeMillis()-time)+TXMUIMessages.ExecuteGroovyScript_0);
+					System.out.println(TXMUIMessages.ExecuteScript_12+(System.currentTimeMillis()-time)+TXMUIMessages.ExecuteGroovyScript_0);
 				} catch (ThreadDeath td) {
 					return Status.CANCEL_STATUS;
 				} catch (UIParameterException e) {
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyText.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyText.java	(revision 1147)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyText.java	(revision 1148)
@@ -107,8 +107,7 @@
 	 */
 	public static Object executeText(final String text, final String scriptfile) {
 		if (!new File(scriptfile).exists()) {
-			System.err.println(NLS.bind(TXMUIMessages.ExecuteScriptImport_1,
-					scriptfile));
+			System.err.println(NLS.bind(TXMUIMessages.ExecuteScriptImport_1, scriptfile));
 			return null;
 		}
 		final String scriptRootDir = Toolbox.getTxmHomePath() + "/scripts";
@@ -147,8 +146,7 @@
 					for (File file : classPath) {
 						try {
 							shell.getClassLoader().addURL(file.toURI().toURL());
-							shell.getClassLoader().addClasspath(
-									file.getAbsolutePath());
+							shell.getClassLoader().addClasspath(file.getAbsolutePath());
 						} catch (MalformedURLException e) {
 							org.txm.rcp.utils.Logger.printStackTrace(e);
 							return null;
@@ -159,8 +157,7 @@
 					System.out.println("Executing text selection..."); //$NON-NLS-1$
 					long time = System.currentTimeMillis();
 					shell.evaluate(text);
-					System.out
-							.println("Done: " + (System.currentTimeMillis() - time) + TXMUIMessages.ExecuteRScript_3); //$NON-NLS-1$
+					System.out.println("Done: " + (System.currentTimeMillis() - time) + TXMUIMessages.ExecuteScript_13); //$NON-NLS-1$
 				} catch (ThreadDeath td) { 
 					return Status.CANCEL_STATUS;
 				} catch (CompilationFailedException e) {
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteScript.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteScript.java	(revision 1147)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteScript.java	(revision 1148)
@@ -28,8 +28,10 @@
 package org.txm.rcp.handlers.scripts;
 
 import java.io.File;
+import java.util.HashMap;
 import java.util.Iterator;
 
+import org.apache.commons.collections.map.HashedMap;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -48,6 +50,9 @@
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.ide.FileStoreEditorInput;
 import org.txm.Toolbox;
+import org.txm.core.engines.EngineType;
+import org.txm.core.engines.ScriptEngine;
+import org.txm.core.engines.ScriptEnginesManager;
 import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.rcp.editors.TxtEditor;
@@ -73,7 +78,7 @@
 		String result = ""; //$NON-NLS-1$
 		boolean executionFromEditor = false;
 		TxtEditor txteditor = null;
-		
+
 		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event)
 				.getActivePage().getActivePart();
 		ISelection selection = HandlerUtil.getCurrentSelection(event);
@@ -125,29 +130,29 @@
 				if (!doit) { // ask user
 					MessageDialog dialog = new MessageDialog(shell, TXMUIMessages.ExecuteScript_0+result, null,
 							TXMUIMessages.ExecuteScript_1, MessageDialog.QUESTION, new String[] {TXMUIMessages.ExecuteScript_2, TXMUIMessages.ExecuteScript_4,
-							TXMUIMessages.ExecuteScript_5}, 0) {
+									TXMUIMessages.ExecuteScript_5}, 0) {
 						Button checkDefault;
-						 @Override
-						  protected Control createDialogArea(Composite parent) {
-						    Composite container = (Composite) super.createDialogArea(parent);
-						    checkDefault = new Button(container, SWT.CHECK);
-						    checkDefault.setText(TXMUIMessages.ExecuteScript_6);
-						    boolean b = RCPPreferences.getInstance().getBoolean(RCPPreferences.SAVE_BEFORE_EXECUTION);
-						    checkDefault.setSelection(b);
-						    
-						    checkDefault.addSelectionListener(new SelectionListener() {
-								
+						@Override
+						protected Control createDialogArea(Composite parent) {
+							Composite container = (Composite) super.createDialogArea(parent);
+							checkDefault = new Button(container, SWT.CHECK);
+							checkDefault.setText(TXMUIMessages.ExecuteScript_6);
+							boolean b = RCPPreferences.getInstance().getBoolean(RCPPreferences.SAVE_BEFORE_EXECUTION);
+							checkDefault.setSelection(b);
+
+							checkDefault.addSelectionListener(new SelectionListener() {
+
 								@Override
 								public void widgetSelected(SelectionEvent e) {
 									boolean b = checkDefault.getSelection();
 									RCPPreferences.getInstance().put(RCPPreferences.SAVE_BEFORE_EXECUTION, b);
 								}
-								
+
 								@Override
 								public void widgetDefaultSelected(SelectionEvent e) { }
 							});
-						    return container;
-						  }
+							return container;
+						}
 					};
 					int c = dialog.open();
 					if (c == 1) {
@@ -183,13 +188,24 @@
 		File script = new File(scriptpath);
 		if (!script.exists()) return;
 
-		if (script.getName().endsWith(".groovy")) { //$NON-NLS-1$
+		String ext = script.getName();
+		int i = ext.lastIndexOf(".");
+		if (i > 0) {
+			ext = ext.substring(i);
+		}
+
+		if ("groovy".equals(ext)) { // TODO make Groovy a script engine
 			ExecuteGroovyScript.executeScript(scriptpath, page, selection);
-		} else if (script.getName().endsWith(".R")) { //$NON-NLS-1$
-			System.out.println("ExecuteScript with R not implemented");
-			//ExecuteRScript.executeScript(scriptpath);
 		} else {
-			System.out.println(TXMUIMessages.ExecuteScript_3+script.getName());
+			ScriptEngine se = (ScriptEngine) Toolbox.getEngineManager(EngineType.SCRIPT).getEngine(ext);
+			if (se != null) {
+				HashMap<String, Object> env = new HashMap<String, Object>();
+				env.put("page", page); // selection
+				env.put("selection", selection); // selection
+				se.executeScript(script, env);
+			} else {
+				System.out.println(TXMUIMessages.ExecuteScript_3+script.getName());
+			}
 		}
 	}
 }
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties	(revision 1147)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties	(revision 1148)
@@ -302,14 +302,6 @@
 ExecuteLastGroovyScript_1 = Executing last script: 
 ExecuteLastGroovyScript_3 = Error: Current Groovy script directory does not exist: 
 
-ExecuteRScript_1 = Running {0}
-ExecuteRScript_2 = Done:
-ExecuteRScript_3 = \ ms
-
-ExecuteRText_0 = Running text selection...
-ExecuteRText_1 = ** Error while running R script {0}: {1}
-ExecuteRText_2 = \ ms
-
 ExecuteScriptImport_0 = Import started
 ExecuteScriptImport_1 = ** {0} script file doesn''t exist
 ExecuteScriptImport_2 = ** Error: 'corpora' directory doesn't exist:
@@ -318,10 +310,10 @@
 ExecuteScriptImport_6 = The import process failed.
 ExecuteScriptImport_7 = Import done:
 ExecuteScriptImport_8 = ** Error while loading corpus
+ExecuteRScript_11 = Running {0}
+ExecuteRScript_12 = Done:
+ExecuteRScript_13 = \ ms
 
-ExecuteScriptR_0 = ** {0} R script doesn''t exist
-ExecuteScriptR_1 = ** Error while Running R script {0}: {1}
-
 ExecuteScript_0       = Execution of {0}
 ExecuteScript_1       = Save file before execution ?
 ExecuteScript_2       = Save and run
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_ru.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_ru.properties	(revision 1147)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_ru.properties	(revision 1148)
@@ -230,14 +230,6 @@
 ExecuteGroovyScript_1         = N/A_Error during parameters initialisation
 ExecuteGroovyScript_2         = N/A_The user canceled the script execution
 
-ExecuteRScript_1 = Выполнение 
-ExecuteRScript_2 = Готово: 
-ExecuteRScript_3 = \ мс
-
-ExecuteRText_0 = Выполнение выделения текста... 
-ExecuteRText_1 = ** Ошибка во время выполнения скрипта R {0}: {1}
-ExecuteRText_2 = \ мс
-
 ExecuteScriptImport_0 = Начало импортирования
 ExecuteScriptImport_1 = ** Файл скрипта {0} не найден
 ExecuteScriptImport_2 = ** Ошибка: папка 'corpora' не существует: 
@@ -247,9 +239,6 @@
 ExecuteScriptImport_7 = Импортирование завершено: 
 ExecuteScriptImport_8 = ** Ошибка при загрузке корпуса
 
-ExecuteScriptR_0 = ** Файл скрипта R {0} не найден
-ExecuteScriptR_1 = ** Ошибка при выполнении скрипта R {0}: {1}
-
 ExecuteScript_3       = ** Не найдено ни одного интерпретатора для расширения файла скрипта 
 
 Exit_Menu_Label = Выход
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties	(revision 1147)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties	(revision 1148)
@@ -266,14 +266,6 @@
 ExecuteGroovyScript_1         = Erreur lors de l'initialisation des paramètres
 ExecuteGroovyScript_2         = L'utilisateur a intérompu l'exécution du script
 
-ExecuteRScript_1 = Exécution de {0}
-ExecuteRScript_2 = Terminé : 
-ExecuteRScript_3 = \ ms
-
-ExecuteRText_0 = Exécution de la sélection de texte... 
-ExecuteRText_1 = ** Erreur lors de l''exécution du script R {0} : {1}
-ExecuteRText_2 = \ ms
-
 ExecuteScriptImport_0 = Début de l'importation
 ExecuteScriptImport_1 = ** Le fichier de script {0} n''existe pas
 ExecuteScriptImport_2 = ** Erreur: le dossier 'corpora' n'existe pas : 
@@ -282,19 +274,19 @@
 ExecuteScriptImport_6 = L'import n'a pas abouti.
 ExecuteScriptImport_7 = Importation terminée : 
 ExecuteScriptImport_8 = ** Erreur lors du chargement du corpus
+
+ExecuteScript_0       = Exécution de {0} ...
+ExecuteScript_1       = Sauver le fichier avant d'exécuter ?
+ExecuteScript_2       = Sauver et lancer
+ExecuteScript_3       = ** Aucun interpréteur trouvé pour l'extension du fichier de script 
+ExecuteScript_4       = Annuler
+ExecuteScript_5       = Ne pas sauver et lancer
+ExecuteScript_6       = Toujours sauvegarder avant de lancer
+ExecuteScript_7       = Exécution annulée.
+ExecuteRScript_11 = Exécution de {0}
+ExecuteRScript_12 = Terminé : 
+ExecuteRScript_13 = \\ ms
 
-ExecuteScriptR_0 = ** Le fichier de script R {0} n''existe pas
-ExecuteScriptR_1 = ** Erreur lors de l''exécution du script R {0} : {1}
-
-ExecuteScript_0       = Exécution de {0} ...
-ExecuteScript_1       = Sauver le fichier avant d'exécuter ?
-ExecuteScript_2       = Sauver et lancer
-ExecuteScript_3       = ** Aucun interpréteur trouvé pour l'extension du fichier de script 
-ExecuteScript_4       = Annuler
-ExecuteScript_5       = Ne pas sauver et lancer
-ExecuteScript_6       = Toujours sauvegarder avant de lancer
-ExecuteScript_7       = Exécution annulée.
-
 Exit_Menu_Label = Quitter
 
 Explorer_0 = Le dossier {0} ne devrait pas être supprimé
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java	(revision 1147)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java	(revision 1148)
@@ -271,12 +271,7 @@
 	public static String ExecuteLastGroovyScript_0;
 	public static String ExecuteLastGroovyScript_1;
 	public static String ExecuteLastGroovyScript_3;
-	public static String ExecuteRScript_1;
-	public static String ExecuteRScript_2;
-	public static String ExecuteRScript_3;
-	public static String ExecuteRText_0;
-	public static String ExecuteRText_1;
-	public static String ExecuteRText_2;
+
 	public static String ExecuteScript_0;
 	public static String ExecuteScript_1;
 	public static String ExecuteScript_2;
@@ -285,6 +280,9 @@
 	public static String ExecuteScript_5;
 	public static String ExecuteScript_6;
 	public static String ExecuteScript_7;
+	public static String ExecuteScript_11;
+	public static String ExecuteScript_12;
+	public static String ExecuteScript_13;
 	public static String ExecuteScriptImport_0;
 	public static String ExecuteScriptImport_1;
 	public static String ExecuteScriptImport_2;
@@ -293,8 +291,6 @@
 	public static String ExecuteScriptImport_6;
 	public static String ExecuteScriptImport_7;
 	public static String ExecuteScriptImport_8;
-	public static String ExecuteScriptR_0;
-	public static String ExecuteScriptR_1;
 	public static String Exit_Menu_Label;
 	public static String Explorer_0;
 	public static String Explorer_1;
Index: tmp/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/QueryCooccurrence.java
===================================================================
--- tmp/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/QueryCooccurrence.java	(revision 1147)
+++ tmp/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/QueryCooccurrence.java	(revision 1148)
@@ -104,7 +104,7 @@
 		return nEdges;
 	}
 	
-	public LexicalTable toLexicalTable() throws RWorkspaceException, CqiClientException {
+	public LexicalTable toLexicalTable() throws Exception {
 		sendToR();
 		RWorkspace rw = RWorkspace.getRWorkspaceInstance();
 		rw.eval("LT<-"+this.getSymbol());
@@ -113,7 +113,9 @@
 		rw.eval(this.getSymbol()+"LT<-LT");
 		rw.eval("rm(LT)");
 		//TODO: use LexicalTablePreferences fmin 
-		LexicalTable table = new LexicalTable(corpus, corpus.getProperty("word"), new LexicalTableImpl(this.getSymbol()+"LT"));
+		LexicalTable table = new LexicalTable(corpus);
+		table.setUnitProperty(corpus.getProperty("word"));
+		table.setData(new LexicalTableImpl(this.getSymbol()+"LT"));
 		return table;
 	}
 	
@@ -174,7 +176,7 @@
 	}
 
 	@Override
-	public CA toCA() throws StatException, CqiClientException {
+	public CA toCA() throws Exception {
 		CQPCorpus corpus = this.getCorpus();
 		Property analysisProperty = null;
 		try {
@@ -187,7 +189,6 @@
 		int fmin = table.getFMin();
 		
 		CA ca = new CA(table);
-		
 		return ca;
 	}
 
Index: tmp/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/QueryAutoCooccurrence.java
===================================================================
--- tmp/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/QueryAutoCooccurrence.java	(revision 1147)
+++ tmp/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/QueryAutoCooccurrence.java	(revision 1148)
@@ -138,7 +138,7 @@
 	}
 
 
-	public LexicalTable toLexicalTable() throws RWorkspaceException, CqiClientException {
+	public LexicalTable toLexicalTable() throws Exception {
 		sendToR();
 		RWorkspace rw = RWorkspace.getRWorkspaceInstance();
 		rw.eval("LT<-"+this.getSymbol());
@@ -147,7 +147,9 @@
 		rw.eval(this.getSymbol()+"LT<-LT");
 		rw.eval("rm(LT)");
 		//TODO: use Table fmin preference
-		LexicalTable table = new LexicalTable(corpus, corpus.getProperty("word"), new LexicalTableImpl(this.getSymbol()+"LT"));
+		LexicalTable table = new LexicalTable(corpus);
+		table.setUnitProperty(corpus.getProperty("word"));
+		table.setData(new LexicalTableImpl(this.getSymbol()+"LT"));
 		return table;
 	}
 
@@ -242,7 +244,7 @@
 	}
 
 	@Override
-	public CA toCA() throws StatException, CqiClientException {
+	public CA toCA() throws Exception {
 		CQPCorpus corpus = this.getCorpus();
 		Property analysisProperty = null;
 		try {
Index: tmp/org.txm.querycooccurrences.rcp/src/org/txm/links/coocmatrix/toCA.java
===================================================================
--- tmp/org.txm.querycooccurrences.rcp/src/org/txm/links/coocmatrix/toCA.java	(revision 1147)
+++ tmp/org.txm.querycooccurrences.rcp/src/org/txm/links/coocmatrix/toCA.java	(revision 1148)
@@ -16,7 +16,7 @@
 	 * @throws StatException the stat exception
 	 * @throws CqiClientException 
 	 */
-	public static CA link(QueryCooccurrence coocs) throws StatException, CqiClientException {
+	public static CA link(QueryCooccurrence coocs) throws Exception {
 		CQPCorpus corpus = coocs.getCorpus();
 		Property analysisProperty = null;
 		try {
Index: tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ExpII.java
===================================================================
--- tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ExpII.java	(revision 1147)
+++ tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ExpII.java	(revision 1148)
@@ -444,12 +444,12 @@
 		}
 
 		try {
-			LexicalTable lt = new LexicalTable(corpus, corpus.getProperty("word"), new LexicalTableImpl(freqs, rownames, colnames));
+			LexicalTable lt = new LexicalTable(corpus);
+			lt.setUnitProperty(corpus.getProperty("word"));
+			lt.setData(new LexicalTableImpl(freqs, rownames, colnames));
 			return lt;
-		} catch (RWorkspaceException e) {
+		} catch (Exception e) {
 			org.txm.utils.logger.Log.printStackTrace(e);
-		} catch (CqiClientException e) {
-			org.txm.utils.logger.Log.printStackTrace(e);
 		}
 		return null;
 	}
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java	(revision 1147)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java	(revision 1148)
@@ -1053,52 +1053,52 @@
 		return cql_limit_query;
 	}
 
-	public List<TXMResult> clearResults() {
-		List<TXMResult> old = this.children;
-		this.children = new ArrayList<TXMResult>();
-		return old;
-	}
+//	public List<TXMResult> clearResults() {
+//		List<TXMResult> old = this.children;
+//		this.children = new ArrayList<TXMResult>();
+//		return old;
+//	}
 	
-	HashMap<Class, HashSet<Object>> storedData = new HashMap<Class, HashSet<Object>>();
+//	HashMap<Class, HashSet<Object>> storedData = new HashMap<Class, HashSet<Object>>();
 
 	private StructuralUnit textStructuralUnit;
 
 	private StructuralUnitProperty textIdStructuralUnitProperty;
-	public HashSet<Object> getStoredData(Class class1) {
-		
-		if (!storedData.containsKey(class1)) {
-			storedData.put(class1, new HashSet<Object>());
-		}
-		
-		return storedData.get(class1);
-	}
+//	public HashSet<Object> getStoredData(Class class1) {
+//		
+//		if (!storedData.containsKey(class1)) {
+//			storedData.put(class1, new HashSet<Object>());
+//		}
+//		
+//		return storedData.get(class1);
+//	}
+//	
+//	/**
+//	 * TODO: fix this hack to store Lexicons
+//	 * 
+//	 * @param o a lexicon
+//	 */
+//	public void storeData(Object o) {
+//		if (storedData.containsKey(o.getClass())) {
+//			storedData.put(o.getClass(), new HashSet<Object>());
+//		}
+//		
+//		HashSet<Object> hash = storedData.get(o.getClass());
+//		hash.add(o);
+//	}
 	
-	/**
-	 * TODO: fix this hack to store Lexicons
-	 * 
-	 * @param o a lexicon
-	 */
-	public void storeData(Object o) {
-		if (storedData.containsKey(o.getClass())) {
-			storedData.put(o.getClass(), new HashSet<Object>());
-		}
-		
-		HashSet<Object> hash = storedData.get(o.getClass());
-		hash.add(o);
-	}
+//	/**
+//	 * 
+//	 * @param o the object to remove
+//	 * @return true if o has been removed
+//	 */
+//	public boolean removeData(Object o) {
+//		if (storedData.containsKey(o.getClass())) {
+//			return storedData.get(o.getClass()).remove(o);
+//		}
+//		return false;
+//	}
 	
-	/**
-	 * 
-	 * @param o the object to remove
-	 * @return true if o has been removed
-	 */
-	public boolean removeData(Object o) {
-		if (storedData.containsKey(o.getClass())) {
-			return storedData.get(o.getClass()).remove(o);
-		}
-		return false;
-	}
-	
 	public StructuralUnit getTextStructuralUnit() throws CqiClientException {
 		if (textStructuralUnit == null) {
 			textStructuralUnit = getStructuralUnit(TEXT);
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/QueryPart.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/QueryPart.java	(revision 1147)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/QueryPart.java	(revision 1148)
@@ -65,6 +65,15 @@
 		this.structure = structure;
 		this.property = property;
 		this.value = value;
+		
+		String tag = structure.getName() + TAG_ATTRIBUTE_SEPARATOR + property.getName();
+		String label = "a"; //$NON-NLS-1$
+		StringBuffer query = new StringBuffer();
+		query.append(REGION_MACRO + START_MACRO_ARGS);
+		query.append(tag + MACRO_ARGS_SEPARATOR + label + END_MACRO_ARGS);
+		query.append(START_GLOBAL_CONSTRAINT + label + DOT + tag + EQUALS
+				+ START_DOUBLE_QUOTE + value + END_DOUBLE_QUOTE);
+		queryString = query.toString();
 	}
 
 	/*
@@ -79,14 +88,7 @@
 	 */
 	@Override
 	public String getQueryString() {
-		String tag = structure.getName() + TAG_ATTRIBUTE_SEPARATOR + property.getName();
-		String label = "a"; //$NON-NLS-1$
-		StringBuffer query = new StringBuffer();
-		query.append(REGION_MACRO + START_MACRO_ARGS);
-		query.append(tag + MACRO_ARGS_SEPARATOR + label + END_MACRO_ARGS);
-		query.append(START_GLOBAL_CONSTRAINT + label + DOT + tag + EQUALS
-				+ START_DOUBLE_QUOTE + value + END_DOUBLE_QUOTE);
-		return query.toString();
+		return queryString;
 		
 		// another way to query parts less restrictif but missleading
 		//return String.format("[_.%s=\"%s\"] expand to %s", tag, value, structure.getName());
Index: tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1147)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1148)
@@ -1789,9 +1789,12 @@
 			}
 		}
 		
-		if (
-				!this.needsFullRecomputing && 
-				!this.isDirtyFromHistory() && !this.isDirty()) {
+		boolean d0 = this.isDirty();
+		boolean d1 = this.needsFullRecomputing;
+		boolean d2 = this.isDirtyFromHistory();
+		boolean d3 = this.isDirty();
+		if (!d1 && 
+				!d2 && !d3) {
 			// needsFullRecomputing == true && isDirtyFromHistory == true && isDirty == true
 			Log.finest("TXMResult.compute(): " + this.getClass().getSimpleName() + ": result parameters have not changed since last computing, computing skipped.");
 			skipComputing = true;
Index: tmp/org.txm.core/src/java/org/txm/core/engines/ScriptEngine.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/engines/ScriptEngine.java	(revision 0)
+++ tmp/org.txm.core/src/java/org/txm/core/engines/ScriptEngine.java	(revision 1148)
@@ -0,0 +1,44 @@
+package org.txm.core.engines;
+
+import java.io.File;
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * Wrapper of old xxxLoader scripts 
+ * 
+ * @author mdecorde
+ *
+ */
+public abstract class ScriptEngine implements Engine {
+	
+	public static final String EXTENSION_POINT_ID = ScriptEngine.class.getCanonicalName();
+	
+	protected String name;
+	
+	public ScriptEngine(String name) {
+		this.name = name;
+	}
+	
+	public IStatus executeScript(String scriptPath) {
+		return executeScript(new File(scriptPath));
+	}
+	
+	public IStatus executeScript(File script) {
+		return executeScript(script);
+	}
+
+	public abstract IStatus executeScript(File script, HashMap<String, Object> env);
+	
+	public IStatus executeText(String text) {
+		return executeText(text);
+	}
+	
+	public abstract IStatus executeText(String str, HashMap<String, Object> env);
+	
+	@Override
+	public String getName() {
+		return name;
+	}
+}

Property changes on: tmp/org.txm.core/src/java/org/txm/core/engines/ScriptEngine.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/src/java/org/txm/core/engines/ScriptEnginesManager.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/engines/ScriptEnginesManager.java	(revision 0)
+++ tmp/org.txm.core/src/java/org/txm/core/engines/ScriptEnginesManager.java	(revision 1148)
@@ -0,0 +1,27 @@
+package org.txm.core.engines;
+
+import org.txm.Toolbox;
+
+public class ScriptEnginesManager extends EnginesManager<ScriptEngine> {
+
+	private static final long serialVersionUID = -3058514572644848458L;
+
+	@Override
+	public boolean fetchEngines() {
+		return this.fetchEngines(ScriptEngine.EXTENSION_POINT_ID);
+	}
+
+	@Override
+	public EngineType getEnginesType() {
+		return EngineType.SCRIPT;
+	}
+	
+	// commons script engines
+	public static ScriptEngine getGroovyEngine() {
+		return (ScriptEngine) Toolbox.getEngineManager(EngineType.SCRIPT).getEngine("groovy");
+	}
+	
+	public static ScriptEngine getREngine() {
+		return (ScriptEngine) Toolbox.getEngineManager(EngineType.SCRIPT).getEngine("R");
+	}
+}

Property changes on: tmp/org.txm.core/src/java/org/txm/core/engines/ScriptEnginesManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/RCoreMessages.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/RCoreMessages.java	(revision 1147)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/RCoreMessages.java	(revision 1148)
@@ -41,6 +41,15 @@
 	public static String info_statisticsEngineLaunched;
 	public static String info_tryingToStartRFrom;
 	public static String info_tryingToStartRWithRPath;
+	
+	public static String ExecuteRScript_1;
+	public static String ExecuteRScript_2;
+	public static String ExecuteRScript_3;
+	public static String ExecuteRText_0;
+	public static String ExecuteRText_1;
+	public static String ExecuteRText_2;
+	public static String ExecuteScriptR_0;
+	public static String ExecuteScriptR_1;	
 
 	public static String error_unexpectedErrorInRStatisticsEngine;
 
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages.properties
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages.properties	(revision 1147)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages.properties	(revision 1148)
@@ -28,3 +28,14 @@
 info_statisticsEngineLaunched  = Statistical Engine launched
 info_tryingToStartRFrom        = Try to start R from: {0}...
 info_tryingToStartRWithRPath   = Try to start R with path: 'R'.
+
+ExecuteRScript_1 = Running {0}
+ExecuteRScript_2 = Done:
+ExecuteRScript_3 = \ ms
+
+ExecuteRText_0 = Running text selection...
+ExecuteRText_1 = ** Error while running R script {0}: {1}
+ExecuteRText_2 = \ ms
+
+ExecuteScriptR_0 = ** {0} R script doesn''t exist
+ExecuteScriptR_1 = ** Error while Running R script {0}: {1}
\ No newline at end of file
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages_ru.properties
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages_ru.properties	(revision 1147)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages_ru.properties	(revision 1148)
@@ -2,3 +2,14 @@
 error_unexpectedErrorInRStatisticsEngine = Неожиданная ошибка в статистической машине R : {0}
 
 info_tryingToStartRWithRPath = 
+
+ExecuteRScript_1 = \u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 
+ExecuteRScript_2 = \u0413\u043E\u0442\u043E\u0432\u043E: 
+ExecuteRScript_3 = \ \u043C\u0441
+
+ExecuteRText_0 = \u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0442\u0435\u043A\u0441\u0442\u0430... 
+ExecuteRText_1 = ** \u041E\u0448\u0438\u0431\u043A\u0430 \u0432\u043E \u0432\u0440\u0435\u043C\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0441\u043A\u0440\u0438\u043F\u0442\u0430 R {0}: {1}
+ExecuteRText_2 = \ \u043C\u0441
+
+ExecuteScriptR_0 = ** \u0424\u0430\u0439\u043B \u0441\u043A\u0440\u0438\u043F\u0442\u0430 R {0} \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D
+ExecuteScriptR_1 = ** \u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0438 \u0441\u043A\u0440\u0438\u043F\u0442\u0430 R {0}: {1}
\ No newline at end of file
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages_fr.properties	(revision 1147)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/messages/messages_fr.properties	(revision 1148)
@@ -28,3 +28,14 @@
 info_statisticsEngineLaunched  = Moteur statistique lancé
 info_tryingToStartRFrom        = Tentative de démarrage de R depuis : {0}...
 info_tryingToStartRWithRPath   = Tentative de démarrage de R depuis le chemin : 'R'.
+
+ExecuteRScript_1 = Exécution de {0}
+ExecuteRScript_2 = Terminé : 
+ExecuteRScript_3 = \ ms
+
+ExecuteRText_0 = Exécution de la sélection de texte... 
+ExecuteRText_1 = ** Erreur lors de l''exécution du script R {0} : {1}
+ExecuteRText_2 = \ ms
+
+ExecuteScriptR_0 = ** Le fichier de script R {0} n''existe pas
+ExecuteScriptR_1 = ** Erreur lors de l''exécution du script R {0} : {1}
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RScriptEngine.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RScriptEngine.java	(revision 0)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RScriptEngine.java	(revision 1148)
@@ -0,0 +1,146 @@
+package org.txm.statsengine.r.core;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
+import org.txm.core.engines.ScriptEngine;
+import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
+import org.txm.statsengine.r.core.messages.RCoreMessages;
+import org.txm.utils.logger.Log;
+
+public class RScriptEngine extends ScriptEngine {
+
+	public RScriptEngine() {
+		super("R");
+	}
+
+	@Override
+	public boolean isRunning() {
+		return true;
+	}
+
+	@Override
+	public boolean initialize() throws Exception {
+		return true;
+	}
+
+	@Override
+	public boolean start(IProgressMonitor monitor) throws Exception {
+		return true;
+	}
+
+	@Override
+	public boolean stop() throws Exception {
+		return true;
+	}
+	
+	/**
+	 * Execute text.
+	 *
+	 * @param text the text
+	 * @return the object
+	 */
+	public IStatus executeText(String text, HashMap<String, Object> env) {
+		RWorkspace rw = null;
+		try {
+			rw = RWorkspace.getRWorkspaceInstance();
+		} catch (RWorkspaceException e1) {
+			Log.printStackTrace(e1);
+			return Status.CANCEL_STATUS;
+		}
+		boolean initState = rw.isLogging();
+		rw.setLog(true);
+
+		try {
+			System.out.println(RCoreMessages.ExecuteRText_0);
+			long time = System.currentTimeMillis();
+			//execute a file line per line
+
+			//String str = rw.userEval(text);//evaluate line in R
+			rw.eval(text);
+//			if (str != null && rw.isLogging() && str.length() > 0)
+//				RConsole.printServer(str);
+			RWorkspace.appendtoEvalLog(text);
+
+			System.out.println(RCoreMessages.ExecuteRScript_2+(System.currentTimeMillis()-time)+RCoreMessages.ExecuteRText_2); 
+		} catch(Exception e) {
+			System.out.println(NLS.bind(RCoreMessages.ExecuteRText_1, text, Log.toString(e))); 
+//			StatusLine.error(NLS.bind(TXMUIMessages.ExecuteRText_1, text, Log.toString(e))); 
+			Log.printStackTrace(e);
+		}
+
+		rw.setLog(initState);
+		return Status.OK_STATUS;
+	}
+
+	@Override
+	/**
+	 * Execute script.
+	 *
+	 * @param scriptfile the scriptfile
+	 */
+	public IStatus executeScript(File rFile, HashMap<String, Object> env) {
+		if (!rFile.exists()) {
+			System.err.println(NLS.bind(RCoreMessages.ExecuteScriptR_0, rFile));
+			return Status.CANCEL_STATUS;
+		}
+
+		RWorkspace rw = null;
+		try {
+			rw = RWorkspace.getRWorkspaceInstance();
+		} catch (RWorkspaceException e1) {
+			Log.printStackTrace(e1);
+			return Status.CANCEL_STATUS;
+		}
+		boolean initState = rw.isLogging();
+		rw.setLog(true);
+		try {
+			System.out.println(NLS.bind(RCoreMessages.ExecuteRScript_1, rFile.getName()));
+			long time = System.currentTimeMillis();
+			//execute a file line per line
+
+			//if (TxmPreferences.getBoolean(RPreferencePage.R_REMOTE)) {
+				BufferedReader reader = new BufferedReader(new FileReader(rFile));// create a file reader
+				String line = reader.readLine();// read next line
+				StringBuffer buffer = new StringBuffer();
+				while (line != null) {
+					buffer.append(line+"\n"); //$NON-NLS-1$
+					line = reader.readLine();//read next line
+				}
+				
+				String allScript = buffer.toString();
+				//if (rw.isLogging() && allScript.length() > 0) RConsole.printUser(allScript);
+
+				//String str = rw.userEval(allScript); // evaluate line in R
+				rw.eval(allScript);
+				//if (str != null && rw.isLogging() && str.length() > 0)
+					//RConsole.printServer(str);
+				reader.close();
+//			} else {
+//				String cmd = "source(\""+rFile.getAbsolutePath().replace("\\", "/")+"\")";
+//				if (rw.isLogging())
+//					RConsole.printUser)(cmd);
+//				String str = rw.userEval(cmd);//evaluate line in R
+//				if (rw.isLogging() && str.length() > 0)
+//					RConsole.printServer(cmd);
+//			}
+			System.out.println(RCoreMessages.ExecuteRScript_2+(System.currentTimeMillis()-time)+RCoreMessages.ExecuteRScript_3);
+		} catch(Exception e) {
+			System.out.println(NLS.bind(RCoreMessages.ExecuteScriptR_1, rFile, e)); 
+			//StatusLine.error(NLS.bind(RCoreMessages.ExecuteScriptR_1, rFile, e)); 
+			Log.printStackTrace(e);
+			return Status.CANCEL_STATUS;
+		} finally {
+			rw.setLog(initState);
+		}
+		
+		return Status.OK_STATUS;
+		
+	}
+}

Property changes on: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RScriptEngine.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java	(revision 1147)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java	(revision 1148)
@@ -110,8 +110,9 @@
 					fMin = d.getFmin();
 					vMax = d.getMaxLines();
 					
-					LexicalTable lexicaltable = new LexicalTable(partition, property, fMin, vMax); // use the CAPreferencePage Fmin
-					ahc = new AHC(new CA(lexicaltable));
+					LexicalTable lexicalTable = new LexicalTable(partition); // use the CAPreferencePage Fmin
+					lexicalTable.setParameters(property, fMin, vMax, null);
+					ahc = new AHC(new CA(lexicalTable));
 				}
 				// canceled
 				else {
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java	(revision 1147)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java	(revision 1148)
@@ -99,7 +99,8 @@
 
 					Log.info(NLS.bind(CAUIMessages.ComputeCorrespondanceAnalysis_0, partition, property));
 
-					LexicalTable lexicalTable = new LexicalTable(partition, property, fMin, vMax);
+					LexicalTable lexicalTable = new LexicalTable(partition);
+					lexicalTable.setParameters(property, fMin, vMax, null);
 					ca = new CA(lexicalTable);
 				} else { // aborted
 					return null;
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 1147)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 1148)
@@ -78,7 +78,8 @@
 				// creating from Subcorpus
 				else if (selection instanceof Subcorpus) {
 					Subcorpus corpus = (Subcorpus) selection;
-					lexicalTable = new LexicalTable(corpus, corpus.getDefaultProperty());
+					lexicalTable = new LexicalTable(corpus);
+					lexicalTable.setUnitProperty(corpus.getDefaultProperty());
 				}
 				// creating from Lexical Table
 				else if (selection instanceof LexicalTable) {
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 1147)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 1148)
@@ -231,12 +231,10 @@
 					partTableColumn.pack();
 
 					viewerComparator.addSelectionAdapter(viewer, partTableColumn, ++firstPartColumnIndex);
-					
 				}
 			}
-
 			
-			if(this.getResult().canCompute())	{
+			if(!this.getResult().isDirty())	{
 				
 				typeFrequencyColumn.setText(TXMCoreMessages.common_frequency + " " + SpecificitiesUIMessages.SpecificitiesTableEditor_11 + " " + this.getResult().getCorpusSize()); //$NON-NLS-1$ //$NON-NLS-2$
 				typeFrequencyColumn.setToolTipText(typeFrequencyColumn.getText()); 
@@ -263,6 +261,8 @@
 					tableLines[j] = new Object[] { typeNames[j], new Integer(typeFreq[j]), specFreqs[j], specIndex[j] };
 				}
 				viewer.setInput(tableLines);
+			} else {
+				viewer.setInput(null);
 			}
 
 			// Pack the columns so the label of the sort column is not truncated due of the sorting order arrow display			
Index: tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java
===================================================================
--- tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java	(revision 1147)
+++ tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java	(revision 1148)
@@ -729,7 +729,6 @@
 					/ (conc.getLeftContextSize() + conc.getRightContextSize());
 			this.FA = conc.getNLines();
 			corpus = conc.getCorpus();
-			this.parent = corpus;
 			pQuery = conc.getQuery();
 			// System.out.println("CONC PROPS :"+conc.getViewProperties());
 			pProperties = conc.getKeywordViewProperties();
Index: tmp/org.txm.queryindex.rcp/src/org/txm/functions/queryindex/QueryIndex.java
===================================================================
--- tmp/org.txm.queryindex.rcp/src/org/txm/functions/queryindex/QueryIndex.java	(revision 1147)
+++ tmp/org.txm.queryindex.rcp/src/org/txm/functions/queryindex/QueryIndex.java	(revision 1148)
@@ -322,7 +322,9 @@
 
 		try {
 			LexicalTableImpl lt = new LexicalTableImpl(freqs, rownames, colnames);
-			LexicalTable table = new LexicalTable(partition, partition.getCorpus().getDefaultProperty(), 1, this.getV(), lt);
+			LexicalTable table = new LexicalTable(partition);
+			table.setParameters(partition.getCorpus().getDefaultProperty(), 1, this.getV(), null);
+			table.setData(lt);
 			return table;
 		} catch (Exception e) {
 			Log.printStackTrace(e);
Index: tmp/org.txm.queryindex.rcp/src/org/txm/queryindex/core/functions/QueryIndex.java
===================================================================
--- tmp/org.txm.queryindex.rcp/src/org/txm/queryindex/core/functions/QueryIndex.java	(revision 1147)
+++ tmp/org.txm.queryindex.rcp/src/org/txm/queryindex/core/functions/QueryIndex.java	(revision 1148)
@@ -322,7 +322,9 @@
 
 		try {
 			LexicalTableImpl lt = new LexicalTableImpl(freqs, rownames, colnames);
-			LexicalTable table = new LexicalTable(partition, partition.getCorpus().getDefaultProperty(), 1, this.getV(), lt);
+			LexicalTable table = new LexicalTable(partition);
+			table.setParameters(partition.getCorpus().getDefaultProperty(), 1, this.getV(), null);
+			table.setData(lt);
 			return table;
 		} catch (Exception e) {
 			Log.printStackTrace(e);
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRScript.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRScript.java	(revision 1147)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRScript.java	(revision 1148)
@@ -30,6 +30,7 @@
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
+import java.util.HashMap;
 import java.util.Iterator;
 
 import org.eclipse.core.commands.AbstractHandler;
@@ -48,12 +49,14 @@
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.ide.FileStoreEditorInput;
 import org.txm.Toolbox;
+import org.txm.core.engines.ScriptEnginesManager;
 import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.rcp.StatusLine;
 import org.txm.rcp.editors.TxtEditor;
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.statsengine.r.core.RScriptEngine;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 import org.txm.statsengine.r.rcp.views.RConsole;
@@ -119,68 +122,11 @@
 			LastOpened.set(ID, new File(result));
 		}
 
-		executeScript(result);
+		ScriptEnginesManager.getREngine().executeScript(new File(result), new HashMap<String, Object>());
 		return null;
 	}
-
-	/**
-	 * Execute script.
-	 *
-	 * @param scriptfile the scriptfile
-	 */
-	public static void executeScript(String scriptfile) {
-		File rFile = new File(scriptfile);
-		if (!rFile.exists()) {
-			System.err.println(NLS.bind(TXMUIMessages.ExecuteScriptR_0, rFile));
-			return;
-		}
-
-		RWorkspace rw = null;
-		try {
-			rw = RWorkspace.getRWorkspaceInstance();
-		} catch (RWorkspaceException e1) {
-			org.txm.rcp.utils.Logger.printStackTrace(e1);
-			return;
-		}
-		boolean initState = rw.isLogging();
-		rw.setLog(true);
-		try {
-			System.out.println(NLS.bind(TXMUIMessages.ExecuteRScript_1, rFile.getName()));
-			long time = System.currentTimeMillis();
-			//execute a file line per line
-
-			//if (TxmPreferences.getBoolean(RPreferencePage.R_REMOTE)) {
-				BufferedReader reader = new BufferedReader(new FileReader(rFile));// create a file reader
-				String line = reader.readLine();// read next line
-				StringBuffer buffer = new StringBuffer();
-				while(line != null) {
-					buffer.append(line+"\n"); //$NON-NLS-1$
-					line = reader.readLine();//read next line
-				}
-				
-				String allScript = buffer.toString();
-				//if (rw.isLogging() && allScript.length() > 0) RConsole.printUser(allScript);
-
-				//String str = rw.userEval(allScript); // evaluate line in R
-				rw.eval(allScript);
-				//if (str != null && rw.isLogging() && str.length() > 0)
-					//RConsole.printServer(str);
-				reader.close();
-//			} else {
-//				String cmd = "source(\""+rFile.getAbsolutePath().replace("\\", "/")+"\")";
-//				if (rw.isLogging())
-//					RConsole.printUser)(cmd);
-//				String str = rw.userEval(cmd);//evaluate line in R
-//				if (rw.isLogging() && str.length() > 0)
-//					RConsole.printServer(cmd);
-//			}
-			System.out.println(TXMUIMessages.ExecuteRScript_2+(System.currentTimeMillis()-time)+TXMUIMessages.ExecuteRScript_3);
-		} catch(Exception e) {
-			System.out.println(NLS.bind(TXMUIMessages.ExecuteScriptR_1, rFile, e)); 
-			StatusLine.error(NLS.bind(TXMUIMessages.ExecuteScriptR_1, rFile, e)); 
-			Log.printStackTrace(e);
-		}
-
-		rw.setLog(initState);
+	
+	public static void executeScript(String absolutePath) {
+		ScriptEnginesManager.getREngine().executeScript(new File(absolutePath));
 	}
 }
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRText.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRText.java	(revision 1147)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRText.java	(revision 1148)
@@ -27,6 +27,8 @@
 //
 package org.txm.statsengine.r.rcp.handlers;
 
+import java.io.File;
+
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -34,6 +36,7 @@
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.core.engines.ScriptEnginesManager;
 import org.txm.rcp.StatusLine;
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.statsengine.r.core.RWorkspace;
@@ -65,42 +68,7 @@
 		return null;
 	}
 
-	/**
-	 * Execute text.
-	 *
-	 * @param text the text
-	 * @return the object
-	 */
-	public static Object executeText(String text) {
-		RWorkspace rw = null;
-		try {
-			rw = RWorkspace.getRWorkspaceInstance();
-		} catch (RWorkspaceException e1) {
-			org.txm.rcp.utils.Logger.printStackTrace(e1);
-			return null;
-		}
-		boolean initState = rw.isLogging();
-		rw.setLog(true);
-
-		try {
-			System.out.println(TXMUIMessages.ExecuteRText_0);
-			long time = System.currentTimeMillis();
-			//execute a file line per line
-
-			//String str = rw.userEval(text);//evaluate line in R
-			rw.eval(text);
-//			if (str != null && rw.isLogging() && str.length() > 0)
-//				RConsole.printServer(str);
-			RWorkspace.appendtoEvalLog(text);
-
-			System.out.println(TXMUIMessages.ExecuteRScript_2+(System.currentTimeMillis()-time)+TXMUIMessages.ExecuteRText_2); 
-		} catch(Exception e) {
-			System.out.println(NLS.bind(TXMUIMessages.ExecuteRText_1, text, Log.toString(e))); 
-			StatusLine.error(NLS.bind(TXMUIMessages.ExecuteRText_1, text, Log.toString(e))); 
-			org.txm.rcp.utils.Logger.printStackTrace(e);
-		}
-
-		rw.setLog(initState);
-		return null;
+	public static void executeText(String str) {
+		ScriptEnginesManager.getREngine().executeText(str);
 	}
 }
Index: tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java
===================================================================
--- tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java	(revision 1147)
+++ tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java	(revision 1148)
@@ -96,7 +96,7 @@
 			//org.txm.Toolbox.shutdownSearchEngine();
 			monitor.worked(5);
 
-			GSERunner gse = GSERunner.buildDefaultGSE(mainScript);
+			GSERunner gse = GSERunner.buildDefaultGSE();
 
 			Binding binding = new Binding();
 			binding.setProperty("projectBinding", project); //$NON-NLS-1$
Index: tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java
===================================================================
--- tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java	(revision 1147)
+++ tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java	(revision 1148)
@@ -38,11 +38,11 @@
 	}
 
 	protected static GSERunner defaultGSE;
-	protected static String defaultScriptRootDir = "";
+	protected static File defaultScriptRootDir;
 	
 	public static void clearDefaultGSE() {
 		defaultGSE = null;
-		defaultScriptRootDir = "";
+		defaultScriptRootDir = null;
 	}
 	
 	/**
@@ -52,29 +52,29 @@
 	 * @param script
 	 * @return
 	 */
-	public static GSERunner buildDefaultGSE(File script) {
-		String scriptRootDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/").getAbsolutePath();
+	public static GSERunner buildDefaultGSE() {
+		File rootDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/");
 		// check if script root dir was changed
-		if (defaultScriptRootDir.equals(scriptRootDir) && defaultGSE != null) {
-			try {
-				defaultGSE.getGroovyClassLoader().addURL(script.getParentFile().toURI().toURL());
-			} catch (MalformedURLException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
+		if (defaultScriptRootDir.equals(rootDir) && defaultGSE != null) {
+//			try {
+//				defaultGSE.getGroovyClassLoader().addURL(rootDir.toURI().toURL());
+//			} catch (MalformedURLException e) {
+//				// TODO Auto-generated catch block
+//				e.printStackTrace();
+//			}
 			return defaultGSE;
 		}
 		
-		if (scriptRootDir == null) {
-			scriptRootDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/").getAbsolutePath();
+		if (rootDir == null) {
+			rootDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/");
 		}
 		String[] roots = new String[] { 
-				scriptRootDir+"/user/", //$NON-NLS-1$
-				scriptRootDir+"/system/", //$NON-NLS-1$
+				rootDir.getAbsolutePath()+"/user/", //$NON-NLS-1$
+				rootDir.getAbsolutePath()+"/system/", //$NON-NLS-1$
 		}; 
 
 		try {
-			defaultScriptRootDir = scriptRootDir;
+			defaultScriptRootDir = rootDir;
 			Log.info("GSE roots: "+Arrays.toString(roots));
 			defaultGSE = new GSERunner(roots);
 		} catch (IOException e) {
@@ -94,7 +94,7 @@
 		
 		defaultGSE.setConfig(configuration);
 		
-		File jardir = new File(scriptRootDir,"lib"); //$NON-NLS-1$
+		File jardir = new File(rootDir, "lib"); //$NON-NLS-1$
 		if (jardir.exists() && jardir.isDirectory()) {
 			for (File f: jardir.listFiles(new FilenameFilter() {
 				@Override
@@ -111,7 +111,7 @@
 				}
 			}
 		}	
-		defaultGSE.getGroovyClassLoader().addClasspath(scriptRootDir); // for the .class files if any
+		defaultGSE.getGroovyClassLoader().addClasspath(rootDir.getAbsolutePath()); // for the .class files if any
 		
 		return defaultGSE;
 	}
Index: tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/TXMGroovyScriptEngine.java
===================================================================
--- tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/TXMGroovyScriptEngine.java	(revision 0)
+++ tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/TXMGroovyScriptEngine.java	(revision 1148)
@@ -0,0 +1,47 @@
+package org.txm.groovy.core;
+
+import java.io.File;
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.txm.core.engines.ScriptEngine;
+
+public class TXMGroovyScriptEngine extends ScriptEngine {
+
+	public TXMGroovyScriptEngine() {
+		super("groovy");
+	}
+
+	@Override
+	public boolean isRunning() {
+		return GSERunner.defaultGSE != null;
+	}
+
+	@Override
+	public boolean initialize() throws Exception {
+		return GSERunner.buildDefaultGSE() != null;
+	}
+
+	@Override
+	public boolean start(IProgressMonitor monitor) throws Exception {
+		return true;
+	}
+
+	@Override
+	public boolean stop() throws Exception {
+		GSERunner.clearDefaultGSE();
+		return true;
+	}
+
+	@Override
+	public IStatus executeScript(File script, HashMap<String, Object> env) {
+		return Status.CANCEL_STATUS;
+	}
+	
+	@Override
+	public IStatus executeText(String text, HashMap<String, Object> env) {
+		return Status.CANCEL_STATUS;
+	}
+}

Property changes on: tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/TXMGroovyScriptEngine.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/statsengine/r/data/LexicalTableImpl.java
===================================================================
--- tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/statsengine/r/data/LexicalTableImpl.java	(revision 1147)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/statsengine/r/data/LexicalTableImpl.java	(revision 1148)
@@ -73,7 +73,7 @@
 	/** The sortedindex. */
 	private int[] sortedindex;
 
-	protected ArrayList<Integer> frequencies;
+	//protected ArrayList<Integer> frequencies;
 
 	/**
 	 * Instantiates a new lexical table impl.
Index: tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java
===================================================================
--- tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java	(revision 1147)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java	(revision 1148)
@@ -47,8 +47,6 @@
 	/** stores the R table computed */
 	protected ILexicalTable statsData;
 
-
-
 	/**
 	 * The property.
 	 */
@@ -73,56 +71,55 @@
 	@Parameter(key=LexicalTablePreferences.USE_ALL_OCCURRENCES)
 	protected boolean useAllOccurrences;
 
-	/**
-	 * Build a LexicalTable result with an already computed frequency R table
-	 * 
-	 * @param corpus
-	 * @param analysisProperty
-	 * @param itable
-	 */
-	public LexicalTable(CQPCorpus corpus, WordProperty analysisProperty, ILexicalTable itable) {
-		super(corpus);
-		this.property = analysisProperty;
-		this.statsData = itable;
-	}
+//	/**
+//	 * Build a LexicalTable result with an already computed frequency R table
+//	 * 
+//	 * @param corpus
+//	 * @param analysisProperty
+//	 * @param itable
+//	 */
+//	public LexicalTable(CQPCorpus corpus, WordProperty analysisProperty, ILexicalTable itable) {
+//		super(corpus);
+//		this.property = analysisProperty;
+//		this.statsData = itable;
+//	}
 
+//	/**
+//	 * Build a LexicalTable with the {@link Subcorpus} words and {@link Subcorpus} parent remaining words.
+//	 * 
+//	 * @param corpus
+//	 * @param analysisProperty the property to count
+//	 * @throws Exception
+//	 */
+//	public LexicalTable(Subcorpus corpus, WordProperty analysisProperty) {
+//		this(corpus, analysisProperty, null);
+//	}
 
 	/**
-	 * Build a LexicalTable with the {@link Subcorpus} words and {@link Subcorpus} parent remaining words.
-	 * 
-	 * @param corpus
-	 * @param analysisProperty the property to count
-	 * @throws Exception
-	 */
-	public LexicalTable(Subcorpus corpus, WordProperty analysisProperty) {
-		this(corpus, analysisProperty, null);
-	}
-
-	/**
 	 * Build a LexicalTable with the Subcorpus words and Subcorpus parent remaining words.
 	 * 
 	 * @param corpus
 	 * @throws Exception
 	 */
-	public LexicalTable(Subcorpus corpus) throws Exception {
-		this(corpus, corpus.getDefaultProperty());
+	public LexicalTable(CQPCorpus corpus) throws Exception {
+		//this(corpus, corpus.getDefaultProperty(), null);
+		super(corpus);
 	}
 
+//	/**
+//	 * 
+//	 * @param partition
+//	 * @param analysisProperty
+//	 * @param fMin
+//	 * @param vMax
+//	 * @param iTable
+//	 */
+//	public LexicalTable(Partition partition, WordProperty analysisProperty, int fMin, int vMax, ILexicalTable iTable) {
+//		this(partition, analysisProperty, fMin, vMax, false, iTable);
+//	}
 
 	/**
 	 * 
-	 * @param partition
-	 * @param analysisProperty
-	 * @param fMin
-	 * @param vMax
-	 * @param iTable
-	 */
-	public LexicalTable(Partition partition, WordProperty analysisProperty, int fMin, int vMax, ILexicalTable iTable) {
-		this(partition, analysisProperty, fMin, vMax, false, iTable);
-	}
-
-	/**
-	 * 
 	 * @param index
 	 */
 	public LexicalTable(PartitionIndex index)	{
@@ -137,40 +134,36 @@
 		super(partition);
 	}
 
-	/**
-	 * 
-	 * @param partition
-	 * @param analysisProperty
-	 * @param fMin
-	 * @param vMax
-	 */
-	public LexicalTable(Partition partition, WordProperty analysisProperty, int fMin, int vMax) {
-		this(partition, analysisProperty, fMin, vMax, null);
-	}
+//	/**
+//	 * 
+//	 * @param partition
+//	 * @param analysisProperty
+//	 * @param fMin
+//	 * @param vMax
+//	 */
+//	public LexicalTable(Partition partition, WordProperty analysisProperty, int fMin, int vMax) {
+//		this(partition, analysisProperty, fMin, vMax, null);
+//	}
 
-	/**
-	 * 
-	 * @param parent
-	 * @param analysisProperty
-	 * @param fMin
-	 * @param vMax
-	 * @param useAllOccurrences
-	 * @param iTable
-	 */
-	private LexicalTable(TXMResult parent, WordProperty analysisProperty, int fMin, int vMax, boolean useAllOccurrences, ILexicalTable iTable)	{
-		super(parent);
-		this.setParameters(analysisProperty, fMin, vMax, useAllOccurrences);
-		this.statsData = iTable;
-	}
+//	/**
+//	 * 
+//	 * @param parent
+//	 * @param analysisProperty
+//	 * @param fMin
+//	 * @param vMax
+//	 * @param useAllOccurrences
+//	 * @param iTable
+//	 */
+//	private LexicalTable(TXMResult parent, WordProperty analysisProperty, int fMin, int vMax, boolean useAllOccurrences, ILexicalTable iTable)	{
+//		super(parent);
+//		this.setParameters(analysisProperty, fMin, vMax, useAllOccurrences);
+//		this.statsData = iTable;
+//	}
 
-
-
 	public LexicalTable(String parametersNodePath)	{
 		super(parametersNodePath);
 	}
 
-
-
 	@Override
 	public boolean loadParameters() {
 		try {
@@ -340,7 +333,7 @@
 	@Override
 	protected boolean _compute() throws Exception {
 
-		this.statsData = null; // reset frequencies
+		//this.statsData = null; // reset frequencies
 
 		if (this.parent instanceof Subcorpus) {
 
@@ -663,13 +656,12 @@
 		this.useAllOccurrences = useAllOccurrences;
 	}
 
-
 	@Override
 	public String getResultype() {
 		return LexicalTableCoreMessages.RESULT_TYPE;
 	}
 
-
-
-
+	public void setData(LexicalTableImpl lexicalTableImpl) {
+		this.statsData = lexicalTableImpl;
+	}
 }
