Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java	(revision 2430)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java	(revision 2431)
@@ -254,23 +254,9 @@
 	@Override
 	protected boolean _compute() throws Exception {
 		
-		// Parts already created but not computed
-		// This case happens at TXM start, when Parts have not been yet computed
-		// FIXME: SJ: problem, this code is executed and THEN Partition.compute() calls again Part.compute() of all its children
-		// FIXME: SJ: need to remove this code, the compute of children should not be done here
-		if (this.getParts().size() > 0) {
+		// create the parts only if they not already exist
+		if (this.getParts().size() == 0) {
 			
-			this.beginTask("Building partition parts...", this.getParts().size());
-			Log.info("Building partition parts...");
-			
-			// FIXME: temporary fix, compute all the children parts
-			List<Part> parts = (List<Part>) getChildren(Part.class);
-			for (int i = 0; i < parts.size(); i++) {
-				this.worked(1);
-				parts.get(i).compute();
-			}
-		}
-		else {
 			Log.finest(NLS.bind(SearchEngineCoreMessages.info_creatingNewPartition, this.getParent(), this.userName));
 			
 			if (this.pProperty != null) {
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java	(revision 2430)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java	(revision 2431)
@@ -58,75 +58,75 @@
  * @author mdecorde
  * @author sjacquot
  * @author sloiseau
- *  
+ * 
  */
 public class CA extends ChartResult {
-
+	
 	/** The ca. */
 	private ICA r_ca;
-
+	
 	float cex = 0.7f;
-
-	String colfilter="cos2 0.0", rowfilter="cos2 0.0"; //$NON-NLS-1$ //$NON-NLS-2$
-
+	
+	String colfilter = "cos2 0.0", rowfilter = "cos2 0.0"; //$NON-NLS-1$ //$NON-NLS-2$
+	
 	/** The colnames. */
 	String[] colnames = null;
-
+	
 	/** The coltabledata. */
 	private ArrayList<List<Object>> coltabledata;
-
+	
 	/** The coltitles. */
 	String[] coltitles; // of the colinfo table
-
+	
 	String pattern = "(cos2|contrib) (([0-9]+\\.[0-9]+)|([0-9]+))"; //$NON-NLS-1$
-
+	
 	/** The rownames. */
 	String[] rownames = null;
-
+	
 	/** The rowtabledata. */
 	private List<List<Object>> rowtabledata;
-
+	
 	/** The rowtitles. */
 	String[] rowtitles; // of the rowinfo table
-
+	
 	/** The use Factomine R: change this only if you want to use the default R CA package. */
 	boolean useFactoMineR = true;
-
-
-
+	
+	
+	
 	/**
 	 * First dimension.
 	 */
-	@Parameter(key=CAPreferences.FIRST_DIMENSION, type=Parameter.RENDERING)
+	@Parameter(key = CAPreferences.FIRST_DIMENSION, type = Parameter.RENDERING)
 	protected int firstDimension;
-
+	
 	/**
 	 * Second dimension.
 	 */
-	@Parameter(key=CAPreferences.SECOND_DIMENSION, type=Parameter.RENDERING)
+	@Parameter(key = CAPreferences.SECOND_DIMENSION, type = Parameter.RENDERING)
 	protected int secondDimension;
-
+	
 	/**
 	 * To show/hide individuals.
 	 */
-	@Parameter(key=CAPreferences.SHOW_INDIVIDUALS, type=Parameter.RENDERING)
+	@Parameter(key = CAPreferences.SHOW_INDIVIDUALS, type = Parameter.RENDERING)
 	protected boolean showIndividuals;
-
+	
 	/**
 	 * To show/hide variables.
 	 */
-	@Parameter(key=CAPreferences.SHOW_VARIABLES, type=Parameter.RENDERING)
+	@Parameter(key = CAPreferences.SHOW_VARIABLES, type = Parameter.RENDERING)
 	protected boolean showVariables;
-
+	
 	/**
 	 * To show/hide the point shapes or only the labels.
 	 */
-	@Parameter(key=CAPreferences.SHOW_POINT_SHAPES, type=Parameter.RENDERING)
+	@Parameter(key = CAPreferences.SHOW_POINT_SHAPES, type = Parameter.RENDERING)
 	protected boolean showPointShapes;
-
-
-
-
+	
+	
+	
+	
 	/**
 	 * Creates a new empty CA.
 	 *
@@ -137,7 +137,7 @@
 		this(null, lexicalTable);
 		
 		Eigenvalues eigenvalues = (Eigenvalues) this.getFirstChild(Eigenvalues.class);
-		if(eigenvalues == null)	{
+		if (eigenvalues == null) {
 			eigenvalues = new Eigenvalues(this);
 		}
 	}
@@ -163,18 +163,19 @@
 		
 		this.needsToSquareOff = true;
 	}
-
+	
 	@Override
 	public void clean() {
 		try {
-			if (this.getCA() != null)	{
+			if (this.getCA() != null) {
 				RWorkspace.getRWorkspaceInstance().removeVariableFromWorkspace(this.getCA().getSymbol());
 			}
-		} catch (RWorkspaceException e) {
+		}
+		catch (RWorkspaceException e) {
 			e.printStackTrace();
 		}
 	}
-
+	
 	@Override
 	protected boolean __compute() throws Exception {
 		
@@ -194,10 +195,11 @@
 			
 			
 			try {
-				if (this.getCA() != null)	{
+				if (this.getCA() != null) {
 					RWorkspace.getRWorkspaceInstance().removeVariableFromWorkspace(this.getCA().getSymbol());
 				}
-			} catch (RWorkspaceException e) {
+			}
+			catch (RWorkspaceException e) {
 				e.printStackTrace();
 			}
 			
@@ -207,18 +209,19 @@
 			else {
 				this.r_ca = new org.txm.ca.core.statsengine.r.functions.CA(this.getLexicalTable().getData());
 			}
-
+			
 			this.r_ca.compute();
 			
 			return true;
-		} catch(Exception e) {
+		}
+		catch (Exception e) {
 			Log.severe("Failed to compute CA.");
 			Log.printStackTrace(e);
 			return false;
 		}
-
+		
 	}
-
+	
 	public void displayOptions(String col, String row, float cex) {
 		this.cex = Math.abs(cex);
 		if (col.matches(pattern)) {
@@ -227,7 +230,7 @@
 		else {
 			Log.severe("Columns filter malformed follow this pattern " + pattern + ".");
 		}
-
+		
 		if (row.matches(pattern)) {
 			this.rowfilter = row;
 		}
@@ -235,7 +238,7 @@
 			Log.severe("Rows filter malformed follow this pattern " + pattern + ".");
 		}
 	}
-
+	
 	/**
 	 * Export columns infos into a CSV FILE.
 	 *
@@ -244,38 +247,39 @@
 	 * @param colseparator the column separator
 	 * @param textseparator the text separator
 	 */
-	//FIXME: to move in an exporter extension
+	// FIXME: to move in an exporter extension
 	@Deprecated
 	public boolean exportColInfos(File file, String encoding, String colseparator, String textseparator) {
 		try {
 			Writer writer = new OutputStreamWriter(new FileOutputStream(file), encoding);
-			String[] titles =  getColInfosTitles();
-			for (int i  = 0 ; i < titles.length ; i++) {
+			String[] titles = getColInfosTitles();
+			for (int i = 0; i < titles.length; i++) {
 				String title = titles[i];
-				if (i < titles.length -1)
-					writer.write(textseparator+ title + textseparator+ colseparator);
+				if (i < titles.length - 1)
+					writer.write(textseparator + title + textseparator + colseparator);
 				else
-					writer.write(textseparator+ title + textseparator+ colseparator);
+					writer.write(textseparator + title + textseparator + colseparator);
 			}
 			writer.write("\n"); //$NON-NLS-1$
 			Object[] infos = getColInfos();
-			for (int i  = 0 ; i < infos.length ; i++) {
+			for (int i = 0; i < infos.length; i++) {
 				List<Object> list = (List<Object>) infos[i];
 				writer.write(textseparator + list.get(0) + textseparator + colseparator);
-				for (int j = 1 ; j < list.size() ; j++) {
+				for (int j = 1; j < list.size(); j++) {
 					writer.write(list.get(j) + colseparator);
 				}
 				writer.write("\n"); //$NON-NLS-1$
 			}
 			writer.flush();
 			writer.close();
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			org.txm.utils.logger.Log.printStackTrace(e);
 			return false;
 		}
 		return true;
 	}
-
+	
 	/**
 	 * Export row infos into a CSV file.
 	 *
@@ -284,39 +288,39 @@
 	 * @param colseparator the column separator
 	 * @param textseparator the text separator
 	 */
-	//FIXME: to move in an exporter extension
+	// FIXME: to move in an exporter extension
 	@Deprecated
-	public void exportRowInfos(File file, String encoding, String colseparator, String textseparator)
-	{
+	public void exportRowInfos(File file, String encoding, String colseparator, String textseparator) {
 		try {
 			Writer writer = new OutputStreamWriter(new FileOutputStream(file), encoding);
-			String[] titles =  getRowInfosTitles();
-			for (int i  = 0 ; i < titles.length ; i++) {
+			String[] titles = getRowInfosTitles();
+			for (int i = 0; i < titles.length; i++) {
 				String title = titles[i];
-				if (i < titles.length -1) {
-					writer.write(textseparator+ title + textseparator+ colseparator);
+				if (i < titles.length - 1) {
+					writer.write(textseparator + title + textseparator + colseparator);
 				}
 				else {
-					writer.write(textseparator+ title + textseparator+ colseparator);
+					writer.write(textseparator + title + textseparator + colseparator);
 				}
 			}
 			writer.write("\n"); //$NON-NLS-1$
 			Object[] infos = getRowInfos();
-			for (int i  = 0 ; i < infos.length ; i++) {
+			for (int i = 0; i < infos.length; i++) {
 				List<Object> list = (List<Object>) infos[i];
 				writer.write(textseparator + list.get(0) + textseparator + colseparator);
-				for(int j = 1 ; j < list.size() ; j++) {
+				for (int j = 1; j < list.size(); j++) {
 					writer.write(list.get(j) + colseparator);
 				}
 				writer.write("\n"); //$NON-NLS-1$
 			}
 			writer.flush();
 			writer.close();
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			org.txm.utils.logger.Log.printStackTrace(e);
 		}
 	}
-
+	
 	/**
 	 * Gets the CA R object.
 	 *
@@ -325,12 +329,12 @@
 	public org.txm.ca.core.statsengine.r.functions.ICA getCA() {
 		return r_ca;
 	}
-
+	
 	public float getCex() {
 		return cex;
 	}
-
-
+	
+	
 	/**
 	 * 
 	 * @return the column filter -> only used by FactoMineR
@@ -338,8 +342,8 @@
 	public String getColFilter() {
 		return colfilter;
 	}
-
-
+	
+	
 	/**
 	 * Get the column infos titles array.
 	 *
@@ -347,7 +351,7 @@
 	 */
 	public String[] getColInfosTitles() {
 		if (coltitles == null) {
-			List<String> colnames = new ArrayList<String>();
+			List<String> colnames = new ArrayList<>();
 			colnames.add(TXMCoreMessages.common_cols); // entry
 			colnames.add(" "); //$NON-NLS-1$
 			colnames.add(CACoreMessages.common_q12); // Q12
@@ -357,20 +361,20 @@
 			colnames.add(CACoreMessages.common_dist); // Dist
 			for (int c = 0; c < 3; c++) { // seulement les 3 premiers axes
 				colnames.add(" "); // separator //$NON-NLS-1$
-				colnames.add(CACoreMessages.common_cont+ (c + 1)); // ContribN
-				colnames.add(CACoreMessages.common_cos2+ (c + 1)); // Cos²N
+				colnames.add(CACoreMessages.common_cont + (c + 1)); // ContribN
+				colnames.add(CACoreMessages.common_cos2 + (c + 1)); // Cos²N
 			}
 			colnames.add(" "); // separator //$NON-NLS-1$
 			colnames.add(CACoreMessages.common_c1); // coord axis 1
 			colnames.add(CACoreMessages.common_c2); // coord axis 2
 			colnames.add(CACoreMessages.common_c3); // coord axis 3
 			colnames.add(""); //$NON-NLS-1$
-
+			
 			coltitles = colnames.toArray(new String[] {});
 		}
 		return coltitles;
 	}
-
+	
 	/**
 	 * Gets the column names as array.
 	 *
@@ -383,7 +387,7 @@
 		}
 		return colnames;
 	}
-
+	
 	/**
 	 * Gets the columns coordinates as array.
 	 *
@@ -392,7 +396,7 @@
 	public double[][] getColsCoords() {
 		return this.r_ca.getColsCoords();
 	}
-
+	
 	/**
 	 * Gets the columns distances as array.
 	 *
@@ -402,7 +406,7 @@
 	public double[] getColsDist() throws StatException {
 		return this.r_ca.getColDist();
 	}
-
+	
 	/**
 	 * Get the columns inertia as array.
 	 *
@@ -412,7 +416,7 @@
 	public double[] getColsInertia() throws StatException {
 		return this.r_ca.getColsInertia();
 	}
-
+	
 	/**
 	 * Gets the cols mass.
 	 *
@@ -422,29 +426,31 @@
 	public double[] getColsMass() throws StatException {
 		return this.r_ca.getColsMass();
 	}
-
+	
 	/**
 	 * Gets the number of columns.
+	 * 
 	 * @return the number of columns
 	 */
-	public int getColumnsCount()	{
+	public int getColumnsCount() {
 		return this.r_ca.getColumnsCount();
 	}
-
-
+	
+	
 	@Override
 	public String[] getExportTXTExtensions() {
-		return new String[]{"*.txt"};
+		return new String[] { "*.txt" };
 	}
-
+	
 	/**
 	 * Gets the first dimension.
+	 * 
 	 * @return the first dimension
 	 */
 	public int getFirstDimension() {
 		return firstDimension;
 	}
-
+	
 	/**
 	 * Gets the lexical table used to compute the CA.
 	 *
@@ -453,52 +459,52 @@
 	public LexicalTable getLexicalTable() {
 		return (LexicalTable) this.parent;
 	}
-
+	
 	/**
 	 * Get the row contributions as array.
 	 *
 	 * @return the row contrib
-	 * @throws StatException 
+	 * @throws StatException
 	 */
 	public double[][] getRowContrib() throws StatException {
 		return r_ca.getRowContrib();
 	}
-
+	
 	/**
 	 * Get the row cos2 as array.
 	 *
 	 * @return the row cos2
-	 * @throws StatException 
+	 * @throws StatException
 	 */
 	public double[][] getRowCos2() throws StatException {
 		return r_ca.getRowCos2();
 	}
-
+	
 	public String getRowFilter() {
 		return rowfilter;
 	}
-
+	
 	/**
 	 * Get the row informations as array of arrays.
 	 *
 	 * @return the row infos
 	 */
 	public Object[] getRowInfos() {
-
+		
 		if (rowtabledata != null) {
 			return rowtabledata.toArray();
 		}
-
-		rowtabledata = new ArrayList<List<Object>>();
-
-		if(r_ca != null)	{
 		
+		rowtabledata = new ArrayList<>();
+		
+		if (r_ca != null) {
+			
 			double[] mass = null;
 			double[] dist = null;
 			double[][] rowcoords = null;
 			double[][] rowcontribs = null;
 			double[][] rowcos2s = null;
-	
+			
 			try {
 				mass = r_ca.getRowsMass();
 				rowcoords = r_ca.getRowsCoords();
@@ -506,62 +512,63 @@
 				rowcos2s = r_ca.getRowCos2();
 				dist = r_ca.getRowDist();
 				getRowNames();
-			} catch (Exception e) {
+			}
+			catch (Exception e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 				return null;
 			}
-	
-	
+			
+			
 			double[] cos2 = new double[3];
 			for (int i = 0; i < rownames.length; i++) {
 				double distt = dist[i];
-	
+				
 				cos2[0] = rowcos2s[i][0];
 				cos2[1] = rowcos2s[i][1];
 				cos2[2] = rowcos2s[i][2];
-	
-				List<Object> entry = new ArrayList<Object>(4);
+				
+				List<Object> entry = new ArrayList<>(4);
 				entry.add(rownames[i]); // Factor
 				entry.add(""); // separator //$NON-NLS-1$
 				entry.add(new Double(cos2[0] + cos2[1])); // Q12
 				entry.add(new Double(cos2[0] + cos2[2])); // Q23
 				entry.add(new Double(cos2[2] + cos2[1])); // Q13
-	
+				
 				entry.add(new Double(mass[i]) * 100.0); // mass
-	
+				
 				entry.add(distt); // dist
 				for (int c = 0; c < 3; c++) { // 3 first axis
 					entry.add(""); // separator //$NON-NLS-1$
 					entry.add(rowcontribs[i][c] * 100.0); // contrib
 					entry.add(cos2[c]); // cos²
 				}
-				entry.add(""); //separator //$NON-NLS-1$
+				entry.add(""); // separator //$NON-NLS-1$
 				for (int c = 0; c < 3; c++) { // 3 first axis
 					entry.add(rowcoords[i][c]); // coords
 				}
 				entry.add("");// separator //$NON-NLS-1$
 				rowtabledata.add(entry);
 			}
-		
+			
 		}
 		
 		return rowtabledata.toArray();
 	}
-
+	
 	/**
 	 * Gets the col all infos as Array of arrays.
 	 *
 	 * @return the col infos
 	 */
 	public Object[] getColInfos() {
-
+		
 		if (coltabledata != null) {
 			return coltabledata.toArray();
 		}
-
-		coltabledata = new ArrayList<List<Object>>();
-
-		if(r_ca != null)	{
+		
+		coltabledata = new ArrayList<>();
+		
+		if (r_ca != null) {
 			double[] sv = null;
 			double[] mass = null;
 			double[][] colcoords = null;
@@ -576,49 +583,50 @@
 				colcontribs = r_ca.getColContrib();
 				colcos2s = r_ca.getColCos2();
 				coldist = r_ca.getColDist();
-				//add dist
+				// add dist
 				this.getColNames();
-			} catch (StatException e) {
+			}
+			catch (StatException e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 				return null;
 			}
-	
-	
+			
+			
 			double[] cos2 = new double[3];
 			for (int i = 0; i < colnames.length; i++) {
-				List<Object> entry = new ArrayList<Object>(4);
-	
+				List<Object> entry = new ArrayList<>(4);
+				
 				cos2[0] = colcos2s[i][0];
 				cos2[1] = colcos2s[i][1];
 				cos2[2] = colcos2s[i][2];
-	
+				
 				entry.add(colnames[i]); // Factor
-				entry.add(""); //separator //$NON-NLS-1$
+				entry.add(""); // separator //$NON-NLS-1$
 				entry.add(new Double(cos2[0] + cos2[1])); // Q12
 				entry.add(new Double(cos2[0] + cos2[2])); // Q23
 				entry.add(new Double(cos2[2] + cos2[1])); // Q13
 				entry.add(new Double(mass[i] * 100.0)); // mass
-	
+				
 				entry.add(coldist[i]); // dist
-	
+				
 				for (int c = 0; c < 3; c++) { // 3 first axis
-					entry.add(""); //separator //$NON-NLS-1$
+					entry.add(""); // separator //$NON-NLS-1$
 					entry.add(colcontribs[i][c]); // contrib
 					entry.add(cos2[c]); // cos²
 				}
-				entry.add(""); //separator //$NON-NLS-1$
+				entry.add(""); // separator //$NON-NLS-1$
 				for (int c = 0; c < 3; c++) { // 3 first axis
 					entry.add(colcoords[i][c]); // coords
 				}
-				entry.add("");//separator //$NON-NLS-1$
+				entry.add("");// separator //$NON-NLS-1$
 				coltabledata.add(entry);
 			}
 		}
-
+		
 		return coltabledata.toArray();
 	}
-
 	
+	
 	/**
 	 * Get the row infos titles as array.
 	 *
@@ -626,7 +634,7 @@
 	 */
 	public String[] getRowInfosTitles() {
 		if (rowtitles == null) {
-			List<String> colnames = new ArrayList<String>();
+			List<String> colnames = new ArrayList<>();
 			colnames.add(TXMCoreMessages.common_rows); // entry
 			colnames.add(""); //$NON-NLS-1$
 			colnames.add(CACoreMessages.common_q12); // Q12
@@ -636,20 +644,20 @@
 			colnames.add(CACoreMessages.common_dist); // Dist
 			for (int c = 0; c < 3; c++) { // seulement les 3 premiers axes
 				colnames.add(" "); // separator //$NON-NLS-1$
-				colnames.add(CACoreMessages.common_cont+ (c + 1)); // ContribN
-				colnames.add(CACoreMessages.common_cos2+ (c + 1)); // Cos²N
+				colnames.add(CACoreMessages.common_cont + (c + 1)); // ContribN
+				colnames.add(CACoreMessages.common_cos2 + (c + 1)); // Cos²N
 			}
 			colnames.add(" "); // separator //$NON-NLS-1$
 			colnames.add(CACoreMessages.common_c1); // coord axis 1
 			colnames.add(CACoreMessages.common_c2); // coord axis 2
 			colnames.add(CACoreMessages.common_c3); // coord axis 3
 			colnames.add(""); //$NON-NLS-1$
-
+			
 			rowtitles = colnames.toArray(new String[] {});
 		}
 		return rowtitles;
 	}
-
+	
 	/**
 	 * Get the row names as array.
 	 *
@@ -662,7 +670,7 @@
 		}
 		return rownames;
 	}
-
+	
 	/**
 	 * Get the rows coordinates as array of arrays
 	 *
@@ -671,15 +679,16 @@
 	public double[][] getRowsCoords() {
 		return this.r_ca.getRowsCoords();
 	}
-
+	
 	/**
 	 * Gets the number of rows.
+	 * 
 	 * @return the number of rows
 	 */
-	public int getRowsCount()	{
+	public int getRowsCount() {
 		return this.r_ca.getRowsCount();
 	}
-
+	
 	/**
 	 * Get the rows distances as array.
 	 *
@@ -689,7 +698,7 @@
 	public double[] getRowsDist() throws StatException {
 		return this.r_ca.getRowDist();
 	}
-
+	
 	/**
 	 * Get the rows inertia as array.
 	 *
@@ -699,7 +708,7 @@
 	public double[] getRowsInertia() throws StatException {
 		return this.r_ca.getRowsInertia();
 	}
-
+	
 	/**
 	 * Get the rows mass as array.
 	 *
@@ -709,49 +718,50 @@
 	public double[] getRowsMass() throws StatException {
 		return this.r_ca.getRowsMass();
 	}
-
-	//	/**
-	//	 * step 1.
-	//	 *
-	//	 * @throws StatException the stat exception
-	//	 * @throws CqiClientException the cqi client exception
-	//	 */
-	//	public boolean stepLexicalTable() throws Exception
-	//	{
-	//		table = LexicalTableFactory.getLexicalTable(partition, pAnalysisProperty, fmin);
-	//		if (table == null) {
-	//			System.out.println("Error: Lexical table is null.");
-	//			return false;
-	//		}
-	//		partition.addResult(table);
-	//		table.addResult(this);
-	//		
-	//		return true;
-	//	}
-
-	//	/**
-	//	 * step 2.
-	//	 */
-	//	public boolean stepSortTableLexical()
-	//	{
-	//		try {
-	//			table.getData().filter(vmax, fmin);
-	//		} catch (Exception e) {
-	//			System.out.println("Error: "+e.getLocalizedMessage());
-	//			org.txm.utils.logger.Log.printStackTrace(e);
-	//			return false;
-	//		}
-	//		return true;
-	//	}
-
+	
+	// /**
+	// * step 1.
+	// *
+	// * @throws StatException the stat exception
+	// * @throws CqiClientException the cqi client exception
+	// */
+	// public boolean stepLexicalTable() throws Exception
+	// {
+	// table = LexicalTableFactory.getLexicalTable(partition, pAnalysisProperty, fmin);
+	// if (table == null) {
+	// System.out.println("Error: Lexical table is null.");
+	// return false;
+	// }
+	// partition.addResult(table);
+	// table.addResult(this);
+	//
+	// return true;
+	// }
+	
+	// /**
+	// * step 2.
+	// */
+	// public boolean stepSortTableLexical()
+	// {
+	// try {
+	// table.getData().filter(vmax, fmin);
+	// } catch (Exception e) {
+	// System.out.println("Error: "+e.getLocalizedMessage());
+	// org.txm.utils.logger.Log.printStackTrace(e);
+	// return false;
+	// }
+	// return true;
+	// }
+	
 	/**
 	 * Gets the second dimension.
+	 * 
 	 * @return the second dimension
 	 */
 	public int getSecondDimension() {
 		return secondDimension;
 	}
-
+	
 	@Override
 	public String getSimpleName() {
 		try {
@@ -761,7 +771,7 @@
 			return "";
 		}
 	}
-
+	
 	@Override
 	public String getDetails() {
 		try {
@@ -772,22 +782,22 @@
 		}
 	}
 	
-//	@Override
-//	public String getComputingDoneMessage() {
-//		if(hasBeenComputedOnce())	{
-//			return getSimpleDetails();
-//		}
-//		else	{
-//			return TXMCoreMessages.common_noResults;
-//		}
-//	}
-
+	// @Override
+	// public String getComputingDoneMessage() {
+	// if(hasBeenComputedOnce()) {
+	// return getSimpleDetails();
+	// }
+	// else {
+	// return TXMCoreMessages.common_noResults;
+	// }
+	// }
+	
 	@Override
 	public String getName() {
 		return this.getSimpleName();
 	}
-
-
+	
+	
 	/**
 	 * Get the singular values as array.
 	 *
@@ -797,54 +807,55 @@
 	public double[] getSingularValues() throws StatException {
 		return r_ca.getSingularValues();
 	}
-
+	
 	/**
 	 * Get the singular values infos as List of Lists
 	 *
 	 * @return the singular values infos
 	 */
-	public List<List<Object>> getSingularValuesInfos()
-	{
-		List<List<Object>> svtabledata = new ArrayList<List<Object>>();
-
+	public List<List<Object>> getSingularValuesInfos() {
+		List<List<Object>> svtabledata = new ArrayList<>();
+		
 		double[] sv = null;
 		try {
 			sv = getValeursPropres();
-		} catch (StatException e) {
+		}
+		catch (StatException e) {
 			org.txm.utils.logger.Log.printStackTrace(e);
 			return svtabledata;
 		}
-
+		
 		double sigmaVp;
 		try {
 			sigmaVp = getValeursPropresSum();
-		} catch (StatException e) {
+		}
+		catch (StatException e) {
 			org.txm.utils.logger.Log.printStackTrace(e);
 			return svtabledata;
 		}
-
+		
 		double cumul = 0;
 		double percent = 0;
-
+		
 		for (int i = 0; i < sv.length; i++) {
 			percent = 100 * sv[i] / sigmaVp;
 			cumul += percent;
-
-			List<Object> entry = new ArrayList<Object>(4);
+			
+			List<Object> entry = new ArrayList<>(4);
 			entry.add(new Integer(i + 1));	// Factor
 			entry.add(new Double(sv[i]));	// Singular value
 			entry.add(percent);				// Percent
 			entry.add(cumul);				// Cumul
 			entry.add(percent);				// For bar plot direct drawing in the table
-
+			
 			entry.add(""); // add an empty column to fix a display bug in table in Linux
-
+			
 			svtabledata.add(entry);
 		}
-
+		
 		return svtabledata;
 	}
-
+	
 	/**
 	 * Gets the symbol.
 	 *
@@ -853,7 +864,7 @@
 	public String getSymbol() {
 		return r_ca.getSymbol();
 	}
-
+	
 	/**
 	 * Gets the sqrt of singular values as array.
 	 *
@@ -863,7 +874,7 @@
 	public double[] getValeursPropres() throws StatException {
 		return r_ca.getEigenvalues();
 	}
-
+	
 	/**
 	 * Gets the 'valeurs propres' sum.
 	 *
@@ -877,8 +888,8 @@
 		}
 		return sum;
 	}
-
-
+	
+	
 	/**
 	 * Exports CA R data to a file
 	 *
@@ -886,12 +897,12 @@
 	 * @param encoding the encoding
 	 * @return true, if successful
 	 */
-	//FIXME: to move in an exporter extension
+	// FIXME: to move in an exporter extension
 	@Deprecated
 	public boolean toTxt(File outfile, String encoding) {
 		return toTxt(outfile, encoding, "\t", ""); //$NON-NLS-1$ //$NON-NLS-2$
 	}
-
+	
 	/**
 	 * Exports CA R data to a file
 	 *
@@ -901,109 +912,110 @@
 	 * @param txtseparator the txtseparator
 	 * @return true, if successful
 	 */
-	//FIXME: to move in an exporter extension
+	@Override
+	// FIXME: to move in an exporter extension
 	@Deprecated
 	public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) {
 		acquireSemaphore();
 		boolean rez = r_ca.toTxt(outfile, encoding, colseparator, txtseparator);
 		releaseSemaphore();
-
+		
 		return rez;
 	}
-
-
+	
+	
 	/**
 	 * Checks if the CA uses the FactoMineR R package.
+	 * 
 	 * @return <code>true</code> if the CA uses the FactoMineR R package otherwise <code>false</code>
 	 */
 	public boolean useFactoMineR() {
 		return this.useFactoMineR;
 	}
-
+	
 	@Override
 	public boolean canCompute() {
 		try {
-			return 
-					this.getLexicalTable().getNColumns() > 3
+			return this.getLexicalTable().getNColumns() > 3
 					&& this.firstDimension > 0
 					&& this.secondDimension > 0
-					&& this.firstDimension != this.secondDimension
-					;
-		} catch (Exception e) {
+					&& this.firstDimension != this.secondDimension;
+		}
+		catch (Exception e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 			return false;
 		}
 	}
-
+	
 	@Override
 	public boolean saveParameters() {
 		// nothing to do
 		return true;
 	}
-
+	
 	@Override
 	public boolean setParameters(TXMParameters parameters) {
 		// TODO Auto-generated method stub
 		System.err.println("CA.setParameters(): not yet implemented.");
 		return true;
 	}
-
+	
 	@Override
 	public boolean loadParameters() {
 		// nothing to do
 		return true;
 	}
-
+	
 	/**
 	 * @return the showIndividuals
 	 */
 	public boolean isShowIndividuals() {
 		return showIndividuals;
 	}
-
+	
 	/**
 	 * @param showIndividuals the showIndividuals to set
 	 */
 	public void setShowIndividuals(boolean showIndividuals) {
 		this.showIndividuals = showIndividuals;
 	}
-
+	
 	/**
 	 * @return the showVariables
 	 */
 	public boolean isShowVariables() {
 		return showVariables;
 	}
-
+	
 	/**
 	 * @param showVariables the showVariables to set
 	 */
 	public void setShowVariables(boolean showVariables) {
 		this.showVariables = showVariables;
 	}
-
+	
 	/**
 	 * @return the showPointShapes
 	 */
 	public boolean isShowPointShapes() {
 		return showPointShapes;
 	}
-
+	
 	/**
 	 * @param showPointShapes the showPointShapes to set
 	 */
 	public void setShowPointShapes(boolean showPointShapes) {
 		this.showPointShapes = showPointShapes;
 	}
-
+	
 	/**
 	 * @param firstDimension the firstDimension to set
 	 */
 	public void setFirstDimension(int firstDimension) {
 		this.firstDimension = firstDimension;
 	}
-
+	
 	/**
 	 * @param secondDimension the secondDimension to set
 	 */
@@ -1015,25 +1027,27 @@
 	public String getResultType() {
 		return CACoreMessages.RESULT_TYPE;
 	}
-
 	
+	
 	/**
 	 * Gets the unit property.
+	 * 
 	 * @return the unitProperty
 	 */
 	public Property getUnitProperty() {
 		return this.getLexicalTable().getProperty();
 	}
-
-
+	
+	
 	@Override
 	public LexicalTable getParent() {
-		return (LexicalTable)this.parent;
+		return (LexicalTable) this.parent;
 	}
-
+	
 	// FIXME: SJ: fix to save the eigenvalues when the CA is saved
-	// FIXME: SJ: temporary fix to save the Eignevalues. This method should be removed when the CAEditor will be managed in a better way
-	public void setUserPersistable(boolean userPersistable)	{
+	// FIXME: SJ: temporary fix to save the Eigenvalues. This method should be removed when the CAEditor will be managed in a better way
+	@Override
+	public void setUserPersistable(boolean userPersistable) {
 		super.setUserPersistable(userPersistable); // can not call super method, lead to infinite loop
 		
 		// deep persistence
@@ -1042,5 +1056,5 @@
 		}
 	}
 	
-
+	
 }
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/functions/Eigenvalues.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/functions/Eigenvalues.java	(revision 2430)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/functions/Eigenvalues.java	(revision 2431)
@@ -18,7 +18,7 @@
  *
  */
 public class Eigenvalues extends ChartResult {
-
+	
 	/**
 	 * @param parent
 	 */
@@ -32,7 +32,7 @@
 	public Eigenvalues(String parametersNodePath) {
 		this(parametersNodePath, null);
 	}
-
+	
 	/**
 	 * @param parent
 	 */
@@ -41,13 +41,13 @@
 		this.setVisible(false);
 		this.domainGridLinesVisible = false;
 	}
-
+	
 	/**
 	 * Convenience method to get the eigenvalues casted CA
 	 * 
 	 * @return the eigenvalues CA
 	 */
-	public CA getCA()	{
+	public CA getCA() {
 		return (CA) this.parent;
 	}
 	
@@ -56,24 +56,24 @@
 		// TODO Auto-generated method stub
 		return "";
 	}
-
+	
 	@Override
 	public String getSimpleName() {
 		// TODO Auto-generated method stub
 		return "Eigenvalues";
 	}
-
+	
 	@Override
 	public String getDetails() {
 		// TODO Auto-generated method stub
 		return "";
 	}
-
+	
 	@Override
 	public void clean() {
 		// nothing to do
 	}
-
+	
 	@Override
 	public boolean canCompute() throws Exception {
 		return this.parent != null && this.parent.hasBeenComputedOnce();
@@ -84,56 +84,57 @@
 		// nothing to do
 		return true;
 	}
-
+	
 	@Override
 	public boolean setParameters(TXMParameters parameters) {
 		// TODO Auto-generated method stub
 		System.err.println("Eigenvalues.setParameters(): not yet implemented.");
 		return true;
 	}
-
+	
 	@Override
 	public boolean loadParameters() {
 		// nothing to do
 		return true;
 	}
-
 	
+	
 	@Override
 	protected boolean __compute() throws Exception {
 		// nothing to do
 		return true;
 	}
-
+	
 	@Override
 	public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception {
 		// TODO Auto-generated method stub
 		return false;
 	}
-
+	
 	@Override
 	public String getResultType() {
 		return CACoreMessages.eigenvalues;
 	}
-
 	
+	
 	// FIXME: SJ: fix to save the eigenvalues when the CA is saved
-	// FIXME: SJ: temporary fix to save the Eignevalues. This method should be removed when the CAEditor will be managed in a better way
+	// FIXME: SJ: temporary fix to save the Eigenvalues. This method should be removed when the CAEditor will be managed in a better way
+	@Override
 	public void setUserPersistable(boolean userPersistable) {
 		this.userPersistable = userPersistable;
 		
 		// directly save and flush the preference
-        try {
-            if (this.isUserPersistable())    {
-                this.autoSaveParametersFromAnnotations();
-                this.saveParameters();
-                TXMPreferences.flush(this);
-            }
-        }
-        catch (Exception e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        } 
+		try {
+			if (this.isUserPersistable()) {
+				this.autoSaveParametersFromAnnotations();
+				this.saveParameters();
+				TXMPreferences.flush(this);
+			}
+		}
+		catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
 	}
 	
-}
\ No newline at end of file
+}
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 2430)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 2431)
@@ -2255,7 +2255,7 @@
 	 * @throws Exception
 	 */
 	public boolean compute() {
-		return this.compute(new LogMonitor("Computing " + this));
+		return this.compute(true);
 	}
 	
 	
@@ -2410,7 +2410,10 @@
 					|| this.altered // FIXME: SJ: fix for computing LexicalTable children even if the LT is not dirty but only altered, need to define if it's a temporary fix or not
 			) {
 				
-				if (monitor != null && children.size() > 1) monitor.beginTask("Computing children of " + this, children.size());
+				if (monitor != null && children.size() > 1) {
+					monitor.beginTask("Computing children of " + this, children.size());
+				}
+				
 				// set the children as dirty since the result has changed
 				for (int i = 0; i < this.children.size(); i++) {
 					this.children.get(i).setDirty();
@@ -2424,7 +2427,9 @@
 					for (int i = 0; i < this.children.size(); i++) {
 						this.children.get(i).compute(monitor, deepComputing);
 						
-						if (monitor != null && children.size() > 1) monitor.worked(1);
+						if (monitor != null && children.size() > 1) {
+							monitor.worked(1);
+						}
 					}
 				}
 			}
@@ -2694,15 +2699,23 @@
 	
 	/**
 	 * Sets the user defined persistable state of the result.
-	 * Propagates persistence to parent and non-persistence to the children if needed.
 	 * 
-	 * @param userPersistable the state to set
+	 * If doCheck is equal to true:
+	 * - propagates persistence to parent and non-persistence to the children if needed.
+	 * - also copies parameters values from Java annotations to result preferences node and flushes the node to file.
+	 * 
+	 * @param userPersistable
+	 * @param doCheck
 	 */
-	public void setUserPersistable(boolean userPersistable) {
+	public void setUserPersistable(boolean userPersistable, boolean doCheck) {
 		this.userPersistable = userPersistable;
+		
+		// force persistable state of the parent if this result is set to persistable
 		if (userPersistable && this.parent != null && !this.parent.isInternalPersistable()) {
 			this.parent.setUserPersistable(true);
 		}
+		
+		// force non-persistable state of children if this result is set to non-persistable
 		if (!userPersistable) {
 			for (TXMResult child : getChildren()) {
 				child.setUserPersistable(userPersistable);
@@ -2723,6 +2736,15 @@
 	}
 	
 	/**
+	 * Sets the user defined persistable state of the result.
+	 * 
+	 * @param userPersistable the state to set
+	 */
+	public void setUserPersistable(boolean userPersistable) {
+		this.setUserPersistable(userPersistable, true);
+	}
+	
+	/**
 	 * Swaps the user persistable state.
 	 * 
 	 * propagate persistence to parent if necessary
Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 2430)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 2431)
@@ -76,96 +76,96 @@
  * The Class Project represent a Corpus project with its sources, corpus indexes, texts, editions, pages, etc.
  */
 public class Project extends TXMResult {
-
+	
 	public static final String TXMCORPUSNATURE = "org.txm.core.CorpusNature";
-
-	//private ArrayList<String> pEditionNames = new ArrayList<String>();
+	
+	// private ArrayList<String> pEditionNames = new ArrayList<String>();
 	private IProject rcpProject;
-
+	
 	private ProjectScope preferenceScope;
-
+	
 	/**
 	 * If true, the computing will build the main corpus, editions, texts, etc.
 	 */
 	protected boolean needToBuild;
-
-
-	@Parameter(key=TBXPreferences.CLEAN)
+	
+	
+	@Parameter(key = TBXPreferences.CLEAN)
 	private boolean pCleanAfterBuild;
-
+	
 	/**
 	 * Name of import module.
 	 */
-	@Parameter(key=TBXPreferences.IMPORT_MODULE_NAME)
+	@Parameter(key = TBXPreferences.IMPORT_MODULE_NAME)
 	String pImportModuleName;
 	
 	/**
 	 * Name of import module.
 	 */
-	@Parameter(key=TBXPreferences.CORPUS_VERSION)
+	@Parameter(key = TBXPreferences.CORPUS_VERSION)
 	String pCorpusVersion;
-
+	
 	/**
 	 * 
 	 */
-	@Parameter(key=TBXPreferences.LINKS)
+	@Parameter(key = TBXPreferences.LINKS)
 	private HashMap<String, Alignement> links;
-
+	
 	/**
 	 * Default edition.
 	 */
-	@Parameter(key=TBXPreferences.DEFAULT_EDITION)
+	@Parameter(key = TBXPreferences.DEFAULT_EDITION)
 	private String pDefaultEditionName;
-
+	
 	/**
 	 * Encoding.
 	 */
-	@Parameter(key=TBXPreferences.ENCODING)
+	@Parameter(key = TBXPreferences.ENCODING)
 	private String pEncoding;
-
+	
 	/**
 	 * Language.
 	 */
-	@Parameter(key=TBXPreferences.LANG)
+	@Parameter(key = TBXPreferences.LANG)
 	private String pLanguage;
-
+	
 	/**
 	 * Source directory.
 	 */
-	@Parameter(key=TBXPreferences.SOURCE)
+	@Parameter(key = TBXPreferences.SOURCE)
 	private File pSrcDirectory;
-
-	//	/** The front xslt path. */
-	//	@Parameter(key=TBXPreferences.FRONT_XSL)
-	//	private String pXsl;
-	//	/** The front xslt path. */
-	//	@Parameter(key=TBXPreferences.FRONT_XSL_PARAMETERS)
-	//	private HashMap<String, String> pXsltParameters;
-
+	
+	// /** The front xslt path. */
+	// @Parameter(key=TBXPreferences.FRONT_XSL)
+	// private String pXsl;
+	// /** The front xslt path. */
+	// @Parameter(key=TBXPreferences.FRONT_XSL_PARAMETERS)
+	// private HashMap<String, String> pXsltParameters;
+	
 	/**
 	 * Author.
 	 */
-	@Parameter(key=TBXPreferences.AUTHOR)
+	@Parameter(key = TBXPreferences.AUTHOR)
 	private String pAuthor;
-
+	
 	/**
 	 * Font.
 	 */
-	@Parameter(key=TBXPreferences.FONT)
+	@Parameter(key = TBXPreferences.FONT)
 	private String pFont = "Arial";
-
+	
 	/**
 	 * Description.
 	 */
-	@Parameter(key=TBXPreferences.DESCRIPTION)
+	@Parameter(key = TBXPreferences.DESCRIPTION)
 	private String pDescription;
-
+	
 	/**
 	 * 
 	 */
-	@Parameter(key=TBXPreferences.ANNOTATE)
+	@Parameter(key = TBXPreferences.ANNOTATE)
 	private boolean pAnnotate;
-
+	
 	/**
 	 * Instantiates a new project and define if it needs to build its main corpus, texts, editions, etc..
 	 * 
@@ -175,7 +175,7 @@
 	 */
 	public Project(Workspace workspace, String name, boolean needToBuild) throws Exception {
 		super("/project/" + name + "/" + createUUID() + "_Project", workspace);
-
+		
 		this.needToBuild = needToBuild;
 		this.internalPersistable = true;
 		this.userName = name;
@@ -190,9 +190,10 @@
 			TXMPreferences.flush(this);
 		}
 	}
-
+	
 	/**
 	 * Instantiates a new project that needs to build its main corpus, texts, editions, etc..
+	 * 
 	 * @param workspace
 	 * @param name
 	 * @throws Exception
@@ -200,7 +201,7 @@
 	public Project(Workspace workspace, String name) throws Exception {
 		this(workspace, name, true);
 	}
-
+	
 	public boolean isOpen() {
 		return rcpProject != null && rcpProject.isOpen();
 	}
@@ -217,16 +218,17 @@
 				
 				if (monitor != null) monitor.subTask("loading results");
 				this.loadResults(null);
-
+				
 				for (TXMResult cb : getCorpora()) {
 					if (!cb.compute(false)) {
-						Log.warning("Deleting broken corpus: "+cb+" of "+cb.getProject());
+						Log.warning("Deleting broken corpus: " + cb + " of " + cb.getProject());
 						cb.delete();
 					}
 				}
 				
 				if (monitor != null) monitor.subTask("");
-			} catch (CoreException e) {
+			}
+			catch (CoreException e) {
 				e.printStackTrace();
 			}
 		}
@@ -253,7 +255,8 @@
 				
 				this.preferenceScope = null;
 				
-			} catch (Exception e) {
+			}
+			catch (Exception e) {
 				e.printStackTrace();
 			}
 		}
@@ -275,118 +278,119 @@
 	/**
 	 * Instantiates a new existing project from persistence.
 	 * This project will not be builded, main corpus, texts, editions, etc. will be restored from persistence.
-	 *  
+	 * 
 	 * @param nodePath
 	 * @throws CoreException
 	 */
 	public Project(String parametersNodePath) throws CoreException {
 		super(parametersNodePath);
-
+		
 		this.needToBuild = false;
 		this.internalPersistable = true;
 		this.dirty = false;
 		this.hasBeenComputedOnce = true;
 		this.setVisible(false);
-
+		
 		initRCPStuffs();
-
-		//		
-		//		this.setPath(project.getPath() + getName());
-		//		params = parameters;
-		//		setSelfElement(params.root);
-		//		this.project = project;
-		//		//load();
-		//		this.userName = params.name;
-		//		if (!userName.equals(userName.toUpperCase())) {
-		//			System.out.println("Warning in Base.init: binary corpus name contains lower case letters: "+this.userName);
-		//		}
-		//		
-		//		this.scope = new BasePreferenceScope(this);
-
+		
+		//
+		// this.setPath(project.getPath() + getName());
+		// params = parameters;
+		// setSelfElement(params.root);
+		// this.project = project;
+		// //load();
+		// this.userName = params.name;
+		// if (!userName.equals(userName.toUpperCase())) {
+		// System.out.println("Warning in Base.init: binary corpus name contains lower case letters: "+this.userName);
+		// }
+		//
+		// this.scope = new BasePreferenceScope(this);
+		
 		// reloading existing results
 		this.loadResults(null);
 	}
-
-
+	
+	
 	@Override
 	public boolean canCompute() throws Exception {
-		if(userName == null)	{
+		if (userName == null) {
 			Log.severe("Project.canCompute(): can not compute with missing name.");
 			return false;
 		}
-
-		if(this.needToBuild == true && (pSrcDirectory == null || pImportModuleName == null))	{
+		
+		if (this.needToBuild == true && (pSrcDirectory == null || pImportModuleName == null)) {
 			Log.severe("Project.canCompute(): the project needs to build but source directory or import module name is missing.");
 			return false;
 		}
 		return true;
 	}
-
+	
 	/**
 	 * flag the project to be rebuild with the Import module
 	 */
 	public void setNeedToBuild() {
 		needToBuild = true;
 	}
-
-
+	
+	
 	@Override
 	protected boolean _compute() throws Exception {
-
+		
 		// build the main corpus, texts, editions, etc.
-		if(this.needToBuild)	{
-
-			//		if (pImportXMLParameters != null) {
-			//			pImportXMLParameters.load();
-			//			this._load(pImportXMLParameters.name);
-			//			// convert to new preferences persistence
-			//		}
-
-			//FIXME if the corpus name change, the TXMResults node path become wrong
-			//			if (!rcpProject.getName().equals(userName)) { // project directory and project name must stay in sync
-			//				IPath destination = new Path(this.getName());
-			//				if (destination.toFile().exists()) {
-			//					System.out.println("Error: could not rename project since one already existing with the same new name="+this.getName());
-			//					return false;
-			//				}
-			//				rcpProject.move(destination, true, null);
-			//			}
-
+		if (this.needToBuild) {
+			
+			// if (pImportXMLParameters != null) {
+			// pImportXMLParameters.load();
+			// this._load(pImportXMLParameters.name);
+			// // convert to new preferences persistence
+			// }
+			
+			// FIXME if the corpus name change, the TXMResults node path become wrong
+			// if (!rcpProject.getName().equals(userName)) { // project directory and project name must stay in sync
+			// IPath destination = new Path(this.getName());
+			// if (destination.toFile().exists()) {
+			// System.out.println("Error: could not rename project since one already existing with the same new name="+this.getName());
+			// return false;
+			// }
+			// rcpProject.move(destination, true, null);
+			// }
+			
 			ImportEngines engines = Toolbox.getImportEngines();
-
-			//File scriptfile = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/org/txm/scripts/importer/"+importName+"/"+importName+"Loader.groovy"); //$NON-NLS-1$
+			
+			// File scriptfile = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/org/txm/scripts/importer/"+importName+"/"+importName+"Loader.groovy"); //$NON-NLS-1$
 			ImportEngine engine = engines.getEngine(getImportModuleName());
 			if (engine == null) {
-				//			
-				//			engine = new ScriptedImportEngine(scriptfile) {
-				//				@Override
-				//				public boolean build(Project project, IProgressMonitor monitor) {
-				//					// TODO Auto-generated method stub
-				//					return false;
-				//				}
-				//			};
-				//Log.severe("Project._compute(): Import engine not found.");
-
+				//
+				// engine = new ScriptedImportEngine(scriptfile) {
+				// @Override
+				// public boolean build(Project project, IProgressMonitor monitor) {
+				// // TODO Auto-generated method stub
+				// return false;
+				// }
+				// };
+				// Log.severe("Project._compute(): Import engine not found.");
+				
 				// no import set
 				return true;
 			}
-
+			
 			if (monitor == null || monitor.isCanceled()) {
-				monitor = new LogMonitor("computing "+this);
+				monitor = new LogMonitor("computing " + this);
 			}
-
+			
 			Log.finest("RUNNING IMPORT MODULE WITH NAME = " + getImportModuleName());
-
+			
 			boolean state = engine.build(this, monitor).isOK();
-			if (state == true)	{
+			if (state == true) {
 				this.needToBuild = false;
 				// This step could be done only if the compiler step if done and only if it modifying/deleting the corpus builds
 				for (CorpusBuild corpus : getCorpusBuilds()) {
 					if (corpus != null) {
-					//	corpus.compute(false);
+						// corpus.compute(false);
 					}
 				}
-			} else { // import failed
+			}
+			else { // import failed
 				for (CorpusBuild corpus : getCorpusBuilds()) { // Cleaning eventual broken corpus
 					if (corpus != null) {
 						corpus.delete();
@@ -394,10 +398,10 @@
 				}
 			}
 			return state;
-
+			
 		}
 		// Nothing to do if the project does not need to build
-		else	{
+		else {
 			return true;
 		}
 	}
@@ -413,36 +417,36 @@
 			String n = this.getName();
 			this.rcpProject = rcpWorkspace.getRoot().getProject(n);
 		}
-
+		
 		if (!rcpProject.exists()) {
 			createRCPProject();
 		}
-
-//		if (!rcpProject.isOpen()) {
-//			try {
-//				rcpProject.open(monitor);
-//			} catch (Exception e) {
-//				System.out.println("Warning: restoring corpus project files: "+e);
-////				rcpProject.delete(true, monitor);
-////				createRCPProject();
-//			}
-//		}
+		
+		// if (!rcpProject.isOpen()) {
+		// try {
+		// rcpProject.open(monitor);
+		// } catch (Exception e) {
+		// System.out.println("Warning: restoring corpus project files: "+e);
+		//// rcpProject.delete(true, monitor);
+		//// createRCPProject();
+		// }
+		// }
 		if (isOpen()) {
 			this.preferenceScope = new ProjectScope(rcpProject);
 		}
 	}
-
+	
 	private void createRCPProject() throws CoreException {
 		
 		IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription(rcpProject.getName());
 		IFolder folder = Workspace.getInstance().corporaProject.getFolder(rcpProject.getName());
 		
 		description.setLocation(folder.getLocation());
-		description.setNatureIds(new String[] {TXMCORPUSNATURE});
+		description.setNatureIds(new String[] { TXMCORPUSNATURE });
 		
 		rcpProject.create(description, monitor);
 		rcpProject.open(monitor);
-		//TODO might fail if corpus source directory changed
+		// TODO might fail if corpus source directory changed
 		IFolder srcFolder = rcpProject.getFolder("src");
 		if (pSrcDirectory != null && !pSrcDirectory.getName().isEmpty()) {
 			IPath path = new Path(pSrcDirectory.getAbsolutePath());
@@ -451,55 +455,55 @@
 			}
 		}
 	}
-
+	
 	/**
 	 * Loads and creates the persisted results from the preferences service.
 	 */
-	public void loadResults(Class clazz)	{
-
+	public void loadResults(Class clazz) {
+		
 		Log.finest("*** Project.loadResults(): reloading project persitent results...");
-
+		
 		ArrayList<String> resultNodePaths = TXMPreferences.getAllResultsNodePaths(this.getParametersNodeRootPath());
-
+		
 		Log.fine("Loading " + resultNodePaths.size() + " result(s) from project " + this.getName() + "...");
-
-		//TXMPreferences.dump();
-
-		HashMap<String, TXMResult> loaded = new HashMap<String, TXMResult>();
-		ArrayList<String> errors = new ArrayList<String>();
+		
+		// TXMPreferences.dump();
+		
+		HashMap<String, TXMResult> loaded = new HashMap<>();
+		ArrayList<String> errors = new ArrayList<>();
 		for (String resultNodePath : resultNodePaths) {
-
+			
 			try {
 				Preferences node = TXMPreferences.preferencesRootNode.node(resultNodePath);
-
+				
 				String className = node.get("class", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
+				
 				// Skip Project object
-				if (Project.class.getName().equals(className))	{ // already loaded in loadProjectFromProjectScope
+				if (Project.class.getName().equals(className)) { // already loaded in loadProjectFromProjectScope
 					continue;
 				}
-
+				
 				if (className == null || className.length() == 0) {
 					errors.add(NLS.bind("Warning: can not restore object with no class name set with path={0}.", resultNodePath)); //$NON-NLS-1$
 					node.removeNode();
 					continue;
 				}
-
+				
 				if (clazz != null && !clazz.getName().equals(className)) {
 					continue; // only load the result of class=clazz
 				}
-
+				
 				Log.fine("\nProject.loadResults(): loading from result node qualifier " + resultNodePath);
-				//Log.finest("Toolbox.initialize(): class = " + TXMPreferences.getString("class", nodeQualifier));
-				//TXMPreferences.dump();
+				// Log.finest("Toolbox.initialize(): class = " + TXMPreferences.getString("class", nodeQualifier));
+				// TXMPreferences.dump();
 				
-//				//TODO see if necessary to prevent errors
-//				TXMResult result2 = TXMResult.getResult(this, resultNodePath);
-//				if (result2 != null) { // result already restored
-//					continue;
-//				}
+				// //TODO see if necessary to prevent errors
+				// TXMResult result2 = TXMResult.getResult(this, resultNodePath);
+				// if (result2 != null) { // result already restored
+				// continue;
+				// }
 				Log.fine("Project.loadResults(): class = " + className); //$NON-NLS-1$
-				//					Log.finest("Toolbox.initialize(): parent_uuid = " + TXMPreferences.getString(TXMPreferences.PARENT_UUID, nodeQualifier));
+				// Log.finest("Toolbox.initialize(): parent_uuid = " + TXMPreferences.getString(TXMPreferences.PARENT_UUID, nodeQualifier));
 				Log.fine("Project.loadResults(): parent_uuid = " + node.get(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, "")); //$NON-NLS-1$
 				String bundleId = node.get(TXMPreferences.BUNDLE_ID, ""); //$NON-NLS-1$
 				if (bundleId == null || bundleId.length() == 0) {
@@ -514,92 +518,95 @@
 					node.removeNode();
 					continue;
 				}
-
+				
 				Class<?> cl = bundle.loadClass(className);
 				
-//				TXMResult parent = loaded.get(node.get(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, null));
-//				TXMResult result = null;
-//				if (parent == null) {
-					Constructor<?> cons = cl.getConstructor(String.class);
-					TXMResult result = (TXMResult) cons.newInstance(resultNodePath);
-//				} else {
-//					Constructor<?> cons = cl.getConstructor(String.class, TXMResult.class);
-//					result = (TXMResult) cons.newInstance(resultNodePath, parent);
-//				}
+				// TXMResult parent = loaded.get(node.get(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, null));
+				// TXMResult result = null;
+				// if (parent == null) {
+				Constructor<?> cons = cl.getConstructor(String.class);
+				TXMResult result = (TXMResult) cons.newInstance(resultNodePath);
+				// } else {
+				// Constructor<?> cons = cl.getConstructor(String.class, TXMResult.class);
+				// result = (TXMResult) cons.newInstance(resultNodePath, parent);
+				// }
 				loaded.put(resultNodePath, result);
+				
 				// not an internal persistence (eg. corpus or partition)
-				if (!result.isInternalPersistable())	{
-					result.setUserPersistable(true);	
+				if (!result.isInternalPersistable()) {
+					result.setUserPersistable(true, false);
 				}
-			} catch (Exception e) {
+				
+			}
+			catch (Exception e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
 		}
 		if (errors.size() > 0) {
-			for (int i = 0 ; i < 20 && i < errors.size() ; i++) {
+			for (int i = 0; i < 20 && i < errors.size(); i++) {
 				Log.fine(errors.get(i));
 			}
 			if (errors.size() > 20) {
-				Log.fine("more: "+(errors.size()-20)+"...");
+				Log.fine("more: " + (errors.size() - 20) + "...");
 			}
 		}
-
-		//		// load the corpus builds
-		//		for (CorpusBuild corpus : getCorpusBuilds()) {
-		//			if (corpus != null) {
-		//				corpus.compute(false);
-		//			}
-		//		}
+		
+		// // load the corpus builds
+		// for (CorpusBuild corpus : getCorpusBuilds()) {
+		// if (corpus != null) {
+		// corpus.compute(false);
+		// }
+		// }
 	}
-
-	//	public BasePreferenceScope getPreferenceScope() {
-	//		return scope;
-	//	}
-
-	//	/* (non-Javadoc)
-	//	 * @see org.txm.objects.TxmObject#save()
-	//	 */
-	//	@Override
-	//	protected boolean _save() {
-	//		//System.out.println("SAVE BASE: "+params.root+" "+params.paramFile);
-	//		try {
-	//			// Création de la source DOM
-	//			Source source = new DOMSource(params.root);
+	
+	// public BasePreferenceScope getPreferenceScope() {
+	// return scope;
+	// }
+	
+	// /* (non-Javadoc)
+	// * @see org.txm.objects.TxmObject#save()
+	// */
+	// @Override
+	// protected boolean _save() {
+	// //System.out.println("SAVE BASE: "+params.root+" "+params.paramFile);
+	// try {
+	// // Création de la source DOM
+	// Source source = new DOMSource(params.root);
 	//
-	//			// Création du fichier de sortie
-	//			Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(params.paramFile), "UTF-8")); //$NON-NLS-1$
-	//			Result resultat = new StreamResult(writer);
+	// // Création du fichier de sortie
+	// Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(params.paramFile), "UTF-8")); //$NON-NLS-1$
+	// Result resultat = new StreamResult(writer);
 	//
-	//			// Configuration du transformer
-	//			TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl();
-	//			Transformer transformer = fabrique.newTransformer();
-	//			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
-	//			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
-	//			
-	//			// Transformation
-	//			transformer.transform(source, resultat);
-	//			writer.close();
-	//		} catch (Exception e) {
-	//			e.printStackTrace();
-	//			Log.severe("Error while saving corpus parameters: "+e.getLocalizedMessage());
-	//			return false;
-	//		}
-	//		return true;
-	//	}
-
+	// // Configuration du transformer
+	// TransformerFactory fabrique = new net.sf.saxon.TransformerFactoryImpl();
+	// Transformer transformer = fabrique.newTransformer();
+	// transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
+	// transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
+	//
+	// // Transformation
+	// transformer.transform(source, resultat);
+	// writer.close();
+	// } catch (Exception e) {
+	// e.printStackTrace();
+	// Log.severe("Error while saving corpus parameters: "+e.getLocalizedMessage());
+	// return false;
+	// }
+	// return true;
+	// }
+	
 	/**
 	 * Retro compatibility method for import.xml files.
 	 * 
 	 * @return
-	 * @throws IOException 
-	 * @throws SAXException 
-	 * @throws ParserConfigurationException 
+	 * @throws IOException
+	 * @throws SAXException
+	 * @throws ParserConfigurationException
 	 */
 	public boolean _load(BaseOldParameters params) throws Exception {
 		params.load();
 		userName = params.name;
-
+		
 		// set the improt module name using the Loader script name
 		this.pImportModuleName = params.scriptFile;
 		if (this.pImportModuleName != null) {
@@ -608,28 +615,29 @@
 				this.pImportModuleName = this.pImportModuleName.substring(0, idx);
 				idx = this.pImportModuleName.lastIndexOf("/");
 				if (idx > 0 && this.pImportModuleName.length() > idx) {
-					this.pImportModuleName = this.pImportModuleName.substring(idx+1);
+					this.pImportModuleName = this.pImportModuleName.substring(idx + 1);
 				}
 			}
-		} else {
+		}
+		else {
 			this.pImportModuleName = "xtz";
 		}
-
+		
 		this.pSrcDirectory = params.paramFile.getParentFile();
 		if (pSrcDirectory == null) {
 			pSrcDirectory = new File(getProjectDirectory(), "src");
 		}
-
+		
 		File dir = new File(this.getWorkspace().getLocation(), userName);
 		File paramFile = new File(dir, "import.xml");
 		if (!paramFile.exists()) return false;
-
-
+		
+		
 		// get Alignements
-		//System.out.println("Load alignement from params: "+params.links);
+		// System.out.println("Load alignement from params: "+params.links);
 		for (String alignname : params.links.keySet()) {
 			Element link = params.links.get(alignname);
-
+			
 			String target = link.getAttribute("target"); //$NON-NLS-1$
 			String[] split = target.split("#"); //$NON-NLS-1$
 			if (split.length != 3) {
@@ -638,20 +646,20 @@
 			}
 			String from = split[1].trim();
 			String to = split[2].trim();
-
-			Alignement align = new Alignement(this, from, to, 
+			
+			Alignement align = new Alignement(this, from, to,
 					link.getAttribute("alignElement"), Integer.parseInt(link.getAttribute("alignLevel"))); //$NON-NLS-1$ //$NON-NLS-2$
-			links.put("#"+from+" #"+to, align); //$NON-NLS-1$ //$NON-NLS-2$
-
-			align = new Alignement(this, to, from, 
+			links.put("#" + from + " #" + to, align); //$NON-NLS-1$ //$NON-NLS-2$
+			
+			align = new Alignement(this, to, from,
 					link.getAttribute("alignElement"), Integer.parseInt(link.getAttribute("alignLevel"))); //$NON-NLS-1$ //$NON-NLS-2$
-			links.put("#"+to+" #"+from, align); //$NON-NLS-1$ //$NON-NLS-2$
+			links.put("#" + to + " #" + from, align); //$NON-NLS-1$ //$NON-NLS-2$
 		}
-
+		
 		return true;
 	}
-
-
+	
+	
 	/**
 	 * Gets the text.
 	 *
@@ -666,7 +674,7 @@
 		}
 		return null;
 	}
-
+	
 	/**
 	 * Gets the texts.
 	 *
@@ -676,7 +684,7 @@
 	public List<Text> getTexts() {
 		return (List<Text>) getChildren(Text.class);
 	}
-
+	
 	/**
 	 * Gets the texts id.
 	 *
@@ -689,7 +697,7 @@
 		}
 		return ids;
 	}
-
+	
 	/**
 	 * Gets the next text.
 	 *
@@ -704,10 +712,10 @@
 				return texts.get(idx);
 			}
 		}
-
+		
 		return t;
 	}
-
+	
 	/**
 	 * Gets the previous text.
 	 *
@@ -717,15 +725,15 @@
 	public Text getPreviousText(Text t) {
 		List<Text> texts = getTexts();
 		if (texts.size() > 0) {
-			int idx = texts.indexOf(t) -1 ;
+			int idx = texts.indexOf(t) - 1;
 			if (idx >= 0) {
 				return texts.get(idx);
 			}
 		}
-
+		
 		return t;
 	}
-
+	
 	/**
 	 * Gets the last text.
 	 *
@@ -734,10 +742,10 @@
 	public Text getLastText() {
 		List<Text> texts = getTexts();
 		if (texts.size() > 0) return texts.get(texts.size() - 1);
-
+		
 		return null;
 	}
-
+	
 	/**
 	 * Gets the first text.
 	 *
@@ -746,52 +754,53 @@
 	public Text getFirstText() {
 		List<Text> texts = getTexts();
 		if (texts.size() > 0) return texts.get(0);
-
+		
 		return null;
 	}
-
-
+	
+	
 	public boolean hasEditions() {
 		return pDefaultEditionName != null;
 	}
-
+	
 	public String getDefaultEdition() {
 		return pDefaultEditionName;
 	}
-
+	
 	public List<String> getEditionNames() {
 		IEclipsePreferences node = this.getPreferencesScope().getNode(EditionDefinition.class.getSimpleName());
 		try {
 			return Arrays.asList(node.childrenNames());
-		} catch (BackingStoreException e) {
+		}
+		catch (BackingStoreException e) {
 			Log.printStackTrace(e);
 		}
-
-		return new ArrayList<String>();
+		
+		return new ArrayList<>();
 	}
-
+	
 	/**
 	 * @return the defaultEditionName
 	 */
 	public String getDefaultEditionName() {
 		return pDefaultEditionName;
 	}
-
+	
 	/**
 	 * @param defaultEditionName the defaultEditionName to set
 	 */
 	public void setDefaultEditionName(String defaultEditionName) {
 		this.pDefaultEditionName = defaultEditionName;
 	}
-
+	
 	public Workspace getWorkspace() {
 		return (Workspace) getParent();
 	}
-
+	
 	public boolean export(File exportzip) {
 		return export(exportzip, null);
 	}
-
+	
 	/**
 	 * Export.
 	 *
@@ -800,25 +809,27 @@
 	 */
 	public boolean export(File exportzip, IProgressMonitor monitor) {
 		File binarydir = this.getProjectDirectory();
-
+		
 		if (binarydir.exists() && exportzip.getParentFile().exists()) {
 			this.save();
-
+			
 			try {
 				Zip.compress(binarydir, exportzip, monitor);
-			} catch (IOException e) {
+			}
+			catch (IOException e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 				return false;
 			}
 			return true;
-		} else {
+		}
+		else {
 			System.out.println(NLS.bind(TXMCoreMessages.binaryDirectoryP0NotFound, binarydir));
 			System.out.println(NLS.bind(TXMCoreMessages.parentDirectoryP0NotFound, exportzip.getParentFile()));
-
+			
 		}
 		return false;
 	}
-
+	
 	/**
 	 * Gets the base directory.
 	 *
@@ -826,63 +837,63 @@
 	 */
 	public File getProjectDirectory() {
 		if (this.rcpProject == null || this.rcpProject.getLocation() == null) {
-			return new File(Toolbox.workspace.getLocation(), "corpora/"+this.userName);
+			return new File(Toolbox.workspace.getLocation(), "corpora/" + this.userName);
 		}
 		return this.rcpProject.getLocation().toFile();
 	}
-
+	
 	public HashMap<String, Alignement> getLinks() {
 		return links;
 	}
-
+	
 	public ArrayList<Alignement> getLinksFrom(String from) {
-		ArrayList<Alignement> rez = new ArrayList<Alignement>();
-		for(String key : links.keySet())
-			if(key.startsWith("#"+from+" ")) //$NON-NLS-1$ //$NON-NLS-2$
+		ArrayList<Alignement> rez = new ArrayList<>();
+		for (String key : links.keySet())
+			if (key.startsWith("#" + from + " ")) //$NON-NLS-1$ //$NON-NLS-2$
 				rez.add(links.get(key));
 		return rez;
 	}
-
+	
 	public ArrayList<Alignement> getLinksTo(String to) {
-		ArrayList<Alignement> rez = new ArrayList<Alignement>();
-		for(String key : links.keySet())
-			if(key.endsWith(" #"+to)) //$NON-NLS-1$
+		ArrayList<Alignement> rez = new ArrayList<>();
+		for (String key : links.keySet())
+			if (key.endsWith(" #" + to)) //$NON-NLS-1$
 				rez.add(links.get(key));
 		return rez;
 	}
-
+	
 	public Alignement getLink(String from, String to) {
-		return links.get("#"+from+" #"+to ); //$NON-NLS-1$ //$NON-NLS-2$
+		return links.get("#" + from + " #" + to); //$NON-NLS-1$ //$NON-NLS-2$
 	}
-
+	
 	@Override
 	public boolean saveParameters() throws Exception {
 		StringBuilder str = new StringBuilder();
 		if (links != null) {
 			for (String l : links.keySet()) {
 				Alignement a = links.get(l);
-				str.append("\t"+a.from+"#"+a.to+"#"+a.struct+"#"+a.level);
+				str.append("\t" + a.from + "#" + a.to + "#" + a.struct + "#" + a.level);
 			}
 			if (str.length() > 0) {
 				this.setParameter(TBXPreferences.LINKS, str.substring(1));
 			}
 		}
-
+		
 		if (this.pSrcDirectory != null) {
 			this.saveParameter(TBXPreferences.SOURCE, pSrcDirectory.getAbsolutePath());
 		}
-
+		
 		return true;
 	}
-
+	
 	@Override
 	public boolean loadParameters() throws Exception {
-
+		
 		String path = this.getStringParameterValue(TBXPreferences.SOURCE);
 		if (path != null && path.length() > 0) {
 			this.pSrcDirectory = new File(path);
 		}
-
+		
 		String linksString = this.getStringParameterValue(TBXPreferences.LINKS);
 		if (linksString != null && !linksString.isEmpty()) {
 			String split[] = linksString.split("\t");
@@ -891,80 +902,81 @@
 				new Alignement(this, split2[0], split2[1], split2[2], Integer.parseInt(split2[3]));
 			}
 		}
-
-		//		String xsltParamteresString = this.getStringParameterValue(TBXPreferences.FRONT_XSL_PARAMETERS);
-		//		if (xsltParamteresString != null && !xsltParamteresString.isEmpty()) {
-		//			String[] split = xsltParamteresString.split("\t");
-		//			for (String s: split) {
-		//				String split2 [] = s.split("=", 2);
-		//				pXsltParameters.put(split2[0], split2[1]);
-		//			}
-		//		}
-
+		
+		// String xsltParamteresString = this.getStringParameterValue(TBXPreferences.FRONT_XSL_PARAMETERS);
+		// if (xsltParamteresString != null && !xsltParamteresString.isEmpty()) {
+		// String[] split = xsltParamteresString.split("\t");
+		// for (String s: split) {
+		// String split2 [] = s.split("=", 2);
+		// pXsltParameters.put(split2[0], split2[1]);
+		// }
+		// }
+		
 		return true;
 	}
-
+	
 	@Override
 	public boolean setParameters(TXMParameters parameters) throws Exception {
 		return false;
 	}
-
+	
 	@Override
 	public String getName() {
 		return userName;
 	}
-
+	
 	@Override
 	public String getSimpleName() {
 		return userName;
 	}
-
+	
 	@Override
 	public String getDetails() {
 		return userName;
 	}
-
+	
 	@Override
 	public void clean() {
 		if (rcpProject != null) {
 			try {
-				//Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP").stop(); //$NON-NLS-1$
-
-				rcpProject.delete(true, new LogMonitor("Cleaning "+this));
-
-
-				//Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP").start(null); //$NON-NLS-1$
-
-			} catch (Exception e) {
+				// Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP").stop(); //$NON-NLS-1$
+				
+				rcpProject.delete(true, new LogMonitor("Cleaning " + this));
+				
+				
+				// Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP").start(null); //$NON-NLS-1$
+				
+			}
+			catch (Exception e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
 		}
-
+		
 		Toolbox.notifyEngines(this, "clean");
-		//DeleteDir.deleteDirectory(getProjectDirectory());
+		// DeleteDir.deleteDirectory(getProjectDirectory());
 	}
-
+	
 	public void setName(String name) {
 		this.userName = name;
 	}
-
-
-
+	
+	
+	
 	@Override
 	public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception {
 		return false;
 	}
-
+	
 	@Override
 	public String getResultType() {
 		return "Project";
 	}
-
+	
 	public String getImportModuleName() {
 		return pImportModuleName;
 	}
-
+	
 	/**
 	 * Gets the encoding.
 	 *
@@ -973,7 +985,7 @@
 	public String getEncoding() {
 		return pEncoding;
 	}
-
+	
 	/**
 	 * Gets the lang.
 	 *
@@ -982,7 +994,7 @@
 	public String getLang() {
 		return pLanguage;
 	}
-
+	
 	/**
 	 * Gets the srcdir.
 	 *
@@ -991,7 +1003,7 @@
 	public File getSrcdir() {
 		return pSrcDirectory;
 	}
-
+	
 	/**
 	 * Gets the author.
 	 *
@@ -1000,7 +1012,7 @@
 	public String getAuthor() {
 		return pAuthor;
 	}
-
+	
 	/**
 	 * Gets the description.
 	 *
@@ -1009,7 +1021,7 @@
 	public String getDescription() {
 		return this.pDescription;
 	}
-
+	
 	/**
 	 * Gets the description.
 	 *
@@ -1018,37 +1030,37 @@
 	public void setDescription(String desc) {
 		this.pDescription = desc;
 	}
-
+	
 	/**
 	 * @return the font
 	 */
 	public String getFont() {
 		return pFont;
 	}
-
+	
 	/**
 	 * @param font the font to set
 	 */
 	public void setFont(String font) {
 		this.pFont = font;
 	}
-
+	
 	public void setLang(String lang) {
 		this.pLanguage = lang;
 	}
-
+	
 	public void setEncoding(String encoding) {
 		this.pEncoding = encoding;
 	}
-
+	
 	public void setSourceDirectory(String sourcePath) {
 		this.pSrcDirectory = new File(sourcePath);
 	}
-
+	
 	public void setXsltParameter(String name, String value) {
 		this.getPreferencesScope().getNode("xsl").node(TBXPreferences.FRONT_XSL_PARAMETERS).put(name, value);
 	}
-
+	
 	public HashMap<String, String> getXsltParameters() {
 		Preferences params = this.getPreferencesScope().getNode("xsl").node(TBXPreferences.FRONT_XSL_PARAMETERS);
 		HashMap<String, String> hparams = new HashMap<>();
@@ -1056,85 +1068,87 @@
 			for (String k : params.childrenNames()) {
 				hparams.put(k, params.get(k, null));
 			}
-		} catch (BackingStoreException e) {
+		}
+		catch (BackingStoreException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
 		return hparams;
 	}
-
+	
 	public void removeXsltParameter(String name) {
 		this.getPreferencesScope().getNode("xsl").node(TBXPreferences.FRONT_XSL_PARAMETERS).remove(name);
 	}
-
+	
 	public String getFrontXSL() {
 		return this.getPreferencesScope().getNode("xsl").get(TBXPreferences.FRONT_XSL, null);
 	}
-
+	
 	public void setXslt(String xslpath) {
 		this.getPreferencesScope().getNode("xsl").put(TBXPreferences.FRONT_XSL, xslpath);
 	}
-
+	
 	public void setAnnotate(boolean b) {
 		this.pAnnotate = b;
 	}
-
+	
 	public Boolean getAnnotate() {
 		return pAnnotate;
 	}
-
+	
 	public void setCleanAfterBuild(boolean clean) {
 		this.pCleanAfterBuild = clean;
 	}
-
+	
 	public Boolean getCleanAfterBuild() {
 		return this.pCleanAfterBuild;
 	}
-
+	
 	public void addTokenizerParameter(String name, String value) {
 		IEclipsePreferences params = this.getPreferencesScope().getNode("Tokenizer");
 		params.put(name, value);
 	}
-
+	
 	public String getTokenizerParameter(String name, String defaultvalue) {
 		IEclipsePreferences params = this.getPreferencesScope().getNode("Tokenizer");
 		return params.get(name, defaultvalue);
 	}
-
+	
 	public String[] getTextualPlans() {
 		try {
 			return this.getPreferencesScope().getNode("TextualPlans").childrenNames();
-		} catch (BackingStoreException e) {
+		}
+		catch (BackingStoreException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
 		return new String[0];
 	}
-
+	
 	public String getTextualPlan(String name) {
 		return this.getPreferencesScope().getNode("TextualPlans").get(name, "");
 	}
-
+	
 	public void setTextualPlan(String name, String elements) {
 		this.getPreferencesScope().getNode("TextualPlans").put(name, elements);
 	}
-
+	
 	public String getTokenizerWordElement() {
 		IEclipsePreferences params = this.getPreferencesScope().getNode("Tokenizer");
 		return params.get("word_tags", "w");
 	}
-
+	
 	public boolean getDoTokenizerStep() {
 		IEclipsePreferences params = this.getPreferencesScope().getNode("Tokenizer");
 		return params.getBoolean("doTokenizeStep", true);
 	}
-
+	
 	public EditionDefinition getEditionDefinition(String name) {
 		return new EditionDefinition(this, name);
 	}
 	
 	public ArrayList<EditionDefinition> getEditionDefinitions() {
-		ArrayList<EditionDefinition> editions = new ArrayList<EditionDefinition>();
+		ArrayList<EditionDefinition> editions = new ArrayList<>();
 		IEclipsePreferences editionNode = this.getPreferencesScope().getNode(EditionDefinition.class.getSimpleName());
 		try {
 			for (String editionName : editionNode.childrenNames()) {
@@ -1142,7 +1156,8 @@
 					editions.add(getEditionDefinition(editionName));
 				}
 			}
-		} catch (BackingStoreException e) {
+		}
+		catch (BackingStoreException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
@@ -1152,11 +1167,11 @@
 	public CorpusCommandPreferences getCommandPreferences(String name) {
 		return new CorpusCommandPreferences(this, name);
 	}
-
+	
 	public ProjectScope getPreferencesScope() {
 		return this.preferenceScope;
 	}
-
+	
 	public CorpusBuild getCorpusBuild(String id) {
 		return getCorpusBuild(id, null);
 	}
@@ -1168,36 +1183,39 @@
 	 * @return
 	 */
 	public CorpusBuild getCorpusBuild(String id, Class<? extends CorpusBuild> clazz) {
-//		System.out.println("CLASS="+clazz);
+		// System.out.println("CLASS="+clazz);
 		List<CorpusBuild> builds = getCorpusBuilds();
-//		System.out.println("BUILDS="+builds);
+		// System.out.println("BUILDS="+builds);
 		for (CorpusBuild build : builds) {
 			if (id == null) {
 				if (clazz == null) {
 					return build;
-				} else if (build.getClass().equals(clazz) ) {
+				}
+				else if (build.getClass().equals(clazz)) {
 					return build;
 				}
-			} else if (id.equals(build.getID())) {
+			}
+			else if (id.equals(build.getID())) {
 				if (clazz == null) {
 					return build;
-				} else if (build.getClass().equals(clazz)) {
+				}
+				else if (build.getClass().equals(clazz)) {
 					return build;
 				}
 			}
 		}
 		return null;
 	}
-
+	
 	@SuppressWarnings("unchecked")
 	private List<CorpusBuild> getCorpusBuilds() {
 		return (List<CorpusBuild>) getChildren(CorpusBuild.class);
 	}
-
+	
 	public void setImportModuleName(String name) {
 		this.pImportModuleName = name;
 	}
-
+	
 	/**
 	 * Checks if the edition specified by its name exists in the project.
 	 * 
@@ -1208,22 +1226,23 @@
 	public boolean hasEditionDefinition(String name) {
 		try {
 			return getPreferencesScope().getNode("EditionDefinition").nodeExists(name);
-		} catch (BackingStoreException e) {
+		}
+		catch (BackingStoreException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 			return false;
 		}
 	}
-
+	
 	/**
 	 * Gets the project parameters root node path ("/project/[project name]/")
 	 * 
 	 * @return the project parameters root node path
 	 */
-	public String getParametersNodeRootPath()	{
+	public String getParametersNodeRootPath() {
 		return "/project/" + this.rcpProject.getName() + "/";
 	}
-
+	
 	/**
 	 * Gets a list of all the root corpus in the project.
 	 * 
@@ -1233,97 +1252,98 @@
 		ArrayList<CorpusBuild> l = new ArrayList<>();
 		for (TXMResult r : this.getChildren()) {
 			if (r instanceof CorpusBuild) {
-				l.add((CorpusBuild)r);
+				l.add((CorpusBuild) r);
 			}
 		}
 		return l;
 	}
-
+	
 	public boolean getDoUpdate() {
 		return this.getPreferencesScope().getNode("import").getBoolean(ImportKeys.UPDATECORPUS, false);
 	}
-
+	
 	public void setDoUpdate(boolean update) {
 		this.getPreferencesScope().getNode("import").putBoolean(ImportKeys.UPDATECORPUS, update);
 	}
-
+	
 	public boolean getDoMultiThread() {
 		return this.getPreferencesScope().getNode("import").getBoolean(ImportKeys.MULTITHREAD, false);
 	}
-
+	
 	public void setDoMultiThread(boolean multithreaded) {
 		this.getPreferencesScope().getNode("import").putBoolean(ImportKeys.MULTITHREAD, multithreaded);
 	}
-
+	
 	/**
 	 * 
 	 * @param rcpProject
 	 * @return true if a Project has been found
 	 */
 	public static Project loadProjectFromProjectScope(IProject rcpProject) {
-
+		
 		ArrayList<String> resultNodePaths = TXMPreferences.getAllResultsNodePaths("/project/" + rcpProject.getName() + "/"); //$NON-NLS-1$ //$NON-NLS-2$
-
+		
 		Log.fine("Toolbox.initialize(): loading project " + rcpProject.getName() + "..."); //$NON-NLS-1$ //$NON-NLS-2$
 		Log.fine("Toolbox.initialize(): " + resultNodePaths.size() + " node(s) found in project " + rcpProject.getName() + "..."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
+		
 		for (String parametersNodePath : resultNodePaths) {
-
+			
 			// FIXME: useless?
 			// skip non-TXMResult preference node
-			//			if (TXMPreferences.getString(TXMPreferences.BUNDLE_ID, nodeQualifier).isEmpty())	{
-			//				continue;
-			//			}
-
+			// if (TXMPreferences.getString(TXMPreferences.BUNDLE_ID, nodeQualifier).isEmpty()) {
+			// continue;
+			// }
+			
 			try {
-
-				//Log.finest("Toolbox.initialize(): checking result type linked to node path " + parametersNodePath);
-
+				
+				// Log.finest("Toolbox.initialize(): checking result type linked to node path " + parametersNodePath);
+				
 				Preferences node = TXMPreferences.preferencesRootNode.node(parametersNodePath);
 				String className = node.get("class", ""); //$NON-NLS-1$
-
+				
 				if (className == null || className.length() == 0) {
 					Log.warning(NLS.bind("Warning: can not restore object with no class name set with path={0}.", parametersNodePath)); //$NON-NLS-1$
 					node.removeNode();
 					continue;
 				}
-
-				if (!className.equals(Project.class.getName()))	{ // only load the Project class
+				
+				if (!className.equals(Project.class.getName())) { // only load the Project class
 					continue;
 				}
-
+				
 				Log.fine("Toolbox.initialize(): loading from result node path " + parametersNodePath);
 				Log.finest("Toolbox.initialize(): parent_uuid = " + node.get(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, ""));  //$NON-NLS-1$ //$NON-NLS-2$
-
+				
 				String bundleId = node.get(TXMPreferences.BUNDLE_ID, ""); //$NON-NLS-1$
 				Log.finest("Toolbox.initialize(): bundle_id = " + bundleId); //$NON-NLS-1$
-
+				
 				Bundle bundle = Platform.getBundle(bundleId);
 				if (bundle == null) {
 					Log.finest("Warning: can not restore object with bundle name " + bundleId); //$NON-NLS-1$
 					node.removeNode();
 					continue;
 				}
-
+				
 				Log.fine("Toolbox.initialize(): creating TXM corpus project " + rcpProject.getName() + "."); //$NON-NLS-1$ //$NON-NLS-2$
 				Class<?> cl = bundle.loadClass(className);
 				Constructor<?> cons = cl.getConstructor(String.class);
 				TXMResult result = (TXMResult) cons.newInstance(parametersNodePath);
-
+				
 				// not an internal persistence (eg. corpus or partition)
-				if (!result.isInternalPersistable())	{
-					result.setUserPersistable(true);	
+				if (!result.isInternalPersistable()) {
+					result.setUserPersistable(true);
 				}
-
-				return (Project)result; // only one Project.class loaded per RCP project
-			} catch (Exception e) {
+				
+				return (Project) result; // only one Project.class loaded per RCP project
+			}
+			catch (Exception e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
 		}
 		return null;
 	}
-
+	
 	/**
 	 * Stores parameters of all the Project and all its results in nodes and saves them in the properties files.
 	 * 
@@ -1333,28 +1353,29 @@
 		try {
 			ProjectScope scope = this.getPreferencesScope();
 			scope.getNode("").flush(); //$NON-NLS-1$
-
+			
 			autoSaveParametersFromAnnotations();
 			saveParameters();
-
+			
 			List<TXMResult> results = this.getDeepChildren();
 			for (int i = 0; i < results.size(); i++) {
 				TXMResult r = results.get(i);
-				if (r.mustBePersisted())	{ 
+				if (r.mustBePersisted()) {
 					r.autoSaveParametersFromAnnotations();
 					r.saveParameters();
 					TXMPreferences.flush(r);
 				}
 			}
-
+			
 			Toolbox.notifyEngines(this, "save"); // save things before exporting or else
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			e.printStackTrace();
 			return false;
 		}
 		return true;
 	}
-
+	
 	/**
 	 * 
 	 * @return
@@ -1362,19 +1383,19 @@
 	public IProject getRCPProject() {
 		return rcpProject;
 	}
-
+	
 	@Override
 	public String toString() {
-		return this.userName;//+((this.rcpProject != null && this.rcpProject.getLocation() != null)?" ("+this.rcpProject.getLocation()+")":"");
+		return this.userName;// +((this.rcpProject != null && this.rcpProject.getLocation() != null)?" ("+this.rcpProject.getLocation()+")":"");
 	}
-
+	
 	/**
 	 * Gets a list of all the built edition names.
 	 * 
 	 * @return a list of all the built edition names if some exists otherwise an empty list
 	 */
 	public List<String> getBuiltEditionNames() {
-		ArrayList<String> availableEditions = new ArrayList<String>();
+		ArrayList<String> availableEditions = new ArrayList<>();
 		for (String name : this.getEditionNames()) {
 			EditionDefinition ed = this.getEditionDefinition(name);
 			if (ed.getBuildEdition()) {
@@ -1383,4 +1404,4 @@
 		}
 		return availableEditions;
 	}
-}
\ No newline at end of file
+}
