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 422)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java	(revision 423)
@@ -28,29 +28,22 @@
 package org.txm.cooccurrence.rcp.handlers;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Properties;
 
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.Toolbox;
 import org.txm.concordance.core.functions.Concordance;
 import org.txm.cooccurrence.core.functions.Cooccurrence;
 import org.txm.cooccurrence.core.preferences.CooccurrencePreferences;
 import org.txm.cooccurrence.rcp.editors.CooccurrencesEditor;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.core.results.ITXMResult;
 import org.txm.rcp.Messages;
 import org.txm.rcp.StatusLine;
 import org.txm.rcp.editors.TXMEditorPart;
 import org.txm.rcp.editors.TXMResultEditorInput;
 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;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
@@ -85,28 +78,69 @@
 		}
 
 
-		if (!CQPEngine.isInitialized()) return null;
+		if (!Toolbox.isSearchEngineInitialized()) return null;
 
 		
 		Object selection = this.getSelection();
 		TXMResultEditorInput editorInput = null;
 		
 		// new editor from concordance
+		// FIXME: need to edit this code, the computing must be done in the editor part, also need to check the process() method
+		// this code should be moved to the Concordance plugin, it should create a TXMParameters from the concordance object then call this RCP parametrized command "ComputeCooccurrence"
+		// by giving it the TXMParameters
 		if (selection instanceof Concordance) {
-			Cooccurrence cooc = computeCooc(selection);
-			if (cooc != null) {
-				editorInput = new TXMResultEditorInput(cooc);
+			
+
+			int minleft = 1;
+			int maxleft = 50;
+			int minright = 1;
+			int maxright = 50;
+
+			int minf = TXMPreferences.getInt(CooccurrencePreferences.MIN_FREQ, CooccurrencePreferences.PREFERENCES_NODE);
+			int mincof = TXMPreferences.getInt(CooccurrencePreferences.MIN_COUNT, CooccurrencePreferences.PREFERENCES_NODE);
+			int minscore = (int) TXMPreferences.getDouble(CooccurrencePreferences.MIN_SCORE, CooccurrencePreferences.PREFERENCES_NODE);
+			boolean buildLexicalTableWithCooccurrents = TXMPreferences.getBoolean(CooccurrencePreferences.PARTIAL_LEXICAL_TABLE, CooccurrencePreferences.PREFERENCES_NODE);
+			
+			StructuralUnit limit = null;
+			Query query = null;
+			List<Property> properties = null;
+
+			Concordance conc = (Concordance) selection;
+			Corpus corpus = conc.getCorpus();
+			maxleft = conc.getLeftContextSize();
+			maxright = conc.getRightContextSize();
+			properties = new ArrayList<Property>();
+			properties.addAll(conc.getAnalysisProperty());
+			query = conc.getQuery();
+
+			Cooccurrence cooc;
+			try {
+				cooc = new Cooccurrence(corpus, query, properties, limit,
+						maxleft, minleft, minright, maxright, minf, mincof,
+						minscore, false, buildLexicalTableWithCooccurrents);
+
+				cooc.process();
 			}
+			catch (Exception e) {
+				// TODO Auto-generated catch block
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+				return null;
+			}
+
+			editorInput = new TXMResultEditorInput(cooc);
+			
 		}
 		// new editor from corpus
 		else if (selection instanceof Corpus) {
 
 			//FIXME: params tests
-			HashMap<String, Object> params = new HashMap<String, Object>();
-			params.put("query", "[word=\"faire\"]");
-			editorInput = new TXMResultEditorInput((ITXMResult) selection, params);
+//			TXMCommandParameters params = new TXMCommandParameters();
+//			//params.put("query", "[word=\"faire\"]");
+//			params.put(CooccurrencePreferences.QUERY, "[word=\"faire\"]");
+//			params.put(CooccurrencePreferences.MAX_RIGHT, 200);
+//			editorInput = new TXMResultEditorInput(new Cooccurrence((Corpus)selection, params));
 			
-			//editorInput = new TXMResultEditorInput((Corpus) selection);
+			editorInput = new TXMResultEditorInput(new Cooccurrence((Corpus)selection));
 			
 		}
 		// reopening an existing result
@@ -121,10 +155,13 @@
 		try {
 			StatusLine.setMessage(Messages.ComputeCooccurrences_0);
 
-			
-//			 return page.openEditor(editorInput, CooccurrencesEditor.ID);
 			TXMEditorPart editor = TXMEditorPart.openEditor(editorInput, CooccurrencesEditor.ID);
-			editor.computeResult(false);
+			
+			// new result
+			if(!(selection instanceof Cooccurrence))	{
+				editor.computeResult(false);
+			}
+			
 			return editor;
 		}
 		catch (Exception e) {
@@ -136,60 +173,5 @@
 	}
 
 
-	/**
-	 * Compute cooc.
-	 *
-	 * @param selection the selection
-	 * @return the cooccurrence
-	 */
-	public static Cooccurrence computeCooc(Object selection) {
-		if (!CQPEngine.isInitialized()) return null;
-		
-		Cooccurrence cooc = null;
 
-		int minleft = 1;
-		int maxleft = 50;
-		int minright = 1;
-		int maxright = 50;
-
-		int minf = TXMPreferences.getInt(CooccurrencePreferences.PREFERENCES_NODE, CooccurrencePreferences.MIN_FREQ);
-		int mincof = TXMPreferences.getInt(CooccurrencePreferences.PREFERENCES_NODE, CooccurrencePreferences.MIN_COUNT);
-		int minscore = (int) TXMPreferences.getDouble(CooccurrencePreferences.PREFERENCES_NODE, CooccurrencePreferences.MIN_SCORE);
-
-		Corpus corpus = null;
-		StructuralUnit limit = null;
-		Query query = null;
-		List<Property> properties = null;
-
-		if (selection instanceof Concordance) {
-			Concordance conc = (Concordance) selection;
-			corpus = conc.getCorpus();
-			maxleft = conc.getLeftContextSize();
-			maxright = conc.getRightContextSize();
-			properties = new ArrayList<Property>();
-			properties.addAll(conc.getAnalysisProperty());
-			query = conc.getQuery();
-			
-			boolean buildLexicalTableWithCooccurrents = TXMPreferences.getBoolean(CooccurrencePreferences.PREFERENCES_NODE, CooccurrencePreferences.PARTIAL_LEXICAL_TABLE);
-
-			try {
-				cooc = new Cooccurrence(corpus, query, properties, limit,
-						maxleft, minleft, minright, maxright, minf, mincof,
-						minscore, false, buildLexicalTableWithCooccurrents);
-
-				cooc.process();
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
-				org.txm.rcp.utils.Logger.printStackTrace(e);
-				return null;
-			}
-		} else if (selection instanceof Corpus) {
-			corpus = (Corpus) selection;
-		} else {
-			System.out.println(Messages.ComputeCooccurrences_1 + selection);
-			return null;
-		}
-
-		return cooc;
-	}
 }
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/CooccurrenceUIMessages.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/CooccurrenceUIMessages.java	(revision 422)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/CooccurrenceUIMessages.java	(revision 423)
@@ -35,13 +35,7 @@
 	public static String CooccurrencesEditor_24;
 
 	public static String CooccurrencesEditor_25;
-	public static String CooccurrencesEditor_27;
-	public static String CooccurrencesEditor_28;
-	public static String CooccurrencesEditor_29;
 	public static String CooccurrencesEditor_3;
-	public static String CooccurrencesEditor_30;
-	public static String CooccurrencesEditor_31;
-	public static String CooccurrencesEditor_32;
 	public static String CooccurrencesEditor_33;
 	public static String CooccurrencesEditor_34;
 	public static String CooccurrencesEditor_4;
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages.properties
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages.properties	(revision 422)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages.properties	(revision 423)
@@ -1,80 +1,36 @@
 
-CoocPreferencePage_0 = Score format (default 0.0000E00)
-
-CoocPreferencePage_1 = Minimum frequency threshold of the cooccurent
-
+CoocPreferencePage_0  = Score format (default 0.0000E00)
+CoocPreferencePage_1  = Minimum frequency threshold of the cooccurent
 CoocPreferencePage_11 = Minimum right
-
 CoocPreferencePage_12 = Maximum right
+CoocPreferencePage_2  = Minimum cooccurency count threshold
+CoocPreferencePage_3  = Minimum cooccurency score threshold
+CoocPreferencePage_4  = Maximum left
+CoocPreferencePage_5  = Cooccurrences
+CoocPreferencePage_6  = Minimum left
+CoocPreferencePage_8  = Use partial lexical table
 
-CoocPreferencePage_2 = Minimum cooccurency count threshold
-
-CoocPreferencePage_3 = Minimum cooccurency score threshold
-
-CoocPreferencePage_4 = Maximum left
-
-CoocPreferencePage_5 = Cooccurrences
-
-CoocPreferencePage_6 = Minimum left
-
-CoocPreferencePage_8 = Use partial lexical table
-
-CooccurrencesEditor_0 = Sort by: {0}
-
-CooccurrencesEditor_1 = Error while computing the coocurrence:
-
+CooccurrencesEditor_0  = Sort by: {0}
+CooccurrencesEditor_1  = Error while computing the coocurrence:
 CooccurrencesEditor_10 = Cofrequency
-
 CooccurrencesEditor_11 = Score value is not a double float
-
 CooccurrencesEditor_12 = Computing the cooccurrents of {0}
-
 CooccurrencesEditor_13 = Setting up cooccurrences process
-
 CooccurrencesEditor_14 = Computing cooccurrents
-
 CooccurrencesEditor_15 = Displaying results
-
 CooccurrencesEditor_16 = Can't compute cooccurrences with no context
-
 CooccurrencesEditor_17 = Score
-
 CooccurrencesEditor_18 = The score threshold must be a real number ! {0}
-
-CooccurrencesEditor_2 = Search
-
+CooccurrencesEditor_2  = Search
 CooccurrencesEditor_20 = Computing the cooccurrents of <{0}> in the {1} corpus
-
 CooccurrencesEditor_23 = Done: no result.
-
 CooccurrencesEditor_24 = Done: one result.
-
 CooccurrencesEditor_25 = Error while reading corpus size
-
-CooccurrencesEditor_27 = build queries
-
-CooccurrencesEditor_28 = get matches
-
-CooccurrencesEditor_29 = build line signatures
-
-CooccurrencesEditor_3 = Cooccurrents properties:
-
-CooccurrencesEditor_30 = counting
-
-CooccurrencesEditor_31 = build lexical table
-
-CooccurrencesEditor_32 = get specif scores
-
+CooccurrencesEditor_3  = Cooccurrents properties:
 CooccurrencesEditor_33 = Start computing cooccurrences
-
 CooccurrencesEditor_34 = Done: {0} keywords and {1} cooccurrents
-
-CooccurrencesEditor_4 = Thresholds: Fmin ≥
-
-CooccurrencesEditor_5 = \ Cmin ≥
-
-CooccurrencesEditor_6 = \ Score ≥
-
-CooccurrencesEditor_8 = Cooccurrent
-
-CooccurrencesEditor_9 = Mean distance
+CooccurrencesEditor_4  = Thresholds: Fmin ≥
+CooccurrencesEditor_5  = \ Cmin ≥
+CooccurrencesEditor_6  = \ Score ≥
+CooccurrencesEditor_8  = Cooccurrent
+CooccurrencesEditor_9  = Mean distance
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages_ru.properties
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages_ru.properties	(revision 422)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages_ru.properties	(revision 423)
@@ -1,76 +1,34 @@
 
-CoocPreferencePage_0 = Формат индекса (по умолчанию 0.0000E00)
-
-CoocPreferencePage_1 = Минимальный порог количества совместных употреблений
-
+CoocPreferencePage_0  = Формат индекса (по умолчанию 0.0000E00)
+CoocPreferencePage_1  = Минимальный порог количества совместных употреблений
 CoocPreferencePage_11 = Минимум справа
-
 CoocPreferencePage_12 = Максимум справа
+CoocPreferencePage_2  = Минимальный порог частотности совместной встречаемости
+CoocPreferencePage_3  = Минимальный порог индекса совместной встречаемости
+CoocPreferencePage_4  = Максимум слева
+CoocPreferencePage_5  = Совместная встречаемость
+CoocPreferencePage_6  = Минимум слева
+CoocPreferencePage_8  = N/A_Use partial lexical table
 
-CoocPreferencePage_2 = Минимальный порог частотности совместной встречаемости
-
-CoocPreferencePage_3 = Минимальный порог индекса совместной встречаемости
-
-CoocPreferencePage_4 = Максимум слева
-
-CoocPreferencePage_5 = Совместная встречаемость
-
-CoocPreferencePage_6 = Минимум слева
-
-CoocPreferencePage_8 = N/A_Use partial lexical table
-
-CooccurrencesEditor_0 = Сортировать по: {0}
-
+CooccurrencesEditor_0  = Сортировать по: {0}
 CooccurrencesEditor_10 = Совместная частотность
-
 CooccurrencesEditor_11 = Значение индекса не соответствует формату двойной плавающей точки
-
 CooccurrencesEditor_12 = Расчет совместной встречаемости {0}
-
 CooccurrencesEditor_13 = Отладка расчета совместной встречаемости
-
 CooccurrencesEditor_14 = Расчет совместной встречаемости
-
 CooccurrencesEditor_15 = Отображение результатов
-
 CooccurrencesEditor_16 = ** Невозможно вычислить совместную встречаемость без контекстов
-
 CooccurrencesEditor_17 = Индекс
-
 CooccurrencesEditor_18 = Порог индекса должен быть действительным числом, отличным от {0}
-
-CooccurrencesEditor_2 = Рассчитать
-
+CooccurrencesEditor_2  = Рассчитать
 CooccurrencesEditor_20 = Расчет совместной встречаемости  <{0}> в корпусе {1}
-
 CooccurrencesEditor_23 = Готово: ни одного результата.
-
 CooccurrencesEditor_24 = Готово: один результат.
-
-CooccurrencesEditor_27 = Расчет запроса
-
-CooccurrencesEditor_28 = Расчет ответов
-
-CooccurrencesEditor_29 = Расчет подписей к строкам
-
-CooccurrencesEditor_3 = Свойства совместных употреблений: 
-
-CooccurrencesEditor_30 = Подсчет
-
-CooccurrencesEditor_31 = Расчет словарной таблицы
-
-CooccurrencesEditor_32 = Расчет показателей специфичности\	
-
+CooccurrencesEditor_3  = Свойства совместных употреблений: 
 CooccurrencesEditor_33 = Начало расчета совместной встречаемости
-
 CooccurrencesEditor_34 = Готово: {1} совместных употреблений на {0} употреблений мотива
-
-CooccurrencesEditor_4 = Пороги: Част ≥
-
-CooccurrencesEditor_5 = Совм-част ≥ 
-
-CooccurrencesEditor_6 = Показатель ≥ 
-
-CooccurrencesEditor_8 = Кооккуррент
-
-CooccurrencesEditor_9 = Средняя дистанция
+CooccurrencesEditor_4  = Пороги: Част ≥
+CooccurrencesEditor_5  = Совм-част ≥ 
+CooccurrencesEditor_6  = Показатель ≥ 
+CooccurrencesEditor_8  = Кооккуррент
+CooccurrencesEditor_9  = Средняя дистанция
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages_fr.properties	(revision 422)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/messages_fr.properties	(revision 423)
@@ -1,80 +1,36 @@
 
-CoocPreferencePage_0 = Format de l'indice (par défault 0.0000E00)
-
-CoocPreferencePage_1 = Seuil minimum de fréquence du cooccurrent
-
+CoocPreferencePage_0  = Format de l'indice (par défault 0.0000E00)
+CoocPreferencePage_1  = Seuil minimum de fréquence du cooccurrent
 CoocPreferencePage_11 = Minimum à droite
-
 CoocPreferencePage_12 = Maximum à droite
+CoocPreferencePage_2  = Seuil minimum de fréquence de cooccurrences
+CoocPreferencePage_3  = Seuil minimum de l'indice de cooccurrences
+CoocPreferencePage_4  = Maximum à gauche
+CoocPreferencePage_5  = Cooccurrences
+CoocPreferencePage_6  = Minimum à gauche
+CoocPreferencePage_8  = Utiliser les seulements les fréquences des cooccurents plutôt que celles de tous les mots du corpus
 
-CoocPreferencePage_2 = Seuil minimum de fréquence de cooccurrences
-
-CoocPreferencePage_3 = Seuil minimum de l'indice de cooccurrences
-
-CoocPreferencePage_4 = Maximum à gauche
-
-CoocPreferencePage_5 = Cooccurrences
-
-CoocPreferencePage_6 = Minimum à gauche
-
-CoocPreferencePage_8 = Utiliser les seulements les fréquences des cooccurents plutôt que celles de tous les mots du corpus
-
-CooccurrencesEditor_0 = Trier par : {0}
-
-CooccurrencesEditor_1 = ** Une erreur est survenue lors du calcul de la coocurrence:
-
+CooccurrencesEditor_0  = Trier par : {0}
+CooccurrencesEditor_1  = ** Une erreur est survenue lors du calcul de la coocurrence:
 CooccurrencesEditor_10 = Cofréquence
-
 CooccurrencesEditor_11 = La valeur de l'indice n'est pas un flottant double
-
 CooccurrencesEditor_12 = Calcul des cooccurrents de {0}
-
 CooccurrencesEditor_13 = Réglage du calcul des cooccurrents
-
 CooccurrencesEditor_14 = Calcul des cooccurrents
-
 CooccurrencesEditor_15 = Affichage des résultats
-
 CooccurrencesEditor_16 = ** Impossible de calculer les cooccurrences sans contexte
-
 CooccurrencesEditor_17 = Indice
-
 CooccurrencesEditor_18 = Le seuil d''indice doit être un nombre réel différent de {0}
-
-CooccurrencesEditor_2 = Calculer
-
+CooccurrencesEditor_2  = Calculer
 CooccurrencesEditor_20 = Calcul des cooccurrents de <{0}> dans le corpus {1}
-
 CooccurrencesEditor_23 = Terminé : aucun résultat.
-
 CooccurrencesEditor_24 = Terminé : un résultat.
-
 CooccurrencesEditor_25 = ** Une erreur est survenue lors du calcul de la taille du corpus
-
-CooccurrencesEditor_27 = Calcul des requêtes
-
-CooccurrencesEditor_28 = Calcul des retours
-
-CooccurrencesEditor_29 = Calcul des signatures de lignes
-
-CooccurrencesEditor_3 = Propriétés des cooccurrents : 
-
-CooccurrencesEditor_30 = Comptage
-
-CooccurrencesEditor_31 = Calcul de la table lexicale
-
-CooccurrencesEditor_32 = Calcul des indices de spécificité\	
-
+CooccurrencesEditor_3  = Propriétés des cooccurrents : 
 CooccurrencesEditor_33 = Début du calcul des cooccurrences
-
 CooccurrencesEditor_34 = Terminé : {0} occurrences de pivot et {1} cooccurrents 
-
-CooccurrencesEditor_4 = Seuils : Fmin ≥
-
-CooccurrencesEditor_5 = Cmin ≥ 
-
-CooccurrencesEditor_6 = Indice ≥ 
-
-CooccurrencesEditor_8 = Cooccurrent
-
-CooccurrencesEditor_9 = Distance moyenne
+CooccurrencesEditor_4  = Seuils : Fmin ≥
+CooccurrencesEditor_5  = Cmin ≥ 
+CooccurrencesEditor_6  = Indice ≥ 
+CooccurrencesEditor_8  = Cooccurrent
+CooccurrencesEditor_9  = Distance moyenne
