Index: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/functions/TextsBalance.java
===================================================================
--- tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/functions/TextsBalance.java	(revision 525)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/functions/TextsBalance.java	(revision 526)
@@ -14,7 +14,7 @@
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.core.results.TXMResult;
 import org.txm.core.results.TXMParameters;
-import org.txm.functions.TXMCommand;
+
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.txm.searchengine.cqp.AbstractCqiClient;
 import org.txm.searchengine.cqp.CQPEngine;
@@ -36,7 +36,7 @@
  * @author sjacquot
  *
  */
-public class TextsBalance extends TXMCommand {
+public class TextsBalance extends TXMResult {
 	
 	HashMap<Integer, Comparable[]> dataset;
 	
@@ -99,7 +99,7 @@
 	 * @param groupByTexts
 	 * @throws CqiClientException
 	 */
-	public boolean compute(IProgressMonitor watcher) {
+	public boolean _compute() {
 		
 		this.name = su.getName() + "@" + suPropertyName + " (group by texts = " + groupByTexts + ")";
 		if (suPropertyName == null || suPropertyName.length() == 0) return false;
@@ -113,7 +113,6 @@
 			this.values = p.getValues();
 			Collections.sort(values);
 
-
 			//int method = 2;
 			//System.out.println("Method: "+method);
 			//long time = System.currentTimeMillis();
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java	(revision 525)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java	(revision 526)
@@ -605,7 +605,7 @@
 			}
 		}
 
-		// FIXME: method using TXMCommandParameters
+		// FIXME: method using TXMResultParameters
 		final TXMParameters parameters = this.getWidgetsParameters();
 
 		JobHandler jobhandler = new JobHandler(NLS.bind(CooccurrenceUIMessages.CooccurrencesEditor_12, cooc.getCorpus())) {
Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java	(revision 525)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java	(revision 526)
@@ -44,7 +44,7 @@
 import org.eclipse.osgi.util.NLS;
 import org.rosuda.REngine.REXPMismatchException;
 import org.txm.core.results.TXMParameters;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.index.core.functions.LineComparator.SortMode;
 import org.txm.index.core.messages.IndexCoreMessages;
 import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
@@ -71,7 +71,7 @@
  * 
  * @author mdecorde.
  */
-public class Index extends TXMCommand  {
+public class Index extends TXMResult  {
 
 	/** The counts. */
 	protected LinkedHashMap<String, ArrayList<Integer>> counts = new LinkedHashMap<String, ArrayList<Integer>>();
@@ -186,7 +186,7 @@
 	}
 
 	@Override
-	public boolean compute(IProgressMonitor watcher) throws Exception {
+	public boolean _compute() throws Exception {
 		lines.clear();
 		counts.clear();
 		partnames.clear();
@@ -1033,4 +1033,10 @@
 		
 		return true;
 	}
+
+	@Override
+	public boolean saveParameters() {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/diagnostic/Diagnostic.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/diagnostic/Diagnostic.java	(revision 525)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/diagnostic/Diagnostic.java	(revision 526)
@@ -44,8 +44,8 @@
 import org.eclipse.osgi.util.NLS;
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.results.TXMParameters;
+import org.txm.core.results.TXMResult;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.txm.functions.TXMCommand;
 import org.txm.objects.Base;
 import org.txm.searchengine.cqp.AbstractCqiClient;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
@@ -62,7 +62,7 @@
 /**
  * compute a diagnostic of Corpus, sub corpus and partition @ author mdecorde.
  */
-public class Diagnostic extends TXMCommand {
+public class Diagnostic extends TXMResult {
 	// Base base;
 	/** The corpus. */
 	Corpus corpus;
@@ -615,7 +615,7 @@
 	}
 
 	@Override
-	public boolean compute(IProgressMonitor monitor) throws Exception {
+	public boolean _compute() throws Exception {
 		if (monitor != null) monitor.beginTask("Computing informations...", 3);
 		stepGeneralInfos();
 		if (monitor != null) monitor.worked(1);
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/selection/Selection.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/selection/Selection.java	(revision 525)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/selection/Selection.java	(revision 526)
@@ -36,7 +36,7 @@
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
-import org.txm.functions.TXMCommand;
+
 import org.txm.metadatas.Metadata;
 import org.txm.metadatas.MetadataGroup;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
@@ -60,7 +60,7 @@
  * @author mdecorde
  *
  */
-public class Selection extends TXMCommand {
+public class Selection extends TXMResult {
 
 	/** Full selection. */
 	Corpus corpus;
@@ -103,6 +103,7 @@
 	 * @param corpus the corpus
 	 */
 	public Selection(MainCorpus corpus) {
+		super(corpus);
 		// this query returns N results, where N is the number of text
 		this.query = new Query("<text>[]"); //$NON-NLS-1$
 		this.corpus = corpus;
@@ -495,7 +496,7 @@
 	}
 
 	@Override
-	public boolean compute(IProgressMonitor watcher) throws Exception {
+	public boolean _compute() throws Exception {
 		System.out.println("Selection.compute() not implemented");
 		return false;
 	}
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/summary/Summary.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/summary/Summary.java	(revision 525)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/summary/Summary.java	(revision 526)
@@ -5,12 +5,9 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.txm.Toolbox;
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
-import org.txm.functions.TXMCommand;
 import org.txm.objects.Edition;
 import org.txm.objects.Page;
 import org.txm.objects.Text;
@@ -23,14 +20,14 @@
 import org.txm.searchengine.cqp.corpus.query.Query;
 import org.txm.searchengine.cqp.serverException.CqiServerError;
 
-public class Summary extends TXMCommand {
+public class Summary extends TXMResult {
 	
 	MainCorpus corpus;
 	TreeNode treenodes = new TreeNode("root"); //$NON-NLS-1$
 	private ArrayList<StructuralUnitProperty> properties;
 
-	public Summary(MainCorpus corpus)
-	{
+	public Summary(MainCorpus corpus) {
+		super(corpus);
 		this.corpus = corpus;
 	}
 
@@ -268,7 +265,7 @@
 	}
 
 	@Override
-	public boolean compute(IProgressMonitor watcher) throws Exception {
+	public boolean _compute() throws Exception {
 		System.out.println("Summary.compute() not implemented");
 		return false;
 	}
@@ -283,4 +280,10 @@
 	public boolean setParameters(TXMParameters parameters) {
 		return false;
 	}
+
+	@Override
+	public boolean saveParameters() {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/preview/Preview.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/preview/Preview.java	(revision 525)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/preview/Preview.java	(revision 526)
@@ -7,13 +7,13 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
-import org.txm.functions.TXMCommand;
+
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.query.Match;
 
-public class Preview extends TXMCommand {
+public class Preview extends TXMResult {
 	
 	private Corpus corpus;
 	private Partition partition;
@@ -21,15 +21,15 @@
 	
 	private int n;
 	
-	public Preview(Corpus corpus, Property prop, int n) {
+	public Preview(Corpus corpus, int n) {
+		super(corpus);
 		this.corpus = corpus;
-		this.prop = prop;
 		this.n = n;
 	}
 	
-	public Preview(Partition partition, Property prop, int n) {
+	public Preview(Partition partition, int n) {
+		super(partition);
 		this.partition = partition;
-		this.prop = prop;
 		this.n = n;
 	}
 	
@@ -94,7 +94,7 @@
 	}
 
 	@Override
-	public boolean compute(IProgressMonitor watcher) throws Exception {
+	public boolean _compute() throws Exception {
 		if (partition != null) {
 			return computePartition();
 		} else {
@@ -112,4 +112,10 @@
 	public boolean setParameters(TXMParameters parameters) {
 		return false;
 	}
+
+	@Override
+	public boolean saveParameters() {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java	(revision 525)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java	(revision 526)
@@ -569,4 +569,16 @@
 	public boolean validateParameters() {
 		return true;
 	}
+
+	@Override
+	public boolean _compute() throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public boolean toTxt(File arg0, String arg1, String arg2, String arg3) throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java	(revision 525)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java	(revision 526)
@@ -27,6 +27,7 @@
 //
 package org.txm.searchengine.cqp.corpus;
 
+import java.io.File;
 import java.text.Collator;
 import java.text.DateFormat;
 import java.text.ParseException;
@@ -84,12 +85,9 @@
 
 	public static Integer SUBCORPUS_COUNTER = new Integer(0);
 	
-
-	
 	int totalsize = -1;
 	int[] partSizes;
 
-	
 	public String toString() {
 		if (name != null) return name;
 		return super.toString();
@@ -722,4 +720,16 @@
 	public boolean validateParameters() {
 		return getCorpus() != null;
 	}
+
+	@Override
+	public boolean _compute() throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public boolean toTxt(File arg0, String arg1, String arg2, String arg3) throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.referencer.core/src/org/txm/functions/referencer/Referencer.java
===================================================================
--- tmp/org.txm.referencer.core/src/org/txm/functions/referencer/Referencer.java	(revision 525)
+++ tmp/org.txm.referencer.core/src/org/txm/functions/referencer/Referencer.java	(revision 526)
@@ -59,7 +59,7 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.results.TXMParameters;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.searchengine.cqp.AbstractCqiClient;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
@@ -76,7 +76,7 @@
 /**
  * The Class Referencer computes the references of a query
  */
-public class Referencer extends TXMCommand  {
+public class Referencer extends TXMResult  {
 
 	/** The noref. */
 	protected static int noref = 1;
@@ -202,7 +202,7 @@
 	 *
 	 * @return true, if successful
 	 */
-	public boolean compute(IProgressMonitor monitor)
+	public boolean _compute()
 	{
 		try {
 			if (this.parent == null || pQuery == null || pPattern == null || pProperty == null)
Index: tmp/org.txm.lexicaltable.core/src/org/txm/functions/intertextualdistance/InterTextDistance.java
===================================================================
--- tmp/org.txm.lexicaltable.core/src/org/txm/functions/intertextualdistance/InterTextDistance.java	(revision 525)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/functions/intertextualdistance/InterTextDistance.java	(revision 526)
@@ -8,11 +8,11 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.rosuda.REngine.REXP;
 import org.txm.core.results.TXMParameters;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.lexicaltable.core.statsengine.data.ILexicalTable;
 import org.txm.statsengine.r.core.RWorkspace;
 
-public class InterTextDistance extends TXMCommand {
+public class InterTextDistance {
 
 	ILexicalTable table;
 	String pMethod = "euclidian"; //$NON-NLS-1$
@@ -22,8 +22,7 @@
 	}
 
 
-	@Override
-	public boolean compute(IProgressMonitor watcher) {
+	public boolean _compute() {
 		try {
 			//		Corpus corpus = CorpusManager.getCorpusManager().getCorpus("VOEUX");
 			//		String method = "euclidean"; // "euclidean"’, ‘"maximum"’, ‘"manhattan"’, ‘"canberra"’, ‘"binary"’ or ‘"minkowski"’
@@ -62,43 +61,4 @@
 	public String getLabel() {
 		return pMethod;
 	}
-	@Override
-	public void clean() {
-		// TODO Auto-generated method stub
-
-	}
-	@Override
-	public boolean toTxt(File outfile, String encoding, String colseparator,
-			String txtseparator) throws Exception {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public String getName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-	@Override
-	public String getSimpleName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-	@Override
-	public String getDetails() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-
-	@Override
-	public boolean validateParameters() {
-		return table != null;
-	}
-
-
-	@Override
-	public boolean setParameters(TXMParameters parameters) {
-		return false;
-	}
 }
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 525)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java	(revision 526)
@@ -10,7 +10,6 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
-import org.txm.functions.TXMCommand;
 import org.txm.index.core.functions.Index;
 import org.txm.index.core.functions.Line;
 import org.txm.lexicaltable.core.messages.LexicalTableCoreMessages;
@@ -33,7 +32,7 @@
  * @author mdecorde
  *
  */
-public class LexicalTable extends TXMCommand {
+public class LexicalTable extends TXMResult {
 	
 	/** The constructor_fmin. */
 	private int pFminFilter;
@@ -62,7 +61,7 @@
 	}
 	
 	@Override
-	public boolean compute(IProgressMonitor watcher) throws Exception {
+	public boolean _compute() throws Exception {
 		System.out.println("LexicalTable.compute() not implemented");
 		return false;
 	}
@@ -81,7 +80,7 @@
 	}
 
 	public LexicalTable(Lexicon corpusLexicon, Lexicon subcorpusLexicon) throws StatException {
-		super();
+		super(corpusLexicon.getCorpus());
 		
 		data = new LexicalTableImpl(corpusLexicon.getName()+ "minus" + subcorpusLexicon.getName(), corpusLexicon, subcorpusLexicon);
 		
@@ -101,7 +100,7 @@
 	 */
 	public LexicalTable(List<Index> vocabularies, String symbol, boolean useAllOccurrences)
 					throws RWorkspaceException {
-
+		super(vocabularies.get(0));
 		System.out.println(LexicalTableCoreMessages.LexicalTableImpl_1 + vocabularies);
 		Index partindex = vocabularies.get(0);// FRIGO
 		if (!partindex.isComputedWithPartition())
@@ -201,6 +200,7 @@
 	}
 
 	public LexicalTable(Corpus corpus, Property analysisProperty, LexicalTableImpl itable) {
+		super(corpus);
 		this.corpus = corpus;
 		this.pProperty = analysisProperty;
 		this.data = itable;
@@ -216,8 +216,6 @@
 		}
 	}
 	
-	
-	
 	public Vector getColMarginsVector() throws StatException {
 		return data.getColMarginsVector();
 	}
@@ -314,11 +312,17 @@
 	
 	@Override
 	public boolean validateParameters() {
-		return corpus != null || partition != null;
+		return corpus != null || partition != null; // can be computed on partition or corpus
 	}
 
 	@Override
 	public boolean setParameters(TXMParameters parameters) {
 		return false;
 	}
+
+	@Override
+	public boolean saveParameters() {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.core/src/java/org/txm/functions/TXMCommand.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/functions/TXMCommand.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/functions/TXMCommand.java	(revision 526)
@@ -1,221 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-// 
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-// 
-// The TXM platform is distributed in the hope that it will be
-// useful, but WITHOUT ANY WARRANTY; without even the implied
-// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-// PURPOSE. See the GNU General Public License for more
-// details.
-// 
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-// 
-// 
-// 
-// $LastChangedDate: 2016-09-19 10:31:00 +0200 (Mon, 19 Sep 2016) $
-// $LastChangedRevision: 3298 $
-// $LastChangedBy: mdecorde $ 
-//
-package org.txm.functions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.concurrent.Semaphore;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.txm.core.results.TXMParameters;
-import org.txm.core.results.TXMResult;
-import org.txm.utils.logger.Log;
-
-/**
- * 
- * A TXMResult that is able to compute itself using parameters and with or not a monitor
- * 
- * if setCurrentMonitor is called, then the IProgressMonitor methods will work.
- * 
- * Has methods to interact with a ProcessWatcher: set work amount, set messages, acquire/release interruption semaphore.
- * 
- * Call order :
- * MyCommand cmd = new MyCommand(parent)
- * cmd.setParameters(param1, param2, param3) OR cmd.setParameters(parameters) // parameters = new TXMParameters
- * if (cmd.validateParameters())
- * 		cmd.compute() OR cmd.compute(monitor) // if any IProgressMonitor available
- * 
- * @author mdecorde
- * @author nkredens
- */
-public abstract class TXMCommand extends TXMResult implements IProgressMonitor {
-
-	/**
-	 * if set, allows the command to notify its progress
-	 */
-	protected IProgressMonitor monitor;
-	
-	public TXMCommand() {
-		super();
-	}
-
-	public TXMCommand(TXMResult parent) {
-		super(parent);
-	}
-
-	public TXMCommand(TXMResult parent, TXMParameters parameters) {
-		super(parent, parameters);
-	}
-
-	Semaphore progressSemaphore = new Semaphore(1);
-	public void acquireSemaphore() {
-		try {
-			this.progressSemaphore.acquire();
-		} catch (InterruptedException e) {
-			Log.printStackTrace(e);
-		}
-	}
-	
-	/**
-	 * Computes the result according to specified command parameters.
-	 * 
-	 * @param parameters
-	 * @return
-	 */
-	public boolean compute() throws Exception {
-		return this.compute(null);
-	}
-	
-	/**
-	 * Computes the result according to stored command parameters.
-	 * 
-	 * @param watcher
-	 * @return
-	 * @throws InvalidCqpIdException 
-	 * @throws CqiServerError 
-	 * @throws CqiClientException 
-	 * @throws IOException 
-	 */
-	public abstract boolean compute(IProgressMonitor watcher) throws Exception;
-	
-// //removed for now, waiting to see if used
-//	/**
-//	 * Computes the result according to specified command parameters.
-//	 * @param watcher
-//	 * @param parameters
-//	 * @return
-//	 */
-//	public boolean compute(IProgressMonitor watcher, TXMParameters parameters) throws Exception {
-//		this.parameters = parameters;
-//		return this.compute(watcher);
-//	}
-	
-	/**
-	 * 
-	 * @return the array of extensions to show in the FileDialog SWT widget
-	 */
-	@Deprecated
-	//FIXME: should be moved in an exporter extension
-	public String[] getExportTXTExtensions() {
-		return new String[]{"*.csv"};
-	}
-	
-	/**
-	 * 
-	 * @return true if the monitor has been canceled by the user
-	 */
-	public boolean isCanceled() {
-		if (monitor != null) {
-			return monitor.isCanceled();
-		}
-		return false;
-	}
-	
-	/**
-	 * 
-	 * @return the parent Object that contains this result
-	 */
-	@Deprecated
-	// FIXME: to remove when TXMResult2 will be fully implemented
-	//public abstract HasResults getHasResultsParent();
-	
-	public boolean tryAcquireSemaphore() {
-		return this.progressSemaphore.tryAcquire();
-	}
-
-	public void releaseSemaphore() {
-		this.progressSemaphore.release();
-	}
-	
-	/**
-	 * You must set the current monitor to be available to manage the process progress
-	 * @param monitor can be null
-	 */
-	public void setCurrentMonitor(IProgressMonitor monitor) {
-		this.monitor = monitor;
-	}
-	
-	//public abstract boolean toTxt(File file, String encoding) throws Exception;
-	@Deprecated
-	//FIXME: should be moved in an exporter extension
-	public abstract boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception;
-	
-	/**
-	 * increment the process 
-	 * @param amount of work
-	 */
-	public void worked(int amount) {
-		if (monitor != null) {
-			//System.out.println("worked "+amount);
-			monitor.worked(amount);
-		}
-	}
-
-	/**
-	 * increment the progress and show a message
-	 * 
-	 * @param amount
-	 * @param message
-	 */
-	public void worked(int amount, String message) {
-		if (monitor != null) {
-			monitor.worked(amount);
-			monitor.subTask(message);
-		}
-	}
-
-	@Override
-	public void beginTask(String name, int totalWork) {
-		if (monitor != null) monitor.beginTask(name, totalWork);
-	}
-
-	@Override
-	public void done() {
-		if (monitor != null) monitor.done();
-	}
-
-	@Override
-	public void internalWorked(double work) {
-		if (monitor != null) monitor.internalWorked(work);
-	}
-
-	@Override
-	public void setCanceled(boolean value) {
-		if (monitor != null) monitor.setCanceled(value);
-	}
-
-	@Override
-	public void setTaskName(String name) {
-		if (monitor != null) monitor.setTaskName(name);
-	}
-
-	@Override
-	public void subTask(String name) {
-		if (monitor != null) monitor.subTask(name);
-	}		
-}
Index: tmp/org.txm.core/src/java/org/txm/functions/Command.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/functions/Command.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/functions/Command.java	(revision 526)
@@ -13,16 +13,16 @@
 public class Command {
 	
 	public final String cmd;
-	public final Class<TXMCommand> clazz;
+	public final Class<TXMResult> clazz;
 	public final HashSet<String> mandatoryParameters = new HashSet<String>();
 	public final HashSet<String> optionalParameters = new HashSet<String>();
 	
-	public Command(Class<TXMCommand> clazz) {
+	public Command(Class<TXMResult> clazz) {
 		this.cmd = clazz.getSimpleName();
 		this.clazz = clazz;
 	}
 	
-	public Command(String cmd, Class<TXMCommand> clazz) {
+	public Command(String cmd, Class<TXMResult> clazz) {
 		this.cmd = cmd;
 		this.clazz = clazz;
 	}
Index: tmp/org.txm.core/src/java/org/txm/functions/CommandsAPI.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/functions/CommandsAPI.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/functions/CommandsAPI.java	(revision 526)
@@ -10,7 +10,7 @@
 /**
  * API to all knowned TXM commands.
  * 
- * Initialized during Toolbox initialisation using the TXMCommand extension point
+ * Initialized during Toolbox initialisation using the TXMResult extension point
  * 
  * For now a command is :
  * - an ID
@@ -25,7 +25,7 @@
 	
 	protected static final HashMap<String, Command> cmds = new HashMap<String, Command>();
 	
-	public static void install(String cmd, Class<TXMCommand> clazz) {
+	public static void install(String cmd, Class<TXMResult> clazz) {
 		CommandsAPI.cmds.put(cmd, new Command(cmd,clazz));
 	}
 	
@@ -50,7 +50,7 @@
 	 * @param clazz
 	 * @param mandatory_parameters
 	 */
-	public static void install(String cmd, Class<TXMCommand> clazz, HashSet<String> mandatoryParameters) {
+	public static void install(String cmd, Class<TXMResult> clazz, HashSet<String> mandatoryParameters) {
 		Command command = new Command(cmd,clazz);
 		command.mandatoryParameters.addAll(mandatoryParameters);
 		CommandsAPI.cmds.put(cmd, command);
@@ -64,7 +64,7 @@
 	 * @param mandatory_parameters
 	 * @param optional_parameters
 	 */
-	public static void install(String cmd, Class<TXMCommand> clazz, HashSet<String> mandatoryParameters, HashSet<String> optionalParameters) {
+	public static void install(String cmd, Class<TXMResult> clazz, HashSet<String> mandatoryParameters, HashSet<String> optionalParameters) {
 		Command command = new Command(cmd,clazz);
 		command.mandatoryParameters.addAll(mandatoryParameters);
 		command.optionalParameters.addAll(optionalParameters);
@@ -90,7 +90,7 @@
 		}
 		
 		// compute directly the command using the parameters 
-		TXMCommand result = null;
+		TXMResult result = null;
 		try {
 			if (command.mandatoryParameters.containsAll(parameters.keySet())) {
 				System.out.println("Computing "+command.cmd+"...");
Index: tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 526)
@@ -173,7 +173,7 @@
 	 * @return
 	 */
 	//FIXME: does not work, need to test furthermore
-	//	public static Object get(TXMCommandParameters commandParameters, TXMResult result, String nodeQualifier, String key)	{
+	//	public static Object get(TXMResultParameters commandParameters, TXMResult result, String nodeQualifier, String key)	{
 	//
 	//
 	//		if(commandParameters != null && commandParameters.get(key) != null)	{
Index: tmp/org.txm.core/src/java/org/txm/core/results/TXMParameters.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/results/TXMParameters.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMParameters.java	(revision 526)
@@ -27,7 +27,7 @@
 		while (it.hasNext()) {
 		   Object key = it.next();
 		   Object value = this.get(key);
-		   System.out.println("TXMCommandParameters.dump(): key = " + key + " / value = " + value);
+		   System.out.println("TXMResultParameters.dump(): key = " + key + " / value = " + value);
 		}
 	}
 }
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 525)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 526)
@@ -4,15 +4,19 @@
 package org.txm.core.results;
 
 import java.io.File;
+import java.io.IOException;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.UUID;
+import java.util.concurrent.Semaphore;
 
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.osgi.framework.FrameworkUtil;
 import org.osgi.service.prefs.BackingStoreException;
 import org.txm.core.preferences.TXMPreferences;
+import org.txm.utils.logger.Log;
 
 /**
  * Root class of all TXM results.
@@ -24,7 +28,7 @@
  *
  */
 //FIXME: At this moment, an empty list is created for children, to not return null when calling getChildren(), see if that's what we want 
-public abstract class TXMResult implements Cloneable {
+public abstract class TXMResult implements Cloneable, IProgressMonitor {
 
 	/**
 	 * Unique ID of the object built with : class + date + number
@@ -73,13 +77,6 @@
 	protected String preferencesNodeQualifier;
 
 	/**
-	 * Creates a new TXMResult with no parent.
-	 */
-	public TXMResult() {
-		this(null);
-	}
-
-	/**
 	 * Creates a new TXMResult, child of the specified parent.
 	 * @param parent
 	 */
@@ -118,6 +115,7 @@
 		this.preferencesNodeQualifier = FrameworkUtil.getBundle(getClass()).getSymbolicName();
 		this.parameters = parameters;
 
+		this.constructorCalled = true; // if not set the compute method will always return false
 		//FIXME: Debug
 		//System.out.println("TXMResult.TXMResult(): default preferences node qualifier = " + this.preferencesNodeQualifier + ", class = " + getClass());
 	}
@@ -189,8 +187,16 @@
 		return TXMPreferences.getString(key, this.parameters, this, this.preferencesNodeQualifier);
 	}
 
-	public void saveParameters() {
-		TXMPreferences.putLocalParameters(this, this.parameters);
+	/**
+	 * Read the parameter stored in the Java class membres : the pXXXXX named members
+	 * 
+	 * Commands must define this method to persist their parameters
+	 * 
+	 * just return 'true' if you don't want to bother with this
+	 * @return
+	 */
+	public boolean saveParameters() {
+		return true; // true means the compute method will not fail
 	}
 
 	/**
@@ -601,4 +607,174 @@
 	public String getSimpleDetails() {
 		return this.getDetails().replace("\n", "  ");
 	}
+	
+	/**
+	 * if set, allows the command to notify its progress
+	 */
+	protected IProgressMonitor monitor;
+	
+	Semaphore progressSemaphore = new Semaphore(1);
+	/**
+	 * This variable ensure the TXMResult class constructor has been called
+	 */
+	private boolean constructorCalled;
+	
+	public void acquireSemaphore() {
+		try {
+			this.progressSemaphore.acquire();
+		} catch (InterruptedException e) {
+			Log.printStackTrace(e);
+		}
+	}
+	
+	/**
+	 * Computes the result according to specified command parameters.
+	 * 
+	 * @param parameters
+	 * @return
+	 */
+	public boolean compute() throws Exception {
+		return this.compute(null);
+	}
+	
+	/**
+	 * Computes the result according to stored command parameters.
+	 * 
+	 * @param watcher
+	 * @return
+	 * @throws Exception 
+	 * @throws InvalidCqpIdException 
+	 * @throws CqiServerError 
+	 * @throws CqiClientException 
+	 * @throws IOException 
+	 */
+	public boolean compute(IProgressMonitor monitor) throws Exception {
+		return hasBeenConstructorCalled() && setCurrentMonitor(monitor) && validateParameters() &&  _compute() && saveParameters();
+	}
+	
+	private boolean hasBeenConstructorCalled() {
+		// TODO Auto-generated method stub
+		return constructorCalled;
+	}
+
+	public abstract boolean _compute() throws Exception;
+	
+// //removed for now, waiting to see if used
+//	/**
+//	 * Computes the result according to specified command parameters.
+//	 * @param watcher
+//	 * @param parameters
+//	 * @return
+//	 */
+//	public boolean compute(IProgressMonitor watcher, TXMParameters parameters) throws Exception {
+//		this.parameters = parameters;
+//		return this.compute(watcher);
+//	}
+	
+	/**
+	 * 
+	 * @return the array of extensions to show in the FileDialog SWT widget
+	 */
+	@Deprecated
+	//FIXME: should be moved in an exporter extension
+	public String[] getExportTXTExtensions() {
+		return new String[]{"*.csv"};
+	}
+	
+	/**
+	 * 
+	 * @return true if the monitor has been canceled by the user
+	 */
+	public boolean isCanceled() {
+		if (monitor != null) {
+			return monitor.isCanceled();
+		}
+		return false;
+	}
+	
+	/**
+	 * 
+	 * @return the parent Object that contains this result
+	 */
+	@Deprecated
+	// FIXME: to remove when TXMResult2 will be fully implemented
+	//public abstract HasResults getHasResultsParent();
+	
+	public boolean tryAcquireSemaphore() {
+		return this.progressSemaphore.tryAcquire();
+	}
+
+	public void releaseSemaphore() {
+		this.progressSemaphore.release();
+	}
+	
+	/**
+	 * You must set the current monitor to be available to manage the process progress
+	 * @param monitor can be null
+	 */
+	public boolean setCurrentMonitor(IProgressMonitor monitor) {
+		if (monitor == null) return false;
+		if (monitor.isCanceled()) return false;
+		this.monitor = monitor;
+		return true;
+	}
+	
+	//public abstract boolean toTxt(File file, String encoding) throws Exception;
+	@Deprecated
+	//FIXME: should be moved in an exporter extension
+	public abstract boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception;
+	
+	/**
+	 * increment the process 
+	 * @param amount of work
+	 */
+	public void worked(int amount) {
+		if (monitor != null) {
+			//System.out.println("worked "+amount);
+			monitor.worked(amount);
+		}
+	}
+
+	/**
+	 * increment the progress and show a message
+	 * 
+	 * @param amount
+	 * @param message
+	 */
+	public void worked(int amount, String message) {
+		if (monitor != null) {
+			monitor.worked(amount);
+			monitor.subTask(message);
+		}
+	}
+
+	@Override
+	public void beginTask(String name, int totalWork) {
+		if (monitor != null) monitor.beginTask(name, totalWork);
+	}
+
+	@Override
+	public void done() {
+		if (monitor != null) monitor.done();
+	}
+
+	@Override
+	public void internalWorked(double work) {
+		if (monitor != null) monitor.internalWorked(work);
+	}
+
+	@Override
+	public void setCanceled(boolean value) {
+		if (monitor != null) monitor.setCanceled(value);
+	}
+
+	@Override
+	public void setTaskName(String name) {
+		if (monitor != null) monitor.setTaskName(name);
+	}
+
+	@Override
+	public void subTask(String name) {
+		if (monitor != null) monitor.subTask(name);
+	}	
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Script.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Script.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Script.java	(revision 526)
@@ -74,6 +74,7 @@
 	 * @param script the script
 	 */
 	public Script(Base b, Element script) {
+		super(b);
 		this.setPath(b.getPath() + getName());
 		setSelfElement(script);
 		base = b;
Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 526)
@@ -74,6 +74,7 @@
 	 * @param project the project
 	 */
 	public Project(Workspace workspace, Element project) {
+		super(workspace);
 		this.workspace = workspace;
 		setSelfElement(project);
 		load();
@@ -146,23 +147,6 @@
 					}
 				} 
 
-//TODO: errrkk why?
-//				int iname = 2;
-//				String originalName = name;
-//				while (loaded.contains(name) && iname < 10) { // building new name if duplicated
-//					name = originalName + (iname++);
-//				} 
-//				if (iname > 2) { // name was fixed
-//					System.out.println(Messages.bind(Messages.Project_3,name));
-//					if (iname > 10) { // too much duplicates
-//						System.out.println(Messages.Project_4+name);
-//						basesElem.removeChild(base);
-//					} else {
-//						base.setAttribute(NAME, name);
-//						System.out.println(Messages.Project_16+originalName+" "+name); //$NON-NLS-2$
-//					}
-//				}
-
 				if (PARAMS.exists() && PARAMS.canRead()) {
 
 					BaseParameters parameters = new BaseParameters(PARAMS);
@@ -304,17 +288,6 @@
 					System.out.println("DATAc: "+DATAc+" : "+DATAc.exists()); //$NON-NLS-1$ //$NON-NLS-2$
 					continue;
 				}
-
-//				// patch registry // no more needed, CQP registry path is now a list of registry paths
-//				File txmregistry = new File(Toolbox.getParam(Toolbox.CQI_SERVER_PATH_TO_REGISTRY));
-//				if (!txmregistry.exists()) {
-//					System.out.println(Messages.Project_25+txmregistry);
-//					Log.severe(Messages.Project_25+txmregistry);
-//					return null;
-//				}
-				// the registry path need to be patched, because CQP does NOT manage relative paths (or we don't know how to manage it :))
-				//System.out.println("Updating "+REGISTRYc+" with "+DATAc);
-				//PatchCwbRegistry.patch(REGISTRYc, DATAc);
 			}
 
 			return b;
@@ -392,46 +365,6 @@
 		return bases.values();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#getChildren()
-	 */
-	public List<TxmObject> getChildren() {
-		List<TxmObject> rez = new ArrayList<TxmObject>();
-		rez.addAll(this.getBases());
-		return rez;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#removeChildren(org.txm.objects.TxmObject)
-	 */
-	public TxmObject removeChildren(TxmObject o) {
-		if (o == null)
-			return null;
-		if (o instanceof Base) {
-			removeBase(((Base)o).getName());
-		}
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#hasChildren(org.txm.objects.TxmObject)
-	 */
-	public boolean hasChildren(TxmObject o) {
-		if (o == null)
-			return false;
-		if (o instanceof Base)
-			return bases.containsKey(((Base) o).getName());
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#getParent()
-	 */
-	@Override
-	public TxmObject getParent() {
-		return getWorkspace();
-	}
-
 	/**
 	 * Gets the base names.
 	 *
@@ -440,28 +373,4 @@
 	public List<String> getBaseNames() {
 		return new ArrayList<String>(this.bases.keySet());
 	}
-
-	@Override
-	public String getSimpleName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getDetails() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void clean() {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public boolean validateParameters() {
-		// TODO Auto-generated method stub
-		return false;
-	}
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Partition.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Partition.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Partition.java	(revision 526)
@@ -27,34 +27,22 @@
 //
 package org.txm.objects;
 
-import java.util.List;
 
+
 // TODO: Auto-generated Javadoc
 /**
  * The Class Partition.
  */
 public class Partition extends TxmObject {
 
+	public Partition(Corpus parent) {
+		super(parent);
+	}
+
 	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = 1921103951325044667L;
 
 	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#getChildren()
-	 */
-	public List<TxmObject> getChildren() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#hasChildren(org.txm.objects.TxmObject)
-	 */
-	public boolean hasChildren(TxmObject children) {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	/* (non-Javadoc)
 	 * @see org.txm.objects.TxmObject#load()
 	 */
 	@Override
@@ -65,14 +53,6 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#removeChildren(org.txm.objects.TxmObject)
-	 */
-	public TxmObject removeChildren(TxmObject children) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
 	 * @see org.txm.objects.TxmObject#save()
 	 */
 	@Override
@@ -81,33 +61,4 @@
 		return false;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#getParent()
-	 */
-	@Override
-	public TxmObject getParent() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getSimpleName() {
-		return getName();
-	}
-
-	@Override
-	public String getDetails() {
-		return getName();
-	}
-
-	@Override
-	public void clean() {
-		
-	}
-
-	@Override
-	public boolean validateParameters() {
-		return true;
-	}
-
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Base.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Base.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Base.java	(revision 526)
@@ -78,6 +78,7 @@
 	 * @param parameters the b
 	 */
 	public Base(Project project, BaseParameters parameters) {
+		super(project);
 		this.setPath(project.getPath() + getName());
 		params = parameters;
 		setSelfElement(params.root);
@@ -152,11 +153,11 @@
 			String from = split[1].trim();
 			String to = split[2].trim();
 
-			Alignement align = new Alignement(from, to, 
+			Alignement align = new Alignement(this, from, to, 
 					link.getAttribute("alignElement"), Integer.parseInt(link.getAttribute("alignLevel"))); //$NON-NLS-1$ //$NON-NLS-2$
 			links.put("#"+from+" #"+to, align); //$NON-NLS-1$ //$NON-NLS-2$
 
-			align = new Alignement(to, from, 
+			align = new Alignement(this, to, from, 
 					link.getAttribute("alignElement"), Integer.parseInt(link.getAttribute("alignLevel"))); //$NON-NLS-1$ //$NON-NLS-2$
 			links.put("#"+to+" #"+from, align); //$NON-NLS-1$ //$NON-NLS-2$
 		}
@@ -350,24 +351,4 @@
 	public BaseParameters getBaseParameters() {
 		return params;
 	}
-
-	@Override
-	public String getSimpleName() {
-		return getName();
-	}
-
-	@Override
-	public String getDetails() {
-		return getName();
-	}
-
-	@Override
-	public void clean() {
-		
-	}
-
-	@Override
-	public boolean validateParameters() {
-		return true;
-	}
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Corpus.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Corpus.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Corpus.java	(revision 526)
@@ -996,8 +996,8 @@
 	 * @param c the c
 	 */
 	public Corpus(Base base, Element c) {
-		if(base != null && c != null)
-		{
+		super(base);
+		if(base != null && c != null) {
 			this.base = base;
 			this.setPath(base.getPath() + getName());
 			setSelfElement(c);
Index: tmp/org.txm.core/src/java/org/txm/objects/Page.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Page.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Page.java	(revision 526)
@@ -65,6 +65,7 @@
 	 * @param page the page
 	 */
 	public Page(Edition edition, Element page) {
+		super(edition);
 		this.setPath(edition.getPath() + getName());
 		setSelfElement(page);
 		this.edition = edition;
@@ -170,37 +171,8 @@
 		this.getSelfElement().setAttribute("id", name); //$NON-NLS-1$
 	}
 
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#getChildren()
-	 */
-	public List<TxmObject> getChildren() {
-		List<TxmObject> rez = new ArrayList<TxmObject>();
-		return rez;
-	}
 
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#removeChildren(org.txm.objects.TxmObject)
-	 */
-	public TxmObject removeChildren(TxmObject o) {
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#hasChildren(org.txm.objects.TxmObject)
-	 */
-	public boolean hasChildren(TxmObject o) {
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#getParent()
-	 */
 	@Override
-	public TxmObject getParent() {
-		return getEdition();
-	}
-
-	@Override
 	public boolean save() {
 		// TODO Auto-generated method stub
 		return false;
@@ -213,25 +185,4 @@
 	public String toString() {
 		return "Page [name="+name+", htmlfile="+htmlfile +", firstWordId="+firstWordId+"]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 	}
-
-	@Override
-	public String getSimpleName() {
-		return getName();
-	}
-
-	@Override
-	public String getDetails() {
-		return getName();
-	}
-
-	@Override
-	public void clean() {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public boolean validateParameters() {
-		return true;
-	}
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Alignement.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Alignement.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Alignement.java	(revision 526)
@@ -1,9 +1,6 @@
 package org.txm.objects;
 
-import java.util.List;
 
-import org.txm.core.results.TXMParameters;
-
 /**
  * not used ?
  * deprecated ?
@@ -13,75 +10,28 @@
  */
 public class Alignement extends TxmObject {
 
+	private static final long serialVersionUID = -8729114900304447071L;
+	
 	String from, to , struct;
 	int level;
 	
-	public Alignement(String from2, String to2, String struct2, int level2) {
+	public Alignement(Base base, String from2, String to2, String struct2, int level2) {
+		super(base);
 		from = from2;
 		to = to2;
 		struct = struct2;
 		level= level2;
 	}
 
-	public List<? extends TxmObject> getChildren() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public TxmObject removeChildren(TxmObject children) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public boolean hasChildren(TxmObject children) {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
 	@Override
-	public TxmObject getParent() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
 	public boolean load() {
-		// TODO Auto-generated method stub
+		// TODO should read the members from the Element attributes
 		return false;
 	}
 
 	@Override
 	public boolean save() {
-		// TODO Auto-generated method stub
+		// TODO should write the members to the Element attributes
 		return false;
 	}
-
-	@Override
-	public String getSimpleName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getDetails() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void clean() {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public boolean validateParameters() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public boolean setParameters(TXMParameters parameters) {
-		return false;
-	}
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Text.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Text.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Text.java	(revision 526)
@@ -73,6 +73,7 @@
 	 * @param text the text
 	 */
 	public Text(Corpus corpus, Element text) {
+		super(corpus);
 		this.setPath(corpus.getPath() + getName());
 		this.corpus = corpus;
 		setSelfElement(text);
Index: tmp/org.txm.core/src/java/org/txm/objects/SavedQuery.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/SavedQuery.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/SavedQuery.java	(revision 526)
@@ -74,7 +74,8 @@
 	 * @param query the query
 	 * @param examples the examples
 	 */
-	public SavedQuery(Corpus c, String query, List<String> examples) {
+	public SavedQuery(Corpus c, String query, List<String> examples) {
+		super(c);
 		this.corpus = c;
 		this.value = query;
 		if (examples == null)
@@ -89,7 +90,8 @@
 	 * @param corpus the b
 	 * @param e the e
 	 */
-	public SavedQuery(Corpus corpus, Element e) {
+	public SavedQuery(Corpus corpus, Element e) {
+		super(corpus);
 		this.corpus = corpus;
 		this.setSelfElement(e);
 		this.load();
Index: tmp/org.txm.core/src/java/org/txm/objects/Edition.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Edition.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Edition.java	(revision 526)
@@ -30,7 +30,6 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Comparator;
-import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
@@ -73,6 +72,7 @@
 	 * @param edition the edition
 	 */
 	public Edition(Text text, Element edition) {
+		super(text);
 		this.setPath(text.getPath() + getName());
 		setSelfElement(edition);
 		this.text = text;
@@ -296,50 +296,6 @@
 		return p;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#getChildren()
-	 */
-	public List<TxmObject> getChildren() {
-		List<TxmObject> rez = new ArrayList<TxmObject>();
-		rez.addAll(this.getPages());
-		return rez;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#removeChildren(org.txm.objects.TxmObject)
-	 */
-	public TxmObject removeChildren(TxmObject o) {
-		if (o == null)
-			return null;
-		if (o instanceof Page) {
-			getSelfElement().removeChild(o.getSelfElement());
-			if (pages.remove(o))
-				return o;
-			else
-				return null;
-		}
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#hasChildren(org.txm.objects.TxmObject)
-	 */
-	public boolean hasChildren(TxmObject o) {
-		if (o == null)
-			return false;
-		if (o instanceof Page)
-			return pages.contains(o);
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#getParent()
-	 */
-	@Override
-	public TxmObject getParent() {
-		return getText();
-	}
-
 	public File getHtmlDir() {
 		if (defaultHtmlDir == null) {
 			String corpusname = getText().getCorpus().getName();
@@ -367,24 +323,4 @@
 			}
 		}
 	}
-
-	@Override
-	public String getSimpleName() {
-		return getName();
-	}
-
-	@Override
-	public String getDetails() {
-		return getName();
-	}
-
-	@Override
-	public void clean() {
-		
-	}
-
-	@Override
-	public boolean validateParameters() {
-		return true;
-	}
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Workspace.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 526)
@@ -124,6 +124,7 @@
 	 * @param xmlproject the xmlproject
 	 */
 	public Workspace(File xmlproject) {
+		super(null);
 		name = xmlproject.getName();
 		this.setPath(xmlproject.getAbsolutePath()); 
 		this.xmlfile = xmlproject;
@@ -365,4 +366,16 @@
 		// TODO Auto-generated method stub
 		return false;
 	}
+
+	@Override
+	public boolean _compute() throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public boolean toTxt(File arg0, String arg1, String arg2, String arg3) throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/TxmObject.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/TxmObject.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/TxmObject.java	(revision 526)
@@ -27,6 +27,7 @@
 //
 package org.txm.objects;
 
+import java.io.File;
 import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Map;
@@ -57,13 +58,6 @@
 	
 	/** The object path from the object root to it. */
 	private String path;
-	
-	/**
-	 * Creates a new TxmObject with no parent.
-	 */
-	public TxmObject() {
-		this(null);
-	}
 
 	/**
 	 * Creates a new TxmObject, child of the specified parent.
@@ -253,4 +247,40 @@
 	public boolean setParameters(TXMParameters parameters) {
 		return false;
 	}
+	
+	@Override
+	public String getSimpleName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public String getDetails() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public void clean() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public boolean validateParameters() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public boolean _compute() throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public boolean toTxt(File arg0, String arg1, String arg2, String arg3) throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/CorpusParameters.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/CorpusParameters.java	(revision 525)
+++ tmp/org.txm.core/src/java/org/txm/objects/CorpusParameters.java	(revision 526)
@@ -245,11 +245,11 @@
 				String from = split[1].trim();
 				String to = split[2].trim();
 
-				Alignement align = new Alignement(from, to, 
+				Alignement align = new Alignement(this.corpus.getBase(), from, to, 
 						link.getAttribute("alignElement"), Integer.parseInt(link.getAttribute("alignLevel")));
 				links.put("#"+from+" #"+to, align);
 				
-				align = new Alignement(to, from, 
+				align = new Alignement(this.corpus.getBase(), to, from, 
 						link.getAttribute("alignElement"), Integer.parseInt(link.getAttribute("alignLevel")));
 				links.put("#"+to+" #"+from, align);
 
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java	(revision 525)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java	(revision 526)
@@ -3,6 +3,7 @@
  */
 package org.txm.partition.core.functions;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -136,4 +137,18 @@
 	public boolean setParameters(TXMParameters parameters) {
 		return false;
 	}
+
+
+	@Override
+	public boolean _compute() throws Exception {
+		// TODO move here the code from SWTChartsComponentsProvider that creates the chart to display 
+		return false;
+	}
+
+
+	@Override
+	public boolean toTxt(File arg0, String arg1, String arg2, String arg3) throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java
===================================================================
--- tmp/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java	(revision 525)
+++ tmp/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java	(revision 526)
@@ -39,8 +39,8 @@
 
 import org.txm.chartsengine.r.core.themes.DefaultTheme;
 import org.txm.core.results.TXMParameters;
+import org.txm.core.results.TXMResult;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.txm.functions.TXMCommand;
 import org.txm.progression.core.messages.ProgressionCoreMessages;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
@@ -60,7 +60,7 @@
  * @author mdecorde
  * @author sjacquot
  */
-public class Progression extends TXMCommand	{
+public class Progression extends TXMResult	{
 
 	/** The corpus. */
 	Corpus corpus;
@@ -158,7 +158,7 @@
 	 * @throws CqiServerError 
 	 * @throws IOException 
 	 */
-	public boolean compute(IProgressMonitor monitor) throws CqiClientException, IOException, CqiServerError {
+	public boolean _compute() throws Exception {
 		return stepQueries() && stepStructuralUnits() && stepFinalize();
 	}
 
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 525)
+++ tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java	(revision 526)
@@ -47,7 +47,7 @@
 import org.txm.concordance.core.messages.ConcordanceMessages;
 import org.txm.concordance.core.preferences.ConcordancePreferences;
 import org.txm.core.results.TXMParameters;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.searchengine.cqp.AbstractCqiClient;
 import org.txm.searchengine.cqp.MemCqiClient;
 import org.txm.searchengine.cqp.Reference;
@@ -70,7 +70,7 @@
  * 
  * @author jmague, mdecorde
  */
-public class Concordance extends TXMCommand {
+public class Concordance extends TXMResult {
 
 	/** The noconc. */
 	protected static int noconc = 1;;
@@ -264,7 +264,7 @@
 	 * @throws CqiClientException 
 	 */
 	@Override
-	public boolean compute(IProgressMonitor monitor) throws CqiClientException {
+	public boolean _compute() throws Exception {
 		this.queryResult = this.getCorpus().query(pQuery, pQuery.getQueryString()
 				.replace(" ", "_") + "_concordance", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 
@@ -1528,4 +1528,10 @@
 		lines = new ArrayList<Line>(Collections.nCopies(nLines,
 				(Line) null)); // empty lines
 	}
+
+	@Override
+	public boolean saveParameters() {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
Index: tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/functions/WordCloud.java
===================================================================
--- tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/functions/WordCloud.java	(revision 525)
+++ tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/functions/WordCloud.java	(revision 526)
@@ -7,8 +7,8 @@
 
 import org.txm.chartsengine.core.results.IChartResult;
 import org.txm.core.results.TXMParameters;
+import org.txm.core.results.TXMResult;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.txm.functions.TXMCommand;
 import org.txm.index.core.functions.Index;
 import org.txm.index.core.functions.Line;
 import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
@@ -29,7 +29,7 @@
  * @author sjacquot
  *
  */
-public class WordCloud extends TXMCommand implements IChartResult {
+public class WordCloud extends TXMResult implements IChartResult {
 	
 	//TODO: test rw.setStringEncoding("UTF-8"); // or connection
 	private int[] freqs;
@@ -56,21 +56,9 @@
 		this.source = index;
 		//removeDiacritics();
 	}
-	
+		
 	/**
 	 * 
-	 * @param corpus
-	 * @throws CqiClientException
-	 * @throws IOException
-	 * @throws CqiServerError
-	 */
-	public WordCloud(Corpus corpus) {
-		super();
-		this.source = corpus;
-	}
-	
-	/**
-	 * 
 	 * @param index
 	 */
 	private void initWith(Index index) {
@@ -225,9 +213,9 @@
 	}
 
 	@Override
-	public boolean compute(IProgressMonitor monitor) {
+	public boolean _compute() {
 		// from corpus
-		if (source instanceof Corpus)	{
+		if (source instanceof Corpus)	{// TODO: source must always be an Index because the corpus source produces an Index 
 			try {
 				Corpus corpus = (Corpus) source;
 				Query query;
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 525)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java	(revision 526)
@@ -41,7 +41,7 @@
 import org.txm.ca.core.statsengine.r.functions.ICA;
 import org.txm.chartsengine.core.results.IChartResult;
 import org.txm.core.results.TXMParameters;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Property;
@@ -55,7 +55,7 @@
  * @author sloiseau
  *  
  */
-public class CA extends TXMCommand implements IChartResult {
+public class CA extends TXMResult implements IChartResult {
 
 	/** The ca. */
 	private ICA ca;
@@ -152,6 +152,7 @@
 	 * @throws StatException the stat exception
 	 */
 	public CA(LexicalTable lexicaltable) throws StatException {
+		super(lexicaltable);
 		this.pAnalysisProperty = lexicaltable.getProperty();
 		this.table = lexicaltable;
 
@@ -167,7 +168,7 @@
 	}
 
 	@Override
-	public boolean compute(IProgressMonitor watcher) throws Exception {
+	public boolean _compute() throws Exception {
 		return stepCompute();
 	}
 
@@ -905,4 +906,10 @@
 	public boolean validateParameters() {
 		return this.table != null && table.getNColumns() > 3;
 	}
+
+	@Override
+	public boolean saveParameters() {
+		System.out.println("Saving "+this.getClass().getName()+" parameters: nor implemented");
+		return false;
+	}
 }
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesResult.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesResult.java	(revision 525)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesResult.java	(revision 526)
@@ -41,7 +41,7 @@
 import org.rosuda.REngine.Rserve.RserveException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.txm.core.results.TXMParameters;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.lexicaltable.core.functions.LexicalTableFactory;
 import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
@@ -62,10 +62,10 @@
 /**
  * Hold specificites computation result.
  * 
- * @author sloiseau
+ * @author sloiseau, mdecorde
  * 
  */
-public class SpecificitesResult extends TXMCommand  {
+public class SpecificitesResult extends TXMResult  {
 
 	public static int MAXSPECIF = 1000;
 
@@ -131,7 +131,7 @@
 	protected double[][] selectedSpecificitiesIndex;
 	
 	
-	public boolean compute(IProgressMonitor monitor) {
+	public boolean _compute() {
 		//TODO: not implemented yet. The specificitesResults should work with a LexicalTable only? if yes, then the calling commands must build it
 		return false;
 	}
@@ -169,6 +169,7 @@
 	 * @throws StatException the stat exception
 	 */
 	public SpecificitesResult(LexicalTable table, int maxScore)	throws CqiClientException, StatException {
+		super(table);
 		if (table.getNColumns() < 2) {
 			throw new IllegalArgumentException(SpecificitiesCoreMessages.ComputeError_NEED_AT_LEAST_2_PARTS);
 		}
@@ -204,7 +205,7 @@
 	 * @throws RserveException 
 	 */
 	public SpecificitesResult(Corpus corpus, Subcorpus subcorpus, Property property, int maxScore) throws Exception {
-
+		super(corpus);
 		Lexicon totalFrequencies = Lexicon.getLexicon(corpus, property);
 		Lexicon subFrequencies = Lexicon.getLexicon(subcorpus, property);
 
Index: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Chi2.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Chi2.java	(revision 525)
+++ tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Chi2.java	(revision 526)
@@ -15,18 +15,7 @@
 public class Chi2 extends Contrast {
 	
 	private ILexicalTable itable;
-	
-	public Chi2(Corpus corpus, Subcorpus subcorpus, Property property)
-			throws Exception {
-		super(corpus, subcorpus, property);
-	}
 
-	public Chi2(Partition partition, Property property, int Fmin)
-			throws Exception {
-		super(partition, property, Fmin);
-	}
-
-
 	public Chi2(LexicalTable table) {
 		super(table);
 	}
@@ -37,7 +26,7 @@
 	}
 	
 	@Override
-	public boolean compute() throws StatException {
+	public boolean _compute() throws StatException {
 		itable = table.getData();
 		colNames = itable.getColNames().asStringsArray();
 		rowNames = itable.getRowNames().asStringsArray();
Index: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Specificites2.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Specificites2.java	(revision 525)
+++ tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Specificites2.java	(revision 526)
@@ -17,22 +17,11 @@
 
 	private ILexicalTable itable;
 
-	public Specificites2(Corpus corpus, Subcorpus subcorpus, Property property)
-			throws Exception {
-		super(corpus, subcorpus, property);
-	}
-
-	public Specificites2(Partition partition, Property property, int Fmin)
-			throws Exception {
-		super(partition, property, Fmin);
-	}
-
-
 	public Specificites2(LexicalTable table) {
 		super(table);
 	}
 
-	public boolean compute() throws StatException {
+	public boolean _compute() throws StatException {
 		itable = table.getData();
 		colNames = itable.getColNames().asStringsArray();
 		rowNames = itable.getRowNames().asStringsArray();
Index: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java	(revision 525)
+++ tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java	(revision 526)
@@ -9,7 +9,7 @@
 
 import org.txm.chartsengine.r.core.themes.DefaultTheme;
 import org.txm.core.results.TXMResult;
-import org.txm.functions.TXMCommand;
+
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.lexicaltable.core.functions.LexicalTableFactory;
 import org.txm.lexicaltable.core.statsengine.data.ILexicalTable;
@@ -28,7 +28,7 @@
 import org.txm.statsengine.core.data.Vector;
 import org.txm.statsengine.r.core.RWorkspace;
 
-public abstract class Contrast extends TXMCommand{
+public abstract class Contrast extends TXMResult{
 
 	protected static int no_contrast = 1;
 	
@@ -39,40 +39,31 @@
 	protected String[] rowNames, colNames;
 	protected int[][] frequencies;
 
-	public Contrast(Partition partition, Property property, int Fmin) throws Exception {
-		if (partition.getParts().size() < 2) {
-			throw new IllegalArgumentException(SpecificitiesCoreMessages.ComputeError_NEED_AT_LEAST_2_PARTS);
-		}
-		table = LexicalTableFactory.getLexicalTable(partition, property, Fmin);
-		symbol = "Contrast_"+this.getClass().getSimpleName()+"_"+(no_contrast++);
-	}
+//	public Contrast(Partition partition, Property property, int Fmin) throws Exception {
+//		super(partition);
+//		
+//		if (partition.getParts().size() < 2) {
+//			throw new IllegalArgumentException(SpecificitiesCoreMessages.ComputeError_NEED_AT_LEAST_2_PARTS);
+//		}
+//		table = LexicalTableFactory.getLexicalTable(partition, property, Fmin);
+//		symbol = "Contrast_"+this.getClass().getSimpleName()+"_"+(no_contrast++);
+//	}
 
 	public Contrast(LexicalTable table) {
+		super(table);
 		this.table = table;
 		symbol = "Contrast_"+this.getClass().getSimpleName()+"_"+(no_contrast++);
 	}
 
-	public Contrast(Corpus corpus, Subcorpus subcorpus, Property property) throws Exception, Exception {
-		table = new LexicalTable(corpus, subcorpus);
-		symbol = "Contrast_"+this.getClass().getSimpleName()+"_"+(no_contrast++);
-	}
+//	public Contrast(Corpus corpus, Subcorpus subcorpus, Property property) throws Exception, Exception {
+//		table = new LexicalTable(corpus, subcorpus);
+//		symbol = "Contrast_"+this.getClass().getSimpleName()+"_"+(no_contrast++);
+//	}
 
-	public abstract boolean compute() throws Exception;
+	public abstract boolean _compute() throws Exception;
 
 	public abstract String getName();
 	
-	//	public boolean compute() throws StatException {
-	//		
-	//		colNames = table.getColNames().asStringsArray();
-	//		rowNames = table.getRowNames().asStringsArray();
-	//		frequencies = RWorkspace.getRWorkspaceInstance().evalToInt2D(table.getSymbol());
-	//		
-	//		// compute
-	//		specIndex = org.txm.stat.engine.r.function.Specificites.specificites("SYMBOL", table, null, null);
-	//		
-	//		return true;
-	//	}
-
 	public String getSymbol() {
 		return symbol;
 	}
Index: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/RelativeFrequency.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/RelativeFrequency.java	(revision 525)
+++ tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/RelativeFrequency.java	(revision 526)
@@ -16,26 +16,14 @@
 public class RelativeFrequency extends Contrast {
 	
 	private ILexicalTable itable;
-	
-	public RelativeFrequency(Corpus corpus, Subcorpus subcorpus, Property property)
-			throws Exception {
-		super(corpus, subcorpus, property);
-		// TODO Auto-generated constructor stub
-	}
 
-	public RelativeFrequency(Partition partition, Property property, int Fmin)
-			throws Exception {
-		super(partition, property, Fmin);
-		// TODO Auto-generated constructor stub
-	}
-
 	public RelativeFrequency(LexicalTable table) {
 		super(table);
 		// TODO Auto-generated constructor stub
 	}
 
 	@Override
-	public boolean compute() throws StatException {
+	public boolean _compute() throws Exception {
 		itable = table.getData();
 		colNames = itable.getColNames().asStringsArray();
 		rowNames = itable.getRowNames().asStringsArray();
Index: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/AbsoluteFrequency.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/AbsoluteFrequency.java	(revision 525)
+++ tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/AbsoluteFrequency.java	(revision 526)
@@ -21,7 +21,7 @@
 	}
 
 	@Override
-	public boolean compute() throws StatException {
+	public boolean _compute() throws StatException {
 		itable = table.getData();
 		colNames = itable.getColNames().asStringsArray();
 		rowNames = itable.getRowNames().asStringsArray();
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeInterTextDistance.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeInterTextDistance.java	(revision 525)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeInterTextDistance.java	(revision 526)
@@ -36,8 +36,7 @@
 		InterTextDistance dist = new InterTextDistance(table.getData());
 
 		try {
-			dist.compute();
-			table.getPartition().getResults().add(dist);
+			dist._compute();
 		} catch (Exception e) {
 			System.out.println("Error: "+e.getLocalizedMessage());
 			Log.printStackTrace(e);
Index: tmp/org.txm.cah.core/src/org/txm/cah/core/functions/CAH.java
===================================================================
--- tmp/org.txm.cah.core/src/org/txm/cah/core/functions/CAH.java	(revision 525)
+++ tmp/org.txm.cah.core/src/org/txm/cah/core/functions/CAH.java	(revision 526)
@@ -38,7 +38,7 @@
 import org.txm.cah.core.preferences.CAHPreferences;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.core.results.TXMParameters;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
@@ -51,7 +51,7 @@
  * @author sjacquot
  *
  */
-public class CAH extends TXMCommand	{
+public class CAH extends TXMResult	{
 
 	/** The metric. */
 	String pMetric = "euclidean"; // euclidean, manhattan //$NON-NLS-1$
@@ -199,7 +199,7 @@
 	protected static int nocah = 1;
 
 	@Override
-	public boolean compute(IProgressMonitor watcher)	{
+	public boolean _compute()	{
 
 		Log.info("Computing CAH...");
 		try {
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java	(revision 525)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java	(revision 526)
@@ -139,9 +139,10 @@
 			public void doubleClick(DoubleClickEvent event) {
 				TreeSelection selection = (TreeSelection) tv.getSelection();
 				if (selection.getFirstElement() instanceof Corpus) {
-					File selectedItem = ((Corpus) selection.getFirstElement())
-							.getFirstText().getSource();
-					EditFile.openfile(selectedItem.getAbsolutePath());
+					Corpus corpus = (Corpus)selection.getFirstElement();
+					File selectedItem = new File(corpus.getBaseDirectory(), "wtc/"+corpus.getName()+".wtc");
+					if (selectedItem.exists())
+						EditFile.openfile(selectedItem.getAbsolutePath());
 				} else if (selection.getFirstElement() instanceof Text) {
 					File selectedItem = ((Text) selection.getFirstElement())
 							.getSource();
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/DeleteObject.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/DeleteObject.java	(revision 525)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/DeleteObject.java	(revision 526)
@@ -53,7 +53,7 @@
 import org.txm.Toolbox;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.core.results.TXMResult;
-import org.txm.functions.TXMCommand;
+
 import org.txm.objects.TxmObject;
 import org.txm.rcp.RCPMessages;
 import org.txm.rcp.StatusLine;
@@ -314,8 +314,8 @@
 			((TXMResult) o).delete();
 			System.out.println(NLS.bind(RCPMessages.DeleteObject_10, ((TXMResult) o).getName()));
 		}
-		else if (o instanceof TXMCommand) {
-			TXMCommand l = (TXMCommand) o;
+		else if (o instanceof TXMResult) {
+			TXMResult l = (TXMResult) o;
 			l.delete();
 			System.out.println(NLS.bind(RCPMessages.DeleteObject_10, l));
 		}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportResult.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportResult.java	(revision 525)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportResult.java	(revision 526)
@@ -44,7 +44,7 @@
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.rcp.JobsTimer;
 import org.txm.rcp.RCPMessages;
 import org.txm.rcp.StatusLine;
@@ -82,8 +82,8 @@
 		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
 
 		String extensions[] = {"*.csv"}; //$NON-NLS-1$
-		if (s instanceof TXMCommand) {
-			extensions = ((TXMCommand)s).getExportTXTExtensions(); //$NON-NLS-1$
+		if (s instanceof TXMResult) {
+			extensions = ((TXMResult)s).getExportTXTExtensions(); //$NON-NLS-1$
 		}
 		dialog.setFilterExtensions(extensions);
 
@@ -127,11 +127,11 @@
 						this.runInit(monitor);
 						monitor.beginTask(RCPMessages.ExportResult_1, 100);
 
-						if (s instanceof TXMCommand) {
-							((TXMCommand)s).setCurrentMonitor(this); // Allows Functions to protect themselves from interruption
-							((TXMCommand)s).toTxt(outfile, encoding, colseparator, txtseparator);
+						if (s instanceof TXMResult) {
+							((TXMResult)s).setCurrentMonitor(this); // Allows Functions to protect themselves from interruption
+							((TXMResult)s).toTxt(outfile, encoding, colseparator, txtseparator);
 						} else {
-							System.out.println("Exported object is not a TXMCommand result");
+							System.out.println("Exported object is not a TXMResult result");
 							return Status.CANCEL_STATUS;
 						}
 
@@ -151,16 +151,16 @@
 							System.out.println(NLS.bind(RCPMessages.ExportResult_6, outfile.getAbsolutePath()));
 						}
 					} catch (ThreadDeath td) {
-						if (s instanceof TXMCommand)
-							((TXMCommand)s).clean();
+						if (s instanceof TXMResult)
+							((TXMResult)s).clean();
 						return Status.CANCEL_STATUS;
 					} catch (Exception e) {
 						System.out.println(NLS.bind(RCPMessages.ExportResult_6, s, e));
 						org.txm.rcp.utils.Logger.printStackTrace(e);
 						return Status.CANCEL_STATUS;
 					} finally {
-						if (s instanceof TXMCommand)
-							((TXMCommand)s).setCurrentMonitor(null);
+						if (s instanceof TXMResult)
+							((TXMResult)s).setCurrentMonitor(null);
 						monitor.done();
 						JobsTimer.stopAndPrint();
 					}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/RCPCommand.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/RCPCommand.java	(revision 525)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/RCPCommand.java	(revision 526)
@@ -1,8 +1,9 @@
 package org.txm.rcp.editors;
 
+import org.txm.core.results.TXMResult;
 import org.txm.functions.Command;
-import org.txm.functions.TXMCommand;
 
+
 /**
  * A command that opens an editor (which will computes the result).
  * 
@@ -15,12 +16,12 @@
 
 	public final String editor_id;
 	
-	public RCPCommand(Class<TXMCommand> clazz, String editor_id) {
+	public RCPCommand(Class<TXMResult> clazz, String editor_id) {
 		super(clazz);
 		this.editor_id = editor_id;
 	}
 
-	public RCPCommand(String cmd, Class<TXMCommand> clazz, String editor_id) {
+	public RCPCommand(String cmd, Class<TXMResult> clazz, String editor_id) {
 		super(cmd, clazz);
 		this.editor_id = editor_id;
 	}
@@ -28,6 +29,4 @@
 	public String toString() {
 		return super.toString()+" -> "+editor_id;
 	}
-	
-	// 
 }
\ No newline at end of file
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/RCPCommandsAPI.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/RCPCommandsAPI.java	(revision 525)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/RCPCommandsAPI.java	(revision 526)
@@ -4,8 +4,8 @@
 import org.txm.core.results.TXMResult;
 import org.txm.functions.Command;
 import org.txm.functions.CommandsAPI;
-import org.txm.functions.TXMCommand;
 
+
 /**
  * Interface to call commands from a RCP plugin
  * 
@@ -33,7 +33,7 @@
 		if (command instanceof RCPCommand) {
 
 			RCPCommand rcpcommand = (RCPCommand)command;
-			TXMCommand result = null;
+			TXMResult result = null;
 
 			if (rcpcommand.editor_id == null) {
 				System.out.println("Failed to open editor: no context given.");
Index: tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java
===================================================================
--- tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java	(revision 525)
+++ tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java	(revision 526)
@@ -9,7 +9,7 @@
 import org.eclipse.swt.widgets.Spinner;
 import org.txm.chartsengine.rcp.editors.ChartEditorPart;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.utils.logger.Log;
 import org.txm.wordcloud.core.preferences.WordCloudPreferences;
 import org.txm.wordcloud.rcp.messages.WordCloudUIMessages;
@@ -119,7 +119,7 @@
 	@Override
 	public void computeResult() {
 		try {
-			((TXMCommand) this.getResultData()).compute();
+			((TXMResult) this.getResultData()).compute();
 		} catch (Exception e) {
 			System.out.println("Error: "+e.getLocalizedMessage());
 			Log.printStackTrace(e);
Index: tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java
===================================================================
--- tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java	(revision 525)
+++ tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java	(revision 526)
@@ -66,12 +66,10 @@
 	@Override
 	public Object execute(final ExecutionEvent event) throws ExecutionException {
 
-		
 		if(!this.checkStatsEngine()) {
 			return null;
 		}
 
-
 		Object selection = this.getSelection();
 		ChartEditorInput editorInput = null;
 		
@@ -88,7 +86,7 @@
 
 			// creates new result from Corpus
 			if (selection instanceof Corpus) {
-				editorInput = new ChartEditorInput(new WordCloud((Corpus)selection));
+				editorInput = new ChartEditorInput(new WordCloud(new Index((Corpus)selection)));
 			}
 			// creates new result from Index
 			else if (selection instanceof Index) {
Index: tmp/org.txm.internalview.core/src/org/txm/functions/internal/InternalView.java
===================================================================
--- tmp/org.txm.internalview.core/src/org/txm/functions/internal/InternalView.java	(revision 525)
+++ tmp/org.txm.internalview.core/src/org/txm/functions/internal/InternalView.java	(revision 526)
@@ -9,7 +9,7 @@
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.txm.core.results.TXMParameters;
-import org.txm.functions.TXMCommand;
+import org.txm.core.results.TXMResult;
 import org.txm.internalview.core.Messages;
 import org.txm.searchengine.cqp.CQPEngine;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
@@ -21,7 +21,7 @@
 import org.txm.searchengine.cqp.corpus.query.Match;
 import org.txm.searchengine.cqp.corpus.query.Query;
 
-public class InternalView extends TXMCommand  {
+public class InternalView extends TXMResult  {
 
 	Corpus corpus;
 	List<Property> pProperties;
@@ -219,7 +219,7 @@
 	}
 
 	@Override
-	public boolean compute(IProgressMonitor watcher) throws Exception {
+	public boolean _compute() throws Exception {
 		//find struct start-end
 		Query query = new Query("<"+pStructure.getName()+"> [] expand to "+pStructure); //$NON-NLS-1$ //$NON-NLS-2$
 		//System.out.println(query);
@@ -252,4 +252,10 @@
 		HashMap<Property, List<String>> current = getPage(pCurrentStruct);
 		return current;
 	}
+
+	@Override
+	public boolean saveParameters() {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }
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 525)
+++ tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java	(revision 526)
@@ -50,7 +50,7 @@
 import org.txm.cooccurrence.core.preferences.CooccurrencePreferences;
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
-import org.txm.functions.TXMCommand;
+
 import org.txm.index.core.functions.Index;
 import org.txm.lexicaltable.core.statsengine.r.data.LexicalTableImpl;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
@@ -75,7 +75,7 @@
  * @author mdecorde
  * 
  */
-public class Cooccurrence extends TXMCommand  {
+public class Cooccurrence extends TXMResult  {
 
 	/** The a. */
 	static double[] a = new double[101];
@@ -445,7 +445,7 @@
 	 * @param buildLexicalTableWithCooccurrents
 	 * @return
 	 */
-	public boolean compute(IProgressMonitor monitor) {
+	public boolean _compute() {
 		this.monitor = monitor;
 		//FIXME: debug
 		//System.out.println("cooc: "+corpus+" "+query+" "+properties+" "+limit+" "+maxLeft+" "+minLeft+" "+minRight+" "+maxRight+" "+minFreq+" "+minCof+" "+minScore+" "+includeXpivot);
