Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java	(revision 672)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java	(revision 673)
@@ -57,7 +57,7 @@
 public class BackToMedia extends AbstractHandler {
 
 	/** The ID. */
-	public static String ID = "org.txm.rcpapplication.commands.BackToMedia"; //$NON-NLS-1$
+	public static String ID = "org.txm.rcp.commands.BackToMedia"; //$NON-NLS-1$
 
 	/** The selection. */
 	private IStructuredSelection selection;
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java	(revision 672)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java	(revision 673)
@@ -55,7 +55,7 @@
 public class OpenVLCPlayer extends AbstractHandler {
 
 	/** The ID. */
-	public static String ID = "org.txm.rcpapplication.commands.BackToMedia"; //$NON-NLS-1$
+	public static String ID = "org.txm.rcp.commands.BackToMedia"; //$NON-NLS-1$
 
 	/** The selection. */
 	private IStructuredSelection selection;
Index: tmp/org.txm.backtomedia.rcp/plugin.xml
===================================================================
--- tmp/org.txm.backtomedia.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.backtomedia.rcp/plugin.xml	(revision 673)
@@ -21,7 +21,7 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.ConcordancesEditor">
+            locationURI="popup:org.txm.rcp.editors.ConcordancesEditor">
          <command
                commandId="org.txm.backtomedia.commands.function.BackToMedia"
                style="push">
@@ -30,11 +30,11 @@
       <menuContribution
             locationURI="menu:menu.help.plugins">
          <command
-               commandId="org.txm.rcpapplication.commands.OpenBrowser"
+               commandId="org.txm.rcp.commands.OpenBrowser"
                label="%command.label"
                style="push">
             <parameter
-                  name="org.txm.rcpapplication.commands.commandParameter2"
+                  name="org.txm.rcp.commands.commandParameter2"
                   value="https://groupes.renater.fr/wiki/txm-users/public/extensions#media_player">
             </parameter>
          </command>
Index: tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/DMFSite2CLDMFTSVMacro.groovy
===================================================================
--- tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/DMFSite2CLDMFTSVMacro.groovy	(revision 672)
+++ tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/DMFSite2CLDMFTSVMacro.groovy	(revision 673)
@@ -14,7 +14,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // PARAMETERS
 @Field @Option(name="workingDirectory", usage="workingDirectory containing all files needed", widget="Folder", required=true, def="dir")
Index: tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/MergeCLDMFLEXSMacro.groovy
===================================================================
--- tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/MergeCLDMFLEXSMacro.groovy	(revision 672)
+++ tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/MergeCLDMFLEXSMacro.groovy	(revision 673)
@@ -13,7 +13,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // PARAMETERS
 @Field @Option(name="workingDirectory", usage="workingDirectory containing all files needed", widget="Folder", required=true, def="dir")
Index: tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/CreateFrolexMacro.groovy
===================================================================
--- tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/CreateFrolexMacro.groovy	(revision 672)
+++ tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/CreateFrolexMacro.groovy	(revision 673)
@@ -11,7 +11,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 import org.txm.Toolbox
 import org.txm.dictionary.functions.sql.Dictionary
Index: tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/LGerm2CLDMFTSVMacro.groovy
===================================================================
--- tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/LGerm2CLDMFTSVMacro.groovy	(revision 672)
+++ tmp/org.txm.dictionary.rcp/src/org/txm/macro/frolex/LGerm2CLDMFTSVMacro.groovy	(revision 673)
@@ -18,7 +18,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // PARAMETERS
 @Field @Option(name="workingDirectory", usage="workingDirectory containing all files needed", widget="Folder", required=true, def="dir")
Index: tmp/org.txm.dictionary.rcp/plugin.xml
===================================================================
--- tmp/org.txm.dictionary.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.dictionary.rcp/plugin.xml	(revision 673)
@@ -4,103 +4,103 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.ExportDictionary"
             id="org.txm.dictionary.commands.ExportDictionary"
             name="Export">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.ImportDictionary"
             id="org.txm.dictionary.commands.ImportDictionary"
             name="Import from a TSV file">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.CreateDictionaryFromIndex"
             id="org.txm.dictionary.commands.CreateDictionaryFromIndex"
             name="Import from Index">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.PrintDictionary"
             id="org.txm.dictionary.commands.PrintDictionary"
             name="Print">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.ListDictionaries"
             id="org.txm.dictionary.commands.ListDictionaries"
             name="List">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.RenameColumnDictionary"
             id="org.txm.dictionary.commands.RenameColumnDictionary"
             name="Rename column">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.RecodeColumnDictionary"
             id="org.txm.dictionary.commands.RecodeColumnDictionary"
             name="Recode column">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.ExportToTreeTagger"
             id="org.txm.dictionary.commands.MergeLinesDictionary"
             name="Merge lines">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.RemoveEntriesDictionary"
             id="org.txm.dictionary.commands.RemoveEntriesDictionary"
             name="RemoveEntries">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.MergeDictionaries"
             id="org.txm.dictionary.commands.MergeDictionaries"
             name="Merge">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.CopyDictionaries"
             id="org.txm.dictionary.commands.CopyDictionaries"
             name="Copy">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.macro.frolex.CreateFrolexMacro"
             id="org.txm.dictionary.commands.recettes.CreateFrolex"
             name="CreateFroLex">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.UniqSortDictionary"
             id="org.txm.dictionary.commands.UniqSortDictionary"
             name="UniqSort">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.QueryDictionary"
             id="org.txm.dictionary.commands.QueryDictionary"
             name="Query">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.GrepDictionary"
             id="org.txm.dictionary.commands.GrepDictionary"
             name="Grep">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.AddColumnDictionary"
             id="org.txm.dictionary.commands.AddColumnDictionary"
             name="Add column">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.dictionary.commands.DeleteDictionary"
             id="org.txm.dictionary.commands.DeleteDictionary"
             name="Delete">
Index: tmp/org.txm.querycooccurrences.rcp/plugin.xml
===================================================================
--- tmp/org.txm.querycooccurrences.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.querycooccurrences.rcp/plugin.xml	(revision 673)
@@ -5,14 +5,14 @@
          point="org.eclipse.core.runtime.adapters">
       <factory
            adaptableType="org.txm.functions.coocmatrix.QueryAutoCooccurrence"
-           class="org.txm.rcpapplication.AdapterFactory">
+           class="org.txm.rcp.AdapterFactory">
          <adapter
             type="org.eclipse.ui.model.IWorkbenchAdapter">
          </adapter>
       </factory>
       <factory
             adaptableType="org.txm.functions.coocmatrix.QueryCooccurrence"
-            class="org.txm.rcpapplication.AdapterFactory">
+            class="org.txm.rcp.AdapterFactory">
          <adapter
                type="org.eclipse.ui.model.IWorkbenchAdapter">
          </adapter>
@@ -21,15 +21,15 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.function.ComputeQueryAutoCooccurrence"
-            id="org.txm.rcpapplication.commands.function.ComputeQueryAutoCooccurrence"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.function.ComputeQueryAutoCooccurrence"
+            id="org.txm.rcp.commands.function.ComputeQueryAutoCooccurrence"
             name="AutoCooccurrences">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.function.ComputeQueryCooccurrence"
-            id="org.txm.rcpapplication.commands.function.ComputeQueryCooccurrence"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.function.ComputeQueryCooccurrence"
+            id="org.txm.rcp.commands.function.ComputeQueryCooccurrence"
             name="QueryCooccurrences">
       </command>
    </extension>
@@ -66,9 +66,9 @@
             allPopups="true"
             locationURI="toolbar:org.eclipse.ui.main.toolbar">
          <toolbar
-               id="org.txm.rcpapplication.toolbartools">
+               id="org.txm.rcp.toolbartools">
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ComputeQueryAutoCooccurrence"
+                  commandId="org.txm.rcp.commands.function.ComputeQueryAutoCooccurrence"
                   icon="icons/functions/CooccurrencesP.png"
                   style="push">
                <visibleWhen
@@ -87,7 +87,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ComputeQueryCooccurrence"
+                  commandId="org.txm.rcp.commands.function.ComputeQueryCooccurrence"
                   icon="icons/functions/QueryCooccurrences.png"
                   style="push">
                <visibleWhen
Index: tmp/org.txm.querycooccurrences.rcp/src/org/txm/rcp/commands/function/ComputeQueryAutoCooccurrence.java
===================================================================
--- tmp/org.txm.querycooccurrences.rcp/src/org/txm/rcp/commands/function/ComputeQueryAutoCooccurrence.java	(revision 0)
+++ tmp/org.txm.querycooccurrences.rcp/src/org/txm/rcp/commands/function/ComputeQueryAutoCooccurrence.java	(revision 673)
@@ -0,0 +1,356 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.commands.function;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.functions.coocmatrix.QueryAutoCooccurrence;
+import org.txm.functions.queryindex.QueryIndex;
+import org.txm.functions.queryindex.QueryIndexLine;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.RCPMessages;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.CQPEngine;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.stat.utils.ConsoleProgressBar;
+import org.txm.statsengine.r.rcp.views.RVariablesView;
+//import org.txm.functions.queryindex.*;
+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 @ author mdecorde.
+ */
+public class ComputeQueryAutoCooccurrence extends AbstractHandler {
+
+	float reqtime = 0.5f;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		final Object element = selection.getFirstElement();
+
+		final Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+
+		JobHandler jobhandler = new JobHandler("Computing cooccurrences matrix") {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					JobsTimer.start();
+
+					if (!(element instanceof QueryIndex)) {
+						System.out.println(RCPMessages.ComputeCooccurrences_1+ element);
+						return Status.CANCEL_STATUS;
+					}
+					QueryIndex qi = ((QueryIndex)element);
+					Corpus corpus = qi.getCorpus();
+					
+					final CoocMatrixDialog dialog = new ComputeQueryAutoCooccurrence.CoocMatrixDialog(shell, corpus);
+					syncExec(new Runnable() {
+						@Override
+						public void run() {
+							dialog.open();
+						}
+					});
+
+					if (dialog.getReturnCode() != Window.OK) System.out.println("Canceled");
+
+					this.acquireSemaphore();
+					final QueryAutoCooccurrence cooc = computeCooc(shell, corpus, (QueryIndex)element, dialog);
+					this.releaseSemaphore();
+
+					if (cooc == null) return null;
+					
+					System.out.println(RCPMessages.ComputeCoocMatrix_0+cooc.getSymbol());
+
+					syncExec(new Runnable() {
+						@Override
+						public void run() {
+							CorporaView.refresh();
+							CorporaView.expand(cooc.getCorpus());
+							QueriesView.refresh();
+							RVariablesView.refresh();
+						}
+					});
+				} catch (ThreadDeath td) { 
+					return Status.CANCEL_STATUS;
+				} catch (Exception e) {
+					Log.printStackTrace(e);
+					try { System.out.println(RCPMessages.LastCQPError+CQPEngine.getCqiClient().getLastCQPError());
+					} catch (Exception e1) { e1.printStackTrace(); }
+				} finally {
+					monitor.done();
+					JobsTimer.stopAndPrint();
+				}
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob();
+		return null;
+	}
+
+
+	private QueryAutoCooccurrence computeCooc(Shell shell, Corpus corpus, QueryIndex element, CoocMatrixDialog dialog) {
+		ArrayList<Query> queries = new ArrayList<Query>();
+		ArrayList<String> names = new ArrayList<String>();
+
+		String struct = dialog.getStruct();
+		int dist = dialog.getDist();
+		int min = dialog.getMin();
+		File outfile = dialog.getOutFile();
+		boolean oriented = dialog.getOriented();
+
+		for (QueryIndexLine line : element.getLines()) {
+			queries.add(line.getQuery());
+			names.add(line.getName());
+		}
+
+		System.out.println(RCPMessages.ProgressionDialog_8+queries);
+		System.out.println(RCPMessages.MergeCols_5+names);
+
+		QueryAutoCooccurrence cooc = null;
+		try {
+
+			int nqueries = (queries.size()*queries.size()/2);
+			System.out.println("Number of queries: "+nqueries);
+			System.out.println("Estimated time: "+(nqueries*reqtime/1000)+" secs");
+			cooc = new QueryAutoCooccurrence(corpus);
+			cooc.setParameters(queries, names, dist, min, struct, oriented, new ConsoleProgressBar(nqueries));
+			System.out.println(RCPMessages.ComputeCoocMatrix_1+cooc.getNNodes());
+			System.out.println(RCPMessages.ComputeCoocMatrix_2+cooc.getNEdges());
+			System.out.println(RCPMessages.ComputeCoocMatrix_3+dist);
+
+			if (outfile != null) {
+				cooc.toGraphml(outfile);
+				System.out.println(RCPMessages.ComputeCoocMatrix_4+outfile);
+			}
+
+		} catch (Exception e) {
+			Log.printStackTrace(e);
+			try { System.out.println(RCPMessages.LastCQPError+CQPEngine.getCqiClient().getLastCQPError());
+			} catch (Exception e1) { e1.printStackTrace(); }
+		}
+		return cooc;
+	}
+
+	public class CoocMatrixDialog extends Dialog {
+		Corpus corpus;
+
+		org.eclipse.swt.widgets.List propsCombo;
+		Spinner distSpinner;
+		Spinner minSpinner;
+		Label outfileLabel;
+
+		File outfile;
+		int dist;
+		int min;
+		String struct;
+		private boolean oriented;
+
+		private Button orientedButton;
+
+		public CoocMatrixDialog(Shell parentShell, Corpus corpus) {
+			super(parentShell);
+			this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+			this.corpus = corpus;
+		}
+
+
+		public boolean getOriented() {
+			return oriented;
+		}
+
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+		 */
+		@Override
+		protected void configureShell(Shell newShell) {
+			super.configureShell(newShell);
+			newShell.setText(RCPMessages.ComputeCoocMatrix_7);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			Composite composite = parent; //new Composite(parent, SWT.NONE);
+			// TODO : we just put a composite into another composite. Everything
+			// should be directly put into parent
+			GridLayout layout = new GridLayout(2, false);
+			composite.setLayout(layout);
+
+			Label anaPropLabel = new Label(composite, SWT.NONE);
+			anaPropLabel.setText(RCPMessages.ParaBrowserEditor_5);
+			anaPropLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+
+			propsCombo = new org.eclipse.swt.widgets.List(composite, SWT.READ_ONLY);
+			GridData gdata = new GridData(GridData.FILL, GridData.FILL, true, false);
+			propsCombo.setLayoutData(gdata);
+			GC gc = new GC(propsCombo);
+			gc.setFont(this.propsCombo.getFont());
+			gdata.heightHint = gc.getFontMetrics().getHeight() * 5;
+			gc.dispose();
+			propsCombo.add("");
+			try {
+				for (StructuralUnit p : corpus.getStructuralUnits()) {
+					if (!("text".equals(p.getName()) ||  //$NON-NLS-1$
+							"txmcorpus".equals(p.getName()))) //$NON-NLS-1$
+						propsCombo.add(p.getName());
+				}
+			} catch (CqiClientException e) {
+				Log.printStackTrace(e);
+				return parent;
+			}
+
+			Label distLabel = new Label(composite, SWT.NONE);
+			distLabel.setText(RCPMessages.ComputeCoocMatrix_10);
+			distLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+			distSpinner = new Spinner(composite, SWT.BORDER);
+			distSpinner.setMinimum(0);
+			distSpinner.setMaximum(1000);
+			distSpinner.setSelection(10);
+
+			Label minLabel = new Label(composite, SWT.NONE);
+			minLabel.setText(RCPMessages.ComputeCoocMatrix_11);
+			minLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+			minSpinner = new Spinner(composite, SWT.BORDER);
+			minSpinner.setMinimum(1);
+			minSpinner.setMaximum(1000);
+			minSpinner.setSelection(20);
+			
+			Label orientedLabel = new Label(composite, SWT.NONE);
+			orientedLabel.setText("Oriented");
+			orientedLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+			orientedButton = new Button(composite, SWT.CHECK);
+			orientedButton.setSelection(false);
+
+			outfileLabel = new Label(composite, SWT.NONE);
+			outfileLabel.setText(RCPMessages.ComputeCoocMatrix_12);
+			outfileLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+
+			Button outfileButton = new Button(composite, SWT.PUSH);
+			outfileButton.setText(RCPMessages.ComputeCoocMatrix_13);
+			outfileButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					FileDialog dialog = new FileDialog(e.display.getActiveShell(), SWT.SAVE);
+					String extensions[] = {"*.graphml"}; //$NON-NLS-1$
+					dialog.setFilterExtensions(extensions);
+					String path = dialog.open();
+					if (path != null) {
+						outfile = new File(path);
+						if (!(outfile.getName().toLowerCase().endsWith(".graphml"))) { //$NON-NLS-1$
+							outfile = new File(path+".graphml"); //$NON-NLS-1$
+						}
+						outfileLabel.setText(outfile.getAbsolutePath());
+					}
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+
+			return parent;
+		}
+
+		public File getOutFile() {
+			return outfile;
+		}
+
+		public int getDist() {
+			return dist;
+		}
+
+		public int getMin() {
+			return min;
+		}
+
+		public String getStruct() {
+			return struct;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		@Override
+		protected void okPressed() {
+			dist = distSpinner.getSelection();
+			min = minSpinner.getSelection();
+			struct = null;
+			oriented = orientedButton.getSelection();
+			for (int i : propsCombo.getSelectionIndices()) {
+				String sname = propsCombo.getItem(i);
+				if (sname != null && sname.length() > 0) {
+					struct = sname;
+					break;
+				}
+			}
+			super.okPressed();
+		}
+	}
+}

Property changes on: tmp/org.txm.querycooccurrences.rcp/src/org/txm/rcp/commands/function/ComputeQueryAutoCooccurrence.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.querycooccurrences.rcp/src/org/txm/rcp/commands/function/ComputeQueryCooccurrence.java
===================================================================
--- tmp/org.txm.querycooccurrences.rcp/src/org/txm/rcp/commands/function/ComputeQueryCooccurrence.java	(revision 0)
+++ tmp/org.txm.querycooccurrences.rcp/src/org/txm/rcp/commands/function/ComputeQueryCooccurrence.java	(revision 673)
@@ -0,0 +1,394 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.commands.function;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.functions.coocmatrix.QueryCooccurrence;
+//import org.txm.functions.queryindex.*;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.RCPMessages;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.CQPEngine;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.statsengine.r.rcp.views.RVariablesView;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * if the selection is a corpus, open an empty Cooc editor if the selection is a
+ * concordance, open a Cooc editor already computed @ author mdecorde.
+ */
+public class ComputeQueryCooccurrence extends AbstractHandler {
+
+	float reqtime = 0.5f;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		final Object element = selection.getFirstElement();
+
+		final Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+
+		JobHandler jobhandler = new JobHandler("Computing cooccurrences matrix") {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					JobsTimer.start();
+
+					if (!(element instanceof Corpus)) {
+						System.out.println(RCPMessages.ComputeCooccurrences_1+ element);
+						return Status.CANCEL_STATUS;
+					}
+					Corpus corpus = ((Corpus)element);
+
+					final CoocMatrixDialog dialog = new ComputeQueryCooccurrence.CoocMatrixDialog(shell, corpus);
+					syncExec(new Runnable() {
+						@Override
+						public void run() {
+							dialog.open();
+						}
+					});
+
+					if (dialog.getReturnCode() != Window.OK) System.out.println("Canceled");
+
+					this.acquireSemaphore();
+					final QueryCooccurrence cooc = computeCooc(shell, corpus, dialog);
+					this.releaseSemaphore();
+
+					if (cooc == null) return null;
+
+					System.out.println(RCPMessages.ComputeCoocMatrix_0+cooc.getSymbol());
+
+					syncExec(new Runnable() {
+						@Override
+						public void run() {
+							CorporaView.refresh();
+							CorporaView.expand(cooc.getCorpus());
+							QueriesView.refresh();
+							RVariablesView.refresh();
+						}
+					});
+				} catch (ThreadDeath td) { 
+					return Status.CANCEL_STATUS;
+				} catch (Exception e) {
+					Log.printStackTrace(e);
+					try { System.out.println(RCPMessages.LastCQPError+CQPEngine.getCqiClient().getLastCQPError());
+					} catch (Exception e1) { e1.printStackTrace(); }
+				} finally {
+					monitor.done();
+					JobsTimer.stopAndPrint();
+				}
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob();
+		return null;
+	}
+
+
+	private QueryCooccurrence computeCooc(Shell shell, Corpus corpus, CoocMatrixDialog dialog) throws IOException {
+		ArrayList<Query> queries1 = new ArrayList<Query>();
+		ArrayList<String> names1 = new ArrayList<String>();
+		ArrayList<Query> queries2 = new ArrayList<Query>();
+		ArrayList<String> names2 = new ArrayList<String>();
+
+		String struct = dialog.getStruct();
+		int dist = dialog.getDist();
+		int min = dialog.getMin();
+		getQueriesAndNames(dialog.getQueryFile1(), queries1, names1);
+		getQueriesAndNames(dialog.getQueryFile2(), queries2, names2);
+
+		System.out.println(RCPMessages.ProgressionDialog_8+queries1);
+		System.out.println(RCPMessages.MergeCols_5+names1);
+
+		QueryCooccurrence cooc = null;
+		try {
+			int nqueries = (queries1.size()*queries2.size());
+			System.out.println("Number of queries: "+nqueries);
+			System.out.println("Estimated time: "+(nqueries*reqtime/1000)+" secs");
+			cooc = new QueryCooccurrence(corpus, queries1, names1, queries2, names2, dist, min, struct);
+			System.out.println(RCPMessages.ComputeCoocMatrix_1+cooc.getNNodes());
+			System.out.println(RCPMessages.ComputeCoocMatrix_2+cooc.getNEdges());
+			System.out.println(RCPMessages.ComputeCoocMatrix_3+dist);
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			Log.printStackTrace(e);
+			try { System.out.println(RCPMessages.LastCQPError+CQPEngine.getCqiClient().getLastCQPError());
+			} catch (Exception e1) { e1.printStackTrace(); }
+		}
+		return cooc;
+	}
+
+	private void getQueriesAndNames(File propFile, ArrayList<Query> queries,
+			ArrayList<String> names) throws IOException {
+		BufferedReader reader = new BufferedReader(new InputStreamReader(
+				new FileInputStream(propFile), "UTF-8")); //$NON-NLS-1$
+
+		String line = reader.readLine();
+		while (line != null) {
+			String[] split = line.split("=", 2); //$NON-NLS-1$
+			if (split.length == 2) {
+				queries.add(new Query(split[1]));
+				names.add(split[0]);
+			}
+
+			line = reader.readLine();
+		}
+		reader.close();
+	}
+
+	public class CoocMatrixDialog extends Dialog {
+		Corpus corpus;
+
+		org.eclipse.swt.widgets.List propsCombo;
+		Spinner distSpinner;
+		Spinner minSpinner;
+		Label queriesFile1Label;
+		Label queriesFile2Label;
+
+		File queriesFile1;
+		File queriesFile2;
+		int dist;
+		int min;
+		String struct;
+		private boolean oriented;
+
+		private Button orientedButton;
+
+
+
+		public CoocMatrixDialog(Shell parentShell, Corpus corpus) {
+			super(parentShell);
+			this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+			this.corpus = corpus;
+		}
+
+
+		public boolean getOriented() {
+			return oriented;
+		}
+
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+		 */
+		@Override
+		protected void configureShell(Shell newShell) {
+			super.configureShell(newShell);
+			newShell.setText(RCPMessages.ComputeCoocMatrix_7);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			Composite composite = parent; //new Composite(parent, SWT.NONE);
+			// TODO : we just put a composite into another composite. Everything
+			// should be directly put into parent
+			GridLayout layout = new GridLayout(2, false);
+			composite.setLayout(layout);
+
+			Label anaPropLabel = new Label(composite, SWT.NONE);
+			anaPropLabel.setText(RCPMessages.ParaBrowserEditor_5);
+			anaPropLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+
+			propsCombo = new org.eclipse.swt.widgets.List(composite, SWT.READ_ONLY);
+			GridData gdata = new GridData(GridData.FILL, GridData.FILL, true, false);
+			propsCombo.setLayoutData(gdata);
+			GC gc = new GC(propsCombo);
+			gc.setFont(this.propsCombo.getFont());
+			gdata.heightHint = gc.getFontMetrics().getHeight() * 5;
+			gc.dispose();
+			propsCombo.add("");
+			try {
+				for (StructuralUnit p : corpus.getStructuralUnits()) {
+					if (!("text".equals(p.getName()) ||  //$NON-NLS-1$
+							"txmcorpus".equals(p.getName()))) //$NON-NLS-1$
+						propsCombo.add(p.getName());
+				}
+			} catch (CqiClientException e) {
+				Log.printStackTrace(e);
+				return parent;
+			}
+
+			Label distLabel = new Label(composite, SWT.NONE);
+			distLabel.setText(RCPMessages.ComputeCoocMatrix_10);
+			distLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+			distSpinner = new Spinner(composite, SWT.BORDER);
+			distSpinner.setMinimum(0);
+			distSpinner.setMaximum(1000);
+			distSpinner.setSelection(10);
+
+			Label minLabel = new Label(composite, SWT.NONE);
+			minLabel.setText(RCPMessages.ComputeCoocMatrix_11);
+			minLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+			minSpinner = new Spinner(composite, SWT.BORDER);
+			minSpinner.setMinimum(1);
+			minSpinner.setMaximum(1000);
+			minSpinner.setSelection(20);
+
+			Label orientedLabel = new Label(composite, SWT.NONE);
+			orientedLabel.setText("Oriented");
+			orientedLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+			orientedButton = new Button(composite, SWT.CHECK);
+			orientedButton.setSelection(false);
+
+			queriesFile1Label = new Label(composite, SWT.NONE);
+			queriesFile1Label.setText("Query file 1");
+			queriesFile1Label.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+
+			Button queriesFile1Button = new Button(composite, SWT.PUSH);
+			queriesFile1Button.setText("Select...");
+			queriesFile1Button.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					FileDialog dialog = new FileDialog(e.display.getActiveShell(), SWT.OPEN);
+					String extensions[] = {"*.properties"}; //$NON-NLS-1$
+					dialog.setFilterExtensions(extensions);
+					String path = dialog.open();
+					if (path != null) {
+						queriesFile1 = new File(path);
+						queriesFile1Label.setText(queriesFile1.getAbsolutePath());
+					}
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+
+			queriesFile2Label = new Label(composite, SWT.NONE);
+			queriesFile2Label.setText("Query file 2");
+			queriesFile2Label.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+
+			Button queriesFile2Button = new Button(composite, SWT.PUSH);
+			queriesFile2Button.setText("Select...");
+			queriesFile2Button.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					FileDialog dialog = new FileDialog(e.display.getActiveShell(), SWT.OPEN);
+					String extensions[] = {"*.properties"}; //$NON-NLS-1$
+					dialog.setFilterExtensions(extensions);
+					String path = dialog.open();
+					if (path != null) {
+						queriesFile2 = new File(path);
+						queriesFile2Label.setText(queriesFile2.getAbsolutePath());
+					}
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+
+			return parent;
+		}
+
+		public File getQueryFile1() {
+			return queriesFile1;
+		}
+
+		public File getQueryFile2() {
+			return queriesFile2;
+		}
+
+		public int getDist() {
+			return dist;
+		}
+
+		public int getMin() {
+			return min;
+		}
+
+		public String getStruct() {
+			return struct;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		@Override
+		protected void okPressed() {
+			dist = distSpinner.getSelection();
+			min = minSpinner.getSelection();
+			struct = null;
+			oriented = orientedButton.getSelection();
+			for (int i : propsCombo.getSelectionIndices()) {
+				String sname = propsCombo.getItem(i);
+				if (sname != null && sname.length() > 0) {
+					struct = sname;
+					break;
+				}
+			}
+			super.okPressed();
+		}
+	}
+}

Property changes on: tmp/org.txm.querycooccurrences.rcp/src/org/txm/rcp/commands/function/ComputeQueryCooccurrence.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.treetagger.rcp/plugin.xml
===================================================================
--- tmp/org.txm.treetagger.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.treetagger.rcp/plugin.xml	(revision 673)
@@ -5,25 +5,25 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.treetagger.commands.Train"
             id="org.txm.treetagger.commands.Train"
             name="Train">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.treetagger.commands.Apply"
             id="org.txm.treetagger.commands.Apply"
             name="Apply">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.treetagger.commands.LemmaProjection"
             id="org.txm.treetagger.commands.PropertyProjection"
             name="LemmaProjection">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.treetagger.commands.RemoveProperties"
             description="Remove properties fomr corpus XML-TXM files"
             id="org.txm.treetagger.commands.RemoveProperties"
Index: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/LineContentProvider.java
===================================================================
--- tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/LineContentProvider.java	(revision 0)
+++ tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/LineContentProvider.java	(revision 673)
@@ -0,0 +1,81 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.editors.queryindex;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.txm.functions.queryindex.QueryIndexLine;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The IStructuredContentProvider used by the reference and line tables.
+ *
+ * @author jmague
+ */
+public class LineContentProvider implements IStructuredContentProvider {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
+	 * .lang.Object)
+	 */
+	@Override
+	public Object[] getElements(Object inputElement) {
+		@SuppressWarnings("unchecked")
+		List<QueryIndexLine> lines = (List<QueryIndexLine>) inputElement;
+		return lines.toArray();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
+	 * .viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		// TODO Auto-generated method stub
+	}
+
+}

Property changes on: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/LineContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/LineLabelProvider.java
===================================================================
--- tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/LineLabelProvider.java	(revision 0)
+++ tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/LineLabelProvider.java	(revision 673)
@@ -0,0 +1,103 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.editors.queryindex;
+
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.txm.functions.queryindex.QueryIndexLine;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class LineLabelProvider.
+ */
+public class LineLabelProvider implements ITableLabelProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+	 */
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		QueryIndexLine line = (QueryIndexLine) element;
+		switch (columnIndex) {
+		case 0:
+			return ""; //$NON-NLS-1$
+		case 1:
+			return line.getName();
+		case 2:
+			return "" + line.getFrequency(); //$NON-NLS-1$
+		default:
+			if (line.getFreqs().length > 1
+					&& columnIndex - 3 < line.getFreqs().length)
+				return "" + line.getFrequency(columnIndex - 3); //$NON-NLS-1$
+			else
+				return "";//$NON-NLS-1$
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+	 */
+	@Override
+	public void addListener(ILabelProviderListener listener) {
+		// TODO Auto-generated method stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
+	 */
+	@Override
+	public boolean isLabelProperty(Object element, String property) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+	 */
+	@Override
+	public void removeListener(ILabelProviderListener listener) {
+		// TODO Auto-generated method stub
+	}
+}

Property changes on: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/LineLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/QueryIndexEditor.java
===================================================================
--- tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/QueryIndexEditor.java	(revision 0)
+++ tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/QueryIndexEditor.java	(revision 673)
@@ -0,0 +1,1115 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.editors.queryindex;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.core.results.TXMResult;
+import org.txm.functions.queryindex.QueryIndex;
+import org.txm.functions.queryindex.QueryIndexLine;
+import org.txm.index.core.functions.LineComparator.SortMode;
+import org.txm.index.rcp.messages.IndexUIMessages;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.RCPMessages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.editors.TXMEditor;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.swt.widget.NamedAssistedQueryWidget;
+import org.txm.rcp.swt.widget.NavigationWidget;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.rcp.editors.input.QueryIndexEditorInput;
+import org.txm.searchengine.cqp.CQPEngine;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.statsengine.r.rcp.views.RVariablesView;
+import org.txm.utils.logger.Log;
+import org.txm.functions.queryindex.*;
+
+/**
+ * display the query index parameters and result.
+ * 
+ * @author mdecorde
+ */
+public class QueryIndexEditor extends TXMEditor<QueryIndex> {
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.editors.queryindex.QueryIndexEditor"; //$NON-NLS-1$
+
+	/** The corpus. */
+	protected Corpus corpus;
+	protected Partition partition; // can be null
+
+	/** The index. */
+	protected QueryIndex queryindex;
+	boolean stored = false; // start storing at first line added
+	// protected boolean saveQueryIndex = true;
+
+	// params
+	/** The query label. */
+	protected Label queryLabel;
+
+	/** The query widget. */
+	protected NamedAssistedQueryWidget queryWidget;
+
+	/** The N ligne p page spinner. */
+	protected Spinner NLignePPageSpinner;
+	// infos
+	/** The navigation area. */
+	protected NavigationWidget navigationArea;
+
+	/** The l fmin info. */
+	protected Label lFminInfo;
+
+	/** The l fmax info. */
+	protected Label lFmaxInfo;
+
+	/** The l v info. */
+	protected Label lVInfo;
+
+	/** The l t info. */
+	protected Label lTInfo;
+	// result
+	/** The line table viewer. */
+	protected TableViewer viewer;
+
+	/** The n column. */
+	protected TableColumn nColumn;
+
+	/** The unit column. */
+	protected TableColumn unitColumn;
+
+	/** The freq column. */
+	protected TableColumn freqColumn;
+
+	/** The separator column. */
+	protected TableColumn separatorColumn;
+
+	/** The top line. */
+	protected int topLine;
+
+	/** The bottom line. */
+	protected int bottomLine;
+
+	/** The nblinesperpage. */
+	protected int nblinesperpage;
+
+	/** The nblinesmax. */
+	protected int nblinesmax;
+
+	/** The scroll composite. */
+	private ScrolledComposite scrollComposite;
+
+	/** The head composite. */
+	private Composite headComposite;
+
+	/** The title. */
+	String title;
+
+	/**
+	 * Instantiates a new index editor.
+	 */
+	public QueryIndexEditor() {
+		super();
+	}
+
+	/**
+	 * Do save.
+	 * 
+	 * @param arg0
+	 *            the arg0
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor arg0) {
+		// TODO Auto-generated method stub
+	}
+
+	/**
+	 * Do save as.
+	 * 
+	 * @see org.eclipse.lyon gournd zeroui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+		// TODO Auto-generated method stub
+	}
+
+	/**
+	 * Inits the.
+	 * 
+	 * @param site
+	 *            the site
+	 * @param input
+	 *            the input
+	 * @throws PartInitException
+	 *             the part init exception
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite,
+	 *      org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		setSite(site);
+		setInput(input);
+
+		this.corpus = ((QueryIndexEditorInput) input).getCorpus();
+		this.partition = ((QueryIndexEditorInput) input).getPartition();
+		this.queryindex = ((QueryIndexEditorInput) input).getQueryIndex();
+	}
+
+	/**
+	 * Checks if is dirty.
+	 * 
+	 * @return true, if is dirty
+	 * @see org.eclipse.ui.part.EditorPart#isDirty()
+	 */
+	@Override
+	public boolean isDirty() {
+		return false;
+	}
+
+	/**
+	 * Checks if is save as allowed.
+	 * 
+	 * @return true, if is save as allowed
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+
+	private QueryIndex createQueryIndex() {
+		if (queryindex == null) {
+			if (partition != null) {
+				queryindex = new QueryIndex(partition);
+				title = Messages.QueryIndexEditor_0 + partition.getName();
+			} else {
+				queryindex = new QueryIndex(corpus);
+				title = Messages.QueryIndexEditor_0 + corpus;
+			}
+		}
+		return queryindex;
+	}
+
+	/**
+	 * Compute index.
+	 */
+	public void compute() {
+
+		createQueryIndex();
+
+		StatusLine.setMessage(IndexUIMessages.IndexEditor_33);
+		final Query query; // if the query is empty then we put "[]" instead
+		if (!queryWidget.getQueryString().equals("\"\"")) {//$NON-NLS-1$
+			query = new Query(queryWidget.getQueryString());
+		} else {
+			System.err.println(IndexUIMessages.IndexEditor_0);
+			return;
+		}
+
+		final String name;
+		if (queryWidget.getQueryName().length() == 0) {
+			name = query.toString();
+		} else {
+			name = queryWidget.getQueryName();
+		}
+
+		try {
+			JobHandler jobhandler = new JobHandler(title,
+					queryWidget.getParent()) {
+				@Override
+				protected IStatus run(IProgressMonitor monitor) {
+					this.runInit(monitor);
+					JobsTimer.start();
+					final QueryIndexLine line;
+					try {
+						try {
+							if (queryindex.hasLine(name)) {
+								System.out.println(Messages.QueryIndexEditor_1 + name);
+								queryindex.removeLine(name);
+							}
+							line = queryindex.addLine(name, query);
+						} catch (CqiClientException e2) {
+							System.out
+									.println(Messages.QueryIndexEditor_2
+											+ query);
+							Log.printStackTrace(e2);
+							return Status.CANCEL_STATUS;
+						}
+
+						if (line == null) {
+							System.out
+									.println(Messages.QueryIndexEditor_2
+											+ query);
+							return Status.CANCEL_STATUS;
+						}
+
+						if (monitor.isCanceled())
+							return Status.CANCEL_STATUS;
+
+						queryindex.sortLines(SortMode.FREQUNIT, true);
+
+						if (monitor.isCanceled())
+							return Status.CANCEL_STATUS;
+
+						this.acquireSemaphore();
+						this.releaseSemaphore();
+
+						final String message = Messages.QueryIndexEditor_3;
+
+						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);
+
+								CorporaView.refresh();
+								CorporaView.expand(queryindex.getParent());
+								QueriesView.refresh();
+								RVariablesView.refresh();
+
+								setPartName(title);
+
+								queryWidget.memorize();
+								nblinesperpage = NLignePPageSpinner
+										.getSelection();
+
+								fillDisplayArea(0,
+										NLignePPageSpinner.getSelection());
+
+								if (line != null) {
+									queryWidget.setText(""); //$NON-NLS-1$
+									queryWidget.setName(""); //$NON-NLS-1$
+									queryWidget.focus();
+								}
+							}
+						});
+					} catch (Exception e) {
+						System.out.println(e.getLocalizedMessage());
+						try {
+							System.out.println(RCPMessages.LastCQPError
+									+ CQPEngine.getCqiClient().getLastCQPError());
+						} catch (Exception e1) {
+							System.out.println(IndexUIMessages.IndexEditor_10
+									+ e1);
+							Log.printStackTrace(e1);
+						}
+						Log.severe("Error while computing QueryIndex: "+e.getLocalizedMessage());
+					} catch (ThreadDeath td) {
+						return Status.CANCEL_STATUS;
+					} finally {
+						monitor.done();
+						JobsTimer.stopAndPrint();
+					}
+					return Status.OK_STATUS;
+				}
+			};
+			jobhandler.startJob();
+
+		} catch (Exception e1) {
+			Log.printStackTrace(e1);
+		}
+	}
+
+	/**
+	 * Creates the part control.
+	 * 
+	 * @param parent
+	 *            the parent
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void _createPartControl(final Composite parent) {
+		FormLayout parentLayout = new FormLayout();
+		parent.setLayout(parentLayout);
+
+		// create scrollable area
+		scrollComposite = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.NONE);
+		FormData headLayoutData = new FormData();
+		headLayoutData.top = new FormAttachment(0, 0);
+		headLayoutData.left = new FormAttachment(0);
+		headLayoutData.right = new FormAttachment(100);
+		scrollComposite.setLayoutData(headLayoutData);
+		scrollComposite.setLayout(new FormLayout());
+
+		headComposite = new Composite(scrollComposite, SWT.NONE);
+		headLayoutData = new FormData();
+		headLayoutData.top = new FormAttachment(0);
+		headLayoutData.bottom = new FormAttachment(100);
+		headLayoutData.left = new FormAttachment(0);
+		headLayoutData.right = new FormAttachment(100);
+		headComposite.setLayoutData(headLayoutData);
+		headComposite.setLayout(new FormLayout());
+
+		scrollComposite.setContent(headComposite);
+		scrollComposite.setExpandVertical(true);
+		scrollComposite.setExpandHorizontal(true);
+		scrollComposite.addControlListener(new ControlAdapter() {
+			@Override
+			public void controlResized(ControlEvent e) {
+				Rectangle r = scrollComposite.getClientArea();
+				scrollComposite.setMinSize(headComposite.computeSize(
+						SWT.DEFAULT, SWT.DEFAULT));
+			}
+		});
+
+		final Composite paramArea = new Composite(headComposite, SWT.NONE);
+		FormData paramLayoutData = new FormData();
+		paramLayoutData.top = new FormAttachment(0);
+		paramLayoutData.left = new FormAttachment(0);
+		paramLayoutData.right = new FormAttachment(100);
+		paramArea.setLayoutData(paramLayoutData);
+
+		// info&navigation panel
+		// final Composite infosArea = new Composite(headComposite, SWT.NONE);
+		// FormData infosLayoutData = new FormData();
+		// infosLayoutData.top = new FormAttachment(paramArea, 0);
+		// infosLayoutData.left = new FormAttachment(0);
+		// infosLayoutData.right = new FormAttachment(100);
+		// infosArea.setLayoutData(infosLayoutData);
+
+		Composite resultArea = new Composite(parent, SWT.NONE);
+		FormData resultLayoutData = new FormData();
+		resultLayoutData.top = new FormAttachment(scrollComposite, 0);
+		resultLayoutData.left = new FormAttachment(0);
+		resultLayoutData.right = new FormAttachment(100);
+		resultLayoutData.bottom = new FormAttachment(100);
+		resultArea.setLayoutData(resultLayoutData);
+
+		// compose paramArea
+		FormLayout paramLayout = new FormLayout();
+		paramArea.setLayout(paramLayout);
+
+		// on créé une Query, ici le pivot de la concordance est "[]"
+		// Query Area: query itself + view properties
+		Composite queryArea = new Composite(paramArea, SWT.NONE);
+
+		FormData queryLayoutData = new FormData();
+		queryLayoutData.top = new FormAttachment(0);
+		queryLayoutData.left = new FormAttachment(0);
+		queryLayoutData.right = new FormAttachment(100);
+		queryArea.setLayoutData(queryLayoutData);
+
+		queryArea.setLayout(new GridLayout(4, false));
+
+		// | Query: [ (v)] [Search] |
+		// Query:
+		// queryLabel = new Label(queryArea, SWT.NONE);
+		// queryLabel.setText(RCPMessages.IndexEditor_3);
+		// queryLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,
+		// true));
+
+		// [ (v)]
+		queryWidget = new NamedAssistedQueryWidget(queryArea, SWT.DROP_DOWN,
+				this.corpus);
+		GridData layoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER);
+		layoutData.horizontalAlignment = GridData.FILL;
+		layoutData.grabExcessHorizontalSpace = true;
+		queryWidget.setLayoutData(layoutData);
+		queryWidget.addKeyListener(new KeyListener() {
+			@Override
+			public void keyPressed(KeyEvent e) {
+				// System.out.println("key pressed : "+e.keyCode);
+				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
+					compute();
+				}
+			}
+
+			@Override
+			public void keyReleased(KeyEvent e) {
+			}
+		});
+
+		Button loadFromFile = new Button(queryArea, SWT.BOLD);
+		loadFromFile.setEnabled(true);
+		loadFromFile.setText(Messages.QueryIndexEditor_4);
+		loadFromFile
+				.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER));
+		loadFromFile.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				File propFile = null;
+				if (LastOpened.getFile(ID) != null)
+					propFile = new File(LastOpened.getFolder(ID));
+
+				FileDialog dialog = new FileDialog(parent.getShell(), SWT.OPEN);
+				String[] exts = { "*.properties" }; //$NON-NLS
+				dialog.setFilterExtensions(exts);
+				if (propFile != null) {
+					dialog.setFilterPath(propFile.getParent());
+					dialog.setFileName(propFile.getName());
+				}
+				String path = dialog.open();
+				if (path != null) {
+					propFile = new File(path);
+					// compute();
+					// System.out.println("TODO: load from file "+propFile);
+					createQueryIndex();
+					try {
+						queryindex.addLinesFromFile(propFile);
+						queryindex.sortLines(SortMode.FREQUNIT, true);
+
+						stored = true;
+
+						fillDisplayArea(0, NLignePPageSpinner.getSelection());
+
+						CorporaView.refresh();
+						CorporaView.expand(queryindex.getParent());
+						QueriesView.refresh();
+						RVariablesView.refresh();
+
+						setPartName(title);
+
+						queryWidget.focus();
+					} catch (CqiClientException e1) {
+						// TODO Auto-generated catch block
+						Log.printStackTrace(e1);
+					} catch (IOException e1) {
+						// TODO Auto-generated catch block
+						System.out
+								.println(Messages.QueryIndexEditor_6 + propFile);
+						Log.printStackTrace(e1);
+					}
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		Button go = new Button(queryArea, SWT.BOLD);
+		go.setText(IndexUIMessages.IndexEditor_4);
+
+		Font f = go.getFont();
+		FontData defaultFont = f.getFontData()[0];
+		defaultFont.setStyle(SWT.BOLD);
+		Font newf = new Font(go.getDisplay(), defaultFont);
+		go.setFont(newf);
+
+		layoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER);
+		layoutData.horizontalAlignment = GridData.FILL;
+		layoutData.grabExcessHorizontalSpace = false;
+		go.setLayoutData(layoutData);
+
+		go.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				compute();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// Filters
+		Composite filtercontrols = new Composite(paramArea, SWT.NONE);
+		FormData filtersLayoutData = new FormData();
+		filtersLayoutData.top = new FormAttachment(queryArea, 0);
+		filtersLayoutData.bottom = new FormAttachment(100);
+		filtersLayoutData.left = new FormAttachment(0);
+		filtersLayoutData.right = new FormAttachment(100);
+		filtercontrols.setLayoutData(filtersLayoutData);
+
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.numColumns = 9;
+		gridLayout.makeColumnsEqualWidth = false;
+		filtercontrols.setLayout(gridLayout);
+
+		Label lNLigneppage = new Label(filtercontrols, SWT.NONE);
+		lNLigneppage.setText(IndexUIMessages.IndexEditor_8);
+		lNLigneppage.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,
+				false));
+
+		NLignePPageSpinner = new Spinner(filtercontrols, SWT.BORDER);
+		NLignePPageSpinner.setMinimum(0);
+		NLignePPageSpinner.setMaximum(99999);
+		NLignePPageSpinner.setSelection(100);
+		NLignePPageSpinner.setIncrement(1);
+		NLignePPageSpinner.setPageIncrement(100);
+		NLignePPageSpinner.setLayoutData(new GridData(
+				GridData.VERTICAL_ALIGN_END));
+		NLignePPageSpinner.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				fillDisplayArea(0, NLignePPageSpinner.getSelection());
+				viewer.getTable().select(0);
+				viewer.getTable().showSelection();
+			}
+		});
+
+		// compose infosArea
+		// infosArea.setLayout(new GridLayout(6, false));
+
+		navigationArea = new NavigationWidget(filtercontrols, SWT.NONE);
+		navigationArea.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true,
+				false));
+
+		navigationArea.addFirstListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				fillDisplayArea(0, NLignePPageSpinner.getSelection());
+				viewer.getTable().select(0);
+				viewer.getTable().showSelection();
+			}
+		});
+		navigationArea.addLastListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int top = (queryindex.getV() / NLignePPageSpinner
+						.getSelection()) * NLignePPageSpinner.getSelection();
+				int bottom = top + NLignePPageSpinner.getSelection();
+				fillDisplayArea(top, bottom);
+				viewer.getTable().select(0);
+				viewer.getTable().showSelection();
+			}
+		});
+		navigationArea.addNextListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int top = topLine + NLignePPageSpinner.getSelection();
+				int bottom = top + NLignePPageSpinner.getSelection();
+				fillDisplayArea(top, bottom);
+				viewer.getTable().select(0);
+				viewer.getTable().showSelection();
+			}
+		});
+		navigationArea.addPreviousListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int top = topLine - NLignePPageSpinner.getSelection();
+				if (top < 0)
+					top = 0;
+				int bottom = top + NLignePPageSpinner.getSelection();
+				fillDisplayArea(top, bottom);
+				viewer.getTable().select(0);
+				viewer.getTable().showSelection();
+			}
+		});
+
+		// Labels
+		lTInfo = new Label(filtercontrols, SWT.NONE);
+		lTInfo.setText(""); //$NON-NLS-1$
+		lTInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+
+		lVInfo = new Label(filtercontrols, SWT.NONE);
+		lVInfo.setText(""); //$NON-NLS-1$
+		lVInfo.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+
+		lFminInfo = new Label(filtercontrols, SWT.NONE);
+		lFminInfo.setText(""); //$NON-NLS-1$
+		lFminInfo
+				.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+
+		lFmaxInfo = new Label(filtercontrols, SWT.NONE);
+		lFmaxInfo.setText(""); //$NON-NLS-1$
+		lFmaxInfo
+				.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+
+		// results
+		FormLayout resultLayout = new FormLayout();
+		resultArea.setLayout(resultLayout);
+
+		viewer = new TableViewer(resultArea, SWT.MULTI | SWT.FULL_SELECTION
+				| SWT.BORDER);
+		viewer.getTable().setLinesVisible(true);
+		viewer.getTable().setHeaderVisible(true);
+		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
+
+		if (corpus != null && corpus.getFont() != null
+				&& corpus.getFont().length() > 0) {
+			Font old = viewer.getTable().getFont();
+			FontData fD = old.getFontData()[0];
+			Font font = new Font(Display.getCurrent(), corpus.getFont(),
+					fD.getHeight(), fD.getStyle());
+			viewer.getTable().setFont(font);
+		}
+
+		FormData tableLayoutData = new FormData();
+		tableLayoutData.top = new FormAttachment(0);
+		tableLayoutData.bottom = new FormAttachment(100);
+		tableLayoutData.left = new FormAttachment(0);
+		tableLayoutData.right = new FormAttachment(100);
+		viewer.getTable().setLayoutData(tableLayoutData);
+
+		viewer.setLabelProvider(new LineLabelProvider());
+		viewer.setContentProvider(new LineContentProvider());
+		viewer.setInput(new ArrayList<Property>());
+
+		viewer.getTable().addMouseListener(new MouseAdapter() {
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+				Point mouseposition = new Point(e.x
+						+ viewer.getTable().getHorizontalBar().getSelection(),
+						e.y);
+				int col = getPointedColumn(mouseposition);
+				if (col == 1) {
+					// IndexToConcordance.link(self,
+					// (IStructuredSelection) viewer
+					// .getSelection());
+					System.out.println(Messages.QueryIndexEditor_7);
+				} else if (col == 2) {
+					System.out.println(Messages.QueryIndexEditor_8);
+				}
+			}
+		});
+
+		viewer.getTable().addKeyListener(new KeyListener() {
+			@Override
+			public void keyReleased(KeyEvent e) {
+			}
+
+			@Override
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.DEL) {
+					System.out.println(Messages.QueryIndexEditor_9);
+					ISelection sel = viewer.getSelection();
+					if (sel instanceof StructuredSelection) {
+						List<?> lines = ((StructuredSelection) sel).toList();
+						for (Object obj : lines) {
+							if (obj instanceof QueryIndexLine) {
+								QueryIndexLine line = (QueryIndexLine) obj;
+								queryindex.removeLine(line.getName());
+							}
+						}
+						fillDisplayArea(topLine, bottomLine);
+					}
+				}
+			}
+		});
+
+		nColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		nColumn.setText(" "); //$NON-NLS-1$
+		nColumn.pack();
+
+		unitColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		unitColumn.setText(RCPMessages.ReferencerEditor_9);
+		unitColumn.setToolTipText(RCPMessages.ReferencerEditor_9);
+		unitColumn.setWidth(200);
+		unitColumn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(IndexUIMessages.IndexEditor_36);
+				if (viewer.getTable().getSortColumn() != unitColumn) {
+					viewer.getTable().setSortColumn(unitColumn);
+					viewer.getTable().setSortDirection(SWT.UP);
+					queryindex.sortLines(SortMode.UNITFREQ, false);
+				} else {
+					if (viewer.getTable().getSortDirection() == SWT.UP) {
+						viewer.getTable().setSortDirection(SWT.DOWN);
+						queryindex.sortLines(SortMode.UNITFREQ, true);
+					} else {
+						viewer.getTable().setSortDirection(SWT.UP);
+						queryindex.sortLines(SortMode.UNITFREQ, false);
+					}
+				}
+
+				StatusLine.setMessage(IndexUIMessages.IndexEditor_37);
+				fillDisplayArea(topLine, bottomLine);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		freqColumn = new TableColumn(viewer.getTable(), SWT.RIGHT);
+		try {
+			if (partition != null)
+				freqColumn.setText(RCPMessages.FrequencyListEditorInput_4
+						+ " T=" + partition.getTotalSize()); //$NON-NLS-1$
+			else
+				freqColumn.setText(RCPMessages.FrequencyListEditorInput_4
+						+ " T=" + corpus.getSize()); //$NON-NLS-1$
+		} catch (CqiClientException e2) {
+			Log.printStackTrace(e2);
+			return;
+		}
+		freqColumn.setToolTipText(RCPMessages.FrequencyListEditorInput_4);
+		freqColumn.setWidth(100);
+		freqColumn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (viewer.getTable().getSortColumn() != freqColumn) {
+					viewer.getTable().setSortColumn(freqColumn);
+					viewer.getTable().setSortDirection(SWT.UP);
+					queryindex.sortLines(SortMode.FREQUNIT, false);
+				} else {
+					if (viewer.getTable().getSortDirection() == SWT.UP) {
+						viewer.getTable().setSortDirection(SWT.DOWN);
+						queryindex.sortLines(SortMode.FREQUNIT, true);
+					} else {
+						viewer.getTable().setSortDirection(SWT.UP);
+						queryindex.sortLines(SortMode.FREQUNIT, false);
+					}
+				}
+				StatusLine.setMessage(IndexUIMessages.IndexEditor_37);
+				fillDisplayArea(topLine, bottomLine);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// rmv/creates parts columns if needed
+		if (this.partition != null) {
+			List<String> partnames = this.partition.getPartNames();
+			if (partnames.size() > 1)
+				if (viewer.getTable().getColumnCount() < partnames.size() + 3) {
+					for (int i = 0; i < partnames.size(); i++) {
+						final TableColumn partColumn = new TableColumn(
+								viewer.getTable(), SWT.RIGHT);
+						try {
+							partColumn
+									.setText(partnames.get(i)
+											+ " t=" + partition.getParts().get(i).getSize()); //$NON-NLS-1$
+						} catch (CqiClientException e1) {
+							Log.printStackTrace(e1);
+							return;
+						}
+						partColumn.setToolTipText(partnames.get(i));
+						partColumn.setWidth(100);
+						partColumn
+								.addSelectionListener(new SelectionListener() {
+									@Override
+									public void widgetSelected(SelectionEvent e) {
+										if (viewer.getTable().getSortColumn() != partColumn) {
+											viewer.getTable().setSortColumn(
+													partColumn);
+											viewer.getTable().setSortDirection(
+													SWT.UP);
+											queryindex.sortLines(
+													SortMode.FREQUNIT, false);
+										} else {
+											if (viewer.getTable()
+													.getSortDirection() == SWT.UP) {
+												viewer.getTable()
+														.setSortDirection(
+																SWT.DOWN);
+												queryindex
+														.sortLines(
+																SortMode.FREQUNIT,
+																true);
+											} else {
+												viewer.getTable()
+														.setSortDirection(
+																SWT.UP);
+												queryindex.sortLines(
+														SortMode.FREQUNIT,
+														false);
+											}
+										}
+										fillDisplayArea(topLine, bottomLine);
+									}
+
+									@Override
+									public void widgetDefaultSelected(
+											SelectionEvent e) {
+									}
+								});
+					}
+				}
+		}
+		separatorColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		separatorColumn.setText(""); //$NON-NLS-1$
+		separatorColumn.pack();
+
+		initializeFields();
+		createContextMenu(viewer);
+		viewer.getTable().pack();
+	}
+
+	/**
+	 * Gets the pointed column.
+	 * 
+	 * @param mouseposition
+	 *            the mouseposition
+	 * @return the pointed column
+	 */
+	public int getPointedColumn(Point mouseposition) {
+		int x = mouseposition.x; // + lineTableViewer.getTable().get;
+		int sumWidthColumn = this.nColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 0;
+
+		sumWidthColumn += this.unitColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 1;
+
+		sumWidthColumn += this.freqColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 2;
+
+		return 2;
+	}
+
+	/**
+	 * Creates the context menu.
+	 * 
+	 * @param tableViewer
+	 *            the table viewer
+	 */
+	private void createContextMenu(TableViewer tableViewer) {
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tableViewer.getTable());
+
+		// Set the MenuManager
+		tableViewer.getTable().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tableViewer);
+		// Make the selection available
+		getSite().setSelectionProvider(tableViewer);
+	}
+
+	/**
+	 * Initialize fields.
+	 */
+	public void initializeFields() {
+		if (this.queryindex != null) {
+
+			if (queryindex.getPartition() != null)
+				setPartName(queryindex.getPartition().getName()
+						+ ": " + queryindex.getName()); //$NON-NLS-1$
+			else
+				setPartName(queryindex.getCorpus().getName()
+						+ ": " + queryindex.getName()); //$NON-NLS-1$
+			queryWidget.setFocus();
+
+			queryindex.sortLines(SortMode.FREQUNIT, true);
+
+			fillDisplayArea(0, NLignePPageSpinner.getSelection());
+		} else if (this.corpus != null) {
+			// no query
+			queryWidget.setText(""); //$NON-NLS-1$
+
+			if (partition != null) {
+				setPartName(partition.getName());
+			} else {
+				setPartName(corpus.getName());
+			}
+			queryWidget.setFocus();
+		} else {
+			System.err.println(IndexUIMessages.IndexEditor_22);
+		}
+	}
+
+	/**
+	 * Fill display area.
+	 * 
+	 * @param from
+	 *            the from
+	 * @param to
+	 *            the to
+	 */
+	public void fillDisplayArea(int from, int to) {
+		// System.out.println("call fill from "+from+" to "+to);
+		from = Math.max(from, 0);
+		to = Math.min(to, queryindex.getV());
+		ArrayList<QueryIndexLine> lines = null;
+		if (queryindex.getV() > 0) {
+			lines = queryindex.getLines(from, to);
+		} else
+			lines = new ArrayList<QueryIndexLine>();
+
+		navigationArea.setInfoLineText("" + (from + 1), //$NON-NLS-1$
+				"-" + (to) + " / " + queryindex.getV()); //$NON-NLS-1$ //$NON-NLS-2$
+		navigationArea.setPreviousEnabled(from > 0);
+		navigationArea.setFirstEnabled(from > 0);
+		navigationArea.setNextEnabled(to < queryindex.getV() - 1);
+		navigationArea.setLastEnabled(to < queryindex.getV() - 1);
+
+		lFminInfo.setText(IndexUIMessages.IndexEditor_25 + queryindex.getFmin());
+		lFmaxInfo.setText(IndexUIMessages.IndexEditor_26 + queryindex.getFmax());
+		lTInfo.setText(IndexUIMessages.IndexEditor_27 + queryindex.getT());
+		lVInfo.setText(IndexUIMessages.IndexEditor_28 + queryindex.getV());
+
+		lVInfo.getParent().layout();
+
+		unitColumn.setText(Messages.QueryIndexEditor_10);
+
+		viewer.setInput(lines);
+		viewer.refresh();
+		// System.out.println("table refreshed from "+from+" to "+to+" with : "+lines);
+		topLine = from;
+		bottomLine = to;
+		for (TableColumn col : viewer.getTable().getColumns()) {
+			col.pack();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.EditorPart#getTitleToolTip()
+	 */
+	@Override
+	public String getTitleToolTip() {
+		if (queryindex != null) {
+			String str = Messages.QueryIndexEditor_11;
+
+			return str;
+		}
+		return ""; //$NON-NLS-1$
+	}
+
+	/**
+	 * Sets the focus.
+	 * 
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		this.queryWidget.setFocus();
+		StatusLine.setMessage(IndexUIMessages.IndexEditor_29);
+	}
+
+	/**
+	 * Gets the corpus.
+	 * 
+	 * @return the corpus
+	 */
+	public Corpus getCorpus() {
+		return this.corpus;
+	}
+
+	/**
+	 * Gets the partition.
+	 * 
+	 * @return the partition
+	 */
+	public Partition getPartition() {
+		return this.partition;
+	}
+
+	/**
+	 * Sets the focus.
+	 * 
+	 * @param query
+	 *            the new focus
+	 */
+	public void setFocus(String query) {
+		this.queryWidget.setText(query);
+	}
+
+	/**
+	 * Gets the index.
+	 * 
+	 * @return the index
+	 */
+	public Object getIndex() {
+		return this.queryindex;
+	}
+
+	@Override
+	public void updateResultFromEditor() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateEditorFromResult(boolean update) {
+		// TODO Auto-generated method stub
+		
+	}
+}

Property changes on: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/queryindex/QueryIndexEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/input/QueryIndexEditorInput.java
===================================================================
--- tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/input/QueryIndexEditorInput.java	(revision 0)
+++ tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/input/QueryIndexEditorInput.java	(revision 673)
@@ -0,0 +1,187 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.editors.input;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.txm.functions.queryindex.QueryIndex;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+
+// TODO: Auto-generated Javadoc
+/**
+ * provides the corpus, partition or the already compute QueryIndex.
+ *
+ * @author mdecorde
+ */
+public class QueryIndexEditorInput implements IEditorInput {
+	
+	/** The corpus. */
+	private Corpus corpus;
+	
+	/** The index. */
+	private QueryIndex qindex;
+	
+	/** The partition. */
+	private Partition partition;
+
+	/**
+	 * Instantiates a new index editor input.
+	 *
+	 * @param corpus the corpus
+	 */
+	public QueryIndexEditorInput(final Corpus corpus) {
+		super();
+		this.corpus = corpus;
+		this.partition = null;
+		this.qindex = null;
+	}
+
+	/**
+	 * Instantiates a new index editor input.
+	 *
+	 * @param index the index
+	 */
+	public QueryIndexEditorInput(final QueryIndex qindex) {
+		super();
+		this.corpus = qindex.getCorpus();
+		this.partition = qindex.getPartition();
+		this.qindex = qindex;
+	}
+
+	/**
+	 * Instantiates a new index editor input.
+	 *
+	 * @param partition the partition
+	 */
+	public QueryIndexEditorInput(Partition partition) {
+		super();
+		this.corpus = partition.getCorpus();
+		this.partition = partition;
+		this.qindex = null;
+	}
+
+	/**
+	 * Exists.
+	 *
+	 * @return true, if successful
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+
+	/**
+	 * Gets the image descriptor.
+	 *
+	 * @return the image descriptor
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return null;
+	}
+
+	/**
+	 * Gets the name.
+	 *
+	 * @return the name
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		if (partition != null)
+			return partition.getName();
+		else
+			return corpus.getName();
+	}
+
+	/**
+	 * Gets the persistable.
+	 *
+	 * @return the persistable
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/**
+	 * Gets the tool tip text.
+	 *
+	 * @return the tool tip text
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/**
+	 * Gets the adapter.
+	 *
+	 * @param arg0 the arg0
+	 * @return the adapter
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
+	public Object getAdapter(Class arg0) {
+		return null;
+	}
+
+	/**
+	 * Gets the corpus.
+	 *
+	 * @return the corpus
+	 */
+	public Corpus getCorpus() {
+		return corpus;
+	}
+
+	/**
+	 * Gets the partition.
+	 *
+	 * @return the partition, null if Index computed with a corpus
+	 */
+	public Partition getPartition() {
+		return partition;
+	}
+
+	/**
+	 * Gets the index.
+	 *
+	 * @return the index
+	 */
+	public QueryIndex getQueryIndex() {
+		return qindex;
+	}
+}

Property changes on: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/editors/input/QueryIndexEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/link/QueryIndexToLexicalTable.java
===================================================================
--- tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/link/QueryIndexToLexicalTable.java	(revision 0)
+++ tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/link/QueryIndexToLexicalTable.java	(revision 673)
@@ -0,0 +1,138 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.commands.link;
+
+import java.util.ArrayList;
+
+import org.apache.batik.util.gui.CSSMediaPanel.Dialog;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.dialogs.ListSelectionDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.functions.queryindex.QueryIndex;
+import org.txm.lexicaltable.core.functions.LexicalTable;
+import org.txm.rcp.RCPMessages;
+import org.txm.rcp.StatusLine;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.Property;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class IndexToLexicalTable.
+ */
+public class QueryIndexToLexicalTable extends AbstractHandler {
+
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+	private static Shell shell;
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		// TODO Auto-generated method stub
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+		.getShell();
+		return null;
+	}
+
+	/**
+	 * Builds the lexical table.
+	 *
+	 * @param qindex the voc
+	 * @param from the from
+	 * @param to the to
+	 * @return true, if successful
+	 */
+	public boolean buildLexicalTable(QueryIndex qindex, int from, int to) {
+		LexicalTable table;
+		Partition partition;
+		Property property;
+
+		if (!qindex.isComputedWithPartition()) {
+			
+			System.out.println(RCPMessages.IndexToLexicalTable_0);
+			StatusLine.setMessage(RCPMessages.IndexToLexicalTable_0);
+			return false;
+		}
+
+		System.out.println(RCPMessages.ComputeLexicalTable_3);
+		ArrayList<String> choices = new ArrayList<String>();
+		choices.add(RCPMessages.ComputeLexicalTable_16);
+		choices.add(RCPMessages.ComputeLexicalTable_12);
+		ListSelectionDialog dialog = new ListSelectionDialog(shell, 
+				choices, new ArrayContentProvider(), new LabelProvider(), 
+				RCPMessages.ComputeLexicalTable_13);
+		
+		int ret = dialog.open();
+		//System.out.println("ret= "+ret);
+		if (ret == Dialog.OK_OPTION) {
+			
+		} else {
+			return false;
+		}
+		
+		// TODO: fix line 119
+//		try {
+//			table = LexicalTableImpl.createLexicalTableImpl(voc, QuantitativeDataStructureImpl
+//					.createSymbole(LexicalTableImpl.class));
+//			partition = voc.getPartition();
+//			property = voc.getCorpus().getProperties().get(0);
+//		} catch (Exception e) {
+//			org.txm.rcp.utils.Logger.printStackTrace(e);
+//			return false;
+//		}
+//
+//		try {
+//			IWorkbenchWindow window = PlatformUI.getWorkbench()
+//					.getActiveWorkbenchWindow();
+//			IWorkbenchPage page = window.getActivePage();
+//			LexicalTableEditorInput editorInput = new LexicalTableEditorInput(
+//					table, partition, property);
+//			StatusLine.setMessage(RCPMessages.ComputeLexicalTable_10);
+//			page
+//					.openEditor(editorInput,
+//							"org.txm.rcp.editors.lexicaltable.LexicalTableEditor"); //$NON-NLS-1$
+//		} catch (PartInitException e) {
+//			org.txm.rcp.utils.Logger.printStackTrace(e);
+//		} 
+
+		return false;
+	}
+
+}

Property changes on: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/link/QueryIndexToLexicalTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/link/package.html
===================================================================
--- tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/link/package.html	(revision 0)
+++ tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/link/package.html	(revision 673)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Commands which create link between 2 textometry function</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/link/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/function/ComputeQueryIndex.java
===================================================================
--- tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/function/ComputeQueryIndex.java	(revision 0)
+++ tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/function/ComputeQueryIndex.java	(revision 673)
@@ -0,0 +1,104 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.commands.function;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.index.rcp.messages.IndexUIMessages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.editors.input.QueryIndexEditorInput;
+import org.txm.rcp.editors.queryindex.QueryIndexEditor;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * open the Index Editor 
+ * @author mdecorde.
+ */
+public class ComputeQueryIndex extends AbstractHandler {
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.commands.function.ComputeQueryIndex"; //$NON-NLS-1$
+
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		Log.info("Compute QueryIndex: start");
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		Object s = selection.getFirstElement();
+		if (s instanceof Corpus) {
+			final Corpus corpus = (Corpus) s;
+			openEditor(corpus);
+		} else if (s instanceof Partition) {
+			final Partition partition = (Partition) s;
+			openEditor(partition);
+		} else {
+			Log.severe("Can not compute QueryIndex with: "+s);
+		}
+
+		return null;
+	}
+	
+	public static void openEditor(Corpus corpus) {
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		QueryIndexEditorInput editorInput = new QueryIndexEditorInput(corpus);
+		try {
+			StatusLine.setMessage(IndexUIMessages.ComputeIndex_0);
+			QueryIndexEditor voceditor = (QueryIndexEditor) page
+					.openEditor(editorInput,QueryIndexEditor.ID);
+			voceditor.initializeFields();
+		} catch (Exception e) {
+			Log.printStackTrace(e);
+		}
+	}
+	
+	public static void openEditor(Partition partition) {
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		QueryIndexEditorInput editorInput = new QueryIndexEditorInput(partition);
+		try {
+			StatusLine.setMessage(IndexUIMessages.ComputeIndex_0);
+			QueryIndexEditor voceditor = (QueryIndexEditor) page
+					.openEditor(editorInput, QueryIndexEditor.ID);
+			voceditor.initializeFields();
+		} catch (Exception e) {
+			Log.printStackTrace(e);
+		}
+	}
+}

Property changes on: tmp/org.txm.queryindex.rcp/src/org/txm/rcp/commands/function/ComputeQueryIndex.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.queryindex.rcp/plugin.xml
===================================================================
--- tmp/org.txm.queryindex.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.queryindex.rcp/plugin.xml	(revision 673)
@@ -5,10 +5,10 @@
          point="org.eclipse.ui.editors">
          
          <editor
-            class="org.txm.rcpapplication.editors.queryindex.QueryIndexEditor"
+            class="org.txm.rcp.editors.queryindex.QueryIndexEditor"
             default="false"
             icon="icons/functions/QueryIndex.png"
-            id="org.txm.rcpapplication.editors.queryindex.QueryIndexEditor"
+            id="org.txm.rcp.editors.queryindex.QueryIndexEditor"
             name="QueryIndex">
       </editor>
          </extension>
@@ -26,9 +26,9 @@
  <extension
          point="org.eclipse.ui.commands">
           <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.function.ComputeQueryIndex"
-            id="org.txm.rcpapplication.commands.function.ComputeQueryIndex"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.function.ComputeQueryIndex"
+            id="org.txm.rcp.commands.function.ComputeQueryIndex"
             name="QueryIndex">
       </command>
         </extension>
@@ -37,9 +37,9 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools?before=org.txm.rcpapplication.separator1">
+            locationURI="toolbar:org.txm.rcp.toolbartools?before=org.txm.rcp.separator1">
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeQueryIndex"
+               commandId="org.txm.rcp.commands.function.ComputeQueryIndex"
                icon="icons/functions/QueryIndex.png"
                label="QueryIndex"
                style="push">
@@ -58,9 +58,9 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeQueryIndex"
+               commandId="org.txm.rcp.commands.function.ComputeQueryIndex"
                icon="icons/functions/QueryIndex.png"
                label="QueryIndex"
                style="push">
@@ -77,7 +77,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeQueryIndexOfTexts"
+               commandId="org.txm.rcp.commands.function.ComputeQueryIndexOfTexts"
                icon="icons/functions/QueryIndexOfTexts.png"
                style="push">
             <visibleWhen
@@ -93,7 +93,7 @@
       <menuContribution
             locationURI="menu:menu.tools">
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeQueryIndex"
+               commandId="org.txm.rcp.commands.function.ComputeQueryIndex"
                icon="icons/functions/QueryIndex.png"
                label="QueryIndex"
                style="push">
@@ -110,7 +110,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeQueryIndexOfTexts"
+               commandId="org.txm.rcp.commands.function.ComputeQueryIndexOfTexts"
                icon="icons/functions/QueryIndexOfTexts.png"
                style="push">
             <visibleWhen
@@ -126,11 +126,11 @@
       <menuContribution
             locationURI="menu:menu.help.plugins">
          <command
-               commandId="org.txm.rcpapplication.commands.OpenBrowser"
+               commandId="org.txm.rcp.commands.OpenBrowser"
                label="QueryIndex"
                style="push">
             <parameter
-                  name="org.txm.rcpapplication.commands.commandParameter2"
+                  name="org.txm.rcp.commands.commandParameter2"
                   value="https://groupes.renater.fr/wiki/txm-users/public/extensions#QueryIndex">
             </parameter>
          </command>
Index: tmp/org.txm.queryindex.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.queryindex.rcp/META-INF/MANIFEST.MF	(revision 672)
+++ tmp/org.txm.queryindex.rcp/META-INF/MANIFEST.MF	(revision 673)
@@ -18,10 +18,10 @@
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.txm.functions.queryindex,
- org.txm.rcpapplication.commands.function;x-friends:="org.txm.rcpapplication,org.txm.toolbox",
- org.txm.rcpapplication.commands.link,
- org.txm.rcpapplication.editors.input,
- org.txm.rcpapplication.editors.queryindex,
+ org.txm.rcp.commands.function,
+ org.txm.rcp.commands.link,
+ org.txm.rcp.editors.input,
+ org.txm.rcp.editors.queryindex,
  queryindexrcp,
  queryindexrcp.actions,
  queryindexrcp.adapters
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette1.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette1.java	(revision 672)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette1.java	(revision 673)
@@ -51,7 +51,7 @@
  */
 public class ComputeRecette1 extends AbstractHandler {
 
-	public static final String ID = "org.txm.rcpapplication.commands.function.ComputeTSIndex"; //$NON-NLS-1$
+	public static final String ID = "org.txm.rcp.commands.function.ComputeTSIndex"; //$NON-NLS-1$
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette2.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette2.java	(revision 672)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette2.java	(revision 673)
@@ -56,7 +56,7 @@
  */
 public class ComputeRecette2 extends AbstractHandler {
 
-	public static final String ID = "org.txm.rcpapplication.commands.function.ComputeTSIndex"; //$NON-NLS-1$
+	public static final String ID = "org.txm.rcp.commands.function.ComputeTSIndex"; //$NON-NLS-1$
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeTSIndex.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeTSIndex.java	(revision 672)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeTSIndex.java	(revision 673)
@@ -51,7 +51,7 @@
  */
 public class ComputeTSIndex extends AbstractHandler {
 
-	public static final String ID = "org.txm.rcpapplication.commands.function.ComputeTSIndex"; //$NON-NLS-1$
+	public static final String ID = "org.txm.rcp.commands.function.ComputeTSIndex"; //$NON-NLS-1$
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeTIGERSearch.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeTIGERSearch.java	(revision 672)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeTIGERSearch.java	(revision 673)
@@ -49,7 +49,7 @@
 public class ComputeTIGERSearch extends AbstractHandler {
 
 	/** The ID. */
-	public static String ID = "org.txm.rcpapplication.commands.function.ComputeTIGERSearch"; //$NON-NLS-1$
+	public static String ID = "org.txm.rcp.commands.function.ComputeTIGERSearch"; //$NON-NLS-1$
 
 	/** The selection. */
 	private IStructuredSelection selection;
Index: tmp/org.txm.tigersearch.rcp/plugin.xml
===================================================================
--- tmp/org.txm.tigersearch.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.tigersearch.rcp/plugin.xml	(revision 673)
@@ -73,11 +73,11 @@
       <menuContribution
             locationURI="menu:menu.help.plugins">
          <command
-               commandId="org.txm.rcpapplication.commands.OpenBrowser"
+               commandId="org.txm.rcp.commands.OpenBrowser"
                label="TIGERSearch"
                style="push">
             <parameter
-                  name="org.txm.rcpapplication.commands.commandParameter2"
+                  name="org.txm.rcp.commands.commandParameter2"
                   value="https://groupes.renater.fr/wiki/txm-users/public/extensions#tigersearch">
             </parameter>
          </command>
@@ -120,7 +120,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="org.txm.tigersearch.commands.ComputeTIGERSearch"
                icon="icons/functions/TS.png"
@@ -155,7 +155,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="org.txm.tigersearch.commands.ComputeTIGERSearch"
                icon="icons/functions/TS.png"
Index: tmp/org.txm.cql2lsa.rcp/plugin.xml
===================================================================
--- tmp/org.txm.cql2lsa.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.cql2lsa.rcp/plugin.xml	(revision 673)
@@ -5,27 +5,27 @@
  <extension
          point="org.eclipse.ui.commands">
           <command
-                categoryId="org.txm.rcpapplication.category.txm"
-                defaultHandler="org.txm.rcpapplication.commands.function.ComputeExpI"
-                id="org.txm.rcpapplication.commands.function.ComputeQueryIndexOfTexts"
+                categoryId="org.txm.rcp.category.txm"
+                defaultHandler="org.txm.rcp.commands.function.ComputeExpI"
+                id="org.txm.rcp.commands.function.ComputeQueryIndexOfTexts"
                 name="QueryIndexOfTexts">
           </command>
           <command
-                categoryId="org.txm.rcpapplication.category.txm"
-                defaultHandler="org.txm.rcpapplication.commands.function.ComputeValuesOfQuery"
-                id="org.txm.rcpapplication.commands.function.ComputeValuesOfQuery"
+                categoryId="org.txm.rcp.category.txm"
+                defaultHandler="org.txm.rcp.commands.function.ComputeValuesOfQuery"
+                id="org.txm.rcp.commands.function.ComputeValuesOfQuery"
                 name="ValuesOfQuery">
           </command>
           <command
-                categoryId="org.txm.rcpapplication.category.txm"
-                defaultHandler="org.txm.rcpapplication.commands.function.ComputeExpII"
-                id="org.txm.rcpapplication.commands.function.ComputeExpIIA"
+                categoryId="org.txm.rcp.category.txm"
+                defaultHandler="org.txm.rcp.commands.function.ComputeExpII"
+                id="org.txm.rcp.commands.function.ComputeExpIIA"
                 name="ExpIIA">
           </command>
           <command
-                categoryId="org.txm.rcpapplication.category.txm"
-                defaultHandler="org.txm.rcpapplication.commands.function.CreateContextSubcorpus"
-                id="org.txm.rcpapplication.commands.function.CreateQueriesContextSubcorpus"
+                categoryId="org.txm.rcp.category.txm"
+                defaultHandler="org.txm.rcp.commands.function.CreateContextSubcorpus"
+                id="org.txm.rcp.commands.function.CreateQueriesContextSubcorpus"
                 name="ContextSubcorpus">
           </command>
         </extension>
@@ -34,9 +34,9 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools?before=org.txm.rcpapplication.separator1">
+            locationURI="toolbar:org.txm.rcp.toolbartools?before=org.txm.rcp.separator1">
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeQueryIndexOfTexts"
+               commandId="org.txm.rcp.commands.function.ComputeQueryIndexOfTexts"
                label="Exp I"
                style="push">
             <visibleWhen
@@ -49,7 +49,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeValuesOfQuery"
+               commandId="org.txm.rcp.commands.function.ComputeValuesOfQuery"
                label="ValuesOfQuery"
                style="push">
             <visibleWhen
@@ -62,7 +62,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.function.CreateQueriesContextSubcorpus"
+               commandId="org.txm.rcp.commands.function.CreateQueriesContextSubcorpus"
                label="ContextSubcorpus"
                style="push">
             <visibleWhen
@@ -75,7 +75,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeExpIIA"
+               commandId="org.txm.rcp.commands.function.ComputeExpIIA"
                label="Exp II"
                style="push">
             <visibleWhen
@@ -90,9 +90,9 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeQueryIndexOfTexts"
+               commandId="org.txm.rcp.commands.function.ComputeQueryIndexOfTexts"
                icon="icons/functions/QueryIndexOfTexts.png"
                style="push">
             <visibleWhen
@@ -108,7 +108,7 @@
       <menuContribution
             locationURI="menu:menu.tools">
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeQueryIndexOfTexts"
+               commandId="org.txm.rcp.commands.function.ComputeQueryIndexOfTexts"
                icon="icons/functions/QueryIndexOfTexts.png"
                style="push">
             <visibleWhen
@@ -124,11 +124,11 @@
       <menuContribution
             locationURI="menu:menu.help.plugins">
          <command
-               commandId="org.txm.rcpapplication.commands.OpenBrowser"
+               commandId="org.txm.rcp.commands.OpenBrowser"
                label="CQL2LSA"
                style="push">
             <parameter
-                  name="org.txm.rcpapplication.commands.commandParameter2"
+                  name="org.txm.rcp.commands.commandParameter2"
                   value="https://groupes.renater.fr/wiki/txm-users/public/extensions#CQL2LSA">
             </parameter>
          </command>
Index: tmp/org.txm.cql2lsa.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.cql2lsa.rcp/META-INF/MANIFEST.MF	(revision 672)
+++ tmp/org.txm.cql2lsa.rcp/META-INF/MANIFEST.MF	(revision 673)
@@ -17,5 +17,5 @@
 Bundle-ActivationPolicy: lazy
 Export-Package: cql2lsarcp,
  org.txm.functions.cql2lsa,
- org.txm.rcpapplication.commands.function
+ org.txm.rcp.commands.function
 Bundle-Vendor: Textometrie.org
Index: tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeExpI.java
===================================================================
--- tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeExpI.java	(revision 0)
+++ tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeExpI.java	(revision 673)
@@ -0,0 +1,214 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.commands.function;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.functions.cql2lsa.ExpI;
+import org.txm.functions.cql2lsa.QueryIndexLine;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * open the Index Editor 
+ * @author mdecorde.
+ */
+public class ComputeExpI extends AbstractHandler {
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.commands.function.ComputeQueryIndexOfTexts"; //$NON-NLS-1$
+
+	/** The selection. */
+	private IStructuredSelection selection;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		Log.info("Compute QueryIndexOfTexts: start");
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		Object s = selection.getFirstElement();
+		if (s instanceof Corpus) {
+			Corpus corpus = (Corpus) s;
+			try {
+				File propFile = null;
+				if (LastOpened.getFile(ID) != null)
+					propFile = new File(LastOpened.getFolder(ID));
+
+				FileDialog dialog = new FileDialog(HandlerUtil.getActiveShell(event), SWT.OPEN);
+				String[] exts = { "*.properties" }; //$NON-NLS
+				dialog.setFilterExtensions(exts);
+				if (propFile != null) {
+					dialog.setFilterPath(propFile.getParent());
+					dialog.setFileName(propFile.getName());
+				}
+				String path = dialog.open();
+				if (path != null) {
+					compute(corpus, new File(path));
+				}
+			} catch(Exception e) {
+				e.printStackTrace();
+			}
+		} else {
+			System.out.println ("Can not compute QueryIndexOfTexts with: "+s);
+		}
+
+		return null;
+	}
+
+	public static void compute(final Corpus corpus, final File propFile) {
+		final String title = "Compute QueryIndexOfText with "+corpus +" corpus properties file: "+propFile;
+		JobHandler jobhandler = new JobHandler(title) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				JobsTimer.start();
+				try {
+					System.out.println(title);
+					this.runInit(monitor);
+					
+					monitor.beginTask("Counting", 100);
+					
+					ExpI qiot = new ExpI(corpus);
+					qiot.setCurrentMonitor(this);
+					qiot.addLinesFromFile(propFile);
+
+					//					qiot.addLine("je", new Query("[word=\"je\"]"));
+					//					qiot.addLine("tu", new Query("[word=\"tu\"]"));
+					//					qiot.addLine("il", new Query("[word=\"il\"]"));
+					//					qiot.addLine("elle", new Query("[word=\"elle\"]"));
+					//					qiot.addLine("on", new Query("[word=\"on\"]"));
+					//					qiot.addLine("nous", new Query("[word=\"nous\"]"));
+					//					qiot.addLine("vous", new Query("[word=\"vous\"]"));
+					//					qiot.addLine("ils", new Query("[word=\"ils\"]"));
+					//					qiot.addLine("elles", new Query("[word=\"elles\"]"));
+					//					qiot.addLine("celui", new Query("[word=\"celui\"]"));
+					//					qiot.addLine("celle", new Query("[word=\"celle\"]"));
+					//					qiot.addLine("ceux", new Query("[word=\"ceux\"]"));
+					//					qiot.addLine("celles", new Query("[word=\"celles\"]"));
+					//					qiot.addLine("eux", new Query("[word=\"eux\"]"));
+					// "je|tu|il|elle|on|nous|vous|ils|elles|celui|celle|ceux|celles|eux"
+
+					File resultDir = new File(TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, TBXPreferences.PREFERENCES_NODE), "results");
+					
+					writingLDAFiles(resultDir, qiot, monitor);
+				} catch (Exception e) {
+					System.out.println("Error while computing: "+e);
+					Log.printStackTrace(e);
+					return Status.CANCEL_STATUS;
+				}
+				JobsTimer.stopAndPrint();
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.schedule();
+	}
+
+	public static void writingLDAFiles(File resultDir, ExpI qiot, IProgressMonitor monitor) throws IOException {
+		File resultFile = new File(resultDir, "doc_word_freq.txt");
+		File lexiqueFile = new File(resultDir, "lexique.txt");
+		StringBuffer buffer = new StringBuffer();
+		OutputStreamWriter output = new OutputStreamWriter(new FileOutputStream(resultFile) , "UTF-8"); //$NON-NLS-1$
+		
+		monitor.beginTask("Writing 'doc_word_freq.txt'", 100000);
+		
+		Collection<QueryIndexLine> lines = qiot.getLines();
+		
+		List<String> texts = qiot.getTextNames();
+		//System.out.println("texts: "+texts.size());
+		int delta = 100000 / texts.size();
+		for (int i = 0 ; i < texts.size() ; i++) {
+			int noDoc = i+1;
+			int noLine = 1;
+			for (QueryIndexLine line : lines) {
+				int f = line.getFreqs()[i];
+				if (f > 0)
+					buffer.append(""+noDoc+"\t"+noLine+"\t"+f+"\n");
+				noLine++;
+			}
+			
+			monitor.worked(delta);
+		}
+		
+		output.write(buffer.toString());
+		output.flush();
+		output.close();
+		
+		output = new OutputStreamWriter(new FileOutputStream(lexiqueFile) , "UTF-8"); //$NON-NLS-1$
+		for (QueryIndexLine line : lines) {
+			output.write(line.getName()+"\n");
+		}
+		output.close();
+		System.out.println("Result saved in "+resultFile+" and "+lexiqueFile);
+	}
+	
+	public static void writingMatrix(File resultDir, ExpI qiot, IProgressMonitor monitor) throws IOException {
+		File resultFile = new File(resultDir, "counts.csv");
+		OutputStreamWriter output = new OutputStreamWriter(new FileOutputStream(resultFile) , "UTF-8"); //$NON-NLS-1$
+		
+		monitor.beginTask("Writing Matrix", 100);
+		
+		Collection<QueryIndexLine> lines = qiot.getLines();
+		int delta = 1000 / lines.size();
+		//System.out.println("Number of lines: "+lines.size());
+		
+		output.write("Name\tQuery\tF\t"+StringUtils.join(qiot.getTextNames(), "\t")+"\n");
+		for (QueryIndexLine line : lines) {
+			String str = "";
+			for (int f : line.getFreqs()) str+="\t"+f;
+
+			output.write(line.getName()+"\t"+line.getQuery()+"\t"+line.getFrequency()+str+"\n");
+			output.flush();
+			monitor.worked(delta);
+		}
+		output.close();
+		System.out.println("Result saved in "+resultFile);
+	}
+}

Property changes on: tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeExpI.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeValuesOfQuery.java
===================================================================
--- tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeValuesOfQuery.java	(revision 0)
+++ tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeValuesOfQuery.java	(revision 673)
@@ -0,0 +1,191 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.commands.function;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.functions.cql2lsa.ValuesOfQuery;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.swt.widget.AssistedQueryWidget;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.utils.logger.Log;
+
+/**
+ * write result in file
+ * @author mdecorde.
+ */
+public class ComputeValuesOfQuery extends AbstractHandler {
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.commands.function.ComputeQueryIndex"; //$NON-NLS-1$
+
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		Log.info("Compute QueryIndex: start");
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof Corpus)) return null;
+
+		final Corpus corpus = (Corpus) s;
+		
+		CustomDialog dialog = new CustomDialog(HandlerUtil.getActiveShell(event), corpus);
+		if (dialog.open() == Dialog.CANCEL) return null;
+		final String sprop = dialog.getLemmaProperty();
+		final int fmin = dialog.getFMin();
+		final Query query = dialog.getQuery();
+		
+		System.out.println("Query="+query);
+		System.out.println("Fmin="+fmin);
+		System.out.println("Lemma property="+sprop);
+		
+		JobHandler jobhandler = new JobHandler("Compute Values for query '"+query+"'") {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				JobsTimer.start();
+				try {
+					Property prop = corpus.getProperty(sprop);
+					ValuesOfQuery result = new ValuesOfQuery(corpus, query, prop, fmin);
+					result.setCurrentMonitor(this);
+					result.compute(new File(System.getProperty("user.home"), "lemma_queries.properties"));
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+				JobsTimer.stopAndPrint();
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.schedule();
+		
+		
+		
+		return null;
+	}
+	
+	class CustomDialog extends Dialog {
+
+		Corpus corpus;
+		Text lemmaField;
+		Spinner spinner;
+		AssistedQueryWidget w;
+		int fmin = 10;
+		String lemmaproperty = "frlemma";
+		String q = "[frpos=\"N.*|ADJ|V.*\"  & frlemma!=\"@card@|être|avoir|faire|pouvoir|devoir|vouloir|falloir|aller|dire|savoir|c'.+|s'.+\"]";
+		
+		protected CustomDialog(Shell parentShell, Corpus corpus) {
+			super(parentShell);
+			this.corpus = corpus;
+		}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			parent.setLayout(new GridLayout(2, false));
+//			Label l = new Label(parent, SWT.NONE);
+//			l.setText("Lemma property");
+//			l.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+//			lemmaField = new Text(parent, SWT.BORDER);
+//			lemmaField.setText(lemmaproperty);
+			
+			Label l = new Label(parent, SWT.NONE);
+			l.setText("Query");
+			l.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+			w = new AssistedQueryWidget(parent, SWT.NONE, corpus);
+			w.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+			w.setText(q);
+			
+			l = new Label(parent, SWT.NONE);
+			l.setText("Fmin");
+			l.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+			spinner = new Spinner(parent, SWT.BORDER);
+			try {
+				spinner.setMaximum(corpus.getSize());
+			} catch (CqiClientException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			spinner.setMinimum(0);
+			spinner.setSelection(fmin);
+
+			return parent;
+		}
+		
+		public void okPressed() {
+			if (spinner != null)
+				fmin = spinner.getSelection();
+			if (w != null)
+				q = w.getQueryString();
+			if (lemmaField != null)
+				lemmaproperty = lemmaField.getText();
+			
+			super.okPressed();
+		}
+		
+		int getFMin() {
+			return fmin;
+		}
+		
+		String getLemmaProperty() {
+			return lemmaproperty;
+		}
+		
+		Query getQuery() {
+			return new Query(q);
+		}
+	}
+}

Property changes on: tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeValuesOfQuery.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeExpII.java
===================================================================
--- tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeExpII.java	(revision 0)
+++ tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeExpII.java	(revision 673)
@@ -0,0 +1,136 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.commands.function;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.functions.cql2lsa.ExpII;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.utils.logger.Log;
+
+/**
+ * write result in file
+ * @author mdecorde.
+ */
+public class ComputeExpII extends AbstractHandler {
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.commands.function.ComputeQueryIndex"; //$NON-NLS-1$
+
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		Log.info("Compute ExpIIA");
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof Corpus)) return null;
+		
+		final Corpus corpus = (Corpus) s;
+		System.out.println("Select lemma queries property file");
+		final File queriesFiles = getPropFile(event);
+		if (queriesFiles == null) return Status.CANCEL_STATUS;
+		System.out.println("Select keyword queries property file");
+		final File keywordFiles = getPropFile(event);
+		if (keywordFiles == null) return Status.CANCEL_STATUS;
+		final File resultDirectory = new File(System.getProperty("user.home"));
+		
+		JobHandler jobhandler = new JobHandler("Compute ExpII") {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				JobsTimer.start();
+				try {
+					this.runInit(monitor);
+					
+					ExpII result = new ExpII(corpus);
+					result.setCurrentMonitor(this);	
+					result.compute(queriesFiles, keywordFiles, resultDirectory);
+				} catch(Exception e) {
+					Log.printStackTrace(e);
+					return Status.CANCEL_STATUS;
+				}
+				JobsTimer.stopAndPrint();
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.schedule();
+		
+		return null;
+	}
+	
+	private File getResultDirectory(ExecutionEvent event) {
+		File dir = null;
+		if (LastOpened.getFile(ID) != null)
+			dir = new File(LastOpened.getFolder(ID));
+
+		DirectoryDialog dialog = new DirectoryDialog(HandlerUtil.getActiveShell(event), SWT.OPEN);
+		if (dir != null) {
+			dialog.setFilterPath(dir.getParent());
+		}
+		String path = dialog.open();
+		if (path == null) return null;
+		return new File(path);
+	}
+
+	public static File getPropFile(ExecutionEvent event) {
+		File propFile = null;
+		if (LastOpened.getFile(ID) != null)
+			propFile = new File(LastOpened.getFolder(ID));
+
+		FileDialog dialog = new FileDialog(HandlerUtil.getActiveShell(event), SWT.OPEN);
+		
+		String[] exts = { "*.properties" }; //$NON-NLS
+		dialog.setFilterExtensions(exts);
+		if (propFile != null) {
+			dialog.setFilterPath(propFile.getParent());
+			dialog.setFileName(propFile.getName());
+		}
+		String path = dialog.open();
+		if (path == null) return null;
+		return new File(path);
+	}
+}

Property changes on: tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/ComputeExpII.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/CreateContextSubcorpus.java
===================================================================
--- tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/CreateContextSubcorpus.java	(revision 0)
+++ tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/CreateContextSubcorpus.java	(revision 673)
@@ -0,0 +1,148 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.commands.function;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.functions.cql2lsa.ContextSubcorpus;
+import org.txm.functions.cql2lsa.ExpII;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.commands.RestartTXM;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Subcorpus;
+import org.txm.utils.logger.Log;
+
+/**
+ * write result in file
+ * @author mdecorde.
+ */
+public class CreateContextSubcorpus extends AbstractHandler {
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.commands.function.ComputeQueryIndex"; //$NON-NLS-1$
+
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		Log.info("Compute QueryIndex: start");
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof Corpus)) return null;
+
+	
+		final Corpus corpus = (Corpus) s;
+		IInputValidator validator = new IInputValidator() {
+			@Override
+			public String isValid(String newText) {
+				try {
+					Integer.parseInt(newText);
+				} catch (Exception e) {
+					return "Input string is malformed: '"+newText+"'";
+				}
+				return null;
+			}
+		};
+
+		
+		final File keywordFile = getPropFile(event);
+		if (keywordFile == null) return null;
+		
+		InputDialog dialog = new InputDialog(HandlerUtil.getActiveShell(event), "Context size", "Enter the context size", "10", validator);
+		if (dialog.open() == Dialog.CANCEL) return null;
+		final int size = Math.max(Integer.parseInt(dialog.getValue()), 1);
+		
+		JobHandler jobhandler = new JobHandler("Compute ExpIIA") {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				JobsTimer.start();
+				try {
+					final ContextSubcorpus sub = new ContextSubcorpus(corpus, keywordFile, size);
+					sub.setCurrentMonitor(this);
+					sub.compute(this);
+					Subcorpus subcorpus = sub.getSubcorpus();
+					if (subcorpus != null) {
+						syncExec(new Runnable() {
+							@Override
+							public void run() {
+								CorporaView.refresh();
+								CorporaView.expand(corpus);
+							}
+						});
+					}
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+				JobsTimer.stopAndPrint();
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.schedule();
+		
+		return null;
+	}
+	
+	public static File getPropFile(ExecutionEvent event) {
+		File propFile = null;
+		if (LastOpened.getFile(ID) != null)
+			propFile = new File(LastOpened.getFolder(ID));
+
+		FileDialog dialog = new FileDialog(HandlerUtil.getActiveShell(event), SWT.OPEN);
+		
+		String[] exts = { "*.properties" }; //$NON-NLS
+		dialog.setFilterExtensions(exts);
+		if (propFile != null) {
+			dialog.setFilterPath(propFile.getParent());
+			dialog.setFileName(propFile.getName());
+		}
+		String path = dialog.open();
+		if (path == null) return null;
+		return new File(path);
+	}
+}

Property changes on: tmp/org.txm.cql2lsa.rcp/src/org/txm/rcp/commands/function/CreateContextSubcorpus.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/editors/EditionPanel.java
===================================================================
--- tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/editors/EditionPanel.java	(revision 672)
+++ tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/editors/EditionPanel.java	(revision 673)
@@ -250,7 +250,7 @@
 		File functionsFile = null;
 		try {
 
-			Bundle bundle = Platform.getBundle("SynopticEditorRCP");
+			Bundle bundle = Platform.getBundle("org.txm.synopticeditor.rcp");
 			URL fileURL = bundle.getEntry("res/js/functions.js");
 			URL r = FileLocator.resolve(fileURL);
 			Log.info("Load JS functions from: "+r);
Index: tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/preferences/SynopticEditionPreferences.java
===================================================================
--- tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/preferences/SynopticEditionPreferences.java	(revision 672)
+++ tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/preferences/SynopticEditionPreferences.java	(revision 673)
@@ -8,11 +8,11 @@
 
 	public static String PREFERENCES_NODE = "org.txm.synopticedition.rcp.synoptic";
 	
-	public static String FAST_HIGHLIGHT = "org.txm.synopticedition.rcp.synoptic.slow_highlight";
+	public static String FAST_HIGHLIGHT = "fast_highlight";
 
 	@Override
 	public void initializeDefaultPreferences() {
 		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
-		preferences.putBoolean(FAST_HIGHLIGHT, false);
+		preferences.putBoolean(FAST_HIGHLIGHT, true);
 	}
 }
Index: tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/preferences/SynopticEditionPreferencePage.java
===================================================================
--- tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/preferences/SynopticEditionPreferencePage.java	(revision 672)
+++ tmp/org.txm.synopticeditor.rcp/src/org/txm/synopticedition/rcp/preferences/SynopticEditionPreferencePage.java	(revision 673)
@@ -11,7 +11,7 @@
 implements IWorkbenchPreferencePage {
 	ScopedPreferenceStore preferences;
 
-	private BooleanFieldEditor slow_highlight;
+	private BooleanFieldEditor fast_highlight;
 	
 	
 	public SynopticEditionPreferencePage() {
@@ -19,7 +19,7 @@
 		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
 				Application.PLUGIN_ID);
 		setPreferenceStore(preferences);
-		setTitle("Analec");
+		setTitle("Edition");
 	}
 	
 	@Override
@@ -27,8 +27,8 @@
 
 	@Override
 	protected void createFieldEditors() {
-		slow_highlight = new BooleanFieldEditor(SynopticEditionPreferences.FAST_HIGHLIGHT,
+		fast_highlight = new BooleanFieldEditor(SynopticEditionPreferences.FAST_HIGHLIGHT,
 				"Enable fast word highlight", getFieldEditorParent());
-		addField(slow_highlight);
+		addField(fast_highlight);
 	}
 }
Index: tmp/org.txm.synopticeditor.rcp/build.properties
===================================================================
--- tmp/org.txm.synopticeditor.rcp/build.properties	(revision 672)
+++ tmp/org.txm.synopticeditor.rcp/build.properties	(revision 673)
@@ -1,7 +1,6 @@
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
-               .,\
                plugin.xml,\
                icons/,\
-               OSGI-INF/l10n/bundle.properties
+               OSGI-INF/l10n/bundle.properties,\
+               res/
Index: tmp/org.txm.synopticeditor.rcp/.classpath
===================================================================
--- tmp/org.txm.synopticeditor.rcp/.classpath	(revision 672)
+++ tmp/org.txm.synopticeditor.rcp/.classpath	(revision 673)
@@ -7,5 +7,6 @@
 		</accessrules>
 	</classpathentry>
 	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="res"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizerUI.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizerUI.groovy	(revision 672)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizerUI.groovy	(revision 673)
@@ -22,8 +22,8 @@
 		super(new FlowLayout());
 		File userDir = new File(System.getProperty("user.home"))
 		File srcDir = new File(userDir, "workspace43/org.txm.rcp/src/main/java")
-		File propFile = new File(srcDir, "org/txm/rcpapplication/messages.properties")
-		File messageFile = new File(srcDir, "org/txm/rcpapplication/Messages.java")
+		File propFile = new File(srcDir, "org/txm/rcp/messages.properties")
+		File messageFile = new File(srcDir, "org/txm/rcp/Messages.java")
 
 		println userDir
 		println srcDir
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/FixExternalizedDuplicatedStrings.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/FixExternalizedDuplicatedStrings.groovy	(revision 672)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/FixExternalizedDuplicatedStrings.groovy	(revision 673)
@@ -10,12 +10,12 @@
 class FixExternalizedDuplicatedStrings {
 	
 	static main(args) {
-//		File propertyFile = new File("/home/mdecorde/Bureau/Experiences/rcpapplication/messages.properties");
-//		File messageClass = new File("/home/mdecorde/Bureau/Experiences/rcpapplication/Messages.java");
-//		File srcdirectory = new File("/home/mdecorde/Bureau/Experiences/rcpapplication");
-		File propertyFile = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcpapplication/messages.properties");
-		File messageClass = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcpapplication/Messages.java");
-		File srcdirectory = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcpapplication");
+//		File propertyFile = new File("/home/mdecorde/Bureau/Experiences/rcp/messages.properties");
+//		File messageClass = new File("/home/mdecorde/Bureau/Experiences/rcp/Messages.java");
+//		File srcdirectory = new File("/home/mdecorde/Bureau/Experiences/rcp");
+		File propertyFile = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcp/messages.properties");
+		File messageClass = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcp/Messages.java");
+		File srcdirectory = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcp");
 		if (!(propertyFile.exists() && propertyFile.canRead() && propertyFile.canWrite() && propertyFile.isFile())) {
 			println "error file : "+propertyFile
 			return
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/setup/FixFeaturePluginDeclaration.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/setup/FixFeaturePluginDeclaration.groovy	(revision 672)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/setup/FixFeaturePluginDeclaration.groovy	(revision 673)
@@ -7,7 +7,7 @@
 
 String home = System.getProperty("user.home")
 File rcpSrc = new File(home, "workspace441/org.txm.rcp")
-File productFile = new File(rcpSrc, "rcpapplication.product")
+File productFile = new File(rcpSrc, "rcp.product")
 
 //File dir = new File("/home/mdecorde/ECLIPSE/babel/babel-kepler/features/org.eclipse.babel.nls_eclipse_ru_4.3.0.v20131123020001")
 File dir = new File("/home/matthieu/ECLIPSE/eclipse_babel/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20150804100819")
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/setup/BuildFeatureFromProduct.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/setup/BuildFeatureFromProduct.groovy	(revision 672)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/setup/BuildFeatureFromProduct.groovy	(revision 673)
@@ -5,7 +5,7 @@
 String home = System.getProperty("user.home")
 File rcpSrc = new File(home, "workspace43/org.txm.rcp")
 File rcpFeatureSrc = new File(home, "workspace43/org.txm.rcp.feature")
-File productFile = new File(rcpSrc, "rcpapplication.product")
+File productFile = new File(rcpSrc, "rcp.product")
 File featureFile = new File(rcpFeatureSrc, "feature.xml")
 //File featureFileBackUp = new File(rcpFeatureSrc, "feature_back.xml")
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/setup/BuildSplashVersion.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/setup/BuildSplashVersion.groovy	(revision 672)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/setup/BuildSplashVersion.groovy	(revision 673)
@@ -14,7 +14,7 @@
 int img_width = 316;
 
 File rcpDir = new File(System.getProperty("user.home"), "workspace442/org.txm.rcp")
-File product = new File(rcpDir, "rcpapplication.product");
+File product = new File(rcpDir, "rcp.product");
 File imgFile = new File(rcpDir, "splash_sansversion.bmp");
 File imgFile2 = new File(rcpDir,"splash.bmp");
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/debug/BrowserVersionMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/debug/BrowserVersionMacro.groovy	(revision 672)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/debug/BrowserVersionMacro.groovy	(revision 673)
@@ -6,7 +6,7 @@
 import org.eclipse.ui.browser.*
 import org.eclipse.ui.internal.browser.*
 import org.eclipse.ui.internal.browser.browsers.MozillaBrowser.*
-import org.txm.rcpapplication.commands.*
+import org.txm.rcp.commands.*
 
 b = PlatformUI.getWorkbench().getBrowserSupport().createBrowser(IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.STATUS, 'iname', 'name', 'longName')
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/office/SetOfficeMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/office/SetOfficeMacro.groovy	(revision 672)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/office/SetOfficeMacro.groovy	(revision 673)
@@ -3,7 +3,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // BEGINNING OF PARAMETERS
 
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 672)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 673)
@@ -23,36 +23,57 @@
 import org.txm.objects.Base;
 import org.txm.utils.logger.Log;
 
+// FIXME: At this moment, an empty list is created for children, to not return
+// null when calling getChildren(), see if that's what we want
 /**
  * Root class of all TXM results. This class contains methods to get some
  * different versions of the name of the result and some additional computing
  * information. It also contains methods to manage a tree hierarchy of result
  * nodes.
  * 
+ * A TXMResult always have a parent (except the root: @see Workspace).
+ * 
+ * To compute a result simply call the {@link #compute()} method. It contains all the life cycle steps of the result.
+ * 
+ * To set parameters, you can alternatively call the {@link #setParameters()} methods or the setXXX methods. The setParameters methods are usually useful to transfer several parameters at once.
+ * 
+ * The class contains convenient methods to maintain the same logic between results :
+ * - canCompute() : test if all necessary parameters are set
+ * - isDirty(): return true if the result needs to be recomputed (if a parameter changed)
+ * 
+ * Groovy call sample :
+ * <pre>
+ * {@code
+ * MyTXMResult result = new MyTXMResult(parent);
+ * result.setParameters(["param1": 1, "param2":2]);
+ * if (result.compute()) {
+ * 	println "success"
+ * } else {
+ *  println "failure"
+ * }
+ * </pre>
+ * 
  * @author mdecorde
  * @author sjacquot
- *
  */
-// FIXME: At this moment, an empty list is created for children, to not return
-// null when calling getChildren(), see if that's what we want
 public abstract class TXMResult implements Cloneable, IProgressMonitor {
 
-	
+
 	public static final DateFormat ID_TIME_FORMAT = new SimpleDateFormat("YYYYMMDD");
 	public static final Pattern FILE_NAME_PATTERN = Pattern.compile("[^a-zA-Z0-9\\.-]+"); //$NON-NLS-1$
 	public static final String UNDERSCORE = "_";
 
-	
+
 	/**
 	 * Unique ID of the object built with : class + date + number
 	 */
 	protected String uniqueID;
-	
+
 	/**
 	 * Editor can use this to test if the result has been computed once.
 	 */
 	protected boolean hasBeenComputedOnce = false;
-	
+
 	/**
 	 * The weight, essentially used for sorting purpose.
 	 */
@@ -215,7 +236,7 @@
 		this.updateLastParameters(Parameter.COMPUTING);
 	}
 
-	
+
 	/**
 	 * 
 	 * @param parameterType
@@ -241,7 +262,7 @@
 			f.setAccessible(true);
 			this.lastParameters.remove(name);
 		}
-		
+
 	}
 
 
@@ -253,13 +274,13 @@
 	protected void clearLastComputingParameters() {
 		this.clearLastParameters(Parameter.COMPUTING);
 	}
-	
-	
+
+
 	public HashMap<String, Object> getLastParameters() {
 		return lastParameters;
 	}
-	
 
+
 	/**
 	 * Gets a current parameter specified by its annotation "key" attribute and its annotation "type" attribute.
 	 * @param key
@@ -323,9 +344,9 @@
 			return !lastValue.equals(newValue);
 		}
 	}
-	
-	
 
+
+
 	/**
 	 * Dumps the command and default preferences of the result preferences node qualifier.
 	 * @return
@@ -341,16 +362,16 @@
 
 		str.append("\nCommand preferences\n"); //$NON-NLS-1$
 		str.append(TXMPreferences.getKeysAndValues(TXMPreferences.scope, this.preferencesNodeQualifier));
-		
+
 		str.append("\nDefault command preferences\n"); //$NON-NLS-1$
 		str.append(TXMPreferences.getKeysAndValues(DefaultScope.INSTANCE, this.preferencesNodeQualifier));
 
 
-		
+
 		return str.toString();
 	}
-	
 
+
 	/**
 	 * Dumps the result computing parameters (Parameter annotation).
 	 * @return
@@ -358,8 +379,8 @@
 	public String dumpParameters()	{
 		return this.dumpParameters(Parameter.COMPUTING);
 	}
-	
-	
+
+
 	/**
 	 * Dumps the result computing parameters (Parameter annotation).
 	 * @param parametersType
@@ -402,9 +423,9 @@
 		}
 		return str.toString();
 	}
-	
 
 
+
 	/**
 	 * Updates the dirty state by comparing an old parameter with a new one.
 	 * 
@@ -606,9 +627,9 @@
 	public boolean autoSaveParametersFromAnnotations() throws Exception {
 
 		System.out.println("TXMResult.autoSaveParametersFromAnnotations(): saving parameters to local node...");
-		
+
 		List<Field> fields = this.getAllFields();
-		
+
 		for (Field f : fields) {
 			Parameter parameter = f.getAnnotation(Parameter.class);
 			if (parameter == null) {
@@ -646,8 +667,8 @@
 	 * @throws Exception
 	 */
 	public abstract boolean saveParameters() throws Exception;
-	
 
+
 	/**
 	 * 
 	 * @return
@@ -684,7 +705,7 @@
 				f.setAccessible(true); // set accessible to test the field values
 
 				Object value = null;
-				
+
 				// only manage primitive types
 				if (f.getType().isAssignableFrom(String.class)) {
 					value = this.getStringParameterValue(key);
@@ -703,14 +724,14 @@
 				}
 				// FIXME: test to automate other type creation as Property => problem here is that org.txm.core doesn't know the plug-in org.txm.searchengine.cqp.core
 				// could be done using reflection. Get the field runtime class, then get and call the constructor
-//				else if (f.getType().isAssignableFrom(Property.class)) {
-//					value = new Property(this.getStringParameterValue(key), Corpus.getCorpus(this));
-//				}
+				//				else if (f.getType().isAssignableFrom(Property.class)) {
+				//					value = new Property(this.getStringParameterValue(key), Corpus.getCorpus(this));
+				//				}
 				f.set(this, value);
-				
+
 				// FIXME: Debug
 				System.err.println("TXMResult.autoLoadParametersFromAnnotations(): setting parameter " + key + " = " + value + " for " + this.getClass());
-				
+
 			} catch (Exception e) {
 				e.printStackTrace();
 			}
@@ -753,11 +774,11 @@
 	 * @throws Exception
 	 */
 	public boolean setParameter(String key, Object value) throws Exception	{
-		
+
 		List<Field> fields = this.getAllFields();
 
 		Field targetField = null;
-		
+
 		for (Field f : fields) {
 			Parameter parameter = f.getAnnotation(Parameter.class);
 			if (parameter == null) {
@@ -768,22 +789,22 @@
 				break;
 			}
 		}
-		
+
 		if(targetField != null)	{
 			targetField.setAccessible(true);
-			
+
 			// FIXME: debug
 			if(value != null)	{
 				System.err.println("TXMResult.setParameter(): setting parameter " + key + " = " + value + " for " + this.getClass() + " (" + value.getClass() + ")");
 			}
-			
+
 			targetField.set(this, value);
 		}
-		
-		
+
+
 		return true;
 	}
-	
+
 	/**
 	 * Deletes the object from its parent, also deletes the children. The <code>TXMResult.clean()</code> methods of this result and children results are applied before the deletion.
 	 * 
@@ -1161,7 +1182,7 @@
 	// FIXME: to discuss and/or to move in export layer
 	public String getValidFileName() {
 		try {
-			 return FILE_NAME_PATTERN.matcher(this.getName()).replaceAll(UNDERSCORE); //$NON-NLS-1$
+			return FILE_NAME_PATTERN.matcher(this.getName()).replaceAll(UNDERSCORE); //$NON-NLS-1$
 		} catch (Exception e) {
 			Log.printStackTrace(e);
 		}
@@ -1293,8 +1314,8 @@
 	public boolean compute() throws Exception {
 		return this.compute(null);
 	}
-	
 
+
 	/**
 	 * 
 	 * @param monitor
@@ -1343,8 +1364,8 @@
 		// 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 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
Index: tmp/org.txm.core/test/org/txm/StartToolbox.java
===================================================================
--- tmp/org.txm.core/test/org/txm/StartToolbox.java	(revision 672)
+++ tmp/org.txm.core/test/org/txm/StartToolbox.java	(revision 673)
@@ -9,7 +9,7 @@
 	@Test
 	public void test() throws Exception {
 		String home = System.getProperty("user.home");
-		String product_configuration_path = "runtime-rcpapplication.product/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.txm.rcp.prefs";
+		String product_configuration_path = "runtime-rcp.product/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.txm.rcp.prefs";
 		File properties = new File(home, product_configuration_path);
 		Toolbox.initialize(properties);
 	}
Index: tmp/org.txm.svn.rcp/plugin.xml
===================================================================
--- tmp/org.txm.svn.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.svn.rcp/plugin.xml	(revision 673)
@@ -6,11 +6,11 @@
       <menuContribution
             locationURI="menu:menu.help.plugins">
          <command
-               commandId="org.txm.rcpapplication.commands.OpenBrowser"
+               commandId="org.txm.rcp.commands.OpenBrowser"
                label="%command.label"
                style="push">
             <parameter
-                  name="org.txm.rcpapplication.commands.commandParameter2"
+                  name="org.txm.rcp.commands.commandParameter2"
                   value="https://groupes.renater.fr/wiki/txm-users/public/extensions#environnement_svn">
             </parameter>
          </command>
Index: tmp/org.txm.xmleditor.rcp/plugin.xml
===================================================================
--- tmp/org.txm.xmleditor.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.xmleditor.rcp/plugin.xml	(revision 673)
@@ -4,7 +4,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.xmleditor.OpenXMLEditor"
             id="org.txm.xmleditor.OpenXMLEditor"
             name="%command.name">
@@ -22,17 +22,17 @@
       <menuContribution
             locationURI="menu:menu.help.plugins">
          <command
-               commandId="org.txm.rcpapplication.commands.OpenBrowser"
+               commandId="org.txm.rcp.commands.OpenBrowser"
                label="%command.label"
                style="push">
             <parameter
-                  name="org.txm.rcpapplication.commands.commandParameter2"
+                  name="org.txm.rcp.commands.commandParameter2"
                   value="https://groupes.renater.fr/wiki/txm-users/public/extensions#xmleditor">
             </parameter>
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.fileexplorer.Explorer">
+            locationURI="popup:org.txm.rcp.views.fileexplorer.Explorer">
          <command
                commandId="org.txm.xmleditor.OpenXMLEditor"
                style="push"
Index: tmp/org.txm.xmleditor.rcp/src/org/txm/xmleditor/OpenXMLEditor.java
===================================================================
--- tmp/org.txm.xmleditor.rcp/src/org/txm/xmleditor/OpenXMLEditor.java	(revision 672)
+++ tmp/org.txm.xmleditor.rcp/src/org/txm/xmleditor/OpenXMLEditor.java	(revision 673)
@@ -39,7 +39,7 @@
 				.getShell();
 		String txmhome = TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, TBXPreferences.PREFERENCES_NODE);
 		String filename = event
-				.getParameter("org.txm.rcpapplication.commands.commandParameter2"); //$NON-NLS-1$
+				.getParameter("org.txm.rcp.commands.commandParameter2"); //$NON-NLS-1$
 		if (filename != null && !filename.matches("") && !filename.matches(" ")) { //$NON-NLS-1$ //$NON-NLS-2$
 			String filepath = txmhome + "/scripts/" + filename; //$NON-NLS-1$ 
 			openfile(new File(filepath));
Index: tmp/org.txm.analec.rcp/plugin.xml
===================================================================
--- tmp/org.txm.analec.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.analec.rcp/plugin.xml	(revision 673)
@@ -56,7 +56,7 @@
          </menu>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <menu
                id="corpora.menu.analec"
                label="%menu.label.0"
@@ -152,67 +152,67 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.LoadStructure"
             id="org.txm.analec.commands.LoadStructure"
             name="%command.name">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.EditStructure"
             id="org.txm.analec.commands.EditAnnotationStructure"
             name="%command.name.0">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.SaveStructure"
             id="org.txm.analec.commands.SaveStructure"
             name="%command.name.1">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.LoadStructureFromGlozz"
             id="org.txm.analec.commands.LoadStructureFromGlozz"
             name="%command.name.2">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.LoadCorpus"
             id="org.txm.analec.commands.LoadCorpus"
             name="%command.name.3">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.SaveCorpus"
             id="org.txm.analec.commands.SaveCorpus"
             name="%command.name.4">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.LoadVue"
             id="org.txm.analec.commands.LoadVue"
             name="%command.name.5">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.SaveVue"
             id="org.txm.analec.commands.SaveVue"
             name="%command.name.6">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.SaveStructureAsGlozzModel"
             id="org.txm.analec.commands.SaveStructureAsGlozzModel"
             name="%command.name.7">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.ImportGlozzCorpus"
             id="org.txm.analec.commands.ImportGlozzCorpus"
             name="%command.name.8">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.ImportGlozzAnnotations"
             id="org.txm.analec.commands.ImportGlozzAnnotations"
             name="%command.name.9">
@@ -223,25 +223,25 @@
             name="%command.name.10">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.ExportGlozzCorpus"
             id="org.txm.analec.commands.ExportGlozzCorpus"
             name="%command.name.12">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.ExportTEICorpus"
             id="org.txm.analec.commands.ExportTEICorpus"
             name="%command.name.13">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.ImportTEICorpus"
             id="org.txm.analec.commands.ImportTEICorpus"
             name="%command.name.14">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.analec.commands.ImportTEIAnnotations"
             id="org.txm.analec.commands.ImportTEIAnnotations"
             name="%command.name.11">
@@ -256,7 +256,7 @@
          point="org.eclipse.ui.views">
       <view
             allowMultiple="false"
-            category="org.txm.rcpapplication"
+            category="org.txm.rcp"
             class="org.txm.analec.view.ElementPropertiesView"
             icon="icons/pencil.png"
             id="org.txm.analec.view.ElementPropertiesView"
@@ -265,9 +265,9 @@
       </view>
       <view
             allowMultiple="false"
-            category="org.txm.rcpapplication"
+            category="org.txm.rcp"
             class="org.txm.analec.view.ElementSearchView"
-            icon="platform:/plugin/org.txm.rcpapplication/icons/functions/Search.png"
+            icon="platform:/plugin/org.txm.rcp/icons/functions/Search.png"
             id="org.txm.analec.view.ElementSearchView"
             name="%view.name.0"
             restorable="true">
@@ -301,7 +301,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.analec.preferences.AnalecPreferencePage"
             id="org.txm.analec.preferences.AnalecPreferencePage"
             name="Analec">
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/view/ElementSearchView.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/view/ElementSearchView.java	(revision 672)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/view/ElementSearchView.java	(revision 673)
@@ -183,7 +183,7 @@
 		});
 
 		resetButton = new Button(buttons, SWT.PUSH);
-		resetButton.setImage(IImageKeys.getImage("platform:/plugin/org.txm.rcpapplication/icons/cross.png"));
+		resetButton.setImage(IImageKeys.getImage("platform:/plugin/org.txm.rcp/icons/cross.png"));
 		resetButton.setToolTipText("Reset the search field values");
 		resetButton.addSelectionListener(new SelectionListener() {
 			@Override
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/export/AnalecAnnotationTEIExporter.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/export/AnalecAnnotationTEIExporter.java	(revision 672)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/export/AnalecAnnotationTEIExporter.java	(revision 673)
@@ -266,7 +266,7 @@
 			writer.writeAttribute("who", "#"+System.getProperty("user.name"));
 			writer.writeAttribute("when", BaseParameters.dateformat.format(Calendar.getInstance().getTime()));
 			writer.writeCharacters("\n");
-			writer.writeCharacters("Created with TXM "+BundleUtils.getBundleVersion("org.txm.rcpapplication")+" and Analec extension "+BundleUtils.getBundleVersion("AnalecRCP")+" with 'XML-TEI-URS Export....' export command on "+mainCorpus.getName()+" corpus");
+			writer.writeCharacters("Created with TXM "+BundleUtils.getBundleVersion("org.txm.rcp")+" and Analec extension "+BundleUtils.getBundleVersion("AnalecRCP")+" with 'XML-TEI-URS Export....' export command on "+mainCorpus.getName()+" corpus");
 			writer.writeEndElement(); // change
 			writer.writeEndElement(); // revisionDesc
 			writer.writeStartElement("encodingDesc");writer.writeCharacters("\n");
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/preferences/AnalecPreferences.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/preferences/AnalecPreferences.java	(revision 672)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/preferences/AnalecPreferences.java	(revision 673)
@@ -19,6 +19,7 @@
 		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
 		preferences.put(VERSION, "");
 		preferences.put(COLOR_PALETTE, "green");
+		preferences.putBoolean(ANALEC_LIMIT_CORRECTION_SCHEME, false);
 		preferences.putBoolean(PREFIX_AUTOCOMPLETION, false);
 	}
 }
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/SchemaToolbar.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/SchemaToolbar.java	(revision 672)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/SchemaToolbar.java	(revision 673)
@@ -143,7 +143,7 @@
 		});
 
 		deleteSchemaButton = new Button(this, SWT.PUSH);
-		deleteSchemaButton.setImage(IImageKeys.getImage("platform:/plugin/org.txm.rcpapplication/icons/cross.png")); //$NON-NLS-1$
+		deleteSchemaButton.setImage(IImageKeys.getImage("platform:/plugin/org.txm.rcp/icons/cross.png")); //$NON-NLS-1$
 		deleteSchemaButton.setToolTipText("Supprimer le schéma");
 		deleteSchemaButton.setEnabled(false);
 		deleteSchemaButton.addSelectionListener(new SelectionListener() {
@@ -168,7 +168,7 @@
 		});
 
 		deleteUniteButton = new Button(this, SWT.PUSH);
-		deleteUniteButton.setImage(IImageKeys.getImage("platform:/plugin/org.txm.rcpapplication/icons/cross.png")); //$NON-NLS-1$
+		deleteUniteButton.setImage(IImageKeys.getImage("platform:/plugin/org.txm.rcp/icons/cross.png")); //$NON-NLS-1$
 		deleteUniteButton.setToolTipText("Supprimer l'unité de la chaîne");
 		deleteUniteButton.setEnabled(false);
 		deleteUniteButton.addSelectionListener(new SelectionListener() {
Index: tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/UnitToolbar.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/UnitToolbar.java	(revision 672)
+++ tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/UnitToolbar.java	(revision 673)
@@ -173,7 +173,7 @@
 			}
 		});
 		deleteButton = new Button(this, SWT.PUSH);
-		deleteButton.setImage(IImageKeys.getImage("platform:/plugin/org.txm.rcpapplication/icons/cross.png")); //$NON-NLS-1$
+		deleteButton.setImage(IImageKeys.getImage("platform:/plugin/org.txm.rcp/icons/cross.png")); //$NON-NLS-1$
 		deleteButton.setToolTipText(Messages.UnitToolbar_10);
 		deleteButton.addSelectionListener(new SelectionListener() {
 			@Override
Index: tmp/org.txm.imports.metopes/plugin.xml
===================================================================
--- tmp/org.txm.imports.metopes/plugin.xml	(revision 672)
+++ tmp/org.txm.imports.metopes/plugin.xml	(revision 673)
@@ -6,12 +6,12 @@
       <menuContribution
             locationURI="menu:menu.file.import?before=menu.file.import.separator.software">
          <command
-               commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+               commandId="org.txm.rcp.commands.ExecuteScriptImport"
                label="XML-TEI Metopes"
                style="push"
                tooltip="Metopes">
             <parameter
-                  name="org.txm.rcpapplication.commands.commandParameter3"
+                  name="org.txm.rcp.commands.commandParameter3"
                   value="metopesLoader.groovy">
             </parameter>
          </command>
Index: tmp/org.txm.groovy.rcp/plugin.xml
===================================================================
--- tmp/org.txm.groovy.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.groovy.rcp/plugin.xml	(revision 673)
@@ -16,6 +16,23 @@
             id="org.txm.groovy.rcp.views.SampleView">
       </view>
    </extension>
+   <extension point="org.eclipse.ui.activities">  
+   <activity
+         description="should hide the groovy project button"
+         id="myActivity"
+         name="MenuHidingActivity">  
+      <enabledWhen>  
+         <with variable="activePartId">    
+            <equals value="nonExistentPartId"></equals>      
+         </with>
+      </enabledWhen>
+   </activity>
+   <activityPatternBinding
+         activityId="myActivity"
+         isEqualityPattern="true"
+         pattern="opengroovyprojectwizard">  
+   </activityPatternBinding>
+</extension>  
    <extension
          point="org.eclipse.ui.perspectiveExtensions">
       <perspectiveExtension
Index: tmp/org.txm.rcp.p2.ui/tmp/UpdateWizardPage.java
===================================================================
--- tmp/org.txm.rcp.p2.ui/tmp/UpdateWizardPage.java	(revision 672)
+++ tmp/org.txm.rcp.p2.ui/tmp/UpdateWizardPage.java	(revision 673)
@@ -35,7 +35,7 @@
 
 		if (iu != null) {
 			//System.out.println("IInstallableUnit.getId() " +iu.getId());
-			if (iu.getId().equals("org.txm.rcpapplication.product")) { // TXM product is selected
+			if (iu.getId().equals("org.txm.rcp.product")) { // TXM product is selected
 				//System.out.println("TXM product is selected");
 				TreeItem[] treeitems = treeViewer.getTree().getSelection();
 				for (TreeItem item : treeitems) { // find it in the Tree selection
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchWindowAdvisor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchWindowAdvisor.java	(revision 672)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchWindowAdvisor.java	(revision 673)
@@ -47,6 +47,8 @@
 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
 import org.eclipse.ui.internal.WorkbenchWindow;
+import org.eclipse.ui.menus.AbstractContributionFactory;
+import org.eclipse.ui.menus.IMenuService;
 import org.txm.utils.logger.Log;
 
 // TODO: Auto-generated Javadoc
@@ -89,6 +91,7 @@
 		configurer.setShowProgressIndicator(true);
 		configurer.setShowPerspectiveBar(true);
 		configurer.setTitle(RCPMessages.Explorer_3);
+		
 
 		// This is a patch to remove the Quick Search Field and spacers from the Main toolbar
 		Log.warning(RCPMessages.ApplicationWorkbenchWindowAdvisor_0);
@@ -105,6 +108,7 @@
 				MTrimElement next = it.next();
 				//System.out.println("Element: "+next.getElementId());
 				if ("com.none.playActionSet".equals(next.getElementId())) continue; //$NON-NLS-1$
+				if ("org.eclipse.search.searchActionSet".equals(next.getElementId())) continue; //$NON-NLS-1$
 				if ("org.eclipse.ui.edit.text.actionSet.annotationNavigation".equals(next.getElementId())) continue; //$NON-NLS-1$
 				if ("org.eclipse.ui.edit.text.actionSet.navigation".equals(next.getElementId())) continue; //$NON-NLS-1$
 				if ("org.eclipse.search.searchActionSet".equals(next.getElementId())) continue; //$NON-NLS-1$
Index: tmp/org.txm.rcp/build.properties
===================================================================
--- tmp/org.txm.rcp/build.properties	(revision 672)
+++ tmp/org.txm.rcp/build.properties	(revision 673)
@@ -6,7 +6,7 @@
                .,\
                splash.bmp,\
                lib/,\
-               rcpapplication.product,\
+               rcp.product,\
                plugin_customization.ini,\
                lib/commons-cli-1.2.jar,\
                lib/commons-lang-2.4.jar,\
Index: tmp/org.txm.rcp/plugin.xml
===================================================================
--- tmp/org.txm.rcp/plugin.xml	(revision 672)
+++ tmp/org.txm.rcp/plugin.xml	(revision 673)
@@ -2948,7 +2948,7 @@
                <with
                      variable="activePartId">
                   <equals
-                        value="org.txm.rcpapplication.editors.TxtEditor">
+                        value="org.txm.rcp.editors.TxtEditor">
                   </equals>
                </with>
                <with
