Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/CooccurrenceUIMessages.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/CooccurrenceUIMessages.java	(revision 541)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/CooccurrenceUIMessages.java	(revision 542)
@@ -31,8 +31,6 @@
 	public static String CooccurrencesEditor_18;
 	public static String CooccurrencesEditor_2;
 	public static String CooccurrencesEditor_20;
-	public static String CooccurrencesEditor_23;
-	public static String CooccurrencesEditor_24;
 
 	public static String CooccurrencesEditor_25;
 	public static String CooccurrencesEditor_3;
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/___CooccurrenceEditorInput.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/___CooccurrenceEditorInput.java	(revision 541)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/___CooccurrenceEditorInput.java	(revision 542)
@@ -1,81 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-// 
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-// 
-// The TXM platform is distributed in the hope that it will be
-// useful, but WITHOUT ANY WARRANTY; without even the implied
-// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-// PURPOSE. See the GNU General Public License for more
-// details.
-// 
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-// 
-// 
-// 
-// $LastChangedDate:$
-// $LastChangedRevision:$
-// $LastChangedBy:$ 
-//
-package org.txm.cooccurrence.rcp.editors;
-
-import org.txm.cooccurrence.core.functions.Cooccurrence;
-import org.txm.rcp.editors.TXMResultEditorInput;
-import org.txm.searchengine.cqp.corpus.Corpus;
-// TODO: Auto-generated Javadoc
-/**
- * The Class CooccurrenceEditorInput.
- */
-@Deprecated
-public class ___CooccurrenceEditorInput extends TXMResultEditorInput {
-
-	/** The corpus. */
-	private Corpus corpus;
-
-	/**
-	 * Instantiates a new cooccurrence editor input.
-	 *
-	 * @param cooc the cooc
-	 */
-	public ___CooccurrenceEditorInput(Cooccurrence cooc) {
-		super(cooc);
-		this.corpus = cooc.getCorpus();
-	}
-
-	/**
-	 * Instantiates a new cooccurrence editor input.
-	 *
-	 * @param corpus the corpus
-	 */
-	public ___CooccurrenceEditorInput(Corpus corpus) {
-		super(null);
-		this.corpus = corpus;
-	}
-	/**
-	 * Gets the cooc.
-	 *
-	 * @return the cooc
-	 */
-	public Cooccurrence getCooc() {
-		return (Cooccurrence) this.result;
-	}
-
-
-
-	/**
-	 * Gets the corpus.
-	 *
-	 * @return the corpus
-	 */
-	public Corpus getCorpus() {
-		return corpus;
-	}
-}
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java	(revision 541)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java	(revision 542)
@@ -116,8 +116,6 @@
 	/** The cooc. */
 	Cooccurrence cooc;
 
-	/** The self. */
-	CooccurrencesEditor self;
 	// params
 	/** The query widget. */
 	AssistedQueryWidget queryWidget;
@@ -161,7 +159,6 @@
 	/** The current comparator. */
 	CLineComparator currentComparator;
 
-
 	/** The scroll composite. */
 	private ScrolledComposite scrollComposite;
 
@@ -170,17 +167,19 @@
 	 */
 	public CooccurrencesEditor() {
 		super();
-		self = this;
 	}
 
 	/**
-	 * Inits the.
+	 * Initialize the editor with the cooccurrences TXMResult
 	 *
-	 * @param site the site
-	 * @param input the input
-	 * @throws PartInitException the part init exception
+	 * @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)
+	 *      org.eclipse.ui.IEditorInput)
 	 */
 	@Override
 	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
@@ -192,40 +191,42 @@
 	/**
 	 * Creates the part control.
 	 *
-	 * @param parent the parent
+	 * @param parent
+	 *            the parent
 	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
 	 */
 	@Override
 	public void createPartControl(final Composite parent) {
-
+		super.createPartControl(parent);
 		// FIXME: to do
-		//super.createPartControl(parent);
+		// super.createPartControl(parent);
 
-		FormLayout parentLayout = new FormLayout();
-		parent.setLayout(parentLayout);
+		// FormLayout parentLayout = new FormLayout();
+		// parent.setLayout(parentLayout);
 
-		scrollComposite = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.BORDER);
-		FormData paramLayoutData = new FormData();
-		paramLayoutData.top = new FormAttachment(0);
-		paramLayoutData.left = new FormAttachment(0);
-		paramLayoutData.right = new FormAttachment(100);
-		scrollComposite.setLayoutData(paramLayoutData);
+		// scrollComposite = new ScrolledComposite(parent, SWT.H_SCROLL |
+		// SWT.BORDER);
+		// FormData paramLayoutData = new FormData();
+		// paramLayoutData.top = new FormAttachment(0);
+		// paramLayoutData.left = new FormAttachment(0);
+		// paramLayoutData.right = new FormAttachment(100);
+		// scrollComposite.setLayoutData(paramLayoutData);
 
-		final Composite paramArea = new Composite(scrollComposite, SWT.NONE);
+		final Composite paramArea = this.getCommandParametersGroup();
 		FormLayout paramLayout = new FormLayout();
 		paramArea.setLayout(paramLayout);
 
-		scrollComposite.setContent(paramArea);
-		scrollComposite.setExpandVertical(true);
-		scrollComposite.setExpandHorizontal(true);
-		scrollComposite.addControlListener(new ControlAdapter() {
-			@Override
-			public void controlResized(ControlEvent e) {
-				Rectangle r = scrollComposite.getClientArea();
-				scrollComposite.setMinSize(paramArea.computeSize(SWT.DEFAULT,
-						SWT.DEFAULT));
-			}
-		});
+		// scrollComposite.setContent(paramArea);
+		// scrollComposite.setExpandVertical(true);
+		// scrollComposite.setExpandHorizontal(true);
+		// scrollComposite.addControlListener(new ControlAdapter() {
+		// @Override
+		// public void controlResized(ControlEvent e) {
+		// Rectangle r = scrollComposite.getClientArea();
+		// scrollComposite.setMinSize(paramArea.computeSize(SWT.DEFAULT,
+		// SWT.DEFAULT));
+		// }
+		// });
 
 		// Label infos = new Label(paramArea, SWT.NONE);
 		// infos.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
@@ -243,8 +244,7 @@
 
 		Label queryLabel = new Label(queryArea, SWT.NONE);
 		queryLabel.setText(TXMCoreMessages.QUERY_1);
-		queryLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,
-				true));
+		queryLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, true));
 
 		// [ (v)]
 		queryWidget = new AssistedQueryWidget(queryArea, SWT.DROP_DOWN, this.cooc.getCorpus());
@@ -257,7 +257,8 @@
 			public void keyPressed(KeyEvent e) {
 				// System.out.println("key pressed : "+e.keyCode);
 				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
-					computeResult();
+					setTXMResultParameters();
+					compute(true);
 				}
 			}
 
@@ -284,7 +285,8 @@
 		go.addSelectionListener(new SelectionListener() {
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				computeResult();
+				setTXMResultParameters();
+				TXMEditorPart.compute(CooccurrencesEditor.this.getResultData(), true, CooccurrencesEditor.this);
 			}
 
 			@Override
@@ -313,8 +315,9 @@
 		propsArea.addValueChangeListener(new Listener() {
 			@Override
 			public void handleEvent(Event event) {
-				if (TXMPreferences.getBoolean(RCPPreferences.AUTO_UPDATE_EDITOR, RCPPreferences.PREFERENCES_NODE))	{
-					computeResult();
+				if (TXMPreferences.getBoolean(RCPPreferences.AUTO_UPDATE_EDITOR, RCPPreferences.PREFERENCES_NODE)) {
+					setTXMResultParameters();
+					TXMEditorPart.compute(CooccurrencesEditor.this.getResultData(), true, CooccurrencesEditor.this);
 				}
 			}
 		});
@@ -363,19 +366,18 @@
 		empantPanel.setLayoutData(empantLayoutData);
 
 		// result
-		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);
+		Composite resultArea = this.getDisplayArea();
+		// 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);
 
 		FormLayout resultLayout = new FormLayout();
 		resultArea.setLayout(resultLayout);
 
-		viewer = new TableViewer(resultArea, SWT.MULTI
-				| SWT.FULL_SELECTION | SWT.BORDER);
+		viewer = new TableViewer(resultArea, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
 		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
 		viewer.getTable().setLinesVisible(true);
 		viewer.getTable().setHeaderVisible(true);
@@ -384,28 +386,31 @@
 		if (fontName != null && fontName.length() > 0) {
 			Font old = viewer.getTable().getFont();
 			FontData fD = old.getFontData()[0];
-			//Font f = new Font(old.getDevice(), corpus.getFont(), fD.getHeight(), fD.getStyle());
-			Font font = new Font(Display.getCurrent(), fontName, fD.getHeight(), fD.getStyle()); 
+			// Font f = new Font(old.getDevice(), corpus.getFont(),
+			// fD.getHeight(), fD.getStyle());
+			Font font = new Font(Display.getCurrent(), fontName, fD.getHeight(), fD.getStyle());
 			viewer.getTable().setFont(font);
 		}
 
-		//TODO replace this with a command+menucontribution		
-		//		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);
-		//				//System.out.println("col "+col);
-		//				switch(col)
-		//				{
-		//				default:
-		//					IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
-		//					CooccurrencesToConcordances.link(CooccurrencesEditor.this, selection);
-		//				}
-		//			}
-		//		});
+		// TODO replace this with a command+menucontribution
+		// 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);
+		// //System.out.println("col "+col);
+		// switch(col)
+		// {
+		// default:
+		// IStructuredSelection selection = (IStructuredSelection)
+		// viewer.getSelection();
+		// CooccurrencesToConcordances.link(CooccurrencesEditor.this,
+		// selection);
+		// }
+		// }
+		// });
 
 		FormData tableLayoutData = new FormData();
 		tableLayoutData.top = new FormAttachment(0);
@@ -501,8 +506,7 @@
 			}
 		});
 
-		TableColumn n2Column = new TableColumn(viewer.getTable(),
-				SWT.RIGHT);
+		TableColumn n2Column = new TableColumn(viewer.getTable(), SWT.RIGHT);
 		n2Column.setText(""); //$NON-NLS-1$
 		n2Column.pack();
 
@@ -510,21 +514,20 @@
 		currentComparator = new ScoreComparator();
 		setColComparator(new ScoreComparator(), scoreColumn);
 		sort();
-		setColComparator(new ScoreComparator(), scoreColumn);
-		sort();
 		createContextMenu(viewer);
 		initializeFields();
 
 		for (TableColumn col : viewer.getTable().getColumns())
 			col.pack();
 
-		this.computeResult();
+		TXMEditorPart.compute(CooccurrencesEditor.this.getResultData(), true, CooccurrencesEditor.this);
 	}
 
 	/**
 	 * Gets the pointed column.
 	 *
-	 * @param mouseposition the mouseposition
+	 * @param mouseposition
+	 *            the mouseposition
 	 * @return the pointed column
 	 */
 	public int getPointedColumn(Point mouseposition) {
@@ -558,9 +561,10 @@
 
 	/**
 	 * Creates some parameters from the current widget values.
+	 * 
 	 * @return
 	 */
-	public TXMParameters getWidgetsParameters()	{
+	public TXMParameters getWidgetsParameters() {
 
 		TXMParameters parameters = new TXMParameters();
 		parameters.put(CooccurrencePreferences.QUERY, this.queryWidget.getQueryString());
@@ -573,7 +577,7 @@
 		parameters.put(CooccurrencePreferences.MIN_FREQ, this.TFreq.getSelection());
 		parameters.put(CooccurrencePreferences.MIN_COUNT, this.TCount.getSelection());
 		parameters.put(CooccurrencePreferences.INCLUDE_X_PIVOT, this.empantPanel.getXPivot());
-		parameters.put(CooccurrencePreferences.PARTIAL_LEXICAL_TABLE,this.getBooleanParameterValue(CooccurrencePreferences.PARTIAL_LEXICAL_TABLE));
+		parameters.put(CooccurrencePreferences.PARTIAL_LEXICAL_TABLE, this.getBooleanParameterValue(CooccurrencePreferences.PARTIAL_LEXICAL_TABLE));
 
 		Double minScore = 0.0;
 		try {
@@ -588,8 +592,14 @@
 		return parameters;
 	}
 
-	@Override
-	public void computeResult() {
+	public void setTXMResultParameters() {
+		TXMParameters parameters = this.getWidgetsParameters();
+		cooc.setParameters(parameters);
+		cooc.setDirty();
+	}
+
+	@Deprecated
+	public void computeOLD(final boolean update) {
 		StatusLine.setMessage(CooccurrenceUIMessages.CooccurrencesEditor_33);
 		if (this.queryWidget.getQueryString().trim().length() == 0 || this.queryWidget.getQueryString().trim().equals("\"\"")) //$NON-NLS-1$
 			return;
@@ -614,39 +624,25 @@
 				this.runInit(monitor);
 				JobsTimer.start();
 				monitor.beginTask(CooccurrenceUIMessages.CooccurrencesEditor_13, 100);
-				try {		
-					//FIXME: Debug
-					//System.out.println("cooc: "+corpus+" "+query+" "+properties+" "+structure+" "+leftmax+" "+leftmin+" "+rightmin+" "+rightmax+" "+minfreq+" "+mincount+" "+minscore+" "+includeXpivot);
-					//monitor.worked(5);
-
+				try {
 					cooc.setParameters(parameters);
-					if (cooc.canCompute() && cooc.isDirty()) {
-						cooc.compute(false, this);
-					}
 
-					//FIXME: DEbug
-					//					parameters.dump();
-					//					TXMPreferences.dump(CooccurrencePreferences.PREFERENCES_NODE, cooc);
+					cooc.compute(update, this);
 
-					// FIXME: this code should be move in Cooccurrence.getDetails() or getName(), etc?
-					final String message;
-					if (cooc.getLines().size() == 0) {
-						message = (CooccurrenceUIMessages.CooccurrencesEditor_23);
-					}
-					else if (cooc.getLines().size() == 1) {
-						message = (CooccurrenceUIMessages.CooccurrencesEditor_24);
-					}
-					else {
-						message = (CooccurrenceUIMessages.bind(CooccurrenceUIMessages.CooccurrencesEditor_34, cooc.getNumberOfKeyword(), cooc.getNumberOfDifferentCooccurrents()));
-					}
+					// FIXME: this code should be move in
+					// Cooccurrence.getDetails() or getName(), etc?
+					final String message = cooc.getDetails();
 
 					System.out.println(message);
 					this.syncExec(new Runnable() {
 						@Override
 						public void run() {
-							String txt = "tp "+cooc.getNumberOfKeyword()+", vc "+cooc.getNumberOfDifferentCooccurrents()+", tc "+cooc.getNumberOfCooccurrents(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-							try { txt += ", T "+cooc.getCorpus().getSize();} //$NON-NLS-1$
-							catch(Exception e) {System.out.println(CooccurrenceUIMessages.CooccurrencesEditor_25);}
+							String txt = "tp " + cooc.getNumberOfKeyword() + ", vc " + cooc.getNumberOfDifferentCooccurrents() + ", tc " + cooc.getNumberOfCooccurrents(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							try {
+								txt += ", T " + cooc.getCorpus().getSize();} //$NON-NLS-1$
+							catch (Exception e) {
+								System.out.println(CooccurrenceUIMessages.CooccurrencesEditor_25);
+							}
 							String tooltip = "- " + txt.replaceAll(", ", "\n- "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 
 							empantPanel.setInfo(txt, tooltip);
@@ -656,19 +652,106 @@
 					// End of FIXME
 				}
 				// user canceling
-				catch(ThreadDeath e) {
+				catch (ThreadDeath e) {
 					close(true);
 					return Status.CANCEL_STATUS;
+				} catch (Exception e) {
+					close(true);
+					Logger.severe(CooccurrenceUIMessages.CooccurrencesEditor_1 + " " + Logger.toString(e)); //$NON-NLS-1$
+					e.printStackTrace();
+					try {
+						Logger.info(RCPMessages.LastCQPError + CQPEngine.getCqiClient().getLastCQPError());
+					} catch (Exception e2) {
+						Logger.severe("Error: " + e2.getLocalizedMessage()); //$NON-NLS-1$
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					}
+
+					return Status.CANCEL_STATUS;
 				}
-				catch (Exception e) {
+				monitor.worked(5);
+				// System.out.println(cooc.toInfos());
+
+				monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_14);
+
+				if (monitor.isCanceled())
+					return Status.CANCEL_STATUS;
+
+				monitor.subTask(CooccurrenceUIMessages.CooccurrencesEditor_15);
+				this.syncExec(new Runnable() {
+					@Override
+					public void run() {
+						viewer.setInput(cooc.getLines());
+						sort();
+
+						viewer.getControl().setRedraw(false);
+						viewer.refresh();
+						for (TableColumn col : viewer.getTable().getColumns()) {
+							col.pack();
+						}
+						viewer.getControl().setRedraw(true);
+
+						// FIXME: need to be done in another way with after the
+						// plugin split
+						QueriesView.refresh();
+						RVariablesView.refresh();
+
+						viewer.getTable().setFocus();
+					}
+				});
+
+				monitor.worked(35);
+				monitor.done();
+				JobsTimer.stopAndPrint();
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob();
+	}
+
+	@Override
+	public void refresh(boolean update) {
+
+		JobHandler jobhandler = new JobHandler(NLS.bind(CooccurrenceUIMessages.CooccurrencesEditor_12, cooc.getCorpus())) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				JobsTimer.start();
+				monitor.beginTask(CooccurrenceUIMessages.CooccurrencesEditor_13, 100);
+				try {
+
+					// FIXME: this code should be move in
+					// Cooccurrence.getDetails() or getName(), etc?
+					final String message = cooc.getDetails();
+
+					System.out.println(message);
+					this.syncExec(new Runnable() {
+						@Override
+						public void run() {
+							String txt = "tp " + cooc.getNumberOfKeyword() + ", vc " + cooc.getNumberOfDifferentCooccurrents() + ", tc " + cooc.getNumberOfCooccurrents(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							try {
+								txt += ", T " + cooc.getCorpus().getSize();} //$NON-NLS-1$
+							catch (Exception e) {
+								System.out.println(CooccurrenceUIMessages.CooccurrencesEditor_25);
+							}
+							String tooltip = "- " + txt.replaceAll(", ", "\n- "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+							empantPanel.setInfo(txt, tooltip);
+						}
+					});
+					// End of FIXME
+				}
+				// user canceling
+				catch (ThreadDeath e) {
 					close(true);
-					Logger.severe(CooccurrenceUIMessages.CooccurrencesEditor_1  + " " + Logger.toString(e)); //$NON-NLS-1$
+					return Status.CANCEL_STATUS;
+				} catch (Exception e) {
+					close(true);
+					Logger.severe(CooccurrenceUIMessages.CooccurrencesEditor_1 + " " + Logger.toString(e)); //$NON-NLS-1$
 					e.printStackTrace();
 					try {
-						Logger.info(RCPMessages.LastCQPError+CQPEngine.getCqiClient().getLastCQPError());
-					}
-					catch (Exception e2) {
-						Logger.severe("Error: "+e2.getLocalizedMessage()); //$NON-NLS-1$
+						Logger.info(RCPMessages.LastCQPError + CQPEngine.getCqiClient().getLastCQPError());
+					} catch (Exception e2) {
+						Logger.severe("Error: " + e2.getLocalizedMessage()); //$NON-NLS-1$
 						org.txm.rcp.utils.Logger.printStackTrace(e);
 					}
 
@@ -686,6 +769,7 @@
 				this.syncExec(new Runnable() {
 					@Override
 					public void run() {
+						System.out.println(""+cooc.getLines());
 						viewer.setInput(cooc.getLines());
 						sort();
 
@@ -696,9 +780,8 @@
 						}
 						viewer.getControl().setRedraw(true);
 
-						refresh();
-
-						//FIXME: need to be done in another way with after the plugin split
+						// FIXME: need to be done in another way with after the
+						// plugin split
 						QueriesView.refresh();
 						RVariablesView.refresh();
 
@@ -716,7 +799,8 @@
 	}
 
 	/**
-	 * Updates the parameters area from values from parameters, local result node or preferences.
+	 * Updates the parameters area from values from parameters, local result
+	 * node or preferences.
 	 */
 	protected void initializeFields() {
 		queryWidget.setText(this.getStringParameterValue(CooccurrencePreferences.QUERY));
@@ -736,19 +820,21 @@
 		TFreq.setSelection(this.getIntParameterValue(CooccurrencePreferences.MIN_FREQ));
 		TCount.setSelection(this.getIntParameterValue(CooccurrencePreferences.MIN_COUNT));
 
-		TScore.setText(""+this.getDoubleParameterValue(CooccurrencePreferences.MIN_SCORE));
+		TScore.setText("" + this.getDoubleParameterValue(CooccurrencePreferences.MIN_SCORE));
 
-		empantPanel.setMinLeft(this.getIntParameterValue(CooccurrencePreferences.MIN_LEFT)-1);
-		empantPanel.setMaxLeft(this.getIntParameterValue(CooccurrencePreferences.MAX_LEFT)-1);
-		empantPanel.setMinRight(this.getIntParameterValue(CooccurrencePreferences.MIN_RIGHT)-1);
-		empantPanel.setMaxRight(this.getIntParameterValue(CooccurrencePreferences.MAX_RIGHT)-1);
+		empantPanel.setMinLeft(this.getIntParameterValue(CooccurrencePreferences.MIN_LEFT) - 1);
+		empantPanel.setMaxLeft(this.getIntParameterValue(CooccurrencePreferences.MAX_LEFT) - 1);
+		empantPanel.setMinRight(this.getIntParameterValue(CooccurrencePreferences.MIN_RIGHT) - 1);
+		empantPanel.setMaxRight(this.getIntParameterValue(CooccurrencePreferences.MAX_RIGHT) - 1);
 	}
 
 	/**
 	 * Sets the col comparator.
 	 *
-	 * @param comp the comp
-	 * @param col the col
+	 * @param comp
+	 *            the comp
+	 * @param col
+	 *            the col
 	 */
 	private void setColComparator(CLineComparator comp, TableColumn col) {
 		currentComparator = comp;
@@ -768,7 +854,8 @@
 	/**
 	 * Creates the context menu.
 	 *
-	 * @param tableViewer the table viewer
+	 * @param tableViewer
+	 *            the table viewer
 	 */
 	private void createContextMenu(TableViewer tableViewer) {
 
@@ -782,7 +869,6 @@
 		getSite().setSelectionProvider(tableViewer);
 	}
 
-
 	/**
 	 * Gets the corpus.
 	 *
@@ -804,7 +890,8 @@
 	/**
 	 * Do save.
 	 *
-	 * @param arg0 the arg0
+	 * @param arg0
+	 *            the arg0
 	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	@Override
@@ -822,20 +909,7 @@
 
 	}
 
-
-
 	/**
-	 * 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
@@ -855,25 +929,21 @@
 			try {
 				Log.info(NLS.bind(CooccurrenceUIMessages.CooccurrencesEditor_0, currentComparator.getName()));
 
-				PlatformUI.getWorkbench().getProgressService().busyCursorWhile(
-						new IRunnableWithProgress() {
-							@Override
-							public void run(IProgressMonitor monitor)
-									throws InvocationTargetException,
-									InterruptedException {
-								try {
-									cooc.sort(currentComparator);
-								} catch (CqiClientException e) {
-									System.err.println("Error: "+e.getLocalizedMessage());
-								}
-							}
-						});
+				PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
+					@Override
+					public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+						try {
+							cooc.sort(currentComparator);
+						} catch (CqiClientException e) {
+							System.err.println("Error: " + e.getLocalizedMessage());
+						}
+					}
+				});
 			} catch (Exception e) {
-				System.err.println("Error: "+e.getLocalizedMessage());
+				System.err.println("Error: " + e.getLocalizedMessage());
 				org.txm.rcp.utils.Logger.printStackTrace(e);
 			}
 			viewer.refresh();
 		}
 	}
-
 }
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java	(revision 541)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java	(revision 542)
@@ -74,19 +74,13 @@
 			return null;
 		}
 
-		if (!CQPEngine.isInitialized()) {
-			System.out.println("SearchEngine is not ready. Aborting.");
+		if (!this.checkCorpusEngine()) {
 			return null;
 		}
 		
 		Object selection = this.getSelection(event);
 		TXMResultEditorInput editorInput = null;
 		
-		// new editor from concordance
-		// FIXME: need to edit this code, the computing must be done in the editor part, also need to check the process() method
-		// this code should be moved to the Concordance plugin, it should create a TXMParameters from the concordance object then call this RCP parametrized command "ComputeCooccurrence"
-		// by giving it the TXMParameters
-		
 		Cooccurrence cooc = null;
 		
 		if (selection instanceof Concordance) {
@@ -118,7 +112,6 @@
 				cooc.setParameters(query, properties, limit,
 				maxleft, minleft, minright, maxright, minf, mincof,
 				minscore, false, buildLexicalTableWithCooccurrents);
-				//cooc.process();
 			} catch (Exception e) {
 				Log.printStackTrace(e);
 				return null;
Index: tmp/org.txm.utils/src/org/txm/utils/messages/Utf8NLS.java
===================================================================
--- tmp/org.txm.utils/src/org/txm/utils/messages/Utf8NLS.java	(revision 541)
+++ tmp/org.txm.utils/src/org/txm/utils/messages/Utf8NLS.java	(revision 542)
@@ -25,7 +25,7 @@
 	 */
 	public static void initializeMessages(final Class<?> clazz) {
 		// initialize resource bundle
-		initializeMessages(clazz.getPackage().toString(), clazz);
+		initializeMessages(clazz.getPackage().getName()+".messages", clazz);
 	}
 	
 	/**
@@ -58,7 +58,6 @@
 			catch(Exception e) {
 				//	e.printStackTrace();
 			}
-
 		}
 	}
 }
Index: tmp/org.txm.utils/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- tmp/org.txm.utils/.settings/org.eclipse.jdt.core.prefs	(revision 541)
+++ tmp/org.txm.utils/.settings/org.eclipse.jdt.core.prefs	(revision 542)
@@ -5,3 +5,287 @@
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=400
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
Index: tmp/org.txm.utils/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- tmp/org.txm.utils/.settings/org.eclipse.jdt.ui.prefs	(revision 0)
+++ tmp/org.txm.utils/.settings/org.eclipse.jdt.ui.prefs	(revision 542)
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+formatter_profile=_Mine
+formatter_settings_version=12

Property changes on: tmp/org.txm.utils/.settings/org.eclipse.jdt.ui.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/messages/CooccurrenceCoreMessages.java
===================================================================
--- tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/messages/CooccurrenceCoreMessages.java	(revision 541)
+++ tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/messages/CooccurrenceCoreMessages.java	(revision 542)
@@ -25,6 +25,8 @@
 	public static String Cooccurrence_8;
 	public static String Cooccurrence_9;
 
+	public static String CooccurrencesEditor_23;
+	public static String CooccurrencesEditor_24;
 	public static String CooccurrencesEditor_27;
 	public static String CooccurrencesEditor_28;
 	public static String CooccurrencesEditor_29;
Index: tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/CooccurrenceMaths.java
===================================================================
--- tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/CooccurrenceMaths.java	(revision 0)
+++ tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/CooccurrenceMaths.java	(revision 542)
@@ -0,0 +1,157 @@
+package org.txm.cooccurrence.core.functions;
+
+import org.txm.cooccurrence.core.messages.CooccurrenceCoreMessages;
+
+/**
+ * static methods to compute cooccurrences scores
+ * 
+ * @author mdecorde
+ *
+ */
+public class CooccurrenceMaths {
+	
+	/** The array of xyz values. */
+	static double[] a = new double[101];
+
+	/** The arbicoln. */
+	static double[][] arbicoln = new double[101][101];
+
+	/** The cof. */
+	static double[] cof = { 76.18009172947146, -86.50532032941677,
+		24.01409824083091, -1.231739572450155, 0.1208650973866179e-2,
+		-0.5395239384953e-5 };
+
+	/** The maxprec. */
+	static double maxprec = 0.0;
+
+	
+	static {// void init_rbicoln()
+		int i, j;
+
+		for (i = 0; i < 101; i++)
+			for (j = 0; j < 101; j++)
+				arbicoln[i][j] = -1;
+	}
+
+	/**
+	 * Factln.
+	 *
+	 * @param n the n
+	 * @return the double
+	 */
+	static double factln(int n) {
+		if (n < 0)
+			System.err.println(CooccurrenceCoreMessages.Cooccurrence_102);
+		if (n <= 1)
+			return 0.0;
+		if (n <= 100)
+			return (a[n] > 0) ? a[n] : (a[n] = gammln(n + 1.0));
+			else
+				return gammln(n + 1.0);
+	}
+
+	/**
+	 * Gammln.
+	 *
+	 * @param xx the xx
+	 * @return the double
+	 */
+	static double gammln(double xx) {
+		double x, y, tmp, ser;
+
+		int j;
+
+		y = x = xx;
+		tmp = x + 5.5;
+		tmp -= (x + 0.5) * Math.log(tmp);
+		ser = 1.000000000190015;
+		for (j = 0; j <= 5; j++)
+			ser += cof[j] / ++y;
+		return -tmp + Math.log(2.5066282746310005 * ser / x);
+	}
+
+	// Maths
+	/**
+	 * Proba binom.
+	 *
+	 * @param inf the inf
+	 * @param ing the ing
+	 * @param s the s
+	 * @param cf the cf
+	 * @return the double
+	 */
+	public static double ProbaBinom(long inf, long ing, long s, long cf) {
+		long mode = (long) Math.floor((double) ((inf + 1) * (ing + 1))
+				/ (inf + ing + s + 2));
+		long f, g, k;
+		double P = 0.0, p, lp, dnm;
+		int lpflag = 1;
+
+		if (cf <= mode)
+			return (1.0);
+
+		if (inf < ing) {
+			f = inf;
+			g = ing;
+		} else {
+			f = ing;
+			g = inf;
+		}
+		;
+
+		dnm = rbicoln((int) (f + g + s), (int) g);
+		for (k = cf; k <= f; k++) {
+			p = Math.exp(rbicoln((int) f, (int) k)
+					+ rbicoln((int) (s + g), (int) (g - k)) - dnm);
+			// if (lpflag > 0) { // rentre dedans de toute facon
+			lp = p;
+			lpflag = 0;
+			// };
+			if ((lp / p) < maxprec)
+				break;
+			lp = p;
+			P += p;
+		}
+		;
+
+		return (P);
+
+		/*
+		 * for (k = 0; k < cf; k++) { p = exp(rbicoln(f,
+		 * k)+rbicoln(s+g,g-k)-rbicoln(f+g+s, g)); P += p; }; return(fabs(1-P));
+		 */
+	}
+
+	/**
+	 * Rbicoln.
+	 *
+	 * @param n the n
+	 * @param k the k
+	 * @return the double
+	 */
+	static double rbicoln(int n, int k) {
+		if (n < 0)
+			System.err.println(CooccurrenceCoreMessages.Cooccurrence_103);
+		if (k < 0)
+			System.err.println(CooccurrenceCoreMessages.Cooccurrence_103);
+		if (n <= 100 && k <= 100)
+			return (arbicoln[n][k] >= 0) ? arbicoln[n][k]
+					: (arbicoln[n][k] = factln(n) - factln(k) - factln(n - k));
+			else
+				return factln(n) - factln(k) - factln(n - k);
+	}
+	
+	/**
+	 * Calcmode.
+	 *
+	 * @param inf the inf
+	 * @param ing the ing
+	 * @param s the s
+	 * @param cf the cf
+	 * @return the long
+	 */
+	long calcmode(long inf, long ing, long s, long cf) {
+		return (long) Math.floor((double) ((inf + 1) * (ing + 1))
+				/ (inf + ing + s + 2));
+	}
+}

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

Index: tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java
===================================================================
--- tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java	(revision 541)
+++ tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java	(revision 542)
@@ -75,20 +75,6 @@
  */
 public class Cooccurrence extends TXMResult  {
 
-	/** The a. */
-	static double[] a = new double[101];
-
-	/** The arbicoln. */
-	static double[][] arbicoln = new double[101][101];
-
-	/** The cof. */
-	static double[] cof = { 76.18009172947146, -86.50532032941677,
-		24.01409824083091, -1.231739572450155, 0.1208650973866179e-2,
-		-0.5395239384953e-5 };
-
-	/** The maxprec. */
-	static double maxprec = 0.0;
-
 	/** The nocooc. */
 	protected static int nocooc = 1;
 	/** The prefix r. */
@@ -173,14 +159,13 @@
 	/** The P. */
 	int P = -1;
 
+	String pCooccurentQueryFilter = "[]"; //$NON-NLS-1$
 	/** The mincof. */
 	private int pFCoocFilter;
 	/** The minf. */
 	private int pFminFilter;
 	/** The include xpivot. */
 	private boolean pIncludeXpivot;
-	/** The structural unit context limit. */
-	StructuralUnit pStructuralUnitLimit;
 	/** The maxleft. */
 	int pMaxLeftContextSize;
 	/** The maxright. */
@@ -196,7 +181,8 @@
 	/** The minscore. */
 	private double pScoreMinFilter;
 
-	String pCooccurentQueryFilter = "[]"; //$NON-NLS-1$
+	/** The structural unit context limit. */
+	StructuralUnit pStructuralUnitLimit;
 
 	/** The reference corpus to use = the R symbol that point to a matrix WordxFreqs. */
 	String referenceCorpus;
@@ -210,132 +196,87 @@
 	/** The writer. */
 	private BufferedWriter writer;
 
-	static {// void init_rbicoln()
-		int i, j;
-
-		for (i = 0; i < 101; i++)
-			for (j = 0; j < 101; j++)
-				arbicoln[i][j] = -1;
-	}
-
 	/**
-	 * Factln.
-	 *
-	 * @param n the n
-	 * @return the double
+	 * Creates an empty <link>Cooccurrence</link> object, child of the specified <link>Corpus</link>.
+	 * @param corpus
 	 */
-	static double factln(int n) {
-		if (n < 0)
-			System.err.println(CooccurrenceCoreMessages.Cooccurrence_102);
-		if (n <= 1)
-			return 0.0;
-		if (n <= 100)
-			return (a[n] > 0) ? a[n] : (a[n] = gammln(n + 1.0));
-			else
-				return gammln(n + 1.0);
+	public Cooccurrence(Corpus corpus) {
+		super(corpus);
 	}
 
 	/**
-	 * Gammln.
-	 *
-	 * @param xx the xx
-	 * @return the double
+	 * 
+	 * @param watcher
+	 * @param pQuery
+	 * @param pProperties
+	 * @param pStructuralUnitLimit
+	 * @param minleft
+	 * @param maxleft
+	 * @param minright
+	 * @param maxright
+	 * @param minf
+	 * @param minscore
+	 * @param mincof
+	 * @param pIncludeXpivot
+	 * @param buildLexicalTableWithCooccurrents
+	 * @return
 	 */
-	static double gammln(double xx) {
-		double x, y, tmp, ser;
+	protected boolean _compute(boolean update) {
+		//FIXME: debug
+		//System.out.println("cooc: "+corpus+" "+query+" "+properties+" "+limit+" "+maxLeft+" "+minLeft+" "+minRight+" "+maxRight+" "+minFreq+" "+minCof+" "+minScore+" "+includeXpivot);
 
-		int j;
+		monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_27);
+		try {
+			if (!this.stepQueryLimits()) {
+				return false;
+			}	
 
-		y = x = xx;
-		tmp = x + 5.5;
-		tmp -= (x + 0.5) * Math.log(tmp);
-		ser = 1.000000000190015;
-		for (j = 0; j <= 5; j++)
-			ser += cof[j] / ++y;
-		return -tmp + Math.log(2.5066282746310005 * ser / x);
-	}
+			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_28);
+			if (!this.stepGetMatches()) {
+				return false;
+			}
+			monitor.worked(10);
 
-	// Maths
-	/**
-	 * Proba binom.
-	 *
-	 * @param inf the inf
-	 * @param ing the ing
-	 * @param s the s
-	 * @param cf the cf
-	 * @return the double
-	 */
-	public static double ProbaBinom(long inf, long ing, long s, long cf) {
-		long mode = (long) Math.floor((double) ((inf + 1) * (ing + 1))
-				/ (inf + ing + s + 2));
-		long f, g, k;
-		double P = 0.0, p, lp, dnm;
-		int lpflag = 1;
+			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_29);
+			if (!this.stepBuildSignatures())
+				return false;
+			monitor.worked(10);
 
-		if (cf <= mode)
-			return (1.0);
+			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_30);
+			if (!this.stepCount())	{
+				return false;
+			}
+			monitor.worked(10);
 
-		if (inf < ing) {
-			f = inf;
-			g = ing;
-		} else {
-			f = ing;
-			g = inf;
-		}
-		;
+			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_31);
+			this.acquireSemaphore();
+			if (!this.stepBuildLexicalTable())	{
+				return false;
+			}
+			monitor.worked(10);
+			this.releaseSemaphore();
 
-		dnm = rbicoln((int) (f + g + s), (int) g);
-		for (k = cf; k <= f; k++) {
-			p = Math.exp(rbicoln((int) f, (int) k)
-					+ rbicoln((int) (s + g), (int) (g - k)) - dnm);
-			// if (lpflag > 0) { // rentre dedans de toute facon
-			lp = p;
-			lpflag = 0;
-			// };
-			if ((lp / p) < maxprec)
-				break;
-			lp = p;
-			P += p;
+			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_32);
+			this.acquireSemaphore();
+			if (!this.stepGetScores())	{
+				return false;
+			}
+			monitor.worked(10);
+			this.releaseSemaphore();
 		}
-		;
+		// user canceling
+		catch(ThreadDeath e) {
+			return false;
+		}
+		catch(Exception e) {
+			e.printStackTrace();
+			return false;
+		}
 
-		return (P);
-
-		/*
-		 * for (k = 0; k < cf; k++) { p = exp(rbicoln(f,
-		 * k)+rbicoln(s+g,g-k)-rbicoln(f+g+s, g)); P += p; }; return(fabs(1-P));
-		 */
-
+		return true;
 	}
 
 	/**
-	 * Rbicoln.
-	 *
-	 * @param n the n
-	 * @param k the k
-	 * @return the double
-	 */
-	static double rbicoln(int n, int k) {
-		if (n < 0)
-			System.err.println(CooccurrenceCoreMessages.Cooccurrence_103);
-		if (k < 0)
-			System.err.println(CooccurrenceCoreMessages.Cooccurrence_103);
-		if (n <= 100 && k <= 100)
-			return (arbicoln[n][k] >= 0) ? arbicoln[n][k]
-					: (arbicoln[n][k] = factln(n) - factln(k) - factln(n - k));
-			else
-				return factln(n) - factln(k) - factln(n - k);
-	}
-
-	/**
-	 * Creates an empty <link>Cooccurrence</link> object, child of the specified <link>Corpus</link>.
-	 * @param corpus
-	 */
-	public Cooccurrence(Corpus corpus) {
-		super(corpus, null);
-	}
-
-	/**
 	 * As r matrix.
 	 *
 	 * @return the string
@@ -380,18 +321,35 @@
 		return symbol;
 	}
 
-	/**
-	 * Calcmode.
-	 *
-	 * @param inf the inf
-	 * @param ing the ing
-	 * @param s the s
-	 * @param cf the cf
-	 * @return the long
-	 */
-	long calcmode(long inf, long ing, long s, long cf) {
-		return (long) Math.floor((double) ((inf + 1) * (ing + 1))
-				/ (inf + ing + s + 2));
+	@Override
+	public boolean canCompute() {
+
+		if (pQuery == null || pQuery.isEmpty()) {
+			System.out.println("No query set.");
+			return false;
+		}
+
+		if (pProperties == null) {
+			System.out.println("No properties set.");
+			return false;
+		}
+
+		if (getCorpus() == null) {
+			System.out.println("No corpus set.");
+			return false;
+		}
+
+		if (pQuery.getQueryString().length() == 0) {
+			System.out.println("Query is empty.");
+			return false;
+		}
+
+		if (pProperties.size() == 0) {
+			System.out.println("No properties filled.");
+			return false;
+		}
+
+		return true;
 	}
 
 	@Override
@@ -427,79 +385,6 @@
 	}
 
 	/**
-	 * 
-	 * @param watcher
-	 * @param pQuery
-	 * @param pProperties
-	 * @param pStructuralUnitLimit
-	 * @param minleft
-	 * @param maxleft
-	 * @param minright
-	 * @param maxright
-	 * @param minf
-	 * @param minscore
-	 * @param mincof
-	 * @param pIncludeXpivot
-	 * @param buildLexicalTableWithCooccurrents
-	 * @return
-	 */
-	protected boolean _compute(boolean update) {
-		this.monitor = monitor;
-		//FIXME: debug
-		//System.out.println("cooc: "+corpus+" "+query+" "+properties+" "+limit+" "+maxLeft+" "+minLeft+" "+minRight+" "+maxRight+" "+minFreq+" "+minCof+" "+minScore+" "+includeXpivot);
-
-		monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_27);
-		try {
-			if (!this.stepQueryLimits()) {
-				return false;
-			}	
-
-			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_28);
-			if (!this.stepGetMatches()) {
-				return false;
-			}
-			monitor.worked(10);
-
-			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_29);
-			if (!this.stepBuildSignatures())
-				return false;
-			monitor.worked(10);
-
-			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_30);
-			if (!this.stepCount())	{
-				return false;
-			}
-			monitor.worked(10);
-
-			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_31);
-			this.acquireSemaphore();
-			if (!this.stepBuildLexicalTable())	{
-				return false;
-			}
-			monitor.worked(10);
-			this.releaseSemaphore();
-
-			monitor.subTask(CooccurrenceCoreMessages.CooccurrencesEditor_32);
-			this.acquireSemaphore();
-			if (!this.stepGetScores())	{
-				return false;
-			}
-			monitor.worked(10);
-			this.releaseSemaphore();
-		}
-		// user canceling
-		catch(ThreadDeath e) {
-			return false;
-		}
-		catch(Exception e) {
-			e.printStackTrace();
-			return false;
-		}
-
-		return true;
-	}
-
-	/**
 	 * Count occ.
 	 *
 	 * @param propsvalue the propsvalue
@@ -557,15 +442,6 @@
 		}
 	}
 
-	/**
-	 * Gets the corpus.
-	 *
-	 * @return the corpus
-	 */
-	public Corpus getCorpus() {
-		return (Corpus) this.getParent();
-	}
-
 	//	/**
 	//	 * Compute.
 	//	 *
@@ -641,8 +517,18 @@
 	//		return true;
 	//	}
 
+	/**
+	 * Gets the corpus.
+	 *
+	 * @return the corpus
+	 */
+	public Corpus getCorpus() {
+		return (Corpus) this.getParent();
+	}
+
 	@Override
 	public String getDetails() {
+
 		StringBuffer buf = new StringBuffer(60);
 		buf.append("Cooc: \n"); //$NON-NLS-1$
 		buf.append(" Corpus: " + this.getParent() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -791,9 +677,9 @@
 		if (pMaxLeftContextSize > 0 && pMaxRightContextSize > 0)	{
 			output.append(" (" + (pMaxLeftContextSize-1) + ", " + (pMaxRightContextSize-1) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
 		}
-		
+
 		if (output.length() == 0) output.append(getParent().getName()); // if the result was not computed
-		
+
 		return output.toString();
 	}
 
@@ -868,7 +754,7 @@
 			this.parent = corpus;
 			pQuery = conc.getQuery();
 			// System.out.println("CONC PROPS :"+conc.getViewProperties());
-			pProperties = conc.getViewProperties();
+			pProperties = conc.getKeywordViewProperties();
 			pStructuralUnitLimit = null;
 			pMaxLeftContextSize = conc.getLeftContextSize();
 			pMaxRightContextSize = conc.getRightContextSize();
@@ -948,7 +834,6 @@
 		this.pIncludeXpivot = includeXpivot;
 		this.buildLexicalTableWithCooccurrents = buildLexicalTableWithCooccurrents;
 
-		saveParameters();
 	}
 
 	@Override
@@ -960,7 +845,13 @@
 
 			StructuralUnit limit = corpus.getStructuralUnit(this.getStringParameterValue(CooccurrencePreferences.LIMIT));
 
-			List<Property> properties = (List<Property>)parameters.get(CooccurrencePreferences.PROPERTIES);
+			Object propsParam = parameters.get(CooccurrencePreferences.PROPERTIES);
+			List<Property> properties = null;
+			if (propsParam instanceof List)
+				properties = (List<Property>)propsParam;
+			else if (propsParam instanceof String) {
+				// parse String
+			}
 
 			int maxLeft = this.getIntParameterValue(CooccurrencePreferences.MAX_LEFT);
 			int minLeft = this.getIntParameterValue(CooccurrencePreferences.MIN_LEFT);
@@ -1542,17 +1433,6 @@
 		return true;
 	}
 
-	@Override
-	public boolean canCompute() {
-
-		boolean ret = pQuery != null && pProperties != null && getCorpus() != null && pQuery.getQueryString().length() > 0 && pProperties.size() > 0;
-
-		if (ret) {
-			this.saveParameters();
-		}
-		return ret;
-	}
-
 	/**
 	 * The Class CLine.
 	 */
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 541)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 542)
@@ -9,6 +9,7 @@
 import java.util.Date;
 import java.util.UUID;
 import java.util.concurrent.Semaphore;
+import java.util.regex.Pattern;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.osgi.framework.FrameworkUtil;
@@ -36,7 +37,10 @@
 	protected String uniqueID;
 	protected String path;
 	public static final DateFormat ID_TIME_FORMAT = new SimpleDateFormat("YYYYMMDD");
-
+	/** Editor can use this to test if the result need to be saved */
+	protected boolean hasBeenComputedOnce = false;
+	public boolean getHasBeenComputedOnce() { return hasBeenComputedOnce;}
+	
 	/**
 	 * The weight, essentially used for sorting purpose.
 	 */
@@ -78,7 +82,7 @@
 	private Semaphore progressSemaphore = new Semaphore(1);
 
 	/**
-	 * This variable ensure the TXMResult class constructor has been called
+	 * This variable ensure the TXMResult class constructor has been called. A lot of necessary things are done in the TXMREsult constructor.
 	 */
 	private boolean constructorCalled;
 
@@ -109,16 +113,6 @@
 	}
 
 	/**
-	 * Creates a new TXMResult, child of the specified parent.
-	 * 
-	 * @param parent
-	 * @param parameters
-	 */
-	public TXMResult(TXMResult parent, TXMParameters parameters) {
-
-	}
-
-	/**
 	 * Creates and stores an UUID dedicated to persistence for this result.
 	 */
 	protected void createUUID() {
@@ -363,7 +357,7 @@
 	}
 
 	/**
-	 * Removes the result from its parent.
+	 * Removes the result from its parent: call the parent's removeResult method.
 	 * 
 	 * @return
 	 */
@@ -377,7 +371,7 @@
 	}
 
 	/**
-	 * Gets all the children results.
+	 * Gets all the children results (nor a clone).
 	 * 
 	 * @return
 	 */
@@ -531,8 +525,8 @@
 	public abstract String getSimpleName();
 
 	/**
-	 * Gets some details about how the result has been computed (eg. additional
-	 * parameters, etc.). Shown in very large UI area
+	 * Gets some details about how the result has been computed  (eg. additional
+	 * parameters, etc.). Shown in large UI area
 	 * 
 	 * @return
 	 */
@@ -554,6 +548,7 @@
 		return this.uniqueID;
 	}
 
+	public static final Pattern filenamePattern = Pattern.compile("[^a-zA-Z0-9\\._-]+"); //$NON-NLS-1$
 	/**
 	 * Gets a string representing the result and that can be used as a file
 	 * name.
@@ -563,7 +558,7 @@
 	// FIXME: to discuss and/or to move in export layer
 	public String getValidFileName() {
 		try {
-			return this.getName().replaceAll("[^a-zA-Z0-9\\._-]+", "_");
+			return filenamePattern.matcher(this.getName()).replaceAll("_"); //$NON-NLS-1$
 		} catch (Exception e) {
 		}
 		return "";
@@ -693,12 +688,15 @@
 	 * 
 	 * @return
 	 */
-	public boolean compute(boolean update) throws Exception {
+	public final boolean compute(boolean update) throws Exception {
 		return this.compute(false, null);
 	}
 
 	/**
-	 * Computes the result.
+	 * Computes the result if 
+	 * it can be computed 
+	 * it is dirty 
+	 * the TXMResult constructor has been called
 	 * 
 	 * @param update
 	 *            TODO
@@ -718,7 +716,7 @@
 		// FIXME: Debug
 		System.err.println("TXMResult.compute(): computing result of type " + this.getClass() + "...");
 
-		if(!this.isDirty())	{
+		if (!this.isDirty()) {
 			
 			// FIXME: Debug
 			System.err.println("TXMResult.compute(): result is not dirty, computing skipped.");
@@ -726,7 +724,7 @@
 			return true;
 		}
 		
-		if(!hasBeenConstructorCalled())	{
+		if (!hasBeenConstructorCalled()) {
 			return false;
 		}
 
@@ -746,11 +744,11 @@
 		}
 
 		if (!saveParameters()) {
-			return false;
+			System.out.println("Warning: "+this.getName()+" parameters are not saved.");
 		}
 
 		this.dirty = false; // the _compute was successful the result is no more dirty
-
+		this.hasBeenComputedOnce = true; 
 		// FIXME: Debug
 		System.err.println("TXMResult.compute(): computing done.");
 
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java	(revision 541)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java	(revision 542)
@@ -155,27 +155,27 @@
 	/** 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 prop separator. */
-	protected String propSeparator = "_"; //$NON-NLS-1$
-
-//	/** The scroll composite. */
-//	private ScrolledComposite scrollComposite;
+//	/** The top line. */
+//	protected int topLine;
 //
-//	/** The head composite. */
-//	private Composite headComposite;
+//	/** The bottom line. */
+//	protected int bottomLine;
+//
+//	/** The nblinesperpage. */
+//	protected int nblinesperpage;
+//
+//	/** The nblinesmax. */
+//	protected int nblinesmax;
+//
+//	/** The prop separator. */
+//	protected String propSeparator = "_"; //$NON-NLS-1$
 
+	//	/** The scroll composite. */
+	//	private ScrolledComposite scrollComposite;
+	//
+	//	/** The head composite. */
+	//	private Composite headComposite;
+
 	/** The title. */
 	String title;
 
@@ -207,17 +207,6 @@
 	}
 
 	/**
-	 * Checks if is dirty.
-	 *
-	 * @return true, if is dirty
-	 * @see org.eclipse.ui.part.EditorPart#isDirty()
-	 */
-	@Override
-	public boolean isDirty() {
-		return index.isDirty();
-	}
-
-	/**
 	 * Checks if is save as allowed.
 	 *
 	 * @return true, if is save as allowed
@@ -233,12 +222,7 @@
 		return false;
 	}
 
-	/**
-	 * Computes index.
-	 */
-	@Override
-	public void computeResult() {
-		StatusLine.setMessage(IndexUIMessages.IndexEditor_33);
+	public void setResultParameters() {
 		final Query query = new Query("");
 		if (!queryWidget.isDisposed() && !queryWidget.getQueryString().equals("\"\"")) { //$NON-NLS-1$
 			query.setQueryString(queryWidget.getQueryString());
@@ -249,66 +233,45 @@
 		final Integer Tmax = Integer.parseInt(this.VmaxSpinner.getText());
 		final Integer nLines = Integer.parseInt(this.NLignePPageSpinner.getText());
 		final List<Property> properties = propsArea.getProperties();
+		
+		index.setNLinesPerPage(NLignePPageSpinner.getSelection());
+		index.setVMax(VmaxSpinner.getSelection());
+		
+		index.setParameters(query, properties, Fmin, Fmax, Tmax, nLines);
+		index.setDirty();
+	}
+	
+	/**
+	 * Computes index.
+	 */
+	@Override
+	public void refresh(final boolean update) {
+		
 		//System.out.println("PROPERTIES: "+properties);
 		title = "Index...";
 		try {
-			JobHandler jobhandler = new JobHandler(title, go.getParent()) {
+			JobHandler jobhandler = new JobHandler(title) {
 				@Override
 				protected IStatus run(IProgressMonitor monitor) {
 					this.runInit(monitor);
 					try {
 						JobsTimer.start();
 
-						index.setParameters(query, properties, Fmin, Fmax, Tmax, nLines);
-
-						if (index.canCompute() && index.isDirty()) {
-
-							title = NLS.bind(IndexUIMessages.IndexEditor_2, new Object[]{
-									query.getQueryString(), properties, index.getCorpus().getName()});
-							if (index.getPartition() != null)
-								title = NLS.bind(IndexUIMessages.IndexEditor_20, new Object[]{
-										query.getQueryString(), properties, index.getCorpus().getName()});
-
-							System.out.println(title);
-							Log.info("Start computing Index...");
-
-							index.compute(false, this);
-						} else {
-							return Status.CANCEL_STATUS;
-						}
-
 						if (monitor.isCanceled())
 							return Status.CANCEL_STATUS;
 
-						final String message;
-						if (index.getV() == 1)
-							message = (RCPMessages.ONE_RESULT);
-						else if (index.getV() > 0)
-							message = (RCPMessages.bind(RCPMessages.CreatePartition_55, index.getV(), index.getT()));
-						else
-							message = (TXMCoreMessages.COMPUTE_DONE_NO_RESULT);
-
-						if (monitor.isCanceled())
-							return Status.CANCEL_STATUS;
-
 						monitor.worked(95);
 						// refresh ui
 						syncExec(new Runnable() {
 							@Override
 							public void run() {
 
-								System.out.println(message);
-								StatusLine.setMessage(message);
-
-								refresh();
-
 								QueriesView.refresh();
 								RVariablesView.refresh();
 
 								if (!queryWidget.isDisposed()) queryWidget.memorize();
-								nblinesperpage = NLignePPageSpinner.getSelection();
-								nblinesmax = VmaxSpinner.getSelection();
-								fillDisplayArea(0, NLignePPageSpinner.getSelection());
+								
+								fillDisplayArea();
 
 								viewer.getTable().setFocus();
 							}
@@ -325,7 +288,7 @@
 							System.out.println(IndexUIMessages.IndexEditor_10+e1);
 							org.txm.rcp.utils.Logger.printStackTrace(e1);
 						}
-						Log.severe("Error while computing Index with "+query+" query: "+e.getLocalizedMessage());
+						Log.severe("Error while computing Index: "+e.getLocalizedMessage());
 					} finally {
 						monitor.done();
 						JobsTimer.stopAndPrint();
@@ -340,33 +303,7 @@
 		}
 	}
 
-
-
 	/**
-	 * Simple query.
-	 *
-	 * @param query the query
-	 * @param props the props
-	 * @return true, if successful
-	 */
-	private boolean simpleQuery(Query query, List<Property> props) {
-		for(Property p : props) {
-			if(p instanceof StructuralUnitProperty) return false;
-		}
-		String trimed = query.getQueryString().trim();
-		Property p = props.get(0);
-		if (props.size() > 1)
-			return false;
-		else if (trimed.equals("[]")) //$NON-NLS-1$
-			return true;
-		else if (trimed.equals("[" + p.getName() + "=\".*\"]")) //$NON-NLS-1$ //$NON-NLS-2$
-		{
-			return true;
-		} 
-		return false;
-	}
-
-	/**
 	 * Creates the part control.
 	 *
 	 * @param parent the parent
@@ -375,10 +312,10 @@
 	@Override
 	public void createPartControl(Composite parent) {
 		super.createPartControl(parent);
-		
+
 		Composite paramArea = this.getCommandParametersGroup();
 		paramArea.setLayout(new FormLayout());
-		
+
 		// info&navigation panel
 		final Composite infosArea = this.topToolBar.installGroup("Infos", "Informations and Navigation", null, true);
 
@@ -414,7 +351,8 @@
 			@Override
 			public void keyPressed(KeyEvent e) {
 				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
-					computeResult();
+					setResultParameters();
+					compute(true);
 				}
 			}
 			@Override
@@ -431,8 +369,8 @@
 			@Override
 			public void handleEvent(Event event) {
 				if (!initializing && TXMPreferences.getBoolean(RCPPreferences.AUTO_UPDATE_EDITOR, RCPPreferences.PREFERENCES_NODE)) {
-					index.setDirty();
-					computeResult();
+					setResultParameters();
+					compute(false);
 				}
 			}
 		});
@@ -455,7 +393,8 @@
 		SelectionListener listener2 = new SelectionListener() {
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				computeResult();
+				setResultParameters();
+				compute(true);
 			}
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) { }
@@ -535,7 +474,9 @@
 
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {
-				fillDisplayArea(0, NLignePPageSpinner.getSelection());
+				index.setTopLine(0);
+				index.setNLinesPerPage(NLignePPageSpinner.getSelection());
+				fillDisplayArea();
 				viewer.getTable().select(0);
 				viewer.getTable().showSelection();
 			}
@@ -555,7 +496,9 @@
 
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				fillDisplayArea(0, NLignePPageSpinner.getSelection());
+				index.setTopLine(0);
+				index.setNLinesPerPage(NLignePPageSpinner.getSelection());
+				fillDisplayArea();
 				viewer.getTable().select(0);
 				viewer.getTable().showSelection();
 			}
@@ -568,10 +511,11 @@
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				int i = (index.getV()/NLignePPageSpinner.getSelection());
-				int top = top = i*NLignePPageSpinner.getSelection();
-
-				int bottom = top + NLignePPageSpinner.getSelection();
-				fillDisplayArea(top, bottom);
+				int top = i*NLignePPageSpinner.getSelection();
+				
+				index.setTopLine(top);
+				fillDisplayArea();
+				
 				viewer.getTable().select(0);
 				viewer.getTable().showSelection();
 			}
@@ -583,9 +527,8 @@
 
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				int top = topLine + NLignePPageSpinner.getSelection();
-				int bottom = top + NLignePPageSpinner.getSelection();
-				fillDisplayArea(top,bottom);
+				index.setTopLine(index.getTopIndex() + index.getNLinesPerPage());
+				fillDisplayArea();
 				viewer.getTable().select(0);
 				viewer.getTable().showSelection();
 			}
@@ -597,11 +540,10 @@
 
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				int top = topLine - NLignePPageSpinner.getSelection();
-				if (top < 0)
-					top = 0;
-				int bottom = top + NLignePPageSpinner.getSelection();
-				fillDisplayArea(top, bottom);
+				int top = index.getTopIndex() - index.getNLinesPerPage();
+				if (top < 0) { top = 0; }
+				index.setTopLine(top);
+				fillDisplayArea();
 				viewer.getTable().select(0);
 				viewer.getTable().showSelection();
 			}
@@ -654,25 +596,25 @@
 		viewer.setContentProvider(new LineContentProvider());
 		viewer.setInput(new ArrayList<Property>());
 
-//TODO replace this with command+menucontribution		
-//		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(IndexEditor.this,
-//							(IStructuredSelection) viewer
-//							.getSelection());
-//				} else if (col == 2) {
-//					IndexToProgression.link(IndexEditor.this,
-//							(IStructuredSelection) viewer
-//							.getSelection());
-//				}
-//			}
-//		});
+		//TODO replace this with command+menucontribution		
+		//		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(IndexEditor.this,
+		//							(IStructuredSelection) viewer
+		//							.getSelection());
+		//				} else if (col == 2) {
+		//					IndexToProgression.link(IndexEditor.this,
+		//							(IStructuredSelection) viewer
+		//							.getSelection());
+		//				}
+		//			}
+		//		});
 
 		nColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
 		nColumn.setText(" "); //$NON-NLS-1$
@@ -701,7 +643,7 @@
 				}
 
 				StatusLine.setMessage(RCPMessages.SORT_DONE);
-				fillDisplayArea(topLine, bottomLine);
+				fillDisplayArea();
 			}
 
 			@Override
@@ -738,7 +680,7 @@
 					}
 				}
 				StatusLine.setMessage(RCPMessages.SORT_DONE);
-				fillDisplayArea(topLine, bottomLine);
+				fillDisplayArea();
 			}
 
 			@Override
@@ -774,7 +716,7 @@
 		viewer.getTable().pack();
 		parent.layout(true);
 
-		computeResult();
+		//compute(true);
 	}
 
 	/**
@@ -884,10 +826,13 @@
 	 * @param from the from
 	 * @param to the to
 	 */
-	public void fillDisplayArea(int from, int to) {
+	public void fillDisplayArea() {
 		// System.out.println("call fill from "+from+" to "+to);
-		from = Math.max(from, 0);
+		int from = index.getTopIndex();
+		
+		int to = from + index.getNLinesPerPage();
 		to = Math.min(to, index.getV());
+		
 		List<Line> lines = null;
 		if (index.getV() > 0) {
 			lines = index.getLines(from, to);
@@ -910,7 +855,7 @@
 
 		String unitColumnHeader = ""; //$NON-NLS-1$
 		for (Property p : index.getProperties())
-			unitColumnHeader += p.getName() + propSeparator;
+			unitColumnHeader += p.getName() + index.getPropertySeparator();
 		if (unitColumnHeader.length() > 0)
 			unitColumnHeader = unitColumnHeader.substring(0, unitColumnHeader
 					.length() - 1);
@@ -918,9 +863,6 @@
 
 		viewer.setInput(lines);
 		viewer.refresh();
-		// System.out.println("table refreshed from "+from+" to "+to+" with : "+lines);
-		topLine = from;
-		bottomLine = to;
 
 		// Refresh and pack the columns
 		viewer.getControl().setRedraw(false);
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/messages_fr.properties	(revision 541)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/messages_fr.properties	(revision 542)
@@ -16,7 +16,6 @@
 SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_CONCORDANCE  = Envoyer la sélection vers la concordance
 SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_COOCCURRENCE = Envoyer la sélection vers la cooccurrence
 SWTChartsComponentProvider_SHARED_SEND_SELECTION_TO_INDEX        = Envoyer la sélection vers l'index
-SWTChartsComponentProvider_SHOWHIDE__TITLE                       = Afficher/masquer le titre
 SWTChartsComponentProvider_SHOW_GRID                             = Afficher la grille
 SWTChartsComponentProvider_SHOW_HIDE_GRID                        = Afficher/masquer la grille
 SWTChartsComponentProvider_SHOW_HIDE_LEGEND                      = Afficher/masquer la légende
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/messages_fr.properties	(revision 541)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/messages_fr.properties	(revision 542)
@@ -3,6 +3,3 @@
 ProgressionPreferencePage_5 = Style de ligne unique
 ProgressionPreferencePage_6 = Répéter les valeurs de propriétés de structures
 ProgressionPreferencePage_7 = Échelle des limites de structures
-
-ProgressionPreferencePage_2 = Progression
-ProgressionPreferencePage_4 = Niveaux de gris
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java	(revision 541)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java	(revision 542)
@@ -374,8 +374,8 @@
 			
 			
 			// Loads new lines, fill the display area and select the table row
-			if(loadLines)	{
-				linkedEditor.fillDisplayArea(top, bottom);
+			if (loadLines)	{
+				linkedEditor.fillDisplayArea();
 			}
 
 			// update range change tracking variables
Index: tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/actions/ViewPropertySelection.java
===================================================================
--- tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/actions/ViewPropertySelection.java	(revision 541)
+++ tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/actions/ViewPropertySelection.java	(revision 542)
@@ -136,6 +136,6 @@
 			break;
 		}
 		
-		concordanceEditor.resetRightTableColumnWidths();
+		//concordanceEditor.resetRightTableColumnWidths();
 	}
 }
Index: tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/DeleteLines.java
===================================================================
--- tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/DeleteLines.java	(revision 541)
+++ tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/DeleteLines.java	(revision 542)
@@ -82,7 +82,7 @@
 		try {
 		//	System.out.println("Delete line "+lines);
 			if (concordance.removeLines(lines)) {
-				editor.fillDisplayArea(editor.getTopLine(), editor.getBottomLine()-lines.size());
+				editor.fillDisplayArea();
 			}
 		} catch (Exception e1) {
 			// TODO Auto-generated catch block
Index: tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java
===================================================================
--- tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 541)
+++ tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 542)
@@ -28,9 +28,9 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -111,7 +111,6 @@
 import org.txm.concordance.rcp.messages.Messages;
 import org.txm.concordance.rcp.widgets.ComplexSortSelector;
 import org.txm.cooccurrence.rcp.messages.CooccurrenceUIMessages;
-import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.core.results.TXMResult;
 import org.txm.functions.internal.InternalView;
@@ -136,7 +135,6 @@
 import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.CQPEngine;
 import org.txm.searchengine.cqp.ReferencePattern;
-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.StructuralUnitProperty;
@@ -167,37 +165,8 @@
 	ComplexSortSelector complexsorter;
 	org.eclipse.swt.widgets.Text cqlSeparator;
 
-	/** The available view keyword properties. */
-	private List<Property> availableKeywordViewProperties;
-	/** The available view left properties. */
-	private List<Property> availableLeftViewProperties;
-	/** The available view right properties. */
-	private List<Property> availableRightViewProperties;
-
-	/** The selected left view properties. */
-	private List<Property> selectedLeftViewProperties;
-	/** The selected right view properties. */
-	private List<Property> selectedRightViewProperties;
-	/** The selected keyword view properties. */
-	private List<Property> selectedKeywordViewProperties;
-
-	/** The available sort properties. */
-	private List<Property> availableKeywordSortProperties;
-	/** The selected keyword sort property. */
-	private List<Property> selectedKeywordSortProperties;
-	/** The selected left sort property. */
-	private List<Property> selectedLeftSortProperties;
-	/** The selected right sort property. */
-	private List<Property> selectedRightSortProperties;
-
-	/** The reference pattern. */
-	private ReferencePattern refViewPattern;
-	private ReferencePattern refSortPattern;
-
-	/** The concordance. */
 	private Concordance concordance;
 
-
 	/** The standard comparator class name. */
 	private LineComparator[] standardComparatorClassName = {
 			new NullComparator(), new LexicographicKeywordComparator(),
@@ -205,27 +174,24 @@
 			new LexicographicRightContextComparator(),
 			new PropertiesReferenceComparator() };
 
-	/** The corpus. */
-	private Corpus corpus;
+	//	/** The n line per page. */
+	//	private int concordance.getNLinePerPage();
+	//
+	//	/** The top line. */
+	//	private int topLine;
+	//
+	//	/** The bottom line. */
+	//	private int bottomLine;
 
-	/** The n line per page. */
-	private int nLinePerPage;
-
-	/** The top line. */
-	private int topLine;
-
-	/** The bottom line. */
-	private int bottomLine;
-
 	/** The current comparator. */
 	protected LineComparator currentComparator;
 
-	/** The left context size. */
-	private int leftContextSize;
+	//	/** The left context size. */
+	//	private int leftContextSize;
+	//
+	//	/** The right context size. */
+	//	private int rightContextSize;
 
-	/** The right context size. */
-	private int rightContextSize;
-
 	/** The mouseposition. */
 	private Point mouseposition;
 
@@ -309,7 +275,7 @@
 	private ArrayList<Property> availableRightSortProperties;
 
 	private Sash sash;
-	
+
 	HashSet<ConcordanceEditorExtension> extensions = new HashSet<ConcordanceEditorExtension>();
 
 	private Listener tableResizeListener;
@@ -327,14 +293,6 @@
 	public void doSaveAs() { }
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.ui.part.EditorPart#isDirty()
-	 */
-	@Override
-	public boolean isDirty() {
-		return false;
-	}
-
-	/* (non-Javadoc)
 	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
 	 */
 	@Override
@@ -358,15 +316,15 @@
 			throws PartInitException {
 		setSite(site);
 		setInput(input);
-		
+
 		initializeEditor();
-		
+
 		// fetch extensions
 		IConfigurationElement[] config = Platform.getExtensionRegistry()
 				.getConfigurationElementsFor(ConcordanceEditorExtension.EXTENSION_ID);
 		Log.warning("Installing ConcordanceEditorExtension...");
 		Log.warning(Arrays.toString(config));
-		
+
 		for (IConfigurationElement e : config) {
 			try {
 				Log.warning(" "+e.getName()+" from "+e.getContributor().getName());
@@ -403,45 +361,14 @@
 			throw new PartInitException("Cannot open ConcordanceEditor with "+result);
 		}
 		this.concordance = (Concordance)result;
-		this.corpus = concordance.getCorpus();
 
 		this.standardComparators = new ArrayList<LineComparator>();
 		this.userDefinedComparators = new ArrayList<LineComparator>();
 		new ArrayList<LineComparator>();
 		setStandardComparators();
-		this.nLinePerPage = TXMPreferences.getInt(ConcordancePreferences.N_LINE_PER_PAGE, ConcordancePreferences.PREFERENCES_NODE);
-		try {
-			this.availableKeywordViewProperties = new ArrayList<Property>(
-					corpus.getOrderedProperties());
-			this.availableLeftViewProperties = new ArrayList<Property>(corpus
-					.getOrderedProperties());
-			this.availableRightViewProperties = new ArrayList<Property>(corpus
-					.getOrderedProperties());
-			this.availableLeftSortProperties = new ArrayList<Property>(corpus
-					.getOrderedProperties());
-			this.availableKeywordSortProperties = new ArrayList<Property>(corpus
-					.getOrderedProperties());
-			this.availableRightSortProperties = new ArrayList<Property>(corpus
-					.getOrderedProperties());
-		} catch (CqiClientException e) {
-			//System.err.println(Messages.CorporaView_3+" : "+Log.toString(e)); //$NON-NLS-1$
-			try {
-				System.out.println(Messages.ConcordancesEditor_0+CQPEngine.getCqiClient().getLastCQPError());
-				Log.severe(Messages.ConcordancesEditor_0+CQPEngine.getCqiClient().getLastCQPError());
-			} catch (Exception e1) {
-				org.txm.rcp.utils.Logger.printStackTrace(e1);
-				Log.severe("Error while computing concordance: "+e.getLocalizedMessage());
-			} 
+		concordance.setNLinePerPage(TXMPreferences.getInt(ConcordancePreferences.N_LINE_PER_PAGE, ConcordancePreferences.PREFERENCES_NODE));
 
-			return;
-		}
-
-		initializeFields();
-
-		if (concordance != null)
-			setPartName(concordance.getName());
-		else
-			setPartName(corpus.getName());
+		setPartName(concordance.getName());
 	}
 
 	/* (non-Javadoc)
@@ -450,10 +377,6 @@
 	@Override
 	public void createPartControl(Composite parent) {
 		super.createPartControl(parent); // create the top toolbar, display area and bottom toolbar
-		
-//		this.parent = parent;
-//
-//		parent.setLayout(new FormLayout());
 
 		Composite controlArea = getCommandParametersGroup();
 
@@ -465,10 +388,8 @@
 			if (complexsorter != null) {
 				complexsorter.setComparators(this);
 			}
-			
-			fillDisplayArea(topLine, bottomLine); // init columns and show first results if any
-			resetColumnWidths();
-			
+
+			fillDisplayArea();
 		} catch(Exception e) {
 			System.out.println("Error while building interface: "+e.getLocalizedMessage());
 			Log.printStackTrace(e);
@@ -476,7 +397,7 @@
 	}
 
 	private void composeExtraAreas(Composite controlArea, Composite displayArea) {
-		
+
 		for (final ConcordanceEditorExtension ext : extensions) {
 			ISafeRunnable runnable = new ISafeRunnable() {
 				@Override
@@ -509,16 +430,16 @@
 		viewer2.setLabelProvider(new LineLabelProvider(this) {
 			@Override
 			public String getColumnText(Object element, int columnIndex) {
-					Line line = (Line) element;
-					return line.getViewRef().toString();
+				Line line = (Line) element;
+				return line.getViewRef().toString();
 			}
 		});
 		viewer2.setContentProvider(new ConcordancesProvider());
 		viewer2.getTable().setLinesVisible(true);
 		viewer2.getTable().setHeaderVisible(true);
 
-//		firstColumn = new TableColumn(viewer2.getTable(), SWT.LEFT);
-//		firstColumn.setWidth(10);
+		//		firstColumn = new TableColumn(viewer2.getTable(), SWT.LEFT);
+		//		firstColumn.setWidth(10);
 
 		referenceColumn = new TableColumn(viewer2.getTable(), SWT.LEFT);
 		refreshReferenceColumnTitle();
@@ -538,7 +459,7 @@
 				} else {
 					viewer2.getTable().setSortDirection(SWT.UP);
 				}
-				comparator.initialize(corpus);
+				comparator.initialize(concordance.getCorpus());
 				currentComparator = comparator;
 				complexsorter.setKey(4);//set ref key
 				sort();
@@ -550,14 +471,14 @@
 			}
 		});
 		referenceColumn.setWidth(100);
-				
+
 		sash = new Sash(displayArea, SWT.VERTICAL);
 		sash.addSelectionListener(new SelectionAdapter() {
-		      public void widgetSelected(SelectionEvent event) {
-		        ((FormData) sash.getLayoutData()).left = new FormAttachment(0, event.x);
-		        sash.getParent().layout();
-		      }
-		    });
+			public void widgetSelected(SelectionEvent event) {
+				((FormData) sash.getLayoutData()).left = new FormAttachment(0, event.x);
+				sash.getParent().layout();
+			}
+		});
 		viewer = new TableViewer(displayArea, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER | SWT.VIRTUAL);
 		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
 		//viewer.setLabelProvider(new LineLabelProvider(this));
@@ -565,10 +486,11 @@
 		viewer.getTable().setLinesVisible(true);
 		viewer.getTable().setHeaderVisible(true);
 
-		if (corpus != null && corpus.getFont() != null && corpus.getFont().length() > 0) {
+		String f = concordance.getCorpus().getFont();
+		if (f != null && f.length() > 0) {
 			Font old = viewer.getTable().getFont();
 			FontData fD = old.getFontData()[0];
-			Font font = new Font(Display.getCurrent(), corpus.getFont(), fD.getHeight(), fD.getStyle()); 
+			Font font = new Font(Display.getCurrent(), f, fD.getHeight(), fD.getStyle()); 
 			viewer.getTable().setFont(font);
 			viewer2.getTable().setFont(font);
 		}
@@ -587,7 +509,7 @@
 				bar.setSelection(Math.round(x*(M-T)/(l+k+r-t)));//this is how x translate in terms of bar selection
 			}
 		};
-		
+
 		// try to center on keyword column
 		viewer.getTable().addListener(SWT.Resize, tableResizeListener);
 
@@ -604,9 +526,9 @@
 		viewer.getTable().addKeyListener(kldelete);
 		viewer2.getTable().addKeyListener(kldelete);
 
-//		firstColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
-//		firstColumn.setWidth(0);
-//		firstColumn.setResizable(false);
+		//		firstColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		//		firstColumn.setWidth(0);
+		//		firstColumn.setResizable(false);
 
 		TableViewerColumn leftColumnViewer = new TableViewerColumn(viewer, SWT.RIGHT);
 		leftContextColumn = leftColumnViewer.getColumn();
@@ -633,7 +555,7 @@
 					comparator = new ReverseComparator(comparator);
 				} else
 					viewer.getTable().setSortDirection(SWT.UP);
-				comparator.initialize(corpus);
+				comparator.initialize(concordance.getCorpus());
 				currentComparator = comparator;
 				complexsorter.setKey(2);//set ref key
 				sort();
@@ -670,7 +592,7 @@
 					comparator = new ReverseComparator(comparator);
 				} else
 					viewer.getTable().setSortDirection(SWT.UP);
-				comparator.initialize(corpus);
+				comparator.initialize(concordance.getCorpus());
 				currentComparator = comparator;
 				complexsorter.setKey(1);//set ref key
 				sort();
@@ -682,7 +604,7 @@
 			}
 		});
 
-		
+
 		TableViewerColumn rightContextColumnViewer = new TableViewerColumn(viewer, SWT.LEFT);
 		rightContextColumn = rightContextColumnViewer.getColumn();
 		rightContextColumn.setText(Messages.ConcordancesEditor_4);
@@ -709,7 +631,7 @@
 				} else {
 					viewer.getTable().setSortDirection(SWT.UP);
 				}
-				comparator.initialize(corpus);
+				comparator.initialize(concordance.getCorpus());
 				currentComparator = comparator;
 				complexsorter.setKey(3); //set ref key
 				sort();
@@ -721,33 +643,33 @@
 			}
 		});
 
-//		firstColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
-//		firstColumn.setWidth(0);
-//		firstColumn.setResizable(false);
-		
+		//		firstColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		//		firstColumn.setWidth(0);
+		//		firstColumn.setResizable(false);
+
 		leftContextColumn.setWidth(200);
 		keywordColumn.setWidth(100);
 		rightContextColumn.setWidth(200);
-		
+
 		//resetColumnWidths(); // set column widths
 
 		createContextMenu();
 
-//		// And now, a sweet piece of code :)
-//		// When the window is resized, the scrollbar is adjusted so that the
-//		// keywords remain centered
-//		viewer.getTable().addListener(SWT.Resize, new Listener() {
-//			@Override
-//			public void handleEvent(Event event) {
-//				ScrollBar bar = viewer.getTable().getHorizontalBar();
-//				//float l = leftContextColumn.getWidth();
-//				//float k = keywordColumn.getWidth();
-//				rightContextColumn.getWidth();
-//				//float t = lineTableViewer.getTable().getClientArea().width;
-//				bar.getMaximum();
-//				bar.getThumb();
-//			}
-//		});
+		//		// And now, a sweet piece of code :)
+		//		// When the window is resized, the scrollbar is adjusted so that the
+		//		// keywords remain centered
+		//		viewer.getTable().addListener(SWT.Resize, new Listener() {
+		//			@Override
+		//			public void handleEvent(Event event) {
+		//				ScrollBar bar = viewer.getTable().getHorizontalBar();
+		//				//float l = leftContextColumn.getWidth();
+		//				//float k = keywordColumn.getWidth();
+		//				rightContextColumn.getWidth();
+		//				//float t = lineTableViewer.getTable().getClientArea().width;
+		//				bar.getMaximum();
+		//				bar.getThumb();
+		//			}
+		//		});
 
 		// back to text mouse listener
 		MouseListener ms = new MouseListener() {
@@ -765,7 +687,7 @@
 		};
 		viewer.getTable().addMouseListener(ms);
 		viewer2.getTable().addMouseListener(ms);
-		
+
 		// On Windows, the selection is gray if the table does not have focus.
 		// To make both tables appear in focus, draw the selection background
 		// here.
@@ -794,7 +716,7 @@
 		rightContextColumn.addControlListener(new ConcordanceColumnSizeControlListener(rightContextColumn));
 
 		viewer.getTable().addListener(SWT.EraseItem, eraseListener);
-		
+
 		leftTable = viewer2.getTable();
 		rightTable = viewer.getTable();
 		viewer2.getTable().addSelectionListener(new SelectionListener() {
@@ -830,24 +752,24 @@
 
 		// set Layout datas
 		FormData data = new FormData();
-	    data.top = new FormAttachment(0); 
-	    data.bottom = new FormAttachment(100); 
-	    data.left = new FormAttachment(0);
-	    data.right = new FormAttachment(sash,0);
-	    viewer2.getTable().setLayoutData(data);
-	    
+		data.top = new FormAttachment(0); 
+		data.bottom = new FormAttachment(100); 
+		data.left = new FormAttachment(0);
+		data.right = new FormAttachment(sash,0);
+		viewer2.getTable().setLayoutData(data);
+
 		FormData data2 = new FormData();
-	    data2.top = new FormAttachment(0, 0); 
-	    data2.bottom = new FormAttachment(100, 0); 
-	    data2.left = new FormAttachment(10);
-	    sash.setLayoutData(data2);
-		
+		data2.top = new FormAttachment(0, 0); 
+		data2.bottom = new FormAttachment(100, 0); 
+		data2.left = new FormAttachment(10);
+		sash.setLayoutData(data2);
+
 		FormData data3 = new FormData();
-	    data3.top = new FormAttachment(0); 
-	    data3.bottom = new FormAttachment(100); 
-	    data3.left = new FormAttachment(sash,0);
-	    data3.right = new FormAttachment(100);
-	    viewer.getTable().setLayoutData(data3);
+		data3.top = new FormAttachment(0); 
+		data3.bottom = new FormAttachment(100); 
+		data3.left = new FormAttachment(sash,0);
+		data3.right = new FormAttachment(100);
+		viewer.getTable().setLayoutData(data3);
 	}
 
 	/**
@@ -857,9 +779,7 @@
 		if (concordance != null && currentComparator != null) {
 
 			//System.out.println("concordance sort props: "+concordance.getLeftCAnalysisProperty()+", "+concordance.getKeywordAnalysisProperty()+", "+concordance.getRightCAnalysisProperty());
-			concordance.setLeftAnalysisProperties(selectedLeftSortProperties);
-			concordance.setKeywordAnalysisProperties(selectedKeywordSortProperties);
-			concordance.setRightAnalysisProperties(selectedRightSortProperties);
+			concordance.resetLines();
 
 			try {
 				Log.info(NLS.bind(CooccurrenceUIMessages.CooccurrencesEditor_0, currentComparator.getName()));
@@ -874,12 +794,13 @@
 							monitor.beginTask(Messages.ConcordancesEditor_6, concordance.getNLines());
 							concordance.setCurrentMonitor(this);
 							concordance.sort(currentComparator);
+							concordance.setTopIndex(0);
 							concordance.setCurrentMonitor(null);
 							syncExec(new Runnable() {
 								@Override
 								public void run() {
 									StatusLine.setMessage(RCPMessages.SORT_DONE);
-									fillDisplayArea(topLine, topLine + nLinePerPage - 1);
+									fillDisplayArea();
 								}
 							});
 
@@ -913,15 +834,19 @@
 	 * @param from the from
 	 * @param to the to
 	 */
-	public void fillDisplayArea(int from, int to) {
+	public void fillDisplayArea() {
 		if (viewer == null)
 			return;
 
-		viewer.getControl().setRedraw(false);
-		viewer2.getControl().setRedraw(false);
-
+		int from = concordance.getTopIndex();
 		from = Math.max(from, 0);
+		
+		int to = from + concordance.getNLinePerPage() - 1;
 		to = Math.min(to, concordance.getNLines() - 1);
+		
+		viewer.getControl().setRedraw(false);
+		viewer2.getControl().setRedraw(false);
+		
 		List<Line> lines = null;
 		if (concordance.getNLines() > 0) {
 			try {
@@ -936,21 +861,17 @@
 		viewer.setInput(lines);
 		viewer2.setInput(lines);
 
-		topLine = from;
-		bottomLine = to;
-
 		navigationWidget.setInfoLineText(""+(from + 1), //$NON-NLS-1$
 				" - "+(to + 1) + " / " + concordance.getNLines()); //$NON-NLS-1$ //$NON-NLS-2$
 
-		navigationWidget.setPreviousEnabled(topLine > 0);
-		navigationWidget.setFirstEnabled(topLine > 0);
-		navigationWidget.setNextEnabled(bottomLine < concordance.getNLines() - 1);
-		navigationWidget.setLastEnabled(bottomLine < concordance.getNLines() - 1);
+		navigationWidget.setPreviousEnabled(concordance.getTopIndex() > 0);
+		navigationWidget.setFirstEnabled(concordance.getTopIndex() > 0);
+		navigationWidget.setNextEnabled((concordance.getTopIndex()+concordance.getNLinePerPage()) < concordance.getNLines() - 1);
+		navigationWidget.setLastEnabled((concordance.getTopIndex()+concordance.getNLinePerPage()) < concordance.getNLines() - 1);
 		navigationWidget.layout();
 		navigationWidget.getParent().layout();
 
 		refreshReferenceColumnTitle();
-
 		viewer.getControl().setRedraw(true);
 		viewer2.getControl().setRedraw(true);
 	}
@@ -978,7 +899,7 @@
 	public Composite getQueryArea() {
 		return queryArea;
 	}
-	
+
 	/**
 	 * Get the Composite that contains the navigation buttons
 	 * 
@@ -989,7 +910,7 @@
 	public Composite getNavigationArea() {
 		return queryArea;
 	}
-	
+
 	/**
 	 * Compose control area.
 	 *
@@ -1029,14 +950,16 @@
 
 		// [ (v)]
 		// queryWidget = new QueryWidget(queryArea, SWT.DROP_DOWN);
-		queryWidget = new AssistedQueryWidget(queryArea, SWT.DROP_DOWN, corpus);
+		queryWidget = new AssistedQueryWidget(queryArea, SWT.DROP_DOWN, concordance.getCorpus());
 		queryWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
 		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();
+					Query query = new Query(queryWidget.getQueryString());
+					concordance.setQuery(query);
+					compute(true);
 				}
 			}
 
@@ -1070,8 +993,8 @@
 			public void widgetSelected(SelectionEvent e) {
 				StatusLine.setMessage(Messages.ConcordancesEditor_55);
 				new ViewPropertySelectionDialog(getSite(),
-						availableKeywordViewProperties,
-						selectedKeywordViewProperties).open();
+						concordance.getAvailableKeywordViewProperties(),
+						concordance.getKeywordViewProperties()).open();
 				if (concordance != null)
 					try {
 						refreshViewProperties();
@@ -1102,7 +1025,9 @@
 		go.addSelectionListener(new SelectionListener() {
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				compute();
+				Query query = new Query(queryWidget.getQueryString());
+				concordance.setQuery(query);
+				compute(true);
 			}
 
 			@Override
@@ -1145,7 +1070,8 @@
 
 			@Override
 			public void widgetSelected(SelectionEvent arg0) {
-				fillDisplayArea(0, nLinePerPage - 1);
+				concordance.setTopIndex(0);
+				fillDisplayArea();
 			}
 		});
 
@@ -1157,11 +1083,11 @@
 
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				int top = topLine - nLinePerPage;
+				int top = concordance.getTopIndex() - concordance.getNLinePerPage();
 				if (top < 0)
 					top = 0;
-				int bottom = top + nLinePerPage -1 ;
-				fillDisplayArea(top, bottom);
+				concordance.setTopIndex(top);
+				fillDisplayArea();
 			}
 		});
 
@@ -1173,7 +1099,8 @@
 
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				fillDisplayArea(bottomLine + 1, bottomLine + nLinePerPage);
+				concordance.setTopIndex(concordance.getTopIndex() + concordance.getNLinePerPage());
+				fillDisplayArea();
 			}
 		});
 
@@ -1185,10 +1112,10 @@
 
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				int top = (concordance.getNLines()/nLinePerPage)*nLinePerPage;
-				int bottom = top + nLinePerPage -1 ;
-				fillDisplayArea(top, bottom);
-				//fillDisplayArea(concordance.getNLines() - 1 - nLinePerPage,concordance.getNLines() - 1);
+				int top = (concordance.getNLines()/concordance.getNLinePerPage())*concordance.getNLinePerPage();
+				int bottom = top + concordance.getNLinePerPage() -1;
+				concordance.setTopIndex(top);
+				fillDisplayArea();
 			}
 		});
 		hideBtn = new Button(navigationArea, SWT.PUSH);
@@ -1241,68 +1168,26 @@
 		//		}
 
 		queryArea.layout();
-		
 
+
 	}
 
 	/**
-	 * Computes the concordance and fills the display area with the specified lines range.
+	 * refresh
 	 * @param top
 	 * @param bottom
 	 */
-	public void compute(int top, int bottom, boolean fillDisplay) {
+	public void refresh(boolean update) {
 		StatusLine.setMessage(Messages.ConcordancesEditor_56);
-		Query query = new Query(queryWidget.getQueryString());
-
-		String cql_limit = null;
-		if (cqlSeparator != null) cql_limit = cqlSeparator.getText();
-		if (cql_limit != null && cql_limit.trim().length() == 0) cql_limit = null;
-		if (cql_limit == null) cql_limit = corpus.getCQLLimitQuery();
-
+		
 		//if (true)// concordance==null || concordance.getQuery()!=query)
 		try {
-			JobsTimer.start();
-			//Concordance oldConcordance = concordance;
-			System.out.println(NLS.bind(Messages.ConcordancesEditor_5, query.getQueryString(), corpus.getName()));
-			//concordance = new Concordance(corpus);
-			concordance.setParameters(query,
-					selectedLeftSortProperties, 
-					selectedRightSortProperties,
-					selectedKeywordSortProperties,
-					selectedLeftViewProperties,
-					selectedRightViewProperties,
-					selectedKeywordViewProperties,
-					getViewReferencePattern(),
-					getSortReferencePattern(),
-					leftContextSize, rightContextSize);
-			concordance.setCQLSeparator(cql_limit);
-
-			concordance.compute(false, null);
-
-			StatusLine.setMessage(NLS.bind(Messages.ConcordancesEditor_19, concordance.getNLines()));
-			if (concordance.getNLines() == 1)
-				System.out.println(RCPMessages.ONE_RESULT);
-			else if (concordance.getNLines() > 0)
-				System.out.println(NLS.bind(Messages.ConcordancesEditor_19, concordance.getNLines()));
-			else
-				System.out.println(TXMCoreMessages.COMPUTE_DONE_NO_RESULT);
-
-
-
-//			if (oldConcordance != null) {
-//				corpus.removeResult(oldConcordance);
-//				oldConcordance.clean(); // drop the CQP corpus
-//			}
-			//corpus.addResult(concordance);
-
 			CorporaView.refresh();
-			CorporaView.expand(corpus);
+			CorporaView.expand(concordance.getCorpus());
 			QueriesView.refresh();
 
-			if (fillDisplay) {
-				fillDisplayArea(top, bottom);
-			}
-
+			fillDisplayArea();
+				
 			setPartName(concordance.getName());
 			queryWidget.memorize();
 
@@ -1311,7 +1196,7 @@
 			JobsTimer.stopAndPrint();
 
 		} catch (Exception e1) {
-			System.err.println(RCPMessages.CorporaView_3+" "+Log.toString(e1)); //$NON-NLS-1$
+			System.out.println(RCPMessages.CorporaView_3+" "+Log.toString(e1)); //$NON-NLS-1$
 			//System.err.println(Messages.CorporaView_3);
 			org.txm.rcp.utils.Logger.printStackTrace(e1);
 			try {
@@ -1326,27 +1211,12 @@
 	}
 
 	/**
-	 * Computes the concordance and fills the display area with lines range corresponding to the first page.
-	 */
-	public void compute() {
-		this.compute(true);
-	}
-
-	/**
-	 * Computes the concordance and fills the display area with lines range corresponding to the first page.
-	 * @param fillDisplay
-	 */
-	public void compute(boolean fillDisplay) {
-		this.compute(0, nLinePerPage - 1, fillDisplay);
-	}
-
-	/**
 	 * Sets the line per page.
 	 *
 	 * @param nb the new line per page
 	 */
 	public void setLinePerPage(int nb) {
-		this.nLinePerPage = nb;
+		concordance.setNLinePerPage(nb);
 	}
 
 	/**
@@ -1355,20 +1225,15 @@
 	 * @return the line per page
 	 */
 	public int getLinePerPage() {
-		return nLinePerPage;
+		return concordance.getNLinePerPage();
 	}
 
 	/**
 	 * Update view properties label.
 	 */
 	void updateViewPropertiesLabel() {
-		StringBuffer buffer = new StringBuffer();
-		Iterator<Property> it = selectedKeywordViewProperties.iterator();
-		if (it.hasNext())
-			buffer.append(it.next().getName());
-		while (it.hasNext())
-			buffer.append("_" + it.next().getName()); //$NON-NLS-1$
-		viewPropertiesLabel.setText(buffer.toString());
+		String str = StringUtils.join(concordance.getKeywordViewProperties(), "_");
+		viewPropertiesLabel.setText(str);
 		viewPropertiesLabel.getParent().layout();
 		viewPropertiesLabel.update();
 		queryArea.layout();
@@ -1379,25 +1244,7 @@
 	 */
 	@Override
 	public String getTitleToolTip() {
-		if (concordance != null) {
-			StringBuffer buf = new StringBuffer();
-			buf.append("Concordance:\n"); //$NON-NLS-1$
-			buf.append("\tCorpus: " + corpus.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-			buf
-			.append("\tQuery: " + concordance.getQuery().getQueryString() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-			buf
-			.append("\tView properties: " + viewPropertiesLabel.getText() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-			buf
-			.append("\tLeft Context Sort property: " + selectedLeftSortProperties + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-			buf
-			.append("\tKeyword Sort property: " + selectedKeywordSortProperties + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-			buf
-			.append("\right Context Sort property: " + selectedRightSortProperties + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-			buf.append("\tReference View Pattern: " + refViewPattern + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-			buf.append("\tReference Sort Pattern: " + refSortPattern + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-			return buf.toString();
-		}
-		return ""; //$NON-NLS-1$
+		return concordance.getDetails();
 	}
 
 	/**
@@ -1406,7 +1253,7 @@
 	 * @return the reference pattern
 	 */
 	ReferencePattern getViewReferencePattern() {
-		return refViewPattern;
+		return concordance.getRefViewPattern();
 	}
 
 	/**
@@ -1415,7 +1262,7 @@
 	 * @return the reference pattern
 	 */
 	ReferencePattern getSortReferencePattern() {
-		return refSortPattern;
+		return concordance.getRefAnalysePattern();
 	}
 
 	/**
@@ -1424,7 +1271,7 @@
 	 * @param list the new left sort properties
 	 */
 	public void setLeftSortProperties(List<Property> list) {
-		this.selectedLeftSortProperties = list;
+		concordance.setLeftAnalysisProperties(list);
 	}
 
 	/**
@@ -1433,16 +1280,8 @@
 	 * @param list the new keyword sort property
 	 */
 	public void setKeywordSortProperties(List<Property> list) {
-		this.selectedKeywordSortProperties = list;
-		if (concordance != null) {
-			try {
-				concordance.setAnalysisProperty(list);
-			} catch (Exception e) {
-				System.err.println(NLS.bind(
-						Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
-			}
-			sort();
-		}
+		concordance.setAnalysisProperty(list);
+		sort();
 	}
 
 	/**
@@ -1451,16 +1290,8 @@
 	 * @param list the new right sort properties
 	 */
 	public void setRightSortProperties(List<Property> list) {
-		this.selectedRightSortProperties = list;
-		if (concordance != null) {
-			try {
-				concordance.setAnalysisProperty(list);
-			} catch (Exception e) {
-				System.err.println(NLS.bind(
-						Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
-			}
-			sort();
-		}
+		concordance.setAnalysisProperty(list);
+		sort();
 	}
 
 	/**
@@ -1469,19 +1300,9 @@
 	 * @param referencePattern the new reference pattern
 	 */
 	public void setRefViewPattern(ReferencePattern referencePattern) {
-		this.refViewPattern = referencePattern;
-
-		if (concordance != null) {
-			concordance.setRefViewPattern(referencePattern);
-			//			int top = topLine;
-			//			int bottom = bottomLine;
-			//
-			sort();
-			//fillDisplayArea(top, bottom); // we return to the previously
-
-			// displayed page
-			this.resetLeftTableColumnWidths();
-		}
+		concordance.setRefViewPattern(referencePattern);
+		sort();
+		this.resetLeftTableColumnWidths();
 	}
 
 	/**
@@ -1490,16 +1311,8 @@
 	 * @param referencePattern the new reference pattern
 	 */
 	public void setRefSortPattern(ReferencePattern referencePattern) {
-		this.refSortPattern = referencePattern;
-
-		if (concordance != null) {
-			concordance.setRefAnalysePattern(referencePattern);
-			//			int top = topLine;
-			//			int bottom = bottomLine;
-			sort();
-			//fillDisplayArea(top, bottom); // we return to the previously
-			// displayed page
-		}
+		concordance.setRefAnalysePattern(referencePattern);
+		sort();
 	}
 
 	/**
@@ -1509,18 +1322,10 @@
 	 * @param rightContextSize the right context size
 	 */
 	public void setContextSize(int leftContextSize, int rightContextSize) {
-		this.leftContextSize = leftContextSize;
-		this.rightContextSize = rightContextSize;
-		if (concordance != null) {
-			concordance.setLeftContextSize(leftContextSize);
-			concordance.setRightContextSize(rightContextSize);
-			int top = topLine;
-			int bottom = bottomLine;
-			//sort();
-			fillDisplayArea(top, bottom); // we return to the previously
-			resetRightTableColumnWidths();
-			// displayed page
-		}
+		concordance.setLeftContextSize(leftContextSize);
+		concordance.setRightContextSize(rightContextSize);
+		fillDisplayArea(); // we return to the previously
+		resetRightTableColumnWidths();
 	}
 
 	/**
@@ -1543,7 +1348,7 @@
 				//				System.out.println("Col: "+getPointedColumn());
 			}
 		});
-		
+
 		MenuManager menuManager = new MenuManager(); //$NON-NLS-1$
 		Menu menu = menuManager.createContextMenu(viewer.getTable());
 		menuManager.setRemoveAllWhenShown(true);
@@ -1561,7 +1366,7 @@
 			}
 		});
 		viewer.getTable().setMenu(menu);
-		
+
 		MenuManager menuManagerLeft = new MenuManager(); //$NON-NLS-1$
 		Menu menuLeft = menuManagerLeft.createContextMenu(viewer2.getTable());
 		menuManagerLeft.setRemoveAllWhenShown(true);
@@ -1575,7 +1380,7 @@
 			}
 		});
 		viewer2.getTable().setMenu(menuLeft);
-		
+
 		//viewer.getTable().setMenu(menuManager.createContextMenu(viewer.getTable()));
 		//register the right menu to the editor site
 		getSite().registerContextMenu(menuManager, viewer);
@@ -1649,7 +1454,7 @@
 	 * @return the available sort properties
 	 */
 	public List<Property> getAvailableSortProperties() {
-		return availableKeywordSortProperties;
+		return concordance.getAvailableKeywordSortProperties();
 	}
 
 	/**
@@ -1695,7 +1500,7 @@
 	 * @return the top line
 	 */
 	public int getTopLine() {
-		return topLine;
+		return concordance.getTopIndex();
 	}
 
 	/**
@@ -1704,7 +1509,7 @@
 	 * @return the bottom line
 	 */
 	public int getBottomLine() {
-		return bottomLine;
+		return concordance.getTopIndex() + concordance.getNLinePerPage() - 1;
 	}
 
 	/**
@@ -1713,7 +1518,7 @@
 	 * @return the left context size
 	 */
 	public int getLeftContextSize() {
-		return leftContextSize;
+		return concordance.getLeftContextSize();
 	}
 
 	/**
@@ -1722,7 +1527,7 @@
 	 * @return the right context size
 	 */
 	public int getRightContextSize() {
-		return rightContextSize;
+		return concordance.getRightContextSize();
 	}
 
 	/**
@@ -1731,7 +1536,7 @@
 	 * @return the corpus
 	 */
 	public Corpus getCorpus() {
-		return corpus;
+		return concordance.getCorpus();
 	}
 
 	/* (non-Javadoc)
@@ -1747,31 +1552,16 @@
 	 * refresh column display accordingly to the views properties.
 	 */
 	private void refreshViewProperties() {
-		if (concordance != null) {
-			concordance.setViewProperties(
-					selectedLeftViewProperties,
-					selectedRightViewProperties,
-					selectedKeywordViewProperties);
+			concordance.resetLines();
 			sort();
-			//fillDisplayArea(topLine, bottomLine);
-		}
 	}
 
 	/**
 	 * Refresh sort properties.
 	 */
 	private void refreshSortProperties() {
-		if (concordance != null) {
-			try {
-				concordance.setLeftAnalysisProperties(selectedLeftSortProperties);
-				concordance.setRightAnalysisProperties(selectedRightSortProperties);
-				concordance.setKeywordAnalysisProperties(selectedKeywordSortProperties);
-			} catch (Exception e) {
-				System.err.println(NLS.bind(
-						Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
-			}
+			concordance.resetLines();
 			sort();
-		}
 	}
 
 	/**
@@ -1780,7 +1570,7 @@
 	 * @param selectedViewProperties the new left c view properties
 	 */
 	public void setLeftViewProperties(List<Property> selectedViewProperties) {
-		this.selectedLeftViewProperties = selectedViewProperties;
+		concordance.setLeftViewProperties(selectedViewProperties);
 		refreshViewProperties();
 	}
 
@@ -1790,7 +1580,7 @@
 	 * @param selectedViewProperties the new right c view properties
 	 */
 	public void setRightViewProperties(List<Property> selectedViewProperties) {
-		this.selectedRightViewProperties = selectedViewProperties;
+		concordance.setRightViewProperties(selectedViewProperties);
 		refreshViewProperties();
 	}
 
@@ -1800,7 +1590,7 @@
 	 * @param selectedViewProperties the new keyword view properties
 	 */
 	public void setKeywordViewProperties(List<Property> selectedViewProperties) {
-		this.selectedKeywordViewProperties = selectedViewProperties;
+		concordance.setKeywordViewProperties(selectedViewProperties);
 		refreshViewProperties();
 		updateViewPropertiesLabel();
 	}
@@ -1810,13 +1600,7 @@
 	 */
 	public void refreshReferenceColumnTitle()
 	{
-		if (refViewPattern == null) {
-			referenceColumn.setText(Messages.ConcordancesEditor_1);
-		} else if (refViewPattern.getProperties().size() == 0) {
-			referenceColumn.setText(Messages.ConcordancesEditor_1);
-		} else {
-			referenceColumn.setText(refViewPattern.getTitle());
-		}
+		referenceColumn.setText(concordance.getRefViewPattern().getTitle());
 	}
 
 	/**
@@ -1825,7 +1609,7 @@
 	 * @return the selected left c view properties
 	 */
 	public List<Property> getSelectedLeftViewProperties() {
-		return this.selectedLeftViewProperties;
+		return concordance.getLeftViewProperties();
 	}
 
 	/**
@@ -1834,7 +1618,7 @@
 	 * @return the selected keyword view properties
 	 */
 	public List<Property> getSelectedKeywordViewProperties() {
-		return this.selectedKeywordViewProperties;
+		return concordance.getKeywordViewProperties();
 	}
 
 	/**
@@ -1843,7 +1627,7 @@
 	 * @return the selected right c view properties
 	 */
 	public List<Property> getSelectedRightViewProperties() {
-		return this.selectedRightViewProperties;
+		return concordance.getRightViewProperties();
 	}
 
 	/**
@@ -1852,7 +1636,7 @@
 	 * @return the selected left c sort properties
 	 */
 	public List<Property> getSelectedLeftSortProperties() {
-		return this.selectedLeftSortProperties;
+		return concordance.getLeftAnalysisProperties();
 	}
 
 	/**
@@ -1861,7 +1645,7 @@
 	 * @return the selected keyword sort properties
 	 */
 	public List<Property> getSelectedKeywordSortProperties() {
-		return this.selectedKeywordSortProperties;
+		return concordance.getKeywordAnalysisProperties();
 	}
 
 	/**
@@ -1870,7 +1654,7 @@
 	 * @return the selected right c sort properties
 	 */
 	public List<Property> getSelectedRightSortProperties() {
-		return this.selectedRightSortProperties;
+		return concordance.getRightAnalysisProperties();
 	}
 
 	/**
@@ -1879,7 +1663,7 @@
 	 * @return the available left c view properties
 	 */
 	public List<Property> getAvailableLeftViewProperties() {
-		return availableLeftViewProperties;
+		return concordance.getAvailableLeftViewProperties();
 	}
 
 	/**
@@ -1888,7 +1672,7 @@
 	 * @return the available keyword view properties
 	 */
 	public List<Property> getAvailableKeywordViewProperties() {
-		return availableKeywordViewProperties;
+		return concordance.getAvailableKeywordViewProperties();
 	}
 
 	/**
@@ -1897,7 +1681,7 @@
 	 * @return the available right c view properties
 	 */
 	public List<Property> getAvailableRightViewProperties() {
-		return availableRightViewProperties;
+		return concordance.getAvailableRightViewProperties();
 	}
 
 	/**
@@ -1906,7 +1690,7 @@
 	 * @return the available left sort properties
 	 */
 	public List<Property> getAvailableLeftSortProperties() {
-		return availableLeftSortProperties;
+		return concordance.getAvailableLeftSortProperties();
 	}
 
 	/**
@@ -1915,7 +1699,7 @@
 	 * @return the available keyword sort properties
 	 */
 	public List<Property> getAvailableKeywordSortProperties() {
-		return availableKeywordSortProperties;
+		return concordance.getAvailableKeywordSortProperties();
 	}
 
 	/**
@@ -1924,7 +1708,7 @@
 	 * @return the available right sort properties
 	 */
 	public List<Property> getAvailableRightSortProperties() {
-		return availableRightSortProperties;
+		return concordance.getAvailableRightSortProperties();
 	}
 
 	/**
@@ -1933,7 +1717,7 @@
 	 * @return the selected references
 	 */
 	public List<Property> getSelectedViewReferences() {
-		return refViewPattern.getProperties();
+		return concordance.getRefViewPattern().getProperties();
 	}
 
 	/**
@@ -1942,7 +1726,7 @@
 	 * @return the selected references
 	 */
 	public List<Property> getSelectedSortReferences() {
-		return refSortPattern.getProperties();
+		return concordance.getRefAnalysePattern().getProperties();
 	}
 
 	/**
@@ -2091,7 +1875,7 @@
 	 * @return
 	 */
 	public int getPagesCount()	{
-		return (int) Math.ceil(((double)this.concordance.getNLines() / this.nLinePerPage));
+		return (int) Math.ceil(((double)this.concordance.getNLines() / concordance.getNLinePerPage()));
 	}
 
 	public void setQuery(String query) {
@@ -2126,7 +1910,7 @@
 
 		// Last resort edition
 		try {
-			InternalView iview = new InternalView(corpus);
+			InternalView iview = new InternalView(concordance.getCorpus());
 			iview.setParameters(concordance.getKeywordAnalysisProperties(), 
 					concordance.getCorpus().getStructuralUnit("text"),
 					new ArrayList<StructuralUnitProperty>(), null);
@@ -2159,49 +1943,49 @@
 	}
 
 	public void resetLeftTableColumnWidths() {
-		
+
 		int refMax = referenceColumn.getText().length();
 		for (TableItem item : viewer2.getTable().getItems()) {
 			if (refMax < item.getText(0).length()) refMax = item.getText(0).length();
 		}
-		
+
 		//System.out.println("Size="+queryLabel.getSize().x +" label="+queryLabel.getText()+" l size"+ queryLabel.getText().length());
 		float W = 1f+(float)(queryLabel.getSize().x / (float)queryLabel.getText().length());
 		//System.out.println("W= "+W+" Maxs "+refMax+ " " +leftMax+" " +keywordMax+" "+rightMax);
-		
+
 		((FormData) sash.getLayoutData()).left = new FormAttachment(0, 25+(int) (refMax*W));
 		referenceColumn.setWidth(2*(int) (refMax*W));
 		displayArea.layout(true, true);
 	}
-	
+
 	/*
 	 * 
 	 */
 	public void resetRightTableColumnWidths() {
-		
+
 		float W = 1f+(float)(queryLabel.getSize().x / (float)queryLabel.getText().length());
-		
+
 		TableColumn[] columns = viewer.getTable().getColumns();
 		for (int i = 0 ; i < columns.length ; i++) {
 			TableColumn column = columns[i];
 			if (column.getWidth() == 0) continue; // skip closed columns
-			
+
 			int max = column.getText().length();
 			if (max == 0) continue; // skip no-title columns
-			
+
 			int n = 0;
 			for (TableItem item : viewer.getTable().getItems()) {
 				if (max < item.getText(i).length()) max = item.getText(i).length();
 				if (n++ > 100) break; // stop testing after 100 lines
 			}
-			
+
 			column.setWidth(15+(int) (max*W));
 		}
 
 		viewer.getTable().layout(true, true);
 		tableResizeListener.handleEvent(null); // center on keyword column
 	}
-	
+
 	/**
 	 * Computes the column widths using the max length of each column (title+lines)
 	 * 
@@ -2219,101 +2003,15 @@
 		return this.concordance.getParent().getName().equals(parent.getName());
 	}
 
-
-
-	protected void initializeFields() {
-		if (this.concordance == null) {
-			leftContextSize = TXMPreferences.getInt(ConcordancePreferences.LEFT_CONTEXT_SIZE, ConcordancePreferences.PREFERENCES_NODE);
-			rightContextSize = TXMPreferences.getInt(ConcordancePreferences.RIGHT_CONTEXT_SIZE, ConcordancePreferences.PREFERENCES_NODE);
-
-			selectedLeftViewProperties = new ArrayList<Property>();
-			selectedRightViewProperties = new ArrayList<Property>();
-			selectedKeywordViewProperties = new ArrayList<Property>();
-
-			//set default view property
-			Property defaultViewProperty = availableKeywordViewProperties.get(0);
-			if(!defaultViewProperty.getName().equals("word")) //$NON-NLS-1$
-				for(int i = 0 ; i < availableKeywordViewProperties.size() ; i++ )
-					if (availableKeywordViewProperties.get(i).getName().equals("word")) //$NON-NLS-1$
-					{
-						defaultViewProperty = availableKeywordViewProperties.get(i);
-						break;
-					}
-
-			availableKeywordViewProperties.remove(defaultViewProperty);
-			availableLeftViewProperties.remove(defaultViewProperty);
-			availableRightViewProperties.remove(defaultViewProperty);
-			selectedLeftViewProperties.add(defaultViewProperty);
-			selectedRightViewProperties.add(defaultViewProperty);
-			selectedKeywordViewProperties.add(defaultViewProperty);
-
-			//set default sort property
-			selectedLeftSortProperties = new ArrayList<Property>();
-			selectedRightSortProperties = new ArrayList<Property>();
-			selectedKeywordSortProperties = new ArrayList<Property>();
-
-			Property defaultSortProperty = availableKeywordSortProperties.get(0);
-			if(!defaultSortProperty.getName().equals("word")) //$NON-NLS-1$
-				for(int i = 0 ; i < availableKeywordSortProperties.size() ; i++ )
-					if (availableKeywordSortProperties.get(i).getName().equals("word")) //$NON-NLS-1$
-					{
-						defaultSortProperty = availableKeywordSortProperties.get(i);
-						break;
-					}
-
-			availableKeywordSortProperties.remove(defaultSortProperty);
-			availableLeftSortProperties.remove(defaultSortProperty);
-			availableRightSortProperties.remove(defaultSortProperty);
-			selectedLeftSortProperties.add(defaultSortProperty);
-			selectedRightSortProperties.add(defaultSortProperty);
-			selectedKeywordSortProperties.add(defaultSortProperty);
-
-			this.refViewPattern = new ReferencePattern();
-			this.refSortPattern = new ReferencePattern();
-			try { // set the default reference is there is one
-				if (corpus.getProperty("ref") != null) //$NON-NLS-1$
-				{
-					refViewPattern.addProperty(corpus.getProperty("ref")); //$NON-NLS-1$
-					refSortPattern.addProperty(corpus.getProperty("ref")); //$NON-NLS-1$
-				} else {
-					if (corpus.getStructuralUnit("text") != null) //$NON-NLS-1$
-						if (corpus.getStructuralUnit("text").getProperty("id") != null) //$NON-NLS-1$ //$NON-NLS-2$
-						{
-							refViewPattern.addProperty(corpus.getStructuralUnit("text").getProperty("id")); //$NON-NLS-1$ //$NON-NLS-2$
-							refSortPattern.addProperty(corpus.getStructuralUnit("text").getProperty("id")); //$NON-NLS-1$ //$NON-NLS-2$
-						}
-				}
-			} catch (CqiClientException e) {
-				System.out.println(NLS.bind(Messages.ConcordancesEditor_43, corpus.getName(), e));
-			}
-		} else {
-			leftContextSize = concordance.getLeftContextSize();
-			rightContextSize = concordance.getRightContextSize();
-
-			selectedLeftViewProperties = concordance.getLeftViewProperties();
-			selectedRightViewProperties = concordance.getRightViewProperties();
-			selectedKeywordViewProperties = concordance.getKeywordViewProperties();
-			availableKeywordViewProperties.remove(selectedKeywordViewProperties);
-			availableLeftViewProperties.remove(selectedLeftViewProperties);
-			availableRightViewProperties.remove(selectedRightViewProperties);
-
-			selectedLeftSortProperties = concordance.getLeftAnalysisProperties();
-			selectedRightSortProperties = concordance.getRightAnalysisProperties();
-			selectedKeywordSortProperties = concordance.getKeywordAnalysisProperties();
-			availableKeywordSortProperties.remove(selectedKeywordSortProperties);
-			availableLeftSortProperties.remove(selectedLeftSortProperties);
-			availableRightSortProperties.remove(selectedRightSortProperties);
-
-			this.refViewPattern = concordance.getRefViewPattern();
-			this.refSortPattern = concordance.getRefAnalysePattern();
-		}
+	@Override public Concordance getResultData() {
+		return concordance;
 	}
 
 	public Composite getExtensionButtonComposite() {
 		// TODO Auto-generated method stub
 		return null;
 	}
-	
+
 	/**
 	 * ControlerListener to maintain the width of a TableColumn superior to 5
 	 * 
Index: tmp/org.txm.referencer.rcp/src/org/txm/rcp/editors/referencer/ReferencerEditor.java
===================================================================
--- tmp/org.txm.referencer.rcp/src/org/txm/rcp/editors/referencer/ReferencerEditor.java	(revision 541)
+++ tmp/org.txm.referencer.rcp/src/org/txm/rcp/editors/referencer/ReferencerEditor.java	(revision 542)
@@ -174,14 +174,6 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.ui.part.EditorPart#isDirty()
-	 */
-	@Override
-	public boolean isDirty() {
-		return referencer.isDirty();
-	}
-
-	/* (non-Javadoc)
 	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
 	 */
 	@Override
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/Query.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/Query.java	(revision 541)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/Query.java	(revision 542)
@@ -30,9 +30,8 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-// TODO: Auto-generated Javadoc
 /**
- * The Class Query.
+ * Implements a CQL query. Use fixQuery to use query sugar
  * 
  * @author sloiseau
  * @author jpmague
@@ -323,4 +322,12 @@
 	public void setQueryString(String queryString) {
 		this.queryString = queryString;
 	}
+
+	public boolean isEmpty() {
+		return queryString == null || queryString.length() == 0;
+	}
+
+	public int length() {
+		return queryString.length();
+	}
 }
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Corpus.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Corpus.java	(revision 541)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Corpus.java	(revision 542)
@@ -1320,6 +1320,10 @@
 	}
 	
 	HashMap<Class, HashSet<Object>> storedData = new HashMap<Class, HashSet<Object>>();
+
+	private StructuralUnit textStructuralUnit;
+
+	private StructuralUnitProperty textIdStructuralUnitProperty;
 	public HashSet<Object> getStoredData(Class class1) {
 		
 		if (!storedData.containsKey(class1))
@@ -1352,4 +1356,16 @@
 		}
 		return false;
 	}
+	
+	public StructuralUnit getTextStructuralUnit() throws CqiClientException {
+		if (textStructuralUnit == null)
+			textStructuralUnit = getStructuralUnit(TEXT);
+		return textStructuralUnit;
+	}
+	
+	public StructuralUnitProperty getTextIdStructuralUnitProperty() throws CqiClientException {
+		if (textIdStructuralUnitProperty == null)
+			textIdStructuralUnitProperty = getTextStructuralUnit().getProperty(ID);
+		return textIdStructuralUnitProperty;
+	}
 }
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java	(revision 541)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java	(revision 542)
@@ -131,6 +131,9 @@
 	 * @return the title
 	 */
 	public String getTitle() {
+		if (this.properties == null) return "none";
+		else if (this.properties.size() == 0) return "none";
+		
 		String title = ""; //$NON-NLS-1$
 		for(Property p : this.properties)
 			if (p instanceof StructuralUnitProperty)
Index: tmp/org.txm.concordance.core/src/org/txm/concordance/core/preferences/ConcordancePreferences.java
===================================================================
--- tmp/org.txm.concordance.core/src/org/txm/concordance/core/preferences/ConcordancePreferences.java	(revision 541)
+++ tmp/org.txm.concordance.core/src/org/txm/concordance/core/preferences/ConcordancePreferences.java	(revision 542)
@@ -15,7 +15,6 @@
  */
 public class ConcordancePreferences extends TXMPreferences {
 
-
 	// auto populate the preference node qualifier from the current bundle id
 	public static final String PREFERENCES_NODE = FrameworkUtil.getBundle(ConcordancePreferences.class).getSymbolicName();
 	
@@ -24,6 +23,7 @@
 	public static final String LEFT_CONTEXT_SIZE = PREFERENCES_PREFIX + "left_context_size"; //$NON-NLS-1$
 	public static final String RIGHT_CONTEXT_SIZE = PREFERENCES_PREFIX + "right_context_size"; //$NON-NLS-1$
 
+	
 	public static final String QUERY = "query";
 	public static final String LEFT_ANALYSIS_PROPERTIES = "left_analysis_properties";
 	public static final String KEYWORD_ANALYSIS_PROPERTIES = "keyword_analysis_properties";
@@ -31,31 +31,34 @@
 	public static final String LEFT_VIEW_PROPERTIES = "left_view_properties";
 	public static final String KEYWORD_VIEW_PROPERTIES = "keyword_view_properties";
 	public static final String RIGHT_VIEW_PROPERTIES = "right_view_properties";
+	/** The default value is "*" -> The concordance will use ref or text_id */
 	public static final String ANALYSIS_REFERENCEPATTERN = "view_pattern";
+	/** The default value is "*" -> The concordance will use ref or text_id */
 	public static final String VIEW_REFERENCEPATTERN = "view_pattern";
+	public static final String LIMITCQL = "limit_cql";
+	public static final String TOP_INDEX = "top_index";
 	
-	/**
-	 * 
-	 */
-	public ConcordancePreferences() {
-		// TODO Auto-generated constructor stub
-	}
-
+	
+	public static final String WORD = "word";
 	@Override
 	public void initializeDefaultPreferences() {
 		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
 		
 		preferences.putInt(N_LINE_PER_PAGE, 100);
+		preferences.putInt(TOP_INDEX, 0);
 		preferences.putInt(LEFT_CONTEXT_SIZE, 8);
 		preferences.putInt(RIGHT_CONTEXT_SIZE, 12);
 		
-		preferences.put(LEFT_ANALYSIS_PROPERTIES, "word");
-		preferences.put(KEYWORD_ANALYSIS_PROPERTIES, "word");
-		preferences.put(RIGHT_ANALYSIS_PROPERTIES, "word");
-		preferences.put(LEFT_VIEW_PROPERTIES, "word");
-		preferences.put(KEYWORD_VIEW_PROPERTIES, "word");
-		preferences.put(RIGHT_VIEW_PROPERTIES, "word");
-
+		preferences.put(LEFT_ANALYSIS_PROPERTIES, WORD);
+		preferences.put(KEYWORD_ANALYSIS_PROPERTIES, WORD);
+		preferences.put(RIGHT_ANALYSIS_PROPERTIES, WORD);
+		preferences.put(LEFT_VIEW_PROPERTIES, WORD);
+		preferences.put(KEYWORD_VIEW_PROPERTIES, WORD);
+		preferences.put(RIGHT_VIEW_PROPERTIES, WORD);
+		
+		preferences.put(VIEW_REFERENCEPATTERN, "*");
+		preferences.put(ANALYSIS_REFERENCEPATTERN, "*");
+		
+		preferences.put(LIMITCQL, "<text>[]");
 	}
-	
 }
Index: tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java
===================================================================
--- tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java	(revision 541)
+++ tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java	(revision 542)
@@ -57,6 +57,7 @@
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.QueryResult;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
 import org.txm.searchengine.cqp.corpus.query.Match;
 import org.txm.searchengine.cqp.corpus.query.Query;
 import org.txm.searchengine.cqp.serverException.CqiServerError;
@@ -81,43 +82,121 @@
 	int[] CQLLimitStarts = null;
 
 	/** The lines. */
-	private List<Line> lines;
+	protected List<Line> lines;
 	/** The n lines. */
-	private int nLines;
-
-	String pCQLLimit;
-	/** The keyword analysis property. */
-	private List<Property> pKeywordAnalysisProperties;
+	protected int nLines;
+	/** The keyword analysis properties */
+	protected List<Property> pAnalysisKeywordProperties;
+	/** The analysis properties */
+	protected List<Property> pAnalysisLeftProperties;
+	/** The ReferncePattern sort properties	 */
+	protected ReferencePattern pAnalysisRefPattern;
+	/** The right c analysis property. */
+	protected List<Property> pAnalysisRightProperties;
+	/** used to limit context to the matches of the CQL limit query	 */
+	protected String pLimitCQL;
+	/** The left context size. */
+	protected Integer pLeftContextSize;
+	/** The query. */
+	protected Query pQuery;
+	/** The right context size. */
+	protected Integer pRightContextSize;
+	/**	 The top line index shown and the number of lines to show per page */
+	protected Integer pTopIndex, pNLinesPerPage;
 	/** The keyword view properties. */
-	private List<Property> pKeywordViewProperties;
-	/** The analysis property. */
-	private List<Property> pLeftAnalysisProperties;
-	/** The left context size. */
-	private Integer pLeftContextSize;
+	protected List<Property> pViewKeywordProperties;
 	/** The left c view properties. */
-	private List<Property> pLeftCViewProperties;
-	/** The query. */
-	private Query pQuery;
-	private ReferencePattern pRefAnalysePattern;
+	protected List<Property> pViewLeftProperties;
 	/** The reference pattern. */
-	private ReferencePattern pRefViewPattern;
-	/** The right c analysis property. */
-	private List<Property> pRightAnalysisProperties;
-	/** The right context size. */
-	private Integer pRightContextSize;
+	protected ReferencePattern pViewRefPattern;
 	/** The right c view properties. */
-	private List<Property> pRightCViewProperties;
-	/** The view properties. */
-	private List<Property> pViewProperties; // contains all the view properties
+	protected List<Property> pViewRightProperties;
+	//	/** The view properties. */
+	//	private List<Property> pViewKeywordProperties; // contains all the view properties
 
 	/** The query result. */
 	private QueryResult queryResult;
 	/** The symbol. */
 	private String symbol;
 
-	/** The writer. */
-	private Writer writer;
+	private ArrayList<Property> availableKeywordViewProperties;
 
+	private ArrayList<Property> availableLeftViewProperties;
+
+	private ArrayList<Property> availableRightViewProperties;
+
+	private ArrayList<Property> availableLeftSortProperties;
+
+	private ArrayList<Property> availableKeywordSortProperties;
+
+	private ArrayList<Property> availableRightSortProperties;
+
+	/**
+	 * 
+	 * @param corpus
+	 * @param v
+	 * @return a list of word properties read from a String
+	 */
+	public static List<Property> stringToProperties(Corpus corpus, String v)  {
+
+		ArrayList<Property> props = new ArrayList<Property>();
+		if (v == null) return props;
+		if (v.length() == 0) return props;
+
+		String[] split = v.split("\t");
+		for (String s : split) {
+			Property prop;
+			try {
+				prop = corpus.getProperty(s);
+			} catch (CqiClientException e) {
+				System.out.println("Error: "+v+" property not found in "+corpus);
+				Log.printStackTrace(e);
+				return null;
+			}
+			if (prop != null) {
+				props.add(prop);
+			}
+		}
+		return props;
+	}
+
+	/**
+	 * 
+	 * @param corpus
+	 * @param v
+	 * @return a list of word and structure properties read from a String
+	 */
+	public static ReferencePattern stringToReferencePattern(Corpus corpus, String v) {
+		try {
+			ReferencePattern props = new ReferencePattern();
+			if (v == null) return props;
+			if (v.length() == 0) return props;
+
+			String[] split = v.split("\t");
+			for (String s : split) {
+				if (s.contains("_")) {
+					String[] split2 = s.split("_", 2);
+					StructuralUnit su = corpus.getStructuralUnit(split2[0]);
+					if (su != null) {
+						Property prop = su.getProperty(split2[1]);
+						if (prop != null) {
+							props.addProperty(prop);
+						}
+					}
+				} else {
+					Property prop = corpus.getProperty(s);
+					if (prop != null) {
+						props.addProperty(prop);
+					}
+				}
+			}
+			return props;
+		} catch (Exception e) {
+			System.out.println("Error: "+v+" property not found in "+corpus);
+			return null;
+		}
+	}
+
 	public Concordance(Corpus corpus) {
 
 		super(corpus);
@@ -125,61 +204,94 @@
 		if (corpus != null) {
 			setCQLSeparator(corpus.getCQLLimitQuery());
 		}
+		
+		this.pTopIndex = this.getIntParameterValue(ConcordancePreferences.TOP_INDEX);
+		this.pNLinesPerPage = this.getIntParameterValue(ConcordancePreferences.N_LINE_PER_PAGE);
 
-		// initialize default preference values of this Concordance
-//		try {
-//			this.parameters = new TXMParameters();
-//			this.parameters.put(ConcordancePreferences.QUERY, this.getStringParameterValue(ConcordancePreferences.QUERY));
-//			this.parameters.put(ConcordancePreferences.LEFT_ANALYSIS_PROPERTIES, this.getStringParameterValue(ConcordancePreferences.LEFT_ANALYSIS_PROPERTIES));
-//			this.parameters.put(ConcordancePreferences.KEYWORD_ANALYSIS_PROPERTIES, this.getStringParameterValue(ConcordancePreferences.KEYWORD_ANALYSIS_PROPERTIES));
-//			this.parameters.put(ConcordancePreferences.RIGHT_ANALYSIS_PROPERTIES, this.getStringParameterValue(ConcordancePreferences.RIGHT_ANALYSIS_PROPERTIES));
-//			this.parameters.put(ConcordancePreferences.LEFT_VIEW_PROPERTIES, this.getStringParameterValue(ConcordancePreferences.LEFT_VIEW_PROPERTIES));
-//			this.parameters.put(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES, this.getStringParameterValue(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES));
-//			this.parameters.put(ConcordancePreferences.RIGHT_VIEW_PROPERTIES, this.getStringParameterValue(ConcordancePreferences.RIGHT_VIEW_PROPERTIES));
-//
-//			this.parameters.put(ConcordancePreferences.LEFT_CONTEXT_SIZE, this.getIntParameterValue(ConcordancePreferences.LEFT_CONTEXT_SIZE));
-//			this.parameters.put(ConcordancePreferences.RIGHT_CONTEXT_SIZE, this.getIntParameterValue(ConcordancePreferences.RIGHT_CONTEXT_SIZE));
-//
-//			Property ref = corpus.getProperty("ref");
-//			if (ref != null) {
-//				this.parameters.put(ConcordancePreferences.VIEW_REFERENCEPATTERN, ref);
-//				this.parameters.put(ConcordancePreferences.ANALYSIS_REFERENCEPATTERN, ref);
-//			} else {
-//				this.parameters.put(ConcordancePreferences.VIEW_REFERENCEPATTERN, "text_id");
-//				this.parameters.put(ConcordancePreferences.ANALYSIS_REFERENCEPATTERN, "text_id");
-//			}
-//
-//			this.setParameters(this.parameters);
-//		} catch (CqiClientException e) {
-//			// TODO Auto-generated catch block
-//			e.printStackTrace();
-//		}
+		this.pLeftContextSize = this.getIntParameterValue(ConcordancePreferences.LEFT_CONTEXT_SIZE);
+		this.pRightContextSize = this.getIntParameterValue(ConcordancePreferences.RIGHT_CONTEXT_SIZE);
+
+		this.pLimitCQL = this.getStringParameterValue(ConcordancePreferences.LIMITCQL);
+
+		try {
+			String propertyNames = this.getStringParameterValue(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES);
+			this.pViewKeywordProperties = Concordance.stringToProperties(corpus, propertyNames);
+			this.availableKeywordViewProperties = new ArrayList<Property>(corpus.getOrderedProperties());
+			this.availableKeywordViewProperties.removeAll(pViewKeywordProperties);
+
+			propertyNames = this.getStringParameterValue(ConcordancePreferences.LEFT_VIEW_PROPERTIES);
+			this.pViewLeftProperties = Concordance.stringToProperties(corpus, propertyNames);
+			this.availableLeftViewProperties = new ArrayList<Property>(corpus.getOrderedProperties());
+			this.availableLeftViewProperties.removeAll(pViewLeftProperties);
+
+			propertyNames = this.getStringParameterValue(ConcordancePreferences.RIGHT_VIEW_PROPERTIES);
+			this.pViewRightProperties = Concordance.stringToProperties(corpus, propertyNames);
+			this.availableRightViewProperties = new ArrayList<Property>(corpus.getOrderedProperties());
+			this.availableRightViewProperties.removeAll(pViewRightProperties);
+
+			propertyNames = this.getStringParameterValue(ConcordancePreferences.KEYWORD_ANALYSIS_PROPERTIES);
+			this.pAnalysisKeywordProperties = Concordance.stringToProperties(corpus, propertyNames);
+			this.availableKeywordSortProperties = new ArrayList<Property>(corpus.getOrderedProperties());
+			this.availableKeywordSortProperties.removeAll(pAnalysisKeywordProperties);
+
+			propertyNames = this.getStringParameterValue(ConcordancePreferences.LEFT_ANALYSIS_PROPERTIES);
+			this.pAnalysisLeftProperties = Concordance.stringToProperties(corpus, propertyNames);
+			this.availableLeftSortProperties = new ArrayList<Property>(corpus.getOrderedProperties());
+			this.availableLeftSortProperties.removeAll(pAnalysisLeftProperties);
+
+			propertyNames = this.getStringParameterValue(ConcordancePreferences.RIGHT_ANALYSIS_PROPERTIES);
+			this.pAnalysisRightProperties = Concordance.stringToProperties(corpus, propertyNames);
+			this.availableRightSortProperties = new ArrayList<Property>(corpus.getOrderedProperties());
+			this.availableRightSortProperties.removeAll(pAnalysisRightProperties);
+
+			String refPropertyNames = this.getStringParameterValue(ConcordancePreferences.VIEW_REFERENCEPATTERN);
+			if ("*".equals(refPropertyNames)) {
+				Property refProperty = corpus.getProperty("ref");
+				if (refProperty == null) {
+					StructuralUnitProperty sup_textid = corpus.getTextIdStructuralUnitProperty();
+					this.pViewRefPattern = new ReferencePattern(sup_textid);
+				} else {
+					this.pViewRefPattern = new ReferencePattern(refProperty);
+				}
+			} else {
+				this.pViewRefPattern = Concordance.stringToReferencePattern(corpus, refPropertyNames);
+			}
+			
+			refPropertyNames = this.getStringParameterValue(ConcordancePreferences.ANALYSIS_REFERENCEPATTERN);
+			if ("*".equals(refPropertyNames)) {
+				Property refProperty = corpus.getProperty("ref");
+				if (refProperty == null) {
+					StructuralUnitProperty sup_textid = corpus.getTextIdStructuralUnitProperty();
+					this.pAnalysisRefPattern = new ReferencePattern(sup_textid);
+				} else {
+					this.pAnalysisRefPattern = new ReferencePattern(refProperty);
+				}
+			} else {
+				this.pAnalysisRefPattern = Concordance.stringToReferencePattern(corpus, refPropertyNames);
+			}
+		} catch (CqiClientException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
 	}
 
-	public void setParameters(Query query,
-			List<Property> selectedLeftCSortProperty,
-			List<Property> selectedRightCSortProperty,
-			List<Property> selectedKeywordSortProperty,
-			List<Property> selectedLeftCViewProperties,
-			List<Property> selectedRightCViewProperties,
-			List<Property> selectedKeywordViewProperties,
-			ReferencePattern referencePattern, 
-			ReferencePattern refAnalysePattern, 
-			Integer leftContextSize,
-			Integer rightContextSize) {
 
-		this.pQuery = query;
-		this.pLeftAnalysisProperties = selectedLeftCSortProperty;
-		this.pRightAnalysisProperties = selectedRightCSortProperty;
-		this.pKeywordAnalysisProperties = selectedKeywordSortProperty;
-		this.pLeftCViewProperties = selectedLeftCViewProperties;
-		this.pRightCViewProperties = selectedRightCViewProperties;
-		this.pKeywordViewProperties = selectedKeywordViewProperties;
-		this.updateViewPropertiesList();
-		this.pRefViewPattern = referencePattern;
-		this.pRefAnalysePattern = refAnalysePattern;
-		this.pLeftContextSize = leftContextSize;
-		this.pRightContextSize = rightContextSize;
+	/**
+	 * Compute concordance.
+	 *
+	 * @return true, if successful
+	 * @throws CqiClientException 
+	 */
+	@Override
+	protected boolean _compute(boolean update) throws Exception {
+		this.queryResult = this.getCorpus().query(pQuery, pQuery.getQueryString()
+				.replace(" ", "_") + "_concordance", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+		this.nLines = queryResult.getNMatch();
+		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
+				(Line) null));// lines are lazily fetched; we force an
+
+		return true;
 	}
 
 	/**
@@ -193,7 +305,6 @@
 		return separator+(str.replace(separator, separator+separator))+separator;
 	}
 
-
 	/**
 	 * As r matrix.
 	 *
@@ -241,46 +352,28 @@
 	}
 
 	@Override
+	public boolean canCompute() {
+		return getCorpus() != null && pQuery != null && pQuery.length() > 0 && !("\"\"".equals(pQuery.getQueryString()));
+	}
+
+	@Override
 	public void clean() {
 		try {
 			if (queryResult != null)	{
 				queryResult.drop();
 			}
-
-			if (writer != null) {
-				this.writer.flush();
-				this.writer.close();
-			}
 		} catch (Exception e) {
 			org.txm.utils.logger.Log.printStackTrace(e);
 		}
 	}
 
 	/**
-	 * Compute concordance.
-	 *
-	 * @return true, if successful
-	 * @throws CqiClientException 
-	 */
-	@Override
-	protected boolean _compute(boolean update) throws Exception {
-		this.queryResult = this.getCorpus().query(pQuery, pQuery.getQueryString()
-				.replace(" ", "_") + "_concordance", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-		this.nLines = queryResult.getNMatch();
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null));// lines are lazily fetched; we force an
-
-		return true;
-	}
-
-	/**
 	 * Gets the analysis property.
 	 *
 	 * @return the analysisProperty
 	 */
 	public List<Property> getAnalysisProperty() {
-		return pKeywordAnalysisProperties;
+		return pAnalysisKeywordProperties;
 	}
 
 	/**
@@ -294,12 +387,30 @@
 
 	@Override
 	public String getDetails() {
-		if (queryResult != null) {
-			return ConcordanceMessages.Concordance_18 + this.getCorpus().getName()
-					+ ": " //$NON-NLS-1$
-					+ queryResult.getQuery().getQueryString();
+
+		if (isDirty()) {
+			return parent.getName();
 		} else {
-			return ConcordanceMessages.Concordance_18 + this.getCorpus().getName();
+			StringBuffer buf = new StringBuffer();
+			buf.append("Concordance:\n"); //$NON-NLS-1$
+			buf.append("\tCorpus: " + this.getCorpus().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\tQuery: " + this.getQuery().getQueryString() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\tLeft Context View property: " + this.getLeftViewProperties() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\tKeyword View property: " + this.getKeywordViewProperties() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\right Context View property: " + this.getRightViewProperties() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\tLeft Context Sort property: " + this.getLeftAnalysisProperties() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\tKeyword Sort property: " + this.getKeywordAnalysisProperties() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\right Context Sort property: " + this.getRightAnalysisProperties() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf.append("\tReference View Pattern: " + this.getRefViewPattern() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf.append("\tReference Sort Pattern: " + this.getRefAnalysePattern() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			return buf.toString();
 		}
 	}
 
@@ -314,7 +425,7 @@
 	 * @return the analysisProperty
 	 */
 	public List<Property> getKeywordAnalysisProperties() {
-		return pKeywordAnalysisProperties;
+		return pAnalysisKeywordProperties;
 	}
 
 	/**
@@ -346,7 +457,7 @@
 	 * @return the keywordViewProperties
 	 */
 	public List<Property> getKeywordViewProperties() {
-		return pKeywordViewProperties;
+		return pViewKeywordProperties;
 	}
 
 	/**
@@ -355,7 +466,7 @@
 	 * @return the analysisProperty
 	 */
 	public List<Property> getLeftAnalysisProperties() {
-		return pLeftAnalysisProperties;
+		return pAnalysisLeftProperties;
 	}
 
 	/**
@@ -363,7 +474,7 @@
 	 *
 	 * @return the leftContextSize
 	 */
-	public int getLeftContextSize() {
+	public Integer getLeftContextSize() {
 		return pLeftContextSize;
 	}
 
@@ -373,7 +484,7 @@
 	 * @return the leftCViewProperties
 	 */
 	public List<Property> getLeftViewProperties() {
-		return pLeftCViewProperties;
+		return pViewLeftProperties;
 	}
 
 	public List<Line> getLines() throws CqiClientException, IOException, CqiServerError {
@@ -415,10 +526,10 @@
 
 		//		System.out.println("cqllimit="+cql_limit);
 		//		System.out.println("CQLLimitStarts="+CQLLimitStarts);
-		if (pCQLLimit != null && CQLLimitStarts == null) { // initialize text limits
+		if (pLimitCQL != null && CQLLimitStarts == null) { // initialize text limits
 			try {
-				Log.warning("Get CQL limit for query="+pCQLLimit);
-				CQLLimitStarts = this.getCorpus().getStartLimits(pCQLLimit);
+				Log.warning("Get CQL limit for query="+pLimitCQL);
+				CQLLimitStarts = this.getCorpus().getStartLimits(pLimitCQL);
 				if (CQLLimitStarts.length > 0 && CQLLimitStarts[0] != 0) {
 					int[] tmp  = new int[CQLLimitStarts.length + 1];
 					System.arraycopy(CQLLimitStarts, 0, tmp, 1, CQLLimitStarts.length);
@@ -530,35 +641,35 @@
 				Map<Property, List<List<String>>> keywordsViewPropValues = new HashMap<Property, List<List<String>>>();
 				Map<Property, List<List<String>>> leftCtxViewPropValues = new HashMap<Property, List<List<String>>>();
 				Map<Property, List<List<String>>> rightCtxViewPropValues = new HashMap<Property, List<List<String>>>();
-				for (Property property : pLeftCViewProperties) {
+				for (Property property : pViewLeftProperties) {
 					leftCtxViewPropValues.put(property, cqiClient.getData(property, beginingOfLeftCtxPositions,
 							lengthOfLeftCtx));
 				}
-				for (Property property : pRightCViewProperties) {
+				for (Property property : pViewRightProperties) {
 					rightCtxViewPropValues.put(property, cqiClient.getData(property, beginingOfRightCtxPositions,
 							lengthOfRightCtx));
 				}
-				for (Property property : pKeywordViewProperties) {
+				for (Property property : pViewKeywordProperties) {
 					keywordsViewPropValues.put(property, cqiClient.getData(property, beginingOfKeywordsPositions,
 							lengthOfKeywords));
 				}
 
 				// get all analysis property values of all lines
 				HashMap<Property, List<List<String>>> leftCtxAnaPropValues = new HashMap<Property, List<List<String>>>();
-				for(Property p : pLeftAnalysisProperties) {
+				for(Property p : pAnalysisLeftProperties) {
 					leftCtxAnaPropValues.put(p, cqiClient.getData(p, beginingOfLeftCtxPositions, lengthOfLeftCtx));
 				}
 				HashMap<Property, List<List<String>>> keywordsAnaPropValues = new HashMap<Property, List<List<String>>>();
-				for(Property p : pKeywordAnalysisProperties) {
+				for(Property p : pAnalysisKeywordProperties) {
 					keywordsAnaPropValues.put(p, cqiClient.getData(p, beginingOfKeywordsPositions, lengthOfKeywords));
 				}
 				HashMap<Property, List<List<String>>> rightCtxAnaPropValues = new HashMap<Property, List<List<String>>>();
-				for(Property p : pRightAnalysisProperties) {
+				for(Property p : pAnalysisRightProperties) {
 					rightCtxAnaPropValues.put(p, cqiClient.getData(p, beginingOfRightCtxPositions, lengthOfRightCtx));
 				}
 				// get all view reference values of all lines
 				Map<Property, List<List<String>>> refValues = new HashMap<Property, List<List<String>>>();
-				for (Property property : pRefViewPattern) {
+				for (Property property : pViewRefPattern) {
 					refValues.put(property, cqiClient.getData(property, 
 							beginingOfKeywordsPositions,
 							Collections.nCopies(beginingOfKeywordsPositions.size(), 1)));
@@ -566,7 +677,7 @@
 
 				// get all sort reference values of all lines
 				Map<Property, List<List<String>>> refSortValues = new HashMap<Property, List<List<String>>>();
-				for (Property property : pRefAnalysePattern) {
+				for (Property property : pAnalysisRefPattern) {
 					refSortValues.put(property, cqiClient.getData(property, beginingOfKeywordsPositions,
 							Collections.nCopies(beginingOfKeywordsPositions.size(), 1)));
 				}
@@ -599,43 +710,43 @@
 					//worked(1);
 					// get the kth line's analysis property values
 					HashMap<Property, List<String>> lineLeftCtxAnaPropValue = new HashMap<Property, List<String>>();
-					for(Property p : pLeftAnalysisProperties) {
+					for(Property p : pAnalysisLeftProperties) {
 						lineLeftCtxAnaPropValue.put(p, leftCtxAnaPropValues.get(p).get(k));
 					}
 					HashMap<Property, List<String>> lineKeywordsAnaPropValue = new HashMap<Property, List<String>>();
-					for(Property p : pKeywordAnalysisProperties) {
+					for(Property p : pAnalysisKeywordProperties) {
 						lineKeywordsAnaPropValue.put(p, keywordsAnaPropValues.get(p).get(k));
 					}
 					HashMap<Property, List<String>> lineRightCtxAnaPropValue = new HashMap<Property, List<String>>();
-					for(Property p : pRightAnalysisProperties) {
+					for(Property p : pAnalysisRightProperties) {
 						lineRightCtxAnaPropValue.put(p, rightCtxAnaPropValues.get(p).get(k));
 					}
 					// get the kth line's view property values
 					Map<Property, List<String>> lineLeftCtxViewPropValue = new HashMap<Property, List<String>>();
 					Map<Property, List<String>> lineKeywordsViewPropValue = new HashMap<Property, List<String>>();
 					Map<Property, List<String>> lineRightCtxViewPropValue = new HashMap<Property, List<String>>();
-					for (Property property : pLeftCViewProperties) {
+					for (Property property : pViewLeftProperties) {
 						lineLeftCtxViewPropValue.put(property,
 								leftCtxViewPropValues.get(property).get(k));
 					}
-					for (Property property : pRightCViewProperties) {
+					for (Property property : pViewRightProperties) {
 						lineRightCtxViewPropValue.put(property,
 								rightCtxViewPropValues.get(property).get(k));
 					}
-					for (Property property : pKeywordViewProperties) {
+					for (Property property : pViewKeywordProperties) {
 						lineKeywordsViewPropValue.put(property,
 								keywordsViewPropValues.get(property).get(k));
 					}
 
 					// get the kth line reference values
 					Map<Property, String> ref = new HashMap<Property, String>();
-					for (Property property : pRefViewPattern) {
+					for (Property property : pViewRefPattern) {
 						ref.put(property, refValues.get(property).get(k).get(0));
 					}
 
 					// get the kth line reference values
 					Map<Property, String> refAna = new HashMap<Property, String>();
-					for (Property property : pRefAnalysePattern) {
+					for (Property property : pAnalysisRefPattern) {
 						refAna.put(property, refSortValues.get(property).get(k).get(0));
 					}
 
@@ -660,8 +771,8 @@
 							lineKeywordsViewPropValue,
 							lineRightCtxViewPropValue, lineLeftCtxAnaPropValue,
 							lineKeywordsAnaPropValue, lineRightCtxAnaPropValue,
-							new Reference(ref, pRefViewPattern), 
-							new Reference(refAna, pRefAnalysePattern), 
+							new Reference(ref, pViewRefPattern), 
+							new Reference(refAna, pAnalysisRefPattern), 
 							match, 
 							targetpos);
 					lines.set(i + k, line);
@@ -696,7 +807,7 @@
 	 * 
 	 * @return the n lines
 	 */
-	public int getNLines() {
+	public Integer getNLines() {
 		return nLines;
 	}
 
@@ -714,7 +825,7 @@
 	}
 
 	public ReferencePattern getRefAnalysePattern() {
-		return pRefAnalysePattern;
+		return pAnalysisRefPattern;
 	}
 
 	/**
@@ -723,7 +834,7 @@
 	 * @return the referencePattern
 	 */
 	public ReferencePattern getRefViewPattern() {
-		return pRefViewPattern;
+		return pViewRefPattern;
 	}
 
 	/**
@@ -732,7 +843,7 @@
 	 * @return the analysisProperty
 	 */
 	public List<Property> getRightAnalysisProperties() {
-		return pRightAnalysisProperties;
+		return pAnalysisRightProperties;
 	}
 
 	/**
@@ -740,7 +851,7 @@
 	 *
 	 * @return the rightContextSize
 	 */
-	public int getRightContextSize() {
+	public Integer getRightContextSize() {
 		return pRightContextSize;
 	}
 
@@ -750,7 +861,7 @@
 	 * @return the rightCViewProperties
 	 */
 	public List<Property> getRightViewProperties() {
-		return pRightCViewProperties;
+		return pViewRightProperties;
 	}
 
 	@Override
@@ -769,15 +880,6 @@
 	}
 
 	/**
-	 * Gets the view properties.
-	 *
-	 * @return the viewProperties
-	 */
-	public List<Property> getViewProperties() {
-		return pViewProperties;
-	}
-
-	/**
 	 * Gets the line index linked to the global token position in corpus according to the current concordance sorting.
 	 * @param globalPosition
 	 * @return
@@ -859,6 +961,16 @@
 		return index;
 	}
 
+	/**
+	 * reload a part of the concordance lines
+	 * 
+	 * @param topLine
+	 * @param bottomLine
+	 * @return
+	 * @throws CqiClientException
+	 * @throws IOException
+	 * @throws CqiServerError
+	 */
 	public List<Line> reloadLines(int topLine, int bottomLine) throws CqiClientException, IOException, CqiServerError {
 		for (int i = topLine; i < bottomLine; i++) {
 			lines.set(i, null);
@@ -867,6 +979,7 @@
 		return getLines(topLine, bottomLine);
 	}
 
+
 	/**
 	 * Update the QueryResult removing the match of the given line.
 	 * 
@@ -951,6 +1064,13 @@
 		return false;
 	}
 
+	/**
+	 * Brutal way to reset the concordance lines. they will be recomputed when getLines(...) is called
+	 */
+	public void resetLines() {
+		lines = new ArrayList<Line>(Collections.nCopies(nLines,
+				(Line) null)); // empty lines
+	}
 
 	/**
 	 * Set the analysis property.
@@ -958,11 +1078,10 @@
 	 * @param list the new analysis property
 	 */
 	public void setAnalysisProperty(List<Property> list) {
-		this.pLeftAnalysisProperties = list;
-		this.pRightAnalysisProperties = list;
-		this.pKeywordAnalysisProperties = list;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null)); // empty lines
+		this.pAnalysisLeftProperties = list;
+		this.pAnalysisRightProperties = list;
+		this.pAnalysisKeywordProperties = list;
+		resetLines();
 	}
 
 	/**
@@ -971,10 +1090,10 @@
 	 * @param list the new analysis property
 	 */
 	public void setAnalysisProperty(List<Property> leftProps, List<Property> keywordProps, List<Property> rightProps) {
-		this.pLeftAnalysisProperties = leftProps;
-		this.pRightAnalysisProperties = keywordProps;
-		this.pKeywordAnalysisProperties = rightProps;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines, (Line) null)); // empty lines
+		this.pAnalysisLeftProperties = leftProps;
+		this.pAnalysisRightProperties = keywordProps;
+		this.pAnalysisKeywordProperties = rightProps;
+		resetLines();
 	}
 
 	/**
@@ -984,11 +1103,7 @@
 	 *            the new context size
 	 */
 	public void setContextSize(int size) {
-		this.pLeftContextSize = size;
-		this.pRightContextSize = size;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null));// we could make it less radically. But the data
-		// is cached anyway...
+		setContextSize(size,  size);
 	}
 
 	/**
@@ -1000,17 +1115,12 @@
 	public void setContextSize(int leftsize, int rightsize) {
 		this.pLeftContextSize = leftsize;
 		this.pRightContextSize = rightsize;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null));// we could make it less radically. But the data
-		// is cached anyway...
+		dirty = true;
 	}
 
 	public void setCQLSeparator(String cql_limit) {
-		if (this.pCQLLimit != null && !this.pCQLLimit.equals(cql_limit)) { 
-			//the CQL limit changed !
-			CQLLimitStarts = null;
-		}
-		this.pCQLLimit = cql_limit;
+		this.pLimitCQL = cql_limit;
+		updateDirty(pLimitCQL, cql_limit);
 	}
 
 	/**
@@ -1020,9 +1130,9 @@
 	 *            the new analysis property
 	 */
 	public void setKeywordAnalysisProperties(List<Property> selectedKeywordSortProperty) {
-		this.pKeywordAnalysisProperties = selectedKeywordSortProperty;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null));// we could make it less radically.
+		this.pAnalysisKeywordProperties = selectedKeywordSortProperty;
+		updateDirty(pAnalysisKeywordProperties, selectedKeywordSortProperty);
+		resetLines();
 	}
 
 	/**
@@ -1032,9 +1142,9 @@
 	 *            the new analysis property
 	 */
 	public void setLeftAnalysisProperties(List<Property> selectedLeftSortProperty) {
-		this.pLeftAnalysisProperties = selectedLeftSortProperty;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null)); // empty lines
+		this.pAnalysisLeftProperties = selectedLeftSortProperty;
+		updateDirty(pAnalysisLeftProperties, selectedLeftSortProperty);
+		resetLines();
 	}
 
 	/**
@@ -1044,11 +1154,39 @@
 	 */
 	public void setLeftContextSize(int size) {
 		this.pLeftContextSize = size;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null));// we could make it less radically. But the data
-		// is cached anyway...
+		updateDirty(pLeftContextSize, size);
+		resetLines();
 	}
 
+
+
+	public void setParameters(Query query,
+			List<Property> selectedLeftCSortProperty,
+			List<Property> selectedRightCSortProperty,
+			List<Property> selectedKeywordSortProperty,
+			List<Property> selectedLeftCViewProperties,
+			List<Property> selectedRightCViewProperties,
+			List<Property> selectedKeywordViewProperties,
+			ReferencePattern referencePattern, 
+			ReferencePattern refAnalysePattern, 
+			Integer leftContextSize,
+			Integer rightContextSize) {
+
+		this.pQuery = query;
+		this.pAnalysisLeftProperties = selectedLeftCSortProperty;
+		this.pAnalysisRightProperties = selectedRightCSortProperty;
+		this.pAnalysisKeywordProperties = selectedKeywordSortProperty;
+		this.pViewLeftProperties = selectedLeftCViewProperties;
+		this.pViewRightProperties = selectedRightCViewProperties;
+		this.pViewKeywordProperties = selectedKeywordViewProperties;
+		this.pViewRefPattern = referencePattern;
+		this.pAnalysisRefPattern = refAnalysePattern;
+		this.pLeftContextSize = leftContextSize;
+		this.pRightContextSize = rightContextSize;
+		
+		this.dirty = true;
+	}
+
 	@Override
 	public boolean setParameters(TXMParameters parameters) {
 
@@ -1062,75 +1200,73 @@
 
 		p = parameters.get(ConcordancePreferences.LEFT_ANALYSIS_PROPERTIES);
 		if (p != null) {
-			if (p instanceof List<?>) this.pLeftAnalysisProperties = (List<Property>)p;
+			if (p instanceof List<?>) this.pAnalysisLeftProperties = (List<Property>)p;
 			else {
 				String v = p.toString();
-				this.pLeftAnalysisProperties = Concordance.stringToProperties(getCorpus(), v);
+				this.pAnalysisLeftProperties = Concordance.stringToProperties(getCorpus(), v);
 			}
 		}
 
 		p = parameters.get(ConcordancePreferences.RIGHT_ANALYSIS_PROPERTIES);
 		if (p != null) {
-			if (p instanceof List<?>) this.pRightAnalysisProperties = (List<Property>)p;
+			if (p instanceof List<?>) this.pAnalysisRightProperties = (List<Property>)p;
 			else {
 				String v = p.toString();
-				this.pRightAnalysisProperties = Concordance.stringToProperties(getCorpus(), v);
+				this.pAnalysisRightProperties = Concordance.stringToProperties(getCorpus(), v);
 			}
 		}
 
 		p = parameters.get(ConcordancePreferences.KEYWORD_ANALYSIS_PROPERTIES);
 		if (p != null) {
-			if (p instanceof List<?>) this.pKeywordAnalysisProperties = (List<Property>)p;
+			if (p instanceof List<?>) this.pAnalysisKeywordProperties = (List<Property>)p;
 			else {
 				String v = p.toString();
-				this.pKeywordAnalysisProperties = Concordance.stringToProperties(getCorpus(), v);
+				this.pAnalysisKeywordProperties = Concordance.stringToProperties(getCorpus(), v);
 			}
 		}
 
 		p = parameters.get(ConcordancePreferences.LEFT_VIEW_PROPERTIES);
 		if (p != null) {
-			if (p instanceof List<?>) this.pLeftCViewProperties = (List<Property>)p;
+			if (p instanceof List<?>) this.pViewLeftProperties = (List<Property>)p;
 			else {
 				String v = p.toString();
-				this.pLeftCViewProperties = Concordance.stringToProperties(getCorpus(), v);
+				this.pViewLeftProperties = Concordance.stringToProperties(getCorpus(), v);
 			}
 		}
 
 		p = parameters.get(ConcordancePreferences.RIGHT_VIEW_PROPERTIES);
 		if (p != null) {
-			if (p instanceof List<?>) this.pRightCViewProperties = (List<Property>)p;
+			if (p instanceof List<?>) this.pViewRightProperties = (List<Property>)p;
 			else {
 				String v = p.toString();
-				this.pRightCViewProperties = Concordance.stringToProperties(getCorpus(), v);
+				this.pViewRightProperties = Concordance.stringToProperties(getCorpus(), v);
 			}
 		}
 
 		p = parameters.get(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES);
 		if (p != null) {
-			if (p instanceof List<?>) this.pKeywordViewProperties = (List<Property>)p;
+			if (p instanceof List<?>) this.pViewKeywordProperties = (List<Property>)p;
 			else {
 				String v = p.toString();
-				this.pKeywordViewProperties = Concordance.stringToProperties(getCorpus(), v);
+				this.pViewKeywordProperties = Concordance.stringToProperties(getCorpus(), v);
 			}
 		}
 
-		this.updateViewPropertiesList();
-
 		p = parameters.get(ConcordancePreferences.VIEW_REFERENCEPATTERN);
 		if (p != null) {
-			if (p instanceof ReferencePattern) this.pRefViewPattern = (ReferencePattern)p;
+			if (p instanceof ReferencePattern) this.pViewRefPattern = (ReferencePattern)p;
 			else {
 				String v = p.toString();
-				this.pRefViewPattern = Concordance.stringToReferencePattern(getCorpus(), v);
+				this.pViewRefPattern = Concordance.stringToReferencePattern(getCorpus(), v);
 			}
 		}
 
 		p = parameters.get(ConcordancePreferences.ANALYSIS_REFERENCEPATTERN);
 		if (p != null) {
-			if (p instanceof ReferencePattern) this.pRefAnalysePattern = (ReferencePattern)p;
+			if (p instanceof ReferencePattern) this.pAnalysisRefPattern = (ReferencePattern)p;
 			else {
 				String v = p.toString();
-				this.pRefAnalysePattern = Concordance.stringToReferencePattern(getCorpus(), v);
+				this.pAnalysisRefPattern = Concordance.stringToReferencePattern(getCorpus(), v);
 			}
 		}
 
@@ -1142,60 +1278,6 @@
 		return true;
 	}
 
-	private static ReferencePattern stringToReferencePattern(Corpus corpus, String v) {
-		try {
-			ReferencePattern props = new ReferencePattern();
-			if (v == null) return props;
-			if (v.length() == 0) return props;
-
-			String[] split = v.split("\t");
-			for (String s : split) {
-				if (s.contains("_")) {
-					String[] split2 = s.split("_", 2);
-					StructuralUnit su = corpus.getStructuralUnit(split2[0]);
-					if (su != null) {
-						Property prop = su.getProperty(split2[1]);
-						if (prop != null) {
-							props.addProperty(prop);
-						}
-					}
-				} else {
-					Property prop = corpus.getProperty(s);
-					if (prop != null) {
-						props.addProperty(prop);
-					}
-				}
-			}
-			return props;
-		} catch (Exception e) {
-			System.out.println("Error: "+v+" property not found in "+corpus);
-			return null;
-		}
-	}
-
-	private static List<Property> stringToProperties(Corpus corpus, String v)  {
-
-		ArrayList<Property> props = new ArrayList<Property>();
-		if (v == null) return props;
-		if (v.length() == 0) return props;
-
-		String[] split = v.split("\t");
-		for (String s : split) {
-			Property prop;
-			try {
-				prop = corpus.getProperty(s);
-			} catch (CqiClientException e) {
-				System.out.println("Error: "+v+" property not found in "+corpus);
-				Log.printStackTrace(e);
-				return null;
-			}
-			if (prop != null) {
-				props.add(prop);
-			}
-		}
-		return props;
-	}
-
 	/**
 	 * Set the reference Pattern.
 	 * 
@@ -1203,14 +1285,11 @@
 	 *            the new reference Pattern
 	 */
 	public void setRefAnalysePattern(ReferencePattern referencePattern) {
-		this.pRefAnalysePattern = referencePattern;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null));// we could make it less radically. But the data
-		// is cached anyway...
+		this.pAnalysisRefPattern = referencePattern;
+		updateDirty(pAnalysisRefPattern, referencePattern);
+		resetLines();
 	}
 
-
-
 	/**
 	 * Set the reference Pattern.
 	 * 
@@ -1218,10 +1297,9 @@
 	 *            the new reference Pattern
 	 */
 	public void setRefViewPattern(ReferencePattern referencePattern) {
-		this.pRefViewPattern = referencePattern;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null));// we could make it less radically. But the data
-		// is cached anyway...
+		this.pViewRefPattern = referencePattern;
+		updateDirty(pViewRefPattern, referencePattern);
+		resetLines();
 	}
 
 	/**
@@ -1231,9 +1309,9 @@
 	 *            the new analysis property
 	 */
 	public void setRightAnalysisProperties(List<Property> selectedRightSortProperty) {
-		this.pRightAnalysisProperties = selectedRightSortProperty;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null)); // empty lines
+		this.pAnalysisRightProperties = selectedRightSortProperty;
+		updateDirty(pAnalysisRightProperties, selectedRightSortProperty);
+		resetLines();
 	}
 
 	/**
@@ -1244,9 +1322,8 @@
 	 */
 	public void setRightContextSize(int size) {
 		this.pRightContextSize = size;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null));// we could make it less radically. But the data
-		// is cached anyway...
+		updateDirty(pRightContextSize, size);
+		resetLines();
 	}
 
 	/**
@@ -1256,13 +1333,11 @@
 	 *            the new view properties
 	 */
 	public void setViewProperties(List<Property> viewProperties) {
-		this.pViewProperties = viewProperties;
-		this.pLeftCViewProperties = viewProperties;
-		this.pRightCViewProperties = viewProperties;
-		this.pKeywordViewProperties = viewProperties;
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null));// we could make it less radically. But teh data
-		// is cached anyway...
+		this.pViewLeftProperties = viewProperties;
+		this.pViewRightProperties = viewProperties;
+		this.pViewKeywordProperties = viewProperties;
+		dirty = true;
+		resetLines();
 	}
 
 	/**
@@ -1281,24 +1356,22 @@
 			List<Property> keywordViewProperties) {
 		// reset list or use the given ones
 		if (leftCViewProperties != null)
-			this.pLeftCViewProperties = leftCViewProperties;
+			this.pViewLeftProperties = leftCViewProperties;
 		else
-			this.pLeftCViewProperties = new ArrayList<Property>();
+			this.pViewLeftProperties = new ArrayList<Property>();
 
 		if (rightCViewProperties != null)
-			this.pRightCViewProperties = rightCViewProperties;
+			this.pViewRightProperties = rightCViewProperties;
 		else
-			this.pRightCViewProperties = new ArrayList<Property>();
+			this.pViewRightProperties = new ArrayList<Property>();
 
 		if (keywordViewProperties != null)
-			this.pKeywordViewProperties = keywordViewProperties;
+			this.pViewKeywordProperties = keywordViewProperties;
 		else
-			this.pKeywordViewProperties = new ArrayList<Property>();
+			this.pViewKeywordProperties = new ArrayList<Property>();
 
-		this.updateViewPropertiesList();
-
-		this.lines = new ArrayList<Line>(Collections.nCopies(nLines, (Line) null));// we could make it less radically. But the data
-		// is cached anyway...
+		dirty = true;
+		resetLines();
 	}
 
 	/**
@@ -1325,6 +1398,7 @@
 		System.currentTimeMillis();
 	}
 
+
 	/**
 	 * To txt.
 	 *
@@ -1334,9 +1408,10 @@
 	 */
 	public boolean toTxt(File outfile, Format format) {
 		try {
-			this.writer = new BufferedWriter(new OutputStreamWriter(
+			BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
 					new FileOutputStream(outfile), "UTF-8")); //$NON-NLS-1$
 			toTxt(writer, 0, nLines - 1, format, "\t",""); //$NON-NLS-1$ //$NON-NLS-2$
+			writer.close();
 		} catch (Exception e) {
 			System.err.println(ConcordanceMessages.Concordance_12 + e);
 			Log.printStackTrace(e);
@@ -1363,20 +1438,24 @@
 	public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws IOException {
 
 		// NK: writer declared as class attribute to perform a clean if the operation is interrupted
+		OutputStreamWriter writer = null;
 		try {
-			this.writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(outfile)), encoding);
+			writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(outfile)), encoding);
 			// if ("UTF-8".equals(encoding)) writer.write('\ufeff'); // UTF-8 BOM
 			toTxt(writer, 0, nLines - 1, colseparator, txtseparator);
 		} catch (Exception e) {
 			System.err.println(ConcordanceMessages.Concordance_12 + e.getLocalizedMessage());
 			Log.printStackTrace(e);
 			return false;
-		} 
+		} finally {
+			if (writer != null) {
+				writer.close();
+			}
+		}
 
 		return true;
 	}
 
-
 	/**
 	 * Write the lines between from and to on a writer.
 	 * 
@@ -1494,33 +1573,6 @@
 	}
 
 	/**
-	 * Update view properties list.
-	 */
-	private void updateViewPropertiesList() {
-		// reset view properties
-		this.pViewProperties = new ArrayList<Property>();
-		// fill it with the properties of the others
-		pViewProperties.addAll(pKeywordViewProperties);
-
-		for (Property p : pLeftCViewProperties) { // add the view properties of left context
-			if (!pViewProperties.contains(p)) {
-				pViewProperties.add(p);
-			}
-		}
-
-		for (Property p : pRightCViewProperties) { // add the view properties of right context
-			if (!pViewProperties.contains(p)) {
-				pViewProperties.add(p);
-			}
-		}
-	}
-
-	@Override
-	public boolean canCompute() {
-		return getCorpus() != null;
-	}
-
-	/**
 	 * The Enum Format.
 	 */
 	public enum Format {
@@ -1530,17 +1582,77 @@
 		CONTEXT
 	}
 
+	public void setNLinePerPage(Integer nLinesPerPage) {
+		this.pNLinesPerPage = nLinesPerPage;
+	}
+
+	public Integer getNLinePerPage() {
+		return pNLinesPerPage;
+	}
+
+	public Integer getTopIndex() {
+		return pTopIndex;
+	}
+
+	public List<Property> getAvailableKeywordViewProperties() {
+		return availableKeywordViewProperties;
+	}
+
+	public List<Property> getAvailableKeywordSortProperties() {
+		return availableKeywordSortProperties;
+	}
+
+	public String getLimitCQL() {
+		return pLimitCQL;
+	}
+
+	public List<Property> getAvailableLeftViewProperties() {
+		return availableLeftViewProperties;
+	}
+
+	public List<Property> getAvailableRightViewProperties() {
+		return availableRightViewProperties;
+	}
+
+	public void setLeftViewProperties(List<Property> selectedViewProperties) {
+		this.pViewLeftProperties = selectedViewProperties;
+		updateDirty(pViewLeftProperties, selectedViewProperties);
+	}
+
+	public void setRightViewProperties(List<Property> selectedViewProperties) {
+		this.pViewRightProperties = selectedViewProperties;
+		updateDirty(pViewRightProperties, selectedViewProperties);
+	}
+
+	public void setKeywordViewProperties(List<Property> selectedViewProperties) {
+		this.pViewKeywordProperties = selectedViewProperties;
+		updateDirty(pViewKeywordProperties, selectedViewProperties);
+	}
+
+	public List<Property> getAvailableLeftSortProperties() {
+		return this.availableLeftSortProperties;
+	}
+
+	public List<Property> getAvailableRightSortProperties() {
+		return this.availableRightSortProperties;
+	}
+
+	public void setQuery(Query query) {
+		this.pQuery = query;
+		updateDirty(pQuery, query);
+	}
+
 	/**
-	 * Brutal way to reset the concordance lines. they will be recomputed when getLines(...) is called
+	 * Update the dirty state by comparing an old parameter with a new
+	 * 
+	 * @param oldParameter may be null
+	 * @param newParameter may be null
 	 */
-	public void resetLines() {
-		lines = new ArrayList<Line>(Collections.nCopies(nLines,
-				(Line) null)); // empty lines
+	protected void updateDirty(Object oldParameter, Object newParameter) {
+		dirty = oldParameter == null || oldParameter.equals(newParameter);
 	}
 
-	@Override
-	public boolean saveParameters() {
-		// TODO Auto-generated method stub
-		return false;
+	public void setTopIndex(int i) {
+		pTopIndex = i;
 	}
 }
Index: tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Line.java
===================================================================
--- tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Line.java	(revision 541)
+++ tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Line.java	(revision 542)
@@ -54,24 +54,24 @@
 	private Concordance concordance;
 
 	/** The left ctx view properties. */
-	private Map<Property, List<String>> leftCtxViewProperties;
+	private Map<Property, List<String>> leftCtxViewPropertiesValues;
 	
 	/** The keywords view properties. */
-	private Map<Property, List<String>> keywordsViewProperties;
+	private Map<Property, List<String>> keywordsViewValues;
 	
 	/** The right ctx view properties. */
-	private Map<Property, List<String>> rightCtxViewProperties;
+	private Map<Property, List<String>> rightCtxViewValues;
 
 	/** The left ctx analysis property. */
-	private HashMap<Property, List<String>> leftCtxAnalysisProperty;
+	private HashMap<Property, List<String>> leftCtxAnalysisValues;
 	
 	/** The keywords analysis property. */
-	private HashMap<Property, List<String>> keywordsAnalysisProperty;
+	private HashMap<Property, List<String>> keywordsAnalysisValues;
 	
 	/** The right ctx analysis property. */
-	private HashMap<Property, List<String>> rightCtxAnalysisProperty;
+	private HashMap<Property, List<String>> rightCtxAnalysisValues;
 	
-	/** The PRO p_ separtor. */
+	/** The proerty values separator. */
 	public static String PROP_SEPARTOR ="_"; //$NON-NLS-1$
 
 	/** The references : view and sort */
@@ -101,12 +101,12 @@
 	 * @param concordance the concordance
 	 * @param keywordsIdValues the keywords id values
 	 * @param textId the text id
-	 * @param leftCtxViewProperty the left context view property values
-	 * @param keywordsViewProperty the keywords view property values
-	 * @param rightCtxViewProperty the right context view property values
-	 * @param lineLeftCtxAnaPropValue the left context analysis property values
-	 * @param lineKeywordsAnaPropValue the keywords analysis property values
-	 * @param lineRightCtxAnaPropValue the right context analysis property values
+	 * @param leftCtxViewPropertiesValues the left context view property values
+	 * @param keywordsViewValues the keywords view property values
+	 * @param rightCtxViewValues the right context view property values
+	 * @param leftCtxAnalysisValues the left context analysis property values
+	 * @param keywordsAnalysisValues the keywords analysis property values
+	 * @param rightCtxAnalysisValues the right context analysis property values
 	 * @param refView the view references
 	 * @param reference2 the sort references
 	 * @param matchs the matchs
@@ -114,23 +114,23 @@
 	 * @param annotationValue 
 	 */
 	public Line(Concordance concordance, List<String> keywordsIdValues,
-			String textId, Map<Property, List<String>> leftCtxViewProperty,
-			Map<Property, List<String>> keywordsViewProperty,
-			Map<Property, List<String>> rightCtxViewProperty,
-			HashMap<Property, List<String>> lineLeftCtxAnaPropValue,
-			HashMap<Property, List<String>> lineKeywordsAnaPropValue,
-			HashMap<Property, List<String>> lineRightCtxAnaPropValue, Reference refView,
+			String textId, Map<Property, List<String>> leftCtxViewPropertiesValues,
+			Map<Property, List<String>> keywordsViewValues,
+			Map<Property, List<String>> rightCtxViewValues,
+			HashMap<Property, List<String>> leftCtxAnalysisValues,
+			HashMap<Property, List<String>> keywordsAnalysisValues,
+			HashMap<Property, List<String>> rightCtxAnalysisValues, Reference refView,
 			Reference refAna, Match matchs, int targetpos) {
 		this.textId = textId;
 		this.targetpos = targetpos;
 		this.keywordsIdValues = keywordsIdValues;
 		this.concordance = concordance;
-		this.leftCtxViewProperties = leftCtxViewProperty;
-		this.keywordsViewProperties = keywordsViewProperty;
-		this.rightCtxViewProperties = rightCtxViewProperty;
-		this.leftCtxAnalysisProperty = lineLeftCtxAnaPropValue;
-		this.keywordsAnalysisProperty = lineKeywordsAnaPropValue;
-		this.rightCtxAnalysisProperty = lineRightCtxAnaPropValue;
+		this.leftCtxViewPropertiesValues = leftCtxViewPropertiesValues;
+		this.keywordsViewValues = keywordsViewValues;
+		this.rightCtxViewValues = rightCtxViewValues;
+		this.leftCtxAnalysisValues = leftCtxAnalysisValues;
+		this.keywordsAnalysisValues = keywordsAnalysisValues;
+		this.rightCtxAnalysisValues = rightCtxAnalysisValues;
 		this.refView = refView;
 		this.refAna = refAna;
 		this.match = matchs;
@@ -143,7 +143,7 @@
 	 * @return the keywords analysis property
 	 */
 	public HashMap<Property, List<String>> getKeywordsAnalysisProperty() {
-		return keywordsAnalysisProperty;
+		return keywordsAnalysisValues;
 	}
 	
 	/**
@@ -152,7 +152,7 @@
 	 * @return the left context analysis property
 	 */
 	public HashMap<Property, List<String>> getLeftAnalysisProperty() {
-		return leftCtxAnalysisProperty;
+		return leftCtxAnalysisValues;
 	}
 
 	/**
@@ -161,7 +161,7 @@
 	 * @return the right ctx analysis property
 	 */
 	public HashMap<Property, List<String>> getRightAnalysisProperty() {
-		return rightCtxAnalysisProperty;
+		return rightCtxAnalysisValues;
 	}
 
 	/**
@@ -170,7 +170,7 @@
 	 * @return the keywords view properties
 	 */
 	public Map<Property, List<String>> getKeywordsViewProperties() {
-		return keywordsViewProperties;
+		return keywordsViewValues;
 	}
 
 	/**
@@ -179,7 +179,7 @@
 	 * @return the left context view properties
 	 */
 	public Map<Property, List<String>> getLeftCtxViewProperties() {
-		return leftCtxViewProperties;
+		return leftCtxViewPropertiesValues;
 	}
 
 	/**
@@ -188,7 +188,7 @@
 	 * @return the right context view properties
 	 */
 	public Map<Property, List<String>> getRightCtxViewProperties() {
-		return rightCtxViewProperties;
+		return rightCtxViewValues;
 	}
 
 	/**
@@ -216,7 +216,7 @@
 	 * @return the left context size
 	 */
 	public int getLeftContextSize() {
-		return leftCtxViewProperties.values().iterator().next().size();
+		return leftCtxViewPropertiesValues.values().iterator().next().size();
 	}
 
 	/**
@@ -225,7 +225,7 @@
 	 * @return the keywords size
 	 */
 	public int getKeywordsSize() {
-		return keywordsViewProperties.values().iterator().next().size();
+		return keywordsViewValues.values().iterator().next().size();
 	}
 
 	/**
@@ -234,7 +234,7 @@
 	 * @return the right context size
 	 */
 	public int getRightContextSize() {
-		return rightCtxViewProperties.values().iterator().next().size();
+		return rightCtxViewValues.values().iterator().next().size();
 	}
 
 	/**
@@ -245,54 +245,8 @@
 	public Match getMatch() {
 		return match;
 	}
-
+	
 	/**
-	 * Used by leftContextToString, keywordsToString and rightContextToString to
-	 * build te string they return.
-	 *
-	 * @param values A map returned by getLeftCtxViewProperties,
-	 * getKeywordsViewProperties or getRightCtxViewProperties
-	 * @param propertySeparator The string used to separate the dif ferent view properties for
-	 * each word
-	 * @param wordSeparator The string used to separate the dif ferent words
-	 * @return The string representation
-	 */
-	private String fieldToString(Map<Property, List<String>> values,
-			String propertySeparator, String wordSeparator) {
-		List<String> words = new ArrayList<String>();
-		for (int i = 0; i < values.get(concordance.getViewProperties().get(0))
-				.size(); i++) {
-			List<String> word = new ArrayList<String>();
-			for (Property property : concordance.getViewProperties())
-				word.add(values.get(property).get(i));
-			words.add(StringUtils.join(word, propertySeparator));
-		}
-		return LangFormater.format(StringUtils.join(words, wordSeparator),
-				concordance.getCorpus().getAttribute("lang")); //$NON-NLS-1$
-	}
-
-	/**
-	 * Fix spaces.
-	 *
-	 * @param str the str
-	 * @return the string
-	 */
-	private String fixSpaces(String str) {
-		str = str.replace(" ' ", " '"); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace("' ", "'"); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace(" , ", ", "); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace(" \" ", " \""); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace(" . ", ". "); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace("( ", "("); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace(" )", ")"); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace("[ ", "["); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace(" ]", "]"); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace("{ ", "{"); //$NON-NLS-1$ //$NON-NLS-2$
-		str = str.replace(" }", "}"); //$NON-NLS-1$ //$NON-NLS-2$
-		return str;
-	}
-
-	/**
 	 * Returns a string representing the left context.
 	 *
 	 * @param propertySeparator The string used to separate the dif ferent view properties for
@@ -326,9 +280,14 @@
 		int start = this.getLeftContextSize() - max;
 		for (int i = start; i < this.getLeftContextSize(); i++) {
 			List<String> word = new ArrayList<String>();
-			for (Property property : concordance.getLeftViewProperties())
-				word.add(values.get(property).get(i));
-			
+			for (Property property : concordance.getLeftViewProperties()) {
+				List<String> ivalues = values.get(property);
+				if (ivalues == null) {
+					System.out.println("ERROR: null ivalues in "+values+" for property "+property);
+				} else {
+					word.add(ivalues.get(i));
+				}
+			}
 			words.add(StringUtils.join(word, propertySeparator));
 			
 			if (decorator != null) {
@@ -340,8 +299,6 @@
 
 		return LangFormater.format(StringUtils.join(words, wordSeparator),
 				concordance.getCorpus().getAttribute("lang")); //$NON-NLS-1$
-		// return fieldToString(getLeftCtxViewProperties(), propertySeparator,
-		// wordSeparator);
 	}
 
 	/**
@@ -392,8 +349,6 @@
 		}
 		return LangFormater.format(StringUtils.join(words, wordSeparator),
 				concordance.getCorpus().getAttribute("lang")); //$NON-NLS-1$
-		// return fieldToString(getKeywordsViewProperties(), propertySeparator,
-		// wordSeparator);
 	}
 
 	/**
@@ -441,8 +396,6 @@
 		}
 		return LangFormater.format(StringUtils.join(words, wordSeparator),
 				concordance.getCorpus().getLang()); 
-		// return fieldToString(getRightCtxViewProperties(), propertySeparator,
-		// wordSeparator);
 	}
 	
 	/** The properties to process. */
@@ -533,8 +486,6 @@
 
 		return LangFormater.format(StringUtils.join(words, " "), //$NON-NLS-1$
 				concordance.getCorpus().getAttribute("lang")); //$NON-NLS-1$
-		// return fieldToString(getLeftCtxViewProperties(), propertySeparator,
-		// wordSeparator);
 	}
 
 	/**
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ComputeTXMResult.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ComputeTXMResult.java	(revision 541)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ComputeTXMResult.java	(revision 542)
@@ -18,6 +18,7 @@
 		}
 		
 		TXMEditorPart editor = (TXMEditorPart)page;
+		editor.getResultData().setDirty(); //TODO: MD: I had to add this to recompute the concordance when the query field has been modified
 		editor.compute(true);
 		
 		return null;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java	(revision 541)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java	(revision 542)
@@ -30,6 +30,7 @@
 	 */
 	public boolean checkStatsEngine()	{
 		if (!RStatsEngine.isStarted()) {
+			System.out.println(RCoreMessages.error_statsEngineNotReadyCancelingCommand);
 			Log.severe(RCoreMessages.error_statsEngineNotReadyCancelingCommand);
 			return false;
 		}
@@ -43,6 +44,7 @@
 	 */
 	public boolean checkCorpusEngine()	{
 		if (!CQPEngine.isInitialized())	{
+			System.out.println("Corpus Engine is not ready, canceling command.");
 			Log.severe("Corpus Engine is not ready, canceling command.");
 			return false;
 		}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorPart.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorPart.java	(revision 541)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorPart.java	(revision 542)
@@ -192,7 +192,8 @@
 	@Override
 	public boolean isDirty() {
 		if (getResultData() != null) {
-			return getResultData().isDirty();
+			// if the result has never been computed, the editor is not dirty ->  no * shown
+			return getResultData().isDirty() && getResultData().getHasBeenComputedOnce();
 		}
 		
 		return false;
@@ -285,13 +286,9 @@
 		return this.getEditorInput().getResult().getStringParameterValue(key);
 	}
 
-	
-	
-	public void compute(boolean update) {
+	public final void compute(boolean update) {
 		compute(this.getResultData(), update, this);
 	}
-
-
 	
 	public static void compute(final TXMResult result)	{
 		compute(result, false, null);
@@ -318,7 +315,6 @@
 		    	this.runInit(monitor);
 		    	
 		    	try {
-
 		    		JobsTimer.start();
 		    		
 		    		// computing result
@@ -329,7 +325,7 @@
 //						result.loadParameters();
 //					}
 					
-					if(!result.compute(update, monitor))	{
+					if (!result.compute(update, monitor))	{
 						return Status.CANCEL_STATUS;
 					}
 
@@ -341,13 +337,14 @@
 //					}
 
 					// refreshing the tree node
-					if(editor != null)	{
-//						System.out.println(message);
-//						StatusLine.setMessage(message);
-						
-						editor.refresh(update);
+					if (editor != null)	{
+						this.syncExec(new Runnable() {
+							@Override
+							public void run() {
+								editor.refresh(update);
+							}
+						});
 					}
-					
 				}
 		    	// for user direct canceling
 		    	catch(ThreadDeath td) {
@@ -449,7 +446,7 @@
 	 * Synchronizes the editor with the result and refreshes the corpus view.
 	 * Also fires a dirty property change.
 	 */
-	public void refresh()	{
+	public final void refresh()	{
 		this.refresh(false);
 	}
 	
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayerEditor.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayerEditor.java	(revision 541)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayerEditor.java	(revision 542)
@@ -62,14 +62,6 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.ui.part.EditorPart#isDirty()
-	 */
-	@Override
-	public boolean isDirty() {
-		return false;
-	}
-
-	/* (non-Javadoc)
 	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
 	 */
 	@Override
Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java	(revision 541)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java	(revision 542)
@@ -76,21 +76,21 @@
 
 	/** The currentpartid. */
 	protected int currentpartid = 0;
-
+	
 	/** The current Fmax value. */
 	protected int Fmax = 0;
 	/** The current Fmin value. */
 	protected int Fmin = 9999999;
-
 	/** The lexicon used to compute the index (if query = null || query == [] && properties.size() == 1 */
 	protected Lexicon lexicon;
+	boolean lexiconMode = false;
 	/** The current lines. */
 	protected List<Line> lines = new ArrayList<Line>();
 	/** The current number of lines. */
-	protected int nLines = 0;
+	protected int nTotalTokens = 0;
+
 	/** The partnames. The corpus name if built with a Corpus or the parts names if built with a Partition */
 	protected List<String> partnames = new ArrayList<String>();
-
 	/** The fmax filter value parameter. */
 	protected Integer pFmaxFilter = null;
 	/** The fmin filter value parameter. */
@@ -101,47 +101,20 @@
 	protected List<Property> pProperties;
 	/** The string used to separated property values. */
 	protected String pPropertiesSeparator = "_"; // the separator of properties values //$NON-NLS-1$
+	private String pPropertySeparator = "_";
+
 	/** The CQP query. */
 	protected Query pQuery;
+
+	private Integer pTopIndex;
+
 	/** The vmax filter value parameter. */
 	protected Integer pVmaxFilter = null;
-
+	
 	/** The writer. */
 	private BufferedWriter writer;
 
 	/**
-	 * compute a index, given a corpus, a query and analysis properties.
-	 *
-	 * @param corpus the corpus
-	 * @throws CqiClientException 
-	 * @throws CqiServerError 
-	 * @throws IOException 
-	 */
-	public Index(Corpus corpus) {
-		super(corpus);
-	}
-
-	/**
-	 * Compute an index per Part of the partition.
-	 *
-	 * @param partition the partition
-	 * @throws CqiClientException 
-	 * @throws CqiServerError 
-	 * @throws IOException 
-	 */
-	public Index(Partition partition) {
-		super(partition);
-	}
-	
-	boolean lexiconMode = false;
-	public void setLexiconMode(boolean mode) {
-		this.lexiconMode = mode;
-	}
-	public boolean getLexiconMode() {
-		return this.lexiconMode;
-	}
-	
-	/**
 	 * Create a CQL query using an Index lines
 	 *
 	 * @param selection the selection
@@ -180,51 +153,31 @@
 		query = query.substring(0, query.length() - 1);
 		return query;
 	}
+
+	/**
+	 * compute a index, given a corpus, a query and analysis properties.
+	 *
+	 * @param corpus the corpus
+	 * @throws CqiClientException 
+	 * @throws CqiServerError 
+	 * @throws IOException 
+	 */
+	public Index(Corpus corpus) {
+		super(corpus);
+	}
 	
 	/**
-	 * This method alter the index first column frequencies using a table stored in the R workspace
-	 * 
-	 * @param referenceCorpus the R table variable name
-	 * @return true if frequencies have been altered
-	 * 
-	 * @throws RWorkspaceException
-	 * @throws REXPMismatchException
+	 * Compute an index per Part of the partition.
+	 *
+	 * @param partition the partition
+	 * @throws CqiClientException 
+	 * @throws CqiServerError 
+	 * @throws IOException 
 	 */
-	public boolean alterFrequencies(String referenceCorpus) throws RWorkspaceException, REXPMismatchException {
-		String[] ref_forms = RWorkspace.getRWorkspaceInstance().eval("rownames("+referenceCorpus+")").asStrings(); //$NON-NLS-1$ //$NON-NLS-2$
-		int[] ref_freqs = RWorkspace.getRWorkspaceInstance().eval(referenceCorpus+"[,1]").asIntegers(); //$NON-NLS-1$
-		if (ref_forms.length != ref_freqs.length) {
-			System.out.println("Cannot alter index frequencies with the '"+referenceCorpus+"' empty table.");
-			return false;
-		}
-		HashMap<String, Integer> ref_counts = new HashMap<String, Integer>();
-		for(int i = 0 ; i < ref_forms.length ; i++) ref_counts.put(ref_forms[i], ref_freqs[i]);
-
-		for (org.txm.index.core.functions.Line l : this.getAllLines()) {
-			String key = l.toString();
-			if (ref_counts.containsKey(key)) {
-				int[] f = {ref_counts.get(key)};
-				l.setCounts(f, 0);
-			}
-		}
-		this.updateFminFmax();
-		return true;
-		//voc.toTxt(new File("/home/mdecorde/TEMP/after.tsv"), "UTF-8", "\t", "");
+	public Index(Partition partition) {
+		super(partition);
 	}
-
 	@Override
-	public void clean() {
-		try {
-			if (writer != null) {
-				this.writer.flush();
-				this.writer.close();
-			}
-		} catch (IOException e) {
-			org.txm.utils.logger.Log.printStackTrace(e);
-		}
-	}
-
-	@Override
 	protected boolean _compute(boolean update) throws Exception {
 		lines.clear();
 		counts.clear();
@@ -270,7 +223,6 @@
 			}
 		}
 
-
 		this.filterLines();
 
 		Log.info("Sorting...");
@@ -279,11 +231,74 @@
 		this.cut();
 
 		this.dirty = false;
-
+		this.pTopIndex = 0;
 		Log.info("Index done.");
 		return true;
 	}
+	
+	/**
+	 * This method alter the index first column frequencies using a table stored in the R workspace
+	 * 
+	 * @param referenceCorpus the R table variable name
+	 * @return true if frequencies have been altered
+	 * 
+	 * @throws RWorkspaceException
+	 * @throws REXPMismatchException
+	 */
+	public boolean alterFrequencies(String referenceCorpus) throws RWorkspaceException, REXPMismatchException {
+		String[] ref_forms = RWorkspace.getRWorkspaceInstance().eval("rownames("+referenceCorpus+")").asStrings(); //$NON-NLS-1$ //$NON-NLS-2$
+		int[] ref_freqs = RWorkspace.getRWorkspaceInstance().eval(referenceCorpus+"[,1]").asIntegers(); //$NON-NLS-1$
+		if (ref_forms.length != ref_freqs.length) {
+			System.out.println("Cannot alter index frequencies with the '"+referenceCorpus+"' empty table.");
+			return false;
+		}
+		HashMap<String, Integer> ref_counts = new HashMap<String, Integer>();
+		for(int i = 0 ; i < ref_forms.length ; i++) ref_counts.put(ref_forms[i], ref_freqs[i]);
 
+		for (org.txm.index.core.functions.Line l : this.getAllLines()) {
+			String key = l.toString();
+			if (ref_counts.containsKey(key)) {
+				int[] f = {ref_counts.get(key)};
+				l.setCounts(f, 0);
+			}
+		}
+		this.updateFminFmax();
+		return true;
+		//voc.toTxt(new File("/home/mdecorde/TEMP/after.tsv"), "UTF-8", "\t", "");
+	}
+	
+	@Override
+	public boolean canCompute() {
+		if (getCorpus() == null && getPartition() == null) {
+			System.out.println("Corpus or partition not set");
+			return false;
+		}
+
+		if (pProperties == null || pProperties.size() == 0) {
+			System.out.println("No property set.");
+			return false;
+		}
+
+		if (pQuery == null || pQuery.getQueryString().length() == 0) {
+			System.out.println("No query set.");
+			return false;
+		}
+		
+		return true;
+	}
+
+	@Override
+	public void clean() {
+		try {
+			if (writer != null) {
+				this.writer.flush();
+				this.writer.close();
+			}
+		} catch (IOException e) {
+			org.txm.utils.logger.Log.printStackTrace(e);
+		}
+	}
+
 	/**
 	 * Initializes the index using a lexicon.
 	 *
@@ -304,7 +319,7 @@
 				lexicon.compute(monitor);
 			}
 
-			this.nLines = lexicon.nbrOfToken();
+			this.nTotalTokens = lexicon.nbrOfToken();
 			String[] forms = lexicon.getForms();
 			int[] freqs = lexicon.getFreq();
 			int[] ids = lexicon.getIds();
@@ -355,7 +370,6 @@
 		this.releaseSemaphore();
 	}
 
-
 	/**
 	 * Equals.
 	 *
@@ -373,6 +387,7 @@
 		return false;
 	}
 
+
 	/**
 	 * remove linen which frequency is not in the [Fmin,Fmax] inverval.
 	 *
@@ -391,14 +406,14 @@
 			int f = line.getFrequency();
 			if (pFminFilter != null && f < pFminFilter) { // if its frequency is not in the interval, remove it
 
-				nLines -= line.getFrequency();
+				nTotalTokens -= line.getFrequency();
 				lines.remove(i);
 				i--;
 				continue; // no need to go further the line is removed
 			}
 			if (pFmaxFilter != null && f > pFmaxFilter) { // if its frequency is not in the interval, remove it
 
-				nLines -= line.getFrequency();
+				nTotalTokens -= line.getFrequency();
 				lines.remove(i);
 				i--;
 			}
@@ -510,6 +525,10 @@
 		return lexicon;
 	}
 
+	public boolean getLexiconMode() {
+		return this.lexiconMode;
+	}
+
 	/**
 	 * return the lines from le "start"th one to the "end"th one.
 	 *
@@ -623,6 +642,10 @@
 
 
 
+	public String getPropertySeparator() {
+		return pPropertySeparator ;
+	}
+
 	/**
 	 * Gets the query.
 	 *
@@ -654,14 +677,18 @@
 	}
 
 	/**
-	 * Gets the t.
+	 * Gets the number of tokens found
 	 *
 	 * @return the number of tokens returned by the selection
 	 */
 	public int getT() {
-		return nLines;
+		return nTotalTokens;
 	}
 
+	public int getTopIndex() {
+		return pTopIndex;
+	}
+
 	/**
 	 * Gets the v.
 	 *
@@ -696,7 +723,7 @@
 		QueryResult result = corpus.query(pQuery, "index", true); //$NON-NLS-1$
 		boolean isTargetUsed = CQPEngine.getCqiClient().subCorpusHasField(result.getQualifiedCqpId(), ICqiClient.CQI_CONST_FIELD_TARGET);
 		int nbresults = result.getNMatch();
-		this.nLines += nbresults; // get number of tokens
+		this.nTotalTokens += nbresults; // get number of tokens
 
 		// System.out.println("nLines : "+nLines);
 		List<Match> matches = null;
@@ -814,6 +841,10 @@
 
 	}
 
+	public void setLexiconMode(boolean mode) {
+		this.lexiconMode = mode;
+	}
+
 	/**
 	 * update the lines counts.
 	 */
@@ -829,11 +860,14 @@
 		}
 	}
 
+	public void setNLinesPerPage(int nLinesPerPage) {
+		this.pNLinesPerPage = Math.max(nLinesPerPage, 1);
+	}
+
 	public void setParameters(List<Property> props) {
 		this.pQuery = new Query("[]");
 		this.pProperties = props;
 		this.lexicon = null;
-		this.dirty = true;
 	}
 
 	public void setParameters(Query query, List<Property> props, Integer filterFmin, Integer filterFmax, Integer filterVmax, Integer nLinesPerPage) {
@@ -843,7 +877,6 @@
 		if (filterFmin != null) this.pFminFilter = filterFmin;
 		if (filterVmax != null) this.pVmaxFilter = filterVmax;
 		if (nLinesPerPage != null) this.pNLinesPerPage = nLinesPerPage;
-		this.dirty = true;
 	}
 
 	@Override
@@ -857,7 +890,6 @@
 			Integer nLinesPerPage = (Integer) parameters.get("nLinesPerPage");
 
 			this.setParameters(query, props, filterFmin, filterFmax, filterVmax, nLinesPerPage);
-			this.saveParameters();
 		} catch (Exception e) {
 			System.out.println("Error while setting parameters of Index: "+e.getLocalizedMessage());
 			Log.printStackTrace(e);
@@ -866,6 +898,15 @@
 		return true;
 	}
 
+
+	public void setTopLine(int i) {
+		pTopIndex = Math.max(i, 0);
+	}
+
+	public void setVMax(int maxFilter) {
+		this.pVmaxFilter = maxFilter;
+	}
+
 	/**
 	 * Sort lines.
 	 *
@@ -876,6 +917,7 @@
 		LineComparator lc = new LineComparator(mode, reverse);
 		lc.initialize(this.getCorpus());
 		Collections.sort(lines, lc);
+		this.pTopIndex = 0; // return to the first page
 	}
 
 	/**
@@ -973,7 +1015,6 @@
 		writer.close();
 	}
 
-
 	/**
 	 * Write the lines between from and to on a writer.
 	 *
@@ -1050,30 +1091,4 @@
 				Fmax = f;
 		}
 	}
-
-	@Override
-	public boolean canCompute() {
-		if (getCorpus() == null && getPartition() == null) {
-			System.out.println("Corpus or partition not set");
-			return false;
-		}
-
-		if (pProperties == null || pProperties.size() == 0) {
-			System.out.println("No property set.");
-			return false;
-		}
-
-		if (pQuery == null || pQuery.getQueryString().length() == 0) {
-			System.out.println("No query set.");
-			return false;
-		}
-		
-		return true;
-	}
-
-	@Override
-	public boolean saveParameters() {
-		// TODO Auto-generated method stub
-		return false;
-	}
 }
Index: tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/editor/DiagnosticEditor.java
===================================================================
--- tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/editor/DiagnosticEditor.java	(revision 541)
+++ tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/editor/DiagnosticEditor.java	(revision 542)
@@ -55,7 +55,7 @@
 	}
 	
 	@Override
-	public void refresh() {
+	public void refresh(boolean update) {
 		super.refresh();
 		File file = diag.getHTMLFile();
 		if (file.exists()) {
Index: tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/Messages.java
===================================================================
--- tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/Messages.java	(revision 541)
+++ tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/Messages.java	(revision 542)
@@ -19,6 +19,7 @@
 	public static String CQPPreferencePage_18;
 	
 	static {
+		System.out.println("INIT: "+Messages.class.getPackage().getName());
 		Utf8NLS.initializeMessages(Messages.class);
 	}
 }
Index: tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/messages.properties
===================================================================
--- tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/messages.properties	(revision 541)
+++ tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/messages.properties	(revision 542)
@@ -2,22 +2,7 @@
 #Eclipse modern messages class
 #Mon Feb 10 11:04:14 CET 2014
 
-OK=OK
-REFRESH=Refresh
-CGU_TITLE=Terms of service
-CGU_MESSAGE=<p>TXM is published under the GNU GPL 2 license &lt;<a href="https://www.gnu.org/licenses/gpl-2.0.en.html">https://www.gnu.org/licenses/gpl-2.0.en.html</a>&gt;.
-CGU_CHECKMESSAGE=I accept the licence and I undertake to cite TXM for acknowledging my use of TXM in my research work \n(see the Citation section of the <http://textometrie.ens-lyon.fr/spip.php?rubrique61> page).
-
 
-About_Menu_Label = About TXM...
-
-AdapterFactory_0 = ** Warning: the corpus {0} is corrupted. Some commands won''t work correctly.
-
-
-ERROR                           = Error:
-
-AssistedQueryWidget_0 = Open the query assistant
-
 CANT_CREATE_GRAPHIC = ** Cannot create the graphic
 
 CQPPreferenceInitializer_0 = localhost
@@ -35,29 +20,6 @@
 CQPPreferencePage_17 = Path to CWB server initialisation file
 CQPPreferencePage_18 = Additionnal &options for the CWB server:
 
-Cannot_ask_simple_when_advance = Cannot ask for the simple tab when the user has selected the advanced tab
-
-ComplexSortSelector_0 = sort keys:
-ComplexSortSelector_1 = Complex sort:
-ComplexSortSelector_2 = Sort
-ComplexSortSelector_5 = ** Error during sort: {0}
-ComplexSortSelector_6 = default
-
-ComplexSort_0         = Opening complex sort dialog
-ComplexSort_1         = &Multiple Sort
-ComplexSort_10        = Invalid comparator
-ComplexSort_11        = you must select at least 2 comparators
-ComplexSort_12        = Adding to selection
-ComplexSort_14        = Remove from selection
-ComplexSort_16        = Moving up the selection
-ComplexSort_18        = Moving down the selection
-ComplexSort_2         = Define and use a composite sorter
-ComplexSort_3         = Select a composite sorter
-ComplexSort_4         = &New
-ComplexSort_5         = Create a new sorter
-ComplexSort_6         = Name:
-ComplexSort_9         = Name is mandatory.
-
 ComplexSubcorpusPanel_0  = Match
 ComplexSubcorpusPanel_1  = All criteria
 ComplexSubcorpusPanel_16 = does not contain
@@ -69,75 +31,11 @@
 ComputeDiagnostic_0 = Selection is not structured
 ComputeDiagnostic_1 = Error: selection is not a corpus:
 
-
 ONE_RESULT                         = Done: one result.
 
-ConvertCorpus_0 = Corpus conversion failed.
-
-
-CreatePartitionDialog_0  = Create Partition
-CreatePartitionDialog_1  = Simple
-CreatePartitionDialog_10 = Error: the partition created has no part
-CreatePartitionDialog_16 = Queries cannot be left empty.
-CreatePartitionDialog_2  = &Structure:
-CreatePartitionDialog_3  = Assisted
-CreatePartitionDialog_4  = &Property:
-CreatePartitionDialog_5  = Advanced
-CreatePartitionDialog_6  = &Name:
-CreatePartitionDialog_7  = Part
-CreatePartitionDialog_8  = No part was defined
-CreatePartitionDialog_9  = No partition name was specified. The name is {0}
-
-CreatePartition_0        = Creating a new partition with {0}
-CreatePartition_2        = ** Error: the partition was not created
-CreatePartition_5        = Done: {0} items
-CreatePartition_55       = Done: {0} items for {1} occurrences
-CreatePartition_6        = Done: {0} parts
-
-CreateSubCorpus_0      = ** Error: subcorpus was not created
-CreateSubCorpus_1      = No selection for: 
-CreateSubCorpus_2      = Failed to get last CQP error:
-CreateSubCorpus_3      = Selection is not a corpus: 
-CreateSubCorpus_begin  = Creating a sub-corpus in the Search Engine
-CreateSubCorpus_create = Creating a sub-corpus on {0}
-
-CreateSubcorpusDialog_0  = Create subcorpus
-CreateSubcorpusDialog_10 = &Query:
-CreateSubcorpusDialog_11 = Invalid name
-CreateSubcorpusDialog_13 = Invalid query
-CreateSubcorpusDialog_14 = Query cannot be left empty.
-CreateSubcorpusDialog_6  = &Value:
-CreateSubcorpusDialog_8  = No subcorpus name was specified. We've generated one.
-
-CreateSubcorpus_7        = Compute SubCorpus on {0}. Structs: {1} & props {2}: {3}
-CreateSubcorpus_8        = Done: {0} created
-CreateSubcorpus_9        = Compute SubCorpus on {0}. Query: {1}
-
-DONE = Done: {0}
-
-DefineReferencePattern_0 = References display options
-DefineReferencePattern_1 = References &display options
-DefineReferencePattern_2 = References display options
-DefineReferencePattern_3 = References &sort options
-DefineReferencePattern_4 = References sort options
-DefineReferencePattern_5 = References sort options
-
-DeleteFile_0 = Are you sure you want to delete to sort
-DeleteFile_2 = ** Failed to delete file
-
 DeleteInCorporaView_1 = ** Failed to delete subcorpus {0}
 DeleteInCorporaView_2 = ** Failed to delete partition {0}
 
-DeleteLines_0 = The table must contain at least one line
-DeleteLines_1 = Are you sure ?
-
-DeleteObject_0  = Deleting {0}, continue ?
-DeleteObject_1  = Failed to remove 
-DeleteObject_10 = Deleted: {0}
-DeleteObject_3  = Error: delete() returned 'false'
-DeleteObject_4  = Error while deleting {0}: {1}
-DeleteObject_5  = Deleting {0}
-
 DiagnosticPreferencePage_1 = Description
 DiagnosticPreferencePage_2 = Maximum values to display
 DiagnosticPreferencePage_3 = Order partition parts by size
@@ -173,39 +71,6 @@
 
 GraphicalLogger_0 = Error {0}
 
-GroovyConsole_4 = \nConsole reports an Internal error.
-GroovyConsole_5 = The error is:
-
-ImportDialog_0  = Import setup - {0}
-ImportDialog_1  = Source directory:
-ImportDialog_13 = This directory seems to contain a binary corpus
-ImportDialog_14 = This computer encoding:
-ImportDialog_16 = Guess:
-ImportDialog_19 = This computer language:
-ImportDialog_22 = Select:
-ImportDialog_23 = Options
-ImportDialog_4  = Sources characters encoding:
-ImportDialog_5  = Main language:
-ImportDialog_6  = Tokenizer parameter file:
-
-ImportFormEditor_0 = Warning: the import script is missing: {0}
-ImportFormEditor_1 = {0} Import
-
-ImportPreferencePage_0 = Character encoding
-ImportPreferencePage_2 = metadata.csv file format
-ImportPreferencePage_3 = Clipboard
-ImportPreferencePage_4 = Default language
-ImportPreferencePage_5 = Note: Use '??' value to guess.
-
-ImportSelectedText_0  = Import clipboard text
-ImportSelectedText_1  = clipboard
-ImportSelectedText_10 = Identified Language
-ImportSelectedText_12 = Using language
-ImportSelectedText_2  = ** Clipboard is empty
-ImportSelectedText_3  = Confirm
-ImportSelectedText_4  = The corpus  and the corpus {0} will be deleted
-ImportSelectedText_6  = ** Internal error: ImportSelectedText failed to get default project
-
 InternalCorpusView_0 = Error while computing corpus summary
 InternalCorpusView_1 = Reload
 InternalCorpusView_2 = Error: getText: {0}
@@ -214,20 +79,6 @@
 
 LastCQPError = Last CQP error:
 
-LoadBinaryCorpus_0  = : OK
-LoadBinaryCorpus_1  = Failed to remove old backup of corpus: 
-LoadBinaryCorpus_10 = The new binary corpus '
-LoadBinaryCorpus_11 = ' could not be loaded.
-LoadBinaryCorpus_12 = Restoring previous corpus...
-LoadBinaryCorpus_13 = Failed to delete corrupted corpus: 
-LoadBinaryCorpus_14 = . Could not restore 
-LoadBinaryCorpus_15 = Failed to restore backup corpus: 
-LoadBinaryCorpus_2  = Failed to backup the corpus to: 
-LoadBinaryCorpus_3  = : FAIL (reason=
-LoadBinaryCorpus_4  = Failed to get the new binary corpus
-LoadBinaryCorpus_5  = No corpus found in the binary corpus.
-LoadBinaryCorpus_6  = Testing the new CQP corpus: 
-LoadBinaryCorpus_7  = )
 
 NumberOfLines = Number of lines:
 
@@ -278,13 +129,10 @@
 QueryAssistDialog_34 = separated by at least 1 word
 QueryAssistDialog_8  = a word with its property
 
-
 RefreshingCorporaView = Refreshing corpora...
 
-
 SEARCH = &Search
 
-
 SetContextSize_1 = &Contexts display options
 SetContextSize_2 = Contexts display options
 SetContextSize_3 = Left context size
Index: tmp/org.txm.searchengine.cqp.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.searchengine.cqp.rcp/META-INF/MANIFEST.MF	(revision 541)
+++ tmp/org.txm.searchengine.cqp.rcp/META-INF/MANIFEST.MF	(revision 542)
@@ -13,5 +13,6 @@
  org.eclipse.ui
 Export-Package: org.txm.rcp.commands.base,
  org.txm.searchengine.cqp.rcp,
+ org.txm.searchengine.cqp.rcp.command,
  org.txm.searchengine.cqp.rcp.editor,
  org.txm.searchengine.cqp.rcp.preferences
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor2.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor2.java	(revision 541)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor2.java	(revision 542)
@@ -508,7 +508,7 @@
 	}
 	
 	@Override
-	public void refresh()	{
+	public void refresh(boolean update)	{
 		this.refreshTable();
 		this.viewer.getTable().deselectAll();
 		this.refreshInfos();
@@ -715,17 +715,6 @@
 	}
 
 	/**
-	 * 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
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/messages.properties
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/messages.properties	(revision 541)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/messages.properties	(revision 542)
@@ -8,8 +8,6 @@
 LexicalTableEditor_15 = ** Error while importing data:
 LexicalTableEditor_16 = Filtering lines
 LexicalTableEditor_18 = Merging lines
-LexicalTableEditor_2  = , Fmin
-LexicalTableEditor_3  = , Fmax
 LexicalTableEditor_4  = Apply
 LexicalTableEditor_5  = Keep: {0} lines, Fmin {1}
 LexicalTableEditor_6  = Fmin:
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/messages_ru.properties
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/messages_ru.properties	(revision 541)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/messages/messages_ru.properties	(revision 542)
@@ -8,8 +8,6 @@
 LexicalTableEditor_15 = ** Ошибка при импортировании данных:  
 LexicalTableEditor_16 = Фильтрация строк
 LexicalTableEditor_18 = Объединение строк
-LexicalTableEditor_2  = , Fmin 
-LexicalTableEditor_3  = , Fmax 
 LexicalTableEditor_4  = Оставить
 LexicalTableEditor_5  = Оставить {0} строк, Fmin {1}
 LexicalTableEditor_6  = Fmin :
Index: tmp/org.txm.internalview.rcp/src/org/txm/internal/rcp/editors/InternalViewEditor.java
===================================================================
--- tmp/org.txm.internalview.rcp/src/org/txm/internal/rcp/editors/InternalViewEditor.java	(revision 541)
+++ tmp/org.txm.internalview.rcp/src/org/txm/internal/rcp/editors/InternalViewEditor.java	(revision 542)
@@ -97,14 +97,6 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.ui.part.EditorPart#isDirty()
-	 */
-	@Override
-	public boolean isDirty() {
-		return internalView.isDirty();
-	}
-
-	/* (non-Javadoc)
 	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
 	 */
 	@Override
Index: tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/concordance/ConcordanceAnnotationExtension.java
===================================================================
--- tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/concordance/ConcordanceAnnotationExtension.java	(revision 541)
+++ tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/concordance/ConcordanceAnnotationExtension.java	(revision 542)
@@ -194,7 +194,7 @@
 							if (type != null) {
 								annotations.setViewAnnotation(type);
 								annotations.setAnnotationOverlap(true);
-								editor.fillDisplayArea(editor.getTopLine(), editor.getBottomLine()+1);
+								editor.fillDisplayArea();
 							}
 						}
 
@@ -401,7 +401,7 @@
 					if (concordance != null) {
 						annotations.setViewAnnotation(type);
 						annotations.setAnnotationOverlap(true);
-						editor.fillDisplayArea(editor.getTopLine(), editor.getBottomLine()+1);
+						editor.fillDisplayArea();
 					}
 
 					updateAnnotationWidgetStates();
@@ -477,15 +477,15 @@
 								if (concordance != null) {
 									annotations.setViewAnnotation(type);
 									annotations.setAnnotationOverlap(true);
-									editor.fillDisplayArea(editor.getTopLine(), editor.getBottomLine()+1);
+									editor.fillDisplayArea();
 								}
 								annotationArea.layout(true);
-							}else {
-								if (typesList.size() > 1){
-									if (annotationTypesCombo != null) annotationTypesCombo.getCombo().select(typesList.size()-1);
-
+							} else {
+								if (typesList.size() > 1) {
+									if (annotationTypesCombo != null) {
+										annotationTypesCombo.getCombo().select(typesList.size()-1);
+									}
 								}
-
 							}
 							KRView.refresh();
 							updateAnnotationWidgetStates();
@@ -502,7 +502,9 @@
 		if (advanced_annotation_mode) {
 			Label valueLabel = new Label(annotationArea, SWT.NONE);
 			String valueLabelText = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_80");
-			if (valueLabelText == null) valueLabelText= Messages.ConcordancesEditor_80;
+			if (valueLabelText == null) {
+				valueLabelText= Messages.ConcordancesEditor_80;
+			}
 			valueLabel.setText(valueLabelText);
 			valueLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
 		}
@@ -529,7 +531,7 @@
 			addTypedValueLink.setText("..."); //$NON-NLS-1$
 			if (advanced_annotation_mode.equals(RCPMessages.AnnotationPreferences_2)) {
 				addTypedValueLink.setToolTipText(Messages.ConcordancesEditor_79);
-			}else {
+			} else {
 				addTypedValueLink.setToolTipText(Messages.ConcordancesEditor_77);
 			}
 			addTypedValueLink.setEnabled(true);
@@ -550,7 +552,7 @@
 						String title = currentKnowledgeRepository.getString(editor.getLocale(), "ConcordancesEditor_100");
 						if (title == null) title = Messages.ConcordancesEditor_100;
 						dialog.setTitle(Messages.bind(title, type.getName()));//+"valeurs de "+type.getName());
-					}else {
+					} else {
 						dialog.setTitle(Messages.ConcordancesEditor_99);//+"valeurs de "+type.getName());
 					}
 					dialog.setContentProvider(new ArrayContentProvider());
@@ -650,11 +652,8 @@
 			public void widgetDefaultSelected(SelectionEvent e) { }
 		});
 
-
 		updateAnnotationWidgetStates();
 		
-		
-
 		parent.layout();
 	}
 
@@ -663,7 +662,9 @@
 		final IStructuredSelection lineSelection = (IStructuredSelection) selection;
 		List<Line> lines = lineSelection.toList();
 		ArrayList<Match> matches = new ArrayList<Match>();
-		for (Line l : lines) matches.add(l.getMatch());
+		for (Line l : lines) {
+			matches.add(l.getMatch());
+		}
 
 		affectMatchesToSelection(matches);
 	}
@@ -671,7 +672,9 @@
 	protected AnnotationType getSelectedAnnotationType() {
 		if (annotationTypesCombo != null) {
 			IStructuredSelection isel = (IStructuredSelection)annotationTypesCombo.getSelection();
-			if (isel.isEmpty()) return null;
+			if (isel.isEmpty()) {
+				return null;
+			}
 			return (AnnotationType) isel.getFirstElement();
 		} else { // simple mode
 			return tagAnnotationType;
@@ -737,9 +740,13 @@
 		}
 
 		if (advanced_annotation_mode.equals(RCPMessages.AnnotationPreferences_2)) {
-			if (infosAnnotTypeSelectedLink != null) infosAnnotTypeSelectedLink.setEnabled(getSelectedAnnotationType() != null);
+			if (infosAnnotTypeSelectedLink != null) {
+				infosAnnotTypeSelectedLink.setEnabled(getSelectedAnnotationType() != null);
+			}
 		}
-		if (addTypedValueLink != null) addTypedValueLink.setEnabled(getSelectedAnnotationType() != null);
+		if (addTypedValueLink != null) {
+			addTypedValueLink.setEnabled(getSelectedAnnotationType() != null);
+		}
 
 		if (concordance == null) {
 			affectAnnotationButton.setEnabled(false);
@@ -748,12 +755,18 @@
 	}
 
 	protected void deleteAnnotationValues(List<Match> matches, AnnotationType type, JobHandler job) {
-		if (concordance == null) return;
+		if (concordance == null) {
+			return;
+		}
+		
 		if (matches.size() == 0) {
 			System.out.println("No lines selected. Aborting."); //$NON-NLS-1$
 			return;
 		}
-		if (type == null) return;
+		
+		if (type == null) {
+			return;
+		}
 
 		if (concordance != null) {
 			try {
@@ -772,7 +785,7 @@
 			job.syncExec(new Runnable() {
 				@Override
 				public void run() {
-					editor.fillDisplayArea(editor.getTopLine(), editor.getBottomLine()+1);
+					editor.fillDisplayArea();
 					CorporaView.refreshObject(corpus);
 				}
 			});
@@ -894,7 +907,7 @@
 		job.syncExec(new Runnable() {
 			@Override
 			public void run() {
-				editor.fillDisplayArea(editor.getTopLine(), editor.getBottomLine()+1);
+				editor.fillDisplayArea();
 				CorporaView.refreshObject(corpus);
 			}
 		});
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 541)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 542)
@@ -498,14 +498,6 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.ui.part.EditorPart#isDirty()
-	 */
-	@Override
-	public boolean isDirty() {
-		return false;
-	}
-
-	/* (non-Javadoc)
 	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
 	 */
 	@Override
