Index: TXM/trunk/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 3387)
+++ TXM/trunk/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 3388)
@@ -163,12 +163,14 @@
 	public static final String DEBUG = "debug";
 	
 	public static final String UPDATECORPUS = "corpus.update";
+	public static final String UPDATEEDITIONS = "update_editions";
 	
 	public static final String NORMALISEANAVALUES = "normalize.ana.values";
 	
 	public static final String NORMALISEATTRIBUTEVALUES = "normalize.attribute.values";
 	
 	public static final String CORPUS_VERSION = "corpus_version";
+
 	
 	/**
 	 * Gets the instance.
@@ -225,6 +227,8 @@
 		preferences.putBoolean(SHOW_ALL_RESULT_NODES, false);
 		preferences.putBoolean(AUTO_PERSISTENCE_ENABLED, false);
 		
+		preferences.putBoolean(UPDATEEDITIONS, true);
+		
 		if (Toolbox.getTxmHomePath().endsWith("-dev")) {
 			preferences.put(UPDATESITE,		"file://" + System.getProperty("user.home") + "/workspace047/TXMReleasePlugins.site/");
 			preferences.put(RAWFILESSITE,	"file://" + System.getProperty("user.home") + "/workspace047/org.txm.setups/");
Index: TXM/trunk/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/objects/Project.java	(revision 3387)
+++ TXM/trunk/org.txm.core/src/java/org/txm/objects/Project.java	(revision 3388)
@@ -1464,8 +1464,13 @@
 		return this.getImportParameters().getBoolean(ImportKeys.UPDATECORPUS, false);
 	}
 	
-	public void setDoUpdate(boolean update) {
+	public boolean getDoUpdateEdition() {
+		return this.getImportParameters().getBoolean(ImportKeys.UPDATECORPUSEDITION, true);
+	}
+	
+	public void setDoUpdate(boolean update, boolean updateedition) {
 		this.getImportParameters().putBoolean(ImportKeys.UPDATECORPUS, update);
+		this.getImportParameters().putBoolean(ImportKeys.UPDATECORPUSEDITION, updateedition);
 	}
 	
 	public boolean getDoMultiThread() {
Index: TXM/trunk/org.txm.core/src/java/org/txm/importer/xtz/ImportModule.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/importer/xtz/ImportModule.java	(revision 3387)
+++ TXM/trunk/org.txm.core/src/java/org/txm/importer/xtz/ImportModule.java	(revision 3388)
@@ -48,6 +48,8 @@
 	
 	public boolean updateCorpus = false;
 	
+	public boolean updateEdition = true;
+	
 	public String corpusName;
 	
 	IProgressMonitor monitor;
@@ -73,6 +75,10 @@
 		return updateCorpus;
 	}
 	
+	public boolean isUpdatingEdition() {
+		return updateEdition;
+	}
+	
 	public void init(Project p) {
 		this.project = p;
 		
@@ -84,6 +90,7 @@
 		}
 		this.multithread = project.getDoMultiThread();
 		this.updateCorpus = project.getDoUpdate();
+		this.updateEdition = project.getDoUpdateEdition();
 		
 		
 		this.sourceDirectory = project.getSrcdir();
@@ -255,16 +262,24 @@
 			}
 		}
 		
-		Tpager.start();
+		if (updateEdition) {
+			Tpager.start();
+		}
+		
 		if (multithread) Tcompiler.join(); // wait for both threads to end
-		Tpager.join();
 		
+		if (updateEdition) {
+			Tpager.join();
+		}
+		
 		if (isSuccessful) { // all done TODO remove this code when Text._compute() will be implemented
-			for (Text t : project.getTexts()) {
-				t.compute(false);
+			if (updateEdition) {
+				for (Text t : project.getTexts()) {
+					t.compute(false);
+				}
 			}
 			
-			project.setDoUpdate(false);
+			project.setDoUpdate(false, false);
 		}
 	}
 	
Index: TXM/trunk/org.txm.core/src/java/org/txm/importer/xtz/ImportKeys.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/importer/xtz/ImportKeys.java	(revision 3387)
+++ TXM/trunk/org.txm.core/src/java/org/txm/importer/xtz/ImportKeys.java	(revision 3388)
@@ -10,6 +10,7 @@
 	public static final String MULTITHREAD = "multithread";
 	public static final String DEBUG = "debug";
 	public static final String UPDATECORPUS = "corpus.update";
+	public static final String UPDATECORPUSEDITION = "corpus.update.edition";
 	
 	public static final String NORMALISEANAVALUES = "normalize.ana.values";
 	public static final String NORMALISEATTRIBUTEVALUES = "normalize.attribute.values";
Index: TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationArea.java
===================================================================
--- TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationArea.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationArea.java	(revision 3388)
@@ -109,9 +109,15 @@
 	
 	/**
 	 * 
-	 * @return true if the corpus indexes & editions needs to be updated **after saving annotation**
+	 * @return true if the corpus indexes needs to be updated **after saving annotation**
 	 */
 	public abstract boolean needToUpdateIndexes();
 	
+	/**
+	 * 
+	 * @return true if the corpus editions needs to be updated **after saving updating indexes**
+	 */
+	public abstract boolean needToUpdateEditions();
+	
 	public abstract boolean hasChanges();
 }
Index: TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java
===================================================================
--- TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java	(revision 3388)
@@ -20,6 +20,7 @@
 import org.eclipse.swt.widgets.ToolItem;
 import org.txm.annotation.rcp.messages.AnnotationUIMessages;
 import org.txm.concordance.core.functions.Concordance;
+import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.results.TXMResult;
 import org.txm.objects.Text;
 import org.txm.rcp.IImageKeys;
@@ -297,6 +298,7 @@
 					
 					Log.info("Saving annotations...");
 					boolean needToUpdateIndexes = false;
+					boolean needToUpdateEditions = false;
 					// System.out.println("Saving annotations...");
 					if (annotationAreas != null && annotationAreas.size() > 0) {
 						for (AnnotationArea aa : annotationAreas) {
@@ -304,13 +306,14 @@
 									|| (aa.isDirty() 
 											&& aa.save()
 											&& aa.needToUpdateIndexes());
+							needToUpdateEditions = needToUpdateEditions || aa.needToUpdateEditions();
 						}
 					}
 					
 					if (needToUpdateIndexes) {
 						final MainCorpus corpus = editor.getResult().getFirstParent(MainCorpus.class);
 						monitor.setTaskName("Updating corpus indexes and editions");
-						if (corpus != null && UpdateCorpus.update(corpus) != null) {
+						if (corpus != null && UpdateCorpus.update(corpus, needToUpdateEditions) != null) {
 							monitor.worked(50);
 							this.syncExec(new Runnable() {
 								
Index: TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/dialogs/ExportCorpusDialog.java
===================================================================
--- TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/dialogs/ExportCorpusDialog.java	(revision 3387)
+++ TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/dialogs/ExportCorpusDialog.java	(revision 3388)
@@ -148,12 +148,14 @@
 			public void widgetDefaultSelected(SelectionEvent e) {}
 		});
 		
-		new Label(comp, SWT.NONE).setText("Rename corpus");
+		new Label(comp, SWT.NONE).setText("Corpus name");
 		renameField = new Text(comp, SWT.BORDER);
 		GridData gdata2 = GridDataFactory.fillDefaults().create();
 		gdata2.widthHint = 50;
 		gdata2.horizontalSpan = 2;
 		renameField.setLayoutData(gdata2);
+		renameField.setText(corpus.getProject().getName());
+		renameField.setToolTipText("To rename the corpus");
 		
 		new Label(comp, SWT.NONE).setText("Corpus version");
 		versionField = new Combo(comp, SWT.SINGLE | SWT.READ_ONLY);
@@ -211,7 +213,7 @@
 			
 			if (files.length > 0) {
 				treeViewer = new TableViewer(comp, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
-				
+				treeViewer.getTable().setToolTipText("Directories not managed by TXM");
 				treeViewer.setContentProvider(new ArrayContentProvider());
 				
 				treeViewer.getTable().addListener(SWT.Selection, event -> {
Index: TXM/trunk/org.txm.searchengine.cqp.rcp/OSGI-INF/l10n/bundle.properties
===================================================================
--- TXM/trunk/org.txm.searchengine.cqp.rcp/OSGI-INF/l10n/bundle.properties	(revision 3387)
+++ TXM/trunk/org.txm.searchengine.cqp.rcp/OSGI-INF/l10n/bundle.properties	(revision 3388)
@@ -7,7 +7,7 @@
 command.label.8=Partition
 command.name=Sub-corpus
 command.name.2=Partition
-command.name.52=Corpus in binary format...
+command.name.52=Corpus in binary format (.txm)...
 command.name.63=Open Bibliographic notice
 command.tooltip.4=Build a partition
 command.tooltip.71=Export as a binary file
Index: TXM/trunk/org.txm.searchengine.cqp.rcp/OSGI-INF/l10n/bundle_fr.properties
===================================================================
--- TXM/trunk/org.txm.searchengine.cqp.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3387)
+++ TXM/trunk/org.txm.searchengine.cqp.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3388)
@@ -7,7 +7,7 @@
 command.label.8=Partition
 command.name=Sous-corpus
 command.name.2=Partition
-command.name.52=Corpus en format binaire...
+command.name.52=Corpus en format binaire (.txm)...
 command.name.63=Ouvrir la fiche bibliographique
 command.tooltip.4=Construire une partition
 command.tooltip.71=Exporter en fichier binaire
Index: TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java
===================================================================
--- TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 3387)
+++ TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 3388)
@@ -110,7 +110,7 @@
 	protected Spinner fMinSpinner;
 	
 	/**
-	 * MAximum frequency filtering spinner.
+	 * Maximum frequency filtering spinner.
 	 */
 	@Parameter(key = TXMPreferences.F_MAX)
 	protected Spinner fMaxSpinner;
@@ -138,8 +138,7 @@
 				ArrayList<WordProperty> availableProperties = new ArrayList<>();
 				availableProperties.addAll(CQPCorpus.getFirstParentCorpus(this.getResult()).getOrderedProperties());
 				availableProperties.addAll(CQPCorpus.getFirstParentCorpus(this.getResult()).getVirtualProperties());
-				this.unitPropertyComboViewer = new PropertiesComboViewer(mainParametersArea, this, false,
-						availableProperties, this.getResult().getUnitProperty(), false);
+				this.unitPropertyComboViewer = new PropertiesComboViewer(mainParametersArea, this, false, availableProperties, this.getResult().getUnitProperty(), false);
 			}
 			
 			
@@ -169,7 +168,6 @@
 			this.viewerComparator = new SpecificitiesLinesViewerComparator(Toolbox.getCollator(this.getResult()));
 			viewer.setComparator(this.viewerComparator);
 			
-			
 			// create 1st column: Unit
 			TableColumn unitColumn = new TableColumn(specificitesTable, SWT.NONE);
 			unitColumn.setText(TXMCoreMessages.common_units);
@@ -257,8 +255,6 @@
 			// //&& this.getResult().hasBeenComputedOnce()
 			) {
 				
-				
-				
 				// remove lexical table columns if already exist
 				// int columnsCount = specificitesTable.getColumnCount();
 				// System.out.println("SpecificitiesEditor.updateEditorFromResult(): column count = " + columnsCount);
@@ -283,7 +279,6 @@
 					
 					viewerComparator.addSelectionAdapter(viewer, freqpartTableColumn, firstLexicalTableColumnIndex);
 					
-					
 					// System.err.println("SpecificitiesEditor.updateEditorFromResult() creating column score at index " + (firstLexicalTableColumnIndex + 1));
 					
 					// SCORE COLUMN
@@ -304,7 +299,6 @@
 			
 			if (!this.getResult().isDirty()) {
 				
-				
 				String[] typeNames = this.getResult().getTypeNames(); // units
 				int[] typeFreq = this.getResult().getFormFrequencies(); // units' total freq
 				double[][] specIndex = this.getResult().getSpecificitesIndex(); // units' index for each part
@@ -319,9 +313,9 @@
 				// Log.finest("len specfreqs: " + specFreqs.length);
 				// Log.finest("len specidx: " + specIndex.length);
 				
-				Object[] tableLines = new Object[typeNames.length];
+				SpecifLine[] tableLines = new SpecifLine[typeNames.length];
 				for (int j = 0; j < tableLines.length; j++) {
-					tableLines[j] = new Object[] { typeNames[j], new Integer(typeFreq[j]), specFreqs[j], specIndex[j] };
+					tableLines[j] = new SpecifLine(typeNames[j], typeFreq[j], specFreqs[j], specIndex[j]);
 				}
 				viewer.setInput(tableLines);
 			}
Index: TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecifLine.java
===================================================================
--- TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecifLine.java	(revision 0)
+++ TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecifLine.java	(revision 3388)
@@ -0,0 +1,16 @@
+package org.txm.specificities.rcp.editors;
+
+
+public class SpecifLine {
+	public String name;
+	public int f;
+	public int[] freqs;
+	public double[] specifs;
+	
+	public SpecifLine(String name, int f, int[] freqs, double[] specifs) {
+		this.name = name;
+		this.f = f;
+		this.freqs = freqs;
+		this.specifs = specifs;
+	}
+}

Property changes on: TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecifLine.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableLabelProvider.java
===================================================================
--- TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableLabelProvider.java	(revision 3387)
+++ TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableLabelProvider.java	(revision 3388)
@@ -88,34 +88,37 @@
 	 */
 	@Override
 	public String getColumnText(Object element, int columnIndex) {
+
+		//if (1 == 1 ) return "tmp:"+element;
 		
-		Object[] line = (Object[]) element;
+		SpecifLine line = (SpecifLine) element;
 		
-		int[] freqs = (int[]) line[2];// get the freqs
+//		int[] freqs = (int[]) line[2];// get the freqs
 		// line content : {unit, freq, freqs[], scores[]}
 		
-		if (columnIndex < 2) {
-			Object cell = line[columnIndex];
-			return cell.toString();
+		if (columnIndex == 0) {
+			return line.name;
+		} else if (columnIndex == 1) {
+			return Integer.toString(line.f);
 		}
 		else if (columnIndex == 2) { // separator column
 			return EMPTY;
 		}
-		else if (columnIndex == (freqs.length * separatorOffset) + 3) { // separator column
+		else if (columnIndex == (line.freqs.length * separatorOffset) + 3) { // separator column
 			return EMPTY;
 		}
 		else {
 			columnIndex = columnIndex - 3;// this.partindexes[columnIndex - 3];
 			if (columnIndex % 2 == 0) { // FREQ COLUMN
 				columnIndex = columnIndex / 2; // because there is 2 col per part
-				return String.valueOf(freqs[columnIndex]);
+				return Integer.toString(line.freqs[columnIndex]);//String.valueOf(line.freqs[columnIndex]);
 			}
 			else { // SCORE COLUMN
 				columnIndex = columnIndex / 2; // because there is 2 cols per part
-				Object specif = line[3]; // get the scores
-				double[] specifs = (double[]) specif;
+//				Object specif = line[3]; // get the scores
+//				double[] specifs = (double[]) specif;
 				
-				double s = specifs[columnIndex];
+				double s = line.specifs[columnIndex];
 				// if (-2 < s && s < 2) return "";
 				return String.format(format, s);
 				// if (showPValues) {
@@ -136,5 +139,4 @@
 		return false;
 	}
 	
-	
 }
Index: TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesLinesViewerComparator.java
===================================================================
--- TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesLinesViewerComparator.java	(revision 3387)
+++ TXM/trunk/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesLinesViewerComparator.java	(revision 3388)
@@ -20,75 +20,81 @@
  *
  */
 public class SpecificitiesLinesViewerComparator extends TableLinesViewerComparator {
-
 	
+	
 	/**
 	 * 
 	 * @param collator
 	 */
 	public SpecificitiesLinesViewerComparator(Collator collator) {
+		
 		super(collator);
 	}
 	
 	
 	@Override
 	public int compare(Viewer viewer, Object e1, Object e2) {
-		Object[] line1 = (Object[]) e1;
-		Object[] line2 = (Object[]) e2;
 		
+		SpecifLine line1 = (SpecifLine) e1;
+		SpecifLine line2 = (SpecifLine) e2;
+		
 		int result = 0;
 		
 		switch (this.lastColumnIndex) {
-		// type names
-		case 0:
-			result = this.collator.compare(line1[0], line2[0]);
-			break;
-		// total frequencies	
-		case 1:
-			result = ((Integer) line1[1]).compareTo(((Integer) line2[1]));
-			break;
-		// single part frequencies or single part scores
-		default:
-			int dataArrayRowIndex = (this.lastColumnIndex - 3) / 2; // 3 is the index of the column of the first part
-			
-			// part score
-			if((this.lastColumnIndex % 2) == 0)	{
-				result = new Double(((double[]) line1[3])[dataArrayRowIndex]).compareTo(new Double(((double[]) line2[3])[dataArrayRowIndex]));
-			}
-			// part frequency
-			else	{
-				result = new Integer(((int[]) line1[2])[dataArrayRowIndex]).compareTo(new Integer(((int[]) line2[2])[dataArrayRowIndex]));
-			}
+			// type names
+			case 0:
+				result = this.collator.compare(line1.name, line2.name);
+				break;
+			// total frequencies
+			case 1:
+				result = line1.f - line2.f;
+				break;
+			// single part frequencies or single part scores
+			default:
+				int dataArrayRowIndex = (this.lastColumnIndex - 3) / 2; // 3 is the index of the column of the first part
+				
+				// part score
+				if ((this.lastColumnIndex % 2) == 0) {
+					result = new Double(line1.specifs[dataArrayRowIndex]).compareTo(new Double(line2.specifs[dataArrayRowIndex]));
+				}
+				// part frequency
+				else {
+					result = new Integer(line1.freqs[dataArrayRowIndex]).compareTo(new Integer(line2.freqs[dataArrayRowIndex]));
+				}
 		}
-
+		
 		// reverse if needed
 		if (this.direction == DESCENDING) {
 			result = -result;
 		}
 		return result;
 	}
-
+	
 	@Override
 	public void addSelectionAdapter(final TableViewer viewer, final TableColumn column, final int index) {
+		
 		column.addSelectionListener(new SelectionAdapter() {
+			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				
+				// System.out.println("select column="+column.getText());
 				boolean partScoreFirstSort = (index != 0 && (index % 2) == 0 && lastColumnIndex != index);
 				
 				setColumn(index);
 				
 				// force descending order on part score column first sorting
-				if(partScoreFirstSort)	{
+				if (partScoreFirstSort) {
 					setDirection(DESCENDING);
 				}
 				viewer.getTable().setSortDirection(getDirection());
 				viewer.getTable().setSortColumn(column);
 				
-				TXMEditor.packColumns(viewer);
+				// long t = System.currentTimeMillis();
+				TXMEditor.refreshColumns(viewer);
+				// System.out.println("T="+(System.currentTimeMillis()-t));
 			}
 		});
 	}
 	
-	
 }
Index: TXM/trunk/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java
===================================================================
--- TXM/trunk/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 3387)
+++ TXM/trunk/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 3388)
@@ -745,7 +745,7 @@
 		}
 		
 		// Refresh and pack the columns
-		TXMEditor.packColumns(this.viewer);
+		TXMEditor.refreshColumns(this.viewer);
 		
 	}
 	
Index: TXM/trunk/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/preferences/KRAnnotationPreferences.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/preferences/KRAnnotationPreferences.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/preferences/KRAnnotationPreferences.java	(revision 3388)
@@ -7,13 +7,14 @@
  * Preferences initializer and manager.
  * 
  * @author mdecorde
- * @author sjacquot
  *
  */
 public class KRAnnotationPreferences extends TXMPreferences {
 	
 	public static final String UPDATE_EDITION = "udpate_edition";
 	
+	public static final String UPDATE_INDEXES = "udpate_indexes";
+	
 	public static final String PRESERVE_ANNOTATIONS = "reset_temporary_annotations_when leaving_txm";
 	
 	/**
@@ -22,6 +23,7 @@
 	 * @return the instance
 	 */
 	public static TXMPreferences getInstance() {
+		
 		if (!TXMPreferences.instances.containsKey(KRAnnotationPreferences.class)) {
 			new KRAnnotationPreferences();
 		}
@@ -30,9 +32,11 @@
 	
 	@Override
 	public void initializeDefaultPreferences() {
+		
 		super.initializeDefaultPreferences();
 		Preferences preferences = this.getDefaultPreferencesNode();
 		preferences.putBoolean(UPDATE_EDITION, true);
+		preferences.putBoolean(UPDATE_INDEXES, true);
 		preferences.putBoolean(PRESERVE_ANNOTATIONS, true);
 	}
 }
Index: TXM/trunk/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java
===================================================================
--- TXM/trunk/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java	(revision 3387)
+++ TXM/trunk/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java	(revision 3388)
@@ -113,6 +113,9 @@
 
 		/** The score. */
 		public double score;
+		
+		/** The score. */
+		public String debug;
 
 		/**
 		 * Instantiates a new c line.
@@ -663,10 +666,10 @@
 
 
 		String pquery = CQLQuery.fixQuery(this.getQuery().getQueryString(), this.getCorpus().getLang());
-		if (this.getMaxLeft() == 0) {
+		if (this.getMaxLeft() == 0 && !this.pIncludeXpivot) {
 			query = "" + pquery + " []* " + query + " " + maxempanstr; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		}
-		else if (this.getMaxRight() == 0) {
+		else if (this.getMaxRight() == 0 && !this.pIncludeXpivot) {
 			query = "" + query + " []* " + pquery + " " + maxempanstr; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		}
 		else {
@@ -1485,6 +1488,7 @@
 	 * @throws CqiClientException
 	 */
 	public boolean stepGetMatches() throws CqiClientException {
+		
 		CQPCorpus corpus = this.getCorpus();
 		QueryResult r1 = corpus.query(pQuery, "CoocFocusQuery", false); // keywords positions //$NON-NLS-1$
 		QueryResult r2 = null;
@@ -1505,7 +1509,6 @@
 			r3 = corpus.query(anticontextquery, "CoocAntiContextFocusQuery", false); // no context //$NON-NLS-1$
 		}
 
-
 		m1 = r1.getMatches();
 		numberOfKeyword = m1.size();
 		m2 = r2.getMatches();
@@ -1585,6 +1588,7 @@
 						indexfreqs.get(specifrownames[ii]), scores[ii][1], // freq
 						((float) (distances.get(signaturestr) / counts.get(signaturestr))), // mean distance
 						-1);
+				cline.debug = ""+this;
 				// System.out.println("Line: "+specifrownames[ii]+" dists="+distances.get(signaturestr)+" counts="+counts.get(signaturestr)+" mean="+((float) (distances.get(signaturestr) / counts.get(signaturestr))));
 				// select the line
 				if (cline.freq >= this.pFminFilter && cline.nbocc >= this.pFCoocFilter && cline.score >= this.pScoreMinFilter) {
Index: TXM/trunk/org.txm.referencer.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.referencer.rcp/plugin.xml	(revision 3387)
+++ TXM/trunk/org.txm.referencer.rcp/plugin.xml	(revision 3388)
@@ -88,7 +88,7 @@
        <definition
                   id="OneReferencerSelected">
                <with
-                     variable="selection">
+                     variable="corporaSelection">
                   <iterate
                         ifEmpty="false"
                         operator="and">
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/messages.properties
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/messages.properties	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/messages.properties	(revision 3388)
@@ -25,7 +25,7 @@
 keywordsAnnotation=Pivot annotation
 listOfCategories=List of categories
 lookingForTypedValueWithIdEqualsP0=Looking for TypedValue with id\={0}
-motsPropritsInfDfaut=Words (property) <- defaut
+motsPropritsInfDfaut=Words annotation
 newCategory=New category
 newValueP0ForCategoryP1=New value ''{0}'' for category ''{1}''.
 nomDeLaPropritPatternEqualsazaz09Plus=Property name pattern\: [a-z][-a-z0-9]+
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/messages_fr.properties
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/messages_fr.properties	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/messages/messages_fr.properties	(revision 3388)
@@ -25,7 +25,7 @@
 keywordsAnnotation=Annotation du pivot
 listOfCategories=Liste de catégories
 lookingForTypedValueWithIdEqualsP0=Recherche de TypedValue avec id \= {0}
-motsPropritsInfDfaut=Mots (propriété)
+motsPropritsInfDfaut=Annotations de mots
 newCategory=Nouvelle catégorie
 newValueP0ForCategoryP1=Nouvelle valeur ''{0}'' pour la catégorie {1}
 nomDeLaPropritPatternEqualsazaz09Plus=Patron de nom de propriété \: [a-z][-a-z0-9]+
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/edition/WordAnnotationToolbar.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/edition/WordAnnotationToolbar.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/edition/WordAnnotationToolbar.java	(revision 3388)
@@ -37,6 +37,7 @@
 import org.txm.annotation.kr.core.AnnotationManager;
 import org.txm.annotation.kr.core.DatabasePersistenceManager;
 import org.txm.annotation.kr.core.KRAnnotationEngine;
+import org.txm.annotation.kr.core.preferences.KRAnnotationPreferences;
 import org.txm.annotation.kr.core.repository.AnnotationEffect;
 import org.txm.annotation.kr.core.repository.AnnotationType;
 import org.txm.annotation.kr.core.repository.KnowledgeRepository;
@@ -926,6 +927,11 @@
 	
 	@Override
 	public boolean needToUpdateIndexes() {
-		return true;
+		return KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_INDEXES);
 	}
+	
+	@Override
+	public boolean needToUpdateEditions() {
+		return KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION);
+	}
 }
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java	(revision 3388)
@@ -43,6 +43,7 @@
 import org.txm.annotation.kr.core.Annotation;
 import org.txm.annotation.kr.core.AnnotationManager;
 import org.txm.annotation.kr.core.KRAnnotationEngine;
+import org.txm.annotation.kr.core.preferences.KRAnnotationPreferences;
 import org.txm.annotation.kr.core.repository.AnnotationEffect;
 import org.txm.annotation.kr.core.repository.AnnotationType;
 import org.txm.annotation.kr.core.repository.KnowledgeRepository;
@@ -1060,6 +1061,11 @@
 	
 	@Override
 	public boolean needToUpdateIndexes() {
-		return true;
+		return KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_INDEXES);
 	}
+	
+	@Override
+	public boolean needToUpdateEditions() {
+		return KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION);
+	}
 }
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java	(revision 3388)
@@ -43,6 +43,7 @@
 import org.txm.annotation.kr.core.CQPAnnotation;
 import org.txm.annotation.kr.core.DatabasePersistenceManager;
 import org.txm.annotation.kr.core.KRAnnotationEngine;
+import org.txm.annotation.kr.core.preferences.KRAnnotationPreferences;
 import org.txm.annotation.kr.core.repository.AnnotationEffect;
 import org.txm.annotation.kr.core.repository.AnnotationType;
 import org.txm.annotation.kr.core.repository.KnowledgeRepository;
@@ -1052,6 +1053,11 @@
 	
 	@Override
 	public boolean needToUpdateIndexes() {
-		return true;
+		return KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_INDEXES);
 	}
+	
+	@Override
+	public boolean needToUpdateEditions() {
+		return KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION);
+	}
 }
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/SimpleKRAnnotation.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/SimpleKRAnnotation.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/SimpleKRAnnotation.java	(revision 3388)
@@ -37,6 +37,7 @@
 import org.txm.annotation.kr.core.Annotation;
 import org.txm.annotation.kr.core.AnnotationManager;
 import org.txm.annotation.kr.core.KRAnnotationEngine;
+import org.txm.annotation.kr.core.preferences.KRAnnotationPreferences;
 import org.txm.annotation.kr.core.repository.AnnotationType;
 import org.txm.annotation.kr.core.repository.KnowledgeRepository;
 import org.txm.annotation.kr.core.repository.KnowledgeRepositoryManager;
@@ -799,6 +800,11 @@
 	
 	@Override
 	public boolean needToUpdateIndexes() {
-		return true;
+		return KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_INDEXES);
 	}
+	
+	@Override
+	public boolean needToUpdateEditions() {
+		return KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION);
+	}
 }
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/RecodeCorpus.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/RecodeCorpus.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/RecodeCorpus.java	(revision 3388)
@@ -128,7 +128,7 @@
 		
 		
 		project.setDoMultiThread(false); // too soon
-		project.setDoUpdate(true);
+		project.setDoUpdate(true, false);
 		
 		// monitor.setTaskName("Updating corpus");
 		// File scriptDir = new File(txmhome, "scripts/groovy/user/org/txm/scripts/importer/xtz");
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotationsAndUpdateCorpus.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotationsAndUpdateCorpus.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotationsAndUpdateCorpus.java	(revision 3388)
@@ -11,6 +11,7 @@
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.annotation.kr.core.KRAnnotationEngine;
+import org.txm.annotation.kr.core.preferences.KRAnnotationPreferences;
 import org.txm.rcp.commands.workspace.UpdateCorpus;
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.utils.JobHandler;
@@ -19,67 +20,74 @@
 import org.txm.utils.logger.Log;
 
 public class SaveAnnotationsAndUpdateCorpus extends AbstractHandler {
-
+	
 	public static final String ID = SaveAnnotationsAndUpdateCorpus.class.getCanonicalName();
-
+	
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
-
+		
 		ISelection sel = HandlerUtil.getCurrentSelection(event);
 		if (!(sel instanceof IStructuredSelection)) return null;
 		IStructuredSelection selection = (IStructuredSelection) sel;
-
+		
 		Object s = selection.getFirstElement();
 		if (!(s instanceof MainCorpus)) {
 			return null;
 		}
 		MainCorpus corpus = (MainCorpus) s;
 		try {
-
+			
 			if (!KRAnnotationEngine.needToSaveAnnotations(corpus)) {
 				Log.info("No annotation to save.");
 				return null;
 			}
-
+			
 			Log.info(NLS.bind("Saving {0} annotations...", corpus.getName()));
 			JobHandler job = SaveAnnotations.save(corpus);
 			if (job == null) {
 				return null;
 			}
-
+			
+			
+			
 			if (job.getState() == Status.OK_STATUS.getCode()) {
-				JobHandler job2 = new JobHandler("Updating corpus editions and indexes", true) {
-
-					@Override
-					protected IStatus run(IProgressMonitor monitor) {
-						this.runInit(monitor);
-
-						try {
-							monitor.setTaskName("updating corpus indexes and editions");
-							if (corpus != null && UpdateCorpus.update(corpus) != null) {
-								monitor.worked(50);
-								this.syncExec(new Runnable() {
-
-									@Override
-									public void run() {
-										CorporaView.refreshObject(corpus);
-									}
-								});
-								return Status.OK_STATUS;
-							}
-							else {
-								monitor.worked(50);
-								System.out.println("Fail to update corpus. Aborting");
-								System.out.println("Fix XML-TXM files and call command 'UpdateCorpus'");
+				if (KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_INDEXES)) {
+					
+					JobHandler job2 = new JobHandler("Updating corpus editions and indexes", true) {
+						
+						@Override
+						protected IStatus run(IProgressMonitor monitor) {
+							this.runInit(monitor);
+							
+							try {
+								monitor.setTaskName("Updating corpus indexes and editions");
+								if (corpus != null && UpdateCorpus.update(corpus, KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION)) != null) {
+									monitor.worked(50);
+									this.syncExec(new Runnable() {
+										
+										@Override
+										public void run() {
+											CorporaView.refreshObject(corpus);
+										}
+									});
+									return Status.OK_STATUS;
+								}
+								else {
+									monitor.worked(50);
+									System.out.println("Fail to update corpus. Aborting");
+									System.out.println("Fix XML-TXM files and call command 'UpdateCorpus'");
+									return Status.CANCEL_STATUS;
+								}
+							} catch(ThreadDeath ex) {
+								Log.info(TXMUIMessages.executionCanceled);
 								return Status.CANCEL_STATUS;
 							}
-						} catch(ThreadDeath ex) {
-							Log.info(TXMUIMessages.executionCanceled);
-							return Status.CANCEL_STATUS;
 						}
-					}
-				};
-				job2.schedule();
+					};
+					job2.schedule();
+				} else {
+					Log.warning("CQP indexes not updated. Only the XML-TXM files have been updated. Call Update corpus later to access the annotations");
+				}
 			}
 		}
 		catch (Exception e) {
@@ -87,9 +95,9 @@
 			e.printStackTrace();
 			return null;
 		}
-
+		
 		CorporaView.refresh();
-
+		
 		return corpus;
 	}
 }
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/preferences/KRAnnotationPreferencePage.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/preferences/KRAnnotationPreferencePage.java	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/preferences/KRAnnotationPreferencePage.java	(revision 3388)
@@ -28,12 +28,15 @@
 package org.txm.annotation.kr.rcp.preferences;
 
 import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.IWorkbench;
 import org.txm.annotation.kr.core.preferences.KRAnnotationPreferences;
-import org.txm.concordance.core.preferences.ConcordancePreferences;
-import org.txm.concordance.rcp.messages.ConcordanceUIMessages;
 import org.txm.rcp.IImageKeys;
+import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
 /**
@@ -64,7 +67,19 @@
 	@Override
 	public void createFieldEditors() {
 		this.addField(new BooleanFieldEditor(KRAnnotationPreferences.PRESERVE_ANNOTATIONS, "Preserve annotations between TXM sessions", this.getFieldEditorParent()));
-		this.addField(new BooleanFieldEditor(KRAnnotationPreferences.UPDATE_EDITION, "When saving annotations rebuild editions" , this.getFieldEditorParent()));
+		
+		Group updateGroup = new Group(getFieldEditorParent(), SWT.NONE);
+		updateGroup.setText("Saving annotations");
+		GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, false);
+		gridData2.horizontalSpan = 3;
+		gridData2.verticalIndent = 10;
+		updateGroup.setLayoutData(gridData2);
+		RowLayout rlayout = new RowLayout(SWT.VERTICAL);
+		rlayout.marginHeight = 5;
+		updateGroup.setLayout(rlayout);
+		
+		this.addField(new BooleanFieldEditor(KRAnnotationPreferences.UPDATE_EDITION, "Update editions" , updateGroup));
+		this.addField(new BooleanFieldEditor(KRAnnotationPreferences.UPDATE_INDEXES, "Update CQP indexes (warning the annotations won't be visible but saved in the XML-TXM files)" , updateGroup));
 	}
 	
 	/*
Index: TXM/trunk/org.txm.annotation.kr.rcp/OSGI-INF/l10n/bundle.properties
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/OSGI-INF/l10n/bundle.properties	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/OSGI-INF/l10n/bundle.properties	(revision 3388)
@@ -2,7 +2,7 @@
 #Mon Jun 08 11:30:22 CEST 2020
 Bundle-Name=KR Annotation RCP
 command.label=Knowledge Respository
-command.label.0=Export annotations
+command.label.0=Texts and CQP Annotations of word sequences in XML-TEI SyMoGIH format (.xml)
 command.name=Recode
 command.name.0=Save annotations
 command.name.1=Open Knowledge Repository View
Index: TXM/trunk/org.txm.annotation.kr.rcp/OSGI-INF/l10n/bundle_fr.properties
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3388)
@@ -1,7 +1,7 @@
 #TXM OSGI messages generated by the PluginMessagesManager class
 #Mon Jun 08 11:30:22 CEST 2020
 command.label=Entrep�t de connaissances
-command.label.0=Annotations au format XML-TEI...
+command.label.0=Textes et Annotations CQP de s�quences de mots au format XML-TEI SyMoGIH (.xml)...
 command.name=Recoder
 command.name.0=Enregistrer les annotations
 command.name.1=Ouvrir la vue d'entrep�ts de connaissance
Index: TXM/trunk/org.txm.annotation.kr.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/plugin.xml	(revision 3387)
+++ TXM/trunk/org.txm.annotation.kr.rcp/plugin.xml	(revision 3388)
@@ -59,6 +59,12 @@
    </extension>
   <extension
         point="org.eclipse.ui.preferencePages">
+     <page
+           category="org.txm.annotation.rcp.preferences.AnnotationPreferencePage"
+           class="org.txm.annotation.kr.rcp.preferences.KRAnnotationPreferencePage"
+           id="org.txm.annotation.kr.rcp.preferences.KRAnnotationPreferencePage"
+           name="CQP">
+     </page>
   </extension>
      <extension
          point="org.eclipse.ui.views">
Index: TXM/trunk/org.txm.analec.rcp/OSGI-INF/l10n/bundle.properties
===================================================================
--- TXM/trunk/org.txm.analec.rcp/OSGI-INF/l10n/bundle.properties	(revision 3387)
+++ TXM/trunk/org.txm.analec.rcp/OSGI-INF/l10n/bundle.properties	(revision 3388)
@@ -8,8 +8,8 @@
 Bundle-Vendor = Textometrie.org
 
 command.label   = Import Glozz annotations (clear the current annotations)...
-command.label.0 = Corpus in XML-TEI URS format...
-command.label.1 = Corpus in Glozz format (.ac, .ac and .aam)...
+command.label.0 = Annotations URS in XML-TEI URS format (-urs.xml, .aam)...
+command.label.1 = Texts and URS Units in Glozz format (.ac, .ac and .aam)...
 command.label.2 = XML-TEI Analec
 command.name    = Load Annotation Structure
 command.name.0  = Edit Annotation Structure
Index: TXM/trunk/org.txm.analec.rcp/OSGI-INF/l10n/bundle_fr.properties
===================================================================
--- TXM/trunk/org.txm.analec.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3387)
+++ TXM/trunk/org.txm.analec.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3388)
@@ -11,9 +11,9 @@
 
 command.label = Importer des annotations Glozz (supprime les annotations d\u00E9j\u00E0 existantes)...
 
-command.label.0 = Corpus au format XML-TEI URS...
+command.label.0 = Annotations URS au format XML-TEI URS (-urs.xml, .aam)...
 
-command.label.1 = Corpus au format Glozz (.ac, .aa et .aam)...
+command.label.1 = Textes et Unit�s URS au format Glozz (.ac, .aa, .aam)...
 
 command.label.2 = XML-TEI Analec
 
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/URSAnnotationToolbar.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/URSAnnotationToolbar.java	(revision 3387)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/URSAnnotationToolbar.java	(revision 3388)
@@ -106,8 +106,10 @@
 		}
 	}
 	
+	protected abstract boolean _install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception; 
+
 	@Override
-	public boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception {
+	public final boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception {
 		
 		this.extension = extension;
 		this.editor = (SynopticEditionEditor) txmeditor;
@@ -165,6 +167,8 @@
 		button = extension.getSaveButton();
 		button.setEnabled(analecCorpus.isModifie());
 		
+		_install(txmeditor, extension, parent, position);
+		
 		closeButton = new Button(annotationArea, SWT.PUSH);
 		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
 		closeButton.addSelectionListener(new SelectionListener() {
@@ -180,7 +184,11 @@
 		return true;
 	}
 	
+	protected void installCloseButton() {
+		
+	}
 	
+	
 	protected abstract ProgressListener getPageReloadListener();
 	
 	public Corpus getAnalecCorpus() {
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitConcordanceToolbar.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitConcordanceToolbar.java	(revision 3387)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitConcordanceToolbar.java	(revision 3388)
@@ -126,7 +126,7 @@
 	
 	@Override
 	public String getName() {
-		return "Unit (URS)";
+		return "Annotation d'Unité URS";
 	}
 	
 	@Override
@@ -214,29 +214,17 @@
 		
 		annotationArea = new GLComposite(parent, SWT.NONE, "Unit URS");
 		annotationArea.getLayout().numColumns = 12;
-		annotationArea.getLayout().horizontalSpacing = 1;
+		annotationArea.getLayout().horizontalSpacing = 2;
 		annotationArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
 		
+		GridData gdata = new GridData(SWT.CENTER, SWT.CENTER, false, false);
+		gdata.widthHint = 90;
 		
-		Button closeButton = new Button(annotationArea, SWT.PUSH);
-		closeButton.setToolTipText("End URS annotation");
-		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
+		Label typeLabel = new Label(annotationArea, SWT.NONE);
+		typeLabel.setText("Type"); //$NON-NLS-1$
+		typeLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
 		
-		closeButton.addSelectionListener(new SelectionListener() {
-			
-			@Override
-			public void widgetSelected(SelectionEvent e) {
-				extension.closeArea(UnitConcordanceToolbar.this, true);
-			}
-			
-			@Override
-			public void widgetDefaultSelected(SelectionEvent e) {}
-		});
 		
-		
-		GridData gdata = new GridData(SWT.CENTER, SWT.CENTER, false, false);
-		gdata.widthHint = 90;
-		
 		// UNIT TYPE
 		annotationTypesCombo = new ComboViewer(annotationArea, SWT.SINGLE);
 		annotationTypesCombo.setContentProvider(new ArrayContentProvider());
@@ -401,7 +389,22 @@
 		// public void widgetDefaultSelected(SelectionEvent e) {}
 		// });
 		
+		Button closeButton = new Button(annotationArea, SWT.PUSH);
+		closeButton.setToolTipText("End URS annotation");
+		closeButton.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
+		closeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
 		
+		closeButton.addSelectionListener(new SelectionListener() {
+			
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				extension.closeArea(UnitConcordanceToolbar.this, true);
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {}
+		});
+		
 		onAnnotationTypeSelected(null);
 		
 		editor.layout(true);
@@ -724,4 +727,10 @@
 	public boolean notifyStartOfCompute() throws Exception {
 		return true;
 	}
+
+	@Override
+	public boolean needToUpdateEditions() {
+		
+		return false;
+	}
 }
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitToolbar.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitToolbar.java	(revision 3387)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitToolbar.java	(revision 3388)
@@ -114,8 +114,7 @@
 	public UnitToolbar() {}
 	
 	@Override
-	public boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception {
-		super.install(txmeditor, extension, parent, position);
+	protected boolean _install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception {
 		
 		annotationArea.getLayout().numColumns = 11;
 		annotationArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
@@ -1259,4 +1258,10 @@
 	public boolean hasChanges() {
 		return analecCorpus.isModifie();
 	}
+
+	@Override
+	public boolean needToUpdateEditions() {
+		
+		return false;
+	}
 }
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/SchemaToolbar.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/SchemaToolbar.java	(revision 3387)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/SchemaToolbar.java	(revision 3388)
@@ -89,8 +89,7 @@
 	public SchemaToolbar() { }
 
 	@Override
-	public boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception {
-		super.install(txmeditor, extension, parent, position);
+	protected boolean _install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception {
 		
 		annotationArea.getLayout().numColumns = 8;
 		annotationArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
@@ -1001,4 +1000,9 @@
 	public boolean hasChanges() {
 		return analecCorpus.isModifie();
 	}
+
+	@Override
+	public boolean needToUpdateEditions() {
+		return false;
+	}
 }
\ No newline at end of file
Index: TXM/trunk/org.txm.conllu.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.conllu.rcp/plugin.xml	(revision 3387)
+++ TXM/trunk/org.txm.conllu.rcp/plugin.xml	(revision 3388)
@@ -42,7 +42,7 @@
          <command
                commandId="org.txm.conllu.rcp.commands.ExportCorpusAsCoNLLU"
                icon="icons/functions/UD.png"
-               label="Export corpus as CONLL-U..."
+               label="Corpus in CONLL-U format (.conllu)..."
                style="push">
             <visibleWhen
                   checkEnabled="false">
Index: TXM/trunk/org.txm.whatsnew.rcp/src/org/txm/whatsnew/rcp/NewsPreferencesPage.java
===================================================================
--- TXM/trunk/org.txm.whatsnew.rcp/src/org/txm/whatsnew/rcp/NewsPreferencesPage.java	(revision 3387)
+++ TXM/trunk/org.txm.whatsnew.rcp/src/org/txm/whatsnew/rcp/NewsPreferencesPage.java	(revision 3388)
@@ -3,6 +3,7 @@
 import org.eclipse.jface.preference.BooleanFieldEditor;
 import org.eclipse.ui.IWorkbench;
 import org.txm.rcp.IImageKeys;
+import org.txm.rcp.preferences.RCPPreferences;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
 
@@ -13,7 +14,7 @@
 	public void init(IWorkbench workbench) {
 		
 		this.setPreferenceStore(new TXMPreferenceStore(NewsPreferences.getInstance().getPreferencesNodeQualifier()));
-		this.setTitle("New setups");
+		this.setTitle("New version");
 		this.setImageDescriptor(IImageKeys.getImageDescriptor("platform:/plugin/org.eclipse.ui.editors/icons/full/obj16/quick_assist_obj.gif"));
 	}
 	
@@ -22,10 +23,12 @@
 		
 		//this.addField(new BooleanFieldEditor(NewsPreferences.SHOW_NEWS, "Show news when TXM starts up", this.getFieldEditorParent()));
 		
-		this.addField(new BooleanFieldEditor(NewsPreferences.SHOW_NEW_SETUP, "Show new setup popups when TXM starts up", this.getFieldEditorParent()));
+		this.addField(new BooleanFieldEditor(NewsPreferences.SHOW_NEW_SETUP, "Announce the availability of new versions of TXM/Annoncer la disponibilité de nouvelles versions de TXM", this.getFieldEditorParent()));
 		
 		// enable if dev needs to update the NEWS_VERSION value
-		//this.addField(new org.eclipse.jface.preference.StringFieldEditor(NewsPreferences.NEWS_VERSION, "Current news index", this.getFieldEditorParent()));
-		//this.addField(new org.eclipse.jface.preference.StringFieldEditor(NewsPreferences.NEW_SETUP_VERSION, "Current new setup index", this.getFieldEditorParent()));
+		if (RCPPreferences.getInstance().getBoolean(RCPPreferences.EXPERT_USER)) {
+			this.addField(new org.eclipse.jface.preference.StringFieldEditor(NewsPreferences.NEWS_VERSION, "Current news index", this.getFieldEditorParent()));
+			this.addField(new org.eclipse.jface.preference.StringFieldEditor(NewsPreferences.NEW_SETUP_VERSION, "Current new setup index", this.getFieldEditorParent()));
+		}
 	}
 }
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java	(revision 3388)
@@ -145,7 +145,7 @@
 				// def.setPageBreakTag("pb");
 				// }
 				
-				project.setDoUpdate(false);
+				project.setDoUpdate(false, false);
 				project.saveParameters();
 				return true;
 			}
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java	(revision 3388)
@@ -29,6 +29,7 @@
 
 import java.util.Set;
 
+import org.eclipse.jface.preference.BooleanFieldEditor;
 import org.eclipse.jface.preference.ComboFieldEditor;
 import org.eclipse.jface.preference.StringFieldEditor;
 import org.eclipse.swt.SWT;
@@ -59,6 +60,8 @@
 	private StringFieldEditor defaultlang;
 	
 	private StringFieldEditor empty_code;
+	
+	private BooleanFieldEditor update_editions;
 
 	/**
 	 * Instantiates a new export preference page.
@@ -73,8 +76,11 @@
 	 */
 	@Override
 	protected void createFieldEditors() {
-		Set<String> encodings = java.nio.charset.Charset.availableCharsets()
-				.keySet();
+		
+		update_editions = new BooleanFieldEditor(TBXPreferences.UPDATEEDITIONS, "Update editions when updating a corpus", getFieldEditorParent());
+		addField(update_editions);
+		
+		Set<String> encodings = java.nio.charset.Charset.availableCharsets().keySet();
 		String[][] values = new String[encodings.size()][2];
 		int i = 0;
 		for (String s : encodings) {
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java	(revision 3388)
@@ -9,11 +9,13 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.core.preferences.TBXPreferences;
 import org.txm.objects.Project;
 import org.txm.rcp.commands.CloseEditorsUsing;
 import org.txm.rcp.commands.RestartTXM;
@@ -38,18 +40,31 @@
 		}
 		MainCorpus corpus = (MainCorpus) s;
 		
+		boolean updateEdition = false;
+		
 		// force corpus to be recomputed
 		String forceDirty = event.getParameter("org.txm.rcp.commands.workspace.UpdateCorpus.force"); //$NON-NLS-1$
 		if ("true".equals(forceDirty)) {
 			corpus.getProject().setDirty();
+			updateEdition = true;
+		} else {
+			if (corpus.getProject().getBuiltEditionNames().size() > 0) {
+				updateEdition = MessageDialog.openQuestion(HandlerUtil.getActiveShell(event), "Update editions", "Do you want to update the edition pages as well ?");
+			} else {
+				updateEdition = false; // no edition to do, skip the pager step when updating
+			}
 		}
 		
-		update(corpus);
+		update(corpus, updateEdition);
 		
 		return corpus;
 	}
 	
 	public static JobHandler update(final MainCorpus corpus) {
+		return update(corpus, TBXPreferences.getInstance().getBoolean(TBXPreferences.UPDATEEDITIONS));
+	}
+	
+	public static JobHandler update(final MainCorpus corpus, boolean updateEdition) {
 		
 		final Project project = corpus.getProject();
 		if (project == null) return null;
@@ -101,7 +116,7 @@
 		project.setDirty(false);// false=dont propagate dirty
 		project.setNeedToBuild();
 		project.setDoMultiThread(false); // too soon
-		project.setDoUpdate(true);
+		project.setDoUpdate(true, updateEdition);
 		String currentModule = project.getImportModuleName();
 		if (!(currentModule.equals("xtz") || currentModule.equals("transcriber"))) {
 			project.setImportModuleName("xtz");
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableLinesViewerComparator.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableLinesViewerComparator.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableLinesViewerComparator.java	(revision 3388)
@@ -160,13 +160,12 @@
 				viewer.getTable().setSortDirection(getDirection());
 				viewer.getTable().setSortColumn(column);
 				
-				if(autoPackColumns)	{
+				if (autoPackColumns)	{
 					TXMEditor.packColumns(viewer);
 				}
 				else	{
 					viewer.refresh();
 				}
-				
 			}
 		});
 	}
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 3388)
@@ -11,6 +11,7 @@
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.forms.events.ExpansionAdapter;
 import org.eclipse.ui.forms.events.ExpansionEvent;
 import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -85,10 +86,14 @@
 		}
 		if (engines.size() > 1) {
 			
-			toolkit.createLabel(sectionClient, "Annotation engine"); //$NON-NLS-1$
+			Label tmp = toolkit.createLabel(sectionClient, "Annotation engine"); //$NON-NLS-1$
+			TableWrapData gdata = getTextGridData();
+			gdata.indent = 20;
+			tmp.setLayoutData(gdata);
 			
 			annotateEngineCombo = new Combo(sectionClient, SWT.BORDER);
-			annotateEngineCombo.setLayoutData(getTextGridData());
+			gdata = getTextGridData();
+			annotateEngineCombo.setLayoutData(gdata);
 			annotateEngineCombo.setToolTipText("Annotation engines");
 			annotateEngineCombo.setItems(engines.toArray(new String[engines.size()]));
 			annotateEngineCombo.setText(annotateEngineCombo.getItem(0));
@@ -97,12 +102,18 @@
 		// if widget selected change the radio buttons value
 		
 		btnGuessLang = toolkit.createButton(sectionClient, TXMUIMessages.guessColon, SWT.RADIO);
+		TableWrapData gdata = getTextGridData();
+		gdata.indent = 20;
+		btnGuessLang.setLayoutData(gdata);
 		toolkit.createLabel(sectionClient, ""); //$NON-NLS-1$
 		
 		btnSelectLang = toolkit.createButton(sectionClient, TXMUIMessages.selectColon, SWT.RADIO);
+		gdata = getTextGridData();
+		gdata.indent = 20;
+		btnSelectLang.setLayoutData(gdata);
 		
 		langcombo = new Combo(sectionClient, SWT.BORDER);
-		TableWrapData gdata = getTextGridData();
+		gdata = getTextGridData();
 		langcombo.setLayoutData(gdata);
 		langcombo.setToolTipText("Sources lang (show only the TreeTagger common language)");
 		// if widget selected change the radio buttons value
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 3388)
@@ -110,6 +110,7 @@
 		doRetokenizeStepButton.setSelection(true);
 		doRetokenizeStepButton.setVisible(moduleParams.get(ImportModuleCustomization.ADVANCEDTOKENIZER));
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.indent = 20;
 		gdata.colspan = 3;
 		doRetokenizeStepButton.setLayoutData(gdata);
 		
@@ -118,19 +119,20 @@
 		doBuildWordIDsButton.setSelection(true);
 		doBuildWordIDsButton.setVisible(moduleParams.get(ImportModuleCustomization.ADVANCEDTOKENIZER));
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.indent = 20;
 		gdata.colspan = 3;
 		doBuildWordIDsButton.setLayoutData(gdata);
 		
 		Label l0 = toolkit.createLabel(sectionClient, TXMUIMessages.separatorCharacters, SWT.WRAP);
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
 		gdata.colspan = 3;
-		gdata.indent = 10;
+		gdata.indent = 20;
 		l0.setLayoutData(gdata);
 		
 		Label l1 = toolkit.createLabel(sectionClient, TXMUIMessages.spaces, SWT.WRAP);
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
 		gdata.colspan = 2;
-		gdata.indent = 20;
+		gdata.indent = 40;
 		l1.setLayoutData(gdata);
 		
 		textWhiteSpaces = toolkit.createText(sectionClient, "", SWT.BORDER);
@@ -140,7 +142,7 @@
 		Label l2 = toolkit.createLabel(sectionClient, TXMUIMessages.punctuations, SWT.WRAP);
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
 		gdata.colspan = 2;
-		gdata.indent = 20;
+		gdata.indent = 40;
 		l2.setLayoutData(gdata);
 		
 		textPuncts = toolkit.createText(sectionClient, "", SWT.BORDER);
@@ -150,7 +152,7 @@
 		Label l4 = toolkit.createLabel(sectionClient, TXMUIMessages.elisionCharacters, SWT.WRAP);
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
 		gdata.colspan = 2;
-		gdata.indent = 10;
+		gdata.indent = 20;
 		l4.setLayoutData(gdata);
 		
 		textElisions = toolkit.createText(sectionClient, "", SWT.BORDER);
@@ -160,7 +162,7 @@
 		Label l3 = toolkit.createLabel(sectionClient, TXMUIMessages.endOfSentenceCharacters, SWT.WRAP);
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
 		gdata.colspan = 2;
-		gdata.indent = 10;
+		gdata.indent = 20;
 		l3.setLayoutData(gdata);
 		
 		textPunctsStrong = toolkit.createText(sectionClient, "", SWT.BORDER);
@@ -170,7 +172,7 @@
 		Button defaultBtn = toolkit.createButton(sectionClient, TXMUIMessages._default_2, SWT.PUSH);
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
 		gdata.colspan = 2;
-		gdata.indent = 10;
+		gdata.indent = 20;
 		defaultBtn.setLayoutData(gdata);
 		defaultBtn.addSelectionListener(new SelectionListener() {
 			
@@ -313,6 +315,10 @@
 		boolean enabled = doTokenizeStepButton.getSelection();
 		doRetokenizeStepButton.setEnabled(enabled);
 		doBuildWordIDsButton.setEnabled(enabled);
+		if (!enabled) {
+			doRetokenizeStepButton.setSelection(false);
+			doBuildWordIDsButton.setSelection(false);
+		}
 		textWhiteSpaces.setEnabled(enabled);
 		textPuncts.setEnabled(enabled);
 		textElisions.setEnabled(enabled);
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java	(revision 3388)
@@ -91,26 +91,30 @@
 		gdata2.colspan = 4; // one line
 		buildDefaultEditionButton.setLayoutData(gdata2);
 		
+		collapsibleMetadataDefaultEditionButton = toolkit.createButton(sectionClient, "Enable collapsible metadata", SWT.CHECK);
+		// collapsibleMetadataDefaultEditionButton.setSelection(true);
+		gdata2 = getButtonLayoutData();
+		gdata2.colspan = 4; // one line
+		gdata2.indent = 20;
+		collapsibleMetadataDefaultEditionButton.setLayoutData(gdata2);
+		
 		paginateDefaultEditionButton = toolkit.createButton(sectionClient, "Paginate", SWT.CHECK);
 		// paginateDefaultEditionButton.setSelection(true);
 		gdata2 = getButtonLayoutData();
 		gdata2.colspan = 4; // one line
+		gdata2.indent = 20;
 		paginateDefaultEditionButton.setLayoutData(gdata2);
 		
-		collapsibleMetadataDefaultEditionButton = toolkit.createButton(sectionClient, "Enable collapsible metadata", SWT.CHECK);
-		// collapsibleMetadataDefaultEditionButton.setSelection(true);
-		gdata2 = getButtonLayoutData();
-		gdata2.colspan = 4; // one line
-		collapsibleMetadataDefaultEditionButton.setLayoutData(gdata2);
-		
 		// words per page -> pageSize
 		Label tmpLabel = null;
 		if (moduleParams.get(ImportModuleCustomization.EDITIONS_WORDSPERPAGE)) {
 			tmpLabel = toolkit.createLabel(sectionClient, TXMUIMessages.wordsPerPage);
-			tmpLabel.setLayoutData(getLabelGridData());
+			TableWrapData gdata = getLabelGridData();
+			gdata.indent = 40;
+			tmpLabel.setLayoutData(gdata);
 			
 			wordsPerPageText = toolkit.createText(sectionClient, "1000", SWT.BORDER); //$NON-NLS-1$
-			TableWrapData gdata = getTextGridData();
+			gdata = getTextGridData();
 			wordsPerPageText.setLayoutData(gdata);
 		}
 		
@@ -121,68 +125,68 @@
 			pageBreakText = toolkit.createText(sectionClient, "pb", SWT.BORDER); //$NON-NLS-1$
 			TableWrapData gdata = getTextGridData();
 			pageBreakText.setLayoutData(gdata);
+		}
+		
+		if (scriptName.startsWith("xtz")) {
 			
-			if ("xtzLoader.groovy".equals(scriptName)) {
+			// build text edition or not button
+			buildFacsEditionCheckButton = toolkit.createButton(sectionClient, "Build 'facs' edition", SWT.CHECK);
+			buildFacsEditionCheckButton.setSelection(false);
+			TableWrapData gdata22 = getButtonLayoutData();
+			gdata22.colspan = 4; // one line
+			buildFacsEditionCheckButton.setLayoutData(gdata22);
+			buildFacsEditionCheckButton.addSelectionListener(new SelectionListener() {
 				
-				// build text edition or not button
-				buildFacsEditionCheckButton = toolkit.createButton(sectionClient, "Build 'facs' edition", SWT.CHECK);
-				buildFacsEditionCheckButton.setSelection(false);
-				TableWrapData gdata22 = getButtonLayoutData();
-				gdata22.colspan = 4; // one line
-				buildFacsEditionCheckButton.setLayoutData(gdata22);
-				buildFacsEditionCheckButton.addSelectionListener(new SelectionListener() {
-					
-					@Override
-					public void widgetSelected(SelectionEvent e) {
-						imageDirectoryText.setEnabled(buildFacsEditionCheckButton.getSelection());
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					imageDirectoryText.setEnabled(buildFacsEditionCheckButton.getSelection());
+				}
+				
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {}
+			});
+			// image directory
+			tmpLabel = toolkit.createLabel(sectionClient, "Images directory: ");
+			TableWrapData gdata = getLabelGridData();
+			gdata.indent = 20;
+			tmpLabel.setLayoutData(gdata);
+			imageDirectoryText = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
+			gdata = getTextGridData();
+			gdata.colspan = 2;
+			
+			imageDirectoryText.setLayoutData(gdata);
+			imageDirectoryText.setEnabled(false);
+			
+			Button selectImageDirectoryButton = toolkit.createButton(sectionClient, "...", SWT.PUSH);
+			gdata = getButtonLayoutData();
+			selectImageDirectoryButton.setLayoutData(gdata);
+			selectImageDirectoryButton.addSelectionListener(new SelectionListener() {
+				
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					DirectoryDialog dialog = new DirectoryDialog(form.getShell(), SWT.OPEN);
+					if (LastOpened.getFile(ID) != null) {
+						dialog.setFilterPath(LastOpened.getFolder(ID));
 					}
-					
-					@Override
-					public void widgetDefaultSelected(SelectionEvent e) {}
-				});
-				// image directory
-				tmpLabel = toolkit.createLabel(sectionClient, "Images directory: ");
-				tmpLabel.setLayoutData(getLabelGridData());
-				imageDirectoryText = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
-				gdata = getTextGridData();
-				gdata.colspan = 2;
-				imageDirectoryText.setLayoutData(gdata);
-				imageDirectoryText.setEnabled(false);
+					else {
+						dialog.setFilterPath(Toolbox.getTxmHomePath());
+					}
+					if (dialog.open() != null) {
+						File imgDirectory = new File(dialog.getFilterPath());
+						LastOpened.set(ID, imgDirectory.getParent(), "");
+						imageDirectoryText.setText(imgDirectory.getAbsolutePath());
+					}
+				}
 				
-				Button selectImageDirectoryButton = toolkit.createButton(sectionClient, "...", SWT.PUSH);
-				gdata = getButtonLayoutData();
-				selectImageDirectoryButton.setLayoutData(gdata);
-				selectImageDirectoryButton.addSelectionListener(new SelectionListener() {
-					
-					@Override
-					public void widgetSelected(SelectionEvent e) {
-						DirectoryDialog dialog = new DirectoryDialog(form.getShell(), SWT.OPEN);
-						if (LastOpened.getFile(ID) != null) {
-							dialog.setFilterPath(LastOpened.getFolder(ID));
-						}
-						else {
-							dialog.setFilterPath(Toolbox.getTxmHomePath());
-						}
-						if (dialog.open() != null) {
-							File imgDirectory = new File(dialog.getFilterPath());
-							LastOpened.set(ID, imgDirectory.getParent(), "");
-							imageDirectoryText.setText(imgDirectory.getAbsolutePath());
-						}
-					}
-					
-					@Override
-					public void widgetDefaultSelected(SelectionEvent e) {}
-				});
-			}
-		}
-		
-		if (scriptName.startsWith("xtz")) {
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {}
+			});
 			
 			tmpLabel = toolkit.createLabel(sectionClient, "Default edition: ");
 			tmpLabel.setLayoutData(getLabelGridData());
 			
 			defaultEditions = toolkit.createText(sectionClient, "", SWT.BORDER);
-			TableWrapData gdata = getTextGridData();
+			gdata = getTextGridData();
 			gdata.colspan = 2;
 			defaultEditions.setLayoutData(gdata);
 		}
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 3388)
@@ -1052,7 +1052,7 @@
 	public void startImport() {
 		// TODO: test all sections here
 		project.setDirty();
-		project.setDoUpdate(false);
+		project.setDoUpdate(false, false);
 		project.setNeedToBuild();
 		
 		if (project.getChildren().size() > 0) {
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 3388)
@@ -335,7 +335,7 @@
 			public void partActivated(IWorkbenchPartReference partRef) {
 				
 				// FIXME: SJ: why? when opening a new Editor the view will be refreshed twice...
-				CorporaView.refresh();
+				//CorporaView.refresh();
 			}
 			
 			@Override
@@ -1744,9 +1744,20 @@
 	}
 	
 	/**
+	 * Refresh the columns after updating line sort
+	 * 
+	 * @param viewer the table viewer
+	 */
+	public static void refreshColumns(TableViewer viewer) {
+//		viewer.getControl().setRedraw(false);
+		viewer.refresh();
+//		viewer.getControl().setRedraw(true);
+//		viewer.getControl().update();
+	}
+	/**
 	 * Packs the columns of the specified table viewer so the label of the sort column is not truncated due of the sorting order arrow display.
 	 * 
-	 * TODO: compute the column width using FontMetrics -> more precise. Currently the column width is an aproximation using the font height and the longest string length
+	 * TODO: compute the column width using FontMetrics -> more precise. Currently the column width is an approximation using the font height and the longest string length
 	 * 
 	 * @param viewer the table viewer
 	 */
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/CorporaSourceProvider.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/CorporaSourceProvider.java	(revision 3387)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/CorporaSourceProvider.java	(revision 3388)
@@ -4,6 +4,7 @@
 import java.util.Map;
 
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.AbstractSourceProvider;
 import org.txm.utils.logger.Log;
 
@@ -17,7 +18,10 @@
 	
 	public CorporaSourceProvider() {
 		
-		currentState.put(NAME, null);
+		StructuredSelection selection = new StructuredSelection();
+		currentState.put(NAME, selection);
+		fireSourceChanged(1, NAME, selection);
+		
 		instance = this;
 	}
 	
Index: TXM/trunk/org.txm.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.rcp/plugin.xml	(revision 3387)
+++ TXM/trunk/org.txm.rcp/plugin.xml	(revision 3388)
@@ -61,7 +61,7 @@
          </property>
          <property
                name="cssTheme"
-               value="org.txm.rcp.theme.default.linux">
+               value="org.txm.rcp.theme.default.linux2">
          </property>
          <property
                name="preferenceCustomization"
@@ -2624,7 +2624,7 @@
       <command
             defaultHandler="org.txm.rcp.commands.ExportXMLTXMFiles"
             id="org.txm.rcp.commands.ExportXMLTXMFiles"
-            name="XML-TXM files...">
+            name="Corpus au format XML-TXM (.xml)...">
       </command>
    </extension>
    <extension
@@ -2943,7 +2943,7 @@
             <definition
                   id="OneProjectSelected">
                <with
-                     variable="selection">
+                     variable="corporaSelection">
                   <iterate
                         ifEmpty="false"
                         operator="and">
@@ -2956,7 +2956,7 @@
             <definition
                   id="OneIProjectSelected">
                <with
-                     variable="selection">
+                     variable="corporaSelection">
                   <iterate
                         ifEmpty="false"
                         operator="and">
@@ -2969,7 +2969,7 @@
             <definition
                   id="OneTextSelected">
                <with
-                     variable="selection">
+                     variable="corporaSelection">
                   <iterate
                         ifEmpty="false"
                         operator="and">
@@ -3035,7 +3035,7 @@
             <definition
                   id="OneLexicalTableAbleSelected">
                <with
-                     variable="selection">
+                     variable="corporaSelection">
                   <iterate
                         ifEmpty="false"
                         operator="and">
@@ -3085,7 +3085,7 @@
             <definition
                   id="OneTXMResultSelected">
                <with
-                     variable="selection">
+                     variable="corporaSelection">
                   <iterate
                         ifEmpty="false"
                         operator="and">
@@ -3126,7 +3126,7 @@
             <definition
                   id="OneProjectSelected">
                <with
-                     variable="selection">
+                     variable="corporaSelection">
                   <iterate
                         ifEmpty="false"
                         operator="and">
Index: TXM/trunk/org.txm.querycooccurrences.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.querycooccurrences.rcp/plugin.xml	(revision 3387)
+++ TXM/trunk/org.txm.querycooccurrences.rcp/plugin.xml	(revision 3388)
@@ -42,7 +42,7 @@
    <extension
          point="org.eclipse.core.expressions.definitions">
       <definition id="OneAutoCooccurrenceSelected">
-               <with variable="selection">
+               <with variable="corporaSelection">
                   <iterate
                         ifEmpty="false"
                         operator="and">
Index: TXM/trunk/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/EmpantWidget.java
===================================================================
--- TXM/trunk/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/EmpantWidget.java	(revision 3387)
+++ TXM/trunk/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/EmpantWidget.java	(revision 3388)
@@ -126,16 +126,27 @@
 			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
+				
 				structs.setEnabled(false);
 				checkLeft.setSelection(true);
 				checkRight.setSelection(true);
+				maxLeft.setEnabled(true);
+				minLeft.setEnabled(true);
+				minRight.setEnabled(true);
+				maxRight.setEnabled(true);
+				
 				checkXword.setEnabled(false);
+				checkXword.setSelection(false);
 				
-				checkXword.setSelection(false);
 				maxLeft.setSelection(CooccurrencePreferences.getInstance().getInt(CooccurrencePreferences.MAX_LEFT)-1);
 				minLeft.setSelection(CooccurrencePreferences.getInstance().getInt(CooccurrencePreferences.MIN_LEFT)-1);
 				minRight.setSelection(CooccurrencePreferences.getInstance().getInt(CooccurrencePreferences.MIN_RIGHT)-1);
 				maxRight.setSelection(CooccurrencePreferences.getInstance().getInt(CooccurrencePreferences.MAX_RIGHT)-1);
+				
+				maxLeft.setMinimum(CooccurrencePreferences.getInstance().getInt(CooccurrencePreferences.MIN_LEFT)-1);
+				minLeft.setMaximum(CooccurrencePreferences.getInstance().getInt(CooccurrencePreferences.MAX_LEFT)-1);
+				minRight.setMaximum(CooccurrencePreferences.getInstance().getInt(CooccurrencePreferences.MAX_RIGHT)-1);
+				maxRight.setMinimum(CooccurrencePreferences.getInstance().getInt(CooccurrencePreferences.MIN_RIGHT)-1);
 			}
 			
 			@Override
@@ -149,16 +160,28 @@
 			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
+				
 				structs.setEnabled(true);
 				checkLeft.setSelection(false);
 				checkRight.setSelection(false);
+				
 				checkXword.setEnabled(true);
+				checkXword.setSelection(true);
 				
-				checkXword.setSelection(true);
 				maxLeft.setSelection(0);
 				minLeft.setSelection(0);
 				minRight.setSelection(0);
 				maxRight.setSelection(0);
+				
+				maxLeft.setMinimum(0);
+				minLeft.setMaximum(0);
+				minRight.setMaximum(0);
+				maxRight.setMinimum(0);
+				
+				maxLeft.setEnabled(false);
+				minLeft.setEnabled(false);
+				minRight.setEnabled(false);
+				maxRight.setEnabled(false);
 			}
 			
 			@Override
Index: TXM/trunk/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java
===================================================================
--- TXM/trunk/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java	(revision 3387)
+++ TXM/trunk/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java	(revision 3388)
@@ -600,7 +600,8 @@
 				Log.severe(TXMCoreMessages.error_errorWhileSortingResult);
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
-			TXMEditor.packColumns(this.viewer);
+			TXMEditor.refreshColumns(this.viewer);
+			//TXMEditor.packColumns(this.viewer);
 		}
 	}
 	
