Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 1042)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 1043)
@@ -124,7 +124,12 @@
 			//this.persistable = false; // FIXME: remove that later
 			String p = this.getStringParameterValue(TBXPreferences.UNIT_PROPERTY);
 			if (p != null && p.length() > 0) {
-				this.pProperty = getParent().getProperty(p);
+				Corpus parent = getParent();
+				if (parent != null) {
+					this.pProperty = parent.getProperty(p);
+				} else {
+					return false;
+				}
 			}
 		}
 		catch (CqiClientException e) {
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitiesSelection.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitiesSelection.java	(revision 1042)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitiesSelection.java	(revision 1043)
@@ -4,24 +4,22 @@
 package org.txm.specificities.core.functions;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashSet;
 import java.util.List;
 
 import org.apache.commons.lang.StringUtils;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.core.results.Parameter;
 import org.txm.core.results.TXMParameters;
-import org.txm.core.results.TXMResult;
 import org.txm.specificities.core.messages.SpecificitiesCoreMessages;
 import org.txm.specificities.core.preferences.SpecificitiesPreferences;
 import org.txm.statsengine.core.StatException;
 
 /**
  * A selection from a Specificities result dedicated to export or chart creation.
+ * 
  * @author sjacquot
- *
+ * 
  */
 public class SpecificitiesSelection extends ChartResult {
 
@@ -50,17 +48,15 @@
 	protected Boolean pGroupByLines;
 
 	/**
-	 * The selected specificities indices to focus on.
-	 */
-	protected double[][] selectedSpecificitiesIndex;
-
-
-
-	/**
 	 * The selected type names to focus on.
 	 */
 	@Parameter(key=SpecificitiesPreferences.VALUES, type=Parameter.RENDERING)
 	protected List<String> pSelectedTypeNames;
+	
+	/**
+	 * The selected specificities indices to focus on.
+	 */
+	protected double[][] selectedSpecificitiesIndex;
 
 	/**
 	 * Creates an empty SpecificitiesSelection.
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java	(revision 1042)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java	(revision 1043)
@@ -360,7 +360,9 @@
 				if (arg0.keyCode == SWT.DEL) {
 					final ISelection sel = treeViewer.getSelection();
 					if (sel instanceof IStructuredSelection) {
+						
 						if (!DeleteObject.askContinueToDelete((IStructuredSelection)sel)) return;
+						
 						JobHandler job = new JobHandler("Deleting", true) {
 
 							@Override
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/DeleteObject.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/DeleteObject.java	(revision 1042)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/DeleteObject.java	(revision 1043)
@@ -104,9 +104,9 @@
 	public static synchronized boolean askContinueToDelete(final IStructuredSelection selection) {
 		continueToDelete = true;
 		
-		boolean dontShowAlert = !TXMPreferences.getBoolean(RCPPreferences.USER_ALERT_DELETE, RCPPreferences.PREFERENCES_NODE);
+		boolean showAlert = !TXMPreferences.getBoolean(RCPPreferences.USER_ALERT_DELETE, RCPPreferences.PREFERENCES_NODE);
 		
-		if (dontShowAlert) {
+		if (showAlert) {
 			Display.getDefault().syncExec(new Runnable() {
 				@Override
 				public void run() {
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/SetTXMResultPersistentState.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/SetTXMResultPersistentState.java	(revision 1042)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/SetTXMResultPersistentState.java	(revision 1043)
@@ -82,10 +82,13 @@
 
 	@Override
 	public void updateElement(UIElement element, Map parameters) {
-		Object object = this.getCorporaViewSelectedObject(null);
-		if(object instanceof TXMResult)	{
-			element.setChecked(((TXMResult)object).isUserPersistable());
-		}
+//		System.out.println("E="+element+" params="+parameters);
+//		System.out.println("");
+		//FIXME the method is called during RCP startup -> but the corpora view has no selection
+//		Object object = this.getCorporaViewSelectedObject(null);
+//		if(object instanceof TXMResult)	{
+//			element.setChecked(((TXMResult)object).isUserPersistable());
+//		}
 	}
 	
 }
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java	(revision 1042)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java	(revision 1043)
@@ -78,10 +78,6 @@
 		return true;
 	}
 	
-	public Object getCorporaViewSelectedObject()	{
-		return getCorporaViewSelectedObject(null);
-	}
-	
 	/**
 	 * Gets the current selected object.
 	 * @param event the ExecutionEvent that provoke the command call.
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 1042)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 1043)
@@ -280,14 +280,6 @@
 						System.out.println("TXM initialization has been canceled by user. Please restart TXM.");
 					}
 
-					if (Toolbox.isInitialized()) {
-						StatusLine.setMessage(TXMUIMessages.ApplicationWorkbenchAdvisor_ready);
-						System.out.println(TXMUIMessages.ApplicationWorkbenchAdvisor_ready);
-					} else {
-						StatusLine.setMessage(TXMUIMessages.ApplicationWorkbenchAdvisor_init_failed);
-						System.out.println(TXMUIMessages.ApplicationWorkbenchAdvisor_init_failed);
-					}
-
 					JobsTimer.stopAndPrint();
 					return Status.OK_STATUS;
 				}
@@ -1069,13 +1061,18 @@
 									monitor.worked(1);
 									monitor.setTaskName("Initializing Toolbox (engines and corpora)...");
 									// init with Eclipse preference stores
+									
 									if (Toolbox.initialize(TBXPreferences.class, monitor)) {
+										StatusLine.setMessage(TXMUIMessages.ApplicationWorkbenchAdvisor_ready);
 										System.out.println(TXMUIMessages.ApplicationWorkbenchAdvisor_ready);
 									} else {
-										System.err.println(TXMUIMessages.ApplicationWorkbenchAdvisor_init_failed);
+										StatusLine.setMessage(TXMUIMessages.ApplicationWorkbenchAdvisor_init_failed);
+										System.out.println(TXMUIMessages.ApplicationWorkbenchAdvisor_init_failed);
+										
 										monitor.done();
 										return;
 									}
+
 									monitor.setTaskName("Calling start script...");
 									callStartScript();
 								} catch (Exception e) {
Index: tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java
===================================================================
--- tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java	(revision 1042)
+++ tmp/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java	(revision 1043)
@@ -22,14 +22,14 @@
 import org.txm.searchengine.cqp.serverException.CqiServerError;
 
 public class ContextSubcorpus extends TXMResult {
-	
+
 	protected ArrayList<QueryResult> results = new ArrayList<QueryResult>();
 	protected HashMap<String, String> keywordQueriestoName = new HashMap<String, String>();
-	
+
 	protected Corpus corpus;
 	protected File keywordsFile;
 	protected  int contextSize;
-	
+
 	public ContextSubcorpus(Corpus corpus, File keywordsFile, int contextSize) {
 		super(corpus);
 		this.corpus = corpus;
@@ -45,7 +45,7 @@
 
 	@Override
 	public void clean() {
-		
+
 	}
 
 	@Override
@@ -63,7 +63,7 @@
 			String name = keywordsFile.getName();
 			int idx = name.indexOf(".");
 			if (idx > 0) name = name.substring(0, idx);
-			
+
 			Subcorpus sub = corpus.createSubcorpus(name+"_contexts", results.get(0));
 			return sub;
 		}
@@ -72,10 +72,11 @@
 
 	@Override
 	public boolean compute(IProgressMonitor monitor) throws IOException, CqiClientException, CqiServerError, InvalidCqpIdException {
-if (!(CQPSearchEngine.getCqiClient() instanceof MemCqiClient));
 		
+		if (!(CQPSearchEngine.getCqiClient() instanceof MemCqiClient));
+
 		MemCqiClient CQI = (MemCqiClient) CQPSearchEngine.getCqiClient();
-		
+
 		BufferedReader keywordFileReader = new BufferedReader(new InputStreamReader(
 				new FileInputStream(keywordsFile), "UTF-8")); //$NON-NLS-1$
 		ArrayList<String> keywordLines = new ArrayList<String>();
@@ -88,7 +89,7 @@
 		System.out.println("Number of keywords lines: "+keywordLines.size());
 		System.out.println("context left and right size is: "+contextSize);
 		monitor.beginTask("Querying keywords...", keywordLines.size());
-		
+
 		int nkeyword = 0;
 		for (String line : keywordLines) {
 			String[] split = line.split("=", 2); //$NON-NLS-1$
@@ -96,21 +97,21 @@
 				Query q = new Query(split[1]+" expand to "+contextSize);
 				keywordQueriestoName.put(split[1], split[0]);
 				results.add(corpus.query(q, "K"+nkeyword++, false));
-				
+
 			}
 		}
 		keywordFileReader.close();
-		
+
 		// Loop over QueryResult to Merge them into one subcorpus
 		int n = 0;
 		monitor.beginTask("Creating subcorpus...", results.size());
 		while(results.size() > 1) {
-			
+
 			QueryResult q1 = results.get(0);
 			QueryResult q2 = results.get(1);
 			//System.out.println("Mergin... "+q1+" "+q2);
 			//System.out.println("match sizes "+q1.getNMatch()+" "+q2.getNMatch());
-			
+
 			String merge_name = "Merge"+(n++);
 			CQI.query(merge_name+"= union "+q1.getQualifiedCqpId()+" "+q2.getQualifiedCqpId()+";");
 			results.remove(0);
@@ -118,7 +119,7 @@
 			results.add(new QueryResult(merge_name, merge_name, corpus, null));
 			monitor.worked(1);
 		}
-		
+
 		System.out.println("Done.");
 		return true;
 	}
@@ -169,7 +170,7 @@
 		// TODO Auto-generated method stub
 		return false;
 	}
-	
+
 	@Override
 	public String getResultype() {
 		// TODO
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java	(revision 1042)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java	(revision 1043)
@@ -355,7 +355,7 @@
 
 		if (isRServerOk) {
 			Log.finest("RSERVE_ACTIVATED"); //$NON-NLS-1$
-			System.out.println(RCoreMessages.info_connected); 
+			//System.out.println(RCoreMessages.info_connected); 
 			RserveProcess = StartRserve.rProcess;
 		}
 		return isRServerOk;
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/StartRserve.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/StartRserve.java	(revision 1042)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/StartRserve.java	(revision 1043)
@@ -165,7 +165,8 @@
 		int attempts = 10;
 		while (attempts > 0) {
 			try {
-				System.out.print("."); //$NON-NLS-1$
+				//System.out.print("."); //$NON-NLS-1$
+				Log.info(".");
 				RConnection c = new RConnection("127.0.0.1", port); //$NON-NLS-1$
 				c.close();
 				return true;
@@ -177,7 +178,7 @@
 
 			attempts--;
 		}
-		System.out.println(""); //$NON-NLS-1$
+		Log.info("R connection attemps done.");
 		return false;
 	}
 
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 1042)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1043)
@@ -220,7 +220,8 @@
 				retrievedParent.addChild(this);
 			}
 			else	{
-				Log.severe("No parent found in workspace for puuid="+puuid);
+				Log.severe("Warning: no parent was found in workspace for uuid="+uniqueID+" and puuid="+puuid);
+				TBXPreferences.delete(this);
 			}
 		}
 
@@ -964,11 +965,11 @@
 
 			this.clean();
 
-			this.parent.removeResult(this);
+			if (this.parent != null) {
+				this.parent.removeResult(this);
+			}
 			this.parent = null;
 			return true;
-		} catch (NullPointerException e) {
-			// does nothing
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
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 1042)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java	(revision 1043)
@@ -401,14 +401,15 @@
 	@Override
 	public boolean delete() {
 		try {
-			this.getParent().dropPartition(this);
-			super.delete();
-			if (this.getSelfElement() != null) {
+			this.getParent().dropPartition(this); // CQP Part
+			
+			super.delete(); // new preference based scheme
+			
+			if (this.getSelfElement() != null) { // old corpus import.xml data scheme
 				this.getSelfElement().getParentNode().removeChild(getSelfElement());
 			}
 			return true;
 		} catch (CqiClientException e) {
-			// TODO Auto-generated catch block
 			org.txm.utils.logger.Log.printStackTrace(e);
 		}
 		return false;
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java	(revision 1042)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java	(revision 1043)
@@ -125,7 +125,6 @@
 		this.properties = properties;
 	}
 
-
 	/**
 	 * Adds the property.
 	 *
