Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java	(revision 1424)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java	(revision 1425)
@@ -153,15 +153,19 @@
 		this.chartDirty = true;
 	}
 
-
 	@Override
 	public boolean compute(IProgressMonitor monitor) {
+		return compute(monitor, true);
+	}
 
+	@Override
+	public boolean compute(IProgressMonitor monitor, boolean deepComputing) {
+
 		try {
 			Log.finest("*** ChartResult.compute(): " + this.getClass().getSimpleName() + ": starting computing process...");
 
 			// compute the result if needed
-			if(super.compute(monitor, true))	{
+			if(super.compute(monitor, deepComputing))	{
 				// compute the chart
 				return renderChart();
 			}
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 1424)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java	(revision 1425)
@@ -265,7 +265,7 @@
 			_compute_with_lists();
 		}
 		
-		
+		totalsize = -1; // refresh total size at next call of getTotalSize
 		return true;
 	}
 
@@ -369,7 +369,7 @@
 
 	@Override
 	public String getDetails() {
-		return getName();
+		return NLS.bind(getName()+" ({0})", getPartsCount());
 	}
 
 	/**
@@ -380,10 +380,10 @@
 	public int getPartsCount() {
 		// FIXME: later should just return the direct children count
 		try {
-			if (!hasBeenComputedOnce()) {
-				compute();
-			}
-			
+//			if (!hasBeenComputedOnce()) {
+//				compute();
+//			}
+//			
 			return getParts().size();
 		} catch(Exception e) { }
 		return 0;
@@ -474,14 +474,7 @@
 	 * @throws CqiClientException
 	 */
 	public int getTotalSize() throws CqiClientException {
-		if (!hasBeenComputedOnce()) {
-			try {
-				compute();
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-		}
+		
 		if (totalsize == -1) {
 			totalsize = 0;
 			for (Part p : getParts()) {
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesSelectionChart.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesSelectionChart.java	(revision 1424)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesSelectionChart.java	(revision 1425)
@@ -11,6 +11,7 @@
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.chartsengine.rcp.editors.ChartEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.specificities.core.functions.Specificities;
 import org.txm.specificities.core.functions.SpecificitiesSelection;
 import org.txm.specificities.rcp.editors.SpecificitiesEditor;
@@ -31,12 +32,11 @@
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		
-		
 		Object selection = this.getCorporaViewSelectedObject(event);
 		SpecificitiesSelection specificitiesSelection = null;
 		
 		// Reopening from existing result
-		if(selection instanceof SpecificitiesSelection)	{
+		if(selection instanceof SpecificitiesSelection && CorporaView.isFocused())	{
 			specificitiesSelection = (SpecificitiesSelection) selection;
 		}
 		// Creates from SpecificitiesEditor selected table lines
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 1424)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/statsengine/r/data/LexicalTableImpl.java	(revision 1425)
@@ -163,22 +163,22 @@
 		
 		rw.eval(symbol+" <- matrix(0, ncol = 2, nrow=length("+corpusLexiconV.getSymbol()+"))");
 		rw.eval("colnames("+symbol+") <- c(\""+corpusLexicon.getParent().getName()+"-"+subcorpusLexicon.getParent().getName()+"\", \""+subcorpusLexicon.getParent().getName()+"\")");
-		System.out.println("forms: "+Arrays.toString(corpusLexicon.getForms()));
+		//System.out.println("forms: "+Arrays.toString(corpusLexicon.getForms()));
 		rw.addVectorToWorkspace("ltnames", corpusLexicon.getForms());
 		rw.eval("rownames("+symbol+") <- ltnames");
 		rw.eval(symbol+"[names("+corpusLexiconV.getSymbol()+"),1] <- "+corpusLexiconV.getSymbol());
 		rw.eval(symbol+"[names("+subcorpusLexiconV.getSymbol()+"),1] <- "+symbol+"[names("+subcorpusLexiconV.getSymbol()+"),1] - "+subcorpusLexiconV.getSymbol());
 		rw.eval(symbol+"[names("+subcorpusLexiconV.getSymbol()+"),2] <- "+subcorpusLexiconV.getSymbol());
-		try {
-			System.out.println("colnames: "+Arrays.toString(rw.eval("colnames("+symbol+")").asStrings()));
-			System.out.println("ltnames: "+Arrays.toString(rw.eval("ltnames").asStrings()));
-			System.out.println("length ltnames: "+rw.eval("length(ltnames)").asInteger());
-			System.out.println("ncol: "+rw.eval("ncol("+symbol+")").asInteger());
-			System.out.println("nrow: "+rw.eval("nrow("+symbol+")").asInteger());
-		} catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+//		try {
+//			System.out.println("colnames: "+Arrays.toString(rw.eval("colnames("+symbol+")").asStrings()));
+//			System.out.println("ltnames: "+Arrays.toString(rw.eval("ltnames").asStrings()));
+//			System.out.println("length ltnames: "+rw.eval("length(ltnames)").asInteger());
+//			System.out.println("ncol: "+rw.eval("ncol("+symbol+")").asInteger());
+//			System.out.println("nrow: "+rw.eval("nrow("+symbol+")").asInteger());
+//		} catch (Exception e) {
+//			// TODO Auto-generated catch block
+//			e.printStackTrace();
+//		}
 		
 		
 	}
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 1424)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 1425)
@@ -1577,6 +1577,7 @@
 				for(String key : preferences.keys()) {
 					dstPreferences.put(key, preferences.get(key, ""));
 				}
+				dstPreferences.flush();
 			}
 			catch(BackingStoreException e) {
 				// TODO Auto-generated catch block
Index: tmp/org.txm.core/src/java/org/txm/core/results/TXMResultListener.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/results/TXMResultListener.java	(revision 0)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResultListener.java	(revision 1425)
@@ -0,0 +1,19 @@
+package org.txm.core.results;
+
+/**
+ * If registered the listener while be notified when the result is recomputed
+ * 
+ * @author mdecorde
+ *
+ */
+public interface TXMResultListener {
+	/**
+	 * TODO rename to "updateFromResult"
+	 * 
+	 * @param update true if the result data part changed
+	 * @throws Exception
+	 */
+	public void updateFromResult(boolean update) throws Exception;
+
+	public boolean isDisposed();
+}
\ No newline at end of file

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

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 1424)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1425)
@@ -10,6 +10,7 @@
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
+import java.util.TreeSet;
 import java.util.concurrent.Semaphore;
 import java.util.regex.Pattern;
 
@@ -38,15 +39,20 @@
  * 
  * A TXMResult always have a parent (except the root: @see Workspace).
  * 
- * To compute a result simply call the {@link #compute()} method. It contains all the life cycle steps of the result.
+ * To compute a result simply call the {@link #compute()} method. It contains
+ * all the life cycle steps of the result.
  * 
- * To set parameters, you can alternatively call the {@link #setParameters()} methods or the setXXX methods. The setParameters methods are usually useful to transfer several parameters at once.
+ * To set parameters, you can alternatively call the {@link #setParameters()}
+ * methods or the setXXX methods. The setParameters methods are usually useful
+ * to transfer several parameters at once.
  * 
- * The class contains convenient methods to maintain the same logic between results :
- * - canCompute() : test if all necessary parameters are set
- * - isDirty(): return true if the result needs to be recomputed (if a parameter changed)
+ * The class contains convenient methods to maintain the same logic between
+ * results : - canCompute() : test if all necessary parameters are set -
+ * isDirty(): return true if the result needs to be recomputed (if a parameter
+ * changed)
  * 
  * Groovy call sample :
+ * 
  * <pre>
  * {@code
  * MyTXMResult result = new MyTXMResult(parent);
@@ -59,6 +65,7 @@
  * </pre>
  * 
  * @author mdecorde
+ * 
  * @author sjacquot
  */
 public abstract class TXMResult implements Cloneable, IProgressMonitor, Comparable<TXMResult> {
@@ -69,13 +76,12 @@
 	public static final String UNDERSCORE = "_";
 
 	private static int next = 0;
-	
+	//TreeSet<TXMResultListener> listeners = new TreeSet<>();
 
-	
-//	/**
-//	 * Unique ID of the result.
-//	 */
-//	protected String uniqueID;
+	// /**
+	// * Unique ID of the result.
+	// */
+	// protected String uniqueID;
 
 	/**
 	 * Editor can use this to test if the result has been computed once.
@@ -88,18 +94,19 @@
 	protected int weight;
 
 	/**
-	 * the command this command to true when the result needs to be recomputed.
-	 * like after updating parameters
+	 * the command this command to true when the result needs to be recomputed. like
+	 * after updating parameters
 	 */
 	protected boolean dirty = true;
-	
+
 	/**
 	 * if frozen, the result is not updated when computed
 	 */
 	protected boolean frozen = false;
-	
+
 	/**
-	 * if a method changed the internal data without **recomputing** the result, the result must be marked "altered"
+	 * if a method changed the internal data without **recomputing** the result, the
+	 * result must be marked "altered"
 	 */
 	protected boolean altered = false;
 
@@ -117,10 +124,12 @@
 	 * Command preferences node path.
 	 */
 	protected String commandPreferencesNodePath;
-	//protected IEclipsePreferences preferencesNode; // TODO: directly use a preferences node rather than a node path?
+	// protected IEclipsePreferences preferencesNode; // TODO: directly use a
+	// preferences node rather than a node path?
 
 	/**
-	 * Parameters node path. Concatenation of the Project scope path + the result uuid
+	 * Parameters node path. Concatenation of the Project scope path + the result
+	 * uuid
 	 */
 	protected String parametersNodePath;
 
@@ -135,14 +144,18 @@
 	private Semaphore progressSemaphore = new Semaphore(1);
 
 	/**
-	 * To keep track of the parameters used for the last computing and to determine if the result is dirty. 
+	 * To keep track of the parameters used for the last computing and to determine
+	 * if the result is dirty.
 	 */
-	// FIXME: SJ: actually only used by the chart results. Purpose here is that the chart creators need to know if a computing parameter has changed to recreate or not some entity.
-	// The problem is since the result is already computing, the parameters are already updated and the method hasParameterChanged() will always return false. Using this stack fix the problem.
+	// FIXME: SJ: actually only used by the chart results. Purpose here is that the
+	// chart creators need to know if a computing parameter has changed to recreate
+	// or not some entity.
+	// The problem is since the result is already computing, the parameters are
+	// already updated and the method hasParameterChanged() will always return
+	// false. Using this stack fix the problem.
 	// But this stack is also the start for an UNDO command on TXMResult.
 	protected ArrayList<HashMap<String, Object>> parametersHistory = new ArrayList<HashMap<String, Object>>();
 
-	
 	/**
 	 * Internal persistable state.
 	 */
@@ -156,28 +169,26 @@
 	/**
 	 * The visibility state.
 	 */
-	@Parameter(key=TXMPreferences.VISIBLE, type=Parameter.INTERNAL)
+	@Parameter(key = TXMPreferences.VISIBLE, type = Parameter.INTERNAL)
 	private Boolean visible;
 
 	/**
 	 * The user name (to rename a result).
 	 */
-	@Parameter(key=TXMPreferences.USER_NAME, type=Parameter.INTERNAL)
+	@Parameter(key = TXMPreferences.USER_NAME, type = Parameter.INTERNAL)
 	protected String userName;
 
 	/**
-	 *  To store the simple name for unserialization and lazy loading.
-	 *  This string can be used, for example, to display some infos in UI even if the result has not yet been recomputed.
+	 * To store the simple name for unserialization and lazy loading. This string
+	 * can be used, for example, to display some infos in UI even if the result has
+	 * not yet been recomputed.
 	 */
-	@Parameter(key=TXMPreferences.LAZY_NAME, type=Parameter.INTERNAL)
+	@Parameter(key = TXMPreferences.LAZY_NAME, type = Parameter.INTERNAL)
 	private String lazyName;
 
-
-
-
-
 	/**
 	 * Creates a new TXMResult, child of the specified parent.
+	 * 
 	 * @param parent
 	 */
 	public TXMResult(TXMResult parent) {
@@ -185,8 +196,10 @@
 	}
 
 	/**
-	 * Creates a new TXMResult with no parent.
-	 * If a local node exist with the parent_uuid, the parent will be retrieved and this result will be added to it. 
+	 * Creates a new TXMResult with no parent. If a local node exist with the
+	 * parent_uuid, the parent will be retrieved and this result will be added to
+	 * it.
+	 * 
 	 * @param uuid
 	 */
 	public TXMResult(String parametersNodePath) {
@@ -194,8 +207,9 @@
 	}
 
 	/**
-	 * Creates a new TXMResult, child of the specified parent.
-	 * If the parameters node path is null, a new path is generated from the project root path ending by a new generated UUID.
+	 * Creates a new TXMResult, child of the specified parent. If the parameters
+	 * node path is null, a new path is generated from the project root path ending
+	 * by a new generated UUID.
 	 * 
 	 * @param uuid
 	 * @param parent
@@ -208,15 +222,14 @@
 			parent.addChild(this);
 		}
 
-		if (parametersNodePath == null)	{
-			if (this.getProject() != null)	{
+		if (parametersNodePath == null) {
+			if (this.getProject() != null) {
 				parametersNodePath = this.getProject().getParametersNodeRootPath();
 			} else {
 				parametersNodePath = "";
 			}
-			this.parametersNodePath = parametersNodePath + createUUID() + "_" + this.getClass().getSimpleName(); //$NON-NLS-1$;
-		}
-		else	{
+			this.parametersNodePath = parametersNodePath + createUUID() + "_" + this.getClass().getSimpleName(); //$NON-NLS-1$ ;
+		} else {
 			this.parametersNodePath = parametersNodePath;
 		}
 
@@ -225,60 +238,56 @@
 		this.weight = 0;
 
 		this.children = new ArrayList<TXMResult>(1);
-		//this.children = Collections.synchronizedList(new ArrayList<TXMResult>()); // FIXME: SJ: can fix the conccurent excpetion if needed
+		// this.children = Collections.synchronizedList(new ArrayList<TXMResult>()); //
+		// FIXME: SJ: can fix the conccurent excpetion if needed
 
-		this.commandPreferencesNodePath = FrameworkUtil.getBundle(getClass()).getSymbolicName(); //$NON-NLS-1$
+		this.commandPreferencesNodePath = FrameworkUtil.getBundle(getClass()).getSymbolicName(); // $NON-NLS-1$
 		Log.finest("TXMResult.TXMResult(): command preferences node path: " + this.commandPreferencesNodePath + "."); //$NON-NLS-1$ //$NON-NLS-2$
 
-
 		this.visible = true;
 		this.dirty = true;
 		this.internalPersistable = false;
 		this.userPersistable = TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED);
 
-
 		// retrieving parent from UUID
 		String parentNodePath = this.getStringParameterValue(TXMPreferences.PARENT_PARAMETERS_NODE_PATH);
 
-		//System.out.println("TXMResult.TXMResult(): parent UUID = " + parentUUID);
+		// System.out.println("TXMResult.TXMResult(): parent UUID = " + parentUUID);
 
 		if (!("ROOT".equals(this.parametersNodePath)) && // search for parent only if UUID != "ROOT"
-				parent == null && 
-				this.parametersNodePath != null && 
-				!parentNodePath.isEmpty()) {
+				parent == null && this.parametersNodePath != null && !parentNodePath.isEmpty()) {
 			Log.finest("Searching parent with UUID: " + parentNodePath + "..."); //$NON-NLS-1$ //$NON-NLS-2$
 			TXMResult retrievedParent = TXMResult.getResult(parentNodePath);
 			if (retrievedParent != null) {
 				Log.finest("Parent retrieved from UUID: " + retrievedParent + "."); //$NON-NLS-1$ //$NON-NLS-2$
 				retrievedParent.addChild(this);
-			}
-			else {
+			} else {
 				Log.severe("Warning: no parent was found in project for path=" + parametersNodePath + " and puuid=" + parentNodePath + " preferences=" + this.dumpParameters()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				// FIXME: commented for now
-				//TBXPreferences.delete(this);
+				// TBXPreferences.delete(this);
 				return;
 			}
 		}
 
-		// loads parameters from local result node, current command preferences or default command preferences
+		// loads parameters from local result node, current command preferences or
+		// default command preferences
 		try {
 			this.autoLoadParametersFromAnnotations(); // auto fill from Parameter annotations
-			this.loadParameters();  // subclasses manual settings
+			this.loadParameters(); // subclasses manual settings
 		} catch (Exception e) {
 			Log.severe("Fail to load " + parametersNodePath + "result: " + e); //$NON-NLS-1$ //$NON-NLS-2$
 			Log.printStackTrace(e);
 		}
 
 		// Log
-		if (this.parent == null)	{
+		if (this.parent == null) {
 			Log.finest("Warning: the TXMResult of " + this.getClass() + " is attached to no parent. (uuid = " + this.parametersNodePath + ")");//$NON-NLS-1$ //$NON-NLS-2$
 		}
 
 		try {
 			this.parametersHistory.add(new HashMap<String, Object>());
-			//this.updateLastParameters();
-		}
-		catch (Exception e) {
+			// this.updateLastParameters();
+		} catch (Exception e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
@@ -286,6 +295,7 @@
 
 	/**
 	 * Sets the user name.
+	 * 
 	 * @param name
 	 */
 	public void setUserName(String name) {
@@ -298,21 +308,26 @@
 	public boolean isAltered() {
 		return altered;
 	}
-	
+
 	/**
 	 * Mark the result as altered -> modifications are lost after a re-compute
+	 * 
+	 * children are marked dirty since data has been modified
 	 */
 	public void setAltered() {
 		this.altered = true;
+		for (TXMResult r : getChildren()) {
+			r.setDirty();
+		}
 	}
-	
+
 	/**
 	 * Freezes the result -> cannot be recomputed.
 	 */
 	public void freeze() {
 		this.frozen = true;
 	}
-	
+
 	/**
 	 * Unfreezes the result -> can be recomputed.
 	 */
@@ -326,24 +341,27 @@
 	public void setFrozen(boolean frozen) {
 		this.frozen = frozen;
 	}
-	
+
 	/**
 	 * @return true if the resutl is frozen
 	 */
 	public boolean isFrozen() {
 		return this.frozen;
 	}
-	
+
 	/**
 	 * Creates an UUID dedicated to persistence of this result.
+	 * 
 	 * @return
 	 */
 	public static String createUUID() {
-		// FIXME: see if it's useful to put the class name or not, should be better to save it in the .prefs
-		//this.uniqueID = this.getClass().getName() + '@' + ID_TIME_FORMAT.format(new Date(System.currentTimeMillis())) + "_" + UUID.randomUUID();
+		// FIXME: see if it's useful to put the class name or not, should be better to
+		// save it in the .prefs
+		// this.uniqueID = this.getClass().getName() + '@' + ID_TIME_FORMAT.format(new
+		// Date(System.currentTimeMillis())) + "_" + UUID.randomUUID();
 		return UUID_PREFIX + ID_TIME_FORMAT.format(new Date(System.currentTimeMillis())) + "_" + nextInt();
 	}
-	
+
 	/**
 	 * 
 	 * @return the next integer in the current session of TXM
@@ -354,13 +372,13 @@
 
 	/**
 	 * Checks if the result at least one child.
+	 * 
 	 * @return
 	 */
 	public boolean hasChildren() {
 		return this.children.size() > 0;
 	}
 
-
 	/**
 	 * Gets the preferences node path of the result command.
 	 * 
@@ -370,7 +388,6 @@
 		return this.commandPreferencesNodePath;
 	}
 
-
 	public String[] getCommandPreferencesKeys() throws BackingStoreException {
 		return TXMPreferences.getCommandScopeKeys(this.commandPreferencesNodePath);
 	}
@@ -380,7 +397,9 @@
 	}
 
 	/**
-	 * Gets a current parameter specified by its annotation "key" attribute and its annotation "type" attribute.
+	 * Gets a current parameter specified by its annotation "key" attribute and its
+	 * annotation "type" attribute.
+	 * 
 	 * @param key
 	 * @param parameterType
 	 * @return
@@ -390,18 +409,21 @@
 	}
 
 	/**
-	 * Gets a current parameter specified by its annotation "key" attribute and its annotation "type" attribute.
+	 * Gets a current parameter specified by its annotation "key" attribute and its
+	 * annotation "type" attribute.
+	 * 
 	 * @param key
-	 * @param propagateToParent if true ask the parents
+	 * @param propagateToParent
+	 *            if true ask the parents
 	 * @param parameterType
 	 * @return
 	 */
 	public Object getParameter(String key, boolean propagateToParent) {
 		try {
-			Field field = this.getField(key); 
-			if (field != null)	{
+			Field field = this.getField(key);
+			if (field != null) {
 				field.setAccessible(true);
-				return field.get(this);	
+				return field.get(this);
 			} else if (propagateToParent && this.parent != null) {
 				return this.parent.getParameter(key, propagateToParent);
 			}
@@ -411,15 +433,15 @@
 		return null;
 	}
 
-
 	/**
 	 * Gets a member field according to its key.
+	 * 
 	 * @param key
 	 * @return the field if exists otherwise null
 	 */
-	public Field getField(String key)	{
+	public Field getField(String key) {
 
-		Field field = null; 
+		Field field = null;
 
 		List<Field> fields = this.getAllFields();
 
@@ -436,9 +458,10 @@
 
 	/**
 	 * Returns all the member fields of the class instance.
+	 * 
 	 * @return the list of declared fields
 	 */
-	public List<Field> getAllFields()	{
+	public List<Field> getAllFields() {
 
 		List<Field> fields = new ArrayList<Field>();
 		Class<?> clazz = this.getClass();
@@ -453,15 +476,16 @@
 
 	/**
 	 * Stores the parameters of the specified type used for last computing.
+	 * 
 	 * @throws Exception
 	 */
 	protected void updateLastParameters(int parameterType) throws Exception {
 		this.updateLastParameters(parameterType, false);
 	}
 
-
 	/**
 	 * Stores the parameters of the specified type used for last computing.
+	 * 
 	 * @param parameterType
 	 * @param appendToLastParameters
 	 * @throws Exception
@@ -470,10 +494,9 @@
 
 		HashMap<String, Object> lastParameters;
 
-		if(appendToLastParameters)	{
+		if (appendToLastParameters) {
 			lastParameters = this.getLastParametersFromHistory();
-		}
-		else	{
+		} else {
 			lastParameters = new HashMap<>();
 		}
 
@@ -486,10 +509,9 @@
 			}
 
 			String name;
-			if(!parameter.key().isEmpty())	{
+			if (!parameter.key().isEmpty()) {
 				name = parameter.key();
-			}
-			else	{
+			} else {
 				name = f.getName();
 			}
 
@@ -497,13 +519,13 @@
 			lastParameters.put(name, f.get(this));
 		}
 
-		if(!appendToLastParameters)	{
+		if (!appendToLastParameters) {
 			this.parametersHistory.add(lastParameters);
 		}
 
 		// truncate the stack to the max count
 		// FIXME: store this in a TBX preference
-		if(this.parametersHistory.size() > 5)	{
+		if (this.parametersHistory.size() > 5) {
 			this.parametersHistory.remove(0);
 			this.parametersHistory.remove(0);
 			this.parametersHistory.remove(0);
@@ -513,13 +535,13 @@
 
 	/**
 	 * Stores the last parameters used for computing.
+	 * 
 	 * @throws Exception
 	 */
 	protected void updateLastParameters() throws Exception {
 		this.updateLastParameters(Parameter.COMPUTING);
 	}
 
-
 	/**
 	 * 
 	 * @param parameterType
@@ -535,10 +557,9 @@
 			}
 
 			String name;
-			if(!parameter.key().isEmpty())	{
+			if (!parameter.key().isEmpty()) {
 				name = parameter.key();
-			}
-			else	{
+			} else {
 				name = f.getName();
 			}
 
@@ -546,41 +567,42 @@
 			this.getLastParametersFromHistory().remove(name);
 		}
 
-		if(this.getLastParametersFromHistory().isEmpty())	{
+		if (this.getLastParametersFromHistory().isEmpty()) {
 			this.parametersHistory.remove(this.parametersHistory.size() - 1);
 		}
 	}
 
-
 	/**
-	 * Clears the parameters used for last computing.
-	 * Dedicated to force a full recomputing.
+	 * Clears the parameters used for last computing. Dedicated to force a full
+	 * recomputing.
+	 * 
 	 * @throws Exception
 	 */
 	protected void clearLastComputingParameters() {
 		this.clearLastParameters(Parameter.COMPUTING);
 	}
 
-
 	/**
-	 * Checks if a parameter value has changed since the n-2 computing.
-	 * This method permits to know, for example, if a parent that has already been computed was dirty before its computing,
-	 * then a child can adjust or not its computing, regarding to the parent state.
+	 * Checks if a parameter value has changed since the n-2 computing. This method
+	 * permits to know, for example, if a parent that has already been computed was
+	 * dirty before its computing, then a child can adjust or not its computing,
+	 * regarding to the parent state.
+	 * 
 	 * @param key
 	 * @param older
 	 * @return
 	 */
 	public boolean hasParameterChanged(String key, boolean older) {
-		if(older)	{
-			return this.hasParameterChanged(key, this.parametersHistory.get(this.parametersHistory.size() - 2));	
-		}
-		else	{
+		if (older) {
+			return this.hasParameterChanged(key, this.parametersHistory.get(this.parametersHistory.size() - 2));
+		} else {
 			return this.hasParameterChanged(key);
 		}
 	}
 
 	/**
 	 * Checks if a parameter value has changed since last computing.
+	 * 
 	 * @param key
 	 * @param parameterType
 	 * @return
@@ -590,7 +612,9 @@
 	}
 
 	/**
-	 * Checks if a parameter value has changed since last computing according to the specified external map.
+	 * Checks if a parameter value has changed since last computing according to the
+	 * specified external map.
+	 * 
 	 * @param key
 	 * @param lastParameters
 	 * @return
@@ -599,36 +623,34 @@
 		if (key.isEmpty()) {
 			return false;
 		}
-		//		if (this.isDirty()) {
-		//			return true;
-		//		}
+		// if (this.isDirty()) {
+		// return true;
+		// }
 
 		Object lastValue = lastParameters.get(key);
 		Object newValue = this.getParameter(key);
 		if (lastValue == null) {
-			if(newValue != null)	{
+			if (newValue != null) {
 				return true;
-			}
-			else	{
+			} else {
 				return false;
 			}
-		}
-		else {
+		} else {
 			return !lastValue.equals(newValue);
 		}
 	}
 
-
-
 	/**
-	 * Dumps the command and default preferences of the result preferences node qualifier.
+	 * Dumps the command and default preferences of the result preferences node
+	 * qualifier.
+	 * 
 	 * @return
 	 */
-	public String dumpPreferences()	{
+	public String dumpPreferences() {
 
 		StringBuilder str = new StringBuilder();
 
-		if(TXMPreferences.resultScopeNodeExists(this))	{
+		if (TXMPreferences.resultScopeNodeExists(this)) {
 			str.append("\nResult local node preferences\n"); //$NON-NLS-1$
 			str.append(TXMPreferences.getKeysAndValues(this.getParametersNodePath()));
 		}
@@ -642,22 +664,22 @@
 		return str.toString();
 	}
 
-
 	/**
 	 * Dumps the result computing parameters (Parameter annotation).
+	 * 
 	 * @return
 	 */
-	public String dumpParameters()	{
+	public String dumpParameters() {
 		return this.dumpParameters(Parameter.COMPUTING);
 	}
 
-
 	/**
 	 * Dumps the result computing parameters (Parameter annotation).
+	 * 
 	 * @param parametersType
 	 * @return
 	 */
-	public String dumpParameters(int parametersType)	{
+	public String dumpParameters(int parametersType) {
 
 		StringBuilder str = new StringBuilder();
 
@@ -673,26 +695,23 @@
 			f.setAccessible(true);
 
 			String name;
-			if(!parameter.key().isEmpty())	{
+			if (!parameter.key().isEmpty()) {
 				name = parameter.key();
-			}
-			else	{
+			} else {
 				name = f.getName();
 			}
 
 			try {
 				Object v = f.get(this);
 				if (v != null) {
-					str.append(name + " ("+ v.getClass().getSimpleName() + ") = " + v + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+					str.append(name + " (" + v.getClass().getSimpleName() + ") = " + v + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 				} else {
 					str.append(name + " = NULL \n"); //$NON-NLS-1$ //$NON-NLS-2$
 				}
-			}
-			catch (IllegalArgumentException e) {
+			} catch (IllegalArgumentException e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
-			}
-			catch (IllegalAccessException e) {
+			} catch (IllegalAccessException e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
@@ -700,57 +719,58 @@
 		return str.toString();
 	}
 
-
-
 	/**
 	 * Updates the dirty state by comparing an old parameter with a new one.
 	 * 
-	 * @param lastValue may be null
-	 * @param newValue may be null
+	 * @param lastValue
+	 *            may be null
+	 * @param newValue
+	 *            may be null
 	 */
 	protected void updateDirty(Object lastValue, Object newValue) {
-		if(lastValue == null && newValue == null)	{
+		if (lastValue == null && newValue == null) {
 			return;
 		}
 		if (lastValue == null || !lastValue.equals(newValue)) {
-			Log.info("TXMResult.updateDirty(): " + this.getClass().getSimpleName() + ": setting dirty to true: last = "+ lastValue + " / new = " + newValue);
+			Log.info("TXMResult.updateDirty(): " + this.getClass().getSimpleName() + ": setting dirty to true: last = " + lastValue + " / new = " + newValue);
 			this.setDirty();
 		}
 	}
 
 	/**
-	 * Updates the dirty states by comparing TXMResult @Parameter with previously used parameters in the compute() method.
+	 * Updates the dirty states by comparing TXMResult @Parameter with previously
+	 * used parameters in the compute() method.
 	 * 
-	 * To work correctly :
-	 *  - the equals method of the TXMResult parameters must be correctly implemented.
-	 *  - the @Parameter member must be another variable (the previous is stored in the lastParameters protected variable) (e.g editing a List @Parameter is not enough for this test)
+	 * To work correctly : - the equals method of the TXMResult parameters must be
+	 * correctly implemented. - the @Parameter member must be another variable (the
+	 * previous is stored in the lastParameters protected variable) (e.g editing a
+	 * List @Parameter is not enough for this test)
 	 * 
-	 * The method is final and don't need to be re-implemented. To ignore this method, don't use the @Parameter annotations
+	 * The method is final and don't need to be re-implemented. To ignore this
+	 * method, don't use the @Parameter annotations
 	 * 
 	 * Implement isDirty if you need more test
 	 * 
 	 * @return
-	 * @throws IllegalAccessException 
-	 * @throws IllegalArgumentException 
+	 * @throws IllegalAccessException
+	 * @throws IllegalArgumentException
 	 */
 	public final boolean isDirtyFromHistory() throws Exception {
 
 		List<Field> fields = this.getAllFields();
-		
+
 		for (Field f : fields) {
 			Parameter parameter = f.getAnnotation(Parameter.class);
-			if (parameter == null
-					|| parameter.type() != Parameter.COMPUTING
-					// FIXME: non electric mode tests
-					//|| parameter.electric() == false 
-					) {
+			if (parameter == null || parameter.type() != Parameter.COMPUTING
+			// FIXME: non electric mode tests
+			// || parameter.electric() == false
+			) {
 				continue;
 			}
 			String name;
-			if (!parameter.key().isEmpty())	{
+			if (!parameter.key().isEmpty()) {
 				name = parameter.key();
-			}
-			else {
+			} else {
 				name = f.getName();
 			}
 
@@ -759,8 +779,8 @@
 			Object previousValue = this.getLastParametersFromHistory().get(name);
 			Object newValue = f.get(this);
 
-			//			// FIXME: debug
-			//			Log.finest("TXMResult.isDirtyFromHistory(): checking parameter: " + name);
+			// // FIXME: debug
+			// Log.finest("TXMResult.isDirtyFromHistory(): checking parameter: " + name);
 
 			this.updateDirty(previousValue, newValue);
 			if (this.dirty) {
@@ -771,8 +791,7 @@
 		return this.dirty;
 	}
 
-
-	public HashMap<String, Object> getLastParametersFromHistory()	{
+	public HashMap<String, Object> getLastParametersFromHistory() {
 		return this.parametersHistory.get(this.parametersHistory.size() - 1);
 	}
 
@@ -786,16 +805,19 @@
 	}
 
 	/**
-	 * Marks the result as dirty so editors or others will know the TXMResult needs to be recomputed.
-	 * This method is also recursively called on all the children branch to mark them as dirty.
+	 * Marks the result as dirty so editors or others will know the TXMResult needs
+	 * to be recomputed. This method is also recursively called on all the children
+	 * branch to mark them as dirty.
 	 */
 	public void setDirty() {
 		this.setDirty(true);
 	}
 
 	/**
-	 *  Sets the result dirty state so editors or others will know the TXMResult needs to be recomputed or not.
-	 *  This method is also recursively called on all the children branch sets the new dirty state.
+	 * Sets the result dirty state so editors or others will know the TXMResult
+	 * needs to be recomputed or not. This method is also recursively called on all
+	 * the children branch sets the new dirty state.
+	 * 
 	 * @param dirty
 	 */
 	public void setDirty(boolean dirty) {
@@ -804,7 +826,6 @@
 			this.children.get(i).setDirty(dirty);
 		}
 	}
-	
 
 	/**
 	 * Gets the value of the specified key in parameters, local result node or
@@ -872,31 +893,33 @@
 		return TXMPreferences.getString(key, this, this.commandPreferencesNodePath);
 	}
 
-
 	/**
 	 * Checks if the specified parameter exists.
+	 * 
 	 * @param key
 	 * @return
 	 */
-	public boolean parameterExists(String key)	{
+	public boolean parameterExists(String key) {
 		return TXMPreferences.keyExists(this.parametersNodePath, key);
 	}
 
 	/**
-	 * Checks if a preference is empty (equals to "") in the command preference node.
-	 * An empty preference can be used to disable a functionality for a kind of result
-	 * (eg. A partition dimension bar chart does not have a legend so it can be used to not offer the hide/show legend button in UI).
+	 * Checks if a preference is empty (equals to "") in the command preference
+	 * node. An empty preference can be used to disable a functionality for a kind
+	 * of result (eg. A partition dimension bar chart does not have a legend so it
+	 * can be used to not offer the hide/show legend button in UI).
+	 * 
 	 * @param key
 	 * @return
 	 */
-	public boolean isEmptyPreference(String key)	{
+	public boolean isEmptyPreference(String key) {
 		return TXMPreferences.isEmpty(this.commandPreferencesNodePath, key);
 	}
 
-
-
 	/**
-	 * Stores the specified parameters pairs of key/value in a local node dedicated to the specified result. The node qualifier is generated by the <code>TXMResult.getUUID</code> method.
+	 * Stores the specified parameters pairs of key/value in a local node dedicated
+	 * to the specified result. The node qualifier is generated by the
+	 * <code>TXMResult.getUUID</code> method.
 	 * 
 	 * @param key
 	 * @return
@@ -905,24 +928,29 @@
 		this.saveParameter(key, StringUtils.join(values, UNDERSCORE));
 	}
 
-
 	/**
-	 * Stores the specified parameters pairs of key/value in a local node dedicated to the specified result. The node qualifier is generated by the <code>TXMResult.getUUID</code> method.
+	 * Stores the specified parameters pairs of key/value in a local node dedicated
+	 * to the specified result. The node qualifier is generated by the
+	 * <code>TXMResult.getUUID</code> method.
+	 * 
 	 * @param result
 	 * @param key
 	 * @param value
 	 */
-	public void saveParameter(String key, Object value)	{
+	public void saveParameter(String key, Object value) {
 		// FIXME: debug
-		//Log.info("TXMResult.saveParameter(): saving parameter " + key + " = " + value + " for " + this.getClass() + " (" + value.getClass() + ") to node.");
+		// Log.info("TXMResult.saveParameter(): saving parameter " + key + " = " + value
+		// + " for " + this.getClass() + " (" + value.getClass() + ") to node.");
 
 		TXMPreferences.putLocal(this, key, value);
 	}
 
-
 	/**
-	 * Stores the result parameter fields declared by their @Parameter annotation in the persisted result node preferences.
-	 * One have to implement saveParameters() to save parameters that are not of primitive types (e.g. Property, List, HashMap...)
+	 * Stores the result parameter fields declared by their @Parameter annotation in
+	 * the persisted result node preferences. One have to implement saveParameters()
+	 * to save parameters that are not of primitive types (e.g. Property, List,
+	 * HashMap...)
+	 * 
 	 * @return
 	 * @throws Exception
 	 */
@@ -934,19 +962,19 @@
 		this.saveParameter("class", this.getClass().getName()); //$NON-NLS-1$
 
 		this.saveParameter(TXMPreferences.RESULT_PARAMETERS_NODE_PATH, this.parametersNodePath);
-		
-		// FIXME: old version that not work well if a bundle has no preference initializer
-		//this.saveParameter(TXMPreferences.BUNDLE_ID, this.commandPreferencesNodePath);
+
+		// FIXME: old version that not work well if a bundle has no preference
+		// initializer
+		// this.saveParameter(TXMPreferences.BUNDLE_ID,
+		// this.commandPreferencesNodePath);
 		// FIXME: new version
 		this.saveParameter(TXMPreferences.BUNDLE_ID, FrameworkUtil.getBundle(getClass()).getSymbolicName());
-		
-		
-		
-		if (this.parent != null)	{
+
+		if (this.parent != null) {
 			this.saveParameter(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, this.parent.getParametersNodePath());
 		}
 
-		if(this.hasBeenComputedOnce)	{
+		if (this.hasBeenComputedOnce) {
 			this.lazyName = this.getSimpleName();
 		}
 
@@ -962,19 +990,16 @@
 				continue; // no preference key defined
 			}
 
-			if (f.getType().isAssignableFrom(int.class) || f.getType().isAssignableFrom(Integer.class) ||
-					f.getType().isAssignableFrom(double.class) || f.getType().isAssignableFrom(Double.class) ||
-					f.getType().isAssignableFrom(float.class) || f.getType().isAssignableFrom(Float.class) ||
-					f.getType().isAssignableFrom(boolean.class) || f.getType().isAssignableFrom(Boolean.class) ||
-					f.getType().isAssignableFrom(String.class)
+			if (f.getType().isAssignableFrom(int.class) || f.getType().isAssignableFrom(Integer.class) || f.getType().isAssignableFrom(double.class) || f.getType().isAssignableFrom(Double.class)
+					|| f.getType().isAssignableFrom(float.class) || f.getType().isAssignableFrom(Float.class) || f.getType().isAssignableFrom(boolean.class)
+					|| f.getType().isAssignableFrom(Boolean.class) || f.getType().isAssignableFrom(String.class)
 
-					// FIXME: do not pass a Serializable for now
-					//|| !f.getType().isAssignableFrom(Serializable.class)
-					//|| !Serializable.class.isInstance(f)
+			// FIXME: do not pass a Serializable for now
+			// || !f.getType().isAssignableFrom(Serializable.class)
+			// || !Serializable.class.isInstance(f)
 
-					) {
+			) {
 
-
 				f.setAccessible(true); // set accessible to test the field values
 				try {
 					Object value = f.get(this);
@@ -990,9 +1015,11 @@
 	}
 
 	/**
-	 * Dedicated to stores the result parameters in the persisted result node preferences.
-	 * One have to implement this method to save parameters that are not of primitive types (e.g. Property, List, HashMap...)
-	 * Parameters of primitive types are automatically saved after a computing.
+	 * Dedicated to stores the result parameters in the persisted result node
+	 * preferences. One have to implement this method to save parameters that are
+	 * not of primitive types (e.g. Property, List, HashMap...) Parameters of
+	 * primitive types are automatically saved after a computing.
+	 * 
 	 * @return
 	 * @throws Exception
 	 */
@@ -1001,9 +1028,10 @@
 	/**
 	 * calls saveParameters() on this and children if childrenAsWell is set to true
 	 * 
-	 * only children 
+	 * only children
 	 * 
-	 * @param childrenAsWell save the children parameters as well
+	 * @param childrenAsWell
+	 *            save the children parameters as well
 	 * @return true if all saves were successful
 	 * @throws Exception
 	 */
@@ -1037,15 +1065,17 @@
 	 * @throws Exception
 	 */
 	protected boolean autoLoadParametersFromAnnotations() throws Exception {
-		return this.autoLoadParametersFromAnnotations(Parameter.COMPUTING) && this.autoLoadParametersFromAnnotations(Parameter.INTERNAL); 
+		return this.autoLoadParametersFromAnnotations(Parameter.COMPUTING) && this.autoLoadParametersFromAnnotations(Parameter.INTERNAL);
 	}
 
 	/**
-	 * Fills the result parameter fields declared by their @Parameter annotation from the persisted result node or default node of the preferences.
-	 * One have to implement loadParameters() to load parameters that are not of primitive types (e.g. Property, List, HashMap...)
+	 * Fills the result parameter fields declared by their @Parameter annotation
+	 * from the persisted result node or default node of the preferences. One have
+	 * to implement loadParameters() to load parameters that are not of primitive
+	 * types (e.g. Property, List, HashMap...)
 	 * 
 	 * @return
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	protected boolean autoLoadParametersFromAnnotations(int parameterType) throws Exception {
 
@@ -1057,11 +1087,12 @@
 			if (parameter == null || parameter.type() != parameterType) {
 				continue;
 			}
-			
+
 			String key = parameter.key();
 
 			if (key.isEmpty()) {
-				continue; // no preference key defined for the parameter so it can't be filled with default value or result persistence value from preferences nodes
+				continue; // no preference key defined for the parameter so it can't be filled with
+							// default value or result persistence value from preferences nodes
 			}
 			try {
 				f.setAccessible(true); // set accessible to test the field values
@@ -1071,26 +1102,28 @@
 				// only manage primitive types
 				if (f.getType().isAssignableFrom(String.class)) {
 					value = this.getStringParameterValue(key);
-				}
-				else if (f.getType().isAssignableFrom(double.class) || f.getType().isAssignableFrom(Double.class)) {
+				} else if (f.getType().isAssignableFrom(double.class) || f.getType().isAssignableFrom(Double.class)) {
 					value = this.getDoubleParameterValue(key);
-				}
-				else if (f.getType().isAssignableFrom(float.class) || f.getType().isAssignableFrom(Float.class)) {
+				} else if (f.getType().isAssignableFrom(float.class) || f.getType().isAssignableFrom(Float.class)) {
 					value = this.getFloatParameterValue(key);
-				}
-				else if (f.getType().isAssignableFrom(int.class) || f.getType().isAssignableFrom(Integer.class)) {
+				} else if (f.getType().isAssignableFrom(int.class) || f.getType().isAssignableFrom(Integer.class)) {
 					value = this.getIntParameterValue(key);
-				}
-				else if (f.getType().isAssignableFrom(boolean.class) || f.getType().isAssignableFrom(Boolean.class)) {
+				} else if (f.getType().isAssignableFrom(boolean.class) || f.getType().isAssignableFrom(Boolean.class)) {
 					value = this.getBooleanParameterValue(key);
 				}
-				// FIXME: test to automate other type creation as Property => problem here is that org.txm.core doesn't know the plug-in org.txm.searchengine.cqp.core
-				// could be done using reflection. Get the field runtime class, then get and call the constructor
-				//				else if (f.getType().isAssignableFrom(Property.class)) {
-				//					value = new Property(this.getStringParameterValue(key), Corpus.getCorpus(this));
-				//				}
-				// MD: nope should be done via adapter or extension point "org.txm.searchengine.cqp.core" contributes to
-				// SJ: or better, when the abstraction of Property, etc. will be done, we could implement some extensions as in ChartCreator model to other engines, eg. SearchEngine, that will return
+				// FIXME: test to automate other type creation as Property => problem here is
+				// that org.txm.core doesn't know the plug-in org.txm.searchengine.cqp.core
+				// could be done using reflection. Get the field runtime class, then get and
+				// call the constructor
+				// else if (f.getType().isAssignableFrom(Property.class)) {
+				// value = new Property(this.getStringParameterValue(key),
+				// Corpus.getCorpus(this));
+				// }
+				// MD: nope should be done via adapter or extension point
+				// "org.txm.searchengine.cqp.core" contributes to
+				// SJ: or better, when the abstraction of Property, etc. will be done, we could
+				// implement some extensions as in ChartCreator model to other engines, eg.
+				// SearchEngine, that will return
 				// the right class here
 				f.set(this, value);
 
@@ -1105,9 +1138,11 @@
 	}
 
 	/**
-	 * Method dedicated to manually create and load non primitive parameters from strings stored in preference nodes in subclasses.
-	 * This method is called by the constructor of the class TXMResult.
-	 * The constructor also auto-loads the parameters that have a @Parameter annotation.
+	 * Method dedicated to manually create and load non primitive parameters from
+	 * strings stored in preference nodes in subclasses. This method is called by
+	 * the constructor of the class TXMResult. The constructor also auto-loads the
+	 * parameters that have a @Parameter annotation.
+	 * 
 	 * @return
 	 * @throws Exception
 	 */
@@ -1126,7 +1161,7 @@
 	 * 
 	 * @param parameters
 	 * @return
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	public final boolean setParameters(HashMap<String, Object> parameters) throws Exception {
 		return setParameters(new TXMParameters(parameters));
@@ -1134,25 +1169,28 @@
 
 	/**
 	 * Sets a parameters from its parameter annotation "key".
+	 * 
 	 * @param key
 	 * @param value
 	 * @return
 	 * @throws Exception
 	 */
-	public boolean setParameter(String key, Object value) throws Exception	{
+	public boolean setParameter(String key, Object value) throws Exception {
 		return setParameter(key, value, false);
 	}
 
 	/**
 	 * Sets a parameters from its parameter annotation "key".
+	 * 
 	 * @param key
 	 * @param value
-	 * @param propagateToParent propagate the key=value to parent if the result has no field=key
+	 * @param propagateToParent
+	 *            propagate the key=value to parent if the result has no field=key
 	 * 
 	 * @return
 	 * @throws Exception
 	 */
-	public boolean setParameter(String key, Object value, boolean propagateToParent) throws Exception	{
+	public boolean setParameter(String key, Object value, boolean propagateToParent) throws Exception {
 
 		List<Field> fields = this.getAllFields();
 
@@ -1163,23 +1201,23 @@
 			if (parameter == null) {
 				continue;
 			}
-			if(!parameter.key().isEmpty() && parameter.key().equals(key))	{
+			if (!parameter.key().isEmpty() && parameter.key().equals(key)) {
 				targetField = f;
 				break;
 			}
 		}
 
-		if (targetField != null)	{
+		if (targetField != null) {
 			targetField.setAccessible(true);
 
 			// FIXME: debug
-			//if(value != null)	{
-			//	Log.info("TXMResult.setParameter(): setting parameter " + key + " = " + value + " for " + this.getClass() + " (" + value.getClass() + ")");
-			//}
+			// if(value != null) {
+			// Log.info("TXMResult.setParameter(): setting parameter " + key + " = " + value
+			// + " for " + this.getClass() + " (" + value.getClass() + ")");
+			// }
 
 			targetField.set(this, value);
-		}
-		else if (this.parent != null && propagateToParent) {
+		} else if (this.parent != null && propagateToParent) {
 			this.parent.setParameter(key, value, propagateToParent);
 		}
 
@@ -1187,7 +1225,9 @@
 	}
 
 	/**
-	 * Deletes the object from its parent, also deletes the children. The <code>TXMResult.clean()</code> methods of this result and children results are applied before the deletion.
+	 * Deletes the object from its parent, also deletes the children. The
+	 * <code>TXMResult.clean()</code> methods of this result and children results
+	 * are applied before the deletion.
 	 * 
 	 * @return
 	 */
@@ -1203,13 +1243,13 @@
 			while (this.children.size() > 0) {
 				TXMResult c = this.children.get(0);
 				c.delete(); // should call parent.removeResult(child)
-				//				TXMPreferences.delete(this.children.get(i));
-				//				this.removeChild(i);
+				// TXMPreferences.delete(this.children.get(i));
+				// this.removeChild(i);
 				this.children.remove(c); // but should be done already...
 			}
 			this.children.clear();
 
-			//THEN FINISH WITH THIS
+			// THEN FINISH WITH THIS
 			// delete the local node
 			TXMPreferences.delete(this);
 
@@ -1217,16 +1257,18 @@
 			this.clean();
 
 			if (this.parent != null) {
-				
-				TXMResult parent = this.parent; 
-				
+
+				TXMResult parent = this.parent;
+
 				this.parent.removeChild(this);
-				
-				// FIXME: to delete the hidden parent when using shortcut command (eg. Specificities on Partition that hides the parent LexicalTable)
+
+				// FIXME: to delete the hidden parent when using shortcut command (eg.
+				// Specificities on Partition that hides the parent LexicalTable)
 				// need to prove this method
-				if(!parent.isVisible() &&
-						!(parent instanceof Project) // FIXME: actually removing this test and modify DeleteObject.java method public static List<Object> delete(Object o) by removing the MainCorpus test should work
-						)	{
+				if (!parent.isVisible() && !(parent instanceof Project) // FIXME: actually removing this test and modify DeleteObject.java method public
+																		// static List<Object> delete(Object o) by removing the MainCorpus test should
+																		// work
+				) {
 					parent.delete();
 				}
 
@@ -1244,54 +1286,52 @@
 	 * Deletes all non persistent results and saves the results to persist.
 	 */
 	public static void deleteAllNonPersistentResults() {
-//		File logs = new File(System.getProperty("user.home"), "logs.txt");
-//		PrintWriter w = null;
+		// File logs = new File(System.getProperty("user.home"), "logs.txt");
+		// PrintWriter w = null;
 		try {
-//			w = IOUtils.getWriter(logs);
+			// w = IOUtils.getWriter(logs);
 			List<TXMResult> todo = Toolbox.workspace.getChildren();
 			while (todo.size() > 0) {
 				TXMResult r = null;
-//				try {
-					r = todo.remove(0);
-					todo.addAll(0, r.getChildren());
-//					w.println("Persisting? "+r);
-					if (r.mustBePersisted())	{ 
-//						w.println(" YES");
-						TXMPreferences.flush(r);
-					}
-					else {
-//						w.println(" NO");
-						Log.finest("TXMResult.deleteAllNonPersistentResults(): Deleting result " + r.getSimpleName() + " of type " + r.getClass().getSimpleName() + ".");
-						TXMPreferences.delete(r);
-					}
-//				} catch (Exception e) {
-//					w.println(" Error: "+e+" with "+r);
-//				}
-//				w.println(" OK: "+r);
+				// try {
+				r = todo.remove(0);
+				todo.addAll(0, r.getChildren());
+				// w.println("Persisting? "+r);
+				if (r.mustBePersisted()) {
+					// w.println(" YES");
+					TXMPreferences.flush(r);
+				} else {
+					// w.println(" NO");
+					Log.finest("TXMResult.deleteAllNonPersistentResults(): Deleting result " + r.getSimpleName() + " of type " + r.getClass().getSimpleName() + ".");
+					TXMPreferences.delete(r);
+				}
+				// } catch (Exception e) {
+				// w.println(" Error: "+e+" with "+r);
+				// }
+				// w.println(" OK: "+r);
 			}
 		} finally {
-//			if (w != null) w.close();
+			// if (w != null) w.close();
 		}
 	}
 
-
 	/**
 	 * Gets a child specified by its index in the children list.
+	 * 
 	 * @param index
 	 * @return the child specified by its index if exists otherwise null
 	 */
 	public TXMResult getChild(int index) {
 		try {
 			return this.children.get(index);
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			return null;
 		}
 	}
 
 	/**
-	 * Adds a child result to this result.
-	 * If the child already have a parent, the child will be remove from its old parent children.
+	 * Adds a child result to this result. If the child already have a parent, the
+	 * child will be remove from its old parent children.
 	 * 
 	 * @param child
 	 * @return true if the child has been added
@@ -1299,10 +1339,10 @@
 	private boolean addChild(TXMResult child) {
 		try {
 			// do nothing if the parent is already this result
-			//			if(child.getParent() == this)	{
-			//				return true;
-			//			}
-			//			else	{
+			// if(child.getParent() == this) {
+			// return true;
+			// }
+			// else {
 			// remove from current parent if exists
 			child.removeFromParent();
 
@@ -1313,7 +1353,7 @@
 				// child + " to parent " + this);
 				return this.children.add(child);
 			}
-			//			}
+			// }
 		} catch (Exception e) {
 			// nothing to do
 		}
@@ -1321,7 +1361,8 @@
 	}
 
 	/**
-	 * Inserts a child result in this result children list at the specified position.
+	 * Inserts a child result in this result children list at the specified
+	 * position.
 	 * 
 	 * @param index
 	 * @param child
@@ -1426,6 +1467,7 @@
 
 	/**
 	 * Gets the first child result specified by its class.
+	 * 
 	 * @param type
 	 * @return the first child if exists otherwise null
 	 */
@@ -1433,14 +1475,14 @@
 		List<TXMResult> children = this.getChildren(type, false);
 		try {
 			return children.get(0);
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			return null;
 		}
 	}
 
 	/**
 	 * Deletes the children of the specified class.
+	 * 
 	 * @param type
 	 * @return
 	 */
@@ -1451,22 +1493,20 @@
 		}
 	}
 
-
 	/**
 	 * Gets the first child.
+	 * 
 	 * @param classSimpleName
 	 * @return
 	 */
 	public TXMResult getFirstChild() {
 		try {
 			return this.children.get(0);
+		} catch (Exception e) {
 		}
-		catch (Exception e) {
-		}
 		return null;
 	}
 
-
 	/**
 	 * Gets the children of all the branch of the specified node in a flat list.
 	 * 
@@ -1491,7 +1531,7 @@
 	public List<TXMResult> getDeepChildren(Class<? extends TXMResult> clazz) {
 		return TXMResult.getDeepChildren(this, clazz);
 	}
-	
+
 	/**
 	 * Gets the children of all the branch in a flat list.
 	 * 
@@ -1500,7 +1540,7 @@
 	public static List<TXMResult> getDeepChildren(TXMResult r) {
 		return TXMResult.getDeepChildren(r, null);
 	}
-	
+
 	/**
 	 * Gets the children of all the branch in a flat list.
 	 * 
@@ -1511,20 +1551,21 @@
 	}
 
 	/**
-	 * Gets the TXMResult specified by its UUID in the children of the specified root result.
+	 * Gets the TXMResult specified by its UUID in the children of the specified
+	 * root result.
+	 * 
 	 * @param branchRoot
 	 * @param UUID
 	 * @return
 	 */
-	public static TXMResult getResult(TXMResult root, String nodePath)	{
+	public static TXMResult getResult(TXMResult root, String nodePath) {
 		TXMResult result = null;
-		if(root.getParametersNodePath().equals(nodePath))	{
+		if (root.getParametersNodePath().equals(nodePath)) {
 			result = root;
-		}
-		else	{
+		} else {
 			List<TXMResult> results = root.getDeepChildren();
 			for (int i = 0; i < results.size(); i++) {
-				if(results.get(i).getParametersNodePath().equals(nodePath))	{
+				if (results.get(i).getParametersNodePath().equals(nodePath)) {
 					result = results.get(i);
 					break;
 				}
@@ -1534,11 +1575,13 @@
 	}
 
 	/**
-	 * Gets the TXMResult specified by its UUID in the children of the Toolbox Workspace member.
+	 * Gets the TXMResult specified by its UUID in the children of the Toolbox
+	 * Workspace member.
+	 * 
 	 * @param UUID
 	 * @return
 	 */
-	public static TXMResult getResult(String nodePath)	{
+	public static TXMResult getResult(String nodePath) {
 		return getResult(Toolbox.workspace, nodePath);
 	}
 
@@ -1552,14 +1595,12 @@
 		List<TXMResult> nodes = new ArrayList<TXMResult>();
 		for (TXMResult child : srcNodes) {
 			try {
-				if ((type == null || 
-						child.getClass().asSubclass(type) != null) 
-						&& (onlyVisible == false || child.isVisible())) {
+				if ((type == null || child.getClass().asSubclass(type) != null) && (onlyVisible == false || child.isVisible())) {
 					nodes.add(child);
 				}
 
 				// add children of a non visible result
-				else if (!child.isVisible() && child.hasChildren())	{
+				else if (!child.isVisible() && child.hasChildren()) {
 					List<TXMResult> subChidlren = child.getChildren(type, onlyVisible);
 					nodes.addAll(subChidlren);
 				}
@@ -1572,15 +1613,16 @@
 
 	/**
 	 * Gets the direct children count.
+	 * 
 	 * @return the direct children count
 	 */
 	public int getChildrenCount() {
 		return this.children.size();
 	}
 
-
 	/**
 	 * Gets the root parent of the branch.
+	 * 
 	 * @return
 	 */
 	public TXMResult getRootParent() {
@@ -1594,9 +1636,10 @@
 		return root;
 	}
 
-
 	/**
-	 * Gets the first parent of the specified class, eg. this.getFirstParent(Partition.class);
+	 * Gets the first parent of the specified class, eg.
+	 * this.getFirstParent(Partition.class);
+	 * 
 	 * @param type
 	 * @return
 	 */
@@ -1604,9 +1647,9 @@
 		TXMResult node = null;
 		TXMResult parent = this.parent;
 		do {
-			if(parent != null)	{
-				if(parent.getClass().equals(type)) {
-					node = parent;	
+			if (parent != null) {
+				if (parent.getClass().equals(type)) {
+					node = parent;
 				}
 
 				parent = parent.getParent();
@@ -1616,38 +1659,38 @@
 		return node;
 	}
 
+	// /**
+	// * Gets the first parent of the specified class, eg.
+	// this.getFirstParent(Partition.class);
+	// * Returns the object itself if it is of the specified class.
+	// * @param type
+	// * @return null if the TXMResult is not attached to a BinaryCorpus
+	// */
+	// public Project getCorpusProject() {
+	// Object o = getFirstParent(Project.class);
+	// if (o != null) {
+	// return (Project)o;
+	// } else {
+	// return null;
+	// }
+	// }
+	//
+	// /**
+	// * Gets the first parent of the specified class, eg.
+	// this.getFirstParent(Partition.class);
+	// * Returns the object itself if it is of the specified class.
+	// * @param type
+	// * @return null if the TXMResult is not attached to a BinaryCorpus
+	// */
+	// public CorpusBuild getCorpusBuild() {
+	// Object o = getFirstParent(CorpusBuild.class);
+	// if (o != null) {
+	// return (CorpusBuild)o;
+	// } else {
+	// return null;
+	// }
+	// }
 
-
-	//	/**
-	//	 * Gets the first parent of the specified class, eg. this.getFirstParent(Partition.class);
-	//	 * Returns the object itself if it is of the specified class.
-	//	 * @param type
-	//	 * @return null if the TXMResult is not attached to a BinaryCorpus
-	//	 */
-	//	public Project getCorpusProject() {
-	//		Object o = getFirstParent(Project.class);
-	//		if (o != null) {
-	//			return (Project)o;
-	//		} else {
-	//			return null;
-	//		}
-	//	}
-	//	
-	//	/**
-	//	 * Gets the first parent of the specified class, eg. this.getFirstParent(Partition.class);
-	//	 * Returns the object itself if it is of the specified class.
-	//	 * @param type
-	//	 * @return null if the TXMResult is not attached to a BinaryCorpus
-	//	 */
-	//	public CorpusBuild getCorpusBuild() {
-	//		Object o = getFirstParent(CorpusBuild.class);
-	//		if (o != null) {
-	//			return (CorpusBuild)o;
-	//		} else {
-	//			return null;
-	//		}
-	//	}
-
 	/**
 	 * Gets the sibling nodes of this node result.
 	 */
@@ -1680,14 +1723,13 @@
 	public boolean isVisible() {
 		return this.visible;
 	}
-	
+
 	public boolean isParentVisible() {
 		return parent != null && (parent.isVisible() || parent.isInternalPersistable());
 	}
 
 	/**
-	 * Sets the result visibility state.
-	 * Dedicated to UI purposes.
+	 * Sets the result visibility state. Dedicated to UI purposes.
 	 * 
 	 * @param visible
 	 * @return
@@ -1722,58 +1764,59 @@
 	public abstract String getName();
 
 	/**
-	 * Gets the simple name of the result.
-	 * Dedicated to be displayed in a small UI area.
+	 * Gets the simple name of the result. Dedicated to be displayed in a small UI
+	 * area.
 	 * 
 	 * @return
 	 */
 	public abstract String getSimpleName();
 
 	/**
-	 * Gets some details about how the result has been computed (eg. additional parameters, etc.).
-	 * Dedicated to be displayed in a large UI area.
+	 * Gets some details about how the result has been computed (eg. additional
+	 * parameters, etc.). Dedicated to be displayed in a large UI area.
 	 * 
 	 * @return
 	 */
 	public abstract String getDetails();
 
 	/**
-	 * Gets the user name if exists otherwise, the lazy name if exists, otherwise the simple name.
+	 * Gets the user name if exists otherwise, the lazy name if exists, otherwise
+	 * the simple name.
 	 * 
 	 * @return the current name
 	 */
 	public String getCurrentName() {
 		if (!this.userName.isEmpty()) {
 			return this.userName;
-		}
-		else if (this.lazyName != null && !this.lazyName.isEmpty()) {
+		} else if (this.lazyName != null && !this.lazyName.isEmpty()) {
 			return this.lazyName;
-		}
-		else {
+		} else {
 			return this.getSimpleName();
 		}
 	}
 
-
 	/**
-	 * Convenience method to get a shared name when the result is empty (not yet computed).
+	 * Convenience method to get a shared name when the result is empty (not yet
+	 * computed).
+	 * 
 	 * @return the string "..."
 	 */
-	public String getEmptyName()	{
+	public String getEmptyName() {
 		return "..."; //$NON-NLS-1$
 	}
 
-//	/**
-//	 * Returns a string representation of an unique ID for the result.
-//	 * 
-//	 * @return
-//	 */
-//	public String getUUID() {
-//		return this.uniqueID;
-//	}
+	// /**
+	// * Returns a string representation of an unique ID for the result.
+	// *
+	// * @return
+	// */
+	// public String getUUID() {
+	// return this.uniqueID;
+	// }
 
 	/**
-	 * Gets a string representing the result that can be used as a file name (eg. for exporting in file).
+	 * Gets a string representing the result that can be used as a file name (eg.
+	 * for exporting in file).
 	 * 
 	 * @return a valid filename without unexpected characters
 	 */
@@ -1788,7 +1831,8 @@
 	}
 
 	/**
-	 * Gets a string representing the concatenation of the simple names of the branch of this result.
+	 * Gets a string representing the concatenation of the simple names of the
+	 * branch of this result.
 	 * 
 	 * @return the full path
 	 */
@@ -1833,27 +1877,30 @@
 	public TXMResult clone() {
 		return clone(null, true);
 	}
-	
+
 	public TXMResult clone(boolean all) {
 		return clone(null, all);
 	}
+
 	/**
 	 * recursive method to clone a result
-	 * @param newParent necessary for cloning children in the right clone parent
+	 * 
+	 * @param newParent
+	 *            necessary for cloning children in the right clone parent
 	 * @param all
 	 * @return
 	 */
 	protected TXMResult clone(TXMResult newParent, boolean all) {
 		TXMResult clone = null;
 		try {
-			String newNodePath = this.getProject().getParametersNodeRootPath()+ createUUID() + "_" + this.getClass().getSimpleName();
+			String newNodePath = this.getProject().getParametersNodeRootPath() + createUUID() + "_" + this.getClass().getSimpleName();
 			TXMPreferences.cloneNode(this.getParametersNodePath(), newNodePath);
-			
+
 			if (newParent != null) { // change the cloned node parent preference
 				TXMPreferences.put(newNodePath, TXMPreferences.PARENT_PARAMETERS_NODE_PATH, newParent.getParametersNodePath());
 			}
-			clone =  this.getClass().getDeclaredConstructor(String.class).newInstance(newNodePath);
-			
+			clone = this.getClass().getDeclaredConstructor(String.class).newInstance(newNodePath);
+
 			if (all) {
 				for (TXMResult child : this.children) {
 					child.clone(clone, all);
@@ -1874,7 +1921,8 @@
 	 * @return true if no parameter read occured
 	 * @throws CqiClientException
 	 */
-	//public abstract boolean setParameters(TXMParameters parameters) throws Exception;
+	// public abstract boolean setParameters(TXMParameters parameters) throws
+	// Exception;
 
 	// this.parameters = parameters;
 	// if (this.parameters == null) {
@@ -1924,7 +1972,6 @@
 		}
 	}
 
-
 	/**
 	 * 
 	 * @return
@@ -1934,7 +1981,6 @@
 		return this.compute(new LogMonitor("Computing " + this));
 	}
 
-
 	/**
 	 * 
 	 * @param monitor
@@ -1945,12 +1991,9 @@
 		return this.compute(monitor, true);
 	}
 
-
 	/**
-	 * Computes the result if 
-	 * it can be computed 
-	 * it is dirty 
-	 * the TXMResult constructor has been called
+	 * Computes the result if it can be computed it is dirty the TXMResult
+	 * constructor has been called
 	 * 
 	 * @param watcher
 	 * 
@@ -1964,20 +2007,24 @@
 	protected boolean compute(IProgressMonitor monitor, boolean deepComputing) {
 
 		// no changes to do
-		// FIXME: SJ: we need to do do some actions even if the object is frozen, eg. updating parameters, saving parameters, etc.
-		// FIXME MD: nope the parameters must not move and will be saved in the current state
+		// FIXME: SJ: we need to do do some actions even if the object is frozen, eg.
+		// updating parameters, saving parameters, etc.
+		// FIXME MD: nope the parameters must not move and will be saved in the current
+		// state
 		if (hasBeenComputedOnce && frozen) {
 			return true;
 		}
-		
-		
+
 		try {
 
 			Log.finest("*** TXMResult.compute(): " + this.getClass().getSimpleName() + ": starting computing process...");
 
-			// FIXME: see if this skipComputing tests is still useful? is it possible to directly return instead?
-			// en fait voir ChartResult.compute() if(super.compute(monitor, true, false)), je pense que le prob vient du fait que si on retourne false dans TXMResult.compute() alors renderChart() ne sera pas appelé
-			// il faudrait retourner un état: skipped, computed, error, etc. 
+			// FIXME: see if this skipComputing tests is still useful? is it possible to
+			// directly return instead?
+			// en fait voir ChartResult.compute() if(super.compute(monitor, true, false)),
+			// je pense que le prob vient du fait que si on retourne false dans
+			// TXMResult.compute() alors renderChart() ne sera pas appelé
+			// il faudrait retourner un état: skipped, computed, error, etc.
 			boolean skipComputing = false;
 
 			this.monitor = monitor;
@@ -2002,7 +2049,7 @@
 				skipComputing = true;
 			}
 
-			if(!skipComputing)	{
+			if (!skipComputing) {
 
 				// Debug
 				Log.finest("+++ TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing result of type " + this.getClass() + "...");
@@ -2020,19 +2067,18 @@
 				}
 			}
 
-			// clear the lazy name, no more needed since the object has been computed and getSimpleName() can now work
+			// clear the lazy name, no more needed since the object has been computed and
+			// getSimpleName() can now work
 			this.lazyName = null;
 
 			// store last used parameters
 			this.updateLastParameters();
 
+			if (!skipComputing) {
 
-			if(!skipComputing)	{
-
 				// store last used parameters
-//				this.updateLastParameters();
+				// this.updateLastParameters();
 
-				
 				if (!this.autoSaveParametersFromAnnotations()) {
 					Log.severe("TXMResult.compute(): " + this.getClass().getSimpleName() + ": failed to save parameters from annotations for " + this.getName() + ".");
 				}
@@ -2047,6 +2093,12 @@
 
 				this.dirty = false; // the computing was successful, the result is no more dirty
 				this.hasBeenComputedOnce = true;
+				
+//				for (TXMResultListener l : listeners) {
+//					if (!l.isDisposed())
+//						l.updateFromResult(true);
+//				}
+				
 				if (altered) {
 					System.out.println(NLS.bind("Warning {0} modifications have been lost.", this.getSimpleName()));
 				}
@@ -2067,17 +2119,17 @@
 						this.children.get(i).compute(monitor, deepComputing);
 					}
 
-					// FIXME: SJ: this code generates concurrent modification exceptions when deep computing
+					// FIXME: SJ: this code generates concurrent modification exceptions when deep
+					// computing
 					// here for tests purpose, the code above does not generates exceptions
-					//				for (TXMResult child : this.getChildren()) {
-					//					// recompute only children that has been opened once
-					//					child.compute(monitor, deepComputing);
-					//				}
+					// for (TXMResult child : this.getChildren()) {
+					// // recompute only children that has been opened once
+					// child.compute(monitor, deepComputing);
+					// }
 
 				}
 			}
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 			Log.severe(TXMCoreMessages.bind("TXMResult.compute(): Exception occurs during computing: {0}.", e));
@@ -2094,22 +2146,31 @@
 	 * @throws Exception
 	 */
 	protected abstract boolean _compute() throws Exception;
+//
+//	public void addResultListener(TXMResultListener listener) {
+//		listeners.add(listener);
+//	}
+//
+//	public void removeResultListener(TXMResultListener listener) {
+//		listeners.remove(listener);
+//	}
 
-
 	/***
-	 * Checks if the result must be persisted according to the persistence global preference or the user persistable state.
+	 * Checks if the result must be persisted according to the persistence global
+	 * preference or the user persistable state.
+	 * 
 	 * @return
 	 */
-	//	public boolean mustBePersisted()	{
-	//		if (this.internalPersistable
-	//				|| this.userPersistable)	{
-	//			return true;
-	//		}
-	//		return false;
-	//	}
+	// public boolean mustBePersisted() {
+	// if (this.internalPersistable
+	// || this.userPersistable) {
+	// return true;
+	// }
+	// return false;
+	// }
 
 	// FIXME: need to prove this code
-	public boolean mustBePersisted()	{
+	public boolean mustBePersisted() {
 		return this.internalPersistable || this.userPersistable;
 	}
 
@@ -2125,6 +2186,7 @@
 
 	/**
 	 * Checks if the monitor is canceled.
+	 * 
 	 * @return true if the monitor has been canceled by the user
 	 */
 	public boolean isCanceled() {
@@ -2172,13 +2234,11 @@
 	// FIXME: should be moved in an exporter extension
 	public abstract boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception;
 
-
-
-
 	/**
 	 * Increments the progress of the specified amount of work.
 	 * 
-	 * @param amount of work
+	 * @param amount
+	 *            of work
 	 */
 	public void worked(int amount) {
 		if (monitor != null) {
@@ -2188,7 +2248,8 @@
 	}
 
 	/**
-	 * Increments the progress of the specified amount of work and displays a message.
+	 * Increments the progress of the specified amount of work and displays a
+	 * message.
 	 * 
 	 * @param amount
 	 * @param message
@@ -2249,6 +2310,7 @@
 
 	/**
 	 * Gets the user defined name.
+	 * 
 	 * @return the user name
 	 */
 	public String getUserName() {
@@ -2256,14 +2318,14 @@
 	}
 
 	/**
-	 * Gets the result type. Should be localized (eg. CA => AFC, Word cloud => Nuage de mots).
-	 * This method can be used for logging or UI.
-	 * This method can also be used to sort the result by type (alphanumeric order).
+	 * Gets the result type. Should be localized (eg. CA => AFC, Word cloud => Nuage
+	 * de mots). This method can be used for logging or UI. This method can also be
+	 * used to sort the result by type (alphanumeric order).
+	 * 
 	 * @return
 	 */
 	public abstract String getResultype();
 
-
 	@Override
 	public int compareTo(TXMResult o) {
 		// Compare node weights
@@ -2277,33 +2339,40 @@
 	 * @return
 	 */
 	public static int compare(TXMResult e1, TXMResult e2) {
-		if (e1 == null && e2 == null) return 0;
-		if (e1 == null) return 1;
+		if (e1 == null && e2 == null)
+			return 0;
+		if (e1 == null)
+			return 1;
 
 		return e1.getParametersNodePath().compareTo(e2.getParametersNodePath());
 	}
 
 	/**
-	 * Sets a boolean state to define if the result has already been computed at least once or not. 
-	 * @param hasBeenComputedOnce the hasBeenComputedOnce to set
+	 * Sets a boolean state to define if the result has already been computed at
+	 * least once or not.
+	 * 
+	 * @param hasBeenComputedOnce
+	 *            the hasBeenComputedOnce to set
 	 */
 	public void setHasBeenComputedOnce(boolean hasBeenComputedOnce) {
 		this.hasBeenComputedOnce = hasBeenComputedOnce;
 	}
 
 	/**
-	 * Gets a boolean state defining if the result has already been computed at least once or not.
+	 * Gets a boolean state defining if the result has already been computed at
+	 * least once or not.
 	 * 
 	 * true if the result has already been lazy LOADED...........
+	 * 
 	 * @return
 	 */
 	public boolean hasBeenComputedOnce() {
 		return hasBeenComputedOnce;
 	}
 
-
 	/**
-	 * Gets the internal persistable state. 
+	 * Gets the internal persistable state.
+	 * 
 	 * @return the persistable
 	 */
 	public boolean isInternalPersistable() {
@@ -2311,16 +2380,21 @@
 	}
 
 	/**
-	 * Sets the internal persistable state. Results internally persisted will not be deleted when quitting, event if the user set them as non persistable.
-	 * @param persistable the persistable to set
+	 * Sets the internal persistable state. Results internally persisted will not be
+	 * deleted when quitting, event if the user set them as non persistable.
+	 * 
+	 * @param persistable
+	 *            the persistable to set
 	 */
 	public void setInternalPersistable(boolean persistable) {
 		this.internalPersistable = persistable;
 	}
 
 	/**
-	 * Gets the lazy name.
-	 * Since some result names need computed data, this name is dedicated to display the result name even if it has not been recomputed after being loaded.
+	 * Gets the lazy name. Since some result names need computed data, this name is
+	 * dedicated to display the result name even if it has not been recomputed after
+	 * being loaded.
+	 * 
 	 * @return the lazyName
 	 */
 	public String getLazyName() {
@@ -2329,6 +2403,7 @@
 
 	/**
 	 * Gets the user defined persistable state of the result.
+	 * 
 	 * @return the state
 	 */
 	public boolean isUserPersistable() {
@@ -2340,7 +2415,8 @@
 	 * 
 	 * propagate persistence to parent if necessary
 	 * 
-	 * @param userPersistable the state to set
+	 * @param userPersistable
+	 *            the state to set
 	 */
 	public void setUserPersistable(boolean userPersistable) {
 		this.userPersistable = userPersistable;
@@ -2352,34 +2428,34 @@
 				child.setUserPersistable(userPersistable);
 			}
 		}
-		
+
 		// directly save and flush the preference
-        try {
-            if (this.isUserPersistable())    {
-                this.autoSaveParametersFromAnnotations();
-                this.saveParameters();
-                TXMPreferences.flush(this);
-            }
-        }
-        catch (Exception e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        } 
+		try {
+			if (this.isUserPersistable()) {
+				this.autoSaveParametersFromAnnotations();
+				this.saveParameters();
+				TXMPreferences.flush(this);
+			}
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
 		// Debug
-		//		Log.finest("TXMResult.setUserPersistable(): " + userPersistable);
+		// Log.finest("TXMResult.setUserPersistable(): " + userPersistable);
 	}
 
 	/**
-	 * Swaps the user persistable state. 
+	 * Swaps the user persistable state.
 	 * 
 	 * propagate persistence to parent if necessary
 	 */
-	public void swapUserPersistableState()	{
+	public void swapUserPersistableState() {
 		this.setUserPersistable(!this.userPersistable);
 	}
 
 	/**
 	 * Gets the project of the result.
+	 * 
 	 * @return the project of the result
 	 */
 	public final Project getProject() {
@@ -2388,6 +2464,7 @@
 
 	/**
 	 * Gets the parameters node path.
+	 * 
 	 * @return the parametersNodePath
 	 */
 	public String getParametersNodePath() {
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 1424)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 1425)
@@ -289,7 +289,7 @@
 							// keep only the first col
 							List<Integer> coltodelete = colindices.subList(1, colindices.size());
 							lexicalTable.getData().removeCols(coltodelete);
-
+							lexicalTable.setAltered();
 							// refresh stuff
 							collist = new ArrayList<Object>();// update col name
 							// list
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1424)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1425)
@@ -64,6 +64,7 @@
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.results.Parameter;
 import org.txm.core.results.TXMResult;
+import org.txm.core.results.TXMResultListener;
 import org.txm.rcp.JobsTimer;
 import org.txm.rcp.StatusLine;
 import org.txm.rcp.TXMWindows;
@@ -97,7 +98,7 @@
  * @author sjacquot
  *
  */
-public abstract class TXMEditor<T extends TXMResult> extends EditorPart {
+public abstract class TXMEditor<T extends TXMResult> extends EditorPart implements TXMResultListener, Comparable<TXMEditor> {
 
 	/**
 	 * ID to use in plugin.xml to contribute to the top toolbar.
@@ -188,15 +189,16 @@
 	 */
 	protected boolean dirty;
 
+	public int compareTo(TXMEditor other) {
+		return 1;
+	}
 	
-	
-	
-
 	@Override
 	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
 		this.setSite(site);
 		this.setInput(input);
 		this.result = getEditorInput().getResult(); // store result for debug purpose
+//		this.result.addResultListener(this);
 		// FIXME: see how to use the Adapters and AdapterFactory to define image and title of Editor in the contributing plug-ins
 		// another way is to use editors extension in plug-ins and redefine icon and name, using this solution the problem is that the name (which is also editor title) can not be dynamic according to the result data
 		// so it seems better to use Adapters if it's possible or keep this solution below
@@ -237,6 +239,11 @@
 		IPartListener2 pl = new IPartListener2() {
 			// ... Other methods
 			public void partClosed(IWorkbenchPartReference partRef) {
+				
+//				if (getResult() != null) {
+//					getResult().removeResultListener(TXMEditor.this);
+//				}
+				
 				if (partRef.getId().equals(TXMEditor.this.getClass().getName())) { // called after this.doSave() 
 					//System.out.println("EVENT partClosed");
 					for (TXMEditorExtension<T> b : extensions) {
@@ -284,6 +291,10 @@
 	public GLComposite getFirstLineComposite() {
 		return firstLineComposite;
 	}
+	
+	public boolean isDisposed() {
+		return resultArea == null || resultArea.isDisposed();
+	}
 
 	public Shell getShell() {
 		if (parent !=null && !parent.isDisposed()) {
@@ -510,16 +521,23 @@
 	}
 
 	@Override
-	public void doSave(IProgressMonitor monitor) {
+	public void doSave(final IProgressMonitor monitor) {
 		// FIXME: SJ: to discuss. A this moment the save is automatically done or not in TXMResult.compute() according to a preference of the TBX
 		//		if (TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_SAVE_RESULTS)) { // ?
 		//			getResult().saveParameters();
 		//		}
 
 		/// FIXME: SJ: dirty state tests
-		//this.compute(true);
-		this.setDirty(false);
-
+		if (parent != null && !parent.isDisposed()) {
+			parent.getDisplay().asyncExec(new Runnable() {
+				
+				@Override
+				public void run() {
+					compute(true);
+					TXMEditor.this.setDirty(false);
+				}
+			});
+		}
 		
 		notifyExtensions("notifyDoSave"); //$NON-NLS-1$
 		firePropertyChange(IEditorPart.PROP_DIRTY);
@@ -756,6 +774,28 @@
 //								setDirty(false);
 								
 								refresh(update);
+								
+//								// refresh all opened editors
+//								// FIXME: update all open editors of the children result
+//								// FIXME: prob here is that updateEditorFromResult() doesn't enough because the compute() method does some other stuff
+//								// so the cascade computing may be done here rather than in TXMResult.compute() or we need to move some stuff from TXMEditor.compute() to
+//								// TXMEditor.updateEditorFromResult(), eg. the chart loading
+//								// WARNING: At This moment, with this code, TXMResult.compute() of the children is called twice
+//								for (IEditorReference reference : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences()) {
+//									IEditorPart editor = reference.getEditor(false);
+//									if(editor != null && editor instanceof TXMEditor)	{
+//										TXMEditor txmEditor = ((TXMEditor)editor);
+//										//if (txmEditor.getResult().getParent() == this.getResult())	{
+//											Log.finest("TXMEditor.refresh(): updating editor for result: " + txmEditor.getResult().getSimpleName());
+//											//txmEditor.compute(false);
+//											//txmEditor.updateEditorFromResult(false);
+//											txmEditor.refresh(false);
+//										//}
+//									}
+//								}
+								
+								// focus in the main widget 
+								setFocus();
 							} catch (Exception e) {
 								Log.finest("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": Error while refreshing the editor: " + e); //$NON-NLS-1$
 								Log.printStackTrace(e);
@@ -829,7 +869,6 @@
 		return editor;
 	}
 
-
 	/**
 	 * Synchronizes the editor with the result and refreshes the corpus view.
 	 * Also fires a dirty property change.
@@ -876,30 +915,11 @@
 		// FIXME: debug test to not draw while updating the widgets
 		this.getContainer().setRedraw(true);
 		
-		// focus in the main widget 
-		this.setFocus();
-
 		/// FIXME: SJ: dirty state tests
 		this.setDirty(false);
 
 		
-		// FIXME: update all open editors of the children result
-		// FIXME: prob here is that updateEditorFromResult() doesn't enough because the compute() method does some other stuff
-		// so the cascade computing may be done here rather than in TXMResult.compute() or we need to move some stuff from TXMEditor.compute() to
-		// TXMEditor.updateEditorFromResult(), eg. the chart loading
-		// WARNING: At This moment, with this code, TXMResult.compute() of the children is called twice
-		//						for (IEditorReference reference : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences()) {
-		//							IEditorPart editor = reference.getEditor(false);
-		//							if(editor != null && editor instanceof TXMEditor)	{
-		//								TXMEditor txmEditor = ((TXMEditor)editor);
-		//								if(txmEditor.getResult().getParent() == this.getResult())	{
-		//									Log.finest("TXMEditor.refresh(): updating editor for result: " + txmEditor.getResult().getSimpleName());
-		//									txmEditor.compute(false);
-		//									//txmEditor.updateEditorFromResult(false);
-		//									//txmEditor.refresh(false);
-		//								}
-		//							}
-		//						}
+		
 
 		notifyExtensions("notifyEndOfRefresh"); //$NON-NLS-1$
 	}
@@ -912,12 +932,38 @@
 	public abstract void updateResultFromEditor();
 
 	/**
+	 * UI safe
+	 * 
 	 * Synchronizes the editor with the result. 
 	 * Dedicated to dynamically change the editor components from the stored result.
 	 * <p>
 	 * Use this method if you need to save parameter with Type not managed by the autoUpdateEditorFieldsFromResult method
 	 * @throws Exception 
 	 */
+	public final void updateFromResult(final boolean update) throws Exception {
+		if (this.parent != null && !this.parent.isDisposed()) {
+			this.parent.getDisplay().syncExec(new Runnable() {
+				
+				@Override
+				public void run() {
+					try {
+						refresh(update);
+					} catch (Exception e) {
+						// TODO Auto-generated catch block
+						e.printStackTrace();
+					}
+				}
+			});
+		}
+	}
+	
+	/**
+	 * Synchronizes the editor with the result. 
+	 * Dedicated to dynamically change the editor components from the stored result.
+	 * <p>
+	 * Use this method if you need to save parameter with Type not managed by the autoUpdateEditorFieldsFromResult method
+	 * @throws Exception 
+	 */
 	public abstract void updateEditorFromResult(boolean update) throws Exception;
 
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java	(revision 1424)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java	(revision 1425)
@@ -59,6 +59,7 @@
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.TreeItem;
 import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
@@ -119,9 +120,9 @@
 	public static HashMap<String, String> doubleClickInstalledCommands = new HashMap<String, String>();
 
 
-//	public static HashMap<Class, Class> getManagedDoubleClickClasses() {
-//		return managedDoubleClickClasses;
-//	}
+	//	public static HashMap<Class, Class> getManagedDoubleClickClasses() {
+	//		return managedDoubleClickClasses;
+	//	}
 
 
 	/**
@@ -166,10 +167,10 @@
 
 			treeViewer.setContentProvider(new TXMResultContentProvider(this));
 			//treeViewer.setLabelProvider(new TextometrieLabelProvider());
-			
+
 			//treeViewer.setLabelProvider(new DecoratingLabelProvider(new TXMResultLabelProvider(),PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
 			treeViewer.setLabelProvider(new DecoratingLabelProvider(new WorkbenchLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
-			
+
 			Workspace w = Toolbox.workspace;
 			if (w == null) return;
 			treeViewer.setInput(w);
@@ -191,47 +192,47 @@
 		treeViewer.setColumnProperties(new String[]{"name"}); // mandatory to enable edit mode -> used to identify columns
 
 
-//		ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(treeViewer) {
-//			protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
-//				System.out.println("activated");
-//				return event.keyCode == SWT.F2;
-//			}
-//		};
-//		int f = ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | 
-//			    ColumnViewerEditor.TABBING_VERTICAL |
-//			    ColumnViewerEditor.KEYBOARD_ACTIVATION;
-//		
-//		TreeViewerEditor.create(treeViewer, actSupport, f);
-//
-//		treeViewer.setCellEditors(new CellEditor[]{new TextCellEditor(treeViewer.getTree())});
-//		treeViewer.setCellModifier(new ICellModifier() {
-//
-//			@Override
-//			public void modify(Object element, String property, Object value) {
-//				System.out.println("modify: "+element+" "+property+" "+value);
-//				if (element instanceof TreeItem)
-//				{
-//					//update element and tree model
-//					TreeItem treeItem = (TreeItem)element;
-//					TXMResult data = (TXMResult)treeItem.getData();
-//					data.setUserName(value.toString());
-//					treeItem.setText(value.toString());
-//				}
-//			}
-//
-//			@Override
-//			public Object getValue(Object element, String property) {
-//				if (element instanceof TXMResult) {
-//					return ((TXMResult)element).getUserName();
-//				}
-//				return element.toString();
-//			}
-//
-//			@Override
-//			public boolean canModify(Object element, String property) {
-//				return element instanceof TXMResult;
-//			}
-//		});
+		//		ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(treeViewer) {
+		//			protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
+		//				System.out.println("activated");
+		//				return event.keyCode == SWT.F2;
+		//			}
+		//		};
+		//		int f = ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | 
+		//			    ColumnViewerEditor.TABBING_VERTICAL |
+		//			    ColumnViewerEditor.KEYBOARD_ACTIVATION;
+		//		
+		//		TreeViewerEditor.create(treeViewer, actSupport, f);
+		//
+		//		treeViewer.setCellEditors(new CellEditor[]{new TextCellEditor(treeViewer.getTree())});
+		//		treeViewer.setCellModifier(new ICellModifier() {
+		//
+		//			@Override
+		//			public void modify(Object element, String property, Object value) {
+		//				System.out.println("modify: "+element+" "+property+" "+value);
+		//				if (element instanceof TreeItem)
+		//				{
+		//					//update element and tree model
+		//					TreeItem treeItem = (TreeItem)element;
+		//					TXMResult data = (TXMResult)treeItem.getData();
+		//					data.setUserName(value.toString());
+		//					treeItem.setText(value.toString());
+		//				}
+		//			}
+		//
+		//			@Override
+		//			public Object getValue(Object element, String property) {
+		//				if (element instanceof TXMResult) {
+		//					return ((TXMResult)element).getUserName();
+		//				}
+		//				return element.toString();
+		//			}
+		//
+		//			@Override
+		//			public boolean canModify(Object element, String property) {
+		//				return element instanceof TXMResult;
+		//			}
+		//		});
 
 		//		treeViewer.addFilter(new ViewerFilter() {
 		//			@Override
@@ -244,9 +245,9 @@
 		treeViewer.setContentProvider(new TXMResultContentProvider(this));
 		//treeViewer.setLabelProvider(new TextometrieLabelProvider());
 		//treeViewer.setLabelProvider(new DecoratingLabelProvider(new TXMResultLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
-		
+
 		treeViewer.setLabelProvider(new DecoratingLabelProvider(new WorkbenchLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
-		
+
 		// for now the sorter is used to sort the Corpus, Subcorpus and partition objects
 		treeViewer.setSorter(new ViewerSorter() {
 			public int category(Object element) {
@@ -357,9 +358,9 @@
 				if (arg0.keyCode == SWT.DEL) {
 					final ISelection sel = treeViewer.getSelection();
 					if (sel instanceof IStructuredSelection) {
-						
+
 						if (!DeleteObject.askContinueToDelete((IStructuredSelection)sel)) return;
-						
+
 						JobHandler job = new JobHandler("Deleting", true) {
 
 							@Override
@@ -395,46 +396,46 @@
 		});
 
 		// FIXME: show icon for results that are user persistable
-		
-		 	final int IMAGE_MARGIN = 2;
-		    final Image icon = IImageKeys.getImage("icons/decorators/bullet_green.png");
-//		    final Image icon = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.gef","platform:/plugin/org.eclipse.gef/org/eclipse/gef/internal/icons/pinned.gif").createImage();
-//		    final Image icon = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.team.svn.help","platform:/plugin/org.eclipse.team.svn.help/images/lock.gif").createImage();
-		    
-		 	
-		 	
-//		 	treeViewer.getTree().addListener(SWT.MeasureItem, new Listener() {
-//		 	   public void handleEvent(Event event) {
-//		 	      TreeItem item = (TreeItem)event.item;
-//		 	      Image trailingImage = (Image)item.getImage();
-//		 	      if (trailingImage != null) {
-//		 	         event.width += trailingImage.getBounds().width + IMAGE_MARGIN;
-//		 	      }
-//		 	   }
-//		 	});
-//		 	treeViewer.getTree().addListener(SWT.PaintItem, new Listener() {
-//		 	   public void handleEvent(Event event) {
-//		 		   if(event.item.getData() instanceof TXMResult && ((TXMResult)event.item.getData()).isUserPersistable())	{
-//			 	      TreeItem item = (TreeItem)event.item;
-//			 	      Image trailingImage = (Image)item.getImage();
-//			 	      if (trailingImage != null) {
-//			 	         //int x = event.x + event.width + IMAGE_MARGIN;
-//			 	        int x = event.x + event.width;
-//			 	        //int x = event.x - 20;
-//			 	       //int x = event.x - 5;
-//			 	         int itemHeight = treeViewer.getTree().getItemHeight();
-//			 	         int imageHeight = trailingImage.getBounds().height;
-//			 	         int y = event.y + (itemHeight - imageHeight) / 2;
-//			 	        //int y = event.y + 5;
-//			 	        
-//			 	       event.gc.drawImage(icon, x, y); 
-//			 	        //event.gc.drawImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED), x, y);
-//			 	      }
-//		 		   }
-//		 	   }
-//		 	});
-		
-		
+
+		final int IMAGE_MARGIN = 2;
+		final Image icon = IImageKeys.getImage("icons/decorators/bullet_green.png");
+		//		    final Image icon = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.gef","platform:/plugin/org.eclipse.gef/org/eclipse/gef/internal/icons/pinned.gif").createImage();
+		//		    final Image icon = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.team.svn.help","platform:/plugin/org.eclipse.team.svn.help/images/lock.gif").createImage();
+
+
+
+		//		 	treeViewer.getTree().addListener(SWT.MeasureItem, new Listener() {
+		//		 	   public void handleEvent(Event event) {
+		//		 	      TreeItem item = (TreeItem)event.item;
+		//		 	      Image trailingImage = (Image)item.getImage();
+		//		 	      if (trailingImage != null) {
+		//		 	         event.width += trailingImage.getBounds().width + IMAGE_MARGIN;
+		//		 	      }
+		//		 	   }
+		//		 	});
+		//		 	treeViewer.getTree().addListener(SWT.PaintItem, new Listener() {
+		//		 	   public void handleEvent(Event event) {
+		//		 		   if(event.item.getData() instanceof TXMResult && ((TXMResult)event.item.getData()).isUserPersistable())	{
+		//			 	      TreeItem item = (TreeItem)event.item;
+		//			 	      Image trailingImage = (Image)item.getImage();
+		//			 	      if (trailingImage != null) {
+		//			 	         //int x = event.x + event.width + IMAGE_MARGIN;
+		//			 	        int x = event.x + event.width;
+		//			 	        //int x = event.x - 20;
+		//			 	       //int x = event.x - 5;
+		//			 	         int itemHeight = treeViewer.getTree().getItemHeight();
+		//			 	         int imageHeight = trailingImage.getBounds().height;
+		//			 	         int y = event.y + (itemHeight - imageHeight) / 2;
+		//			 	        //int y = event.y + 5;
+		//			 	        
+		//			 	       event.gc.drawImage(icon, x, y); 
+		//			 	        //event.gc.drawImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED), x, y);
+		//			 	      }
+		//		 		   }
+		//		 	   }
+		//		 	});
+
+
 		MenuManager menuManager = new MenuManager();
 		Menu menu = menuManager.createContextMenu(treeViewer.getTree());
 
@@ -599,4 +600,14 @@
 			corporaView.treeViewer.reveal(obj);
 		}
 	}
+
+	public static boolean isFocused() {
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window == null) return false;
+		IWorkbenchPage page = window.getActivePage();
+		if (page == null) return false;
+
+		IWorkbenchPart part = page.getActivePart();
+		return part.getSite().getId().equals(CorporaView.ID);
+	}
 }
\ No newline at end of file
Index: tmp/org.txm.rcp/plugin.xml
===================================================================
--- tmp/org.txm.rcp/plugin.xml	(revision 1424)
+++ tmp/org.txm.rcp/plugin.xml	(revision 1425)
@@ -139,14 +139,6 @@
             restorable="true">
       </view>
       <view
-            category="org.txm.rcp"
-            class="org.txm.rcp.views.QueriesView"
-            icon="icons/objects/query.png"
-            id="org.txm.rcp.views.QueriesView"
-            name="%view.name.4"
-            restorable="true">
-      </view>
-      <view
             category="org.txm.rcp.debug"
             class="org.txm.rcp.views.SummaryView"
             id="org.txm.rcp.views.InternalCorpusView"
