Index: TXM/trunk/bundles/org.txm.conllu.rcp/plugin.xml
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.rcp/plugin.xml	(revision 3684)
+++ TXM/trunk/bundles/org.txm.conllu.rcp/plugin.xml	(revision 3685)
@@ -25,8 +25,14 @@
             categoryId="TreeSearch4TXM.commands.category"
             defaultHandler="org.txm.conllu.rcp.commands.ExportCorpusAsFullCoNLLU"
             id="org.txm.conllu.rcp.commands.ExportCorpusAsFullCoNLLU"
-            name="in CoNLL-U format (.conllu)...">
+            name="%command.name.0">
       </command>
+      <command
+            categoryId="TreeSearch4TXM.commands.category"
+            defaultHandler="org.txm.conllu.rcp.commands.CoNLLUCorpusPreferences"
+            id="org.txm.conllu.rcp.commands.CoNLLUCorpusPreferences"
+            name="CoNLLU Corpus preferences">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.menus">
@@ -56,17 +62,6 @@
                </reference>
             </visibleWhen>
          </command>
-         <command
-               commandId="org.txm.conllu.rcp.commands.ExportCorpusAsFullCoNLLU"
-               icon="icons/functions/UD.png"
-               style="push">
-            <visibleWhen
-                  checkEnabled="false">
-               <reference
-                     definitionId="OneMainCorpusSelected">
-               </reference>
-            </visibleWhen>
-         </command>
       </menuContribution>
       <menuContribution
             locationURI="menu:menu.file.import.annotations">
@@ -107,6 +102,33 @@
             </visibleWhen>
          </command>
       </menuContribution>
+      <menuContribution
+            locationURI="menu:menu.file.export.properties">
+         <command
+               commandId="org.txm.conllu.rcp.commands.ExportCorpusAsFullCoNLLU"
+               icon="icons/functions/UD.png"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <reference
+                     definitionId="OneMainCorpusSelected">
+               </reference>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+      <menuContribution
+            locationURI="menu:menu.edit?after=org.txm.rcp.separator1">
+         <command
+               commandId="org.txm.conllu.rcp.commands.CoNLLUCorpusPreferences"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <reference
+                     definitionId="OneMainCorpusSelected">
+               </reference>
+            </visibleWhen>
+         </command>
+      </menuContribution>
    </extension>
    <extension
          point="org.eclipse.ui.preferencePages">
Index: TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/ExportCorpusAsCoNLLU.java
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/ExportCorpusAsCoNLLU.java	(revision 3684)
+++ TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/ExportCorpusAsCoNLLU.java	(revision 3685)
@@ -114,16 +114,21 @@
 		CQPCorpus corpus = (CQPCorpus) s;
 		MainCorpus mainCorpus = corpus.getMainCorpus();
 		
+		return exportCorpus(mainCorpus, outputDirectory, sentenceStructure, lemmaProperty, posProperty, encoding);
+		
+	}
+	
+	public static boolean exportCorpus(MainCorpus mainCorpus, File outputDirectory, String sentenceStructure, String lemmaProperty, String posProperty, String encoding) {
 		try {
-			new ToCoNLL2009().process(outputDirectory, mainCorpus, corpus.getStructuralUnit(sentenceStructure), corpus.getProperty("word"), corpus.getProperty(lemmaProperty), corpus.getProperty(posProperty), encoding);
+			return new ToCoNLL2009().process(outputDirectory, mainCorpus, mainCorpus.getStructuralUnit(sentenceStructure), mainCorpus.getProperty("word"), mainCorpus.getProperty(lemmaProperty), mainCorpus.getProperty(posProperty), encoding);
+			
 		} catch (Exception e) {
 			Log.warning(e);
 			Log.printStackTrace(e);
 		}
-		
-		return null;
+		return false;
 	}
-	
+
 	/**
 	 * export the corpus in a directory of conllu files (one per text)
 	 * 
Index: TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/ToCoNLL2009.java
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/ToCoNLL2009.java	(revision 3684)
+++ TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/ToCoNLL2009.java	(revision 3685)
@@ -19,6 +19,8 @@
 import org.txm.searchengine.cqp.serverException.CqiServerError;
 import org.txm.utils.ConsoleProgressBar;
 
+import jline.internal.Log;
+
 public class ToCoNLL2009 {
 	
 	boolean debug = false;
@@ -48,7 +50,8 @@
 		WordProperty idProperty = corpus.getProperty("id");
 		
 		ConsoleProgressBar cpb = new ConsoleProgressBar(texts.length);
-		
+		Log.info("Writing CoNLLu files in "+outdir.getAbsolutePath());
+		int nTokens = 0;
 		for (String text : texts) {
 			
 			cpb.tick();
@@ -67,7 +70,7 @@
 			}
 			
 			String[] words = CorpusManager.getCorpusManager().getCqiClient().cpos2Str(word.getQualifiedName(), positions);
-			
+			nTokens += words.length;
 			String[] idsList = CorpusManager.getCorpusManager().getCqiClient().cpos2Str(idProperty.getQualifiedName(), positions);
 			
 			String[] lemmes = null;
@@ -120,6 +123,7 @@
 		}
 		
 		cpb.done();
+		Log.info("Done: "+texts.length+" texts and "+nTokens+" words.");
 		return true;
 	}
 	
Index: TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/CoNLLUCorpusPreferences.java
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/CoNLLUCorpusPreferences.java	(revision 0)
+++ TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/CoNLLUCorpusPreferences.java	(revision 3685)
@@ -0,0 +1,87 @@
+// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.conllu.rcp.commands;
+
+import java.util.HashMap;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.kohsuke.args4j.Option;
+import org.osgi.service.prefs.Preferences;
+import org.txm.conllu.core.preferences.UDPreferences;
+import org.txm.rcp.swt.widget.parameters.ParametersDialog;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.utils.logger.Log;
+
+/**
+ * Export the conllu properties and CQP words into a conllu corpus of several files (one per text)
+ * 
+ * @author mdecorde.
+ */
+public class CoNLLUCorpusPreferences extends AbstractHandler {
+	
+	public static final String ID = CoNLLUCorpusPreferences.class.getName();
+	
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(final ExecutionEvent event) throws ExecutionException {
+		
+		Object s = CorporaView.getFirstSelectedObject();
+		
+		if (!(s instanceof MainCorpus)) {
+			Log.warning("Selection is not a corpus. Aborting.");
+			return null;
+		}
+		
+		MainCorpus c = (MainCorpus)s;
+		
+		Preferences customNode = c.getProject().getPreferencesScope().getNode(UDPreferences.getInstance().getPreferencesNodeQualifier());
+		String udPrefix = customNode.get(UDPreferences.UDPREFIX, UDPreferences.getInstance().getString(UDPreferences.UDPREFIX));
+		
+		InputDialog dialog = new InputDialog(HandlerUtil.getActiveShell(event), "CoNLL-U Corpus preferences", "Prefix of the CQP properties encoding the UD fields", udPrefix, null);
+		
+		if (dialog.open() == InputDialog.OK) {
+			
+			customNode.put(UDPreferences.UDPREFIX, dialog.getValue());
+			Log.info("Set "+c.getName()+" prefix to "+dialog.getValue());
+			return s;
+		}
+		return null;
+	}
+}
+
+

Property changes on: TXM/trunk/bundles/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/CoNLLUCorpusPreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/bundles/org.txm.conllu.rcp/OSGI-INF/l10n/bundle_fr.properties
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3684)
+++ TXM/trunk/bundles/org.txm.conllu.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 3685)
@@ -4,7 +4,7 @@
 command.label   = CoNLL-U + CSV
 command.label.0 = Corpus au format CoNLL-U (.conllu)...
 command.name    = depuis un r\u00E9pertoire de fichiers CoNLL-U (.conllu)...
-command.name.0  = vers des fichiers CoNLL-U (.conllu)...
+command.name.0  = au format CoNLL-U (.conllu)...
 command.name.1  = depuis un fichier CONLL-U...
 
 page.name = UD
Index: TXM/trunk/bundles/org.txm.conllu.rcp/OSGI-INF/l10n/bundle.properties
===================================================================
--- TXM/trunk/bundles/org.txm.conllu.rcp/OSGI-INF/l10n/bundle.properties	(revision 3684)
+++ TXM/trunk/bundles/org.txm.conllu.rcp/OSGI-INF/l10n/bundle.properties	(revision 3685)
@@ -4,7 +4,7 @@
 command.label   = CoNLL-U + CSV
 command.label.0 = Corpus in CoNLL-U format (.conllu)...
 command.name    = from directory of CoNLL-U files (.conllu) ...
-command.name.0  = in CoNLL-U files (.conllu)...
+command.name.0  = in CoNLL-U format (.conllu)...
 command.name.1  = from a CoNLL-U file (.conllu)...
 
 page.name = UD
