Index: TXM/trunk/bundles/org.txm.treesearch.core/src/org/txm/treesearch/function/TreeSearch.java
===================================================================
--- TXM/trunk/bundles/org.txm.treesearch.core/src/org/txm/treesearch/function/TreeSearch.java	(revision 3752)
+++ TXM/trunk/bundles/org.txm.treesearch.core/src/org/txm/treesearch/function/TreeSearch.java	(revision 3753)
@@ -16,17 +16,18 @@
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
 import org.txm.searchengine.cqp.corpus.WordProperty;
 import org.txm.treesearch.preferences.TreeSearchPreferences;
+import org.txm.utils.logger.Log;
 
 public abstract class TreeSearch extends TXMResult {
-	
+
 	protected CQPCorpus corpus;
-	
+
 	/**
 	 * from 0 to N-1 sentences
 	 */
 	@Parameter(key = TXMPreferences.INDEX, type = Parameter.RENDERING)
 	protected int pIndex;
-	
+
 	/**
 	 * from 0 to N-1 sentence subgraphs
 	 */
@@ -35,140 +36,154 @@
 
 	@Parameter(key = TXMPreferences.QUERY)
 	protected IQuery pQuery;
-	
+
 	@Parameter(key = TreeSearchPreferences.TFEATURE)
 	protected List<String> T;
-	
+
 	@Parameter(key = TreeSearchPreferences.NTFEATURE)
 	protected List<String> NT;
-	
+
 	@Parameter(key = TreeSearchPreferences.VISUALISATION)
 	protected String pVisualisation;
-	
 
+
 	public TreeSearch(CQPCorpus corpus) {
-		
+
 		this(null, corpus);
 	}
-	
+
 	public TreeSearch(String parentNodePath) {
-		
+
 		this(parentNodePath, null);
 	}
-	
+
 	public TreeSearch(String parentNodePath, CQPCorpus corpus) {
-		
+
 		super(parentNodePath, corpus);
 	}
-	
+
 	@Override
 	public boolean canCompute() {
-		
+
 		return corpus != null; // && pQuery != null && pQuery.length() > 0; // if pQuery is empty/null set a default query
 	}
-	
+
 	public abstract String[] getAvailableNTProperties();
-	
+
 	public abstract String[] getAvailableTProperties();
-	
+
 	public CQPCorpus getCorpus() {
-		
+
 		return corpus;
 	}
-	
+
 	@Override
 	public String getDetails() {
-		
+
 		if (pQuery != null) {
 			return pQuery.toString();
 		}
 		return "no query";
 	}
-	
+
 	@Override
 	public String getName() {
-		
+
 		if (pQuery != null) {
 			return pQuery.toString();
 		}
 		return "no query";
 	}
-	
+
 	public abstract int getNMatchingSentences();
-	
+
 	public abstract int getNSubMatch();
-	
+
 	public abstract int getTotalSubMatch();
-	
+
 	public final List<String> getNT() {
 		return NT;
 	}
-	
+
 	public abstract String getQuery();
-	
+
 	@Override
 	public String getSimpleName() {
-		
+
 		if (pQuery != null) {
 			return pQuery.toString();
 		}
 		return "no query";
 	}
-	
+
 	public String getComputingStartMessage() {
+		
 		return NLS.bind("Rendering {0} Syntactic Tree...", this.getSelector().getEngine());
 	}
-	
+
+	public String getComputingDoneMessage() {
+		
+		int n = this.getNMatchingSentences();
+		
+		if (n > 0) {
+			return ""+n+" matching sentence"+(n > 1?"s":"");
+		} else {
+			return "No matching sentence.";
+		}
+	}
+
+
+
 	public final List<String> getT() {
 		return T;
 	}
-	
+
 	@Override
 	public final boolean loadParameters() throws Exception {
-		
+
 		this.T = new ArrayList<>();
 		String values = getStringParameterValue(TreeSearchPreferences.TFEATURE);
 
 		if (values != null && !values.isEmpty() && values.length() > 0) {
 			this.T.addAll(Arrays.asList(values.split(",")));
 		}
-		
+
 		this.NT = new ArrayList<>();
 		values = getStringParameterValue(TreeSearchPreferences.TFEATURE);
 
 		if (values != null && !values.isEmpty() && values.length() > 0) {
 			this.NT.addAll(Arrays.asList(values.split(",")));
 		}
-		
+
 		String squery = getStringParameterValue(TreeSearchPreferences.QUERY);
 		if (squery != null && !squery.isEmpty() && squery.length() > 0) {
 			this.pQuery = IQuery.fromPrefString(squery);
 		}
-		
+
 		return _loadParameters();
 	}
-	
+
 	@Override
 	public boolean saveParameters() throws Exception {
-		
+
 		if (pQuery != null) {
 			this.saveParameter(TreeSearchPreferences.QUERY, IQuery.toPrefString(pQuery));
 		}
-		
+
 		this.saveParameter(TreeSearchPreferences.TFEATURE, StringUtils.join(this.T, ","));
-		
+
 		this.saveParameter(TreeSearchPreferences.NTFEATURE, StringUtils.join(this.NT, ","));
-		
+
 		return true;
 	}
-	
+
 	public abstract boolean _loadParameters() throws Exception;
-	
+
 	public abstract boolean hasSubMatchesStrategy();
-	
+
 	@Override
 	public abstract boolean setParameters(TXMParameters parameters);
-	
+
 	public abstract boolean toSVG(File svgFile, int sent, int sub, List<String> T, List<String> nT2);
 
 	public abstract boolean isReady();
@@ -177,23 +192,23 @@
 
 	public abstract boolean isComputed();
 
-	public abstract boolean isDrawn();
+	public abstract boolean canBeDrawn();
 
 	public abstract String getEngine();
 
 	public abstract TreeSearchSelector getSelector();
-	
+
 	public abstract String[] getTextAndWordIDSOfCurrentSentence() throws Exception;
-	
+
 	public abstract String getIconPath();
 
-	public int getCurrentMatchIndex() {
-		
+	public final int getCurrentMatchIndex() {
+
 		return pIndex;
 	}
 
-	public int getCurrentSubMatchIndex() {
-		
+	public final int getCurrentSubMatchIndex() {
+
 		return this.pSubIndex;
 	}
 
@@ -210,5 +225,5 @@
 	public String getVisualisation() {
 		return pVisualisation;
 	}
-	
+
 }
Index: TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ImportTIGERAnnotations.java
===================================================================
--- TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ImportTIGERAnnotations.java	(revision 3752)
+++ TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ImportTIGERAnnotations.java	(revision 3753)
@@ -28,11 +28,7 @@
 package org.txm.tigersearch.commands;
 
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.FileChannel;
 
 import org.apache.log4j.BasicConfigurator;
 import org.eclipse.core.commands.AbstractHandler;
@@ -43,32 +39,24 @@
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.DirectoryDialog;
 import org.eclipse.ui.handlers.HandlerUtil;
-import org.txm.searchengine.cqp.AbstractCqiClient;
-import org.txm.searchengine.cqp.CQPSearchEngine;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.clientExceptions.UnexpectedAnswerException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.searchengine.cqp.serverException.CqiServerError;
-import org.txm.searchengine.ts.InternalCorpusQueryManagerLocal2;
 import org.txm.searchengine.ts.TIGERSearchEngine;
 import org.txm.searchengine.ts.TSCorpus;
-import org.txm.searchengine.ts.TSCorpusManager;
-import org.txm.utils.ConsoleProgressBar;
+import org.txm.tigersearch.preferences.TigerSearchPreferences;
 import org.txm.utils.DeleteDir;
 import org.txm.utils.io.FileCopy;
 import org.txm.utils.io.IOUtils;
 import org.txm.utils.logger.Log;
 
-import ims.tiger.corpus.Sentence;
-import ims.tiger.corpus.T_Node;
-import ims.tiger.index.reader.Index;
 import ims.tiger.index.reader.IndexException;
 import ims.tiger.index.writer.IndexBuilderErrorHandler;
 import ims.tiger.index.writer.SimpleErrorHandler;
 import ims.tiger.index.writer.XMLIndexing;
 import ims.tiger.query.api.QueryIndexException;
-import ims.tiger.query.processor.CorpusQueryProcessor;
 
 /**
  * Import TIGERSearch annotations into a TXM corpus
@@ -81,8 +69,6 @@
  */
 public class ImportTIGERAnnotations extends AbstractHandler {
 	
-	public static final String ID = "org.txm.rcp.commands.function.ComputeTSIndex"; //$NON-NLS-1$
-	
 	/*
 	 * (non-Javadoc)
 	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
@@ -119,13 +105,12 @@
 			}
 			
 			if (new File(tigerCorpusDirectory, "word.lexicon").exists() && new File(tigerCorpusDirectory, "corpus_config.xml").exists()) {
-				// ok this is a TIGERSearch binary corpus
+				// ok this is a TIGERSearch binary corpus, use it
 			}
 			else {
-				
 				// need to build a TIGERSearch binary corpus
 				File tigerBinaryCorpusDirectory = new File(tigerCorpusDirectory, "tiger");
-				if (!buildTIGERCorpus(mainCorpus, tigerCorpusDirectory, tigerBinaryCorpusDirectory)) {
+				if (!buildTIGERBinaryCorpus(mainCorpus, tigerCorpusDirectory, tigerBinaryCorpusDirectory)) {
 					Log.warning("Aborting annotation importation.");
 					return null;
 				}
@@ -133,7 +118,7 @@
 			}
 			
 			try {
-				return importAnnotations(mainCorpus, tigerCorpusDirectory, "editionId");
+				return importTIGERBinaryCorpus(mainCorpus, tigerCorpusDirectory, "editionId");
 			}
 			catch (Exception e) {
 				e.printStackTrace();
@@ -146,7 +131,8 @@
 		}
 	}
 	
-	private boolean buildTIGERCorpus(MainCorpus corpus, File sourceDirectory, File tigerDir) {
+	public static boolean buildTIGERBinaryCorpus(MainCorpus corpus, File sourceDirectory, File tigerDir) {
+		
 		tigerDir.mkdirs();
 		
 		File configfile = new File(tigerDir, "tigersearch.logprop");
@@ -155,13 +141,15 @@
 		}
 		
 		BasicConfigurator.configure();
-		File master = new File(sourceDirectory, "main.xml");
-		if (!master.exists()) master = new File(sourceDirectory, "master.xml");
+		File master = new File(sourceDirectory, TigerSearchPreferences.DRIVER_FILENAME);
 		
 		if (!master.exists()) {
-			Log.warning("Error: Can't create TIGERSearch corpus: no main or master file found in " + sourceDirectory);
+			Log.warning("Error: Can't create TIGERSearch corpus: driver file found: " + master);
 			return false;
+		} else {
+			Log.warning("Using the driver file found: " + master+". Be sure text order is the same as the CQP corpus!");
 		}
+		
 		String uri = master.getAbsolutePath(); // TIGER corpus source root file
 		File tigerBinDir = new File(tigerDir, corpus.getName());
 		tigerBinDir.mkdirs();
@@ -211,12 +199,10 @@
 	 * @throws IOException
 	 * @throws UnexpectedAnswerException
 	 */
-	public static int importAnnotations(MainCorpus corpus, File tigerCorpusDirectory, String wordIdAttribute) throws IndexException, QueryIndexException, UnexpectedAnswerException, IOException,
+	public static int importTIGERBinaryCorpus(MainCorpus corpus, File tigerCorpusDirectory, String wordIdAttribute) throws IndexException, QueryIndexException, UnexpectedAnswerException, IOException,
 			CqiServerError,
 			CqiClientException {
 		
-
-		
 		File tigerDirectory = new File(corpus.getProjectDirectory(), "tiger");
 		File tigerCorpusExistingDirectory = new File(tigerDirectory, corpus.getName());
 		DeleteDir.deleteDirectory(tigerCorpusExistingDirectory);
Index: TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java
===================================================================
--- TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java	(revision 3752)
+++ TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java	(revision 3753)
@@ -67,7 +67,7 @@
 		return tsresult != null;
 	}
 	
-	public boolean isDrawn() {
+	public boolean canBeDrawn() {
 		
 		return tsresult != null && T != null && NT != null;
 	}
Index: TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java
===================================================================
--- TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java	(revision 3752)
+++ TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java	(revision 3753)
@@ -282,7 +282,7 @@
 
 		return new TIGERSelection(query, result2);
 	}
-
+	
 	@Override
 	public Query newQuery() {
 		return new TIGERQuery();
@@ -362,23 +362,23 @@
 
 		File master = new File(sourceDirectory, driverFilename);
 		if (!master.exists()) {
-			File[] xmlFiles = sourceDirectory.listFiles(new FileFilter() {
-				public boolean accept(File file) {
-					if (file.isDirectory()) return false;
-					if (file.isHidden()) return false;
-					String filename = file.getName();
-					if (filename.equals("import.xml")) return false;
-					if (!filename.endsWith(".xml")) return false;
-
-					return true;
-				}
-			});
-
-			if (xmlFiles == null) {
+//			File[] xmlFiles = sourceDirectory.listFiles(new FileFilter() {
+//				public boolean accept(File file) {
+//					if (file.isDirectory()) return false;
+//					if (file.isHidden()) return false;
+//					String filename = file.getName();
+//					if (filename.equals("import.xml")) return false;
+//					if (!filename.endsWith(".xml")) return false;
+//
+//					return true;
+//				}
+//			});
+//
+//			if (xmlFiles == null) {
 				System.out.println("No master file found in: "+sourceDirectory);
 				return false;
-			}
-			master = xmlFiles[0];
+//			}
+//			master = xmlFiles[0];
 		}
 		String uri = master.getAbsolutePath(); // TIGER corpus source root file
 		File tigerBinDir = new File(tigerDir, corpusName);
Index: TXM/trunk/bundles/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java
===================================================================
--- TXM/trunk/bundles/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java	(revision 3752)
+++ TXM/trunk/bundles/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java	(revision 3753)
@@ -517,7 +517,7 @@
 //			if (ts.hasSubMatchesStrategy()) subCounterLabel.setText(Messages.NoSubGraph);
 		}
 		
-		if (!ts.isDrawn()) {
+		if (!ts.canBeDrawn()) {
 			sentSpinner.setSelection(ts.getCurrentMatchIndex());
 			sentSpinner.setMaximum(ts.getNMatchingSentences());
 			// if (ts.hasSubMatchesStrategy()) {
@@ -606,9 +606,7 @@
 				subSpinner.setMaximum(ts.getNSubMatch());
 				subSpinner.refresh();
 				reloadGraph();
-				Log.warning(""+ts.getNMatchingSentences()+" matching sentence(s) for "+ts.getTotalSubMatch()+" matches.");
 			} else {
-				Log.warning("No matching sentence.");
 				svgPanel.setText("");
 				sentSpinner.setEnabled(false);
 				subSpinner.setEnabled(false);
Index: TXM/trunk/bundles/org.txm.conllu.core/src/org/txm/conllu/core/function/UDTreeSearch.java
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.core/src/org/txm/conllu/core/function/UDTreeSearch.java	(revision 3752)
+++ TXM/trunk/bundles/org.txm.conllu.core/src/org/txm/conllu/core/function/UDTreeSearch.java	(revision 3753)
@@ -61,7 +61,7 @@
 		return matchingSentencesToMatches != null;
 	}
 	
-	public boolean isDrawn() {
+	public boolean canBeDrawn() {
 		return matchingSentencesToMatches != null;
 	}
 	
@@ -72,7 +72,7 @@
 	@Override
 	public boolean toSVG(File svgFile, int sent, int sub, List<String> T,  List<String> NT) {
 		
-		if (!isDrawn()) return false; // no result
+		if (!canBeDrawn()) return false; // no result
 		try {
 
 			org.txm.objects.Match matchingSentence = this.matchingSentencesKeys.get(sent);
