Index: tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java
===================================================================
--- tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java	(revision 736)
+++ tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java	(revision 737)
@@ -34,7 +34,6 @@
 import org.txm.rcp.StatusLine;
 import org.txm.rcp.commands.OpenBrowser;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.query.Query;
@@ -42,7 +41,7 @@
 import org.txm.wordcloud.core.messages.WordCloudCoreMessages;
 
 /**
- * Computes and opens a WordCloudEditor.
+ * Computes and opens a WordCloud editor.
  * 
  * @author mdecorde
  * @author sjacquot
@@ -50,12 +49,6 @@
 public class ComputeWordCloud extends BaseAbstractHandler {
 	
 
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(WordCloud.class, ComputeWordCloud.class);
-	}
-	
-	
 	@Override
 	public Object execute(final ExecutionEvent event) throws ExecutionException {
 
Index: tmp/org.txm.wordcloud.rcp/plugin.xml
===================================================================
--- tmp/org.txm.wordcloud.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.wordcloud.rcp/plugin.xml	(revision 737)
@@ -8,7 +8,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.wordcloud.rcp.handlers.ComputeWordCloud"
             id="org.txm.wordcloud.rcp.handlers.ComputeWordCloud"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.wordcloud.core.functions.WordCloud">
       </command>
    </extension>
    <extension
Index: tmp/org.txm.partition.rcp/plugin.xml
===================================================================
--- tmp/org.txm.partition.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.partition.rcp/plugin.xml	(revision 737)
@@ -8,7 +8,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.partition.rcp.handlers.ComputePartitionDimensionsBarChart"
             id="org.txm.partition.rcp.handlers.ComputePartitionDimensionsBarChart"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.partition.core.functions.PartitionDimensions">
       </command>
    </extension>
    <extension
Index: tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java
===================================================================
--- tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java	(revision 736)
+++ tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java	(revision 737)
@@ -46,10 +46,10 @@
 public class ComputePartitionDimensionsBarChart extends BaseAbstractHandler {
 
 
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(PartitionDimensions.class, ComputePartitionDimensionsBarChart.class);
-	}
+	// FIXME: adds a double click listener to the Corpus View
+//	static	{
+//		CorporaView.addDoubleClickListener(PartitionDimensions.class, ComputePartitionDimensionsBarChart.class);
+//	}
 	
 	
 	
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java	(revision 736)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java	(revision 737)
@@ -50,12 +50,10 @@
 import org.txm.rcp.TXMWindows;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcp.views.corpora.CorporaView;
-import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.utils.logger.Log;
-// TODO: Auto-generated Javadoc
+
 /**
  * if the selection is a Partition : creates a lexical table already filled if
  * the selection is a index : creates a lexical table with the Index
@@ -63,14 +61,7 @@
  */
 public class ComputeLexicalTable extends BaseAbstractHandler {
 
-	
-	static	{
-		CorporaView.addDoubleClickListener(LexicalTable.class, ComputeLexicalTable.class);
-	}
 
-	
-	
-
 	/** The code. */
 	int code;
 
@@ -185,17 +176,8 @@
 			this.logCanNotCompute(selection);
 		}
 		
-		// FIXME: tests
-//		try {
-//			lexicalTable.compute(false);
-//		}
-//		catch (Exception e) {
-//			// TODO Auto-generated catch block
-//			e.printStackTrace();
-//		}
+		TXMEditor.openEditor(lexicalTable, LexicalTableEditor.class.getName());
 		
-		TXMEditor.openEditor(lexicalTable, LexicalTableEditor.ID);
-		
 		return true;
 	}
 
Index: tmp/org.txm.lexicaltable.rcp/plugin.xml
===================================================================
--- tmp/org.txm.lexicaltable.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.lexicaltable.rcp/plugin.xml	(revision 737)
@@ -127,7 +127,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.lexicaltable.rcp.handlers.ComputeLexicalTable"
             id="org.txm.lexicaltable.rcp.handlers.ComputeLexicalTable"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.lexicaltable.core.functions.LexicalTable">
       </command>
                <command
             categoryId="org.txm.rcp.category.txm"
Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java	(revision 736)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java	(revision 737)
@@ -67,9 +67,9 @@
 
 
 	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(AHC.class, ComputeAHC.class);
-	}
+//	static	{
+//		CorporaView.addDoubleClickListener(AHC.class, ComputeAHC.class);
+//	}
 	
 
 	/* (non-Javadoc)
Index: tmp/org.txm.ahc.rcp/plugin.xml
===================================================================
--- tmp/org.txm.ahc.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.ahc.rcp/plugin.xml	(revision 737)
@@ -7,7 +7,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.ahc.rcp.handlers.ComputeAHC"
             id="org.txm.cah.rcp.handlers.ComputeAHC"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.ahc.core.functions.AHC">
       </command>
    </extension>
    <extension
Index: tmp/org.txm.internalview.rcp/src/org/txm/internalview/rcp/handlers/ComputeInternalView.java
===================================================================
--- tmp/org.txm.internalview.rcp/src/org/txm/internalview/rcp/handlers/ComputeInternalView.java	(revision 736)
+++ tmp/org.txm.internalview.rcp/src/org/txm/internalview/rcp/handlers/ComputeInternalView.java	(revision 737)
@@ -7,17 +7,18 @@
 import org.txm.internalview.rcp.messages.InternalViewUIMessages;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 
+/**
+ * Computes an internal view and opens an editor.
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ *
+ */
 public class ComputeInternalView extends BaseAbstractHandler {
 
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(InternalView.class, ComputeInternalView.class);
-	}
 
-
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		
Index: tmp/org.txm.internalview.rcp/plugin.xml
===================================================================
--- tmp/org.txm.internalview.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.internalview.rcp/plugin.xml	(revision 737)
@@ -6,7 +6,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.internalview.rcp.handlers.ComputeInternalView"
             id="org.txm.internalview.rcp.handlers.ComputeInternalView"
-            name="Internal View">
+            name="Internal View"
+            returnTypeId="org.txm.internalview.core.functions.InternalView">
       </command>
    </extension>   <extension
          point="org.eclipse.ui.menus">
Index: tmp/org.txm.index.rcp/plugin.xml
===================================================================
--- tmp/org.txm.index.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.index.rcp/plugin.xml	(revision 737)
@@ -170,7 +170,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.index.rcp.handlers.ComputeIndex"
             id="org.txm.index.rcp.handlers.ComputeIndex"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.index.core.functions.Index">
       </command>
       <command
             categoryId="org.txm.rcp.category.txm"
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeIndex.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeIndex.java	(revision 736)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeIndex.java	(revision 737)
@@ -27,15 +27,12 @@
 //
 package org.txm.index.rcp.handlers;
 
-import java.util.Map.Entry;
-
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.txm.index.core.functions.Index;
 import org.txm.index.rcp.editors.IndexEditor;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Partition;
 
@@ -48,12 +45,6 @@
 public class ComputeIndex extends BaseAbstractHandler {
 
 	
-	
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(Index.class, ComputeIndex.class);
-	}
-	
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeLexicon.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeLexicon.java	(revision 736)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeLexicon.java	(revision 737)
@@ -9,7 +9,6 @@
 import org.txm.index.rcp.editors.DictionnaryEditor;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.query.Query;
@@ -22,13 +21,6 @@
  */
 public class ComputeLexicon extends BaseAbstractHandler {
 	
-	// FIXME: adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(Index.class, ComputeIndex.class);
-	}
-	
-	
-	
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 
@@ -53,10 +45,10 @@
 				e.printStackTrace();
 			}
 		}
-		// Reopening an existing Lexicon
-		else if(selection instanceof Index) { 
-			index = (Index) selection;
-		}
+//		// Reopening an existing Lexicon
+//		else if(selection instanceof Index) { 
+//			index = (Index) selection;
+//		}
 		else {
 			super.logCanNotCompute(selection);
 		}
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/handlers/ComputeProgression.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/handlers/ComputeProgression.java	(revision 736)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/handlers/ComputeProgression.java	(revision 737)
@@ -29,13 +29,11 @@
 
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.txm.chartsengine.rcp.editors.ChartEditor;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.progression.core.functions.Progression;
 import org.txm.progression.core.messages.ProgressionCoreMessages;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.utils.logger.Log;
 
@@ -50,9 +48,9 @@
 	
 	// FIXME: should be put in an Activator? or better in an extension point loaded by the corpora view? or in a method called here as initTreeDoubleClickListener(Class resultDataType, String commandId)?
 	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(Progression.class, ComputeProgression.class);
-	}
+//	static	{
+//		CorporaView.addDoubleClickListener(Progression.class, ComputeProgression.class);
+//	}
 	
 	
 	
@@ -84,11 +82,6 @@
 				return null;
 			}
 			progression = new Progression(corpus);
-		
-			// FIXME: persistence tests from a file named "201805123_433f0b69-1083-4ed6-be1c-bcd48c73aeae"
-//			progression = new Progression("201805123_433f0b69-1083-4ed6-be1c-bcd48c73aeae", corpus);
-
-			
 		}
 		// Reopening an existing result
 		else if (selection instanceof Progression)	{
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java	(revision 736)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java	(revision 737)
@@ -52,7 +52,7 @@
 	/** The corpus. */
 	private Corpus corpus;
 
-	/** The graphtype. */
+	/** The chart type. */
 	private boolean cumulative = true;
 
 	/** The linewidth. */
@@ -168,7 +168,6 @@
 
 		try {
 
-			cumulative = this.getBooleanParameterValue(ProgressionPreferences.CHART_CUMULATIVE);
 
 			// System.out.println(parent.getLayout());
 			Composite mainPanel = this.getCommandParametersGroup();
@@ -192,7 +191,6 @@
 
 			cumulativeButton = new Button(paramPanel, SWT.RADIO);
 			cumulativeButton.setText(ProgressionUIMessages.ProgressionDialog_2);
-			cumulativeButton.setSelection(cumulative);
 			// listeners
 			cumulativeButton.addSelectionListener(new ComputeSelectionListener(this));
 			cumulativeButton.addSelectionListener(new SelectionListener() {
@@ -208,7 +206,6 @@
 
 			densityButton = new Button(paramPanel, SWT.RADIO);
 			densityButton.setText(ProgressionUIMessages.ProgressionDialog_3);
-			densityButton.setSelection(!cumulative);
 			// listener
 			densityButton.addSelectionListener(new SelectionListener() {
 
@@ -420,7 +417,7 @@
 	 * @return the added QueryField
 	 */
 	private QueryField addFocusQueryField() {
-		return this.addFocusQueryField("");
+		return this.addFocusQueryField(""); //$NON-NLS-1$
 	}
 
 
@@ -436,6 +433,12 @@
 				addFocusQueryField(q.getQueryString()); 
 			}
 		}
+		
+		cumulative = this.getResult().isDefaultChartType();
+		cumulativeButton.setSelection(cumulative);
+		densityButton.setSelection(!cumulative);
+
+		
 	}
 
 
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java	(revision 736)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java	(revision 737)
@@ -7,9 +7,13 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
 import org.eclipse.e4.ui.workbench.modeling.EModelService;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PartInitException;
@@ -33,6 +37,7 @@
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
 import org.txm.searchengine.cqp.corpus.query.Match;
+import org.txm.searchengine.cqp.corpus.query.Query;
 import org.txm.synopticedition.rcp.editors.RGBA;
 import org.txm.synopticedition.rcp.editors.SynopticEditionEditor;
 import org.txm.synopticedition.rcp.handlers.OpenEdition;
@@ -50,7 +55,7 @@
 	 * To keep track of the concordance lines and recomputing only if the selected item is out of this range.
 	 */
 	protected int lastConcordanceTopLine = -1;
-	protected int lastConcordanceBottomLine = -1;
+	//protected int lastConcordanceBottomLine = -1;
 	
 	/**
 	 * To keep track of the concordance lines sort and recomputing only if the sorting order has changed.
@@ -252,7 +257,7 @@
 	 * @param linkedEditors
 	 * @param selectedPointPositions
 	 */
-	public void updateLinkedConcordanceEditor(ArrayList<EditorPart> linkedEditors, ArrayList<Integer> selectedPointPositions)	{
+	public void updateLinkedConcordanceEditor(ArrayList<EditorPart> linkedEditors, final ArrayList<Integer> selectedPointPositions)	{
 
 		// FIXME: Debug
 		//System.err.println("ProgressionEventCallBack.updateLinkedConcordanceEditor(): linked editors count: " + linkedEditors.size());
@@ -292,27 +297,29 @@
 		
 		
 		
-		TXMResultEditorInput editorInput;
+		final TXMResultEditorInput editorInput;
 		boolean newEditor = false;
 		// Create the linked editor input if needed
 		if (linkedEditor == null) {
 			Concordance concordance = new Concordance(((Progression) chartEditor.getResult()).getCorpus());
+			concordance.setQuery(query);
 			editorInput = new TXMResultEditorInput(concordance);
 			newEditor = true;
-		} else {
+		}
+		else {
 			editorInput = (TXMResultEditorInput) linkedEditor.getEditorInput();
 		}
 
 		try {
-			boolean wasOpenEditor = SWTEditorsUtils.isOpenEditor(editorInput);
+			boolean wasOpenedEditor = SWTEditorsUtils.isOpenEditor(editorInput, ConcordanceEditor.ID);
 			
-			linkedEditor = (ConcordanceEditor) page.openEditor(editorInput, ConcordanceEditor.ID, false); //$NON-NLS-1$
+			linkedEditor = (ConcordanceEditor) page.openEditor(editorInput, ConcordanceEditor.ID, false);
 			if(newEditor)	{
 				chartEditor.addLinkedEditor(linkedEditor);
 			}
 			
 			// Split the area and insert the new editor
-			if(!wasOpenEditor)	{
+			if(!wasOpenedEditor)	{
 				
 				int position = EModelService.BELOW;
 				EditorPart parentEditor = chartEditor;
@@ -333,18 +340,38 @@
 			System.err.println("Error: "+e.getLocalizedMessage());
 		}
 
-		linkedEditor.setQuery(query);
-		// Compute the concordance if the query has changed or if the concordance has never been computed
-		if(linkedEditor.getConcordance() == null || newEditor)	{
-			linkedEditor.compute(false);
-			// initialize range change tracking variables
-			this.lastConcordanceTopLine = 0;
-			this.lastConcordanceBottomLine = linkedEditor.getLinePerPage();
-			this.lastSortingComparator = linkedEditor.getCurrentComparator();
+		// Compute the concordance if it has never been computed
+		if(newEditor)	{
+			Job job = linkedEditor.compute(false);
+
+			final ConcordanceEditor linkedEditor2 = linkedEditor;
+			
+			job.addJobChangeListener(new JobChangeAdapter() 	{
+				@Override
+				public void done(IJobChangeEvent event) {
+					super.done(event);
+					
+					// initialize range change tracking variables
+					lastConcordanceTopLine = -1;
+					//lastConcordanceBottomLine = linkedEditor.getLinePerPage();
+					lastSortingComparator = linkedEditor2.getCurrentComparator();
+
+					updateLinkedConcordanceEditor(linkedEditor2, selectedPointPositions, true);
+					
+				}
+			});
+			
 		}
+		else	{
+			updateLinkedConcordanceEditor(linkedEditor, selectedPointPositions, false);
+		}
+		
+		// give back the focus to chart editor
+		chartEditor.setFocus();
+	}
 
-
 	
+	public void updateLinkedConcordanceEditor(final ConcordanceEditor linkedEditor, final ArrayList<Integer> selectedPointPositions, boolean loadLines)	{
 		
 		final TableViewer tableViewer = linkedEditor.getLineTableViewer();
 		if(selectedPointPositions.size() > 0)	{
@@ -353,37 +380,35 @@
 			int lineIndex = linkedEditor.getConcordance().indexOf(selectedPointPositions.get(selectedPointPositions.size() - 1));
 			
 			int top = lineIndex - (lineIndex % linkedEditor.getLinePerPage());
-			int bottom = top + linkedEditor.getLinePerPage() - 1;
 			
+			linkedEditor.getConcordance().setTopIndex(top);
 			
-			// Manage the lazy loading of new lines range in the concordance
-			boolean loadLines = false;
-			// not open editor (or new editor)
-			if(!SWTEditorsUtils.isOpenEditor(editorInput))	{
-				loadLines = true;
-			}
+			// Manage the lazy loading of new lines range in the concordance table
 			// page change
-			else if(this.lastConcordanceTopLine != top || this.lastConcordanceBottomLine != bottom)	{
+			if(lastConcordanceTopLine != top)	{
 				loadLines = true;
 			}
 			// sort change
-			else if(this.lastSortingComparator != linkedEditor.getCurrentComparator())	{
+			else if(lastSortingComparator != linkedEditor.getCurrentComparator())	{
 				loadLines = true;
 			}
+
 			
-			
 			// Loads new lines, fill the display area and select the table row
 			if(loadLines)	{
-				//FIXME: old code that workd but Matt has removed this method from the ConcordanceEditor, see if it still work
-				//linkedEditor.fillDisplayArea(top, bottom);
-				linkedEditor.fillDisplayArea();
+				Display.getDefault().syncExec(new Runnable() {
+					@Override
+					public void run() {
+						linkedEditor.fillDisplayArea();						
+					}
+				});
+
 			}
 
 			// update range change tracking variables
-			this.lastConcordanceTopLine = top;
-			this.lastConcordanceBottomLine = bottom;
-			this.lastSortingComparator = linkedEditor.getCurrentComparator();
-
+			lastConcordanceTopLine = top;
+			//lastConcordanceBottomLine = bottom;
+			lastSortingComparator = linkedEditor.getCurrentComparator();
 			
 			
 			final int selectedPointInTableRange = lineIndex - top;						
@@ -398,9 +423,10 @@
 						tableViewer.setSelection(new StructuredSelection(line), true);
 						// FIXME: commented because the set top index makes the read of the table difficult
 						//tableViewer.getTable().setTopIndex(selectedPointInTableRange);
+						System.out.println("ProgressionEventCallBack.updateLinkedConcordanceEditor(...).new Runnable() {...}.run(): Selecting progression point (" + selectedPointInTableRange + " / " + tableViewer.getTable().getItemCount() + ") in the linked Concordance table.");
 					}
 					else	{
-						Log.info("Selected progression point doesn't exist in the linked Concordance.");
+						System.err.println("ProgressionEventCallBack.updateLinkedConcordanceEditor(...).new Runnable() {...}.run(): Selected progression point (" + selectedPointInTableRange + " / " + tableViewer.getTable().getItemCount() + ") doesn't exist in the linked Concordance table.");
 					}
 				}
 			});
@@ -408,11 +434,8 @@
 		else	{
 			tableViewer.getTable().deselectAll();
 		}
-		
-		// give back the focus to chart editor
-		chartEditor.setFocus();
 	}
-
+	
 	//FIXME: version with new SynopticEditionEditor system edition
 	/**
 	 * Updates the linked edition editor.
Index: tmp/org.txm.progression.rcp/plugin.xml
===================================================================
--- tmp/org.txm.progression.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.progression.rcp/plugin.xml	(revision 737)
@@ -16,7 +16,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.progression.rcp.handlers.ComputeProgression"
             id="org.txm.progression.rcp.handlers.ComputeProgression"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.progression.core.functions.Progression">
       </command>
    </extension>
    <extension
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java	(revision 736)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java	(revision 737)
@@ -68,8 +68,8 @@
 	 * @param UUID
 	 * @param partition
 	 */
-	public PartitionDimensions(String UUID, Partition partition) {
-		super(UUID, partition);
+	public PartitionDimensions(String UUID) {
+		super(UUID);
 	}
 	
 
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 736)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java	(revision 737)
@@ -10,6 +10,7 @@
 import org.txm.chartsengine.core.ChartCreator;
 import org.txm.chartsengine.core.ChartsEngine;
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
+import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.core.results.Parameter;
 import org.txm.core.results.TXMResult;
@@ -99,16 +100,26 @@
 
 	
 	/**
-	 * 
+	 * Creates a new ChartResult child of the specified parent.
 	 * @param parent
 	 */
 	public ChartResult(TXMResult parent) {
 		this(null, parent);
 	}
 	
+	
 	/**
-	 * 
+	 * Creates a new ChartResult 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 ChartResult(String uuid) {
+		this(uuid, null);
+	}
+	
+	/**
+	 * Creates a new ChartResult child of the specified parent.
+	 * @param uuid
 	 * @param parent
 	 */
 	public ChartResult(String uuid, TXMResult parent) {
@@ -221,6 +232,14 @@
 			
 			this.chartDirty = false;
 			
+			
+//			if (TBXPreferences.getBoolean(TBXPreferences.AUTO_SAVE_RESULTS, TBXPreferences.PREFERENCES_NODE)) {
+//				System.err.println("ChartResult.renderChart(): flushing local preferences node in file for persistence tests.");
+//				TXMPreferences.flush(this);
+//			}
+
+			
+			
 			// FIXME: debug
 			System.err.println("ChartResult.renderChart(): chart rendering done.");
 
Index: tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/ComputeConcordance.java
===================================================================
--- tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/ComputeConcordance.java	(revision 736)
+++ tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/ComputeConcordance.java	(revision 737)
@@ -41,23 +41,17 @@
 import org.txm.rcp.StatusLine;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.CQPEngine;
 import org.txm.searchengine.cqp.corpus.Corpus;
 
 /**
- * Opens the concordance editor.
+ * Opens a Concordance editor.
  * 
  * @author mdecorde
  * @author sjacquot
  */
 public class ComputeConcordance extends BaseAbstractHandler {
 
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(Concordance.class, ComputeConcordance.class);
-	}
-
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		
Index: tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java
===================================================================
--- tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 736)
+++ tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 737)
@@ -448,7 +448,9 @@
 				sash.getParent().layout();
 			}
 		});
-		viewer = new TableViewer(displayArea, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER | SWT.VIRTUAL);
+		viewer = new TableViewer(displayArea, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER
+//				| SWT.VIRTUAL
+				);
 		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
 		//viewer.setLabelProvider(new LineLabelProvider(this));
 		viewer.setContentProvider(new ConcordancesProvider());
@@ -804,8 +806,9 @@
 	 * @param to the to
 	 */
 	public void fillDisplayArea() {
-		if (viewer == null)
+		if (viewer == null) {
 			return;
+		}
 
 		int from = concordance.getTopIndex();
 		from = Math.max(from, 0);
@@ -824,8 +827,10 @@
 				System.err.println(ConcordanceUIMessages.ERROR_WHILE_LOADING_CONCORDANCE_LINE+ e);
 				org.txm.rcp.utils.Logger.printStackTrace(e);
 			}
-		} else
+		}
+		else {
 			lines = new ArrayList<Line>();
+		}
 
 		viewer.setInput(lines);
 		viewer2.setInput(lines);
Index: tmp/org.txm.concordance.rcp/plugin.xml
===================================================================
--- tmp/org.txm.concordance.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.concordance.rcp/plugin.xml	(revision 737)
@@ -106,7 +106,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.concordance.rcp.handlers.ComputeConcordance"
             id="org.txm.concordance.rcp.handlers.ComputeConcordance"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.concordance.core.functions.Concordance">
          <commandParameter
                id="org.txm.core.results.TXMParameters"
                name="TXM Parameter"
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPEngine.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPEngine.java	(revision 736)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPEngine.java	(revision 737)
@@ -2,8 +2,12 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
 
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
 import org.txm.EngineType;
 import org.txm.Toolbox;
 import org.txm.core.messages.TXMCoreMessages;
@@ -13,7 +17,6 @@
 import org.txm.libs.cqp.CQPLibPreferences;
 import org.txm.objects.Base;
 import org.txm.searchengine.core.SearchEngine;
-import org.txm.searchengine.core.SearchEngines;
 import org.txm.searchengine.cqp.clientExceptions.ServerNotFoundException;
 import org.txm.searchengine.cqp.corpus.CorpusManager;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
@@ -200,6 +203,7 @@
 				System.out.println("Failed to load CQP corpora of "+b.getName()+" corpus.");
 			}
 		}
+		
 		System.out.println(TXMCoreMessages.common_done);
 
 		return state;
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 736)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java	(revision 737)
@@ -68,6 +68,7 @@
 	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = 4420732757687971253L;
 
+	
 	/** The parts. */
 	private List<Part> parts;
 
@@ -77,25 +78,11 @@
 	/** The property. */
 	private Property property;
 
-	/** An association between name of analysis property and lexical table. */
-//	private Map<String, LexicalTable> lexicalTables = new HashMap<String, LexicalTable>();
-
 	
-	/** The results stored by class. */
-	private TreeMap<String, List<Object>> results = new TreeMap<String, List<Object>>();
-
-	public static Integer SUBCORPUS_COUNTER = new Integer(0);
 	
 	int totalsize = -1;
 	int[] partSizes;
 
-	public String toString() {
-		if (name != null) {
-			return name;
-		}
-		return super.toString();
-	}
-	
 	/**
 	 * Creates a new partition on a corpus given a structure, a property of this
 	 * structure and a liste of values this property can take
@@ -118,6 +105,10 @@
 	 */
 	protected Partition(Corpus corpus, StructuralUnit structure, StructuralUnitProperty property, List<String> values)	throws CqiClientException {
 		super(corpus);
+		
+		// reset the UUID to create it later from the part names
+		this.uniqueID = "";
+		
 		this.name = corpus.getName()+ "_" + structure.getName() + "_" + property.getName(); //$NON-NLS-1$ //$NON-NLS-2$
 		Log.finest(NLS.bind(TXMCoreMessages.NEW_PARTION, this.getCorpus(), this.name)); 
 		long start = System.currentTimeMillis();
@@ -181,34 +172,27 @@
 		Log.finest(NLS.bind(TXMCoreMessages.PARTITION_CREATED, this.name, (end - start)));
 	}
 
+	
 	/**
 	 * Instantiates a new partition.
 	 *
 	 * @param corpus the corpus
-	 * @param structure the structure
-	 * @param property the property
-	 * @throws CqiClientException the cqi client exception
-	 */
-	protected Partition(Corpus corpus, StructuralUnit structure, StructuralUnitProperty property) throws CqiClientException {
-		this(corpus, structure, property, property.getValues(corpus));
-	}
-
-
-	/**
-	 * Create a partition with a set of raw queries.
-	 *
-	 * @param corpus the corpus
 	 * @param name the name
 	 * @param queries the queries
+	 * @param partnames the partnames
 	 * @throws CqiClientException the cqi client exception
-	 * @author Sylvain Loiseau
 	 */
-	protected Partition(Corpus corpus, String name, List<String> queries) throws CqiClientException {
+	public Partition(Corpus corpus, String name, List<String> queries, List<String> partnames) throws CqiClientException {
 		super(corpus);
+
+		// reset the UUID to create it later from the part names
+		this.uniqueID = "";
+		
 		this.structure = null;
 		this.property = null;
-		if (name == null || name.trim().length() == 0)
+		if (name == null || name.trim().length() == 0) {
 			name = "noname"; //$NON-NLS-1$
+		}
 		this.name = name;
 		Log.info(NLS.bind(TXMCoreMessages.NEW_PARTION, this.getCorpus(), this.name));
 		long start = System.currentTimeMillis();
@@ -216,8 +200,15 @@
 		for (int i = 0; i < queries.size(); i++) {
 			String queryS = queries.get(i);
 			String partitionName = this.getName();
+			
 			String partName = String.valueOf(i);
-			if (partName.length() == 0) partName = "-"; //$NON-NLS-1$
+			if(partnames != null && i < partnames.size())	{
+				partName = partnames.get(i);
+			}
+			if (partName.trim().length() == 0) {
+				partName = "-"; //$NON-NLS-1$
+			}
+			
 			Part part = createPart(partitionName, partName, queryS);
 			parts.add(part);
 		}
@@ -225,38 +216,35 @@
 		Log.info(NLS.bind(TXMCoreMessages.PARTITION_CREATED, this.name, (end - start)));
 	}
 
+	
+	
 	/**
 	 * Instantiates a new partition.
 	 *
 	 * @param corpus the corpus
+	 * @param structure the structure
+	 * @param property the property
+	 * @throws CqiClientException the cqi client exception
+	 */
+	protected Partition(Corpus corpus, StructuralUnit structure, StructuralUnitProperty property) throws CqiClientException {
+		this(corpus, structure, property, property.getValues(corpus));
+	}
+
+
+	/**
+	 * Create a partition with a set of raw queries.
+	 *
+	 * @param corpus the corpus
 	 * @param name the name
 	 * @param queries the queries
-	 * @param partnames the partnames
 	 * @throws CqiClientException the cqi client exception
+	 * @author Sylvain Loiseau
 	 */
-	public Partition(Corpus corpus, String name, List<String> queries, List<String> partnames) throws CqiClientException {
-		super(corpus);
-		this.structure = null;
-		this.property = null;
-		if (name == null || name.trim().length() == 0)
-			name = "noname"; //$NON-NLS-1$
-		this.name = name;
-		Log.info(NLS.bind(TXMCoreMessages.NEW_PARTION, this.getCorpus(), this.name));
-		long start = System.currentTimeMillis();
-		this.parts = new ArrayList<Part>();
-		for (int i = 0; i < queries.size(); i++) {
-			String queryS = queries.get(i);
-			String partitionName = this.getName();
-			String partName = partnames.get(i);
-			if (partName.trim().length() == 0) partName = "-"; //$NON-NLS-1$
-			Part part = createPart(partitionName, partName, queryS);
-			parts.add(part);
-		}
-		long end = System.currentTimeMillis();
-		Log.info(NLS.bind(TXMCoreMessages.PARTITION_CREATED, this.name, (end - start)));
+	protected Partition(Corpus corpus, String name, List<String> queries) throws CqiClientException {
+		this(corpus, name, queries, null);
 	}
 
-	
+
 	/**
 	 * Get the safe values (spacial char regexp safe).
 	 *
@@ -265,8 +253,7 @@
 	 * @return the safe values
 	 * @throws CqiClientException the cqi client exception
 	 */
-	private static List<String> getSafeValues(StructuralUnitProperty property, Corpus corpus) throws CqiClientException
-	{
+	private static List<String> getSafeValues(StructuralUnitProperty property, Corpus corpus) throws CqiClientException	{
 		List<String> values = property.getValues(corpus);
 		//System.out.println("CORPUS: "+corpus);
 		//System.out.println("VALUES: "+values);
@@ -287,16 +274,18 @@
 	 * 
 	 * @author Sylvain Loiseau, mdecorde
 	 */
-	public Part createPart(String partitionName, String partName, String query)
-	throws CqiClientException {
+	public Part createPart(String partitionName, String partName, String query) throws CqiClientException {
 		Part part;
 		String partCqpId = CqpObject.partNamePrefix + Corpus.getNextSubcorpusCounter();
 		Log.finest(NLS.bind(TXMCoreMessages.CREATING_PART,partName, query));
 		long start = System.currentTimeMillis();
 		try {
-			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(
-					this.getCorpus().getQualifiedCqpId(), partCqpId, query);
+			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getCorpus().getQualifiedCqpId(), partCqpId, query);
 			part = new Part(partCqpId, partitionName, partName, this, new Query(query));
+
+			// FIXME: persistence tests: define the UUID as the concatenation of all part CQP id
+			this.uniqueID += partCqpId;
+			
 		} catch (Exception e) {
 			try {
 				throw new CqiClientException(TXMCoreMessages.Partition_9 + partitionName + "_" + partName + e + " last error: " + CQPEngine.getCqiClient().getLastCQPError()); //$NON-NLS-1$ //$NON-NLS-2$
@@ -308,6 +297,7 @@
 		}
 		long end = System.currentTimeMillis();
 		Log.finest(NLS.bind(TXMCoreMessages.PART_CREATED, partitionName + "_" + partName, (end - start))); //$NON-NLS-1
+		
 		return part;
 	}
 
@@ -336,18 +326,6 @@
 		return (Corpus) this.parent;
 	}
 
-	//FIXME: useless?
-//	/**
-//	 * Gets the parts.
-//	 * 
-//	 * @return the parts
-//	 */
-//	public List<Part> getOrderedParts() {
-//		List<Part> sparts = parts;
-//		Collections.sort(sparts);
-//		return sparts;
-//	}
-
 	/**
 	 * Gets the parts.
 	 * 
@@ -364,23 +342,12 @@
 	 */
 	public List<String> getPartNames() {
 		List<String> partNames = new ArrayList<String>(parts.size());
-		for (Subcorpus part : parts)
+		for (Subcorpus part : parts) {
 			partNames.add(part.getName());
+		}
 		return partNames;
 	}
 
-	//FIXME: useless?
-//	/**
-//	 * Gets the ordered name of the parts.
-//	 * 
-//	 * @return the part names
-//	 */
-//	public List<String> getOrderedPartNames() {
-//		List<String> partNames = getPartNames();
-//		Collections.sort(partNames);
-//		return partNames;
-//	}
-
 	/**
 	 * Gets the short name of the parts.
 	 * 
@@ -388,8 +355,9 @@
 	 */
 	public List<String> getPartShortNames() {
 		List<String> partNames = new ArrayList<String>(parts.size());
-		for (Part part : parts)
+		for (Part part : parts) {
 			partNames.add(part.getShortName());
+		}
 		return partNames;
 	}
 
@@ -406,12 +374,12 @@
 	 * @throws CqiClientException
 	 *             the cqi client exception
 	 */
-	public List<QueryResult> query(Query query, String name)
-	throws CqiClientException {
+	public List<QueryResult> query(Query query, String name) throws CqiClientException {
 		Log.finest(TXMCoreMessages.QUERYING_PARTITION + this.name);
 		List<QueryResult> results = new ArrayList<QueryResult>(parts.size());
-		for (Subcorpus part : parts)
+		for (Subcorpus part : parts) {
 			results.add(part.query(query, part.getName() + "_" + name, false)); //$NON-NLS-1$
+		}
 		return results;
 	}
 
@@ -448,47 +416,6 @@
 	}
 
 
-//
-//	/**
-//	 * Stores the result of textometric computation in this corpus.
-//	 *
-//	 * @param result the result
-//	 */
-//	public void storeResult(Object result) {
-//		if (!results.containsKey(result.getClass().getName())) results.put(result.getClass().getName(), new ArrayList<Object>());
-//		if(!results.get(result.getClass().getName()).contains(result))	{
-//			results.get(result.getClass().getName()).add(result);	
-//		}
-//	}
-//
-//	/**
-//	 * Removes a result stored in this corpus.
-//	 *
-//	 * @param result the result
-//	 * @return true, if successful
-//	 */
-//	@Override
-//	public boolean removeResult(Object result) {
-//		if (!results.containsKey(result.getClass().getName())) return false;
-//		
-//		boolean ret = results.get(result.getClass().getName()).remove(result);
-//		return ret;
-//	}
-//
-//	/**
-//	 * Gets the results of textometric computation stored in the corpus.
-//	 *
-//	 * @return the results
-//	 */
-//	@Override
-//	public List<Object> getResults() {
-//		ArrayList<Object> tmp = new ArrayList<Object>();
-//		for (String k : results.keySet()) {
-//			tmp.addAll(results.get(k));
-//		}
-//		return tmp;
-//	}
-
 	/**
 	 * Sets the name.
 	 *
@@ -500,22 +427,6 @@
 			this.getSelfElement().setAttribute("name", name); //$NON-NLS-1$
 	}
 
-//	/* (non-Javadoc)
-//	 * @see org.txm.objects.TxmObject#getChildren()
-//	 */
-//	@Override
-//	public List<? extends TxmObject> getChildren() {
-//		return parts;
-//	}
-
-//	/* (non-Javadoc)
-//	 * @see org.txm.objects.TxmObject#getParent()
-//	 */
-//	@Override
-//	public TxmObject getParent() {
-//		return this.corpus;
-//	}
-
 	/**
 	 * Register to parent.
 	 *
@@ -558,14 +469,6 @@
 		registerToParent(this.name);
 	}
 
-//	/* (non-Javadoc)
-//	 * @see org.txm.objects.TxmObject#hasChildren(org.txm.objects.TxmObject)
-//	 */
-//	@Override
-//	public boolean hasChildren(TxmObject children) {
-//		return parts.size() > 0;
-//	}
-
 	/**
 	 * Load.
 	 *
@@ -608,9 +511,6 @@
 		return false;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#removeChildren(org.txm.objects.TxmObject)
-	 */
 	public TxmObject removeChildren(TxmObject children) {
 		if (children instanceof Part) {
 			if (children.getSelfElement() != null && children.getSelfElement().getParentNode() == getSelfElement())
@@ -621,17 +521,11 @@
 		return null;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#save()
-	 */
 	@Override
 	public boolean save() {
 		return false;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.txm.objects.TxmObject#delete()
-	 */
 	@Override
 	public boolean delete() {
 		try {
@@ -646,14 +540,6 @@
 		return false;
 	}
 
-//	/* (non-Javadoc)
-//	 * @see org.txm.HasResults#getSubHasResults()
-//	 */
-//	@Override
-//	public List<HasResults> getSubHasResults() {
-//		return new ArrayList<HasResults>(0);
-//	}
-
 	/**
 	 * Gets the total of all part sizes.
 	 * @return
@@ -735,4 +621,13 @@
 		return false;
 	}
 
+	
+	public String toString() {
+		if (name != null) {
+			return name;
+		}
+		return super.toString();
+	}
+	
+
 }
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Corpus.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Corpus.java	(revision 736)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Corpus.java	(revision 737)
@@ -38,6 +38,7 @@
 
 import org.eclipse.osgi.util.NLS;
 import org.txm.core.messages.TXMCoreMessages;
+import org.txm.core.preferences.TXMPreferences;
 import org.txm.core.results.TXMResult;
 import org.txm.objects.Base;
 import org.txm.objects.TxmObject;
@@ -121,7 +122,7 @@
 	/** The symbol. */
 	private String symbol;
 
-	protected static String WORD = "word"; //$NON-NLS-1$
+	protected static String WORD = TXMPreferences.DEFAULT_UNIT_PROPERTY;
 
 	protected Property wordProperty = null;
 
@@ -144,6 +145,10 @@
 		super(null, null);
 		checkCqpId(cqpId);
 		this.cqpId = cqpId;
+		
+		// FIXME: at this moment, store the CQPID as UUIDD
+		this.uniqueID = this.cqpId;
+
 		subcorpora = new ArrayList<Subcorpus>();
 		partitions = new ArrayList<Partition>();
 	}
@@ -176,12 +181,12 @@
 	 * @return the partition
 	 * @throws CqiClientException the cqi client exception
 	 */
-	public Partition createPartition(String name, List<String> queries,
-			boolean registered) throws CqiClientException {
+	public Partition createPartition(String name, List<String> queries, boolean registered) throws CqiClientException {
 		Partition partition = new Partition(this, name, queries);
 		partitions.add(partition);
-		if (!registered)
+		if (!registered) {
 			partition.registerToParent();
+		}
 		return partition;
 	}
 
Index: tmp/org.txm.information.rcp/plugin.xml
===================================================================
--- tmp/org.txm.information.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.information.rcp/plugin.xml	(revision 737)
@@ -15,7 +15,8 @@
       <command
             defaultHandler="org.txm.information.rcp.handlers.ComputeInformation"
             id="org.txm.information.rcp.handlers.ComputeInformation"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.information.core.functions.Information">
       </command>
    </extension>
    <extension
Index: tmp/org.txm.information.rcp/src/org/txm/information/rcp/handlers/ComputeInformation.java
===================================================================
--- tmp/org.txm.information.rcp/src/org/txm/information/rcp/handlers/ComputeInformation.java	(revision 736)
+++ tmp/org.txm.information.rcp/src/org/txm/information/rcp/handlers/ComputeInformation.java	(revision 737)
@@ -45,10 +45,6 @@
  */
 public class ComputeInformation extends BaseAbstractHandler {
 	
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(Information.class, ComputeInformation.class);
-	}
 	
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
Index: tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/swt/JFCComposite.java
===================================================================
--- tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/swt/JFCComposite.java	(revision 736)
+++ tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/swt/JFCComposite.java	(revision 737)
@@ -310,6 +310,9 @@
 				this.rootPanel.add((Component) this.chartComponent);
 
 				this.frame.setVisible(true);
+				
+				//this.chartEditor.registerEventCallBackExtensions();
+
 			}
 			this.loadChart(this.chartEditor.getChart());
 			this.forceFocus();
Index: tmp/org.txm.rcp.feature/build.properties
===================================================================
--- tmp/org.txm.rcp.feature/build.properties	(revision 736)
+++ tmp/org.txm.rcp.feature/build.properties	(revision 737)
@@ -1,3 +1,6 @@
 bin.includes = feature.xml,\
                EMPTYTXMHOME/,\
                TXM.sh
+root.linux.gtk.x86_64 = jre_linux/
+root.linux.gtk.x86_64.permissions.755 = jre/bin/java
+root.win32.win32.x86_64 = jre_win/

Property changes on: tmp/org.txm.rcp.feature/jre_win
___________________________________________________________________
Added: svn:ignore
   + jre



Property changes on: tmp/org.txm.rcp.feature/jre_linux
___________________________________________________________________
Added: svn:ignore
   + jre



Property changes on: tmp/org.txm.rcp.feature/jre_mac
___________________________________________________________________
Added: svn:ignore
   + jre


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 736)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java	(revision 737)
@@ -31,6 +31,8 @@
 import java.util.HashMap;
 import java.util.List;
 
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
@@ -59,6 +61,7 @@
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.contexts.IContextService;
 import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.Workbench;
@@ -74,6 +77,7 @@
 import org.txm.rcp.TXMWindows;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.editors.TXMResultEditorInput;
+import org.txm.rcp.handlers.BaseAbstractHandler;
 import org.txm.rcp.handlers.results.DeleteObject;
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.utils.JobHandler;
@@ -113,6 +117,10 @@
 	 */
 	private static HashMap<Class, Class> managedDoubleClickClasses = new HashMap<Class, Class>();
 
+	
+	public static HashMap<String, String> doubleClickInstalledCommands = new HashMap<String, String>();
+	
+	
 	public static HashMap<Class, Class> getManagedDoubleClickClasses() {
 		return managedDoubleClickClasses;
 	}
@@ -242,6 +250,25 @@
 			}
 		});
 
+
+		// FIXME: double click listener installation from commands 
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		ICommandService cmdService = (ICommandService)window.getService(ICommandService.class);
+		Command[] cmds = cmdService.getDefinedCommands();
+		for (int i = 0; i < cmds.length; i++) {
+			try {
+				if(cmds[i].getReturnType() != null)	{
+					Log.info("CorporaView.createPartControl(): resgistering command = " + cmds[i].getId() + " for TXMResult of type " + cmds[i].getReturnType().getId() + ".");
+					doubleClickInstalledCommands.put(cmds[i].getReturnType().getId(), cmds[i].getId());
+				}
+			}
+			catch (NotDefinedException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			}
+		}
+		
+		
 		treeViewer.addDoubleClickListener(new IDoubleClickListener() {
 			@Override
 			public void doubleClick(DoubleClickEvent event) {
@@ -249,22 +276,29 @@
 				Object selectedItem = selection.getFirstElement();
 				//System.out.println("dbl click: "+selectedItem);
 				if (selectedItem != null) {
-					if (selectedItem instanceof TXMResult) {
+					
+					// FIXME: this code should be in conflict with the native RCP system based in EditorInput.equals(), see if we can remove it
+//					if (selectedItem instanceof TXMResult) {
+//
+//						TXMResult txmResult = (TXMResult) selectedItem;
+//						TXMResultEditorInput<TXMResult> input = new TXMResultEditorInput<TXMResult>(txmResult);
+//
+//						IWorkbenchWindow window = TXMWindows.getActiveWindow();
+//						if (window != null) {
+//							IWorkbenchPage page = window.getActivePage();
+//							IEditorPart editor = page.findEditor(input);
+//							if (editor != null) {
+//								page.activate(editor);
+//								return; // ok done
+//							}
+//						}
+//					}
 
-						TXMResult txm_result = (TXMResult) selectedItem;
-						TXMResultEditorInput input = new TXMResultEditorInput(txm_result);
-
-						IWorkbenchWindow window = TXMWindows.getActiveWindow();
-						if (window != null) {
-							IWorkbenchPage page = window.getActivePage();
-							IEditorPart editor = page.findEditor(input);
-							if (editor != null) {
-								page.activate(editor);
-								return; // ok done
-							}
-						}
+					String commandId = doubleClickInstalledCommands.get(selectedItem.getClass().getName());
+					if (commandId != null) {
+						BaseAbstractHandler.executeCommand(commandId);
 					}
-
+					
 					// test if a double click listener has been set
 					Class commandClass = managedDoubleClickClasses.get(selectedItem.getClass());
 					//System.out.println("classes: "+managedDoubleClickClasses);
@@ -274,11 +308,9 @@
 						try {
 							handlerService.executeCommand(commandClass.getName(), null);
 						} catch (Exception e) {
-							System.out.println("Error while calling "+ commandClass.getName() + " command: " + e.getLocalizedMessage());
+							System.out.println("Error while calling "+ commandClass.getName() + " command.");
 							Log.printStackTrace(e);
 						}
-					} else {
-						//System.out.println("Warning: cannot open selection with class: "+selectedItem.getClass());
 					}
 				}
 			}
@@ -329,34 +361,8 @@
 		contextService.activateContext(ID);
 	}
 
-	/**
-	 * Gets the pages.
-	 *
-	 * @return the pages
-	 */
-	private static IWorkbenchPage[] getPages()
-	{
-		for(IWorkbenchWindow win : Workbench.getInstance().getWorkbenchWindows())
-		{
-			return win.getPages();
-		}
-		return new IWorkbenchPage[0];
-	}
 
 	/**
-	 * Activate editor.
-	 *
-	 * @param editor the editor
-	 * @return true, if successful
-	 */
-	private boolean activateEditor(IEditorPart editor)
-	{
-		IWorkbenchPage attachedPage = editor.getEditorSite().getPage();
-		attachedPage.activate(editor);
-		return true;
-	}
-
-	/**
 	 * Passing the focus request to the viewer's control.
 	 */
 	@Override
@@ -491,7 +497,7 @@
 	}
 
 
-
+	// FIXMLE: deprecated
 	/**
 	 * Adds a double click listener to the tree view for the specified result data type and executing the command specified by its ID which must be equal to its class simple name
 	 * (eg. to do the link, the command ID must be "ComputeCA" for an handler class named "ComputeCA.java").
@@ -501,13 +507,13 @@
 	 * @param resultDataClass
 	 * @param commandClass
 	 */
-	public static void addDoubleClickListener(final Class resultDataClass, final Class commandClass)	{
-		if (managedDoubleClickClasses.containsKey(managedDoubleClickClasses)) {
-			Log.warning("The " + managedDoubleClickClasses + " class is already managed by the Corpora view.");
-			return;
-		}
-		//FIXME: this won't works if the ComputeXXX commands is not called -> we can't do lazy load
-		// also not work for the intermediate results (eg. lexical table of a CA computed from a partition)
-		managedDoubleClickClasses.put(resultDataClass, commandClass);
-	}
+//	public static void addDoubleClickListener(final Class resultDataClass, final Class commandClass)	{
+//		if (managedDoubleClickClasses.containsKey(managedDoubleClickClasses)) {
+//			Log.warning("The " + commandClass + " class for result " + resultDataClass + " is already managed by the Corpora view.");
+//			return;
+//		}
+//		//FIXME: this won't works if the ComputeXXX commands is not called -> we can't do lazy load
+//		// also not work for the intermediate results (eg. lexical table of a CA computed from a partition)
+//		managedDoubleClickClasses.put(resultDataClass, commandClass);
+//	}
 }
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/SWTEditorsUtils.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/SWTEditorsUtils.java	(revision 736)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/SWTEditorsUtils.java	(revision 737)
@@ -11,6 +11,8 @@
 import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicFactoryImpl;
 import org.eclipse.e4.ui.workbench.modeling.EModelService;
 import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
@@ -29,21 +31,33 @@
 	 * @param editorInput
 	 * @return
 	 */
-	public static boolean isOpenEditor(IEditorInput editorInput)	{
-		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-		IWorkbenchPage page = window.getActivePage();
-
-		return (page.findEditor(editorInput) != null);
+	public static boolean isOpenEditor(IEditorInput editorInput, String editorId)	{
+		return (getEditor(editorInput, editorId) != null);
 	}
 
 	/**
-	 * Checks if the specified editor is already open in the active page.
-	 * @param editor
+	 * Gets an editor by its editor input.
+	 * @param editorInput
 	 * @return
 	 */
-	public static boolean isOpenEditor(EditorPart editor)	{
-		return isOpenEditor(editor.getEditorInput());
+	public static IEditorPart getEditor(IEditorInput editorInput, String editorId)	{
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		IWorkbenchPage page = window.getActivePage();
+		IEditorReference[] editorsReferences = page.findEditors(editorInput, editorId, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
+		if(editorsReferences.length > 0)	{
+			return editorsReferences[0].getEditor(false);
+		}
+		return null;
 	}
+	
+//	/**
+//	 * Checks if the specified editor is already open in the active page.
+//	 * @param editor
+//	 * @return
+//	 */
+//	public static boolean isOpenEditor(EditorPart editor)	{
+//		return isOpenEditor(editor.getEditorInput());
+//	}
 
 	/**
 	 * Splits the parent area of an editor and add another one in this area by splitting it. 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java	(revision 736)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java	(revision 737)
@@ -11,10 +11,12 @@
 import org.eclipse.core.commands.ParameterValuesException;
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.swt.widgets.Event;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.handlers.IHandlerService;
+import org.txm.core.preferences.TXMPreferences;
 import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.CQPEngine;
 import org.txm.statsengine.r.core.RStatsEngine;
@@ -30,7 +32,9 @@
  */
 public abstract class BaseAbstractHandler extends AbstractHandler {
 
-	
+	/**
+	 * Default constructor.
+	 */
 	public BaseAbstractHandler() {
 		// TODO Auto-generated constructor stub
 	}
@@ -92,75 +96,88 @@
 	 * @param selection
 	 */
 	protected boolean logCanNotCompute(Object selection)	{
-		Log.severe("Can not execute command " + this.getClass() + " with the selection " + selection);
+		Log.severe("Can not execute command " + this.getClass() + " with the selection: " + selection + ".");
 		return false;
 	}
 	
 	
+	
 	/**
 	 * Executes a command handler specified by its id.
 	 * @param commandId
 	 */
+	public static void executeCommand(String commandId) {
+		executeCommand(commandId, null);
+	}
+
+	
+	/**
+	 * Executes a command handler specified by its id.
+	 * @param commandId
+	 * @param resultUUID
+	 */
 	public static void executeCommand(String commandId, String resultUUID) {
-		System.err.println("BaseAbstractHandler.executeCommand(): calling command " + commandId);
+		
+		Log.info("BaseAbstractHandler.executeCommand(): calling command " + commandId + ".");
+		
+		
 		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
 		ICommandService cmdService = (ICommandService)window.getService(ICommandService.class);
 		Command cmd = cmdService.getCommand(commandId);
 		IHandlerService handlerService = (IHandlerService)window.getService(IHandlerService.class);
 		
-		// Redefine the command supported parameters, otherwise each command must define the parameter "result_uuid" in each plugin.xml...
-		try {
-			IParameter[] parameters = new IParameter[]{ new IParameter() {
-				
-				@Override
-				public boolean isOptional() {
-					// TODO Auto-generated method stub
-					return false;
-				}
-				
-				@Override
-				public IParameterValues getValues() throws ParameterValuesException {
-					// TODO Auto-generated method stub
-					return null;
-				}
-				
-				@Override
-				public String getName() {
-					// TODO Auto-generated method stub
-					return "result_uuid";
-				}
-				
-				@Override
-				public String getId() {
-					// TODO Auto-generated method stub
-					return "result_uuid";
-				}
-			}};
-			cmd.define(cmd.getName(), cmd.getDescription(), cmd.getCategory(), parameters);
+		// Redefine the command supported parameters, without that each command must define the parameter "result_uuid" in each plugin.xml...
+		if(resultUUID != null)	{
+			Log.info("BaseAbstractHandler.executeCommand(): preparing the send of result UUID: " + resultUUID + ".");
+			try {
+				IParameter[] parameters = new IParameter[]{ new IParameter() {
+					
+					@Override
+					public boolean isOptional() {
+						return false;
+					}
+					
+					@Override
+					public IParameterValues getValues() throws ParameterValuesException {
+						return null;
+					}
+					
+					@Override
+					public String getName() {
+						return TXMPreferences.RESULT_UUID;
+					}
+					
+					@Override
+					public String getId() {
+						return TXMPreferences.RESULT_UUID;
+					}
+				}};
+				cmd.define(cmd.getName(), cmd.getDescription(), cmd.getCategory(), parameters);
+			}
+			catch (NotDefinedException e) {
+				e.printStackTrace();
+			}
+			// pass the parameter value
+			final Map<String,String> params = Collections.singletonMap(TXMPreferences.RESULT_UUID, resultUUID);
+			
+			try {
+				ParameterizedCommand pc = ParameterizedCommand.generateCommand(cmd, params);
+				handlerService.executeCommand(pc, null);
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+
 		}
-		catch (NotDefinedException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
+		// Call the command without parameter
+		else	{
+			try {
+				handlerService.executeCommand(cmd.getId(), null);
+			}
+			catch (Exception e) {
+				e.printStackTrace();
+			}
 		}
-		
-		// pass the parameter value
-		final Map<String,String> params = Collections.singletonMap("result_uuid", resultUUID); 
-		
-//		final Map<String,String> params=new HashMap<String,String>(1);
-//         params.put("result_uuid", resultUUID);
-		
-		try {
-			ParameterizedCommand pc = ParameterizedCommand.generateCommand(cmd, params);
-//			ParameterizedCommand pc = new ParameterizedCommand(cmd, (Parameterization[]) params
-//					.toArray(new Parameterization[params.size()]));
-			
-			
-			handlerService.executeCommand(pc, null);
 
-			
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
 		
 	}	
 	
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 736)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 737)
@@ -52,6 +52,7 @@
 import org.txm.rcp.swt.widget.PropertiesSelector;
 import org.txm.rcp.swt.widget.QueryWidget;
 import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.utils.SWTEditorsUtils;
 import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.rcp.views.debug.TXMResultDebugView;
 import org.txm.searchengine.cqp.corpus.Property;
@@ -196,10 +197,6 @@
 			this._createPartControl(parent); // child editor create its parameters and display widgets
 			
 			
-			if (!this.getResult().isDirty()) {
-				this.topToolBar.setComputingParametersVisible(false);
-			}
-			
 			// remove empty toolbar
 			//TODO SJ: Hack? MD: yeah -> need to find a way to not display the bottom toolbar on Windows instead
 //			if (this.bottomToolBar.getItems().length == 0) {
@@ -383,57 +380,25 @@
 		return this.getEditorInput().getResult().getStringParameterValue(key);
 	}
 
-	//// TODO commented for now ?	
-	//	/**
-	//	 * Computes the result stored in the specified editor input and opens an editor specified by its id.
-	//	 * @param editorInput
-	//	 * @param editorPartId
-	//	 * @return
-	//	 */
-	//	public static void openEditor(TXMResultEditorInput editorInput, String editorPartId)	{
-	//		compute(editorInput, editorPartId, false, null);
-	//	}
 
 	/**
-	 * Computes specified result stored, creates an editor input and opens an editor specified by its id.
+	 * Computes the TXMResult if all necessary parameters are set then refreshes the editor UI.
+	 * Also loads and savesd some parameters from result to Widgets fields and from Widgets fields to result.
 	 * 
-	 * Always creates an editor
-	 * 
 	 * @param result
-	 * @param editorPartId
-	 */
-	public static void openEditor(TXMResult result, String editorPartId)	{
-		//openEditor(new TXMResultEditorInput(result), editorPartId);
-		compute(new TXMResultEditorInput(result), editorPartId, false, null);
-	}
-
-	/**
-	 * Computes the TXMResult If all necessary parameters are set AND refresh the editor UI
-	 *  
-	 * @param update transfered to the TXMResult.compute method
-	 */
-	public final void compute(boolean update) {
-		compute(this.getEditorInput(), null, update, this);
-	}
-
-	/**
-	 * Internal method to mutualise compute editor creation
-	 * 
-	 * @param result
 	 * @param update force the editor to update its result parameters
 	 * @param editor
 	 * @param chartsComponentsProvider
 	 * @param resetView
 	 * @param clearChartItemsSelection
 	 */
-	protected static void compute(final TXMResultEditorInput<? extends TXMResult> editorInput, final String editorId, final boolean update, final TXMEditor<? extends TXMResult> editor)	{
+	public JobHandler compute(final boolean update)	{
 
-		StatusLine.setMessage("Computing " + editorInput.getResult().getName());
+		
+		StatusLine.setMessage("Computing " + this.getResult().getName());
 
-		JobHandler job = new JobHandler("Computing " + editorInput.getResult().getName()) {
+		JobHandler job = new JobHandler("Computing " + this.getResult().getName()) {
 
-			TXMEditor<? extends TXMResult> currentEditor = null;
-
 			@Override
 			protected IStatus run(IProgressMonitor monitor) {
 
@@ -442,68 +407,62 @@
 				try {
 					JobsTimer.start();
 
-					currentEditor = editor;
-
-					// FIXME: define if we update here the result from the editor fields
-					if (currentEditor != null)	{
-						this.syncExec(new Runnable() {
-							@Override
-							public void run() {
+					this.syncExec(new Runnable() {
+						@Override
+						public void run() {
+							if(update)	{
 								// FIXME: DEbug
 								System.err.println("TXMEditor.compute(): manually updating result from editor.");
-								currentEditor.updateResultFromEditor(); // subclasses manual settings
+								updateResultFromEditor(); // subclasses manual result updating from editor fields
 								// FIXME: DEbug
 								System.err.println("TXMEditor.compute(): auto updating result from editor.");
-								currentEditor.autoUpdateResultFromEditorParameters(); // auto update from Parameter annotations
+								autoUpdateResultFromEditorParameters(); // auto updating result from Parameter annotations in result <=> editor
 								
 								// Stores the last parameters before the computing to later auto-update the Widgets only if some parameters have changed 
-								currentEditor.setLastComputingParameters(editorInput.getResult().getLastParameters());
-
+								setLastComputingParameters(TXMEditor.this.getResult().getLastParameters());
 							}
-						});
-					}
+						}
+					});
 
 
 					// computing result
 					monitor.beginTask("Computing", 100);
-
 					
-					if (!editorInput.getResult().compute(monitor)) {
+					if (!TXMEditor.this.getResult().compute(monitor)) {
 						Log.info("TXMEditor.compute(): computing failed.");
 					}
 
 					monitor.worked(50);
 
+					// FIXME: old version
 					// opening an editor if not exists
-					if (currentEditor == null && editorId != null)	{
-						this.syncExec(new Runnable() {
-							@Override
-							public void run() {
-								try {
+//					if (currentEditor == null && editorId != null)	{
+//						this.syncExec(new Runnable() {
+//							@Override
+//							public void run() {
+//								try {
+//
+//									Log.info("TXMEditor.compute(): opening editor with id: " + editorId);
+//
+//									IWorkbenchWindow window = TXMWindows.getActiveWindow();
+//									IWorkbenchPage page = window.getActivePage();
+//									currentEditor = (TXMEditor) page.openEditor(editorInput, editorId, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
+//								}
+//								catch (Exception e) {
+//									System.err.println("TXMEditor.compute(): could not open editor: " + e.getLocalizedMessage());
+//									Log.printStackTrace(e);
+//								}
+//							}
+//						});
+//					}
 
-									Log.info("TXMEditor.compute(): opening editor with id: " + editorId);
-
-									IWorkbenchWindow window = TXMWindows.getActiveWindow();
-									IWorkbenchPage page = window.getActivePage();
-									currentEditor = (TXMEditor) page.openEditor(editorInput, editorId, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
-								}
-								catch (Exception e) {
-									System.err.println("TXMEditor.compute(): could not open editor: " + e.getLocalizedMessage());
-									Log.printStackTrace(e);
-								}
-							}
-						});
-					}
-
 					// refreshing the UI
-					if (currentEditor != null)	{
-						this.syncExec(new Runnable() {
-							@Override
-							public void run() {
-								currentEditor.refresh(update);
-							}
-						});
-					}
+					this.syncExec(new Runnable() {
+						@Override
+						public void run() {
+							refresh(update);
+						}
+					});
 					
 					
 					
@@ -512,6 +471,8 @@
 				catch (ThreadDeath td) {
 					// FIXME should call clean() and/or set the result as dirty?
 					return Status.CANCEL_STATUS;
+					// FIXME: SJ tests
+					// throw td;
 				}
 				catch (Exception e) {
 					Log.printStackTrace(e);
@@ -524,99 +485,66 @@
 			}
 		};
 		job.setPriority(Job.DECORATE);
+		//job.setPriority(Job.INTERACTIVE);
 		job.setUser(false);
 		job.schedule();
+		return job;
 	}
 
-	// FIXME: old code	
-	//	/**
-	//	 * Computes and creates or updates the result (from the linked editor input data).
-	//	 * @param update set if it's an update on an existing result or a creation of a new result 
-	//	 */
-	//	public void computeResult() {
-	//		final TXMResult result = this.getResultData();
-	//		StatusLine.setMessage("Computing "+result.getName());
-	//		//final TXMParameters parameters = this.getParameters();
-	//		final String title = result.getName()+"...";
-	//		try {
-	//			JobHandler jobhandler = new JobHandler(title, topToolBar) {
-	//				@Override
-	//				protected IStatus run(IProgressMonitor monitor) {
-	//					this.runInit(monitor);
-	//					try {
-	//						JobsTimer.start();
-	//
-	//						//result.setParameters(parameters);
-	//
-	//						if (result.canCompute() && result.isDirty()) {
-	//
-	//							String title = "";//result.getComputingMessage();
-	//							System.out.println(title);
-	//							Log.info("Start computing Index...");
-	//
-	//							result.compute(true, monitor);
-	//						} else {
-	//							return Status.CANCEL_STATUS;
-	//						}
-	//
-	//						if (monitor.isCanceled())
-	//							return Status.CANCEL_STATUS;
-	//
-	//						final String message = "";//result.getComputingEndMessage();
-	//
-	//						if (monitor.isCanceled())
-	//							return Status.CANCEL_STATUS;
-	//
-	//						monitor.worked(95);
-	//						// refresh ui
-	//						syncExec(new Runnable() {
-	//							@Override
-	//							public void run() {
-	//
-	//								System.out.println(message);
-	//								StatusLine.setMessage(message);
-	//
-	//								refresh();
-	//
-	//								RestartTXM.reloadViews();
-	//							}
-	//						});
-	//
-	//					} catch (ThreadDeath td) {
-	//						return Status.CANCEL_STATUS;
-	//					} catch (Exception e) {
-	//						//System.out.println(result.getComputingErrorMessage());
-	//						System.out.println(e.getLocalizedMessage());
-	//						Log.printStackTrace(e);
-	//					} finally {
-	//						monitor.done();
-	//						JobsTimer.stopAndPrint();
-	//					}
-	//					return Status.OK_STATUS;
-	//				}
-	//			};
-	//			jobhandler.startJob();
-	//
-	//		} catch (Exception e1) {
-	//			org.txm.rcp.utils.Logger.printStackTrace(e1);
-	//		}
-	//	}
+	/**
+	 * Opens an editor specified by its id, computes the specified result then refreshes the editor components.
+	 * 
+	 * @param result
+	 * @param editorPartId
+	 */
+	public static TXMEditor openEditor(TXMResult result, String editorPartId)	{
+		return openEditor(new TXMResultEditorInput<TXMResult>(result), editorPartId);
+	}
 
+
 	/**
+	 * Opens an editor specified by its id, computes the result stored in the specified editor input then refreshes the editor components.
+	 * @param editorInput
+	 * @param editorId
+	 * @return
+	 */
+	public static TXMEditor openEditor(TXMResultEditorInput editorInput, String editorId)	{
+		TXMEditor editor = null;
+		IWorkbenchWindow window = TXMWindows.getActiveWindow();
+		IWorkbenchPage page = window.getActivePage();
+		try {
+			boolean wasAlreadyOpened = SWTEditorsUtils.isOpenEditor(editorInput, editorId);
+			// opening the editor
+			editor = (TXMEditor) page.openEditor(editorInput, editorId, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
+			// computing the result only if the editor wasn't already opened
+			if(!wasAlreadyOpened)	{
+				editor.compute(false);
+			}
+		}
+		catch (PartInitException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return editor;
+	}
+	
+	
+	/**
 	 * Synchronizes the editor with the result and refreshes the corpus view.
 	 * Also fires a dirty property change.
-	 * This method should be overridden to update the editor result UI area after the result computing.
 	 * @param update
 	 */
 	public final void refresh(boolean update)	{
+		// FIXME: result should never be null?
 		if (this.getResult() != null) {
+			
 			this.setPartName(this.getResult().getName());
 			this.firePropertyChange(TXMEditor.PROP_DIRTY);
 			
 			//MD commented 'if (!update) {...}'
 			// SJ need to check all works, it also was dedicated to not refresh the Editor from result after a computing, it's not needed since the computing has been done
 			// from fields themselves
-			if (!update) {
+			//if (!update) {
 				// FIXME: debug
 				System.err.println("TXMEditor.refresh(): auto updating editor from result.");
 				this.autoUpdateEditorFieldsFromResult(update); // auto update from Parameter annotations
@@ -624,12 +552,15 @@
 				// FIXME: debug
 				System.err.println("TXMEditor.refresh(): updating subclass editor (" + getClass().getSimpleName() + ") from result.");
 				this.updateEditorFromResult(update); // subclasses manual settings
+			//}
+				
+			// Hide the computing parameter area if the editor wasn't open and the result is computed
+			if (!update) {
+				if (!this.getResult().isDirty()) {
+					this.topToolBar.setComputingParametersVisible(false);
+				}
 			}
 				
-				// FIXME: became useless?
-			//this.__updateEditorFromResult(update); // essentially for ChartEditor
-			
-			
 			topToolBar.redraw();
 			CorporaView.refreshObject(this);
 			TXMResultDebugView.refreshView();
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeKeyListener.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeKeyListener.java	(revision 736)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeKeyListener.java	(revision 737)
@@ -29,7 +29,7 @@
 	@Override
 	public void keyPressed(KeyEvent e) {
 		if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
-			this.editor.compute(false);
+			this.editor.compute(true);
 		}
 		// FIXME: update the result from the widget
 		// purpose here is, for example, to enable the compute command button when a query is typed
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeListener.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeListener.java	(revision 736)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeListener.java	(revision 737)
@@ -26,7 +26,7 @@
 	@Override
 	public void handleEvent(Event event) {
 		if (TXMPreferences.getBoolean(RCPPreferences.AUTO_UPDATE_EDITOR, RCPPreferences.PREFERENCES_NODE)) {
-			this.editor.compute(false);
+			this.editor.compute(true);
 		}
 	}
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeSelectionListener.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeSelectionListener.java	(revision 736)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/listeners/ComputeSelectionListener.java	(revision 737)
@@ -29,7 +29,7 @@
 
 	@Override
 	public void widgetSelected(SelectionEvent e) {
-		this.editor.compute(false);
+		this.editor.compute(true);
 	}
 
 	@Override
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/structures/StructuralUnitPropertiesComboViewer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/structures/StructuralUnitPropertiesComboViewer.java	(revision 736)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/structures/StructuralUnitPropertiesComboViewer.java	(revision 737)
@@ -7,6 +7,7 @@
 import org.eclipse.swt.widgets.Composite;
 import org.txm.core.results.TXMResult;
 import org.txm.rcp.editors.TXMEditor;
+import org.txm.rcp.editors.listeners.ComputeSelectionListener;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
 import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
 
@@ -29,8 +30,15 @@
 	 * @param addBlankEntry to add an empty blank entry at start of the list to clear property.
 	 */
 	public StructuralUnitPropertiesComboViewer(Composite parent, int style, TXMEditor<? extends TXMResult> editor, boolean autoCompute, StructuralUnit su, StructuralUnitProperty selectedSUP, boolean addBlankEntry) {
-		super(parent, style, editor, autoCompute, null, null, addBlankEntry);
+		super(parent, style, editor, false, null, null, addBlankEntry);
 		this.updateFromStructuralUnit(su, selectedSUP);
+		
+		// Listener
+		if(autoCompute)	{
+			this.addSelectionChangedListener(new ComputeSelectionListener(editor));
+		}
+
+		
 	}
 
 	
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/structures/PropertiesComboViewer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/structures/PropertiesComboViewer.java	(revision 736)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/structures/PropertiesComboViewer.java	(revision 737)
@@ -43,13 +43,14 @@
 		this.addBlankEntry = addBlankEntry;
 		
 		this.setContentProvider(ArrayContentProvider.getInstance());
-		
-		this.updateFromList(properties, selectedProperty);
-		
+
 		// Listener
 		if(autoCompute)	{
 			this.addSelectionChangedListener(new ComputeSelectionListener(editor));
 		}
+		
+		this.updateFromList(properties, selectedProperty);
+		
 	}
 
 
Index: tmp/org.txm.cooccurrence.rcp/plugin.xml
===================================================================
--- tmp/org.txm.cooccurrence.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.cooccurrence.rcp/plugin.xml	(revision 737)
@@ -7,7 +7,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.cooccurrence.rcp.handlers.ComputeCooccurrences"
             id="org.txm.cooccurrence.rcp.handlers.ComputeCooccurrences"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.cooccurrence.core.functions.Cooccurrence">
       </command>
    </extension>
    <extension
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java	(revision 736)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java	(revision 737)
@@ -39,12 +39,8 @@
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.rcp.StatusLine;
 import org.txm.rcp.editors.TXMEditor;
-import org.txm.rcp.editors.TXMResultEditorInput;
 import org.txm.rcp.handlers.BaseAbstractHandler;
 import org.txm.rcp.messages.TXMUIMessages;
-import org.txm.rcp.utils.Logger;
-import org.txm.rcp.views.corpora.CorporaView;
-import org.txm.searchengine.cqp.CQPEngine;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
@@ -52,21 +48,15 @@
 import org.txm.utils.logger.Log;
 
 /**
- * if the selection is a corpus, open an empty Cooc editor if the selection is a concordance, open a Cooc editor already computed.
+ * If the selection is a corpus, opens an empty Cooc editor,
+ * if the selection is a concordance, opens a Cooc editor already computed.
  * 
  * @author mdecorde
  * 
  */
 public class ComputeCooccurrences extends BaseAbstractHandler {
 	
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(Cooccurrence.class, ComputeCooccurrences.class);
-	}
 	
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java	(revision 736)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java	(revision 737)
@@ -46,34 +46,21 @@
 import org.txm.rcp.editors.TXMResultEditorInput;
 import org.txm.rcp.handlers.BaseAbstractHandler;
 import org.txm.rcp.messages.TXMUIMessages;
-import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.utils.logger.Log;
 import org.txm.utils.logger.MessageBox;
 
 /**
- * if the selection is a lexical table : opens the CA if the selection is a
- * partition : ask the user which property used and which threshold used then
- * open the CaEditor
+ * If the selection is a lexical table: opens the CA,
+ * if the selection is a partition: asks the user which property used and which threshold used then opens an editor
  * 
  * @author mdecorde
  * @author sjacquot
  */
 public class ComputeCA extends BaseAbstractHandler {
 
-	// adds a double click listener to the Corpus View
-	static {
-		CorporaView.addDoubleClickListener(CA.class, ComputeCA.class);
-	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
-	 * .ExecutionEvent)
-	 */
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 
Index: tmp/org.txm.ca.rcp/plugin.xml
===================================================================
--- tmp/org.txm.ca.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.ca.rcp/plugin.xml	(revision 737)
@@ -85,7 +85,8 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.ca.rcp.handlers.ComputeCA"
             id="org.txm.ca.rcp.handlers.ComputeCA"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.ca.core.functions.CA">
       </command>
    </extension>
    <extension
Index: tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEngines.java
===================================================================
--- tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEngines.java	(revision 736)
+++ tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEngines.java	(revision 737)
@@ -8,12 +8,25 @@
 import org.txm.EnginesManager;
 import org.txm.Toolbox;
 
+/**
+ * 
+ * @author mdecorde
+ *
+ */
 public class SearchEngines extends EnginesManager<SearchEngine> {
 
+	/**
+	 * 
+	 * @return
+	 */
 	public static SearchEngine getCQPEngine() {
 		return (SearchEngine) Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP");
 	}
 
+	/**
+	 * 
+	 * @return
+	 */
 	public static SearchEngine getTIGERSearchEngine() {
 		return (SearchEngine) Toolbox.getEngineManager(EngineType.SEARCH).getEngine("TIGERSearch");
 	}
@@ -28,11 +41,12 @@
 				SearchEngine e = (SearchEngine)contributions[i].createExecutableExtension("class"); //$NON-NLS-1$
 				if (e.initialize()) {
 					engines.put(e.getName(), e);
-				} else {
-					System.out.println("Fail to initialize "+e.getName()+" search engine.");
 				}
+				else {
+					System.out.println("Fail to initialize " + e.getName() + " search engine.");
+				}
 			} catch(Exception e) {
-				System.out.println("Error: fail to instanciate "+contributions[i].getName()+": "+e.getLocalizedMessage());
+				System.out.println("Error: fail to instanciate " + contributions[i].getName() + ": " + e.getLocalizedMessage());
 				e.printStackTrace();
 			}
 		}
@@ -51,11 +65,13 @@
 		for (Engine e : engines.values()) {
 			SearchEngine se = (SearchEngine)e;
 			//System.out.println("Starting "+ se.getName()+" searchengine.");
-			if (monitor != null) monitor.subTask("Starting "+ se.getName()+" searchengine.");
+			if (monitor != null) {
+				monitor.subTask("Starting " + se.getName() + " searchengine.");
+			}
 			try {
 				se.start(monitor);
 			} catch (Exception e2) {
-				System.out.println("Error: fail to start SearchEngine: "+se.getName()+": "+e2.getLocalizedMessage());
+				System.out.println("Error: fail to start SearchEngine: " + se.getName() + ": " + e2.getLocalizedMessage());
 			}
 		}
 		return true;
@@ -71,7 +87,7 @@
 			try {
 				se.stop();
 			} catch (Exception e2) {
-				System.out.println("Error: fail to stop SearchEngine: "+se.getName()+": "+e2.getLocalizedMessage());
+				System.out.println("Error: fail to stop SearchEngine: " + se.getName() + ": " + e2.getLocalizedMessage());
 			}
 		}
 		return true;
Index: tmp/org.txm.core/src/java/org/txm/Toolbox.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/Toolbox.java	(revision 736)
+++ tmp/org.txm.core/src/java/org/txm/Toolbox.java	(revision 737)
@@ -34,6 +34,8 @@
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.LinkedHashMap;
 import java.util.logging.Level;
@@ -45,6 +47,7 @@
 import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.SafeRunner;
+import org.osgi.framework.Bundle;
 import org.eclipse.core.runtime.preferences.DefaultScope;
 import org.eclipse.core.runtime.preferences.IPreferencesService;
 import org.txm.core.messages.TXMCoreMessages;
@@ -234,6 +237,32 @@
 		} catch(Exception e) {
 			System.out.println("Error while post-installaing plugins: "+e.getLocalizedMessage());
 		}
+		
+		
+		// FIXME: persistence tests
+		if (TBXPreferences.getBoolean(TBXPreferences.AUTO_SAVE_RESULTS, TBXPreferences.PREFERENCES_NODE)) {
+			System.out.println("Toolbox.initialize(): reloading persitent results...");
+			ArrayList<String> resultsNodesQualifiers = TXMPreferences.getResultsNodesQualifiers();
+			for (String nodeQualifier : resultsNodesQualifiers) {
+				try {
+					System.out.println("Toolbox.initialize(): loading from result node qualifier " + nodeQualifier);
+					System.out.println("Toolbox.initialize(): class =  " + TXMPreferences.getString("class", nodeQualifier));
+					System.out.println("Toolbox.initialize(): parent_uuid =  " + TXMPreferences.getString(TXMPreferences.PARENT_UUID, nodeQualifier));
+					System.out.println("Toolbox.initialize(): bundle_id =  " + TXMPreferences.getString(TXMPreferences.BUNDLE_ID, nodeQualifier));
+					Bundle bundle = Platform.getBundle(TXMPreferences.getString(TXMPreferences.BUNDLE_ID, nodeQualifier));
+					Class<?> cl = bundle.loadClass(TXMPreferences.getString("class", nodeQualifier));
+					Constructor<?> cons = cl.getConstructor(String.class);
+					cons.newInstance(nodeQualifier);
+				}
+				catch (Exception e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		}
+		
+		
+		
 		initializing = false;
 		return checkState();
 	}
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 736)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 737)
@@ -68,8 +68,10 @@
 	 */
 	public final static String DEFAULT_UNIT_PROPERTY = "word"; //$NON-NLS-1$
 
+	// essentially for Links and Persistence
 	public final static String RESULT_UUID = "result_uuid"; //$NON-NLS-1$
 	public final static String PARENT_UUID = "parent_uuid"; //$NON-NLS-1$
+	public final static String BUNDLE_ID = "bundle_id"; //$NON-NLS-1$
 
 	// to shared strings in some preferences
 	/**
@@ -881,7 +883,7 @@
 				}
 			}
 		} catch (Exception e) {
-			System.err.println(e);
+			e.printStackTrace();;
 		}
 	}
 
@@ -917,6 +919,35 @@
 	}
 
 	/**
+	 * Gets all the result nodes qualifier (from *.prefs file starting with "txm_res").
+	 * @return
+	 */
+	public static ArrayList<String> getResultsNodesQualifiers()	{
+		ArrayList<String> resultsNodesQualifiers = new ArrayList<String>();
+		try {
+			IPreferencesService service = Platform.getPreferencesService();
+			for (String scopeName : service.getRootNode().childrenNames()) {
+				if(scopeName != TXMPreferences.scope.getName())	{
+					continue;
+				}
+					
+				String[] nodesNames = service.getRootNode().node(scopeName).childrenNames();
+				Arrays.sort(nodesNames);
+				for (String nodeName : nodesNames) {
+					if(nodeName.startsWith("txm_res_"))	{
+						resultsNodesQualifiers.add(nodeName);
+					}
+				}
+			}
+		} catch (Exception e) {
+			e.printStackTrace();;
+		}
+
+		return resultsNodesQualifiers;
+	}
+	
+	
+	/**
 	 * 
 	 * @param nodeQualifier
 	 * @throws BackingStoreException 
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 736)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 737)
@@ -134,6 +134,15 @@
 	}
 
 	/**
+	 * 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 uuid) {
+		this(uuid, null);
+	}
+	
+	/**
 	 * Creates a new TXMResult, child of the specified parent.
 	 * If UUID is null, a new UUID is generated.
 	 * 
@@ -177,19 +186,22 @@
 
 		this.dirty = true;
 
+		
+		// retrieving parent from UUID
+		if(parent == null && uuid != null && !this.getStringParameterValue(TXMPreferences.PARENT_UUID).isEmpty())	{
+			TXMResult retrievedParent = TXMResult.getResult(this.getStringParameterValue(TXMPreferences.PARENT_UUID));
+			if (retrievedParent != null) {
+				Log.warning("Parent retrieved from UUID: " + retrievedParent + ".");
+				retrievedParent.addChild(this);
+			}
+		}
+
+		
 		// 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
 			
-			// retrieving parent from UUID
-			if(parent == null && uuid != null && !this.getStringParameterValue(TXMPreferences.PARENT_UUID).isEmpty())	{
-				TXMResult retrievedParent = TXMResult.getResult(this.getStringParameterValue(TXMPreferences.PARENT_UUID));
-				if (retrievedParent != null) {
-					Log.warning("Parent retrieved from UUID: " + retrievedParent + ".");
-					retrievedParent.addChild(this);
-				}
-			}
 			
 		} catch (Exception e) {
 			// TODO Auto-generated catch block
@@ -203,7 +215,7 @@
 	protected void 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();
-		this.uniqueID = ID_TIME_FORMAT.format(new Date(System.currentTimeMillis())) + "_" + UUID.randomUUID();
+		this.uniqueID = "txm_res_" + ID_TIME_FORMAT.format(new Date(System.currentTimeMillis())) + "_" + UUID.randomUUID();
 	}
 
 	/**
@@ -683,6 +695,7 @@
 		// internal data to save for unserialization
 		this.saveParameter("class", this.getClass().getName());
 		this.saveParameter(TXMPreferences.RESULT_UUID, this.uniqueID);
+		this.saveParameter(TXMPreferences.BUNDLE_ID, this.preferencesNodeQualifier);
 		if(this.parent != null)	{
 			this.saveParameter(TXMPreferences.PARENT_UUID, this.parent.getUUID());
 		}
@@ -1088,7 +1101,6 @@
 					continue;
 				}
 				
-				System.out.println("TXMResult.getResult(): checking UUID " + results.get(i).getUUID() + " against " + UUID);				
 				if(results.get(i).getUUID().equals(UUID))	{
 					result = results.get(i);
 					break;
@@ -1444,6 +1456,8 @@
 	 */
 	protected boolean compute(IProgressMonitor monitor, boolean updateLastParameters) throws Exception {
 
+		boolean skipComputing = false;
+		
 		this.monitor = monitor;
 
 		if (!this.isDirtyFromHistory()) {
@@ -1451,7 +1465,7 @@
 			// FIXME: Debug
 			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": result parameters have not changed since last computing, computing skipped.");
 
-			return true;
+			skipComputing = true;
 		}
 
 		if (!this.isDirty()) {
@@ -1459,40 +1473,44 @@
 			// FIXME: Debug
 			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": result is not dirty, computing skipped.");
 
-			return true;
+			skipComputing = true;
 		}
 
-		// FIXME: Debug
-		System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing result of type " + this.getClass() + "...");
-
-
-		//		// TODO THIS IS FUCKING LAZY LINE CODES OH YEAH YOU MAD BRO
-		// TODO where do we put this parent compute ? :o
-		//		if (parent != null && !parent.getHasBeenComputedOnce()) { // parent must be computed at least one time
-		// SJ: other way, test the object itself
-		if (parent != null && !parent.getHasBeenComputedOnce()) { 
-			if (!this.parent.compute(monitor)) {
-				System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": failed to compute parent result, computing stopped.");
-
+		
+		if(!skipComputing)	{
+		
+			// FIXME: Debug
+			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing result of type " + this.getClass() + "...");
+	
+	
+			//		// TODO THIS IS FUCKING LAZY LINE CODES OH YEAH YOU MAD BRO
+			// TODO where do we put this parent compute ? :o
+			//		if (parent != null && !parent.getHasBeenComputedOnce()) { // parent must be computed at least one time
+			// SJ: other way, test the object itself
+			if (parent != null && !parent.getHasBeenComputedOnce()) { 
+				if (!this.parent.compute(monitor)) {
+					System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": failed to compute parent result, computing stopped.");
+	
+					return false;
+				}
+			}
+	
+			if (!this.canCompute()) {
+				// FIXME: Debug
+				System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": missing or wrong parameters, computing aborted.");
+	
 				return false;
 			}
+	
+			if (!this._compute()) {
+	
+				// FIXME: Debug
+				System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing failed.");
+	
+				return false;
+			}
 		}
-
-		if (!this.canCompute()) {
-			// FIXME: Debug
-			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": missing or wrong parameters, computing aborted.");
-
-			return false;
-		}
-
-		if (!this._compute()) {
-
-			// FIXME: Debug
-			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing failed.");
-
-			return false;
-		}
-
+		
 		// store last used parameters
 		if(updateLastParameters)	{
 			this.updateLastParameters();
@@ -1511,13 +1529,13 @@
 			TXMPreferences.flush(this);
 		}
 
-		
+		if(!skipComputing)	{
+			this.dirty = false; // the computing was successful, the result is no more dirty
+			this.hasBeenComputedOnce = true; 
+			// FIXME: Debug
+			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing of result type " + this.getClass() + " done.");
+		}
 
-		this.dirty = false; // the computing was successful, the result is no more dirty
-		this.hasBeenComputedOnce = true; 
-		// FIXME: Debug
-		System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing of result type " + this.getClass() + " done.");
-
 		return true;
 	}
 
Index: tmp/org.txm.core/src/java/org/txm/objects/Corpus.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Corpus.java	(revision 736)
+++ tmp/org.txm.core/src/java/org/txm/objects/Corpus.java	(revision 737)
@@ -156,7 +156,26 @@
 	protected int conc_left_context = 8; // read only
 	protected int conc_right_context = 12; // read only
 
+	
+	
+	/**
+	 * Instantiates a new corpus.
+	 *
+	 * @param base the base
+	 * @param c the c
+	 */
+	public Corpus(Base base, Element c) {
+		super(base);
+		if(base != null && c != null) {
+			this.base = base;
+			this.setPath(base.getPath() + getName());
+			setSelfElement(c);
+			load();
+		}
+	}
 
+	
+
 	/**
 	 * Gets the text.
 	 *
@@ -989,21 +1008,6 @@
 		this.viewProperties = viewProperties;
 	}
 
-	/**
-	 * Instantiates a new corpus.
-	 *
-	 * @param base the base
-	 * @param c the c
-	 */
-	public Corpus(Base base, Element c) {
-		super(base);
-		if(base != null && c != null) {
-			this.base = base;
-			this.setPath(base.getPath() + getName());
-			setSelfElement(c);
-			load();
-		}
-	}
 
 	/**
 	 * Gets the project.
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java	(revision 736)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java	(revision 737)
@@ -14,7 +14,10 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.ui.IPartListener;
+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;
 import org.eclipse.ui.part.EditorPart;
 import org.eclipse.ui.part.MultiPageEditorPart;
@@ -27,7 +30,10 @@
 import org.txm.chartsengine.rcp.swt.AdvancedChartEditorToolBar;
 import org.txm.chartsengine.rcp.swt.ChartComposite;
 import org.txm.chartsengine.rcp.swt.ChartEditorToolBar;
+import org.txm.core.results.TXMResult;
+import org.txm.rcp.TXMWindows;
 import org.txm.rcp.editors.TXMEditor;
+import org.txm.rcp.editors.TXMResultEditorInput;
 import org.txm.utils.logger.Log;
 
 /**
@@ -170,7 +176,7 @@
 	
 
 	/**
-	 * 
+	 * Opens an editor where id is the specified result class name, computes the result then refreshes the editor components.
 	 * @param result
 	 */
 	public static void openEditor(ChartResult result) {
@@ -179,12 +185,17 @@
 
 	
 	/**
-	 * 
+	 * Opens an editor specified by its id, computes the specified result then refreshes the editor components.
 	 * @param result
 	 * @param editorPartId
+	 * @return
 	 */
-	public static void openEditor(ChartResult result, String editorPartId)	{
-		compute(new ChartEditorInput(result), editorPartId, false, null);
+	public static ChartEditor openEditor(ChartResult result, String editorPartId)	{
+		
+		// FIXME: voir si on peut pas revenir à l'ouverture de l'éditeur ICI plutot que dans le compute, ca permettrait de retourner le TXMEditor dans openEditor()
+		return (ChartEditor) openEditor(new ChartEditorInput<ChartResult>(result), editorPartId);
+				
+		//compute(new ChartEditorInput<ChartResult>(result), editorPartId, false, null);
 	}
 
 
@@ -225,13 +236,19 @@
 
 		
 		
+		boolean needInit = (this.chartComposite.getChartComponent() == null) && (this.getResult().getChart() != null);
+		
 		// loading chart
 		this.getResult().subTask("Loading chart.");
 		this.loadChart();
 		
 		// if editor wasn't exist:
 		// hiding command parameters, updating tool bar buttons states, registering context menus and event user callbacks 
-		if(!update && !getResult().isChartDirty())	{
+		if(needInit
+				
+				//!update
+//				&& !this.getResult().isChartDirty()
+				)	{
 //			getSite().getShell().getDisplay().syncExec(new Runnable() {
 //				@Override
 //				public void run() {
@@ -269,7 +286,7 @@
 	/**
 	 * Registers user entries event call back extensions.
 	 */
-	protected void registerEventCallBackExtensions()	{
+	public void registerEventCallBackExtensions()	{
 		String extensionPointId = "org.txm.chartsengine.eventcallback"; //$NON-NLS-1$
 		IConfigurationElement[] contributions = Platform.getExtensionRegistry().getConfigurationElementsFor(extensionPointId);
 		
Index: tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/handlers/ComputeTextsBalance.java
===================================================================
--- tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/handlers/ComputeTextsBalance.java	(revision 736)
+++ tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/handlers/ComputeTextsBalance.java	(revision 737)
@@ -45,14 +45,6 @@
 public class ComputeTextsBalance extends BaseAbstractHandler {
 
 
-	
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(TextsBalance.class, ComputeTextsBalance.class);
-	}
-	
-	
-
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 
Index: tmp/org.txm.textsbalance.rcp/plugin.xml
===================================================================
--- tmp/org.txm.textsbalance.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.textsbalance.rcp/plugin.xml	(revision 737)
@@ -16,7 +16,8 @@
       <command
             defaultHandler="org.txm.textsbalance.rcp.handlers.ComputeTextsBalance"
             id="org.txm.textsbalance.rcp.handlers.ComputeTextsBalance"
-            name="Texts balance">
+            name="Texts balance"
+            returnTypeId="org.txm.textsbalance.core.functions.TextsBalance">
          <commandParameter
                id="TextsBalance.createNewEditor"
                name="%commandParameter.name"
Index: tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/handlers/ComputeReferencer.java
===================================================================
--- tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/handlers/ComputeReferencer.java	(revision 736)
+++ tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/handlers/ComputeReferencer.java	(revision 737)
@@ -31,7 +31,6 @@
 import org.eclipse.core.commands.ExecutionException;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.referencer.core.functions.Referencer;
 import org.txm.referencer.rcp.editors.ReferencerEditor;
 import org.txm.searchengine.cqp.corpus.Corpus;
@@ -44,11 +43,6 @@
  */
 public class ComputeReferencer extends BaseAbstractHandler {
 	
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(Referencer.class, ComputeReferencer.class);
-	}
-	
 
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
@@ -72,7 +66,7 @@
 			return super.logCanNotCompute(selection);
 		}
 		
-		TXMEditor.openEditor(referencer, ReferencerEditor.ID); //$NON-NLS-1$
+		TXMEditor.openEditor(referencer, ReferencerEditor.class.getName());
 		
 		return null;
 	}
Index: tmp/org.txm.referencer.rcp/plugin.xml
===================================================================
--- tmp/org.txm.referencer.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.referencer.rcp/plugin.xml	(revision 737)
@@ -74,10 +74,11 @@
       </command>
       
             <command
-            categoryId="org.txm.rcp.category.txm"
-            defaultHandler="org.txm.referencer.rcp.handlers.ComputeReferencer"
-            id="org.txm.referencer.rcp.handlers.ComputeReferencer"
-            name="%command.name.44">
+                  categoryId="org.txm.rcp.category.txm"
+                  defaultHandler="org.txm.referencer.rcp.handlers.ComputeReferencer"
+                  id="org.txm.referencer.rcp.handlers.ComputeReferencer"
+                  name="%command.name.44"
+                  returnTypeId="org.txm.referencer.core.functions.Referencer">
       </command>
    </extension>
    <extension
Index: tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java
===================================================================
--- tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java	(revision 736)
+++ tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java	(revision 737)
@@ -276,7 +276,15 @@
 
 	@Override
 	public boolean canCompute() {
-		return getCorpus() != null && pQuery != null && !pQuery.isEmpty();
+		if(this.getCorpus() == null)	{
+			System.err.println("Concordance.canCompute(): Corpus is not set.");
+			return false;
+		}
+		if(pQuery == null || pQuery.isEmpty())	{
+			System.err.println("Concordance.canCompute(): Query is not set or empty.");
+			return false;
+		}
+		return true;
 	}
 
 	@Override
@@ -410,6 +418,13 @@
 		return pViewLeftProperties;
 	}
 
+	/**
+	 * Returns all lines.
+	 * @return
+	 * @throws CqiClientException
+	 * @throws IOException
+	 * @throws CqiServerError
+	 */
 	public List<Line> getLines() throws CqiClientException, IOException, CqiServerError {
 		return getLines(0, this.getNLines());
 	}
@@ -710,19 +725,29 @@
 		return res;
 	}
 
+	/**
+	 * Gets the query result matches.
+	 * @return
+	 * @throws CqiClientException
+	 */
 	public List<Match> getMatches() throws CqiClientException {
 		return queryResult.getMatches();
 	}
 
 	@Override
 	public String getName() {
-		if (queryResult != null) {
-			return  this.getCorpus().getName()
-					+ " " //$NON-NLS-1$
-					+ queryResult.getQuery().getQueryString();
-		} else {
-			return this.getCorpus().getName();
+		try {
+			if (queryResult != null) {
+				return  this.getCorpus().getName()
+						+ " " //$NON-NLS-1$
+						+ queryResult.getQuery().getQueryString();
+			} else {
+				return this.getCorpus().getName();
+			}
 		}
+		catch (Exception e) {
+			return this.getEmptyName();
+		}
 	}
 
 	/**
@@ -1590,6 +1615,15 @@
 		this.pQuery = query;
 	}
 
+	
+	/**
+	 * Sets the query.
+	 * @param queryString
+	 */
+	public void setQuery(String queryString) {
+		this.setQuery(new Query(queryString));
+	}
+	
 	public void setTopIndex(int i) {
 		pTopIndex = i;
 	}
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 736)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 737)
@@ -32,7 +32,6 @@
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.searchengine.cqp.corpus.Subcorpus;
 import org.txm.specificities.core.functions.Specificities;
@@ -40,22 +39,17 @@
 import org.txm.specificities.rcp.editors.SpecificitiesEditor;
 import org.txm.utils.logger.Log;
 
-// TODO: Auto-generated Javadoc
 /**
- * if the selection is a Partition : open the dialog for partition if the
- * selection is a sub-corpus : open the diaog for sub-corpus then open the
- * result in the Specificities Editor
+ * If the selection is a Partition: opens the dialog for partition,
+ * if the selection is a Subcorpus: opens the dialog for subcorpus,
+ * then opens the result in the Specificities Editor.
  * 
  * @author mdecorde
+ * @author sjacquot
  */
 public class ComputeSpecifities extends BaseAbstractHandler {
 
 
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(Specificities.class, ComputeSpecifities.class);
-	}
-
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 
@@ -108,99 +102,6 @@
 			Log.printStackTrace(e);
 			return null;
 		}
-		
-		
-		//FIXME: old method
-//		JobHandler jobhandler = new JobHandler(RCPMessages.ComputeSpecificities_0) {
-//			@Override
-//			protected IStatus run(IProgressMonitor monitor) {
-//				this.runInit(monitor);
-//				try {
-//					Specificities specifRes = null;
-//
-//					if (s instanceof Partition) {
-//						Partition partition = (Partition) s;
-//
-//						JobsTimer.start();
-//						String str = NLS.bind(RCPMessages.ComputeSpecificities_2, new Object[] { partition.getName(), property });
-//						monitor.beginTask(str, 100);
-//						System.out.println(str);
-//
-//						this.acquireSemaphore();
-//						LexicalTable table = LexicalTableFactory.getLexicalTable(partition, property, Fmin);
-//						this.releaseSemaphore();
-//
-//						if (monitor.isCanceled()) return Status.CANCEL_STATUS;
-//
-//						this.acquireSemaphore();
-//						specifRes = new Specificities(table, maxScore);
-//						this.releaseSemaphore();
-//
-//						System.out.println(NLS.bind(RCPMessages.DONE, specifRes.getName()));
-//					}
-//					else if (s instanceof Subcorpus) {
-//						Subcorpus subcorpus = (Subcorpus) s;
-//						
-//						this.acquireSemaphore();
-//						LexicalTable table = LexicalTableFactory.getLexicalTable(subcorpus, property);
-//						this.releaseSemaphore();
-//
-//						if (monitor.isCanceled()) return Status.CANCEL_STATUS;
-//
-//						System.out.println(NLS.bind(RCPMessages.ComputeSpecifities_3, new Object[] { subcorpus.getName(), subcorpus.getMotherCorpus().getName(), property }));
-//						specifRes = new Specificities(table, maxScore);
-//					}
-//					else if (s instanceof LexicalTable) {
-//						LexicalTable table = (LexicalTable) s;
-//
-//						JobsTimer.start();
-//						monitor.beginTask(NLS.bind(RCPMessages.ComputeSpecifities_11, table.getPartition().getName()), 100);
-//						System.out.println(RCPMessages.ComputeSpecificities_0 + ": " + table.getPartition().getName()); //$NON-NLS-1$
-//						
-//						this.acquireSemaphore();
-//						specifRes = new Specificities(table, maxScore);
-//						this.releaseSemaphore();
-//						
-//						System.out.println(NLS.bind(RCPMessages.DONE, specifRes.getName()));
-//						monitor.worked(45);
-//
-//						if (monitor.isCanceled()) return Status.CANCEL_STATUS;
-//					} else if (s instanceof Specificities) { // re-openning a Speicificties result
-//						specifRes = (Specificities) s;
-//					}
-//
-//					if (specifRes == null) {
-//						System.out.println("Cannot compute Specificities with "+s);
-//						return Status.CANCEL_STATUS; 
-//					}
-//					
-//					if (monitor.isCanceled()) return Status.CANCEL_STATUS;
-//
-//					final Specificities specifResFinal = specifRes;
-//					this.syncExec(new Runnable() {
-//						@Override
-//						public void run() {
-////							CorporaView.refresh();
-////							CorporaView.expand(specifResFinal.getParent());
-//
-//							
-//
-//							//editorInput = new SpecificitiesResultEditorInput(specifResFinal);
-//							
-//							//TXMEditor.openEditor(new TXMResultEditorInput(new Specificities(lexicalTable, maxScore)), SpecificitiesEditor.ID);
-//						}
-//					});
-//					
-//				} catch(Exception e) {
-//					System.out.println(RCPMessages.Error_computing_specificities);
-//					Log.printStackTrace(e);
-//					return Status.CANCEL_STATUS;
-//				}
-//
-//				return Status.OK_STATUS;
-//			}
-//		};
-//		jobhandler.startJob();
 		return null;
 	}
 }
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 736)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesSelectionChart.java	(revision 737)
@@ -9,23 +9,21 @@
 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;
 
+/**
+ * Computes a specificities chart from a selection of lines of a specificities result table.
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ *
+ */
 public class ComputeSpecifictiesSelectionChart extends BaseAbstractHandler {
 
 
 	
-	
-	// adds a double click listener to the Corpus View
-	static	{
-		CorporaView.addDoubleClickListener(SpecificitiesSelection.class, ComputeSpecifictiesSelectionChart.class);
-	}
-
-	
-	
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		
Index: tmp/org.txm.specificities.rcp/plugin.xml
===================================================================
--- tmp/org.txm.specificities.rcp/plugin.xml	(revision 736)
+++ tmp/org.txm.specificities.rcp/plugin.xml	(revision 737)
@@ -24,13 +24,15 @@
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.specificities.rcp.handlers.ComputeSpecifities"
             id="org.txm.specificities.rcp.handlers.ComputeSpecifities"
-            name="%command.name">
+            name="%command.name"
+            returnTypeId="org.txm.specificities.core.functions.Specificities">
       </command>
       <command
             categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.specificities.rcp.handlers.ComputeSpecifictiesSelectionChart"
             id="org.txm.specificities.rcp.handlers.ComputeSpecifictiesSelectionChart"
-            name="%command.name.0">
+            name="%command.name.0"
+            returnTypeId="org.txm.specificities.core.functions.SpecificitiesSelection">
       </command>
    </extension>
    <extension
