Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 3521)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 3522)
@@ -1583,7 +1583,7 @@
 					Field resultField = BeanParameters.getField(this.getResult(), parameter.key());
 					if (resultField != null) {
 						// multiple
-						if (resultField.getType().isAssignableFrom(List.class)) {
+						if (resultField.getType().isAssignableFrom(List.class) || resultField.getType().isAssignableFrom(ArrayList.class)) {
 							value = new ArrayList<>(((PropertiesSelector<Property>) object).getSelectedProperties());
 							// need to copy the list otherwise the properties selector modify the result itself through reference
 						}
@@ -1591,7 +1591,7 @@
 							value = new ReferencePattern(((PropertiesSelector<Property>) object).getSelectedProperties());
 						}
 						// single
-						else {
+						else if (resultField.getType().isAssignableFrom(Property.class)){
 							value = ((PropertiesSelector<Property>) object).getSelectedProperties().get(0);
 						}
 					}
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/URSCorpora.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/URSCorpora.java	(revision 3521)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/URSCorpora.java	(revision 3522)
@@ -10,6 +10,7 @@
 import org.txm.objects.CorpusBuild;
 import org.txm.objects.Project;
 import org.txm.utils.DeleteDir;
+import org.txm.utils.logger.Log;
 
 import visuAnalec.donnees.Corpus;
 import visuAnalec.fichiers.FichiersJava;
@@ -18,6 +19,12 @@
 /**
  * Manages Analec corpus: the corpus are associated with the TXM MainCorpus objects
  * 
+ * Use URSCorpora.getCorpus(mcorpus) to start using Analec annotations
+ * 
+ * Test if a corpus has Analec annotations URSCorpora.hasCorpus(mcorpus)
+ * 
+ * Save changes with URSCorpora.saveCorpus(mcorpus)
+ * 
  * @author mdecorde
  *
  */
@@ -26,7 +33,7 @@
 	private static final HashMap<CorpusBuild, Corpus> corpora = new HashMap<>();
 	
 	private static final HashMap<CorpusBuild, Vue> vues = new HashMap<>();
-
+	
 	/**
 	 * Create the ec file if needed, store a reference to the corpus if not already done.
 	 * 
@@ -35,8 +42,8 @@
 	 */
 	public static Corpus getCorpus(CorpusBuild mcorpus) {
 		mcorpus = mcorpus.getRootCorpusBuild(); // ensure this is the root CorpusBuild
-		File fichierCorpus = new File(mcorpus.getProjectDirectory(), "analec/" + mcorpus.getID() + ".ec"); //$NON-NLS-1$ //$NON-NLS-2$
-		File fichierVue = new File(mcorpus.getProjectDirectory(), "analec/" + mcorpus.getID() + ".ecv"); //$NON-NLS-1$ //$NON-NLS-2$
+		File fichierCorpus = getECFile(mcorpus);
+		File fichierVue = getECVFile(mcorpus);
 		Corpus corpus = null;
 		if (URSCorpora.corpora.containsKey(mcorpus)) {
 			corpus = URSCorpora.corpora.get(mcorpus);
@@ -66,7 +73,7 @@
 			// TODO: does not work :(
 			if (fichierVue.exists()) {
 				if (!FichiersJava.ouvrirVue(vue, fichierVue)) {
-					System.out.println("Warning: Fail to open corpus Vue file: " + fichierVue);
+					Log.warning("Warning: Fail to open corpus Vue file: " + fichierVue);
 					// return null;
 				}
 				String[] types = vue.getTypesUnitesAVoir();
@@ -77,7 +84,7 @@
 			else {
 				vue.retablirVueParDefaut(); //
 				if (!FichiersJava.enregistrerVue(vue, fichierVue)) {
-					System.out.println("Warning: Fail to create corpus Vue file: " + fichierVue);
+					Log.warning("Warning: Fail to create corpus Vue file: " + fichierVue);
 					// return null;
 				}
 			}
@@ -93,7 +100,7 @@
 			return !URSCorpora.corpora.get(mcorpus).getStructure().isVide();
 		}
 		else {
-			File fichierCorpus = new File(mcorpus.getProjectDirectory(), "analec/" + mcorpus.getID() + ".ec"); //$NON-NLS-1$ //$NON-NLS-2$
+			File fichierCorpus = getECFile(mcorpus);
 			if (fichierCorpus.exists()) {
 				return !getCorpus(mcorpus).getStructure().isVide();
 			}
@@ -143,14 +150,18 @@
 	 */
 	public static boolean saveCorpus(CorpusBuild mcorpus) {
 		mcorpus = mcorpus.getRootCorpusBuild(); // ensure this is the root CorpusBuild
-		Corpus corpus = getCorpus(mcorpus);
-		Vue vue = getVue(mcorpus);
-		File dir = new File(mcorpus.getProjectDirectory(), "analec/"); //$NON-NLS-1$
-		dir.mkdir();
-		File fichierCorpus = new File(dir, mcorpus + ".ec"); //$NON-NLS-1$
-		File fichierVueCorpus = new File(dir, mcorpus + ".ecv"); //$NON-NLS-1$
-		return FichiersJava.enregistrerCorpus(corpus, fichierCorpus)
-				&& FichiersJava.enregistrerVue(vue, fichierVueCorpus);
+		if (hasCorpus(mcorpus)) {
+			Corpus corpus = getCorpus(mcorpus);
+			Vue vue = getVue(mcorpus);
+			
+			File fichierCorpus = getECFile(mcorpus);
+			File fichierVueCorpus = getECVFile(mcorpus);
+			fichierCorpus.getParentFile().mkdirs();
+			
+			return FichiersJava.enregistrerCorpus(corpus, fichierCorpus) && FichiersJava.enregistrerVue(vue, fichierVueCorpus);
+		} else {
+			return false;
+		}
 	}
 	
 	public static Vue getVue(Corpus corpus) {
@@ -219,18 +230,18 @@
 				Corpus analec_corpus = URSCorpora.getCorpus(mcorpus);
 				analec_corpus.fermer();
 			}
-
+			
 			URSCorpora.removeCorpus(mcorpus);
 			
-			File fichierCorpus = new File(mcorpus.getProjectDirectory(), "analec/" + mcorpus.getID() + ".ec"); //$NON-NLS-1$ //$NON-NLS-2$
-			File fichierVue = new File(mcorpus.getProjectDirectory(), "analec/" + mcorpus.getID() + ".ecv"); //$NON-NLS-1$ //$NON-NLS-2$
+			File fichierCorpus = getECFile(mcorpus); 
+			File fichierVue = getECVFile(mcorpus);
 			fichierCorpus.delete();
 			fichierVue.delete();
 		}
 		else if (r instanceof Project) {
 			Project project = ((Project) r);
 			if ("clean".equals(state)) {
-				File analecDir = new File(project.getProjectDirectory(), "analec");
+				File analecDir = new File(project.getProjectDirectory(), "analec"); //$NON-NLS
 				if (analecDir.exists()) {
 					DeleteDir.deleteDirectory(analecDir);
 				}
@@ -268,7 +279,7 @@
 	
 	@Override
 	public boolean hasAnnotationsToSave(CorpusBuild mcorpus) {
-
+		
 		return hasAnnotationsToSaveStatic(mcorpus);
 	}
 	
@@ -284,8 +295,20 @@
 	 * @param mcorpus
 	 * @return true is an Analec corpus is already instanced
 	 */
-	private static boolean hasCorpus(CorpusBuild mcorpus) {
+	public static boolean hasCorpus(CorpusBuild mcorpus) {
 		
-		return corpora.containsKey(mcorpus);
+		if (!corpora.containsKey(mcorpus)) {
+			return getECFile(mcorpus).exists();
+		}
+		
+		return true;
 	}
+	
+	public static File getECFile(CorpusBuild mcorpus) {
+		return new File(mcorpus.getProjectDirectory(), "analec/" + mcorpus.getID() + ".ec"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	public static File getECVFile(CorpusBuild mcorpus) {
+		return new File(mcorpus.getProjectDirectory(), "analec/" + mcorpus.getID() + ".ecv"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
 }
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/messages_fr.properties
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/messages_fr.properties	(revision 3521)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/messages_fr.properties	(revision 3522)
@@ -197,7 +197,7 @@
 
 NavigationField_5 = <identifiant>
 
-SaveCorpus_0 = La sélection n''est pas un corpus racine : {0}
+SaveCorpus_0 = La sélection n''est pas un corpus racine ({0})
 
 SaveCorpus_3 = Enregistrement des annotations URS ({0})
 
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/SaveCorpus.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/SaveCorpus.java	(revision 3521)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/SaveCorpus.java	(revision 3522)
@@ -12,6 +12,7 @@
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.annotation.urs.URSCorpora;
 import org.txm.annotation.urs.view.ElementPropertiesView;
+import org.txm.core.results.TXMResult;
 import org.txm.annotation.urs.Messages;
 import org.txm.edition.rcp.editors.SynopticEditionEditor;
 import org.txm.rcp.TXMWindows;
@@ -21,6 +22,7 @@
 
 import visuAnalec.donnees.Corpus;
 import visuAnalec.fichiers.FichiersJava;
+import visuAnalec.vue.Vue;
 
 public class SaveCorpus  extends AbstractHandler {
 
@@ -36,11 +38,15 @@
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 
 		Object first = CorporaView.getFirstSelectedObject();
-		if (!(first instanceof org.txm.searchengine.cqp.corpus.CQPCorpus)) {
+		MainCorpus mainCorpus = null;
+		if (first instanceof org.txm.searchengine.cqp.corpus.MainCorpus) {
+			mainCorpus = (MainCorpus)first;
+		} else if (first instanceof TXMResult) {
+			mainCorpus = ((TXMResult)first).getFirstParent(MainCorpus.class);
+		} else {
 			Log.warning(NLS.bind(Messages.SaveCorpus_0, first));
 			return null;
 		}
-		final MainCorpus mainCorpus = ((org.txm.searchengine.cqp.corpus.CQPCorpus)first).getMainCorpus();
 		save(mainCorpus, event);
 
 		return null;
@@ -48,10 +54,15 @@
 
 	public static boolean save(final MainCorpus mainCorpus, ExecutionEvent event) {
 		
+		if (!URSCorpora.hasCorpus(mainCorpus)) {
+			Log.warning("** No Analec corpus associated to the CQP corpus: "+mainCorpus);
+			return false;
+		}
+		
 		Corpus corpus = URSCorpora.getCorpus(mainCorpus);
 		
 		if (corpus == null) {
-			Log.severe("No Analec corpus associated to the CQP corpus: "+mainCorpus.getCqpId());
+			Log.warning("** No Analec corpus associated to the CQP corpus: "+mainCorpus.getCqpId());
 			return false;
 		}
 		
@@ -60,8 +71,15 @@
 			view.applyAll();
 		}
 		
+		Vue vue = URSCorpora.getVue(corpus);
+		if (!corpus.isModifie() && !vue.isModifiee()) {
+			Log.warning("** No changes to save in "+mainCorpus.getCqpId());
+			return false;
+		}
+		
+		
 		File binaryCorpusDirectory = mainCorpus.getProjectDirectory();
-		File fichierCorpus = new File(binaryCorpusDirectory, "/analec/"+mainCorpus.getID()+".ec"); //$NON-NLS-1$ //$NON-NLS-2$
+		File fichierCorpus = URSCorpora.getECFile(mainCorpus);
 		
 		Log.info(NLS.bind(Messages.SaveCorpus_3, fichierCorpus));
 		if (!URSCorpora.saveCorpus(mainCorpus)) {
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/messages.properties
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/messages.properties	(revision 3521)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/messages.properties	(revision 3522)
@@ -197,7 +197,7 @@
 
 NavigationField_5 = <identifier>
 
-SaveCorpus_0 = Selection is not a main corpus: {0}
+SaveCorpus_0 = Selection is not a main corpus ({0})
 
 SaveCorpus_3 = Saving the annotations ({0})
 
Index: TXM/trunk/org.txm.analec.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.analec.rcp/plugin.xml	(revision 3521)
+++ TXM/trunk/org.txm.analec.rcp/plugin.xml	(revision 3522)
@@ -110,12 +110,6 @@
             <command
                   commandId="org.txm.annotation.urs.commands.SaveCorpus"
                   style="push">
-               <visibleWhen
-                     checkEnabled="false">
-                  <reference
-                        definitionId="CorpusNeedtoSaveURSAnnotation">
-                  </reference>
-               </visibleWhen>
             </command>
             <menu
                   id="menu.urs.tools"
@@ -271,12 +265,6 @@
                mode="FORCE_TEXT"
                style="push"
                tooltip="URS">
-            <visibleWhen
-                  checkEnabled="false">
-               <reference
-                     definitionId="CorpusNeedtoSaveURSAnnotation">
-               </reference>
-            </visibleWhen>
          </command>
       </menuContribution>
       <menuContribution
Index: TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotationsAndUpdateCorpus.java
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotationsAndUpdateCorpus.java	(revision 3521)
+++ TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotationsAndUpdateCorpus.java	(revision 3522)
@@ -6,7 +6,6 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.window.Window;
@@ -28,32 +27,39 @@
 public class SaveAnnotationsAndUpdateCorpus extends AbstractHandler {
 	
 	public static final String ID = SaveAnnotationsAndUpdateCorpus.class.getCanonicalName();
-	MainCorpus corpus = null;
 	
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		
 		ISelection sel = HandlerUtil.getCurrentSelection(event);
-		if (!(sel instanceof IStructuredSelection)) return null;
+		if (!(sel instanceof IStructuredSelection)) {
+			Log.info("No available selection to target the corpus annotations to save");	
+			return null;
+		}
 		IStructuredSelection selection = (IStructuredSelection) sel;
 		
-		
+		MainCorpus corpus = null;
+
 		if (HandlerUtil.getActiveEditor(event) instanceof ConcordanceEditor) {
 			corpus = ((ConcordanceEditor) HandlerUtil.getActiveEditor(event)).getCorpus().getMainCorpus();
 		} else {
 			Object s = selection.getFirstElement();
-			if ((s instanceof MainCorpus)) {
+			if (s == null) {
+				Log.info("No available selection to target the corpus annotations to save");
+				return null;
+			} else if ((s instanceof MainCorpus)) {
 				corpus = (MainCorpus) s;
+			} else if (s instanceof TXMResult) {
+				corpus = ((TXMResult) s).getFirstParent(MainCorpus.class);
+			} else {
+				Log.info("No available selection to target the corpus annotations to save");
 				return null;
-			} else if (!(s instanceof TXMResult)) {
-				corpus = ((TXMResult) s).getFirstParent(MainCorpus.class);
 			}
 		}
 		
 		try {
-			
 			if (!KRAnnotationEngine.needToSaveAnnotations(corpus)) {
-				Log.info("No annotation to save.");
+				Log.info(NLS.bind("No CQP annotation found to save in the {0} corpus.", corpus));
 				return null;
 			}
 			
@@ -83,7 +89,8 @@
 			if (job == null) {
 				return null;
 			}
-			
+			final MainCorpus fcorpus = corpus;
+
 			if (job.getState() == Status.OK_STATUS.getCode()) {
 				if (KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE)) {
 					
@@ -95,13 +102,13 @@
 							
 							try {
 								monitor.setTaskName("Updating corpus");
-								if (corpus != null && UpdateCorpus.update(corpus, false, KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION)) != null) {
+								if (fcorpus != null && UpdateCorpus.update(fcorpus, false, KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION)) != null) {
 									monitor.worked(50);
 									this.syncExec(new Runnable() {
 										
 										@Override
 										public void run() {
-											CorporaView.refreshObject(corpus);
+											CorporaView.refreshObject(fcorpus);
 										}
 									});
 									return Status.OK_STATUS;
Index: TXM/trunk/org.txm.annotation.kr.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.annotation.kr.rcp/plugin.xml	(revision 3521)
+++ TXM/trunk/org.txm.annotation.kr.rcp/plugin.xml	(revision 3522)
@@ -252,12 +252,6 @@
                   icon="icons/functions/pencil_save.png"
                   label="%command.label.111"
                   style="push">
-              <visibleWhen
-                    checkEnabled="false">
-                 <reference
-                       definitionId="CorpusNeedtoSaveAnnotation">
-                 </reference>
-              </visibleWhen>
             </command>
      </menuContribution>
      <menuContribution
@@ -286,12 +280,6 @@
               mode="FORCE_TEXT"
               style="push"
               tooltip="CQP">
-           <visibleWhen
-                 checkEnabled="false">
-              <reference
-                    definitionId="CorpusNeedtoSaveAnnotation">
-              </reference>
-           </visibleWhen>
         </command>
      </menuContribution>
      <menuContribution
Index: TXM/trunk/org.txm.chartsengine.graphstream.core/src/org/txm/chartsengine/graphstream/core/GSChartsEngine.java
===================================================================
--- TXM/trunk/org.txm.chartsengine.graphstream.core/src/org/txm/chartsengine/graphstream/core/GSChartsEngine.java	(revision 3521)
+++ TXM/trunk/org.txm.chartsengine.graphstream.core/src/org/txm/chartsengine/graphstream/core/GSChartsEngine.java	(revision 3522)
@@ -10,6 +10,7 @@
 import org.txm.chartsengine.core.ChartsEngine;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.graphstream.core.preferences.GSChartsEnginePreferences;
+import org.txm.utils.logger.Log;
 
 /**
  * GraphStream charts engine.
@@ -120,7 +121,7 @@
 	
 	@Override
 	public ArrayList<String> getSupportedOutputFileFormats() {
-		System.err.println("ECEChartsEngine.getSupportedOutputFileFormats(): not yet implemented.");
+		Log.fine("ECEChartsEngine.getSupportedOutputFileFormats(): not yet implemented.");
 		ArrayList<String> formats = new ArrayList<>(1);
 		formats.add(OUTPUT_FORMAT_NONE);
 		return formats;
Index: TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDSearch.java
===================================================================
--- TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDSearch.java	(revision 3521)
+++ TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDSearch.java	(revision 3522)
@@ -2,6 +2,7 @@
 
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 
@@ -83,6 +84,14 @@
 			
 			String prefix = UDPreferences.getInstance().getProjectPreferenceValue(corpus.getProject(), UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX));
 			
+			String[] Tvalues = null;
+			if (T != null && corpus.getProperty(T) != null && !T.equals(prefix+"form")) {
+				Tvalues = corpus.getProperty(T).cpos2Str(positions);
+			}
+			String[] NTvalues = null;
+			if (NT != null && corpus.getProperty(NT) != null) {
+				NTvalues = corpus.getProperty(NT).cpos2Str(positions);
+			}
 			HashMap<String, String[]> values = new HashMap<>();
 			for (String p : ImportCoNLLUAnnotations.UD_PROPERTY_NAMES) {
 				values.put(prefix+p, corpus.getProperty(prefix+p).cpos2Str(positions));
@@ -103,7 +112,7 @@
 			for (String l : conll) {
 				Log.info(l);
 			}
-			return UDPrintTree.print(svgFile, conll) != null;
+			return UDPrintTree.print(svgFile, conll, Tvalues, NTvalues) != null;
 		}
 		catch (Throwable e) {
 			Log.warning("Error while drawing SVG: "+e+ " at "+e.getStackTrace()[0]);
@@ -112,19 +121,38 @@
 		}
 	}
 	
+	protected String[] getAvailableProperties() throws CqiClientException {
+		List<WordProperty> props = corpus.getProperties();
+		String[] sprops = new String[props.size()];
+		
+		for (int i = 0 ; i < props.size() ; i++) {
+			sprops[i] = props.get(i).getName();
+		}
+		
+		Arrays.sort(sprops);
+		return sprops;
+	}
+	
 	public String[] getAvailableTProperties() {
 		
-		String prefix = UDPreferences.getInstance().getProjectPreferenceValue(corpus.getProject(), UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX));
-		
-		String[] properties = new String[ImportCoNLLUAnnotations.UD_PROPERTY_NAMES.length];
-		for (int p = 0 ; p < ImportCoNLLUAnnotations.UD_PROPERTY_NAMES.length ; p++) {
-			properties[p] = prefix+ImportCoNLLUAnnotations.UD_PROPERTY_NAMES[p];
+//		String prefix = UDPreferences.getInstance().getProjectPreferenceValue(corpus.getProject(), UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX));
+//		
+//		String[] properties = new String[ImportCoNLLUAnnotations.UD_PROPERTY_NAMES.length];
+//		for (int p = 0 ; p < ImportCoNLLUAnnotations.UD_PROPERTY_NAMES.length ; p++) {
+//			properties[p] = prefix+ImportCoNLLUAnnotations.UD_PROPERTY_NAMES[p];
+//		}
+		try {
+			return getAvailableProperties();
 		}
-		return properties;
+		catch (CqiClientException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+			return new String[0];
+		}
 	}
 	
 	public String[] getAvailableNTProperties() {
-		return getAvailableTProperties();
+		return new String[0];
 	}
 	
 	@Override
Index: TXM/trunk/org.txm.libs.deptreeviz/src/org/txm/libs/deptreeviz/UDPrintTree.java
===================================================================
--- TXM/trunk/org.txm.libs.deptreeviz/src/org/txm/libs/deptreeviz/UDPrintTree.java	(revision 3521)
+++ TXM/trunk/org.txm.libs.deptreeviz/src/org/txm/libs/deptreeviz/UDPrintTree.java	(revision 3522)
@@ -3,23 +3,47 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
 
 import io.gitlab.nats.deptreeviz.DepTree;
 import io.gitlab.nats.deptreeviz.SimpleParse;
+import io.gitlab.nats.deptreeviz.SimpleWord;
 
 public class UDPrintTree {
 	
-	public static File print(File file, List<String> conll) {
+	public static File print(File file, List<String> conll, String[] Tvalues, String[] NTvalues) {
 		try {
-			PrintWriter w = new PrintWriter(file);
+			PrintWriter pw = new PrintWriter(file);
 			
 			SimpleParse p = SimpleParse.fromConll(conll);
-			DepTree dt = new DepTree<>(p);
+			List<SimpleWord> words = p.getWords();
+			List<String> labels = p.getVerticesLabels().get("SYN");
+			if (Tvalues != null && Tvalues.length == words.size()) {
+				
+				for (int i = 0 ; i < words.size() ; i++) {
+					SimpleWord w = words.get(i);
+					
+					Field fword = SimpleWord.class.getDeclaredField("word");
+					fword.setAccessible(true);
+					fword.set(w, w.getWord()+"/"+Tvalues[i]);
+				}
+			}
+			
+			if (NTvalues != null && NTvalues.length == words.size()) {
+				ArrayList<String> tmp = (ArrayList)labels;
+				tmp.clear();
+				for (int i = 0 ; i < words.size() ; i++) {
+					tmp.add(NTvalues[i]);
+				}
+			}
+			DepTree<SimpleParse, SimpleWord> dt = new DepTree<SimpleParse, SimpleWord>(p);
 			//dt.setShowingReferent(true);
-			dt.writeTree(w);
+			//dt.setShowingCat(true);
+			dt.writeTree(pw);
 			//w.close();
 			return file;
 		}
@@ -44,7 +68,7 @@
 					);
 		
 			
-			System.out.println("FILE: "+print(file, conll));
+			System.out.println("FILE: "+print(file, conll, null, null));
 	}
 	
 }
Index: trunk/org.txm.texts.rcp/plugin.xml
===================================================================
--- trunk/org.txm.texts.rcp/plugin.xml	(revision 3521)
+++ trunk/org.txm.texts.rcp/plugin.xml	(revision 3522)
@@ -23,7 +23,7 @@
                   checkEnabled="false">
                <or>
                   <reference
-                        definitionId="OneMainCorpusSelected">
+                        definitionId="OneCorpusSelected">
                   </reference>
                </or>
             </visibleWhen>
@@ -41,7 +41,7 @@
                   checkEnabled="false">
                <or>
                   <reference
-                        definitionId="OneMainCorpusSelected">
+                        definitionId="OneCorpusSelected">
                   </reference>
                </or>
             </visibleWhen>
@@ -59,7 +59,7 @@
                   checkEnabled="false">
                <or>
                   <reference
-                        definitionId="OneMainCorpusSelected">
+                        definitionId="OneCorpusSelected">
                   </reference>
                </or>
             </visibleWhen>
Index: trunk/org.txm.texts.rcp/src/org/txm/texts/rcp/TextsViewEditor.java
===================================================================
--- trunk/org.txm.texts.rcp/src/org/txm/texts/rcp/TextsViewEditor.java	(revision 3521)
+++ trunk/org.txm.texts.rcp/src/org/txm/texts/rcp/TextsViewEditor.java	(revision 3522)
@@ -105,8 +105,12 @@
 		
 		
 		TextsView tv = getResult();
-		if (viewer.getTable().getColumns().length == 0 || viewer.getTable().getColumns().length != tv.getColumns().size()) {
-			if (viewer.getTable().getColumns().length > 0) {
+		int currentDisplayedColumns = viewer.getTable().getColumns().length;
+		int numberOfColumnsToDisplay = (tv.getColumns().size() + 3);
+		if ( currentDisplayedColumns == 0 || 
+				currentDisplayedColumns != numberOfColumnsToDisplay) {
+			
+			if (viewer.getTable().getColumns().length > 0) { // get rid of current columns
 				for (TableColumn column : viewer.getTable().getColumns()) {
 					column.dispose();
 				}
Index: trunk/org.txm.texts.rcp/src/org/txm/texts/rcp/ComputeTextView.java
===================================================================
--- trunk/org.txm.texts.rcp/src/org/txm/texts/rcp/ComputeTextView.java	(revision 3521)
+++ trunk/org.txm.texts.rcp/src/org/txm/texts/rcp/ComputeTextView.java	(revision 3522)
@@ -5,6 +5,7 @@
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.rcp.editors.TXMEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
+import org.txm.searchengine.cqp.corpus.CQPCorpus;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.texts.core.TextsView;
 
@@ -29,8 +30,8 @@
 			Object selection = this.getCorporaViewSelectedObject(event);
 			
 			// Creating from Corpus
-			if (selection instanceof MainCorpus) {
-				MainCorpus corpus = (MainCorpus) selection;
+			if (selection instanceof CQPCorpus) {
+				CQPCorpus corpus = (CQPCorpus) selection;
 				concordance = new TextsView(corpus);
 			}
 			// Reopening existing result
Index: trunk/org.txm.texts.core/src/org/txm/texts/core/TextsView.java
===================================================================
--- trunk/org.txm.texts.core/src/org/txm/texts/core/TextsView.java	(revision 3521)
+++ trunk/org.txm.texts.core/src/org/txm/texts/core/TextsView.java	(revision 3522)
@@ -12,7 +12,7 @@
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
 import org.txm.searchengine.cqp.CQPSearchEngine;
-import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.CQPCorpus;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
 import org.txm.utils.TXMProgressMonitor;
@@ -31,11 +31,11 @@
 	
 	private LinkedHashMap<String, ArrayList<String>> result;
 	
-	public MainCorpus getCorpus() {
-		return (MainCorpus)parent;
+	public CQPCorpus getCorpus() {
+		return (CQPCorpus)parent;
 	}
 	
-	public TextsView(MainCorpus corpus) {
+	public TextsView(CQPCorpus corpus) {
 		
 		super(corpus);
 	}
@@ -114,7 +114,7 @@
 	@Override
 	public String getName() {
 		
-		return "Texts ("+pColumns.toString()+")";
+		return "Texts ("+pColumns+")";
 	}
 	
 	@Override
