Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy	(revision 3561)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy	(revision 3562)
@@ -19,10 +19,13 @@
 corpus = corpusViewSelection
 
 @Field @Option(name="structuralUnit", usage="the structural Unit to use", widget="String", required=true, def="text")
-String structuralUnit = "text"
+String structuralUnit
 
 @Field @Option(name="structuralUnitPropertiesList", usage="the structural Unit properties list separated with commas", widget="String", required=true, def="p1,p2")
-def structuralUnitPropertiesList = "loc, type";
+def structuralUnitPropertiesList
+
+@Field @Option(name="propertySeparator", usage="property name separator", widget="String", required=true, def="_") //  ∩ 
+def propertySeparator
 		
 //@Field @Option(name="expandTarget", usage="Expand structure", widget="String", required=false, def="")
 def expandTarget = "";
@@ -269,7 +272,7 @@
 			String and = '';
 			String underscore = '';
 			if (tmpQuery != '')	{
-				underscore = ' ∩ ';
+				underscore = propertySeparator;
 				and = ' & ';
 			}
 
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/export/ExportResultParameter.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/export/ExportResultParameter.java	(revision 3561)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/export/ExportResultParameter.java	(revision 3562)
@@ -1,195 +0,0 @@
-// 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.rcp.handlers.export;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.txm.core.preferences.TBXPreferences;
-import org.txm.core.results.TXMResult;
-import org.txm.rcp.JobsTimer;
-import org.txm.rcp.StatusLine;
-import org.txm.rcp.handlers.files.EditFile;
-import org.txm.rcp.messages.TXMUIMessages;
-import org.txm.rcp.swt.dialog.LastOpened;
-import org.txm.rcp.utils.JobHandler;
-import org.txm.utils.ExecTimer;
-import org.txm.utils.logger.Log;
-
-/**
- * Exports a result by calling the function toTxt(File f) then opens or not the result in the text editor according to the preferences.
- * 
- * @author mdecorde, sjacquot
- */
-public class ExportResultParameter extends AbstractHandler {
-	
-	private static final String ID = "org.txm.rcp.commands.function.ExportResult"; //$NON-NLS-1$
-	
-	/** The selection. */
-	private IStructuredSelection selection;
-	
-	/** The lastopenedfile. */
-	// private static String lastopenedfile;
-	
-	/**
-	 * Export a TXM result in a CSV file.
-	 *
-	 * @param event the event
-	 * @return the object
-	 * @throws ExecutionException the execution exception
-	 */
-	@Override
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
-		final Object s = selection.getFirstElement();
-		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
-		
-		// String txmhome = Toolbox.getTxmHomePath();
-		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
-		
-		String extensions[] = { "*.csv" }; //$NON-NLS-1$
-		if (s instanceof TXMResult) {
-			extensions = ((TXMResult) s).getExportTXTExtensions();
-			dialog.setFileName(((TXMResult) s).getValidFileName());
-		}
-		dialog.setFilterExtensions(extensions);
-		
-		if (LastOpened.getFile(ID) != null) {
-			dialog.setFilterPath(LastOpened.getFolder(ID));
-		}
-		
-		if (dialog.open() != null) {
-			StatusLine.setMessage(TXMUIMessages.exportingResults);
-			String filepath = dialog.getFilterPath() + "/" + dialog.getFileName(); //$NON-NLS-1$
-			if (!(filepath.endsWith(extensions[0].substring(1))))
-				filepath += extensions[0].substring(1);
-			
-			final File outfile = new File(filepath);
-			LastOpened.set(ID, outfile.getParent(), outfile.getName());
-			try {
-				outfile.createNewFile();
-			}
-			catch (IOException e1) {
-				Log.warning(NLS.bind(TXMUIMessages.exportColonCantCreateFileP0ColonP1, outfile, e1));
-			}
-			if (!outfile.canWrite()) {
-				Log.warning(NLS.bind(TXMUIMessages.impossibleToReadP0, outfile));
-				return null;
-			}
-			if (!outfile.isFile()) {
-				Log.warning("Error: " + outfile + " is not a file"); //$NON-NLS-1$ //$NON-NLS-2$
-				return null;
-			}
-			
-			final String encoding = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_ENCODING);
-			String _colseparator = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_COL_SEPARATOR);
-			final String colseparator = _colseparator;
-			String _txtseparator = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_TXT_SEPARATOR);
-			final String txtseparator = _txtseparator;
-			
-			JobHandler jobhandler = new JobHandler(TXMUIMessages.exportingResults) {
-				
-				@Override
-				protected IStatus run(IProgressMonitor monitor) {
-					
-					// convert the monitor into sub-monitor
-					SubMonitor subMonitor = SubMonitor.convert(monitor, TXMUIMessages.exporting, 100);
-					
-					try {
-						
-						this.runInit(subMonitor);
-						
-						if (s instanceof TXMResult) {
-							TXMResult r = (TXMResult) s;
-							
-							// compute the result if needed
-							if (!r.isAltered() && r.isDirty()) {
-								r.compute(this);
-							}
-							Log.info(TXMUIMessages.bind(TXMUIMessages.exportingP0, r.getName()));
-							ExecTimer.start();
-							r.toTxt(outfile, encoding, colseparator, txtseparator);
-							Log.info(TXMUIMessages.bind(TXMUIMessages.doneInP0, ExecTimer.stop()));
-						}
-						else {
-							Log.warning(TXMUIMessages.TheExportedObjectIsNotATXMResultResult);
-							return Status.CANCEL_STATUS;
-						}
-						
-						if (outfile.exists()) {
-							// Open internal editor in the UI thread
-							if (TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPORT_SHOW)) {
-								this.syncExec(new Runnable() {
-									
-									@Override
-									public void run() {
-										EditFile.openfile(outfile.getAbsolutePath());
-									}
-								});
-							}
-						}
-						else {
-							Log.warning(NLS.bind(TXMUIMessages.failedToExportResultP0ColonP1, outfile.getAbsolutePath()));
-						}
-					}
-					catch (ThreadDeath td) {
-						TXMResult r = (TXMResult) s;
-						r.resetComputingState();
-						return Status.CANCEL_STATUS;
-					}
-					catch (Exception e) {
-						Log.warning(NLS.bind(TXMUIMessages.failedToExportResultP0ColonP1, s, e));
-						org.txm.utils.logger.Log.printStackTrace(e);
-						return Status.CANCEL_STATUS;
-					}
-					finally {
-						subMonitor.done();
-						JobsTimer.stopAndPrint();
-					}
-					return Status.OK_STATUS;
-				}
-			};
-			
-			jobhandler.startJob();
-		}
-		return null;
-	}
-}
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/export/ExportResultData.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/export/ExportResultData.java	(revision 0)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/export/ExportResultData.java	(revision 3562)
@@ -0,0 +1,195 @@
+// 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.rcp.handlers.export;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.results.TXMResult;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.handlers.files.EditFile;
+import org.txm.rcp.messages.TXMUIMessages;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.utils.ExecTimer;
+import org.txm.utils.logger.Log;
+
+/**
+ * Exports a result by calling the function toTxt(File f) then opens or not the result in the text editor according to the preferences.
+ * 
+ * @author mdecorde, sjacquot
+ */
+public class ExportResultData extends AbstractHandler {
+	
+	private static final String ID = "org.txm.rcp.commands.function.ExportResult"; //$NON-NLS-1$
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/** The lastopenedfile. */
+	// private static String lastopenedfile;
+	
+	/**
+	 * Export a TXM result in a CSV file.
+	 *
+	 * @param event the event
+	 * @return the object
+	 * @throws ExecutionException the execution exception
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		final Object s = selection.getFirstElement();
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		
+		// String txmhome = Toolbox.getTxmHomePath();
+		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+		
+		String extensions[] = { "*.csv" }; //$NON-NLS-1$
+		if (s instanceof TXMResult) {
+			extensions = ((TXMResult) s).getExportTXTExtensions();
+			dialog.setFileName(((TXMResult) s).getValidFileName());
+		}
+		dialog.setFilterExtensions(extensions);
+		
+		if (LastOpened.getFile(ID) != null) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+		}
+		
+		if (dialog.open() != null) {
+			StatusLine.setMessage(TXMUIMessages.exportingResults);
+			String filepath = dialog.getFilterPath() + "/" + dialog.getFileName(); //$NON-NLS-1$
+			if (!(filepath.endsWith(extensions[0].substring(1))))
+				filepath += extensions[0].substring(1);
+			
+			final File outfile = new File(filepath);
+			LastOpened.set(ID, outfile.getParent(), outfile.getName());
+			try {
+				outfile.createNewFile();
+			}
+			catch (IOException e1) {
+				Log.warning(NLS.bind(TXMUIMessages.exportColonCantCreateFileP0ColonP1, outfile, e1));
+			}
+			if (!outfile.canWrite()) {
+				Log.warning(NLS.bind(TXMUIMessages.impossibleToReadP0, outfile));
+				return null;
+			}
+			if (!outfile.isFile()) {
+				Log.warning("Error: " + outfile + " is not a file"); //$NON-NLS-1$ //$NON-NLS-2$
+				return null;
+			}
+			
+			final String encoding = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_ENCODING);
+			String _colseparator = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_COL_SEPARATOR);
+			final String colseparator = _colseparator;
+			String _txtseparator = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_TXT_SEPARATOR);
+			final String txtseparator = _txtseparator;
+			
+			JobHandler jobhandler = new JobHandler(TXMUIMessages.exportingResults) {
+				
+				@Override
+				protected IStatus run(IProgressMonitor monitor) {
+					
+					// convert the monitor into sub-monitor
+					SubMonitor subMonitor = SubMonitor.convert(monitor, TXMUIMessages.exporting, 100);
+					
+					try {
+						
+						this.runInit(subMonitor);
+						
+						if (s instanceof TXMResult) {
+							TXMResult r = (TXMResult) s;
+							
+							// compute the result if needed
+							if (!r.isAltered() && r.isDirty()) {
+								r.compute(this);
+							}
+							Log.info(TXMUIMessages.bind(TXMUIMessages.exportingP0, r.getName()));
+							ExecTimer.start();
+							r.toTxt(outfile, encoding, colseparator, txtseparator);
+							Log.info(TXMUIMessages.bind(TXMUIMessages.doneInP0, ExecTimer.stop()));
+						}
+						else {
+							Log.warning(TXMUIMessages.TheExportedObjectIsNotATXMResultResult);
+							return Status.CANCEL_STATUS;
+						}
+						
+						if (outfile.exists()) {
+							// Open internal editor in the UI thread
+							if (TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPORT_SHOW)) {
+								this.syncExec(new Runnable() {
+									
+									@Override
+									public void run() {
+										EditFile.openfile(outfile.getAbsolutePath());
+									}
+								});
+							}
+						}
+						else {
+							Log.warning(NLS.bind(TXMUIMessages.failedToExportResultP0ColonP1, outfile.getAbsolutePath()));
+						}
+					}
+					catch (ThreadDeath td) {
+						TXMResult r = (TXMResult) s;
+						r.resetComputingState();
+						return Status.CANCEL_STATUS;
+					}
+					catch (Exception e) {
+						Log.warning(NLS.bind(TXMUIMessages.failedToExportResultP0ColonP1, s, e));
+						org.txm.utils.logger.Log.printStackTrace(e);
+						return Status.CANCEL_STATUS;
+					}
+					finally {
+						subMonitor.done();
+						JobsTimer.stopAndPrint();
+					}
+					return Status.OK_STATUS;
+				}
+			};
+			
+			jobhandler.startJob();
+		}
+		return null;
+	}
+}

Property changes on: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/export/ExportResultData.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.rcp/plugin.xml	(revision 3561)
+++ TXM/trunk/org.txm.rcp/plugin.xml	(revision 3562)
@@ -2808,7 +2808,7 @@
          point="org.eclipse.ui.commands">
 
       <command
-            defaultHandler="org.txm.rcp.handlers.export.ExportResultParameter"
+            defaultHandler="org.txm.rcp.handlers.export.ExportResultData"
             id="org.txm.rcp.commands.function.ExportResult"
             name="%command.name.24">
       </command>
Index: TXM/trunk/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java
===================================================================
--- TXM/trunk/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java	(revision 3561)
+++ TXM/trunk/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java	(revision 3562)
@@ -22,6 +22,7 @@
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.utils.TXMProgressMonitor;
 import org.txm.utils.io.IOUtils;
+import org.txm.utils.logger.Log;
 
 /**
  * Partition dimensions.
@@ -57,7 +58,6 @@
 	
 	
 	
-	
 	/**
 	 * Creates a not computed partition dimensions.
 	 * 
@@ -108,8 +108,17 @@
 		return true;
 	}
 	
+	/**
+	 * Gets a string representing the result that can be used as a file name (eg. for exporting in file).
+	 * 
+	 * @return a valid filename without unexpected characters
+	 */
+	// FIXME: to discuss and/or to move in export layer
+	public String getValidFileName() {
+		
+		return parent.getValidFileName()+" "+super.getValidFileName(); //$NON-NLS-1$
+	}
 	
-	
 	@Override
 	protected boolean __compute(TXMProgressMonitor monitor) throws Exception {
 		// retrieve the parts
@@ -236,6 +245,8 @@
 	public boolean _toTxt(File file, String encoding, String colseparator, String txtseparator) throws Exception {
 		PrintWriter writer = IOUtils.getWriter(file, encoding);
 		
+		writer.println("id"+colseparator+"F");
+		
 		for (Part b : this.parts) {
 			writer.println(txtseparator+b.getName().replaceAll(txtseparator, txtseparator+txtseparator)+txtseparator+colseparator+txtseparator+b.getSize()+txtseparator);
 		}
