Index: tmp/org.txm.core/src/java/org/txm/scripts/importer/TabulatedToXml.groovy
===================================================================
--- tmp/org.txm.core/src/java/org/txm/scripts/importer/TabulatedToXml.groovy	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/scripts/importer/TabulatedToXml.groovy	(revision 1615)
@@ -229,7 +229,7 @@
 		String encoding = "UTF-8";
 		
 		TabulatedToXml ttx = new TabulatedToXml(colnames, "debat", tag);
-		for(File tabulatedfile : srcdir.listFiles(IOUtils.FILTER_HIDDEN))
+		for(File tabulatedfile : srcdir.listFiles(IOUtils.HIDDENFILE_FILTER))
 		{
 			if(tabulatedfile.getName().endsWith(".txt"))
 			{
Index: tmp/org.txm.core/src/java/org/txm/scripts/importer/DisplayXmlTags.groovy
===================================================================
--- tmp/org.txm.core/src/java/org/txm/scripts/importer/DisplayXmlTags.groovy	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/scripts/importer/DisplayXmlTags.groovy	(revision 1615)
@@ -61,7 +61,7 @@
 	 */
 	public DisplayXmlTags(File infile) {
 		if (infile.isDirectory()) {
-			for (File f : infile.listFiles(IOUtils.FILTER_HIDDEN)) {
+			for (File f : infile.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 				processxmlFile(f);
 			}
 		} else
Index: tmp/org.txm.core/src/java/org/txm/scripts/importer/SAttributesListener.groovy
===================================================================
--- tmp/org.txm.core/src/java/org/txm/scripts/importer/SAttributesListener.groovy	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/scripts/importer/SAttributesListener.groovy	(revision 1615)
@@ -204,7 +204,7 @@
 	public static SAttributesListener scanFiles(File xmlDirectory, String wordTag) {
 		SAttributesListener listener = new SAttributesListener()
 		listener.W = wordTag
-		for (File xmlFile : xmlDirectory.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File xmlFile : xmlDirectory.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (xmlFile.isFile() && !xmlFile.isHidden() && xmlFile.getName().toLowerCase().endsWith(".xml")) {
 				scanFile(xmlFile, listener); // results saved in 'listener' data
 //				println "LISTENER RESULT with ${xmlFile.getName()}: "+listener
Index: tmp/org.txm.core/src/java/org/txm/scripts/importer/WExtract.groovy
===================================================================
--- tmp/org.txm.core/src/java/org/txm/scripts/importer/WExtract.groovy	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/scripts/importer/WExtract.groovy	(revision 1615)
@@ -320,7 +320,7 @@
 		}
 		println maxperfile;
 		
-		def files = directory.listFiles(IOUtils.FILTER_HIDDEN);
+		def files = directory.listFiles(IOUtils.HIDDENFILE_FILTER);
 		for (File infile : files) {
 			if (maxperfile.containsKey(infile.getName())) {
 				File outfile = new File(outdir, infile.getName());
Index: tmp/org.txm.core/src/java/org/txm/scripts/importer/WExtractWithMode.groovy
===================================================================
--- tmp/org.txm.core/src/java/org/txm/scripts/importer/WExtractWithMode.groovy	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/scripts/importer/WExtractWithMode.groovy	(revision 1615)
@@ -362,7 +362,7 @@
 		}
 		println maxperfile;
 		
-		def files = directory.listFiles(IOUtils.FILTER_HIDDEN);
+		def files = directory.listFiles(IOUtils.HIDDENFILE_FILTER);
 		for(File infile : files) {
 			if(maxperfile.containsKey(infile.getName())) {
 				File outfile = new File(outdir, infile.getName());
Index: tmp/org.txm.core/src/java/org/txm/scripts/importer/XMLText2TXTCSV.groovy
===================================================================
--- tmp/org.txm.core/src/java/org/txm/scripts/importer/XMLText2TXTCSV.groovy	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/scripts/importer/XMLText2TXTCSV.groovy	(revision 1615)
@@ -11,7 +11,7 @@
 File metadatafile = Metadatas.findMetadataFile(outdir)
 String csvString = ""
 
-def files = dir.listFiles(IOUtils.FILTER_HIDDEN)
+def files = dir.listFiles(IOUtils.HIDDENFILE_FILTER)
 files.sort()
 for(File f : files) {
 	File outfile = new File(outdir, f.getName()+".txt");
Index: tmp/org.txm.core/src/java/org/txm/scripts/importer/ApplyXsl.groovy
===================================================================
--- tmp/org.txm.core/src/java/org/txm/scripts/importer/ApplyXsl.groovy	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/scripts/importer/ApplyXsl.groovy	(revision 1615)
@@ -222,7 +222,7 @@
 		assert(srcdirectory.canRead())
 		assert(srcdirectory.canExecute())
 		
-		List<File> files = srcdirectory.listFiles(IOUtils.FILTER_HIDDEN);
+		List<File> files = srcdirectory.listFiles(IOUtils.HIDDENFILE_FILTER);
 		
 		files = files.findAll{item-> item.getName().endsWith(".xml")}
 		
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 1614)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1615)
@@ -2113,6 +2113,17 @@
 		}
 	}
 
+	/**
+	 * Computes the result if:
+	 *  - it can be computed (checking if all mandatory parameters are set)
+	 *  - it is dirty (manually or from history, if a parameters value has changed since last computing)
+	 * 
+	 * @return
+	 * @throws Exception
+	 */
+	public boolean compute(boolean deepComputing) {
+		return this.compute(new LogMonitor("Computing " + this), deepComputing);
+	}
 
 	/**
 	 * Computes the result if:
Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1615)
@@ -383,13 +383,18 @@
 			//				}
 
 			try {
-
-				String className = TXMPreferences.preferencesRootNode.node(parametersNodePath).get("class", ""); //$NON-NLS-1$
-
+				Preferences node = TXMPreferences.preferencesRootNode.node(parametersNodePath);
+				String className = node.get("class", ""); //$NON-NLS-1$
+				
 				// Skip Project object
-				if(className.equals(Project.class.getName()))	{ // already loaded in loadProjectFromProjectScope
+				if (Project.class.getName().equals(className))	{ // already loaded in loadProjectFromProjectScope
 					continue;
 				}
+				
+				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$
+					continue;
+				}
 
 				Log.fine("\nProject.loadResults(): loading from result node qualifier " + parametersNodePath);
 				//Log.finest("Toolbox.initialize(): class = " + TXMPreferences.getString("class", nodeQualifier));
@@ -400,12 +405,16 @@
 				}
 				Log.fine("Project.loadResults(): class = " + className); //$NON-NLS-1$
 				//					Log.finest("Toolbox.initialize(): parent_uuid = " + TXMPreferences.getString(TXMPreferences.PARENT_UUID, nodeQualifier));
-				Log.fine("Project.loadResults(): parent_uuid = " + TXMPreferences.preferencesRootNode.node(parametersNodePath).get(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, "")); //$NON-NLS-1$
-				String bundleId = TXMPreferences.preferencesRootNode.node(parametersNodePath).get(TXMPreferences.BUNDLE_ID, ""); //$NON-NLS-1$
+				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) {
+					Log.warning(NLS.bind("Warning: can not restore {0} object with no bundle id set.", className)); //$NON-NLS-1$
+					continue;
+				}
 				Log.fine("Project.loadResults(): bundle_id = " + bundleId); //$NON-NLS-1$
 				Bundle bundle = Platform.getBundle(bundleId);
 				if (bundle == null) {
-					Log.warning("Warning: can not restore object with bundle name " + bundleId); //$NON-NLS-1$
+					Log.warning(NLS.bind("Warning: can not restore {0} object with bundle id={1}.", className, bundleId)); //$NON-NLS-1$
 					continue;
 				}
 
@@ -1176,19 +1185,22 @@
 
 				//Log.finest("Toolbox.initialize(): checking result type linked to node path " + parametersNodePath);
 
-				String className = TXMPreferences.preferencesRootNode.node(parametersNodePath).get("class", ""); //$NON-NLS-1$
-
-				if(!className.equals(Project.class.getName()))	{ // only load Project class
+				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$
 					continue;
 				}
+				
+				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(): class = " + TXMPreferences.getString("class", nodeQualifier));
-				//TXMPreferences.dump();
-
-				Log.finest("Toolbox.initialize(): class = " + className); //$NON-NLS-1$
-				Log.finest("Toolbox.initialize(): parent_uuid = " + TXMPreferences.preferencesRootNode.node(parametersNodePath).get(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, "")); //$NON-NLS-1$
-				String bundleId = TXMPreferences.preferencesRootNode.node(parametersNodePath).get(TXMPreferences.BUNDLE_ID, ""); //$NON-NLS-1$
+				//Log.finest("Toolbox.initialize(): class = " + TXMPreferences.getString("class", nodeQualifier)nodeitialize(): class = " + className); //$NON-NLS-1$
+				Log.finest("Toolbox.initialize(): parent_uuid = " + node.get(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, "")); //$NON-NLS-1$
+				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) {
@@ -1205,6 +1217,8 @@
 				if (!result.isInternalPersistable())	{
 					result.setUserPersistable(true);	
 				}
+				
+				return; // only one Project.class loaded per RCP project
 			} catch (Exception e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
Index: tmp/org.txm.core/src/java/org/txm/objects/Workspace.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 1615)
@@ -396,5 +396,13 @@
 				e.printStackTrace();
 			}
 		}
+		
+		for (TXMResult corpus : this.getDeepChildren(CorpusBuild.class)) {
+			CorpusBuild cb = (CorpusBuild)corpus;
+			if (!cb.compute(false)) {
+				System.out.println("Deleting duplicated corpus: "+cb+" of "+cb.getProject());
+				cb.delete();
+			}
+		}
 	}
 }
\ No newline at end of file
Index: tmp/org.txm.core/src/java/org/txm/importer/scripts/filters/FilterManager.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/importer/scripts/filters/FilterManager.java	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/importer/scripts/filters/FilterManager.java	(revision 1615)
@@ -64,7 +64,7 @@
 			System.out
 					.println(NLS.bind(TXMCoreMessages.filterManagerErrorColonInitializationP0NotFound, path)); 
 		else {
-			File[] list = home.listFiles(IOUtils.FILTER_HIDDEN);
+			File[] list = home.listFiles(IOUtils.HIDDENFILE_FILTER);
 			for (File f : list)
 				if (f.isDirectory()) {
 					this.hashtable.put(f.getName(), f.getPath());
Index: tmp/org.txm.core/src/java/org/txm/importer/scripts/filters/CatalogManager.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/importer/scripts/filters/CatalogManager.java	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/importer/scripts/filters/CatalogManager.java	(revision 1615)
@@ -58,7 +58,7 @@
 			System.out
 					.println(NLS.bind(TXMCoreMessages.managerErrorDuringInitializationColonP0NotFound, path)); 
 		else {
-			File[] list = home.listFiles(IOUtils.FILTER_HIDDEN);
+			File[] list = home.listFiles(IOUtils.HIDDENFILE_FILTER);
 			for (File f : list)
 				this.put(f.getName(), new Catalog(f.getPath()));
 		}
Index: tmp/org.txm.core/src/java/org/txm/importer/ApplyXsl2.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/importer/ApplyXsl2.java	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/importer/ApplyXsl2.java	(revision 1615)
@@ -508,7 +508,7 @@
 	 */
 	public static boolean processWithMultipleXSL(File[] filesToProcess, File xslDirectory, HashMap<String, Object> xslParams) throws TransformerException, IOException {
 		if (xslDirectory.exists()) {
-			File[] xslFiles = xslDirectory.listFiles(IOUtils.FILTER_HIDDEN);
+			File[] xslFiles = xslDirectory.listFiles(IOUtils.HIDDENFILE_FILTER);
 			Arrays.sort(xslFiles);
 			return processWithMultipleXSL(filesToProcess, xslFiles, xslParams);
 		} else {
@@ -563,7 +563,7 @@
 		assert(srcdirectory.canRead());
 		assert(srcdirectory.canExecute());
 
-		File[] files = srcdirectory.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] files = srcdirectory.listFiles(IOUtils.HIDDENFILE_FILTER);
 		System.out.println("process : "+srcdirectory+"/*");
 		System.out.println("with : "+xslfile);
 		long bigstart = System.currentTimeMillis();
Index: tmp/org.txm.core/src/java/org/txm/importer/Convert5To6.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/importer/Convert5To6.java	(revision 1614)
+++ tmp/org.txm.core/src/java/org/txm/importer/Convert5To6.java	(revision 1615)
@@ -86,12 +86,12 @@
 			return false;
 		}
 
-		return REGISTRY.listFiles(IOUtils.FILTER_HIDDEN).length > 0;
+		return REGISTRY.listFiles(IOUtils.HIDDENFILE_FILTER).length > 0;
 	}
 
 	private boolean process() throws Exception {
 		System.out.println(TXMCoreMessages.processing);
-		String corpusname = REGISTRY.listFiles(IOUtils.FILTER_HIDDEN)[0].getName().toUpperCase();
+		String corpusname = REGISTRY.listFiles(IOUtils.HIDDENFILE_FILTER)[0].getName().toUpperCase();
 
 		// create the corpus directories
 		File HTMLc = new File(HTMLs, corpusname); 
@@ -103,7 +103,7 @@
 		// mkdirs
 		HTMLc.mkdir();
 		HTMLcmulti.mkdir();
-		File[] files = HTMLs.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] files = HTMLs.listFiles(IOUtils.HIDDENFILE_FILTER);
 		if (files != null && files.length > 1)
 			HTMLconepage.mkdir();
 		TXMc.mkdir();
@@ -111,16 +111,16 @@
 		
 		System.out.println(NLS.bind(TXMCoreMessages.reorganizingFilesOfP0, OUTDIR));
 		// move files
-		for (File f : HTMLmulti.listFiles(IOUtils.FILTER_HIDDEN))
+		for (File f : HTMLmulti.listFiles(IOUtils.HIDDENFILE_FILTER))
 			f.renameTo(new File(HTMLcmulti, f.getName()));
 		if (HTMLconepage.exists()) {
-			for (File f : HTMLs.listFiles(IOUtils.FILTER_HIDDEN))
+			for (File f : HTMLs.listFiles(IOUtils.HIDDENFILE_FILTER))
 				if (f.isFile())
 					f.renameTo(new File(HTMLconepage, f.getName()));
 		}
-		for (File f : DATAs.listFiles(IOUtils.FILTER_HIDDEN))
+		for (File f : DATAs.listFiles(IOUtils.HIDDENFILE_FILTER))
 			f.renameTo(new File(DATAc, f.getName()));
-		for (File f : TXMs.listFiles(IOUtils.FILTER_HIDDEN))
+		for (File f : TXMs.listFiles(IOUtils.HIDDENFILE_FILTER))
 			f.renameTo(new File(TXMc, f.getName()));
 
 		// remove unused dir
@@ -182,7 +182,7 @@
 		//process xml-txm files
 		//params.addEditionDefinition(corpusElem, "default", "groovy", "");
 		params.addEditionDefinition(corpusElem, "onepage", "groovy", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		for (File txmFile : TXMc.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File txmFile : TXMc.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			System.out.println(NLS.bind(TXMCoreMessages.processingTextColonP0, txmFile));
 			String textname = txmFile.getName();
 			textname = textname.substring(0, textname.lastIndexOf(".")); //$NON-NLS-1$
@@ -190,7 +190,7 @@
 			Element textElem = params.addText(corpusElem, textname, txmFile);
 			Element editionElem = params.addEdition(textElem, "default", HTMLc.getAbsolutePath(), "html"); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			File[] htmlfiles = HTMLcmulti.listFiles(IOUtils.FILTER_HIDDEN);
+			File[] htmlfiles = HTMLcmulti.listFiles(IOUtils.HIDDENFILE_FILTER);
 			Arrays.sort(htmlfiles, new Comparator<File>() {
 				@Override
 				public int compare(File arg0, File arg1) {
@@ -209,7 +209,7 @@
 			// add default Edition
 			if (HTMLconepage.exists()) {
 				editionElem = params.addEdition(textElem, "onepage", HTMLc.getAbsolutePath(), "html"); //$NON-NLS-1$ //$NON-NLS-2$
-				htmlfiles = HTMLconepage.listFiles(IOUtils.FILTER_HIDDEN);
+				htmlfiles = HTMLconepage.listFiles(IOUtils.HIDDENFILE_FILTER);
 				pagecounter = 1;
 				for (File page : htmlfiles) {
 					if (page.getName().startsWith(textname)) {
Index: tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Line.java
===================================================================
--- tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Line.java	(revision 1614)
+++ tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Line.java	(revision 1615)
@@ -209,32 +209,32 @@
 	
 
 	/**
-	 * Gets the left context size.
+	 * Gets the Line left context size.
 	 * 
 	 * @return the left context size
 	 */
 	public int getLeftContextSize() {
-//		if (leftCtxViewPropertiesValues.values().size() == 0) return 0;
+		if (leftCtxViewPropertiesValues.values().size() == 0) return 0;
 		return leftCtxViewPropertiesValues.values().iterator().next().size();
 	}
 
 	/**
-	 * Gets the keywords size.
+	 * Gets the Line keywords size.
 	 * 
 	 * @return the keywords size
 	 */
 	public int getKeywordsSize() {
-//		if (keywordsViewValues.values().size() == 0) return 0;
+		if (keywordsViewValues.values().size() == 0) return 0;
 		return keywordsViewValues.values().iterator().next().size();
 	}
 
 	/**
-	 * Gets the right context size.
+	 * Gets the Line right context size.
 	 * 
 	 * @return the right context size
 	 */
 	public int getRightContextSize() {
-//		if (rightCtxViewValues.values().size() == 0) return 0;
+		if (rightCtxViewValues.values().size() == 0) return 0;
 		return rightCtxViewValues.values().iterator().next().size();
 	}
 
@@ -272,6 +272,9 @@
 	 */
 	public String leftContextToString(String propertySeparator,
 			String wordSeparator, int limit, LineDecorator decorator) {
+		
+		if (getLeftContextSize() == 0) return "";
+		
 		int currentPos = keywordpos - getLeftContextSize();
 		
 		List<String> words = new ArrayList<String>();
@@ -377,11 +380,13 @@
 	 */
 	public String rightContextToString(String propertySeparator,
 			String wordSeparator, int limit, LineDecorator decorator) {
+		int s = getKeywordsSize();
+		if (s == 0) return "";
+		
 		List<String> words = new ArrayList<String>();
 		Map<Property, List<String>> values = getRightCtxViewProperties();
 		int max = (limit == -1) ? (values.get(concordance.getRightViewProperties().get(0)).size()) : (limit);
 		
-		int s = getKeywordsSize();
 		int currentPos = keywordpos + s;
 		//System.out.println("Line "+keywordToString()+" right context, currentpos="+currentPos+" keywordpos="+keywordpos+" keywordlength="+s);
 		for (int i = 0; i < max; i++) {
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 1615)
@@ -83,7 +83,7 @@
 		int langToSelectIndex = -1;
 		int added = 0;
 		String modelsDir = TreeTaggerPreferences.getInstance().getString(TreeTaggerPreferences.MODELS_PATH);
-		File files[] = new File(modelsDir).listFiles(IOUtils.FILTER_HIDDEN);
+		File files[] = new File(modelsDir).listFiles(IOUtils.HIDDENFILE_FILTER);
 		if (files != null && files.length > 0) {
 			for (File model : files) {
 				if (!model.getName().endsWith(".par")) continue;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1615)
@@ -103,7 +103,7 @@
 	 */
 	public final static String TOP_TOOLBAR_ID = "TXMEditorTopToolBar"; //$NON-NLS-1$
 	public final static String BOTTOM_TOOLBAR_ID = "TXMEditorBottomToolBar"; //$NON-NLS-1$
-	
+
 	//FIXME: SJ: bad idea to use the ID as title, need to change the system
 	public final static String COMPUTING_PARAMETERS_GROUP_ID = TXMUIMessages.parameters;
 
@@ -218,8 +218,8 @@
 	public TXMEditor(TXMResultEditorInput<TXMResult> editorInput) {
 		this.setInput(editorInput); // FIXME: SJ: the input is defined twice, on time here and one time in init(), need to see if we still need the assignment here in the constructor		
 	}
-	
 
+
 	@Override
 	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
 		this.setSite(site);
@@ -260,9 +260,9 @@
 							public void run() throws Exception {
 								@SuppressWarnings("unchecked")
 								TXMEditorExtension<T> ext = ((TXMEditorExtension<T>) o);
-								
+
 								if (getResult() == null) return;
-								
+
 								if (ext.getTXMResultValidClasses() == null || ext.getTXMResultValidClasses().contains(getResult().getClass())) {
 									Log.finest("Installing TXMEditorExtension: "+ext.getName()); //$NON-NLS-1$
 									ext.setEditor(TXMEditor.this);
@@ -287,7 +287,7 @@
 				//				}
 
 				if (partRef.getId().equals(TXMEditor.this.getClass().getName())) { // called after this.doSave()
-					
+
 					//System.out.println("EVENT partClosed");
 					for (TXMEditorExtension<T> extension : extensions) {
 						try {
@@ -369,7 +369,7 @@
 			this.parent = parent;
 
 			//this.getContainer().setRedraw(false);
-			
+
 			// to hide and display the extended parameters composite
 			this.initParentLayout(parent, 1);
 
@@ -431,8 +431,8 @@
 
 			this.firstLineComposite.pack();
 			this.extendedParametersGroup.pack();
-			
-			
+
+
 			// remove empty toolbar
 			//TODO SJ: Hack? MD: yeah -> need to find a way to not display the bottom toolbar on Windows instead
 			if (this.bottomToolBar.getItems().length == 0) {
@@ -452,29 +452,29 @@
 
 			// FIXME: SJ: this code doesn't work even if we call removeComputeButton()
 			// remove empty first line composite
-//			if(this.mainParametersComposite.getChildren().length == 0 && this.topToolBar.isDisposed())	{
-//				this.firstLineComposite.dispose();
-//			}
-			
+			//			if(this.mainParametersComposite.getChildren().length == 0 && this.topToolBar.isDisposed())	{
+			//				this.firstLineComposite.dispose();
+			//			}
 
+
 			if (this.getResult().isLocked()) {
 				this.setLocked(true);
 			}
 
 			// disable the compute button, it will be re-enable or not later when the UI will check if the editor is dirty or not
-//			ToolItem computeButton = this.topToolBar.getItemByContributionId(TOP_TOOLBAR_COMPUTE_BUTTON_ID);
-//			if (computeButton != null) {
-//				computeButton.setEnabled(false);
-//			}
-			
+			//			ToolItem computeButton = this.topToolBar.getItemByContributionId(TOP_TOOLBAR_COMPUTE_BUTTON_ID);
+			//			if (computeButton != null) {
+			//				computeButton.setEnabled(false);
+			//			}
+
 		} catch(Throwable e) {
 			Log.severe(TXMCoreMessages.bind("TXMEditor.createPartControl(): can not create the editor for result {0}.", this.getResult())); //$NON-NLS-1$
 			e.printStackTrace();
 			createPartControlDoneSucessfully = false;
 		}
-		
+
 		this.setDirty(false);
-		
+
 		//this.getContainer().setRedraw(true);
 	}
 
@@ -482,7 +482,7 @@
 		this.locked = b;
 		this.firstLineComposite.setEnabled(!b);
 	}
-	
+
 	public boolean isLocked() {
 		return locked;
 	}
@@ -654,16 +654,16 @@
 
 		// FIXME: SJ: future version that enable the button ONLY if the result can compute
 		// need to check all canCompute() result methods before enabling it
-//		try {
-//			// enable/disable the compute button according to dirty state of the editor
-//			if (this.computeButton != null && !this.computeButton.isDisposed()) {
-//				this.computeButton.setEnabled(this.getResult().canCompute() && dirty && !this.getResult().isLocked());
-//			}
-//		}
-//		catch (Exception e) {
-//			// TODO Auto-generated catch block
-//			e.printStackTrace();
-//		}
+		//		try {
+		//			// enable/disable the compute button according to dirty state of the editor
+		//			if (this.computeButton != null && !this.computeButton.isDisposed()) {
+		//				this.computeButton.setEnabled(this.getResult().canCompute() && dirty && !this.getResult().isLocked());
+		//			}
+		//		}
+		//		catch (Exception e) {
+		//			// TODO Auto-generated catch block
+		//			e.printStackTrace();
+		//		}
 
 		// FIXME: old version
 		// enable/disable the compute button according to dirty state of the editor
@@ -693,7 +693,7 @@
 	@Override
 	public boolean isSaveOnCloseNeeded() {
 		boolean needed = false;
-		
+
 		for (TXMEditorExtension<T> extension : this.extensions) {
 			try {
 				needed = needed || (extension.isSaveOnCloseNeeded() && extension.isDirty());
@@ -702,14 +702,14 @@
 			}
 		}
 		return needed;
-		
+
 	}
-	
 
-	
+
+
 	@Override
 	public void setFocus() {
-	//	this.resultArea.setFocus();
+		//	this.resultArea.setFocus();
 		// FIXME SJ: this code leads to a bug, the focus must not be regiven to the main parameter after each computing
 		//		if (mainParametersComposite != null && !mainParametersComposite.isDisposed()) {
 		//			mainParametersComposite.setFocus();
@@ -717,7 +717,7 @@
 		CorporaView.focus(this.getResult());
 	}
 
-	
+
 	@SuppressWarnings("unchecked")
 	@Override
 	public TXMResultEditorInput<T> getEditorInput() {
@@ -800,10 +800,8 @@
 	 */
 	public JobHandler compute(final boolean update)	{
 
-		
 		StatusLine.setMessage(TXMCoreMessages.bind(TXMUIMessages.computing, this.getResult().getName()));
 
-
 		JobHandler job = new JobHandler(TXMCoreMessages.bind(TXMUIMessages.computing, this.getResult().getName())) {
 
 			@Override
@@ -814,31 +812,32 @@
 				if (isLocked()) {
 					return Status.CANCEL_STATUS;
 				}
-				
+
 				try {
 					JobsTimer.start();
-					
+
 					// FIXME: SJ: tests
 					//showBusy(true);
-					
+
 					this.syncExec(new Runnable() {
 						@Override
 						public void run() {
+
 							if(update)	{
 
 								// popup alert to inform user that the result has been manually edited
 								if (TXMEditor.this.getResult().isAltered()
-									&& !MessageDialog.openQuestion(getShell(), TXMCoreMessages.common_warning, TXMCoreMessages.bind(TXMUIMessages.warning_popup_theP0HasBeenEditedItsChangesWillBeLost, TXMEditor.this.getResult().getResultType()))) {
-										setCanceled(true);
+										&& !MessageDialog.openQuestion(getShell(), TXMCoreMessages.common_warning, TXMCoreMessages.bind(TXMUIMessages.warning_popup_theP0HasBeenEditedItsChangesWillBeLost, TXMEditor.this.getResult().getResultType()))) {
+									setCanceled(true);
 								}
 								// popup alert to inform user that children results will be recomputed
 								if(!TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER)
 										&& TXMEditor.this.getResult().hasVisibleChild() && !MessageDialog.openQuestion(getShell(), TXMCoreMessages.common_warning, TXMUIMessages.warning_popup_allDescendantResultsWillBeUpdated))	{
 									setCanceled(true);
 								}
-								
 
-								
+
+
 								// subclasses manual result updating from editor fields
 								Log.finer("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": manually updating result from editor."); //$NON-NLS-1$
 								updateResultFromEditor();
@@ -846,23 +845,23 @@
 								// auto updating result from Parameter annotations in result <=> editor
 								Log.finer("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": auto updating result from editor."); //$NON-NLS-1$
 								autoUpdateResultFromEditorParameters();
-	
 
-								
+
+
 								// FIXME: SJ: useless at this time?
 								// Stores the last parameters before the computing to later auto-update the Widgets only if some parameters have changed 
 								//setLastComputingParameters(TXMEditor.this.getResult().getLastParametersFromHistory());
 							}
 							// FIXME: SJ: there is a bug when deleting LT lines for example, the popup alert to inform user that children results will be recomputed is not triggered
 							// problem here is the DeleteLines commands, etc. call TXMEditor.compute(false) at this moment, they should call TXMEditor.compute(true) but the LT Editor is not ready to manage that
-//							else if(TXMEditor.this.getResult().hasBeenComputedOnce())	 {
-//								// popup alert to inform user that children results will be recomputed
-//								if(!TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER)
-//										&& TXMEditor.this.getResult().hasVisibleChild() && !MessageDialog.openQuestion(getShell(), TXMCoreMessages.common_warning, TXMUIMessages.warning_popup_allDescendantResultsWillBeUpdated))	{
-//									setCanceled(true);
-//								}
-//
-//							}
+							//							else if(TXMEditor.this.getResult().hasBeenComputedOnce())	 {
+							//								// popup alert to inform user that children results will be recomputed
+							//								if(!TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER)
+							//										&& TXMEditor.this.getResult().hasVisibleChild() && !MessageDialog.openQuestion(getShell(), TXMCoreMessages.common_warning, TXMUIMessages.warning_popup_allDescendantResultsWillBeUpdated))	{
+							//									setCanceled(true);
+							//								}
+							//
+							//							}
 						}
 					});
 
@@ -960,7 +959,7 @@
 			else {
 				return null;
 			}
-			
+
 			// computing the result only if the editor wasn't already opened
 			if (!wasAlreadyOpened)	{
 				editor.compute(false);
@@ -983,12 +982,12 @@
 	 * @throws Exception 
 	 */
 	public final void refresh(boolean update) throws Exception {
-		
+
 		// skip refresh if the part creation has failed
 		if (!createPartControlDoneSucessfully) {
 			return;
 		}
-		
+
 		this.notifyExtensions("notifyStartOfRefresh"); //$NON-NLS-1$
 
 		TXMResult result = this.getResult();
@@ -1033,7 +1032,7 @@
 		List<TXMResult> results = this.getResult().getDeepChildren();
 		//results.add(this.getResult());
 
-		
+
 		for (int i = 0; i < results.size(); i++) {
 			ArrayList<TXMEditor> editors = SWTEditorsUtils.getEditors(results.get(i)) ;
 			for (int j = 0; j < editors.size(); j++) {
@@ -1042,7 +1041,7 @@
 						//&& txmEditor.isDirty()
 						)	{
 					//txmEditor.synchronizeResultFromEditor();
-					
+
 					// FIXME: SJ: need to prove/test this code
 					// recreate all if the parent result is altered 
 					//txmEditor.refresh(!this.getResult().isAltered());
@@ -1050,7 +1049,7 @@
 				}
 			}
 		}
-		
+
 		this.notifyExtensions("notifyEndOfRefresh"); //$NON-NLS-1$
 	}
 
@@ -1062,31 +1061,31 @@
 	public abstract void updateResultFromEditor();
 
 	// FIXME: became useless?
-//	/**
-//	 * UI safe
-//	 * 
-//	 * Synchronizes the editor with the result. 
-//	 * Dedicated to dynamically change the editor components from the stored result.
-//	 * <p>
-//	 * Use this method if you need to save parameter with Type not managed by the autoUpdateEditorFieldsFromResult method
-//	 * @throws Exception 
-//	 */
-//	public final void updateFromResult(final boolean update) throws Exception {
-//		if (this.parent != null && !this.parent.isDisposed()) {
-//			this.parent.getDisplay().syncExec(new Runnable() {
-//
-//				@Override
-//				public void run() {
-//					try {
-//						refresh(update);
-//					} catch (Exception e) {
-//						// TODO Auto-generated catch block
-//						e.printStackTrace();
-//					}
-//				}
-//			});
-//		}
-//	}
+	//	/**
+	//	 * UI safe
+	//	 * 
+	//	 * Synchronizes the editor with the result. 
+	//	 * Dedicated to dynamically change the editor components from the stored result.
+	//	 * <p>
+	//	 * Use this method if you need to save parameter with Type not managed by the autoUpdateEditorFieldsFromResult method
+	//	 * @throws Exception 
+	//	 */
+	//	public final void updateFromResult(final boolean update) throws Exception {
+	//		if (this.parent != null && !this.parent.isDisposed()) {
+	//			this.parent.getDisplay().syncExec(new Runnable() {
+	//
+	//				@Override
+	//				public void run() {
+	//					try {
+	//						refresh(update);
+	//					} catch (Exception e) {
+	//						// TODO Auto-generated catch block
+	//						e.printStackTrace();
+	//					}
+	//				}
+	//			});
+	//		}
+	//	}
 
 	/**
 	 * Synchronizes the editor widgets with the result parameters. 
@@ -1142,9 +1141,9 @@
 			try {
 				f.setAccessible(true);
 				object = f.get(this);
-//				if (object == null) {
-//					continue; // widget not set
-//				}
+				//				if (object == null) {
+				//					continue; // widget not set
+				//				}
 				value = this.getResult().getParameter(parameter.key(), true); // propagate to all parents
 
 				if (value == null) {
@@ -1155,16 +1154,16 @@
 					((ToolItem)object).setSelection((Boolean) value); 
 				}
 				else if(object instanceof FloatSpinner)	{
-					
+
 					((FloatSpinner)object).setData(BaseAbstractComputeListener.IGNORE_EVENT, true);
-					
+
 					if(value instanceof Double) {
 						((FloatSpinner)object).setSelection((Double) value);	
 					}
 					else {
 						((FloatSpinner)object).setSelection((Float) value);
 					}
-					
+
 					((FloatSpinner)object).setData(BaseAbstractComputeListener.IGNORE_EVENT, false);
 				}
 				else if(object instanceof Spinner)	{
@@ -1705,11 +1704,11 @@
 	 */
 	protected void removeComputeButton()	{
 		if (this.computeButton != null && !this.computeButton.isDisposed()) {
-			
+
 			// FIXME: SJ: the contribution should be released before the dispose but this code doesn't seem to work. And without the release the code in createPartControl() that disposes the first line composite  if empty doesn't work
-//			IMenuService menuService = (IMenuService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IMenuService.class);
-//			menuService.releaseContributions((ContributionManager) ((HandledContributionItem) this.computeButton.getData()).getParent());
-			
+			//			IMenuService menuService = (IMenuService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IMenuService.class);
+			//			menuService.releaseContributions((ContributionManager) ((HandledContributionItem) this.computeButton.getData()).getParent());
+
 			this.computeButton.dispose();
 		}
 	}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/Load080BinaryCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/Load080BinaryCorpus.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/Load080BinaryCorpus.java	(revision 1615)
@@ -32,8 +32,11 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.osgi.util.NLS;
 import org.txm.Toolbox;
+import org.txm.core.results.TXMResult;
+import org.txm.objects.BaseOldParameters;
 import org.txm.objects.Project;
 import org.txm.rcp.messages.TXMUIMessages;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.utils.DeleteDir;
 import org.txm.utils.logger.Log;
 import org.txm.utils.zip.Zip;
@@ -58,7 +61,7 @@
 	 * @return the base
 	 * @throws Exception the exception
 	 */
-	public static Project loadBinaryCorpus(File zipFile, IProgressMonitor monitor) throws Exception {
+	public static Project loadBinaryCorpusArchive(File zipFile, IProgressMonitor monitor) throws Exception {
 		//ZIPPED FILE
 		if (monitor != null) monitor.beginTask(TXMUIMessages.loadingBinaryCorpus, 100);
 		if (monitor != null) monitor.subTask(TXMUIMessages.extractingBinaryCorpus);
@@ -70,6 +73,12 @@
 			System.out.println("Aborting loading of "+zipFile+". A corpus with the same name already exists.");
 			return null;
 		}
+		
+		File corpusDirectory = new File(Toolbox.workspace.getLocation(), basedirname);
+		if (corpusDirectory.exists()) {
+			System.out.println("Aborting loading of "+zipFile+". A directory with the same name already exists: "+corpusDirectory);
+			return null;
+		}
 
 		if (!canLoad(zipFile)) {
 			Log.severe(NLS.bind(TXMUIMessages.binaryCorpusIsNotATXM080CorpusNoSettingsNorProjectFile, zipFile.getName()));
@@ -89,7 +98,7 @@
 		if (monitor != null) monitor.worked(50);
 
 		if (monitor != null) monitor.subTask(TXMUIMessages.loadingTheCorpusInThePlatform);
-		File corpusDirectory = new File(Toolbox.workspace.getLocation(), basedirname);
+		
 
 		// test with CQP MainCorpus name
 		File dataDirectory = new File(corpusDirectory, "data");
@@ -136,7 +145,17 @@
 			return null;
 		}
 
-		Toolbox.workspace.saveParameters();
-		return project;
+		boolean ok = true;
+		for (TXMResult r : project.getChildren(MainCorpus.class)) {
+			MainCorpus c = (MainCorpus)r;
+			ok = ok && c.compute(false);
+		}
+		if (ok) {
+			project.saveParameters();
+			return project;
+		} else {
+			project.delete();
+			return null;
+		}
 	}
 }
\ No newline at end of file
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java	(revision 1615)
@@ -12,8 +12,10 @@
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.objects.Project;
 import org.txm.rcp.commands.CloseEditorsUsing;
+import org.txm.rcp.commands.RestartTXM;
 import org.txm.rcp.handlers.scripts.ExecuteImportScript;
 import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
 
 public class UpdateCorpus extends AbstractHandler {
@@ -62,6 +64,14 @@
 			@Override
 			protected IStatus run(IProgressMonitor monitor) {
 				if (project.compute(monitor)) {
+					
+					this.syncExec(new Runnable() {
+						
+						@Override
+						public void run() {
+							RestartTXM.reloadViews();
+						}
+					});
 					return Status.OK_STATUS;
 				} else {
 					return Status.CANCEL_STATUS;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java	(revision 1615)
@@ -132,14 +132,18 @@
 				}
 				this.releaseSemaphore();
 
+				for (Project newProject2 : newProjects) {
+					try {
+						newProject2.compute(true);
+					} catch (Exception e) {
+						e.printStackTrace();
+					}
+				}
+				System.out.println(NLS.bind(TXMUIMessages.P0CorpusLoaded, newProjects.size()));
+				
 				this.syncExec(new Runnable() {
 					@Override
 					public void run() {
-						
-						for (Project newProject2 : newProjects) {
-							newProject2.compute();
-						}
-						System.out.println(NLS.bind(TXMUIMessages.P0CorpusLoaded, newProjects.size()));
 						RestartTXM.reloadViews();
 						System.err.println(TXMUIMessages.info_txmIsReady);
 						StatusLine.setMessage(TXMUIMessages.info_txmIsReady);
@@ -179,7 +183,10 @@
 			job.releaseSemaphore();
 
 			monitor.subTask(TXMUIMessages.loadingTheCorpusInThePlatform);
-			for (File corpusDirectory : corporaDirectory.listFiles(IOUtils.FILTER_HIDDEN)) {
+			for (File corpusDirectory : corporaDirectory.listFiles(IOUtils.HIDDENFILE_FILTER)) {
+				if (corpusDirectory.isHidden()) {
+					continue;
+				}
 				
 				Project project = Toolbox.workspace.getProject(corpusDirectory.getName().toUpperCase());
 				if (project != null) {
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/Load079BinaryCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/Load079BinaryCorpus.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/Load079BinaryCorpus.java	(revision 1615)
@@ -51,7 +51,7 @@
 		String basedirname = Zip.getRoot(zipFile);
 		return Zip.hasEntries(zipFile, basedirname+"/import.xml", basedirname+"/data/", basedirname+"/txm/", basedirname+"/HTML/", basedirname+"/registry/");
 	}
-	
+
 	/**
 	 * Load a 0.7.9 binary corpus archive: 
 	 * 
@@ -66,22 +66,28 @@
 
 		final File corporaDir = Toolbox.workspace.getLocation(); //$NON-NLS-1$
 		corporaDir.mkdir();
-		
+
 		String basedirname = Zip.getRoot(zipFile);
-		
+
 		Project p = Toolbox.workspace.getProject(basedirname.toUpperCase());
 		if (p != null) {
 			System.out.println(NLS.bind(TXMUIMessages.abortingLoadingOfPOACorpusWithTheSameNameAlreadyExists, zipFile));
 			return null;
 		}
 		
+		File corpusDirectory = new File(corporaDir, basedirname);
+		if (corpusDirectory.exists()) {
+			System.out.println("Aborting loading of "+zipFile+". A directory with the same name already exists: "+corpusDirectory);
+			return null;
+		}
+
 		if (!canLoad(zipFile)) {
 			System.out.println(TXMUIMessages.binaryCorpusIsNotATXM079CorpusNoImportXmlFile);	
 			return null;
 		}
 
 		System.out.println(NLS.bind(TXMUIMessages.loadingTheP0BinaryCorpusAsATXM079Corpus, zipFile.getName()));
-		
+
 		//ZIPPED FILE
 		monitor.beginTask(TXMUIMessages.loadingBinaryCorpus, 100);
 		monitor.subTask(TXMUIMessages.extractingBinaryCorpus);
@@ -127,15 +133,17 @@
 			Log.severe(NLS.bind(TXMUIMessages.failedToLoadCorpusFromDirectoryColonP0WeCannotFindTheNecessaryComponents, binCorpusDirectory)); 
 			return null;
 		}
-		
+
 		MainCorpus c = new MainCorpus(project);
 		BaseOldParameters params = new BaseOldParameters(new File(binCorpusDirectory, "import.xml"));
 		params.load();
 		c._load(params.getCorpusElement());
-		
-		project.saveParameters(true);
-
-		//Toolbox.workspace.save();
-		return project;
+		if (c.compute(false)) {
+			project.saveParameters(true);
+			return project;
+		} else {
+			project.delete();
+			return null;
+		}
 	}
 }
\ No newline at end of file
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java	(revision 1615)
@@ -118,10 +118,11 @@
 
 				zipFile = new File(path, filename);
 				LastOpened.set(ID, zipFile);
+			} else {
+				return null;
 			}
 		}
 
-
 		return loadBinaryCorpusArchive(zipFile);
 	}
 
@@ -268,7 +269,7 @@
 
 			//CHECK ZIPPED FILE
 			if (Load080BinaryCorpus.canLoad(zipFile)) {
-				project = Load080BinaryCorpus.loadBinaryCorpus(zipFile, monitor);
+				project = Load080BinaryCorpus.loadBinaryCorpusArchive(zipFile, monitor);
 			} else if (Load079BinaryCorpus.canLoad(zipFile)) {
 				project = Load079BinaryCorpus.loadBinaryCorpusArchive(zipFile, monitor);
 			} else {
@@ -276,7 +277,7 @@
 				return null;
 			}
 			if (project == null) {
-				System.out.println(NLS.bind("Error: could not load {0} corpus.", zipFile));
+				System.out.println(NLS.bind("Error: could not load the {0} corpus.", zipFile));
 				return null; 
 			}
 
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 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 1615)
@@ -781,7 +781,7 @@
 
 		corporaDir = new File(txmhomedir, "corpora"); //$NON-NLS-1$
 
-		File[] corporaDirFiles = corporaDir.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] corporaDirFiles = corporaDir.listFiles(IOUtils.HIDDENFILE_FILTER);
 		if (corporaDir.exists() && corporaDirFiles != null && corporaDirFiles.length > 0) { // if the txmhomedir is not empty, try to restore its content
 			Display.getDefault().syncExec(new Runnable() {
 				@Override
@@ -807,7 +807,7 @@
 					DeleteDir.deleteDirectory(oldbackup); // ]8)
 				}
 
-				File[] corpDirs = corporaDir.listFiles(IOUtils.FILTER_HIDDEN);
+				File[] corpDirs = corporaDir.listFiles(IOUtils.HIDDENFILE_FILTER);
 				ArrayList<String> moved = new ArrayList<String>();
 				ArrayList<String> failed = new ArrayList<String>();
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/AdapterFactory.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/AdapterFactory.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/AdapterFactory.java	(revision 1615)
@@ -46,7 +46,6 @@
 import org.txm.searchengine.cqp.corpus.CorpusManager;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
 
-// TODO: Auto-generated Javadoc
 /**
  * A factory for creating Adapter objects.
  * 
@@ -58,56 +57,6 @@
 
 	private HashMap<Class, IWorkbenchAdapter> externalAdapters = new HashMap<Class, IWorkbenchAdapter>();
 
-	/** The corpus manager adapter. */
-	private IWorkbenchAdapter corpusManagerAdapter = new IWorkbenchAdapter() {
-
-		@Override
-		public Object[] getChildren(Object corpusManager) {
-			Object[] children = null;
-			try {
-				List<MainCorpus> corpora = new ArrayList<MainCorpus>(CorpusManager.getCorpusManager().getCorpora());
-				Collections.sort(corpora, new Comparator<MainCorpus>() {
-					@Override
-					public int compare(MainCorpus o1, MainCorpus o2) {
-						return o1.getName().compareTo(o2.getName());
-					}
-				});
-
-				// check if each corpus has a Base
-				if (firstCorpusDiag) {	
-					firstCorpusDiag = false;
-					for (MainCorpus corpus : corpora) {
-						if (corpus.getProject() == null) {
-							System.out.println(NLS.bind(TXMUIMessages.warningColonTheCorpusP0IsCorruptedSomeCommandsWontWorkCorrectly, corpus));
-						}
-					}
-				}
-				children = corpora.toArray();
-
-			} catch (CqiClientException e) {
-				return new Object[0];
-			}
-			return children;
-		}
-
-		@Override
-		public ImageDescriptor getImageDescriptor(Object corpusManager) {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		@Override
-		public String getLabel(Object corpusManager) {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		@Override
-		public Object getParent(Object corpusManager) {
-			return null;
-		}
-	};
-
 //	/** The corpus adapter. */
 //	private IWorkbenchAdapter corpusAdapter = new IWorkbenchAdapter() {
 //
@@ -202,9 +151,9 @@
 	 */
 	@Override
 	public Object getAdapter(Object adaptableObject, Class adapterType) {
-		if (adapterType == IWorkbenchAdapter.class && adaptableObject instanceof CorpusManager) {
-			return corpusManagerAdapter;
-		}
+//		if (adapterType == IWorkbenchAdapter.class && adaptableObject instanceof CorpusManager) {
+//			return corpusManagerAdapter;
+//		}
 //		if (adapterType == IWorkbenchAdapter.class && adaptableObject instanceof Corpus) {
 //			return corpusAdapter;
 //		}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/QueriesView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/QueriesView.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/QueriesView.java	(revision 1615)
@@ -134,11 +134,10 @@
 		tv.setLabelProvider(new TxmObjectLabelProvider());
 		if (Toolbox.workspace != null) {
 			try {
-				Collection<MainCorpus> input = CorpusManager.getCorpusManager().getCorpora();
+				Collection<MainCorpus> input = CorpusManager.getCorpusManager().getCorpora().values();
 				tv.setInput(input);
 				refresh();
-			} catch (CqiClientException e) {
-				// TODO Auto-generated catch block
+			} catch (Exception e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 			}
 		}
@@ -182,7 +181,7 @@
 				try {
 					FileWriter writer = new FileWriter(output);
 					writer.write(TXMUIMessages.queriesColon);
-					for (MainCorpus b : CorpusManager.getCorpusManager().getCorpora()) {
+					for (MainCorpus b : CorpusManager.getCorpusManager().getCorpora().values()) {
 						writer.write(" " + b.getID() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 						for (SavedQuery q : b.getQueriesLog()) {
 							writer.write("  " + q + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -194,7 +193,7 @@
 					refresh();
 				} catch (IOException e) {
 					Log.severe("Error while exporting queries: "+e.getLocalizedMessage());
-				} catch (CqiClientException e) {
+				} catch (Exception e) {
 					// TODO Auto-generated catch block
 					org.txm.utils.logger.Log.printStackTrace(e);
 				}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/SummaryView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/SummaryView.java	(revision 1614)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/SummaryView.java	(revision 1615)
@@ -168,10 +168,10 @@
 		//init combo
 		try {
 			corpusCombo.removeAll();
-			for (MainCorpus p : CorpusManager.getCorpusManager().getCorpora()) {
+			for (MainCorpus p : CorpusManager.getCorpusManager().getCorpora().values()) {
 				corpusCombo.add(p.getName());
 			}
-		} catch (CqiClientException e2) {
+		} catch (Exception e2) {
 			// TODO Auto-generated catch block
 			org.txm.utils.logger.Log.printStackTrace(e2);
 		}
Index: tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/ImportGlozzCorpus.java
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/ImportGlozzCorpus.java	(revision 1614)
+++ tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/ImportGlozzCorpus.java	(revision 1615)
@@ -182,7 +182,7 @@
 						}
 						Corpus analecCorpus = URSCorpora.getCorpus(corpus);
 						analecCorpus.clearAll(); // remove all : annotations, structure
-						File[] ecFiles = ecDir.listFiles(IOUtils.FILTER_HIDDEN);
+						File[] ecFiles = ecDir.listFiles(IOUtils.HIDDENFILE_FILTER);
 						Arrays.sort(ecFiles);
 						for (File ecFile : ecFiles) {
 							FichiersJava.concatener(ecFile, analecCorpus);
Index: tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/TEI2Project.java
===================================================================
--- tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/TEI2Project.java	(revision 1614)
+++ tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/TEI2Project.java	(revision 1615)
@@ -203,10 +203,10 @@
 				return false;
 			}
 
-			if (imagesDirectory.exists() && imagesDirectory.listFiles(IOUtils.FILTER_HIDDEN).length > 0) {
+			if (imagesDirectory.exists() && imagesDirectory.listFiles(IOUtils.HIDDENFILE_FILTER).length > 0) {
 				System.out.println("Copying images files from "+imagesDirectory+" to "+imgDirectory+"...");
 				FileCopy.copyFiles(imagesDirectory, imgDirectory);
-				File[] files = imgDirectory.listFiles(IOUtils.FILTER_HIDDEN);
+				File[] files = imgDirectory.listFiles(IOUtils.HIDDENFILE_FILTER);
 				if (files != null) System.out.println(""+files.length+" images copied.");
 			}
 
Index: tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/Project2XTZ.java
===================================================================
--- tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/Project2XTZ.java	(revision 1614)
+++ tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/Project2XTZ.java	(revision 1615)
@@ -95,7 +95,7 @@
 		File wFile = null;
 		File cFile = null;
 
-		File[] xmlFiles = textDirectory.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] xmlFiles = textDirectory.listFiles(IOUtils.HIDDENFILE_FILTER);
 		if (xmlFiles == null) return false;
 
 		for (File xmlFile : xmlFiles) {
@@ -140,7 +140,7 @@
 		}
 		// INJECT ontologies 
 		System.out.println("Injecting ontologies...");
-		for (File f : cDirectory.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File f : cDirectory.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (f.getName().startsWith(cDirectory.getName())) {
 				OntologiesProjection cp = new OntologiesProjection(f, projectDirectory);
 				File outputFile = new File(cDirectory, "temp.xml");
Index: tmp/org.txm.utils/src/org/txm/utils/CharsetDetector.java
===================================================================
--- tmp/org.txm.utils/src/org/txm/utils/CharsetDetector.java	(revision 1614)
+++ tmp/org.txm.utils/src/org/txm/utils/CharsetDetector.java	(revision 1615)
@@ -28,7 +28,7 @@
 	
 	private void processDirectory(File dir)
 	{
-		for (File file : dir.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File file : dir.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (file.isFile()) {
 				try {
 					processFile(file);
Index: tmp/org.txm.utils/src/org/txm/utils/io/IOUtils.java
===================================================================
--- tmp/org.txm.utils/src/org/txm/utils/io/IOUtils.java	(revision 1614)
+++ tmp/org.txm.utils/src/org/txm/utils/io/IOUtils.java	(revision 1615)
@@ -44,10 +44,10 @@
 	/**
 	 * select only files not hidden
 	 */
-	public static final FileFilter FILTER_HIDDEN = new FileFilter() {
+	public static final FileFilter HIDDENFILE_FILTER = new FileFilter() {
 		@Override
 		public boolean accept(File file) {
-			return !file.isHidden();
+			return !file.isHidden() && !file.getName().startsWith(".") && !file.getName().endsWith("~");
 		}
 	};
 	
@@ -56,7 +56,7 @@
 	 * @return a list containing the files not hidden
 	 */
 	public List<File> listFiles(File dir) {
-		File[] files = dir.listFiles(FILTER_HIDDEN);
+		File[] files = dir.listFiles(HIDDENFILE_FILTER);
 		if (files == null) return new ArrayList<File>();
 		
 		return Arrays.asList(files);
Index: tmp/org.txm.utils/src/org/txm/utils/logger/Log.java
===================================================================
--- tmp/org.txm.utils/src/org/txm/utils/logger/Log.java	(revision 1614)
+++ tmp/org.txm.utils/src/org/txm/utils/logger/Log.java	(revision 1615)
@@ -219,7 +219,16 @@
 	public static void severe(String message) {
 		if (Level.SEVERE.intValue() >= txm.getLevel().intValue()) {
 			System.out.println(message);
+			System.out.println("STACKTRACE:");
+			int n = 1;
+			for (StackTraceElement t : Thread.currentThread().getStackTrace()) {
+				if (t.getClassName().startsWith("org.txm.") && !t.getClassName().startsWith(Log.class.getName())) {
+					System.out.println(String.format("[%2d]\t",n++)+t);
+					//System.out.println(""+(n++)+"\t"+t);
+				}
+			}
 		}
+		
 		txm.severe(message);
 	}
 
@@ -241,6 +250,14 @@
 	public static void warning(String message) {
 		if (Level.WARNING.intValue() >= txm.getLevel().intValue()) {
 			System.out.println(message);
+			System.out.print("AT: ");
+			int n = 1;
+			for (StackTraceElement t : Thread.currentThread().getStackTrace()) {
+				if (t.getClassName().startsWith("org.txm.") && !t.getClassName().startsWith(Log.class.getName())) {
+					System.out.println(t);
+					break;
+				}
+			}
 		}
 		txm.warning(message);
 	}
Index: tmp/org.txm.utils/src/org/txm/utils/LangDetector.java
===================================================================
--- tmp/org.txm.utils/src/org/txm/utils/LangDetector.java	(revision 1614)
+++ tmp/org.txm.utils/src/org/txm/utils/LangDetector.java	(revision 1615)
@@ -58,7 +58,7 @@
 	{
 		//println "process $dir"
 		if(dir.isDirectory()) {
-			for (File file : dir.listFiles(IOUtils.FILTER_HIDDEN))
+			for (File file : dir.listFiles(IOUtils.HIDDENFILE_FILTER))
 				if (file.isFile())
 					processFile(file);
 		} else {
@@ -104,7 +104,7 @@
 
 	public static void configFromModels(File dir)
 	{
-		File[] files = dir.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] files = dir.listFiles(IOUtils.HIDDENFILE_FILTER);
 		Arrays.sort(files);
 		for(File f : files)
 			if(f.getName().contains(".lm") && !f.getName().contains("-"))
Index: tmp/org.txm.core.tests/src/org/txm/core/tests/junit/PluginMessages.java
===================================================================
--- tmp/org.txm.core.tests/src/org/txm/core/tests/junit/PluginMessages.java	(revision 1614)
+++ tmp/org.txm.core.tests/src/org/txm/core/tests/junit/PluginMessages.java	(revision 1615)
@@ -55,7 +55,7 @@
 		}
 
 		// test content
-		File[] files = messagesPackageDirectory.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] files = messagesPackageDirectory.listFiles(IOUtils.HIDDENFILE_FILTER);
 		if (files == null) {
 			error("No messages class file.");
 			return;
Index: tmp/org.txm.core.tests/src/org/txm/core/tests/junit/PluginExtPoints.java
===================================================================
--- tmp/org.txm.core.tests/src/org/txm/core/tests/junit/PluginExtPoints.java	(revision 1614)
+++ tmp/org.txm.core.tests/src/org/txm/core/tests/junit/PluginExtPoints.java	(revision 1615)
@@ -36,7 +36,7 @@
 	private void testDeclaredExtPoints(File projectDirectory) throws IOException {
 		File schemaDirectory = new File(projectDirectory, "schema");
 		if (schemaDirectory.exists()) {
-			for (File schemaXML : schemaDirectory.listFiles(IOUtils.FILTER_HIDDEN)) {
+			for (File schemaXML : schemaDirectory.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 				if (schemaXML.isDirectory()) continue;
 				ArrayList<String> ids = IOUtils.findWithGroup(schemaXML, "<meta.schema plugin=\"[^\"]+\" id=\"([^\"]+)\" name=\"[^\"]+\"/>", true);
 				ArrayList<String> classes = IOUtils.findWithGroup(schemaXML, "<meta.attribute kind=\"java\" basedOn=\"([^:]+):\"/>", true);
@@ -88,7 +88,7 @@
 
 				File schemaDirectory = new File(projectDirectory, "schema");
 				if (schemaDirectory.exists()) {
-					for (File schemaXML : schemaDirectory.listFiles(IOUtils.FILTER_HIDDEN)) {
+					for (File schemaXML : schemaDirectory.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 						if (!schemaXML.isFile()) continue;
 						if (!schemaXML.getName().endsWith(".exsd")) continue;
 						ArrayList<String> ids = IOUtils.findWithGroup(schemaXML, "<meta.schema plugin=\"[^\"]+\" id=\"([^\"]+)\" name=\"[^\"]+\"/>", true);
Index: tmp/org.txm.core.tests/src/org/txm/core/tests/junit/PluginPreferences.java
===================================================================
--- tmp/org.txm.core.tests/src/org/txm/core/tests/junit/PluginPreferences.java	(revision 1614)
+++ tmp/org.txm.core.tests/src/org/txm/core/tests/junit/PluginPreferences.java	(revision 1615)
@@ -22,7 +22,7 @@
 		}
 		
 		// test content
-		File[] files = preferencePackageDirectory.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] files = preferencePackageDirectory.listFiles(IOUtils.HIDDENFILE_FILTER);
 		if (files == null) {
 			error("No preference class file.");
 			return;
Index: tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java
===================================================================
--- tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 1614)
+++ tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 1615)
@@ -1209,8 +1209,6 @@
 		});
 
 		queryArea.layout();
-
-
 	}
 
 	/**
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CorpusManager.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CorpusManager.java	(revision 1614)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CorpusManager.java	(revision 1615)
@@ -28,6 +28,7 @@
 package org.txm.searchengine.cqp.corpus;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 import org.txm.Toolbox;
@@ -67,12 +68,14 @@
 	private static CorpusManager corpusManager = null;
 
 	/** the corpora. */
-	private static List<MainCorpus> corpora = null;
+	private static HashMap<String, MainCorpus> corpora = null;
 
 	/**
 	 * Instantiates a new corpus manager.
 	 */
-	private CorpusManager() { }
+	private CorpusManager() { 
+		corpora = new HashMap<String, MainCorpus>();
+	}
 
 	/**
 	 * Sets the cqi client.
@@ -90,8 +93,8 @@
 	 * @return the corpus manager
 	 */
 	public static CorpusManager getCorpusManager() {
-		if (cqiClient == null)
-			throw new RuntimeException(TXMCoreMessages.cQiClientNotInitialized);
+//		if (cqiClient == null)
+//			throw new RuntimeException(TXMCoreMessages.cQiClientNotInitialized);
 		if (corpusManager == null)
 			corpusManager = new CorpusManager();
 		return corpusManager;
@@ -110,7 +113,7 @@
 	 * Clean corpora : empty the 'corpora' member.
 	 */
 	public static void cleanCorpora() {
-		corpora = null;
+		corpora = new HashMap<String, MainCorpus>();
 	}
 
 	/**
@@ -123,13 +126,12 @@
 	 */
 	public MainCorpus getCorpus(String corpusName) throws CqiClientException,
 			InvalidCqpIdException {
-		// return new MainCorpus(corpusName);
 		if (corpora == null) {
 			// System.out.println("error corpora is null ");
 			this.getCorpora();
 		}
 
-		for (MainCorpus corpus : CorpusManager.corpora) {
+		for (MainCorpus corpus : CorpusManager.corpora.values()) {
 			if (corpus.getID().equals(corpusName)) {
 				// System.out.println("found corpus "+corpusName);
 				return corpus;
@@ -142,9 +144,6 @@
 				return (MainCorpus) c;
 			}
 		}
-//		MainCorpus c = null;//new MainCorpus(corpusName);
-		//this.corpora.add(c);
-		// corpora.add(c);
 		return null;
 	}
 
@@ -157,7 +156,7 @@
 	public boolean hasCorpus(String name) {
 		if (corpora == null)
 			return false;
-		for (MainCorpus c : corpora)
+		for (MainCorpus c : corpora.values())
 			if (name.equals(c.getID()))
 				return true;
 		return false;
@@ -171,38 +170,38 @@
 	 * @throws CqiClientException
 	 *             the cqi client exception
 	 */
-	public List<MainCorpus> getCorpora() throws CqiClientException {
-		//System.out.println("get corpora");
-		if (corpora != null)
-			return corpora;
-
-		String[] corporaName;
-		try {
-			corporaName = cqiClient.listCorpora();
-		} catch (Exception e) {
-			throw new CqiClientException(e);
-		}
-
-		corpora = new ArrayList<MainCorpus>(corporaName.length);
-		for (int i = 0; i < corporaName.length; i++) {
-			try {
-				MainCorpus c = this.getCorpus(corporaName[i]);
-				if (c != null) corpora.add(c);
-			} catch (InvalidCqpIdException e) {
-				throw new CqiClientException(TXMCoreMessages.errorColonThisExceptionShouldNotBeThrown, e);
-			}
-		}
-		
-		for (CQPCorpus corpus : corpora) {
-			try {
-				corpus.setCharset(cqiClient.corpusCharset(corpus.getCqpId()));
-				// TODO : implements cqiClient.corpusLanguage
-				// corpus.setLanguage(cqiClient.corpusLanguage(corpus.getCqpId()));
-			} catch (Exception e) {
-				org.txm.utils.logger.Log.printStackTrace(e);
-			}
-		}
-		// System.out.println("END creating corpora");
+	public HashMap<String, MainCorpus> getCorpora() {
+//		//System.out.println("get corpora");
+//		if (corpora != null)
+//			return corpora;
+//
+//		String[] corporaName;
+//		try {
+//			corporaName = cqiClient.listCorpora();
+//		} catch (Exception e) {
+//			throw new CqiClientException(e);
+//		}
+//
+//		corpora = new ArrayList<MainCorpus>(corporaName.length);
+//		for (int i = 0; i < corporaName.length; i++) {
+//			try {
+//				MainCorpus c = this.getCorpus(corporaName[i]);
+//				if (c != null) corpora.add(c);
+//			} catch (InvalidCqpIdException e) {
+//				throw new CqiClientException(TXMCoreMessages.errorColonThisExceptionShouldNotBeThrown, e);
+//			}
+//		}
+//		
+//		for (CQPCorpus corpus : corpora) {
+//			try {
+//				corpus.setCharset(cqiClient.corpusCharset(corpus.getCqpId()));
+//				// TODO : implements cqiClient.corpusLanguage
+//				// corpus.setLanguage(cqiClient.corpusLanguage(corpus.getCqpId()));
+//			} catch (Exception e) {
+//				org.txm.utils.logger.Log.printStackTrace(e);
+//			}
+//		}
+//		// System.out.println("END creating corpora");
 		return corpora;
 	}
 
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java	(revision 1614)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java	(revision 1615)
@@ -81,15 +81,12 @@
 	public MainCorpus(Project project) throws InvalidCqpIdException, CqiClientException {
 		super(project);
 		this.internalPersistable = true;
-
-		this.dataDirectory = new File(getProjectDirectory(), "data/"+getID());
-		this.registryFile = new File(getProjectDirectory(), "registry/"+getID().toLowerCase());
 	}
 
 	/**
-	 * Instantiates a new sub corpus
+	 * <del>Instantiates a new sub corpus</del>
 	 * 
-	 * @param corpus2 the parent corpus
+	 * @param partition the parent partition -> only used for subcorpus
 	 */
 	public MainCorpus(Partition partition) {
 		super(partition);
@@ -111,14 +108,14 @@
 	 */
 	public MainCorpus(String parametersNodePath) throws InvalidCqpIdException, CqiClientException {
 		super(parametersNodePath);
-
 		this.internalPersistable = true;
 
-		this.dataDirectory = new File(getProjectDirectory(), "data/"+getID());
-		this.registryFile = new File(getProjectDirectory(), "registry/"+getID().toLowerCase());
+		if (getID() != null && getProjectDirectory() != null) {
+			this.dataDirectory = new File(getProjectDirectory(), "data/"+getID());
+			this.registryFile = new File(getProjectDirectory(), "registry/"+getID().toLowerCase());
+		}
 	}
 
-
 	/**
 	 * Check whether the ID is a valid CQP ID.
 	 * 
@@ -555,7 +552,6 @@
 		return 1;
 	}
 
-
 	@Override
 	public String getSimpleName() {
 		if (modified) {
@@ -565,17 +561,12 @@
 			return getName();
 		}
 	}
-
+	
+	
 	protected boolean modified = false;
-	/**
-	 * list of loaded/computed corpus
-	 */
-	private static HashMap<String, MainCorpus> corpora = new HashMap<String, MainCorpus>();
 	public boolean isModified() { return modified; }
 	public void setIsModified(boolean b) { modified = b; }
 
-
-
 	@Override
 	public String getDetails() {
 		try {
@@ -589,8 +580,8 @@
 	public void clean() {
 		super.clean();
 
-		if (corpora.get(this.pID) == this) { // un register the MainCorpus
-			corpora.remove(this.pID);
+		if (CorpusManager.getCorpusManager().getCorpora().get(this.pID) == this) { // un register the MainCorpus
+			CorpusManager.getCorpusManager().getCorpora().remove(this.pID);
 		}
 
 		try {
@@ -602,8 +593,12 @@
 			Log.printStackTrace(e);
 		}
 
-		DeleteDir.deleteDirectory(dataDirectory);
-		registryFile.delete();
+		if (dataDirectory != null) {
+			DeleteDir.deleteDirectory(dataDirectory);
+		}
+		if (registryFile != null) {
+			registryFile.delete();
+		}
 
 		Toolbox.notifyEngines(this, "clean");
 	}
@@ -640,10 +635,12 @@
 
 	@Override
 	protected boolean _compute() throws Exception {
+		HashMap<String, MainCorpus> corpora = CorpusManager.getCorpusManager().getCorpora();
 		if (corpora.get(this.pID) != null && corpora.get(this.pID) != this) {
-			System.out.println(NLS.bind("Warning: duplicated \"{0}\" CQP corpus in \"{1}\"", this.pID, this.getProjectDirectory()));
+			Log.severe(NLS.bind("** Error: the \"{0}\" MainCorpus object in the \\\"{1}\\\" project can not be computed: another one with the same CQP identifier has already been computed.", this.pID, this.getProjectDirectory()));
 			return false;
 		}
+		corpora.put(this.pID, this);
 
 		if (CQPSearchEngine.isInitialized()) {
 			try {
@@ -656,6 +653,10 @@
 				return false;
 			}
 		}
+		
+		this.dataDirectory = new File(getProjectDirectory(), "data/"+getID());
+		this.registryFile = new File(getProjectDirectory(), "registry/"+getID().toLowerCase());
+		
 		return true;
 	}
 
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPSearchEngine.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPSearchEngine.java	(revision 1614)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPSearchEngine.java	(revision 1615)
@@ -2,6 +2,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.util.HashMap;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.txm.Toolbox;
@@ -20,6 +21,7 @@
 import org.txm.searchengine.cqp.clientExceptions.ServerNotFoundException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
 import org.txm.searchengine.cqp.corpus.CorpusManager;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.searchengine.cqp.corpus.query.CQLQuery;
 import org.txm.utils.OSDetector;
 import org.txm.utils.Sh;
@@ -36,6 +38,11 @@
 	 */
 	boolean state = false;
 	boolean useNetCQi = false;
+	
+	/**
+	 * list of CQP loaded/computed corpus
+	 */
+	private HashMap<String, MainCorpus> corpora = new HashMap<String, MainCorpus>();
 
 	@Override
 	public String getName() {
@@ -53,6 +60,8 @@
 		if (monitor != null) {
 			monitor.subTask("Starting Corpus Engine...");
 		}
+		
+		CorpusManager.cleanCorpora();// to be sure to call cqpserver
 
 		boolean cqiserverok = false;
 
@@ -72,7 +81,7 @@
 			Log.severe("Error: Toolbox is not correctly initialized. Aborting CQP engine start...");
 			return false;
 		}
-		for (File binDir : wl.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File binDir : wl.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (!binDir.isDirectory()) continue;
 			if (binDir.getName().startsWith(".")) continue;
 			if (binDir.getName().startsWith("~")) continue;
@@ -80,7 +89,7 @@
 			File registryDir = new File(binDir, "registry");
 			if (!registryDir.isDirectory()) continue;
 			
-			File[] files = registryDir.listFiles(IOUtils.FILTER_HIDDEN);
+			File[] files = registryDir.listFiles(IOUtils.HIDDENFILE_FILTER);
 			if (files != null && files.length > 0) {
 				reg_path += path_separator + registryDir.getAbsolutePath();
 				for (File registryFile : files) {
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java	(revision 1614)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java	(revision 1615)
@@ -328,7 +328,7 @@
 			return;
 		}
 
-		for (File corpus : corpora.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File corpus : corpora.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (!corpus.isDirectory()) continue;
 			
 			System.out.println(TXMCoreMessages.bind(CQPSearchEngineCoreMessages.processingCorpus, corpus.getName()));
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/FixMilestoneDeclarations.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/FixMilestoneDeclarations.java	(revision 1614)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/FixMilestoneDeclarations.java	(revision 1615)
@@ -58,7 +58,7 @@
 		reader.close();
 		if (debug) System.out.println("Structures: "+structures);
 
-		File[] files = dataDirectory.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] files = dataDirectory.listFiles(IOUtils.HIDDENFILE_FILTER);
 		if (files == null) return false;
 
 		//removing empty data files
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/PatchCwbRegistry.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/PatchCwbRegistry.java	(revision 1614)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/PatchCwbRegistry.java	(revision 1615)
@@ -282,7 +282,7 @@
 			System.out.println("rename "+oldname+".* files to "+newname+".*"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			File datadir = new File(datapath);
 			if (datadir.exists()) {
-				for (File f : datadir.listFiles(IOUtils.FILTER_HIDDEN))
+				for (File f : datadir.listFiles(IOUtils.HIDDENFILE_FILTER))
 					if (f.getName().startsWith(oldname+".")) //$NON-NLS-1$
 						f.renameTo(new File(f.getParent(), f.getName().replace(oldname+".", newname+"."))); //$NON-NLS-1$ //$NON-NLS-2$
 			}
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/views/RVariablesView.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/views/RVariablesView.java	(revision 1614)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/views/RVariablesView.java	(revision 1615)
@@ -119,15 +119,15 @@
 	public void _reload() {
 		tv.setContentProvider(new RVariablesTreeProvider());
 		tv.setLabelProvider(new RVariablesLabelProvider());
-		List<MainCorpus> corpora;
+		Collection<MainCorpus> corpora;
 		try {
-			corpora = CorpusManager.getCorpusManager().getCorpora();
+			corpora = CorpusManager.getCorpusManager().getCorpora().values();
 			if (corpora != null)
 			{
 				buildTreeContent(corpora);
 				tv.refresh();
 			}
-		} catch (CqiClientException e) { }
+		} catch (Exception e) { }
 	}
 	
 	/**
@@ -135,7 +135,7 @@
 	 *
 	 * @param corpora the corpora
 	 */
-	protected void buildTreeContent(List<MainCorpus> corpora)
+	protected void buildTreeContent(Collection<MainCorpus> corpora)
 	{
 		ArrayList<TXMResult> notempty = new ArrayList<TXMResult>(corpora);
 		for(TXMResult container : corpora)
Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/views/knowledgerepositories/KRView.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/views/knowledgerepositories/KRView.java	(revision 1614)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/views/knowledgerepositories/KRView.java	(revision 1615)
@@ -164,12 +164,12 @@
 			public void widgetSelected(SelectionEvent arg0) {
 				// force loading KR of all corpora
 				try {
-					for (MainCorpus corpus : CorpusManager.getCorpusManager().getCorpora()) {
+					for (MainCorpus corpus : CorpusManager.getCorpusManager().getCorpora().values()) {
 						for (KnowledgeRepository kr : InitializeKnowledgeRepository.get(corpus.getMainCorpus())) {
 							kr.checkConnection();
 						}
 					}
-				} catch (CqiClientException e) {
+				} catch (Exception e) {
 					e.printStackTrace();
 					return;
 				}
Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/SimpleKRAnnotation.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/SimpleKRAnnotation.java	(revision 1614)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/SimpleKRAnnotation.java	(revision 1615)
@@ -657,10 +657,13 @@
 			if (am != null && am.hasChanges()) {
 				// && MessageDialog.openConfirm(e.display.getActiveShell(), "Confirm annotation save", "Saving annotation will close this editor. Are you sure you want to save annotations right now ?")
 				JobHandler saveJob = SaveAnnotations.save(corpus.getMainCorpus());
-				if (saveJob.getResult() == Status.CANCEL_STATUS) {
+				if (saveJob == null || saveJob.getResult() == Status.CANCEL_STATUS) {
 					// update editor corpus
 					System.out.println("Fail to save annotations of the corpus."); //$NON-NLS-1$
+					return false;
 				}
+			} else {
+				return false;
 			}
 		} catch(Exception ex) {
 			ex.printStackTrace();
Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java	(revision 1614)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java	(revision 1615)
@@ -541,7 +541,7 @@
 						// && MessageDialog.openConfirm(e.display.getActiveShell(), "Confirm annotation save", "Saving annotation will close this editor. Are you sure you want to save annotations right now ?")
 						JobHandler saveJob = SaveAnnotations.save(corpus.getMainCorpus());
 						
-						if (saveJob.getResult() == Status.CANCEL_STATUS) {
+						if (saveJob == null || saveJob.getResult() == Status.CANCEL_STATUS) {
 							// update editor corpus
 							System.out.println("Fail to save annotations of the corpus."); //$NON-NLS-1$
 						}
@@ -868,10 +868,13 @@
 			if (am != null && am.hasChanges()) {
 				// && MessageDialog.openConfirm(e.display.getActiveShell(), "Confirm annotation save", "Saving annotation will close this editor. Are you sure you want to save annotations right now ?")
 				JobHandler saveJob = SaveAnnotations.save(corpus.getMainCorpus());
-				if (saveJob.getResult() == Status.CANCEL_STATUS) {
+				if (saveJob == null || saveJob.getResult() == Status.CANCEL_STATUS) {
 					// update editor corpus
 					System.out.println("Fail to save annotations of the corpus."); //$NON-NLS-1$
+					return false;
 				}
+			} else {
+				return false;
 			}
 		} catch(Exception ex) {
 			ex.printStackTrace();
Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java	(revision 1614)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java	(revision 1615)
@@ -648,10 +648,13 @@
 			if (am != null && am.hasChanges()) {
 				// && MessageDialog.openConfirm(e.display.getActiveShell(), "Confirm annotation save", "Saving annotation will close this editor. Are you sure you want to save annotations right now ?")
 				JobHandler saveJob = SaveAnnotations.save(WordAnnotationToolbar.this.corpus.getMainCorpus());
-				if (saveJob.getResult() == Status.CANCEL_STATUS) {
+				if (saveJob == null || saveJob.getResult() == Status.CANCEL_STATUS) {
 					// update editor corpus
 					System.out.println("Fail to save annotations of the corpus."); //$NON-NLS-1$
+					return false;
 				}
+			} else {
+				return false;
 			}
 		} catch(Exception ex) {
 			ex.printStackTrace();
Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotations.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotations.java	(revision 1614)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotations.java	(revision 1615)
@@ -44,7 +44,10 @@
 			return null;
 		MainCorpus corpus = (MainCorpus) s;
 		try {
-			save(corpus);
+			JobHandler job = save(corpus);
+			if (job == null) {
+				return null;
+			}
 		} catch (Exception e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
Index: tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java
===================================================================
--- tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java	(revision 1614)
+++ tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java	(revision 1615)
@@ -59,7 +59,6 @@
 					Log.severe(GroovyMessages.errorTreeTaggerAnnotationEngineIsNotReady);
 					return Status.CANCEL_STATUS;
 				}
-				
 			}
 			
 			if (project.getDoUpdate()) {
@@ -131,33 +130,29 @@
 				Boolean readyToLoad = (Boolean)ready;
 				//System.out.println("TRY TO LOAD THE BINARY CORPUS CREATED: "+basedir);
 				if (readyToLoad) {
-//					base = LoadBinaryCorpus.loadBinaryCorpusAsDirectory(basedir);
-//					if (base == null) {
-//						System.out.println(TXMUIMessages.ExecuteScriptImport_8);
-//						if (basedir.exists()) basedir.renameTo(errorBinDirectory);
-//						if (tempBinDirectory.exists()) tempBinDirectory.renameTo(basedir);
-//						return Status.CANCEL_STATUS;
-//					}
-//					this.acquireSemaphore();
-//					Log.info("Save workspace"); //$NON-NLS-1$
-//					Toolbox.workspace.save();
-
+//					
 					Log.info(GroovyMessages.restartingToolboxSearchengines);
-					//Toolbox.restartWorkspace(null);
 					Toolbox.getEngineManager(EngineType.SEARCH).restartEngines();
 					Log.info(TXMCoreMessages.common_done);
 					
-//					DeleteDir.deleteDirectory(tempBinDirectory);
-
-					//							IWorkspace workspace = ResourcesPlugin.getWorkspace();
-					//							IProject newProject = workspace.getRoot().getProject(base.getName());
-					//							newProject.create(monitor);
-					//							newProject.open(monitor);
-					//							IFolder srcFolder = newProject.getFolder("src");
-					//							IPath path = new Path(params.rootDir);
-					//							srcFolder.createLink(path, IResource.ALLOW_MISSING_LOCAL, monitor);
 				} else {
 					Log.fine(GroovyMessages.errorImportNotCorrectlyEndedSeeConsoleMessages);
+					
+					if (!project.getDoUpdate()) { // clear all
+						Log.fine("Delete all project children.");
+						for (TXMResult c : project.getChildren()) {
+							c.delete();
+						}
+					} else {
+						Log.fine("Delete all project CorpusBuild&Edition children.");
+						for (TXMResult c : project.getChildren(CorpusBuild.class)) {
+							c.delete();
+						}
+						for (TXMResult c : project.getChildren(Edition.class)) {
+							c.delete();
+						}
+					}
+					
 //					if (basedir.exists()) basedir.renameTo(errorBinDirectory);
 //					if (tempBinDirectory.exists()) tempBinDirectory.renameTo(basedir);
 					return new Status(Status.ERROR, "org.txm.groovy.core", GroovyMessages.errorImportNotCorrectlyEndedSeeConsoleMessages);
Index: tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyImportEngine.java
===================================================================
--- tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyImportEngine.java	(revision 1614)
+++ tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyImportEngine.java	(revision 1615)
@@ -28,7 +28,7 @@
 		if (!importsPackageDirectory.exists()) {
 			return false;
 		}
-		for (File dir : importsPackageDirectory.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File dir : importsPackageDirectory.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (!dir.isDirectory()) continue;
 			
 			String name = dir.getName();
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy	(revision 1615)
@@ -141,7 +141,10 @@
 		corpus = new MainCorpus(project);
 		corpus.setID(project.getName());
 		corpus.setName(project.getName());
-		corpus.setDescription("Built with the TXT+CSV import module");
+		corpus.setDescription("Built with the XML-TRS import module");
+		if (!corpus.compute(false)) {corpus.delete();
+			return false;
+		}
 		
 		cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
 		new File(binDir,"cqp").mkdirs()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/txt/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/txt/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/txt/compiler.groovy	(revision 1615)
@@ -192,6 +192,9 @@
 		corpus.setID(project.getName());
 		corpus.setName(project.getName());
 		corpus.setDescription("Built with the TXT+CSV import module");
+		if (!corpus.compute(false)) {
+			return false;
+		}
 		
 		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
 cqpFile.delete()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/alceste/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/alceste/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/alceste/compiler.groovy	(revision 1615)
@@ -185,8 +185,10 @@
 		corpus = new MainCorpus(project);
 		corpus.setID(project.getName());
 		corpus.setName(project.getName());
-		corpus.setDescription("Build the alceste import module");
-		
+		corpus.setDescription("Build the Alceste import module");
+		if (!corpus.compute(false)) {corpus.delete();
+			return false;
+		}
 		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
 cqpFile.delete()
 		new File(binDir,"cqp").mkdirs()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/hyperbase/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/hyperbase/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/hyperbase/compiler.groovy	(revision 1615)
@@ -197,7 +197,10 @@
 		corpus = new MainCorpus(project);
 		corpus.setID(project.getName());
 		corpus.setName(project.getName());
-		corpus.setDescription("Built with the TXT+CSV import module");
+		corpus.setDescription("Built with the Hyperbase import module");
+		if (!corpus.compute(false)) {corpus.delete();
+			return false;
+		}
 		
 		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
 cqpFile.delete()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/cqp/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/cqp/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/cqp/compiler.groovy	(revision 1615)
@@ -98,7 +98,10 @@
 		corpus = new MainCorpus(project);
 		corpus.setID(project.getName());
 		corpus.setName(project.getName());
-		corpus.setDescription("Built with the TXT+CSV import module");
+		corpus.setDescription("Built with the CQP import module");
+		if (!corpus.compute(false)) {corpus.delete();
+			return false;
+		}
 		
 		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
 cqpFile.delete()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompiler.groovy	(revision 1615)
@@ -60,6 +60,10 @@
 		corpus.setID(corpusname);
 		corpus.setName(corpusname);
 		corpus.setDescription("Built with the XTZ import module");
+		if (!corpus.compute(false)) {
+			isSuccessFul = false;
+			return;
+		}
 		
 		if (module.getProject().getCleanAfterBuild()) {
 			new File(module.getBinaryDirectory(), "cqp").deleteDir()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xmltxm/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xmltxm/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xmltxm/compiler.groovy	(revision 1615)
@@ -361,7 +361,10 @@
 		corpus = new MainCorpus(project);
 		corpus.setID(project.getName());
 		corpus.setName(project.getName());
-		corpus.setDescription("Built with the TXT+CSV import module");
+		corpus.setDescription("Built with the XML-TXM import module");
+		if (!corpus.compute(false)) {corpus.delete();
+			return false;
+		}
 		
 		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
 cqpFile.delete()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/discours/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/discours/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/discours/compiler.groovy	(revision 1615)
@@ -185,7 +185,10 @@
 		corpus = new MainCorpus(project);
 		corpus.setID(project.getName());
 		corpus.setName(project.getName());
-		corpus.setDescription("Built with the TXT+CSV import module");
+		corpus.setDescription("Built with the CNR+CSV import module");
+		if (!corpus.compute(false)) {corpus.delete();
+			return false;
+		}
 		
 		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
 cqpFile.delete()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/compiler.groovy	(revision 1615)
@@ -460,6 +460,9 @@
 		corpus.setID(project.getName());
 		corpus.setName(project.getName());
 		corpus.setDescription("Built with the XML/w import module");
+		if (!corpus.compute(false)) {corpus.delete();
+			return false;
+		}
 		
 		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
 cqpFile.delete()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/bfm/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/bfm/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/bfm/compiler.groovy	(revision 1615)
@@ -762,7 +762,10 @@
 		corpus = new MainCorpus(project);
 		corpus.setID(project.getName());
 		corpus.setName(project.getName());
-		corpus.setDescription("Built with the TXT+CSV import module");
+		corpus.setDescription("Built with the BFM import module");
+		if (!corpus.compute(false)) {corpus.delete();
+			return false;
+		}
 		
 		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");
 cqpFile.delete()
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/tmx/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/tmx/compiler.groovy	(revision 1614)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/tmx/compiler.groovy	(revision 1615)
@@ -488,6 +488,9 @@
 			corpus.setID(cqpName);
 			corpus.setName(cqpName);
 			corpus.setDescription("Built with the TMX import module");
+			if (!corpus.compute(false)) {
+				return false;
+			}
 			
 			File cqpFile = new File(binDir,"cqp/"+cqpName+".cqp");
 			
Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/preferences/PluginPreferencesManager.java
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/preferences/PluginPreferencesManager.java	(revision 1614)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/preferences/PluginPreferencesManager.java	(revision 1615)
@@ -286,7 +286,7 @@
 			return null;
 		}
 
-		for (File messagesJavaFile : messagesPackageDir.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File messagesJavaFile : messagesPackageDir.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (messagesJavaFile.isDirectory()) continue;
 			if (!messagesJavaFile.getName().endsWith("Preferences.java")) continue;
 			return messagesJavaFile;
@@ -542,7 +542,7 @@
 	 * Parses the specified path and stores a list of the source files. 
 	 */
 	private void createSourceFilesList(File path)	{
-		File[] list = path.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] list = path.listFiles(IOUtils.HIDDENFILE_FILTER);
 
 		if (list == null) {
 			return;
Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/preferences/WorkspacePreferencesManager.java
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/preferences/WorkspacePreferencesManager.java	(revision 1614)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/preferences/WorkspacePreferencesManager.java	(revision 1615)
@@ -105,7 +105,7 @@
 
 		System.out.println("Initializing project preferences...");
 		ArrayList<File> files = new ArrayList<File>();
-		for (File project : workspaceLocation.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File project : workspaceLocation.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (!project.isDirectory()) continue;
 			if (project.isHidden()) continue;
 			if (!project.getName().startsWith("org.txm")) continue;
Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/ExternalizationFilesUpdater.java
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/ExternalizationFilesUpdater.java	(revision 1614)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/ExternalizationFilesUpdater.java	(revision 1615)
@@ -280,7 +280,7 @@
 			File current = files.removeFirst();
 			if (current.isDirectory() && !current.getName().equals("bin")) {
 				List<File> currentpfiles = new ArrayList<File>();
-				for (File sfile : current.listFiles(IOUtils.FILTER_HIDDEN)) {
+				for (File sfile : current.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 					if (sfile.isDirectory())
 						files.add(sfile);
 					else if(sfile.getName().endsWith(".properties") && (sfile.getName().startsWith("messages") || sfile.getName().startsWith("bundle")) )
@@ -305,7 +305,7 @@
 		String userdir = System.getProperty("user.home");
 		File workspaceDir = new File(userdir, "workspace047/org.txm.annotation.urs.rcp");
 		
-		for (File project : workspaceDir.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File project : workspaceDir.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (!project.isDirectory()) continue;
 			if (project.isHidden()) continue;
 		//	if (!project.getName().endsWith(".rcp")) continue;
Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizationFilesUpdater.groovy
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizationFilesUpdater.groovy	(revision 1614)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizationFilesUpdater.groovy	(revision 1615)
@@ -270,7 +270,7 @@
 			if(current.isDirectory())
 			{
 				List<String> currentpfiles = [];
-				for(File sfile : current.listFiles(IOUtils.FILTER_HIDDEN))
+				for(File sfile : current.listFiles(IOUtils.HIDDENFILE_FILTER))
 				{
 					if(sfile.isDirectory())
 						files.add(sfile);
Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/MergeExternalizedStringFiles.groovy
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/MergeExternalizedStringFiles.groovy	(revision 1614)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/MergeExternalizedStringFiles.groovy	(revision 1615)
@@ -34,7 +34,7 @@
 				continue;
 			//System.out.println("Dir: "+dir);
 			externalizeMessages = new ArrayList<File>();
-			for (File f : dir.listFiles(IOUtils.FILTER_HIDDEN)) {
+			for (File f : dir.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 				if (f.getName() == "Messages.java")
 					messageClass = f
 				if (f.getName() =~ "messages(_..)?\\.properties")
@@ -90,7 +90,7 @@
 			if (current.isDirectory() && !current.getName().startsWith(".")) {
 				//println "add dir: "+current
 				List<String> currentpfiles = [];
-				for (File sfile : current.listFiles(IOUtils.FILTER_HIDDEN)) {
+				for (File sfile : current.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 					if (sfile.isDirectory())
 						files.add(sfile);
 				}
Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessagesManager.java
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessagesManager.java	(revision 1614)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessagesManager.java	(revision 1615)
@@ -200,7 +200,7 @@
 
 		if (this.javaMessageFile != null) {
 
-			File[] propFiles = javaMessageFile.getParentFile().listFiles(IOUtils.FILTER_HIDDEN);
+			File[] propFiles = javaMessageFile.getParentFile().listFiles(IOUtils.HIDDENFILE_FILTER);
 			for (File propFile : propFiles) {
 				String name = propFile.getName();
 				if (!name.endsWith(".properties")) continue;
@@ -256,7 +256,7 @@
 
 				File osgiInf = new File(projectDirectory, "OSGI-INF/l10n");
 				if (osgiInf.exists()) {
-					for (File propFile : osgiInf.listFiles(IOUtils.FILTER_HIDDEN)) {
+					for (File propFile : osgiInf.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 						if (propFile.getName().startsWith("bundle") && propFile.getName().endsWith(".properties")) {
 							Properties props = new Properties();
 							props.load(IOUtils.getReader(propFile, "ISO-8859-1"));
@@ -353,7 +353,7 @@
 			return null;
 		}
 
-		for (File messagesJavaFile : messagesPackageDir.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File messagesJavaFile : messagesPackageDir.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (messagesJavaFile.isDirectory()) continue;
 			if (!messagesJavaFile.getName().endsWith("Messages.java")) continue;
 			return messagesJavaFile;
@@ -782,7 +782,7 @@
 	 * Parses the specified path and stores a list of the source files. 
 	 */
 	private void createSourceFilesList(File path)	{
-		File[] list = path.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] list = path.listFiles(IOUtils.HIDDENFILE_FILTER);
 
 		if (list == null) {
 			return;
Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/WorkspaceMessagesManager.java
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/WorkspaceMessagesManager.java	(revision 1614)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/WorkspaceMessagesManager.java	(revision 1615)
@@ -105,7 +105,7 @@
 
 		System.out.println("Initializing project messages...");
 		ArrayList<File> files = new ArrayList<File>();
-		for (File project : workspaceLocation.listFiles(IOUtils.FILTER_HIDDEN)) {
+		for (File project : workspaceLocation.listFiles(IOUtils.HIDDENFILE_FILTER)) {
 			if (!project.isDirectory()) continue;
 			if (project.isHidden()) continue;
 			if (!project.getName().startsWith("org.txm")) continue;
Index: tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java
===================================================================
--- tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java	(revision 1614)
+++ tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java	(revision 1615)
@@ -61,7 +61,7 @@
 			System.out.println("'"+corpus.getName()+"' corpus directory not found in "+txmDirectory.getAbsolutePath());
 			return false;
 		}
-		File[] files = txmCorpusDirectory.listFiles(IOUtils.FILTER_HIDDEN);
+		File[] files = txmCorpusDirectory.listFiles(IOUtils.HIDDENFILE_FILTER);
 		if (files == null || files.length == 0) {
 			System.out.println("No file in "+txmCorpusDirectory);
 			return false;
Index: tmp/org.txm.treetagger.core/src/org/txm/importer/xmltxm/AnnotateWTC.groovy
===================================================================
--- tmp/org.txm.treetagger.core/src/org/txm/importer/xmltxm/AnnotateWTC.groovy	(revision 1614)
+++ tmp/org.txm.treetagger.core/src/org/txm/importer/xmltxm/AnnotateWTC.groovy	(revision 1615)
@@ -125,7 +125,7 @@
 		annotDir.mkdir();
 
 		//BUILD TT FILE READY TO BE TAGGED
-		List<File> files = txmDir.listFiles(IOUtils.FILTER_HIDDEN)
+		List<File> files = txmDir.listFiles(IOUtils.HIDDENFILE_FILTER)
 
 		// get model file and check it
 		File modelfile = new File(TreeTaggerPreferences.getInstance().getBoolean(TreeTaggerPreferences.MODELS_PATH), modelfilename);
Index: tmp/org.txm.treetagger.core/src/org/txm/importer/xmltxm/Annotate.groovy
===================================================================
--- tmp/org.txm.treetagger.core/src/org/txm/importer/xmltxm/Annotate.groovy	(revision 1614)
+++ tmp/org.txm.treetagger.core/src/org/txm/importer/xmltxm/Annotate.groovy	(revision 1615)
@@ -309,7 +309,7 @@
 		ArrayList<String> milestones = [];
 
 		//BUILD TT FILE READY TO BE TAGGED
-		List<File> files = txmDir.listFiles(IOUtils.FILTER_HIDDEN)
+		List<File> files = txmDir.listFiles(IOUtils.HIDDENFILE_FILTER)
 
 		println("Building TT source files ("+files.size()+") from directory "+txmDir)
 		ConsoleProgressBar cpb = new ConsoleProgressBar(files.size())
@@ -338,7 +338,7 @@
 		//Convert encoding if needed
 
 		//APPLY TREETAGGER
-		files = new File(binDir, "treetagger").listFiles(IOUtils.FILTER_HIDDEN)
+		files = new File(binDir, "treetagger").listFiles(IOUtils.HIDDENFILE_FILTER)
 		println("Applying $modelfilename TreeTagger model on dir: "+new File(binDir, "treetagger")+ " ("+files.size()+" files)")
 		if (files == null || files.size() == 0)
 			return false;
@@ -401,7 +401,7 @@
 		}
 
 		initTTOutfileInfos(binDir, modelfile, modelfilename);
-		files = new File(binDir, "treetagger").listFiles(IOUtils.FILTER_HIDDEN)// now contains the result files of TT
+		files = new File(binDir, "treetagger").listFiles(IOUtils.HIDDENFILE_FILTER)// now contains the result files of TT
 		println "Building stdoff files ("+files.size()+") from dir:"+new File(binDir, "treetagger")+" to "+new File(binDir, "annotations");
 		if (files == null || files.size() == 0)
 			return false;
@@ -417,8 +417,8 @@
 		if (cancelNow) return;
 
 		//INJECT ANNOTATIONS
-		List<File> interpfiles = new File(binDir, "annotations").listFiles(IOUtils.FILTER_HIDDEN);
-		List<File> txmfiles = txmDir.listFiles(IOUtils.FILTER_HIDDEN);
+		List<File> interpfiles = new File(binDir, "annotations").listFiles(IOUtils.HIDDENFILE_FILTER);
+		List<File> txmfiles = txmDir.listFiles(IOUtils.HIDDENFILE_FILTER);
 		if (txmfiles == null) {
 			println "No file to annotate in "+txmDir.getAbsolutePath()
 			return false;
@@ -481,7 +481,7 @@
 			return true;
 		}
 
-		List<File> listfiles = txmDir.listFiles(IOUtils.FILTER_HIDDEN);
+		List<File> listfiles = txmDir.listFiles(IOUtils.HIDDENFILE_FILTER);
 
 		//cleaning
 		File annotDir = new File(binDir,"annotations");
@@ -498,7 +498,7 @@
 		int coresToUse = Math.max(1.0, cores * 0.7)
 		ExecutorService pool = Executors.newFixedThreadPool(coresToUse)
 
-		def files = txmDir.listFiles(IOUtils.FILTER_HIDDEN)
+		def files = txmDir.listFiles(IOUtils.HIDDENFILE_FILTER)
 		ConsoleProgressBar cpb = new ConsoleProgressBar(files.size())
 		for (File teiFile : files) {
 			int counter = 1;
