Index: tmp/CQP/src/cwbinstaller/commands/DoInstallStep.java
===================================================================
--- tmp/CQP/src/cwbinstaller/commands/DoInstallStep.java	(revision 323)
+++ tmp/CQP/src/cwbinstaller/commands/DoInstallStep.java	(revision 324)
@@ -6,12 +6,12 @@
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.jface.util.Util;
 import org.osgi.framework.Version;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.preferences.CQPPreferencePage;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.TxmPreferences;
 import org.txm.utils.BundleUtils;
 import org.txm.utils.logger.Log;
 
-public class DoInstallStep extends org.txm.rcpapplication.commands.TxmCommand {
+public class DoInstallStep extends org.txm.rcp.commands.TxmCommand {
 	protected String name = "cwbbinaries.commands.DoInstallStep"; //$NON-NLS-1$
 	public static final String VERSION = "cwbinstaller.commands.version";
 	
@@ -67,9 +67,9 @@
 		File OSDir = new File(cwbDir, os);
 		File execFile = new File(OSDir, "cqpserver"+ext);
 
-		TxmPreferences.set(CQPPreferencePage.CQI_SERVER_PATH_TO_CQPLIB, OSDir.getAbsolutePath());
-		TxmPreferences.set(CQPPreferencePage.CQI_SERVER_PATH_TO_INIT_FILE, initFile.getAbsolutePath());
-		TxmPreferences.set(CQPPreferencePage.CQI_SERVER_PATH_TO_EXECUTABLE, execFile.getAbsolutePath());
+		TxmPreferences.set(TBXPreferences.CQI_SERVER_PATH_TO_CQPLIB, OSDir.getAbsolutePath());
+		TxmPreferences.set(TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE, initFile.getAbsolutePath());
+		TxmPreferences.set(TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, execFile.getAbsolutePath());
 		if (!Util.isWindows()) { 
 			try {
 				Log.info("Setting execution file rights to: "+OSDir.getAbsolutePath());
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java	(revision 323)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java	(revision 324)
@@ -76,20 +76,20 @@
 import org.txm.index.core.functions.LineComparator.SortMode;
 import org.txm.index.rcp.messages.IndexUIMessages;
 import org.txm.rcp.editors.TXMEditorPart;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.commands.editor.CustomizableEditor;
-import org.txm.rcpapplication.commands.link.IndexToConcordance;
-import org.txm.rcpapplication.commands.link.IndexToProgression;
-import org.txm.rcpapplication.editors.TableKeyListener;
-import org.txm.rcpapplication.preferences.UserPreferencePage;
-import org.txm.rcpapplication.swt.widget.AssistedQueryWidget;
-import org.txm.rcpapplication.swt.widget.NavigationWidget;
-import org.txm.rcpapplication.swt.widget.PropertiesSelector;
-import org.txm.rcpapplication.utils.JobHandler;
-import org.txm.rcpapplication.views.QueriesView;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.commands.link.IndexToConcordance;
+import org.txm.rcp.commands.link.IndexToProgression;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.preferences.UserPreferencePage;
+import org.txm.rcp.swt.widget.AssistedQueryWidget;
+import org.txm.rcp.swt.widget.NavigationWidget;
+import org.txm.rcp.swt.widget.PropertiesSelector;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.QueriesView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Partition;
@@ -390,7 +390,7 @@
 							System.out.println(Messages.LastCQPError+Toolbox.getCqiClient().getLastCQPError());
 						} catch (Exception e1) {
 							System.out.println(IndexUIMessages.IndexEditor_10+e1);
-							org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+							org.txm.rcp.utils.Logger.printStackTrace(e1);
 						}
 						Log.severe("Error while computing Index with "+query+" query: "+e.getLocalizedMessage());
 					} finally {
@@ -403,7 +403,7 @@
 			jobhandler.startJob();
 
 		} catch (Exception e1) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
 		}
 	}
 
@@ -894,7 +894,7 @@
 				freqColumn.setText(Messages.FrequencyListEditorInput_4);
 		} catch (CqiClientException e2) {
 			// TODO Auto-generated catch block
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e2);
+			org.txm.rcp.utils.Logger.printStackTrace(e2);
 		}
 		freqColumn.setToolTipText(Messages.FrequencyListEditorInput_4);
 		freqColumn.setWidth(100);
@@ -935,7 +935,7 @@
 							partColumn.setText(partnames.get(i)+" t="+partition.getParts().get(i).getSize()); //$NON-NLS-1$
 						} catch (CqiClientException e1) {
 							// TODO Auto-generated catch block
-							org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+							org.txm.rcp.utils.Logger.printStackTrace(e1);
 						}
 						partColumn.setToolTipText(partnames.get(i));
 						partColumn.setWidth(100);
@@ -1043,7 +1043,7 @@
 					if (!index.getProperties().contains(p))
 						availables.add(p);
 			} catch (CqiClientException e) {
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
 				initializing = false;
 			}
 			ArrayList<Property> props = new ArrayList<Property>();
@@ -1163,7 +1163,7 @@
 
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
 	 */
 	@Override
 	public void setName(String name) {
@@ -1171,7 +1171,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
 	 */
 	@Override
 	public void setIcon(Image image) {
@@ -1179,7 +1179,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
 	 */
 	@Override
 	public void setSource(Object source)
@@ -1188,7 +1188,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#getSource()
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
 	 */
 	@Override
 	public Object getSource() {
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/DictionnaryEditor.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/DictionnaryEditor.java	(revision 323)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/DictionnaryEditor.java	(revision 324)
@@ -39,7 +39,7 @@
 public class DictionnaryEditor extends IndexEditor {
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.index.IndexEditor#createPartControl(org.eclipse.swt.widgets.Composite)
+	 * @see org.txm.rcp.editors.index.IndexEditor#createPartControl(org.eclipse.swt.widgets.Composite)
 	 */
 	@Override
 	public void createPartControl(final Composite parent) {
@@ -57,7 +57,7 @@
 	
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.index.IndexEditor#getTitleToolTip()
+	 * @see org.txm.rcp.editors.index.IndexEditor#getTitleToolTip()
 	 */
 	@Override
 	public String getTitleToolTip() {
@@ -74,7 +74,7 @@
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.index.IndexEditor#getSource()
+	 * @see org.txm.rcp.editors.index.IndexEditor#getSource()
 	 */
 	@Override
 	public Object getSource()
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeIndex.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeIndex.java	(revision 323)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeIndex.java	(revision 324)
@@ -35,9 +35,9 @@
 import org.txm.index.rcp.editors.IndexEditorInput;
 import org.txm.index.rcp.messages.IndexUIMessages;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.TXMWindows;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Partition;
 
@@ -93,7 +93,7 @@
 			}
 		}
 		catch (Exception e) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 		return null;
 	}
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeLexicon.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeLexicon.java	(revision 323)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/handlers/ComputeLexicon.java	(revision 324)
@@ -35,8 +35,8 @@
 import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
 import org.txm.lexicon.rcp.editors.DictionnaryEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.TXMWindows;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 
 // TODO: Auto-generated Javadoc
@@ -95,7 +95,7 @@
 			
 		}
 		catch (Exception e) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		} 
 
 		
Index: tmp/org.txm.index.rcp/plugin.xml
===================================================================
--- tmp/org.txm.index.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.index.rcp/plugin.xml	(revision 324)
@@ -4,7 +4,7 @@
    <extension
          point="org.eclipse.ui.menus">
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeIndex"
                icon="icons/index.png"
@@ -43,7 +43,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputeIndex"
                icon="icons/index.png"
@@ -86,7 +86,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.index.rcp.handlers.ComputeIndex"
             id="ComputeIndex"
             name="%command.name">
Index: tmp/org.txm.cooccurrence.rcp/plugin.xml
===================================================================
--- tmp/org.txm.cooccurrence.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.cooccurrence.rcp/plugin.xml	(revision 324)
@@ -4,7 +4,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.cooccurrence.rcp.handlers.ComputeCooccurrences"
             id="ComputeCooccurrences"
             name="%command.name">
@@ -13,7 +13,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.cooccurrence.rcp.preferences.CoocPreferencePage"
             id="org.txm.cooccurrence.rcp.preferences.CoocPreferencePage"
             name="%page.name">
@@ -33,7 +33,7 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeCooccurrences"
                icon="icons/cooccurrences.png"
@@ -72,7 +72,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputeCooccurrences"
                icon="icons/cooccurrences.png"
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java	(revision 323)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java	(revision 324)
@@ -42,10 +42,10 @@
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.functions.concordances.Concordance;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.TXMWindows;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
@@ -116,7 +116,7 @@
 			return conceditor;
 		}
 		catch (Exception e) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 		
 		
@@ -168,7 +168,7 @@
 				cooc.process();
 			} catch (Exception e) {
 				// TODO Auto-generated catch block
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
 				return null;
 			}
 		} else if (selection instanceof Corpus) {
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/preferences/CoocPreferencePage.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/preferences/CoocPreferencePage.java	(revision 323)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/preferences/CoocPreferencePage.java	(revision 324)
@@ -36,7 +36,7 @@
 import org.txm.cooccurrence.rcp.messages.CooccurrenceUIMessages;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
-import org.txm.rcpapplication.jface.DoubleFieldEditor;
+import org.txm.rcp.jface.DoubleFieldEditor;
 
 /**
  * 
Index: tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java
===================================================================
--- tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java	(revision 323)
+++ tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java	(revision 324)
@@ -88,21 +88,21 @@
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.rcp.editors.TXMEditorPart;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.commands.editor.CustomizableEditor;
-import org.txm.rcpapplication.commands.link.CooccurrencesToConcordances;
-import org.txm.rcpapplication.editors.TableKeyListener;
-import org.txm.rcpapplication.preferences.UserPreferencePage;
-import org.txm.rcpapplication.swt.widget.AssistedQueryWidget;
-import org.txm.rcpapplication.swt.widget.EmpantWidget;
-import org.txm.rcpapplication.swt.widget.PropertiesSelector;
-import org.txm.rcpapplication.utils.JobHandler;
-import org.txm.rcpapplication.utils.Logger;
-import org.txm.rcpapplication.views.QueriesView;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.commands.link.CooccurrencesToConcordances;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.preferences.UserPreferencePage;
+import org.txm.rcp.swt.widget.AssistedQueryWidget;
+import org.txm.rcp.swt.widget.EmpantWidget;
+import org.txm.rcp.swt.widget.PropertiesSelector;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.utils.Logger;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Property;
@@ -315,7 +315,7 @@
 			} catch (Exception e) {
 				System.err.println(NLS.bind(
 						Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
 			}
 			viewer.refresh();
 		}
@@ -837,7 +837,7 @@
 						Logger.info(Messages.LastCQPError+Toolbox.getCqiClient().getLastCQPError());
 					} catch (Exception e2) {
 						Logger.severe(Messages.ConcordancesEditor_7+e2);
-						org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+						org.txm.rcp.utils.Logger.printStackTrace(e);
 					}
 					
 					return Status.CANCEL_STATUS;
@@ -902,7 +902,7 @@
 				this.propsArea.setProperties(available, cooc.getProperties());
 			} catch (CqiClientException e) {
 				// TODO Auto-generated catch block
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
 			}
 			this.empantPanel.setStructure(cooc.getStructure());
 			this.empantPanel.setMinLeft(cooc.getMinLeft()-1);
@@ -978,7 +978,7 @@
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
 	 */
 	@Override
 	public void setName(String name) {
@@ -986,7 +986,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
 	 */
 	@Override
 	public void setIcon(Image image) {
@@ -994,7 +994,7 @@
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
 	 */
 	@Override
 	public void setSource(Object source)
@@ -1003,7 +1003,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#getSource()
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
 	 */
 	@Override
 	public Object getSource() {
Index: tmp/org.txm.chartsengine.r.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.chartsengine.r.rcp/META-INF/MANIFEST.MF	(revision 323)
+++ tmp/org.txm.chartsengine.r.rcp/META-INF/MANIFEST.MF	(revision 324)
@@ -6,6 +6,7 @@
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Require-Bundle: org.txm.chartsengine.rcp;bundle-version="1.0.0";visibility:=reexport,
  org.txm.rcp;bundle-version="0.7.8",
- org.txm.chartsengine.r.core;bundle-version="1.0.0";visibility:=reexport
+ org.txm.chartsengine.r.core;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.core
 Bundle-Vendor: Textometrie.org
 Import-Package: org.txm.chartsengine.rcp.messages
Index: tmp/org.txm.chartsengine.r.rcp/src/org/txm/rcp/chartsengine/r/preferences/RChartsEnginePreferencePage.java
===================================================================
--- tmp/org.txm.chartsengine.r.rcp/src/org/txm/rcp/chartsengine/r/preferences/RChartsEnginePreferencePage.java	(revision 323)
+++ tmp/org.txm.chartsengine.r.rcp/src/org/txm/rcp/chartsengine/r/preferences/RChartsEnginePreferencePage.java	(revision 324)
@@ -36,15 +36,16 @@
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.PlatformUI;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
 import org.txm.chartsengine.r.core.RChartsEngine;
 import org.txm.chartsengine.r.core.preferences.RChartsEnginePreferences;
 import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
 import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.ExportPreferencePage;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.preferences.ExportPreferencePage;
-import org.txm.rcpapplication.preferences.UserPreferencePage;
+import org.txm.rcp.preferences.UserPreferencePage;
 
 /**
  * R charts engine preference page.
@@ -102,17 +103,17 @@
 				SWTChartsComponentsProvider.setCurrrentComponentsProvider(ChartsEngine.getCurrent());
 				
 				// Set the first charts engine supported export file format as default charts export file format
-				TxmPreferences.set(ExportPreferencePage.RDEVICE, ChartsEngine.getCurrent().getSupportedOutputFileFormats().get(0));
+				TxmPreferences.set(ChartsEnginePreferences.RDEVICE, ChartsEngine.getCurrent().getSupportedOutputFileFormats().get(0));
 				
 				// Refresh the User\Export preference page to update "Default charts export file format" combo box
 				PlatformUI.getWorkbench().getPreferenceManager().
-					find("org.txm.rcpapplication.preferences.TextometriePreferencePage/" + UserPreferencePage.ID + "/" + ExportPreferencePage.ID).createPage(); //$NON-NLS-1$ //$NON-NLS-2$
+					find("org.txm.rcp.preferences.TextometriePreferencePage/" + UserPreferencePage.ID + "/" + ExportPreferencePage.ID).createPage(); //$NON-NLS-1$ //$NON-NLS-2$
 
 			}
 			
 			
 		} catch (Exception e) {
-			System.err.println(org.txm.rcpapplication.Messages.FAILED_TO_SAVE_PREFERENCES + e);
+			System.err.println(org.txm.rcp.Messages.FAILED_TO_SAVE_PREFERENCES + e);
 		}
 		return true;
 	}
Index: tmp/org.txm.index.core/groovy/org/txm/macro/r/ExecRMacro.groovy
===================================================================
--- tmp/org.txm.index.core/groovy/org/txm/macro/r/ExecRMacro.groovy	(revision 323)
+++ tmp/org.txm.index.core/groovy/org/txm/macro/r/ExecRMacro.groovy	(revision 324)
@@ -4,8 +4,8 @@
 import org.kohsuke.args4j.*
 import org.txm.Toolbox
 import org.txm.functions.index.Index
-import org.txm.rcpapplication.commands.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.commands.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.stat.engine.r.RWorkspace
 
 
Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/preferences/ChartsEnginePreferences.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/preferences/ChartsEnginePreferences.java	(revision 323)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/preferences/ChartsEnginePreferences.java	(revision 324)
@@ -56,6 +56,9 @@
 	 */
 	public final static String MONOCHROME_COLOR = PREFERENCES_PREFIX +  "monochrome_color"; //$NON-NLS-1$
 	
+	/** The Constant RDEVICE. */
+	public static final String RDEVICE = "export_rdevice"; //$NON-NLS-1$
+	
 	/**
 	 * Constant for the font.
 	 */
Index: tmp/org.txm.synopticeditor.rcp/plugin.xml
===================================================================
--- tmp/org.txm.synopticeditor.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.synopticeditor.rcp/plugin.xml	(revision 324)
@@ -5,7 +5,7 @@
    <extension
          point="org.eclipse.ui.menus">
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.ConcordancesEditor">
+            locationURI="popup:org.txm.rcp.editors.ConcordancesEditor">
          <command
                commandId="org.txm.rcp.synoptic.commands.BackToText"
                icon="icons/objects/edition.png"
@@ -15,19 +15,19 @@
       <menuContribution
             locationURI="menu:menu.help.plugins">
          <command
-               commandId="org.txm.rcpapplication.commands.OpenBrowser"
+               commandId="org.txm.rcp.commands.OpenBrowser"
                icon="icons/objects/edition.png"
                label="%command.label"
                style="push">
             <parameter
-                  name="org.txm.rcpapplication.commands.commandParameter2"
+                  name="org.txm.rcp.commands.commandParameter2"
                   value="https://groupes.renater.fr/wiki/txm-users/public/extensions#synoptic_editor">
             </parameter>
          </command>
       </menuContribution>
       <menuContribution
             allPopups="true"
-            locationURI="toolbar:org.txm.rcpapplication.toolbarcorpus?before=org.txm.rcpapplication.toolbarcorpus.description">
+            locationURI="toolbar:org.txm.rcp.toolbarcorpus?before=org.txm.rcp.toolbarcorpus.description">
          <command
                commandId="org.txm.rcp.synoptic.commands.OpenEdition"
                icon="icons/objects/edition.png"
@@ -44,7 +44,7 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView?before=corporaview.description">
+            locationURI="popup:org.txm.rcp.views.CorporaView?before=corporaview.description">
          <command
                commandId="org.txm.rcp.synoptic.commands.OpenEdition"
                icon="icons/objects/edition.png"
@@ -80,7 +80,7 @@
       <menuContribution
             locationURI="popup:org.txm.rcp.synoptic.editor.SynopticEditionEditor">
          <command
-               commandId="org.txm.rcpapplication.commands.link.TextToConcordance"
+               commandId="org.txm.rcp.commands.link.TextToConcordance"
                label="Send to concordances..."
                style="push">
          </command>
@@ -128,7 +128,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.rcp.synoptic.preferences.EditionPreferencePage"
             id="org.txm.rcp.synoptic.preferences.EditionPreferencePage"
             name="Edition">
Index: tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/editor/EditionPanel.java
===================================================================
--- tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/editor/EditionPanel.java	(revision 323)
+++ tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/editor/EditionPanel.java	(revision 324)
@@ -29,9 +29,9 @@
 import org.txm.objects.Page;
 import org.txm.objects.Text;
 import org.txm.rcp.synoptic.preferences.EditionPreferencePage;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.utils.IOClipboard;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.utils.IOClipboard;
 import org.txm.utils.logger.Log;
 
 import synopticeditor.SynopticMessages;
Index: tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/editor/SynopticEditionEditor.java
===================================================================
--- tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/editor/SynopticEditionEditor.java	(revision 323)
+++ tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/editor/SynopticEditionEditor.java	(revision 324)
@@ -64,9 +64,9 @@
 import org.txm.objects.Text;
 import org.txm.rcp.synoptic.editor.EditionPanel.RGBA;
 import org.txm.rcp.synoptic.editor.ext.ToolbarButton;
-import org.txm.rcpapplication.IImageKeys;
-import org.txm.rcpapplication.commands.editor.CustomizableEditor;
-import org.txm.rcpapplication.editors.IEditionEditor;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.editors.IEditionEditor;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.utils.logger.Log;
 
@@ -401,7 +401,7 @@
 							System.out.println(SynopticMessages.SynopticEditionEditor_5);
 						}
 					} catch (Exception e2) {
-						org.txm.rcpapplication.utils.Logger.printStackTrace(e2);
+						org.txm.rcp.utils.Logger.printStackTrace(e2);
 						System.out.println(SynopticMessages.SynopticEditionEditor_6+e2);
 					}
 				}
@@ -702,7 +702,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
 	 */
 	@Override
 	public void setSource(Object source) {
@@ -710,7 +710,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#getSource()
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
 	 */
 	@Override
 	public Object getSource() {
@@ -718,7 +718,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
 	 */
 	@Override
 	public void setName(String name) {
@@ -726,7 +726,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
 	 */
 	@Override
 	public void setIcon(Image image) {
Index: tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/editor/SynopticEditorInput.java
===================================================================
--- tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/editor/SynopticEditorInput.java	(revision 323)
+++ tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/editor/SynopticEditorInput.java	(revision 324)
@@ -5,8 +5,8 @@
 import org.eclipse.ui.IPersistableElement;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.txm.objects.Text;
-import org.txm.rcpapplication.Application;
-import org.txm.rcpapplication.IImageKeys;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
 import org.txm.searchengine.cqp.corpus.Corpus;
 
 import cern.colt.Arrays;
Index: tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/commands/BackToText.java
===================================================================
--- tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/commands/BackToText.java	(revision 323)
+++ tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/commands/BackToText.java	(revision 324)
@@ -48,10 +48,10 @@
 import org.txm.objects.Text;
 import org.txm.rcp.synoptic.editor.EditionPanel.RGBA;
 import org.txm.rcp.synoptic.editor.SynopticEditionEditor;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.commands.BackToTextCommand;
-import org.txm.rcpapplication.editors.concordances.ConcordancesEditor;
-import org.txm.rcpapplication.utils.SWTEditorsUtils;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.commands.BackToTextCommand;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.utils.SWTEditorsUtils;
 import org.txm.searchengine.cqp.AbstractCqiClient;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Property;
@@ -154,7 +154,7 @@
 				textid = line.getMatch().getValueForProperty(textP);// get text via text struct property id
 			} catch (Exception e2) {
 				System.out.println("The corpus has no text_id property" + e2); //$NON-NLS-1$
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e2);
+				org.txm.rcp.utils.Logger.printStackTrace(e2);
 				return false;
 			}
 
@@ -210,7 +210,7 @@
 			try {
 				lineids = line.getMatch().getValuesForProperty(corpus.getProperty("id")); //$NON-NLS-1$
 			} catch (Exception e1) {
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
 				return false;
 			}
 			Log.info(NLS.bind("Project id {0} Corpus (Base) id {1} Text id {2}",  //$NON-NLS-1$
Index: tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/commands/OpenEdition.java
===================================================================
--- tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/commands/OpenEdition.java	(revision 323)
+++ tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/commands/OpenEdition.java	(revision 324)
@@ -45,7 +45,7 @@
 import org.txm.rcp.synoptic.editor.EditionSelectorDialog;
 import org.txm.rcp.synoptic.editor.SynopticEditionEditor;
 import org.txm.rcp.synoptic.editor.SynopticEditorInput;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.searchengine.cqp.corpus.Property;
@@ -116,7 +116,7 @@
 
 			} catch (Exception e) {
 				System.out.println(SynopticMessages.OpenEdition_4+e);
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
 			}
 		} else {
 			System.out.println(SynopticMessages.OpenEdition_9);
Index: tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/preferences/EditionPreferencePage.java
===================================================================
--- tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/preferences/EditionPreferencePage.java	(revision 323)
+++ tmp/org.txm.synopticeditor.rcp/src/org/txm/rcp/synoptic/preferences/EditionPreferencePage.java	(revision 324)
@@ -5,7 +5,7 @@
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.txm.rcpapplication.Application;
+import org.txm.rcp.Application;
 
 public class EditionPreferencePage  extends FieldEditorPreferencePage
 implements IWorkbenchPreferencePage {
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/perspectives/RPerspective.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/perspectives/RPerspective.java	(revision 323)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/perspectives/RPerspective.java	(revision 324)
@@ -31,8 +31,8 @@
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPerspectiveFactory;
 import org.eclipse.ui.console.IConsoleConstants;
-import org.txm.rcpapplication.views.corpora.CorporaView;
-import org.txm.rcpapplication.views.fileexplorer.Explorer;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.rcp.views.fileexplorer.Explorer;
 import org.txm.statsengine.r.rcp.views.RConsole;
 import org.txm.statsengine.r.rcp.views.RVariablesView;
 
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/views/RConsole.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/views/RConsole.java	(revision 323)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/views/RConsole.java	(revision 324)
@@ -38,8 +38,8 @@
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.part.ViewPart;
 import org.txm.Toolbox;
-import org.txm.rcpapplication.IImageKeys;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 import org.txm.utils.MessagePrinter;
@@ -53,7 +53,7 @@
 public class RConsole extends ViewPart implements MessagePrinter {
 
 	/** The ID. */
-	public static String ID = "org.txm.rcpapplication.views.RConsole"; //$NON-NLS-1$
+	public static String ID = "org.txm.rcp.views.RConsole"; //$NON-NLS-1$
 
 	/** The text area. */
 	private StyledText textArea;
@@ -105,7 +105,7 @@
 		//			err = new PrintStream(pout, true);
 		//
 		//		} catch (IOException e) {
-		//			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+		//			org.txm.rcp.utils.Logger.printStackTrace(e);
 		//		}
 		//
 		//		reader = new Thread(this);
@@ -213,7 +213,7 @@
 				clear();
 			} 
 		};
-		lCustomAction.setId("org.txm.rcpapplication.views.RConsole.clear"); //$NON-NLS-1$
+		lCustomAction.setId("org.txm.rcp.views.RConsole.clear"); //$NON-NLS-1$
 		//lCustomAction.setText("Clear");  
 		lCustomAction.setImageDescriptor(IImageKeys.getImageDescriptor(IImageKeys.ACTION_DELETE)); 
 		getViewSite().getActionBars().getToolBarManager().add(lCustomAction); 
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 323)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/views/RVariablesView.java	(revision 324)
@@ -71,10 +71,10 @@
 import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
 import org.txm.objects.Base;
 import org.txm.progression.core.functions.Progression;
-import org.txm.rcpapplication.IImageKeys;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.commands.EditFile;
-import org.txm.rcpapplication.commands.R.CopySelection;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.commands.R.CopySelection;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.CorpusManager;
@@ -92,7 +92,7 @@
 	TreeViewer tv;
 
 	/** The ID. */
-	public static String ID = "org.txm.rcpapplication.views.RVariablesView"; //$NON-NLS-1$
+	public static String ID = "org.txm.rcp.views.RVariablesView"; //$NON-NLS-1$
 
 	/**
 	 * Refresh.
@@ -261,7 +261,7 @@
 					EditFile.openfile(tmp.getAbsolutePath());
 				} catch (Exception e) {
 					// TODO Auto-generated catch block
-					org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+					org.txm.rcp.utils.Logger.printStackTrace(e);
 				}
 			}
 
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/SendToRCommand.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/SendToRCommand.java	(revision 323)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/SendToRCommand.java	(revision 324)
@@ -38,9 +38,9 @@
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.core.results.TXMResult;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.utils.JobHandler;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.statsengine.r.rcp.messages.RUIMessages;
 import org.txm.statsengine.r.rcp.views.RVariablesView;
 
@@ -87,7 +87,7 @@
 
 							} catch (Exception e) {
 								System.out.println("Failed to send to R: "+o);
-								org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+								org.txm.rcp.utils.Logger.printStackTrace(e);
 							}
 						}
 					}
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/CheckRPackages.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/CheckRPackages.java	(revision 323)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/CheckRPackages.java	(revision 324)
@@ -17,8 +17,8 @@
 import org.rosuda.REngine.RList;
 import org.txm.Toolbox;
 import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.TxmPreferences;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 import org.txm.statsengine.r.rcp.messages.RUIMessages;
@@ -155,7 +155,7 @@
 	
 	public static boolean installRPAckagesViaRscript() throws IOException {
 		String cmd = ""; //$NON-NLS-1$
-		String installPath = TxmPreferences.get(TBXPreferences.INSTALL_DIR);
+		String installPath = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR);
 		if (Util.isMac() || Util.isLinux()) {
 			cmd = "R --no-save < \""+installPath+"/R/rlibs.R\""; //$NON-NLS-1$ //$NON-NLS-2$
 		} else if (Util.isWindows()) {
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRScript.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRScript.java	(revision 323)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRScript.java	(revision 324)
@@ -49,13 +49,13 @@
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.ide.FileStoreEditorInput;
-import org.txm.rcpapplication.Application;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.editors.TxtEditor;
-import org.txm.rcpapplication.preferences.ScriptPreferenceInitializer;
-import org.txm.rcpapplication.preferences.ScriptPreferencePage;
-import org.txm.rcpapplication.swt.dialog.LastOpened;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.rcp.preferences.ScriptPreferenceInitializer;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.rcp.swt.dialog.LastOpened;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 import org.txm.statsengine.r.rcp.views.RConsole;
@@ -68,7 +68,7 @@
  */
 public class ExecuteRScript extends AbstractHandler {
 
-	private static final String ID = "org.txm.rcpapplication.commands.ExecuteRScript"; //$NON-NLS-1$
+	private static final String ID = "org.txm.rcp.commands.ExecuteRScript"; //$NON-NLS-1$
 	/* (non-Javadoc)
 	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
 	 */
@@ -145,7 +145,7 @@
 		try {
 			rw = RWorkspace.getRWorkspaceInstance();
 		} catch (RWorkspaceException e1) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
 			return;
 		}
 		boolean initState = rw.isLogging();
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRText.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRText.java	(revision 323)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRText.java	(revision 324)
@@ -34,8 +34,8 @@
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.handlers.HandlerUtil;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 import org.txm.utils.logger.Log;
@@ -76,7 +76,7 @@
 		try {
 			rw = RWorkspace.getRWorkspaceInstance();
 		} catch (RWorkspaceException e1) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
 			return null;
 		}
 		boolean initState = rw.isLogging();
@@ -97,7 +97,7 @@
 		} catch(Exception e) {
 			System.out.println(NLS.bind(Messages.ExecuteRText_1, text, Log.toString(e))); 
 			StatusLine.error(NLS.bind(Messages.ExecuteRText_1, text, Log.toString(e))); 
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 
 		rw.setLog(initState);
Index: tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/preferences/RPreferencePage.java
===================================================================
--- tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/preferences/RPreferencePage.java	(revision 323)
+++ tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/preferences/RPreferencePage.java	(revision 324)
@@ -37,7 +37,7 @@
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.preferences.RPreferences;
 import org.txm.statsengine.r.rcp.messages.RUIMessages;
@@ -55,32 +55,6 @@
 
 public class RPreferencePage extends TXMPreferencePage {
 
-//	/** The Constant R_PATH_TO_EXECUTABLE. */
-//	public static final String R_PATH_TO_EXECUTABLE = Toolbox.R_PATH_TO_EXECUTABLE;
-//	
-//	/** The Constant R_REMOTE. */
-//	public static final String R_REMOTE = Toolbox.R_REMOTE;
-//	
-//	/** The Constant R_SERVER_ADRESS. */
-//	public static final String R_SERVER_ADRESS = Toolbox.R_SERVER_ADDRESS;
-//	
-//	public static final String R_PORT = Toolbox.R_PORT;
-//	public static final String R_DEBUG = Toolbox.R_DEBUG;
-//	
-//	/** The Constant R_USER. */
-//	public static final String R_USER = Toolbox.R_USER;
-//	
-//	/** The Constant R_PASSWORD. */
-//	public static final String R_PASSWORD = Toolbox.R_PASSWORD;
-//	
-//	/** The Constant R_FILE_TRANSFERT. */
-//	public static final String R_FILE_TRANSFERT = Toolbox.R_FILE_TRANSFERT;
-//	
-//	public static final String R_SVG_DEVICE = Toolbox.R_SVG_DEVICE;
-
-//	/** The preferences. */
-//	private ScopedPreferenceStore preferences;
-
 	/** The r_path_to_executable. */
 	private StringFieldEditor r_path_to_executable;
 	
Index: tmp/org.txm.statsengine.r.rcp/plugin.xml
===================================================================
--- tmp/org.txm.statsengine.r.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.statsengine.r.rcp/plugin.xml	(revision 324)
@@ -5,7 +5,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.AdvancePreferencePage"
+            category="org.txm.rcp.preferences.AdvancePreferencePage"
             class="org.txm.statsengine.r.rcp.preferences.RPreferencePage"
             id="org.txm.statsengine.r.rcp.preferences.RPreferencePage"
             name="%page.name">
@@ -123,7 +123,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="SendToR"
                icon="icons/SendToR.png"
@@ -155,7 +155,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="SendToR"
                icon="icons/SendToR.png"
@@ -190,7 +190,7 @@
          point="org.eclipse.ui.views">
                <view
             allowMultiple="false"
-            category="org.txm.rcpapplication"
+            category="org.txm.rcp"
             class="org.txm.statsengine.r.rcp.views.RConsole"
             icon="icons/R.png"
             id="RConsoleView"
@@ -198,7 +198,7 @@
             restorable="true">
       </view>
                <view
-                     category="org.txm.rcpapplication"
+                     category="org.txm.rcp"
                      class="org.txm.statsengine.r.rcp.views.RVariablesView"
                      icon="icons/R.png"
                      id="RVariablesView"
Index: tmp/org.txm.groovy.core/src/groovy/tests/advancedPartition.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/tests/advancedPartition.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/tests/advancedPartition.groovy	(revision 324)
@@ -1,6 +1,6 @@
 package tests
 
-import org.txm.rcpapplication.views.*
+import org.txm.rcp.views.*
 import org.txm.searchengine.cqp.corpus.*
 
 
@@ -16,7 +16,7 @@
 import org.txm.searchengine.cqp.MemCqiServer
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.functions.ReferencePattern
-import org.txm.rcpapplication.views.CorporaView
+import org.txm.rcp.views.CorporaView
 import org.txm.searchengine.cqp.corpus.query.Query
 */
 
Index: tmp/org.txm.groovy.core/src/groovy/tests/tests_cql.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/tests/tests_cql.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/tests/tests_cql.groovy	(revision 324)
@@ -6,7 +6,7 @@
 import org.txm.searchengine.cqp.MemCqiServer
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.functions.ReferencePattern
-import org.txm.rcpapplication.views.*
+import org.txm.rcp.views.*
 import org.txm.searchengine.cqp.corpus.query.Query
 
 // Debug
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/test/ControlUI.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/test/ControlUI.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/test/ControlUI.groovy	(revision 324)
@@ -1,6 +1,6 @@
 package org.txm.test
 
-//import org.txm.rcpapplication.views.*
+//import org.txm.rcp.views.*
 
 // Bindings
 println "The current job monitor: "+monitor
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/test/mesures.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/test/mesures.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/test/mesures.groovy	(revision 324)
@@ -5,7 +5,7 @@
 import org.txm.Toolbox
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.searchengine.cqp.corpus.query.*
-//import org.txm.rcpapplication.commands.*;
+//import org.txm.rcp.commands.*;
 
 def corpus1 = CorpusManager.getCorpusManager().getCorpus("ALCESTE")
 def corpus2 = CorpusManager.getCorpusManager().getCorpus("DISCOURS")
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/test/OpenAnEditor.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/test/OpenAnEditor.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/test/OpenAnEditor.groovy	(revision 324)
@@ -1,10 +1,10 @@
 package org.txm.test
 
 //import org.eclipse.ui.*;
-//import org.txm.rcpapplication.*;
+//import org.txm.rcp.*;
 //
-//import org.txm.rcpapplication.editors.input.*;
-//import org.txm.rcpapplication.editors.queryindex.*;
+//import org.txm.rcp.editors.input.*;
+//import org.txm.rcp.editors.queryindex.*;
 
 final def sel = corpusViewSelection
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/test/ExecuteRscript.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/test/ExecuteRscript.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/test/ExecuteRscript.groovy	(revision 324)
@@ -31,7 +31,7 @@
 // $LastChangedRevision:$
 // $LastChangedBy:$ 
 //
-// import org.txm.rcpapplication.commands.*
+// import org.txm.rcp.commands.*
 // uncomment for test
 
 // get a connection to R
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/setup/BuildSplashVersion.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/setup/BuildSplashVersion.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/setup/BuildSplashVersion.groovy	(revision 324)
@@ -20,7 +20,7 @@
 
 String modifier = ""
 
-//String version =  org.txm.rcpapplication.Activator.getDefault().getBundle().getVersion().toString(); // "0.7.7.201412160925";
+//String version =  org.txm.rcp.Activator.getDefault().getBundle().getVersion().toString(); // "0.7.7.201412160925";
 String version = XPathResult.getXpathResponse(product, "//product/@version")
 //def date = " ("+new SimpleDateFormat("yyyy-MM-dd").format(new Date())+")"
 def date = ""
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/tal/stanford/StanfordSegmenterMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/tal/stanford/StanfordSegmenterMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/tal/stanford/StanfordSegmenterMacro.groovy	(revision 324)
@@ -2,7 +2,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import edu.stanford.nlp.international.arabic.process.*
 import edu.stanford.nlp.international.arabic.*
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/tal/stanford/StanfordTaggerMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/tal/stanford/StanfordTaggerMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/tal/stanford/StanfordTaggerMacro.groovy	(revision 324)
@@ -6,7 +6,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 @Field @Option(name="inputDir", usage="input directory", widget="Folder", required=true, def="/home/mdecorde/xml/testarabe/out-s")
 File inputDir
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/export/ExportCAH.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/export/ExportCAH.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/export/ExportCAH.groovy	(revision 324)
@@ -1,6 +1,6 @@
 package org.txm.export
 
-//import org.txm.rcpapplication.views.*
+//import org.txm.rcp.views.*
 import org.txm.functions.classification.*
 import org.txm.stat.engine.r.*
 // uncomment this
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/importer/limsi/limsiLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/importer/limsi/limsiLoader.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/importer/limsi/limsiLoader.groovy	(revision 324)
@@ -59,7 +59,7 @@
 import org.txm.utils.*;
 import org.txm.importer.*;
 import org.w3c.dom.Element
-import org.txm.rcpapplication.commands.*
+import org.txm.rcp.commands.*
 
 
 //PARAMETERS
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/InjectWordPropTableMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/InjectWordPropTableMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/InjectWordPropTableMacro.groovy	(revision 324)
@@ -9,7 +9,7 @@
 
 import groovy.transform.Field
 
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 @Field @Option(name="inputDirectory", usage="The XML-TXM folder", widget="Folder", required=true, def="")
 def inputDirectory = new File(System.getProperty("user.home"), "xml/anapovoas/HELPTXM-02-131124/ite02")
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/BuildWordPropTableMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/BuildWordPropTableMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/BuildWordPropTableMacro.groovy	(revision 324)
@@ -34,7 +34,7 @@
 import org.txm.functions.ReferencePattern
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 def corpus = corpusViewSelection
 if (!(corpus instanceof Corpus)) {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/csv/CSV2XMLMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/csv/CSV2XMLMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/csv/CSV2XMLMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 import org.kohsuke.args4j.*
 import groovy.transform.Field
 import java.nio.charset.Charset
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.utils.*
 import javax.xml.stream.*
 import java.net.URL
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/EditionUpdaterMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/EditionUpdaterMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/EditionUpdaterMacro.groovy	(revision 324)
@@ -10,8 +10,8 @@
 import org.txm.Toolbox
 import org.txm.importer.*
 import org.txm.objects.*
-import org.txm.rcpapplication.commands.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.commands.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.utils.io.FileCopy;
 import org.w3c.dom.*
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/AddFacsAttributeMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/AddFacsAttributeMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/AddFacsAttributeMacro.groovy	(revision 324)
@@ -2,7 +2,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 try { println "ARGS=$args";} catch(Exception e) {args = [:]}
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/FacsEditionBuilderMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/FacsEditionBuilderMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/FacsEditionBuilderMacro.groovy	(revision 324)
@@ -12,8 +12,8 @@
 import org.kohsuke.args4j.*
 import org.txm.Toolbox
 import org.txm.objects.*
-import org.txm.rcpapplication.commands.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.commands.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.utils.xml.DomUtils
 import org.w3c.dom.*
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/Specif2CoinMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/Specif2CoinMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/Specif2CoinMacro.groovy	(revision 324)
@@ -64,7 +64,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.eclipse.ui.console.*
 
 // BEGINNING OF PARAMETERS
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/EuroPress2XMLMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/EuroPress2XMLMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/EuroPress2XMLMacro.groovy	(revision 324)
@@ -8,7 +8,7 @@
 
 import org.kohsuke.args4j.*
 import org.txm.importer.ValidateXml
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.w3c.tidy.Tidy
 
 // BEGINNING OF PARAMETERS
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/TXM2CoNLL2009Macro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/TXM2CoNLL2009Macro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/TXM2CoNLL2009Macro.groovy	(revision 324)
@@ -5,7 +5,7 @@
 import org.txm.searchengine.cqp.corpus.*
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 if (!(corpusViewSelection instanceof Corpus)) {
 	println "Select a corpus or a sub-corpus"
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/stats/Specif2ThrowMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/stats/Specif2ThrowMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/stats/Specif2ThrowMacro.groovy	(revision 324)
@@ -63,7 +63,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.eclipse.ui.console.*
 
 // BEGINNING OF PARAMETERS
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/stats/BasicVocabularyMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/stats/BasicVocabularyMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/stats/BasicVocabularyMacro.groovy	(revision 324)
@@ -37,7 +37,7 @@
 import org.txm.functions.specificities.*
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 //TODO temporary uncommented
 //if (!(corpusViewSelection instanceof SpecificitesResult)) {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/TextTranscription2TRS.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/TextTranscription2TRS.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/TextTranscription2TRS.groovy	(revision 324)
@@ -27,7 +27,7 @@
 import org.txm.doc.*
 import org.txm.importer.*
 import org.txm.importer.filters.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 class TextTranscription2TRS {
 	boolean debug = false;
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/TextTranscription2TRSMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/TextTranscription2TRSMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/TextTranscription2TRSMacro.groovy	(revision 324)
@@ -25,7 +25,7 @@
 
 import groovy.transform.Field
 
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 
 @Field @Option(name="odtDir", usage="Dossier qui contient les fichiers ODT", widget="Folder", required=true, def="")
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Transana2TRS.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Transana2TRS.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Transana2TRS.groovy	(revision 324)
@@ -27,7 +27,7 @@
 import org.txm.doc.*
 import org.txm.importer.*
 import org.txm.importer.filters.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.w3c.tidy.Tidy
 
 class Transana2TRS {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchInDirectoryMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchInDirectoryMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchInDirectoryMacro.groovy	(revision 324)
@@ -6,7 +6,7 @@
 
 import java.nio.charset.Charset
 
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.utils.*
 
 import javax.xml.stream.*
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/TXT2XMLMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/TXT2XMLMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/TXT2XMLMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 import org.kohsuke.args4j.*
 import groovy.transform.Field
 import java.nio.charset.Charset
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.utils.*
 import javax.xml.stream.*
 import java.net.URL
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/CharListMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/CharListMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/CharListMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // BEGINNING OF PARAMETERS
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/ChangeEncodingMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/ChangeEncodingMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/ChangeEncodingMacro.groovy	(revision 324)
@@ -23,7 +23,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.utils.CharsetDetector
 
 @Field @Option(name="inputDirectory", usage="Dossier qui contient les fichiers à traiter", widget="Folder", required=true, def="")
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInDirectoryMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInDirectoryMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInDirectoryMacro.groovy	(revision 324)
@@ -25,7 +25,7 @@
 // imports
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // parameters
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/XMLStatisticsMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/XMLStatisticsMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/XMLStatisticsMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 import org.txm.scripts.*
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 @Field @Option(name="inputDirectory", usage="Dossier qui contient les fichiers à parser", widget="Folder", required=true, def="src")
 File inputDirectory;
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/commands/CrossedPartitionBuilderMacro.groovy	(revision 324)
@@ -3,8 +3,8 @@
 import groovy.transform.Field
 
 import org.kohsuke.args4j.*
-import org.txm.rcpapplication.swt.widget.parameters.*
-import org.txm.rcpapplication.views.*
+import org.txm.rcp.swt.widget.parameters.*
+import org.txm.rcp.views.*
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.utils.logger.Log
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/r/PlotSpecifMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/r/PlotSpecifMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/r/PlotSpecifMacro.groovy	(revision 324)
@@ -32,8 +32,8 @@
 
 import org.kohsuke.args4j.*
 import org.txm.Toolbox
-import org.txm.rcpapplication.commands.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.commands.*
+import org.txm.rcp.swt.widget.parameters.*
 
 /**
  * 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/cqp/ExecCQPMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/cqp/ExecCQPMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/cqp/ExecCQPMacro.groovy	(revision 324)
@@ -45,7 +45,7 @@
 // Necessary declarations - Déclarations préalables
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.Toolbox
 import org.txm.searchengine.cqp.*
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/cqp/SetMatchingStrategyMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/cqp/SetMatchingStrategyMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/cqp/SetMatchingStrategyMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 // STANDARD DECLARATIONS
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.Toolbox
 import org.txm.searchengine.cqp.*
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/text/Text2TXTMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/text/Text2TXTMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/text/Text2TXTMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.doc.*;
 import org.txm.importer.*;
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xsl/ExecXSLMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xsl/ExecXSLMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xsl/ExecXSLMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.importer.ApplyXsl2;
 
 // BEGINNING OF PARAMETERS
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/CollatorTesterMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/CollatorTesterMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/CollatorTesterMacro.groovy	(revision 324)
@@ -1,7 +1,7 @@
 package org.txm.macroproto;
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import java.text.Collator
 
 // BEGINNING OF PARAMETERS
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/SelectSpecifMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/SelectSpecifMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/SelectSpecifMacro.groovy	(revision 324)
@@ -10,7 +10,7 @@
 import org.txm.functions.specificities.*
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 //TODO temporary uncommented
 //if (!(corpusViewSelection instanceof SpecificitesResult)) {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/txt/CharListDirectoryMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/txt/CharListDirectoryMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/txt/CharListDirectoryMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // BEGINNING OF PARAMETERS
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/txt/MultiLineSearchReplaceInDirectoryMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/txt/MultiLineSearchReplaceInDirectoryMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/txt/MultiLineSearchReplaceInDirectoryMacro.groovy	(revision 324)
@@ -27,7 +27,7 @@
 // imports
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // PARAMETERS
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/RenameFilesMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/RenameFilesMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/RenameFilesMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // BEGINNING OF PARAMETERS
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/StanfordSegmenterMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/StanfordSegmenterMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/StanfordSegmenterMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 /*
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import edu.stanford.nlp.international.arabic.process.*
 import edu.stanford.nlp.international.arabic.*
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/StanfordTaggerMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/StanfordTaggerMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/StanfordTaggerMacro.groovy	(revision 324)
@@ -9,7 +9,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 @Field @Option(name="inputDir", usage="input directory", widget="Folder", required=true, def="/home/mdecorde/xml/testarabe/out-s")
 File inputDir
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/SelectBanal.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/SelectBanal.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/SelectBanal.groovy	(revision 324)
@@ -5,7 +5,7 @@
 import org.txm.*
 import org.txm.functions.ca.*
 import org.txm.functions.specificities.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.searchengine.cqp.clientExceptions.*
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.searchengine.cqp.corpus.query.*
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsMetadataMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsMetadataMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsMetadataMacro.groovy	(revision 324)
@@ -3,7 +3,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.Toolbox
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsContentMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsContentMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/export/ExportTextsContentMacro.groovy	(revision 324)
@@ -8,7 +8,7 @@
 import org.apache.commons.lang.StringUtils;
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 println "corpora selection: "+corpusViewSelection
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/importer/XTZImporterMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/importer/XTZImporterMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/importer/XTZImporterMacro.groovy	(revision 324)
@@ -40,9 +40,9 @@
 import org.txm.importer.xml.pager
 import org.txm.metadatas.*
 import org.txm.objects.*
-import org.txm.rcpapplication.commands.*
-import org.txm.rcpapplication.commands.workspace.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.commands.*
+import org.txm.rcp.commands.workspace.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.scripts.teitxm.*
 import org.txm.tokenizer.TokenizerClasses
 import org.txm.utils.*
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/FindMultiLineRegExpMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/FindMultiLineRegExpMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/FindMultiLineRegExpMacro.groovy	(revision 324)
@@ -30,7 +30,7 @@
 
 import java.nio.charset.Charset
 
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.utils.*
 
 import javax.xml.stream.*
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/RunImportMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/RunImportMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/RunImportMacro.groovy	(revision 324)
@@ -4,8 +4,8 @@
 import org.kohsuke.args4j.*
 import org.txm.Toolbox
 import org.txm.objects.BaseParameters
-import org.txm.rcpapplication.commands.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.commands.*
+import org.txm.rcp.swt.widget.parameters.*
 
 // PARAMETERS
 @Field @Option(name="inputDirectory", usage="Dossier qui contient les fichiers à importer", widget="Folder", required=true, def='')
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/partition/CreatePartitionByMetadataMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/partition/CreatePartitionByMetadataMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/partition/CreatePartitionByMetadataMacro.groovy	(revision 324)
@@ -5,10 +5,10 @@
 
 import groovy.transform.Field
 
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.utils.logger.Log;
-import org.txm.rcpapplication.views.*
+import org.txm.rcp.views.*
 import org.txm.stat.engine.r.*
 import org.txm.Toolbox
 
@@ -57,6 +57,6 @@
 monitor.syncExec(new Runnable() {
 	@Override
 	public void run() {	
-	org.txm.rcpapplication.commands.RestartTXM.reloadViews();
+	org.txm.rcp.commands.RestartTXM.reloadViews();
 	}
 });
\ No newline at end of file
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/partition/CreateCrossedPartitionByMetadataMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/partition/CreateCrossedPartitionByMetadataMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/partition/CreateCrossedPartitionByMetadataMacro.groovy	(revision 324)
@@ -5,10 +5,10 @@
 
 import groovy.transform.Field
 
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.utils.logger.Log;
-import org.txm.rcpapplication.views.*
+import org.txm.rcp.views.*
 import org.txm.stat.engine.r.*
 import org.txm.Toolbox
 
@@ -62,6 +62,6 @@
 monitor.syncExec(new Runnable() {
 	@Override
 	public void run() {	
-	org.txm.rcpapplication.commands.RestartTXM.reloadViews();
+	org.txm.rcp.commands.RestartTXM.reloadViews();
 	}
 });
\ No newline at end of file
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/partition/CreatePartitionByNumericMetadataMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/partition/CreatePartitionByNumericMetadataMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/partition/CreatePartitionByNumericMetadataMacro.groovy	(revision 324)
@@ -4,8 +4,8 @@
 import groovy.transform.Field
 
 import org.kohsuke.args4j.*
-import org.txm.rcpapplication.swt.widget.parameters.*
-import org.txm.rcpapplication.views.*
+import org.txm.rcp.swt.widget.parameters.*
+import org.txm.rcp.views.*
 import org.txm.searchengine.cqp.corpus.*
 
 //BEGINNING OF PARAMETERS
@@ -114,7 +114,7 @@
 monitor.syncExec(new Runnable() {
 	@Override
 	public void run() {	
-	org.txm.rcpapplication.commands.RestartTXM.reloadViews();
+	org.txm.rcp.commands.RestartTXM.reloadViews();
 	}
 });
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/GetXPathMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/GetXPathMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/GetXPathMacro.groovy	(revision 324)
@@ -26,7 +26,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 import org.txm.importer.*
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/XMLText2MetadataCSVMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/XMLText2MetadataCSVMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/XMLText2MetadataCSVMacro.groovy	(revision 324)
@@ -4,7 +4,7 @@
 
 import org.kohsuke.args4j.*
 import groovy.transform.Field
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.swt.widget.parameters.*
 
 import org.txm.importer.*
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/edition/XTZEditionBuilderMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/edition/XTZEditionBuilderMacro.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/edition/XTZEditionBuilderMacro.groovy	(revision 324)
@@ -14,8 +14,8 @@
 import org.txm.macro.edition.BuildFacsEditions
 import org.txm.macro.edition.RemoveTag
 import org.txm.objects.*
-import org.txm.rcpapplication.commands.*
-import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.rcp.commands.*
+import org.txm.rcp.swt.widget.parameters.*
 import org.txm.searchengine.cqp.corpus.*
 import org.w3c.dom.*
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizerUI.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizerUI.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizerUI.groovy	(revision 324)
@@ -22,8 +22,8 @@
 		super(new FlowLayout());
 		File userDir = new File(System.getProperty("user.home"))
 		File srcDir = new File(userDir, "workspace43/org.txm.rcp/src/main/java")
-		File propFile = new File(srcDir, "org/txm/rcpapplication/messages.properties")
-		File messageFile = new File(srcDir, "org/txm/rcpapplication/Messages.java")
+		File propFile = new File(srcDir, "org/txm/rcp/messages.properties")
+		File messageFile = new File(srcDir, "org/txm/rcp/Messages.java")
 
 		println userDir
 		println srcDir
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/FixExternalizedDuplicatedStrings.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/FixExternalizedDuplicatedStrings.groovy	(revision 323)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/FixExternalizedDuplicatedStrings.groovy	(revision 324)
@@ -13,9 +13,9 @@
 //		File propertyFile = new File("/home/mdecorde/Bureau/Experiences/rcpapplication/messages.properties");
 //		File messageClass = new File("/home/mdecorde/Bureau/Experiences/rcpapplication/Messages.java");
 //		File srcdirectory = new File("/home/mdecorde/Bureau/Experiences/rcpapplication");
-		File propertyFile = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcpapplication/messages.properties");
-		File messageClass = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcpapplication/Messages.java");
-		File srcdirectory = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcpapplication");
+		File propertyFile = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcp/messages.properties");
+		File messageClass = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcp/Messages.java");
+		File srcdirectory = new File("/home/mdecorde/workspace37/org.txm.rcp/src/main/java/org/txm/rcp");
 		if (!(propertyFile.exists() && propertyFile.canRead() && propertyFile.canWrite() && propertyFile.isFile())) {
 			println "error file : "+propertyFile
 			return
Index: tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 323)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 324)
@@ -126,16 +126,18 @@
 	 * @return
 	 */
 	public static String getString(String nodeQualifier, ITXMResult result, String key)	{
+		return  getString(nodeQualifier, result, key, "");
+	}
+	
+	public static String getString(String nodeQualifier, String key, String defaultValue) {
+		return  getString(nodeQualifier, null, key, defaultValue);
+	}
 
-		String defaultValue = "";
-		String value = defaultValue;
-		
+	public static String getString(String nodeQualifier, ITXMResult result, String key, String defaultValue) {
 		nodeQualifier = findNodeQualifier(nodeQualifier, result, key);
 		
 		defaultValue = DefaultScope.INSTANCE.getNode(nodeQualifier).get(key, defaultValue);
-		value = scope.getNode(nodeQualifier).get(key, defaultValue);
-		
-		return value;
+		return  scope.getNode(nodeQualifier).get(key, defaultValue);
 	}
 	
 	/**
@@ -145,7 +147,7 @@
 	 * @return
 	 */
 	public static String getString(String nodeQualifier, String key)	{
-		return getString(nodeQualifier, null, key);
+		return getString(nodeQualifier, null, key, "");
 	}
 	
 	
@@ -575,6 +577,14 @@
 	}
 
 
+
+	public static String getNode(String preferenceName) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+
 	
 	//FIXME: this code is dedicated to dynamically retrieve the static field PREFERENCES_NODE of the runtime subclass and use it super class to avoid to pass it to all methods.
 	// eg. to use ProgressionPreferences.getBoolean("test") instead of TXMPreferences.getBoolean(ProgressionPreferences.PREFERENCES_NODE, "test")
Index: tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 323)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 324)
@@ -1,11 +1,15 @@
 package org.txm.core.preferences;
 
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.osgi.service.prefs.Preferences;
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.utils.logger.Log;
 
 public class TBXPreferences extends TXMPreferences {
+	
+	public static String PREFERENCES_NODE = TBXPreferences.class.getCanonicalName();
 
-	public static String PREFERENCES_NODE = TBXPreferences.class.getCanonicalName();
+	public static final String FETCH_UPDATES_AT_STARTUP = "fetch_updates_at_startup";
 	
 	/** The Constants for Toolbox properties. */
 	public static final String LOG_LEVEL = "log_level"; //$NON-NLS-1$
@@ -79,6 +83,18 @@
 	public static final String METADATA_COLSEPARATOR = "metadata_colseparator"; //$NON-NLS-1$
 	public static final String METADATA_TXTSEPARATOR = "metadata_txtseparator"; //$NON-NLS-1$
 
+	public static final String IMPORT_DEFAULT_LANG = "import_default_lang";
+	
+	/** The Constant EXPORT_SHOW. */
+	public static final String EXPORT_SHOW = "export_show"; //$NON-NLS-1$
+	/** The Constant EXPORT_ENCODING. */
+	public static final String EXPORT_ENCODING = "export_encoding"; //$NON-NLS-1$
+
+	/** The Constant EXPORT_COLSEPARATOR. */
+	public static final String EXPORT_COLSEPARATOR = "export_colseparator"; //$NON-NLS-1$
+	/** The Constant EXPORT_TXTSEPARATOR. */
+	public static final String EXPORT_TXTSEPARATOR = "export_txtseparator"; //$NON-NLS-1$
+	
 	/** Contains all the parameters keys. */
 	public static final String[] existingKeys = { LOG_LEVEL, LOG_STACKTRACE, ADD_TECH_LOGS, LOG_DIR,
 		LOG_IN_FILE, CQI_SERVER_HOST, CQI_SERVER_PORT, CQI_SERVER_LOGIN,
@@ -95,31 +111,43 @@
 
 	};
 
+
+
+
 	public static String getID() {
 		return "org.txm.core";
 	}
 
 	@Override
 	public void initializeDefaultPreferences() {
+		System.out.println("INITIALIZE TBX PREFERENCES");
 		Log.info(TXMCoreMessages.Toolbox_4 + TBXPreferences.getID()); 
 
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.LOG_LEVEL, "OFF"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.ADD_TECH_LOGS, "" + false); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.LOG_STACKTRACE, "" + true); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.LOG_IN_FILE, "" + false); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, "-b 1000000 -d OFF"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.CQI_SERVER_PORT, "4877"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.CQI_SERVER_HOST, "localhost"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.CQI_SERVER_LOGIN, "anonymous"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.CQI_SERVER_PASSWORD, ""); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.CQI_SERVER_IS_REMOTE, "" + false); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.CQI_NETWORK_MODE, "false"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.CQP_EMPTY_VALUE_CODE, ""); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.UI_LOCALE, "fr"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.TREETAGGER_INSTALL_PATH, System.getProperty("user.home") + "/TXM/treetagger"); //$NON-NLS-1$ //$NON-NLS-2$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.TREETAGGER_MODELS_PATH, TXMPreferences.getString(TBXPreferences.class.getCanonicalName(),TBXPreferences.TREETAGGER_INSTALL_PATH) + "/models"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.TREETAGGER_APOSTROPHE, "false"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.METADATA_ENCODING, "UTF-8"); //$NON-NLS-1$
-		TXMPreferences.putString(TBXPreferences.class.getCanonicalName(),TBXPreferences.METADATA_TXTSEPARATOR, "\""); //$NON-NLS-1$
+		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
+		preferences.putBoolean(TBXPreferences.EXPERT_USER, false); //$NON-NLS-1$
+		preferences.put(TBXPreferences.LOG_LEVEL, "OFF"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.ADD_TECH_LOGS, "" + false); //$NON-NLS-1$
+		preferences.put(TBXPreferences.LOG_STACKTRACE, "" + true); //$NON-NLS-1$
+		preferences.put(TBXPreferences.LOG_IN_FILE, "" + false); //$NON-NLS-1$
+		preferences.put(TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, "-b 1000000 -d OFF"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.CQI_SERVER_PORT, "4877"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.CQI_SERVER_HOST, "localhost"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.CQI_SERVER_LOGIN, "anonymous"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.CQI_SERVER_PASSWORD, ""); //$NON-NLS-1$
+		preferences.put(TBXPreferences.CQI_SERVER_IS_REMOTE, "" + false); //$NON-NLS-1$
+		preferences.put(TBXPreferences.CQI_NETWORK_MODE, "false"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.CQP_EMPTY_VALUE_CODE, ""); //$NON-NLS-1$
+		preferences.put(TBXPreferences.UI_LOCALE, "fr"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.TREETAGGER_INSTALL_PATH, System.getProperty("user.home") + "/TXM/treetagger"); //$NON-NLS-1$ //$NON-NLS-2$
+		preferences.put(TBXPreferences.TREETAGGER_MODELS_PATH, TXMPreferences.getString(TBXPreferences.class.getCanonicalName(),TBXPreferences.TREETAGGER_INSTALL_PATH) + "/models"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.TREETAGGER_APOSTROPHE, "false"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.METADATA_ENCODING, "UTF-8"); //$NON-NLS-1$
+		preferences.put(TBXPreferences.METADATA_TXTSEPARATOR, "\""); //$NON-NLS-1$
+		
+		preferences.put(EXPORT_COLSEPARATOR, "\t");
+		preferences.put(EXPORT_ENCODING, System.getProperty("file.encoding"));
+		preferences.put(EXPORT_TXTSEPARATOR, "");
+		preferences.putBoolean(EXPORT_SHOW, false);
+		
 	}
 }
Index: tmp/org.txm.core/src/java/org/txm/importer/EncodingConverter.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/importer/EncodingConverter.java	(revision 323)
+++ tmp/org.txm.core/src/java/org/txm/importer/EncodingConverter.java	(revision 324)
@@ -176,7 +176,7 @@
 		LinkedList<File> filefiles = new LinkedList<File>();
 
 		File racine = new File(
-				"~/workspace/org.txm.rcpapplication");
+				"~/workspace/org.txm.rcp");
 		String extension = ".properties";
 		String prefix = "messages";
 
Index: tmp/org.txm.core/src/java/org/txm/Toolbox.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/Toolbox.java	(revision 323)
+++ tmp/org.txm.core/src/java/org/txm/Toolbox.java	(revision 324)
@@ -229,7 +229,7 @@
 	}
 
 	/**
-	 * Initializes the toolbox with the properties passed in argument.
+	 * Initializes the Toolbox using the INSTANCE SCOPE preferences of TXMPreferences
 	 *
 	 * @param props the props
 	 * @return true, if successful
@@ -250,6 +250,7 @@
 			stateWorkspace = startWorkspace();
 
 			Log.warning("Initializing logger");
+			TXMPreferences.dump(TBXPreferences.PREFERENCES_NODE);
 			Log.setLevel(Level.parse(TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.LOG_LEVEL)));
 
 			Log.setPrintInConsole(Boolean.parseBoolean(TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.ADD_TECH_LOGS)));
Index: tmp/org.txm.core/plugin.xml
===================================================================
--- tmp/org.txm.core/plugin.xml	(revision 323)
+++ tmp/org.txm.core/plugin.xml	(revision 324)
@@ -2,5 +2,11 @@
 <?eclipse version="3.4"?>
 <plugin>
    <extension-point id="org.txm.engine" name="Engine" schema="schema/engine.exsd"/>
+   <extension
+         point="org.eclipse.equinox.preferences.preferences">
+      <initializer
+            class="org.txm.core.preferences.TBXPreferences">
+      </initializer>
+   </extension>
 
 </plugin>
Index: tmp/org.txm.core/test/org/txm/StartToolbox.java
===================================================================
--- tmp/org.txm.core/test/org/txm/StartToolbox.java	(revision 323)
+++ tmp/org.txm.core/test/org/txm/StartToolbox.java	(revision 324)
@@ -9,7 +9,7 @@
 	@Test
 	public void test() throws Exception {
 		String home = System.getProperty("user.home");
-		String product_configuration_path = "runtime-rcpapplication.product/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.txm.rcpapplication.prefs";
+		String product_configuration_path = "runtime-rcpapplication.product/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.txm.rcp.prefs";
 		File properties = new File(home, product_configuration_path);
 		Toolbox.initialize(properties);
 	}
Index: tmp/org.txm.chartsengine.rcp/plugin.xml
===================================================================
--- tmp/org.txm.chartsengine.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.chartsengine.rcp/plugin.xml	(revision 324)
@@ -6,7 +6,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.AdvancePreferencePage"
+            category="org.txm.rcp.preferences.AdvancePreferencePage"
             class="org.txm.chartsengine.rcp.preferences.ChartsEnginePreferencePage"
             id="org.txm.rcp.chartsengine.core.preferences.ChartsEnginePreferencePage"
             name="%page.name">
@@ -92,7 +92,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbarcorpus">
+            locationURI="toolbar:org.txm.rcp.toolbarcorpus">
          <command
                commandId="ExportChart"
                icon="icons/export_chart.png"
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/preferences/ChartsEnginePreferencePage.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/preferences/ChartsEnginePreferencePage.java	(revision 323)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/preferences/ChartsEnginePreferencePage.java	(revision 324)
@@ -14,12 +14,13 @@
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
 import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
 import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages;
+import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.preferences.ExportPreferencePage;
-import org.txm.rcpapplication.preferences.UserPreferencePage;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.ExportPreferencePage;
+import org.txm.rcp.preferences.UserPreferencePage;
 import org.txm.utils.logger.Log;
 
 /**
@@ -115,7 +116,7 @@
 				SWTChartsComponentsProvider.setCurrrentComponentsProvider(ChartsEngine.getCurrent());
 				
 				// Set the first charts engine supported export file format as default charts export file format
-				TxmPreferences.set(ExportPreferencePage.RDEVICE, ChartsEngine.getCurrent().getSupportedOutputFileFormats().get(0));
+				TxmPreferences.set(ChartsEnginePreferences.RDEVICE, ChartsEngine.getCurrent().getSupportedOutputFileFormats().get(0));
 				
 				
 				// Set the new monochrome color for all charts engine theme
@@ -126,7 +127,7 @@
 				
 				// Refresh the User\Export preference page to update "Default charts export file format" combo box
 				PlatformUI.getWorkbench().getPreferenceManager().
-					find("org.txm.rcpapplication.preferences.TextometriePreferencePage/" + UserPreferencePage.ID + "/" + ExportPreferencePage.ID).createPage(); //$NON-NLS-1$ //$NON-NLS-2$
+					find("org.txm.rcp.preferences.TextometriePreferencePage/" + UserPreferencePage.ID + "/" + ExportPreferencePage.ID).createPage(); //$NON-NLS-1$ //$NON-NLS-2$
 
 				
 			}
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditorPart.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditorPart.java	(revision 323)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditorPart.java	(revision 324)
@@ -31,7 +31,7 @@
 import org.txm.core.results.ITXMResult;
 import org.txm.rcp.editors.TXMEditorPart;
 import org.txm.rcp.editors.TXMEditorToolBar;
-import org.txm.rcpapplication.utils.JobHandler;
+import org.txm.rcp.utils.JobHandler;
 import org.txm.utils.logger.Log;
 
 /**
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java	(revision 323)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java	(revision 324)
@@ -14,7 +14,7 @@
 import org.txm.chartsengine.rcp.editors.ChartEditorPart;
 import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.rcpapplication.IImageKeys;
+import org.txm.rcp.IImageKeys;
 
 /**
  * The default advanced chart editor tool bar shared by every <code>ChartEditorPart</code>.
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChart.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChart.java	(revision 323)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChart.java	(revision 324)
@@ -44,16 +44,17 @@
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
 import org.txm.chartsengine.core.results.IChartResult;
 import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.commands.OpenGraph;
-import org.txm.rcpapplication.preferences.ExportPreferencePage;
-import org.txm.rcpapplication.swt.dialog.LastOpened;
-import org.txm.rcpapplication.utils.JobHandler;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.OpenGraph;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
 
 /**
  * Exports chart using charts engine export.
@@ -93,7 +94,7 @@
 			extensions[i] = "*." + SWTChartsComponentsProvider.getCurrent().getChartsEngineSupportedExportFileFormats().get(i); //$NON-NLS-1$
 
 			// Store the default chart export file format index
-			if(TxmPreferences.getString(ExportPreferencePage.RDEVICE, "svg").equals(SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().get(i)))	{
+			if(TxmPreferences.getString(ChartsEnginePreferences.RDEVICE, "svg").equals(SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().get(i)))	{
 				defaultChartFormatIndex = i;
 			}
 		}
@@ -148,7 +149,7 @@
 							System.out.println(NLS.bind(Messages.ExportResult_2, file.getAbsolutePath(), outputFormat.toUpperCase()));
 
 							// Open internal editor in the UI thread
-							if (TxmPreferences.getBoolean(ExportPreferencePage.EXPORT_SHOW))	{
+							if (TxmPreferences.getBoolean(TBXPreferences.EXPORT_SHOW))	{
 								this.syncExec(new Runnable() {
 									@Override
 									public void run() {
@@ -162,7 +163,7 @@
 					} catch (ThreadDeath td) {
 						return Status.CANCEL_STATUS;
 					} catch (Exception e) {
-						org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+						org.txm.rcp.utils.Logger.printStackTrace(e);
 						return Status.CANCEL_STATUS;
 					} finally {
 						monitor.done();
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChartEditorView.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChartEditorView.java	(revision 323)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChartEditorView.java	(revision 324)
@@ -31,6 +31,7 @@
 import java.io.IOException;
 //import java.nio.file.Files;
 
+
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -43,16 +44,17 @@
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
 import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
 import org.txm.chartsengine.rcp.editors.ChartEditorPart;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.commands.OpenGraph;
-import org.txm.rcpapplication.preferences.ExportPreferencePage;
-import org.txm.rcpapplication.swt.dialog.LastOpened;
-import org.txm.rcpapplication.utils.JobHandler;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.OpenGraph;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
 
 /**
  * Exports chart editor view using chart editor export.
@@ -83,7 +85,7 @@
 			extensions[i] = "*." + SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().get(i); //$NON-NLS-1$
 
 			// Store the default chart export file format index
-			if(TxmPreferences.getString(ExportPreferencePage.RDEVICE, "svg").equals(SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().get(i)))	{
+			if(TxmPreferences.getString(ChartsEnginePreferences.RDEVICE, "svg").equals(SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().get(i)))	{
 				defaultChartFormatIndex = i;
 			}
 		}
@@ -138,7 +140,7 @@
 							System.out.println(NLS.bind(Messages.ExportResult_2, file.getAbsolutePath(), outputFormat.toUpperCase()));
 
 							// Open internal editor in the UI thread
-							if(TxmPreferences.getBoolean(ExportPreferencePage.EXPORT_SHOW))	{
+							if(TxmPreferences.getBoolean(TBXPreferences.EXPORT_SHOW))	{
 								this.syncExec(new Runnable() {
 									@Override
 									public void run() {
@@ -155,7 +157,7 @@
 						return Status.CANCEL_STATUS;
 					}
 					catch(Exception e) {
-						org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+						org.txm.rcp.utils.Logger.printStackTrace(e);
 						return Status.CANCEL_STATUS;
 					}
 					finally {
Index: tmp/org.txm.textsbalance.rcp/plugin.xml
===================================================================
--- tmp/org.txm.textsbalance.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.textsbalance.rcp/plugin.xml	(revision 324)
@@ -28,7 +28,7 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools?after=ComputeWordCloud">
+            locationURI="toolbar:org.txm.rcp.toolbartools?after=ComputeWordCloud">
          <command
                commandId="ComputeBalance"
                icon="icons/balance.png"
@@ -43,7 +43,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeBalance"
                icon="icons/balance.png"
@@ -86,7 +86,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.textsbalance.rcp.preferences.TextsBalancePreferencePage"
             id="org.txm.rcp.textsbalance.preferences.TextsBalancePreferencePage"
             name="Texts balance">
Index: tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/editors/BalanceEditor.java
===================================================================
--- tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/editors/BalanceEditor.java	(revision 323)
+++ tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/editors/BalanceEditor.java	(revision 324)
@@ -18,7 +18,7 @@
 import org.eclipse.swt.widgets.Group;
 import org.txm.chartsengine.rcp.editors.ChartEditorPart;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
 import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
Index: tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/handlers/ComputeBalance.java
===================================================================
--- tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/handlers/ComputeBalance.java	(revision 323)
+++ tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/handlers/ComputeBalance.java	(revision 324)
@@ -34,7 +34,7 @@
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.textsbalance.core.functions.TextsBalance;
 import org.txm.textsbalance.rcp.editors.BalanceEditorInput;
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/preferences/RPreferences.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/preferences/RPreferences.java	(revision 323)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/preferences/RPreferences.java	(revision 324)
@@ -68,7 +68,7 @@
 
 	@Override
 	public void initializeDefaultPreferences() {
-		
+		System.out.println("INITIALIZE R PREFERENCES");
 		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
 		
 		preferences.putBoolean(IS_MANDATORY, false);
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/handlers/ComputeProgression.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/handlers/ComputeProgression.java	(revision 323)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/handlers/ComputeProgression.java	(revision 324)
@@ -51,11 +51,11 @@
 import org.txm.progression.rcp.dialogs.ProgressionDialog;
 import org.txm.progression.rcp.forms.ProgressionParametersComposite;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.utils.JobHandler;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.utils.logger.Log;
 
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/preferences/ProgressionPreferencePage.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/preferences/ProgressionPreferencePage.java	(revision 323)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/preferences/ProgressionPreferencePage.java	(revision 324)
@@ -37,8 +37,8 @@
 import org.txm.progression.rcp.messages.ProgressionUIMessages;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.jface.DoubleFieldEditor;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.jface.DoubleFieldEditor;
 
 /**
  * Progression preference page.
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/dialogs/ProgressionDialog.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/dialogs/ProgressionDialog.java	(revision 323)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/dialogs/ProgressionDialog.java	(revision 324)
@@ -60,9 +60,9 @@
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.progression.core.preferences.ProgressionPreferences;
 import org.txm.rcp.preferences.TXMPreferenceStore;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.swt.widget.AssistedQueryWidget;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.swt.widget.AssistedQueryWidget;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
 import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/forms/___ProgressionForm.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/forms/___ProgressionForm.java	(revision 323)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/forms/___ProgressionForm.java	(revision 324)
@@ -11,7 +11,7 @@
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.Text;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 
 
 public class ___ProgressionForm extends Composite {
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/forms/ProgressionParametersComposite.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/forms/ProgressionParametersComposite.java	(revision 323)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/forms/ProgressionParametersComposite.java	(revision 324)
@@ -11,7 +11,7 @@
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.Text;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 
 
 public class ProgressionParametersComposite extends Composite {
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/___ProgressionEditorInput.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/___ProgressionEditorInput.java	(revision 323)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/___ProgressionEditorInput.java	(revision 324)
@@ -32,9 +32,9 @@
 import org.eclipse.ui.IPersistableElement;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.txm.progression.core.functions.Progression;
-import org.txm.rcpapplication.Application;
-import org.txm.rcpapplication.IImageKeys;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
 // TODO: Auto-generated Javadoc
 /**
  * The Class ProgressionEditorInput.
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionSelectionListener.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionSelectionListener.java	(revision 323)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionSelectionListener.java	(revision 324)
@@ -50,7 +50,7 @@
 //	
 //				try {
 //					IWorkbenchPage page = this.chartEditor.getEditorSite().getWorkbenchWindow().getActivePage();
-//					ConcordancesEditor editor = (ConcordancesEditor) page.openEditor(editorInput, "org.txm.rcpapplication.editors.ConcordancesEditor"); //$NON-NLS-1$
+//					ConcordancesEditor editor = (ConcordancesEditor) page.openEditor(editorInput, "org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
 //					editor.setQuery(query);
 //					editor.compute();
 //					
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java	(revision 323)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java	(revision 324)
@@ -30,10 +30,10 @@
 import org.txm.rcp.synoptic.commands.OpenEdition;
 import org.txm.rcp.synoptic.editor.EditionPanel.RGBA;
 import org.txm.rcp.synoptic.editor.SynopticEditionEditor;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.editors.concordances.ConcordancesEditor;
-import org.txm.rcpapplication.editors.input.ConcordancesEditorInput;
-import org.txm.rcpapplication.utils.SWTEditorsUtils;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.rcp.utils.SWTEditorsUtils;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.StructuralUnit;
@@ -308,7 +308,7 @@
 		try {
 			boolean wasOpenEditor = SWTEditorsUtils.isOpenEditor(editorInput);
 			
-			linkedEditor = (ConcordancesEditor) page.openEditor(editorInput, "org.txm.rcpapplication.editors.ConcordancesEditor", false); //$NON-NLS-1$
+			linkedEditor = (ConcordancesEditor) page.openEditor(editorInput, "org.txm.rcp.editors.ConcordancesEditor", false); //$NON-NLS-1$
 			if(newEditor)	{
 				chartEditor.addLinkedEditor(linkedEditor);
 			}
Index: tmp/org.txm.progression.rcp/plugin.xml
===================================================================
--- tmp/org.txm.progression.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.progression.rcp/plugin.xml	(revision 324)
@@ -4,7 +4,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.progression.rcp.preferences.ProgressionPreferencePage"
             id="org.txm.progression.rcp.preferences.ProgressionPreferencePage"
             name="%page.name">
@@ -13,7 +13,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.progression.rcp.handlers.ComputeProgression"
             id="ComputeProgression"
             name="%command.name">
@@ -23,7 +23,7 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputeProgression"
                icon="icons/functions/progression.png"
@@ -41,7 +41,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeProgression"
                icon="icons/functions/progression.png"
Index: tmp/org.txm.ca.rcp/plugin.xml
===================================================================
--- tmp/org.txm.ca.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.ca.rcp/plugin.xml	(revision 324)
@@ -12,7 +12,7 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputeCA"
                icon="icons/ca.png"
@@ -35,7 +35,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeCA"
                icon="icons/ca.png"
@@ -82,7 +82,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.ca.rcp.handlers.ComputeCA"
             id="ComputeCA"
             name="%command.name">
@@ -118,7 +118,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.ca.rcp.preferences.CAPreferencePage"
             id="org.txm.ca.rcp.preferences.CAPreferencePage"
             name="%page.name">
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/ColsRowsInfosEditor.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/ColsRowsInfosEditor.java	(revision 323)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/ColsRowsInfosEditor.java	(revision 324)
@@ -45,11 +45,11 @@
 import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.part.EditorPart;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.editors.Tablable;
-import org.txm.rcpapplication.editors.TableKeyListener;
-import org.txm.rcpapplication.editors.TableSorter;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.editors.Tablable;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.editors.TableSorter;
 // TODO: Auto-generated Javadoc
 /**
  * Used to display rows and cols informations such as contribution, inertia,
@@ -59,7 +59,7 @@
 public class ColsRowsInfosEditor extends EditorPart {
 	
 	/** The ID. */
-	static public String ID = "org.txm.rcpapplication.editors.ca.ColsrowsInfosEditor"; //$NON-NLS-1$
+	static public String ID = "org.txm.rcp.editors.ca.ColsrowsInfosEditor"; //$NON-NLS-1$
 
 	/** The viewer. */
 	private TableViewer viewer;
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/___CAEditorInput.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/___CAEditorInput.java	(revision 323)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/___CAEditorInput.java	(revision 324)
@@ -38,8 +38,8 @@
 import org.txm.ca.core.functions.CA;
 import org.txm.ca.rcp.messages.CAUIMessages;
 import org.txm.rcp.editors.TXMResultEditorInput;
-import org.txm.rcpapplication.Application;
-import org.txm.rcpapplication.IImageKeys;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.searchengine.cqp.corpus.Property;
 
@@ -187,14 +187,14 @@
 
 	// Implementing IProvidingMultiPageEditorInput
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.input.IProvidingMultiPageEditorInput#getEditorInputs()
+	 * @see org.txm.rcp.editors.input.IProvidingMultiPageEditorInput#getEditorInputs()
 	 */
 	public List<IEditorInput> getEditorInputs() {
 		return inputs;
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.input.IProvidingMultiPageEditorInput#getEditors()
+	 * @see org.txm.rcp.editors.input.IProvidingMultiPageEditorInput#getEditors()
 	 */
 	public List<EditorPart> getEditors() {
 		return editors;
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAEditor.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAEditor.java	(revision 323)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAEditor.java	(revision 324)
@@ -69,13 +69,13 @@
 import org.txm.chartsengine.rcp.editors.ChartEditorPart;
 import org.txm.rcp.editors.SplitedGenericMultiPageEditor;
 import org.txm.rcp.editors.TXMResultEditorInput;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.commands.editor.CustomizableEditor;
-import org.txm.rcpapplication.editors.GenericMultiPageEditor;
-import org.txm.rcpapplication.editors.Tablable;
-import org.txm.rcpapplication.editors.input.AbstractTablable;
-import org.txm.rcpapplication.editors.input.FrequencyListContentProvider;
-import org.txm.rcpapplication.editors.input.FrequencyListLabelProvider;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.editors.GenericMultiPageEditor;
+import org.txm.rcp.editors.Tablable;
+import org.txm.rcp.editors.input.AbstractTablable;
+import org.txm.rcp.editors.input.FrequencyListContentProvider;
+import org.txm.rcp.editors.input.FrequencyListLabelProvider;
 import org.txm.searchengine.cqp.corpus.Corpus;
 
 // TODO: Auto-generated Javadoc
@@ -122,7 +122,7 @@
 	
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.GenericMultiPageEditor#createPages()
+	 * @see org.txm.rcp.editors.GenericMultiPageEditor#createPages()
 	 */
 	@Override
 	protected void createPages() {
@@ -225,7 +225,7 @@
 			
 		}
 		catch (Exception e1) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
 			System.out.println(Messages.CaEditor_0+e1);
 			return;
 		}
@@ -236,7 +236,7 @@
 			try {
 				editorIndex = addPage(editors.get(i), inputs.get(i));
 			} catch (PartInitException e) {
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
 				System.out.println(Messages.CaEditor_0+e);
 				return;
 			}
@@ -646,7 +646,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
 	 */
 	@Override
 	public void setName(String name) {
@@ -654,7 +654,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
 	 */
 	@Override
 	public void setIcon(Image image) {
@@ -663,7 +663,7 @@
 
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#getSource()
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
 	 */
 	@Override
 	public Object getSource() {
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/SingularValuesEditor.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/SingularValuesEditor.java	(revision 323)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/SingularValuesEditor.java	(revision 324)
@@ -48,11 +48,11 @@
 import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.part.EditorPart;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.editors.Tablable;
-import org.txm.rcpapplication.editors.TableKeyListener;
-import org.txm.rcpapplication.editors.TableSorter;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.editors.Tablable;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.editors.TableSorter;
 // TODO: Auto-generated Javadoc
 /**
  * show the singular values and compute some stats.
@@ -62,7 +62,7 @@
 public class SingularValuesEditor extends EditorPart {
 
 	/** The ID. */
-	static public String ID = "org.txm.rcpapplication.editors.TableEditor"; //$NON-NLS-1$
+	static public String ID = "org.txm.rcp.editors.TableEditor"; //$NON-NLS-1$
 
 	/** The viewer. */
 	private TableViewer viewer;
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java	(revision 323)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java	(revision 324)
@@ -18,7 +18,7 @@
 import org.txm.chartsengine.rcp.editors.ChartEditorInput;
 import org.txm.chartsengine.rcp.editors.ChartEditorPart;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.rcpapplication.IImageKeys;
+import org.txm.rcp.IImageKeys;
 import org.txm.utils.logger.Log;
 
 /**
@@ -103,7 +103,7 @@
 //		}
 //		catch (StatException e1) {
 //			// TODO Auto-generated catch block
-//			org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+//			org.txm.rcp.utils.Logger.printStackTrace(e1);
 //		}
 //		String [] items = planes.toArray(new String[planes.size()]);
 
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/ColRowInfosLabelProvider.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/ColRowInfosLabelProvider.java	(revision 323)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/ColRowInfosLabelProvider.java	(revision 324)
@@ -37,7 +37,7 @@
 import org.txm.ca.core.preferences.CAPreferences;
 import org.txm.ca.rcp.messages.CAUIMessages;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 // TODO: Auto-generated Javadoc
 /**
  * The Class ColRowInfosLabelProvider.
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java	(revision 323)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java	(revision 324)
@@ -45,11 +45,11 @@
 import org.txm.lexicaltable.rcp.editors.LexicalTableDialog;
 import org.txm.rcp.editors.TXMResultEditorInput;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.utils.JobHandler;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.utils.logger.MessageBox;
@@ -234,7 +234,7 @@
 									page.openEditor(editorInput, "CAEditor"); //$NON-NLS-1$
 									StatusLine.setMessage(CAUIMessages.ComputeCorrespondanceAnalysis_14);
 								} catch (Exception e) {
-									org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+									org.txm.rcp.utils.Logger.printStackTrace(e);
 								} 
 
 							}
@@ -258,7 +258,7 @@
 					} catch (ThreadDeath td) {
 						return Status.CANCEL_STATUS;
 					} catch (Exception e) {
-						org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+						org.txm.rcp.utils.Logger.printStackTrace(e);
 					} finally {
 						monitor.done();
 						JobsTimer.stopAndPrint();
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 323)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 324)
@@ -44,12 +44,12 @@
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.lexicaltable.core.preferences.LexicalTablePreferences;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.utils.JobHandler;
-import org.txm.rcpapplication.views.QueriesView;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Partition;
@@ -145,7 +145,7 @@
 							}
 							catch(StatException e) {
 								System.out.println(Messages.ComputeSpecifities_4 + e);
-								org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+								org.txm.rcp.utils.Logger.printStackTrace(e);
 								return Status.CANCEL_STATUS;
 							}
 							monitor.worked(45);
@@ -166,7 +166,7 @@
 									}
 									catch(PartInitException e) {
 										System.err.println(NLS.bind(Messages.Error_computing_specificities, e));
-										org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+										org.txm.rcp.utils.Logger.printStackTrace(e);
 									}
 								}
 							});
@@ -192,7 +192,7 @@
 							return Status.CANCEL_STATUS;
 						}
 						catch(CqiClientException e) {
-							org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+							org.txm.rcp.utils.Logger.printStackTrace(e);
 						}
 						finally {
 							monitor.done();
@@ -229,7 +229,7 @@
 							catch(Exception e) {
 								System.err.println(NLS.bind(Messages.Error_computing_specificities, e));
 								System.err.println(e);
-								org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+								org.txm.rcp.utils.Logger.printStackTrace(e);
 							}
 
 							monitor.subTask(Messages.ComputeSpecifities_2);
@@ -281,7 +281,7 @@
 						}
 						catch(StatException e) {
 							System.err.println(NLS.bind(Messages.Error_computing_specificities, e));
-							org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+							org.txm.rcp.utils.Logger.printStackTrace(e);
 							return Status.CANCEL_STATUS;
 						}
 						monitor.worked(45);
@@ -311,7 +311,7 @@
 
 								}
 								catch(PartInitException e) {
-									org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+									org.txm.rcp.utils.Logger.printStackTrace(e);
 								}
 							}
 						});
@@ -338,7 +338,7 @@
 						return Status.CANCEL_STATUS;
 					}
 					catch(CqiClientException e) {
-						org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+						org.txm.rcp.utils.Logger.printStackTrace(e);
 					}
 					finally {
 						monitor.done();
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesBarChart.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesBarChart.java	(revision 323)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesBarChart.java	(revision 324)
@@ -16,7 +16,7 @@
 import org.txm.chartsengine.rcp.editors.ChartEditorPart;
 import org.txm.chartsengine.rcp.swt.ChartEditorToolBar;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.rcpapplication.IImageKeys;
+import org.txm.rcp.IImageKeys;
 import org.txm.specificities.core.functions.SpecificitesResult;
 import org.txm.specificities.core.preferences.SpecificitiesPreferences;
 import org.txm.specificities.rcp.editors.SpecificitiesTableEditor;
@@ -65,7 +65,7 @@
 			openEditor(specificitiesResult, partNames, selectedTypeNames, selectedSpecificteIndices);
 		} catch (Exception e) {
 			System.out.println("Error while computing specificities bar chart: "+e.getLocalizedMessage());
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 		return null;
 	}
@@ -119,7 +119,7 @@
 		}
 		catch (Exception e) {
 			System.out.println("Error while computing specificities bar chart: "+e.getLocalizedMessage());
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 	}
 
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/preferences/SpecificitiesPreferencePage.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/preferences/SpecificitiesPreferencePage.java	(revision 323)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/preferences/SpecificitiesPreferencePage.java	(revision 324)
@@ -37,7 +37,7 @@
 import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
-import org.txm.rcpapplication.jface.DoubleFieldEditor;
+import org.txm.rcp.jface.DoubleFieldEditor;
 import org.txm.specificities.core.preferences.SpecificitiesPreferences;
 import org.txm.specificities.rcp.adapters.SpecificitiesAdapterFactory;
 import org.txm.specificities.rcp.messages.SpecificitiesUIMessages;
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/dialogs/ComputeSpecificitiesForSubcorpusDialog.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/dialogs/ComputeSpecificitiesForSubcorpusDialog.java	(revision 323)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/dialogs/ComputeSpecificitiesForSubcorpusDialog.java	(revision 324)
@@ -40,7 +40,7 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.Subcorpus;
@@ -77,7 +77,7 @@
 			this.properties = new ArrayList<Property>(subcorpus.getOrderedProperties());
 		} catch (CqiClientException e) {
 			// TODO Auto-generated catch block
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 	}
 
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/dialogs/ComputeSpecificitiesDialog.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/dialogs/ComputeSpecificitiesDialog.java	(revision 323)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/dialogs/ComputeSpecificitiesDialog.java	(revision 324)
@@ -47,8 +47,8 @@
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Part;
 import org.txm.searchengine.cqp.corpus.Partition;
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableEditor.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableEditor.java	(revision 323)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableEditor.java	(revision 324)
@@ -59,10 +59,10 @@
 import org.eclipse.ui.PlatformUI;
 import org.txm.objects.TxmObject;
 import org.txm.rcp.editors.TXMEditorPart;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.commands.editor.CustomizableEditor;
-import org.txm.rcpapplication.editors.TableKeyListener;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.editors.TableKeyListener;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.specificities.core.functions.SpecificitesResult;
 import org.txm.specificities.rcp.messages.SpecificitiesUIMessages;
@@ -548,7 +548,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
 	 */
 	@Override
 	public void setName(String name) {
@@ -556,7 +556,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
 	 */
 	@Override
 	public void setIcon(Image image) {
@@ -564,7 +564,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
 	 */
 	@Override
 	public void setSource(Object source) {
@@ -572,7 +572,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#getSource()
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
 	 */
 	@Override
 	public Object getSource() {
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesResultEditorInput.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesResultEditorInput.java	(revision 323)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesResultEditorInput.java	(revision 324)
@@ -42,13 +42,13 @@
 import org.eclipse.ui.part.EditorPart;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.txm.rcp.editors.TXMResultEditorInput;
-import org.txm.rcpapplication.Application;
-import org.txm.rcpapplication.IImageKeys;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.editors.Tablable;
-import org.txm.rcpapplication.editors.TableEditor;
-import org.txm.rcpapplication.editors.input.AbstractTablable;
-import org.txm.rcpapplication.editors.input.IProvidingMultiPageEditorInput;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.Tablable;
+import org.txm.rcp.editors.TableEditor;
+import org.txm.rcp.editors.input.AbstractTablable;
+import org.txm.rcp.editors.input.IProvidingMultiPageEditorInput;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.specificities.core.functions.SpecificitesResult;
@@ -237,7 +237,7 @@
 
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.input.IProvidingMultiPageEditorInput#getEditorInputs()
+	 * @see org.txm.rcp.editors.input.IProvidingMultiPageEditorInput#getEditorInputs()
 	 */
 	@Override
 	public List<IEditorInput> getEditorInputs() {
@@ -245,7 +245,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.input.IProvidingMultiPageEditorInput#getEditors()
+	 * @see org.txm.rcp.editors.input.IProvidingMultiPageEditorInput#getEditors()
 	 */
 	@Override
 	public List<EditorPart> getEditors() {
@@ -253,7 +253,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.input.IProvidingMultiPageEditorInput#getNames()
+	 * @see org.txm.rcp.editors.input.IProvidingMultiPageEditorInput#getNames()
 	 */
 	@Override
 	public List<String> getNames() {
@@ -332,7 +332,7 @@
 				specificitiesIndex = res.getSpecificitesIndex();
 				names = res.getTypeNames();
 			} catch (StatException e) {
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
 			}
 
 			List<List<Object>> specif = new ArrayList<List<Object>>();
@@ -342,7 +342,7 @@
 				try {
 					formFreq = res.getFormFrequencies();
 				} catch (StatException e) {
-					org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+					org.txm.rcp.utils.Logger.printStackTrace(e);
 				}
 				if (freq[0].length > 1)
 					throw new IllegalStateException(SpecificitiesUIMessages.SpecificitiesResultEditorInput_2);
@@ -359,7 +359,7 @@
 				try {
 					partSize = res.getPartSize();
 				} catch (StatException e) {
-					org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+					org.txm.rcp.utils.Logger.printStackTrace(e);
 				}
 				if (freq.length != 1)
 					throw new IllegalStateException(
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecifForm.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecifForm.java	(revision 323)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecifForm.java	(revision 324)
@@ -9,7 +9,7 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Table;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 
 
 public class SpecifForm extends Composite {
Index: tmp/org.txm.specificities.rcp/plugin.xml
===================================================================
--- tmp/org.txm.specificities.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.specificities.rcp/plugin.xml	(revision 324)
@@ -21,7 +21,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.specificities.rcp.handlers.ComputeSpecifities"
             id="ComputeSpecifities"
             name="%command.name">
@@ -43,7 +43,7 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeSpecifities"
                icon="icons/functions/specificities.png"
@@ -88,7 +88,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputeSpecifities"
                icon="icons/functions/specificities.png"
@@ -124,7 +124,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.specificities.rcp.preferences.SpecificitiesPreferencePage"
             id="org.txm.specificities.rcp.preferences.SpecificitiesPreferencePage"
             name="%page.name">
Index: tmp/org.txm.chartsengine.jfreechart.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.chartsengine.jfreechart.rcp/META-INF/MANIFEST.MF	(revision 323)
+++ tmp/org.txm.chartsengine.jfreechart.rcp/META-INF/MANIFEST.MF	(revision 324)
@@ -4,9 +4,9 @@
 Bundle-SymbolicName: org.txm.chartsengine.jfreechart.rcp;singleton:=true
 Bundle-Version: 1.0.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.txm.libs.jfreechart,
+Require-Bundle: org.txm.core;bundle-version="0.7.0",
+ org.txm.libs.jfreechart,
  org.txm.chartsengine.core,
- org.txm.core;bundle-version="0.7.0",
  org.txm.chartsengine.rcp;bundle-version="1.0.0";visibility:=reexport,
  org.txm.chartsengine.jfreechart.core;bundle-version="1.0.0";visibility:=reexport,
  org.txm.rcp;bundle-version="0.7.8",
Index: tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/preferences/JFCChartsEnginePreferencePage.java
===================================================================
--- tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/preferences/JFCChartsEnginePreferencePage.java	(revision 323)
+++ tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/preferences/JFCChartsEnginePreferencePage.java	(revision 324)
@@ -36,15 +36,16 @@
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.PlatformUI;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
 import org.txm.chartsengine.jfreechart.core.JFCChartsEngine;
 import org.txm.chartsengine.jfreechart.core.preferences.JFCChartsEnginePreferences;
 import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
 import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.ExportPreferencePage;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.preferences.ExportPreferencePage;
-import org.txm.rcpapplication.preferences.UserPreferencePage;
+import org.txm.rcp.preferences.UserPreferencePage;
 
 /**
  * JFreeChart charts engine preference page.
@@ -99,18 +100,18 @@
 				SWTChartsComponentsProvider.setCurrrentComponentsProvider(ChartsEngine.getCurrent());
 	
 				// Set the first charts engine supported export file format as default charts export file format
-				TxmPreferences.set(ExportPreferencePage.RDEVICE, ChartsEngine.getCurrent().getSupportedOutputFileFormats().get(0));
+				TxmPreferences.set(ChartsEnginePreferences.RDEVICE, ChartsEngine.getCurrent().getSupportedOutputFileFormats().get(0));
 					
 				// Refresh the User\Export preference page to update "Default charts export file format" combo box
 				PlatformUI.getWorkbench().getPreferenceManager().
-						find("org.txm.rcpapplication.preferences.TextometriePreferencePage/" + UserPreferencePage.ID + "/" + ExportPreferencePage.ID).createPage(); //$NON-NLS-1$ //$NON-NLS-2$
+						find("org.txm.rcp.preferences.TextometriePreferencePage/" + UserPreferencePage.ID + "/" + ExportPreferencePage.ID).createPage(); //$NON-NLS-1$ //$NON-NLS-2$
 			
 			}
 
 			
 			
 		} catch (Exception e) {
-			System.err.println(org.txm.rcpapplication.Messages.FAILED_TO_SAVE_PREFERENCES + e);
+			System.err.println(org.txm.rcp.Messages.FAILED_TO_SAVE_PREFERENCES + e);
 		}
 		return true;
 	}
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java	(revision 324)
@@ -58,12 +58,12 @@
 import org.txm.lexicaltable.rcp.editors.LexicalTableEditor2;
 import org.txm.lexicaltable.rcp.editors.LexicalTableEditorInput;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.utils.JobHandler;
-import org.txm.rcpapplication.views.QueriesView;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.statsengine.r.core.data.QuantitativeDataStructureImpl;
@@ -196,7 +196,7 @@
 								StatusLine.setMessage(Messages.ComputeLexicalTable_10);
 								page.openEditor(editorInput, LexicalTableEditor2.ID);
 							} catch (PartInitException e) {
-								org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+								org.txm.rcp.utils.Logger.printStackTrace(e);
 							} 
 						}
 					});
@@ -220,7 +220,7 @@
 				} catch (ThreadDeath td) {
 					return Status.CANCEL_STATUS;
 				} catch (Exception e) {
-					org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+					org.txm.rcp.utils.Logger.printStackTrace(e);
 				} finally {
 					monitor.done();
 					JobsTimer.stopAndPrint();
@@ -291,7 +291,7 @@
 									StatusLine.setMessage(Messages.ComputeLexicalTable_10);
 									page.openEditor(editorInput, LexicalTableEditor2.ID); //$NON-NLS-1$
 								} catch (PartInitException e) {
-									org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+									org.txm.rcp.utils.Logger.printStackTrace(e);
 								} 
 							}
 						});
@@ -313,7 +313,7 @@
 					} catch (ThreadDeath td) {
 						return Status.CANCEL_STATUS;
 					} catch (Exception e) {
-						org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+						org.txm.rcp.utils.Logger.printStackTrace(e);
 					} finally {
 						monitor.done();
 						JobsTimer.stopAndPrint();
@@ -385,9 +385,9 @@
 	//							try {
 	//								StatusLine.setMessage(Messages.ComputeLexicalTable_10);
 	//								page.openEditor(editorInput,
-	//												"org.txm.rcpapplication.editors.lexicaltable.LexicalTableEditor"); //$NON-NLS-1$
+	//												"org.txm.rcp.editors.lexicaltable.LexicalTableEditor"); //$NON-NLS-1$
 	//							} catch (PartInitException e) {
-	//								org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+	//								org.txm.rcp.utils.Logger.printStackTrace(e);
 	//							} 
 	//						}
 	//					});
@@ -411,7 +411,7 @@
 	//				} catch (ThreadDeath td) { 
 	//					return Status.CANCEL_STATUS;
 	//				} catch (Exception e) {
-	//					org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+	//					org.txm.rcp.utils.Logger.printStackTrace(e);
 	//				} finally {
 	//					monitor.done();
 	//				}
@@ -487,9 +487,9 @@
 							try {
 								StatusLine.setMessage(Messages.ComputeLexicalTable_10);
 								page.openEditor(editorInput,
-										"org.txm.rcpapplication.editors.lexicaltable.LexicalTableEditor"); //$NON-NLS-1$
+										"org.txm.rcp.editors.lexicaltable.LexicalTableEditor"); //$NON-NLS-1$
 							} catch (PartInitException e) {
-								org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+								org.txm.rcp.utils.Logger.printStackTrace(e);
 							} 
 						}
 					});
@@ -513,7 +513,7 @@
 				} catch (ThreadDeath td) { 
 					return Status.CANCEL_STATUS;
 				} catch (Exception e) {
-					org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+					org.txm.rcp.utils.Logger.printStackTrace(e);
 				} finally {
 					monitor.done();
 				}
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/MergeLines.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/MergeLines.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/MergeLines.java	(revision 324)
@@ -41,8 +41,8 @@
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.lexicaltable.rcp.editors.LexicalTableEditor2;
 import org.txm.lexicaltable.rcp.messages.LexicalTableUIMessages;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
 // TODO: Auto-generated Javadoc
 /**
  * Allow the user to merge Lexical Table lines columns values are added to the
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ExportLexicalTable.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ExportLexicalTable.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ExportLexicalTable.java	(revision 324)
@@ -38,8 +38,8 @@
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.lexicaltable.rcp.editors.LexicalTableEditor2;
-import org.txm.rcpapplication.commands.EditFile;
-import org.txm.rcpapplication.swt.dialog.LastOpened;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.swt.dialog.LastOpened;
 
 // TODO: Auto-generated Javadoc
 /**
@@ -47,7 +47,7 @@
  */
 public class ExportLexicalTable extends AbstractHandler {
 
-	private static final String ID = "org.txm.rcpapplication.commands.editor.ExportLexicalTable"; //$NON-NLS-1$
+	private static final String ID = "org.txm.rcp.commands.editor.ExportLexicalTable"; //$NON-NLS-1$
 	/* (non-Javadoc)
 	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
 	 */
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/DeleteLines.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/DeleteLines.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/DeleteLines.java	(revision 324)
@@ -37,7 +37,7 @@
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.lexicaltable.rcp.editors.LexicalTableEditor2;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 /**
  * Allow the user to delete lines in a Lexical Table.
  * 
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/___MergeCols.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/___MergeCols.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/___MergeCols.java	(revision 324)
@@ -41,7 +41,7 @@
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.lexicaltable.rcp.editors.LexicalTableEditor2;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 import org.txm.statsengine.core.StatException;
 /**
  * The Class MergeCols.
@@ -106,7 +106,7 @@
 						, Arrays.toString(table.getRowNames().asStringsArray())));
 			} catch (StatException e1) {
 				// TODO Auto-generated catch block
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
 			}
 			;
 			System.out.println(Messages.MergeCols_6);
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ImportTable.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ImportTable.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ImportTable.java	(revision 324)
@@ -38,7 +38,7 @@
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.lexicaltable.rcp.editors.LexicalTableEditor2;
-import org.txm.rcpapplication.swt.dialog.LastOpened;
+import org.txm.rcp.swt.dialog.LastOpened;
 
 // TODO: Auto-generated Javadoc
 /**
@@ -46,7 +46,7 @@
  */
 public class ImportTable extends AbstractHandler {
 
-	private static final String ID = "org.txm.rcpapplication.commands.editor.ImportTable"; //$NON-NLS-1$
+	private static final String ID = "org.txm.rcp.commands.editor.ImportTable"; //$NON-NLS-1$
 	/* (non-Javadoc)
 	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
 	 */
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableDialog.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableDialog.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableDialog.java	(revision 324)
@@ -45,7 +45,7 @@
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.lexicaltable.rcp.messages.LexicalTableUIMessages;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Property;
@@ -108,7 +108,7 @@
 			this.title = title;
 			this.properties = new ArrayList<Property>(corpus.getOrderedProperties());
 		} catch (CqiClientException e) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 	}
 
@@ -129,7 +129,7 @@
 		try {
 			this.properties = new ArrayList<Property>(corpus.getOrderedProperties());
 		} catch (CqiClientException e) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 	}
 
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 324)
@@ -42,7 +42,7 @@
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.part.EditorPart;
 import org.txm.core.messages.TXMCoreMessages;
-import org.txm.rcpapplication.editors.TableKeyListener;
+import org.txm.rcp.editors.TableKeyListener;
 import org.txm.searchengine.cqp.corpus.Property;
 
 /**
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditorInput.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditorInput.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditorInput.java	(revision 324)
@@ -40,10 +40,10 @@
 import org.eclipse.ui.part.EditorPart;
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.rcp.editors.TXMResultEditorInput;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.editors.Tablable;
-import org.txm.rcpapplication.editors.TableEditor;
-import org.txm.rcpapplication.editors.input.AbstractTablable;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.Tablable;
+import org.txm.rcp.editors.TableEditor;
+import org.txm.rcp.editors.input.AbstractTablable;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.statsengine.core.StatException;
 // TODO: Auto-generated Javadoc
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor2.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor2.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor2.java	(revision 324)
@@ -67,14 +67,14 @@
 import org.txm.lexicaltable.rcp.handlers.MergeLines;
 import org.txm.lexicaltable.rcp.messages.LexicalTableUIMessages;
 import org.txm.rcp.editors.TXMEditorPart;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.commands.editor.CustomizableEditor;
-import org.txm.rcpapplication.editors.TableKeyListener;
-import org.txm.rcpapplication.swt.widget.ObjectSelector;
-import org.txm.rcpapplication.swt.widget.PropertiesSelector;
-import org.txm.rcpapplication.swt.widget.QueryWidget;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.swt.widget.ObjectSelector;
+import org.txm.rcp.swt.widget.PropertiesSelector;
+import org.txm.rcp.swt.widget.QueryWidget;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.statsengine.core.StatException;
@@ -194,7 +194,7 @@
 				itable.sortByFreqs(reverse);
 				StatusLine.setMessage(Messages.SORT_DONE);
 			} catch (Exception e2) {
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e2);
+				org.txm.rcp.utils.Logger.printStackTrace(e2);
 			}
 		} else if (index >= 0) {
 			itable.sort(index, reverse);
@@ -247,7 +247,7 @@
 					StatusLine.setMessage(""); //$NON-NLS-1$
 				} catch (Exception e1) {
 					// TODO Auto-generated catch block
-					org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
 					StatusLine.setMessage("LT: sort error"); //$NON-NLS-1$
 				}
 			}
@@ -322,7 +322,7 @@
 								collist.add(colname);
 							}
 						} catch (StatException e1) {
-							org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+							org.txm.rcp.utils.Logger.printStackTrace(e1);
 							return;
 						}
 
@@ -346,7 +346,7 @@
 								collist.add(colname);
 							}
 						} catch (StatException e1) {
-							org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+							org.txm.rcp.utils.Logger.printStackTrace(e1);
 							return;
 						}
 
@@ -459,7 +459,7 @@
 				i++;
 			}
 		} catch (StatException e1) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e1);
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
 			return;
 		}
 
@@ -505,7 +505,7 @@
 					+ TXMCoreMessages.FMAX_2 + itable.getFmax());
 		} catch (RWorkspaceException e3) {
 			// TODO Auto-generated catch block
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e3);
+			org.txm.rcp.utils.Logger.printStackTrace(e3);
 		}
 		catch(StatException e) {
 			// TODO Auto-generated catch block
@@ -716,12 +716,12 @@
 			}
 		} catch(Exception e) {
 			System.out.println(LexicalTableUIMessages.LexicalTableEditor_15+e);
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
 	 */
 	@Override
 	public void setName(String name) {
@@ -729,7 +729,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
 	 */
 	@Override
 	public void setIcon(Image image) {
@@ -737,7 +737,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
 	 */
 	@Override
 	public void setSource(Object source)
@@ -746,7 +746,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.commands.editor.CustomizableEditor#getSource()
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
 	 */
 	@Override
 	public Object getSource() {
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LineLabelProvider.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LineLabelProvider.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LineLabelProvider.java	(revision 324)
@@ -36,7 +36,7 @@
 import org.eclipse.swt.graphics.Image;
 import org.txm.cooccurrence.rcp.preferences.CoocPreferencePage;
 import org.txm.lexicaltable.core.functions.LexicalTable;
-import org.txm.rcpapplication.TxmPreferences;
+import org.txm.rcp.TxmPreferences;
 
 // TODO: Auto-generated Javadoc
 /**
@@ -86,7 +86,7 @@
 			freqs = table.getData().getRowMargins();
 		} catch (Exception e) {
 			// TODO Auto-generated catch block
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		}
 	}
 
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/MergeDeleteDialog.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/MergeDeleteDialog.java	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/MergeDeleteDialog.java	(revision 324)
@@ -36,8 +36,8 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
-import org.txm.rcpapplication.Messages;
-import org.txm.rcpapplication.swt.dialog.ObjectSelectionDialog;
+import org.txm.rcp.Messages;
+import org.txm.rcp.swt.dialog.ObjectSelectionDialog;
 // TODO: Auto-generated Javadoc
 /**
  * The Class MergeDeleteDialog.
@@ -74,7 +74,7 @@
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.swt.dialog.ObjectSelectionDialog#configureShell(org.eclipse.swt.widgets.Shell)
+	 * @see org.txm.rcp.swt.dialog.ObjectSelectionDialog#configureShell(org.eclipse.swt.widgets.Shell)
 	 */
 	@Override
 	protected void configureShell(Shell shell) {
@@ -84,7 +84,7 @@
 
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.swt.dialog.ObjectSelectionDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 * @see org.txm.rcp.swt.dialog.ObjectSelectionDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
 	 */
 	@Override
 	protected Control createDialogArea(Composite parent) {
@@ -110,7 +110,7 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.swt.dialog.ObjectSelectionDialog#okPressed()
+	 * @see org.txm.rcp.swt.dialog.ObjectSelectionDialog#okPressed()
 	 */
 	@Override
 	public void okPressed() {
Index: tmp/org.txm.lexicaltable.rcp/plugin.xml
===================================================================
--- tmp/org.txm.lexicaltable.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.lexicaltable.rcp/plugin.xml	(revision 324)
@@ -4,7 +4,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.lexicaltable.rcp.preferences.LexicalTablePreferencePage"
             id="org.txm.lexicaltable.rcp.preferences.LexicalTablePreferencePage"
             name="%page.name">
@@ -13,7 +13,7 @@
    <extension
          point="org.eclipse.ui.menus">
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeLexicalTable"
                icon="icons/lexicaltable.png"
@@ -58,7 +58,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputeLexicalTable"
                icon="icons/lexicaltable.png"
@@ -108,7 +108,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.lexicaltable.rcp.handlers.ComputeLexicalTable"
             id="ComputeLexicalTable"
             name="%command.name">
Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/editors/CAHChartEditor.java
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/editors/CAHChartEditor.java	(revision 323)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/editors/CAHChartEditor.java	(revision 324)
@@ -20,12 +20,12 @@
 import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.core.results.ITXMResult;
-import org.txm.rcpapplication.IImageKeys;
-import org.txm.rcpapplication.JobsTimer;
-import org.txm.rcpapplication.commands.editor.CustomizableEditor;
-import org.txm.rcpapplication.utils.JobHandler;
-import org.txm.rcpapplication.views.QueriesView;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.statsengine.r.rcp.views.RVariablesView;
 import org.txm.utils.logger.Log;
@@ -217,7 +217,7 @@
 				}
 				catch (Exception e) {
 					System.out.println(e.getLocalizedMessage());
-					org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+					org.txm.rcp.utils.Logger.printStackTrace(e);
 					Log.severe("Error while computing CAH: " + e.getLocalizedMessage());
 				}
 				finally {
Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/handlers/ComputeCAH.java
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/handlers/ComputeCAH.java	(revision 323)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/handlers/ComputeCAH.java	(revision 324)
@@ -54,8 +54,8 @@
 import org.txm.lexicaltable.core.functions.LexicalTableFactory;
 import org.txm.lexicaltable.rcp.editors.LexicalTableDialog;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Partition;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.statsengine.core.StatException;
Index: tmp/org.txm.cah.rcp/plugin.xml
===================================================================
--- tmp/org.txm.cah.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.cah.rcp/plugin.xml	(revision 324)
@@ -4,7 +4,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.cah.rcp.handlers.ComputeCAH"
             id="ComputeCAH"
             name="%command.name">
@@ -14,7 +14,7 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputeCAH"
                icon="icons/cah.png"
@@ -38,7 +38,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeCAH"
                icon="icons/cah.png"
@@ -105,7 +105,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.cah.rcp.preferences.CAHPreferencePage"
             id="org.txm.cah.rcp.preferences.CAHPreferencePage"
             name="%page.name">
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/StatusLine.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/StatusLine.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/StatusLine.java	(revision 324)
@@ -0,0 +1,163 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Shortcut to the RCP status bar
+ *  
+ * @author mdecorde.
+ */
+public class StatusLine {
+
+	/** The timer */
+	private static Timer timer;
+	private static int time = 15000;
+	private static boolean timerScheduled = false;
+	
+	/** The status line. */
+	private static IStatusLineManager statusLine;
+	
+	/**
+	 * Sets the IStatusLineManager.
+	 *
+	 * @param statusline the statusline
+	 */
+	public static void set(IStatusLineManager statusline) {
+		StatusLine.statusLine = statusline;
+	}
+
+	/**
+	 * Shows a message in the status line.
+	 *
+	 * @param message the new message
+	 */
+	public static void setMessage(final String message) {
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				statusLine.setMessage(null, message);
+			}
+		});
+		
+		cancelTimer();
+		scheduleTimer();
+	}
+	
+	/**
+	 * Shows a message in the status line and keeps it.
+	 *
+	 * @param message the new message
+	 */
+	public static void setMessage(final String message, boolean keep) {
+		if (!keep) {
+			setMessage(message);
+			return;
+		}
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				statusLine.setMessage(null, message);
+			}
+		});
+		cancelTimer();
+	}
+
+	/**
+	 * Shows an error message in the status line.
+	 *
+	 * @param string the string
+	 */
+	public static void error(final String message) {
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				statusLine.setErrorMessage(null, message);
+			}
+		});
+		cancelTimer();
+		scheduleTimer();
+	}
+	
+	/**
+	 * Shows an error message in the status line and keeps it.
+	 *
+	 * @param string the string
+	 */
+	public static void error(final String message, boolean keep) {
+		if (!keep) {
+			setMessage(message);
+			return;
+		}
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				statusLine.setErrorMessage(null, message);
+			}
+		});
+		cancelTimer();
+	}
+	
+	/**
+	 * Stops the timer
+	 */
+	private static void cancelTimer() {
+		if (!timerScheduled)
+			return;
+		timerScheduled = false;
+		timer.cancel();
+	}
+	
+	/**
+	 * Starts the timer
+	 */
+	private static void scheduleTimer() {
+		if (timerScheduled)
+			return;
+		timerScheduled = true;
+		timer = new Timer();
+		TimerTask timerTask = new TimerTask() {
+			@Override
+			public void run() {
+				Runnable r = new Runnable() {
+					@Override
+					public void run() {
+						StatusLine.setMessage(""); //$NON-NLS-1$
+					}
+				};
+				Display.getDefault().syncExec(r);
+			}	
+		};
+		timer.schedule(timerTask, time);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/StatusLine.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/Activator.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/Activator.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/Activator.java	(revision 324)
@@ -0,0 +1,128 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import java.io.BufferedReader;
+import java.io.File;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+import org.txm.utils.io.IOUtils;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+	/** The Constant PLUGIN_ID. */
+	public static final String PLUGIN_ID = "org.txm.rcp"; //$NON-NLS-1$
+
+	/** The plugin. */
+	private static Activator plugin;
+
+	/**
+	 * The constructor.
+	 */
+	public Activator() {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+	 * )
+	 */
+	@Override
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+
+		System.out.println("TXM ACTIVATED. ALL SYSTEMS GO!");
+		try {
+			preventbrokenTXMINI();
+		} catch(Exception e) {
+			System.out.println("Error while fixing TXM.ini file: "+e.getLocalizedMessage());
+		}
+	}
+
+	//TODO: this method is temporary to fix the TXM.ini file -startup and --launcher.library properties
+	private void preventbrokenTXMINI() throws Exception {
+		
+		File dataDir = new File(Platform.getInstanceLocation().getURL().getFile());
+		File txmDir = dataDir.getParentFile();
+		File TXMINI = new File(txmDir, "TXM.ini");
+		if (TXMINI.exists()) {
+			System.out.println("Fixing TXM.ini path="+TXMINI);
+			BufferedReader reader = IOUtils.getReader(TXMINI, "UTF-8");
+			String line = reader.readLine();
+			StringBuilder content = new StringBuilder();
+			boolean first = true;
+			boolean found = false;
+			while (line != null) { // skip jar lines
+				if (line.startsWith("-startup")) {found = true;}
+				else if (line.startsWith("--launcher.library")) {found = true;}
+				else if (line.contains("plugins/org.eclipse.equinox.launcher")) {found = true;}
+				else {
+					if (!first) content.append("\n");
+					content.append(line);
+					first = false;
+				}
+				line = reader.readLine();
+			}
+			reader.close();
+
+			//update the file only if the plugin configurations are found
+			if (found) IOUtils.write(TXMINI, content.toString());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+	 * )
+	 */
+	@Override
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance.
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/Activator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ObjectSelectionDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ObjectSelectionDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ObjectSelectionDialog.java	(revision 324)
@@ -0,0 +1,371 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.dialog;
+
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+
+// TODO: Auto-generated Javadoc
+/**
+ * allow to choose between a set of values and choose the order of the selection @
+ * author mdecorde.
+ */
+public class ObjectSelectionDialog extends Dialog {
+	
+	/** The main area. */
+	protected Composite mainArea;
+	
+	/** The availables. */
+	final protected List<Object> availables;
+	
+	/** The selecteds. */
+	final protected List<Object> selecteds;
+	
+	/** The max. */
+	protected int max = 2;
+
+	/** The availables view. */
+	protected org.eclipse.swt.widgets.List availablesView;
+	
+	/** The selecteds view. */
+	protected org.eclipse.swt.widgets.List selectedsView;
+	
+	/** The regex available. */
+	protected Text regexAvailable;
+	
+	/** The regex selected. */
+	protected Text regexSelected;
+
+	/**
+	 * Instantiates a new object selection dialog.
+	 *
+	 * @param shell the shell
+	 * @param available the available
+	 * @param selected the selected
+	 * @param max the max
+	 */
+	public ObjectSelectionDialog(Shell shell, List<Object> available,
+			List<Object> selected, int max) {
+		super(shell);
+
+		this.availables = available;
+		this.selecteds = selected;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+		this.max = max;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell
+				.setText(Messages.ObjectSelectionDialog_0);
+		newShell.setMinimumSize(300, 260);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		// parent.setLayout(new FormLayout());
+		mainArea = new Composite(parent, SWT.NONE);
+		mainArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+		// 4 columns
+		GridLayout layout = new GridLayout(4, false);
+		mainArea.setLayout(layout);
+
+		regexAvailable = new Text(mainArea, SWT.BORDER);
+		regexAvailable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+				false));
+
+		Button searchAvailableBtn = new Button(mainArea, SWT.PUSH);
+		searchAvailableBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
+				false, false));
+		searchAvailableBtn.setImage(IImageKeys
+				.getImage(IImageKeys.ACTION_SEARCH));
+		searchAvailableBtn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				searchAvailable();
+				availablesView.showSelection();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		regexSelected = new Text(mainArea, SWT.BORDER);
+		regexSelected.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+				false));
+		Button searchSelectedBtn = new Button(mainArea, SWT.PUSH);
+		searchSelectedBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false,
+				false));
+		searchSelectedBtn.setImage(IImageKeys
+				.getImage(IImageKeys.ACTION_SEARCH));
+		searchSelectedBtn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				searchSelected();
+				selectedsView.showSelection();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		availablesView = new org.eclipse.swt.widgets.List(mainArea, SWT.BORDER
+				| SWT.MULTI | SWT.V_SCROLL);
+		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		availablesView.setLayoutData(gridData);
+
+		Composite selectionButtons = new Composite(mainArea, SWT.NONE);
+		selectionButtons.setLayout(new GridLayout(1, false));
+		Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+		Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+		selectedsView = new org.eclipse.swt.widgets.List(mainArea, SWT.BORDER
+				| SWT.MULTI | SWT.V_SCROLL);
+		gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		selectedsView.setLayoutData(gridData);
+
+		Composite orderButtons = new Composite(mainArea, SWT.NONE);
+		orderButtons.setLayout(new GridLayout(1, false));
+		Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+		Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+		select.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (max == 1) // process the first selected
+				{
+					int index = availablesView.getSelectionIndex();
+					selecteds.add(availables.get(index));
+					availables.remove(index);
+
+					availables.add(selecteds.get(0));
+					selecteds.remove(0);
+					return;
+				}
+				int[] selectionindices = availablesView.getSelectionIndices();
+				if (max > 0) {
+					if (selecteds.size() + selectionindices.length >= max)
+						return;
+				}
+
+				for (int index : selectionindices) {
+					selecteds.add(availables.get(index));
+				}
+				for (int index = selectionindices.length - 1; index >= 0; index--) {
+					availables.remove(selectionindices[index]);
+				}
+				reload();
+				// availablesView.setSelection(index);
+			}
+		});
+
+		unselect.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (max == 1 && selecteds.size() == 1) {
+					int index = selectedsView.getSelectionIndex();
+					availables.add(selecteds.get(index));
+					selecteds.remove(index);
+					return;
+				}
+
+				int[] selectionindices = selectedsView.getSelectionIndices();
+				for (int index : selectionindices) {
+					availables.add(selecteds.get(index));
+				}
+				for (int index = selectionindices.length - 1; index >= 0; index--) {
+					selecteds.remove(selectionindices[index]);
+				}
+
+				reload();
+			}
+		});
+
+		up.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int index = selectedsView.getSelectionIndex();
+				if (index > 0) {
+					Object selectedP = selecteds.get(index);
+					Object upperP = selecteds.get(index - 1);
+
+					selecteds.set(index, upperP);
+					selecteds.set(index - 1, selectedP);
+
+					reload();
+					selectedsView.setSelection(index - 1);
+				}
+			}
+		});
+
+		down.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int index = selectedsView.getSelectionIndex();
+				if (index < selecteds.size() - 1) {
+					Object selectedP = selecteds.get(index);
+					Object bellowP = selecteds.get(index + 1);
+
+					selecteds.set(index, bellowP);
+					selecteds.set(index + 1, selectedP);
+
+					reload();
+					selectedsView.setSelection(index + 1);
+				}
+			}
+		});
+
+		availablesView.addMouseListener(new MouseAdapter() {
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+				int index = availablesView.getSelectionIndex();
+
+				selecteds.add(availables.get(index));
+				availables.remove(index);
+
+				reload();
+				availablesView.setSelection(index);
+			}
+		});
+
+		selectedsView.addMouseListener(new MouseAdapter() {
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+				if (selecteds.size() > 1) {
+					int index = selectedsView.getSelectionIndex();
+
+					availables.add(selecteds.get(index));
+					selecteds.remove(index);
+
+					reload();
+					selectedsView.setSelection(index);
+				}
+			}
+		});
+
+		reload();
+		return mainArea;
+	}
+
+	/**
+	 * Reload.
+	 */
+	public void reload() {
+		availablesView.removeAll();
+		for (Object obj : availables) {
+			availablesView.add(obj.toString());
+		}
+		selectedsView.removeAll();
+		for (Object obj : selecteds) {
+			selectedsView.add(obj.toString());
+		}
+
+		availablesView.getParent().layout();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		if (selecteds.size() != 0)
+			super.okPressed();
+	}
+
+	/**
+	 * Search available.
+	 */
+	protected void searchAvailable() {
+		try {
+			int count = 0;
+			availablesView.deselectAll();
+			String regex = regexAvailable.getText();
+			
+			Pattern p = Pattern.compile(regex);
+			for (int i = 0; i < availablesView.getItemCount(); i++)
+				if (availablesView.getItem(i).toString().matches(regex)) {
+					availablesView.select(i);
+					count++;
+				}
+			System.out.println(NLS.bind(Messages.ObjectSelectionDialog_3, count));
+		} catch (Exception ex) {
+			System.out.println(NLS.bind(Messages.ObjectSelectionDialog_5, ex.getMessage()));
+		}
+	}
+
+	/**
+	 * Search selected.
+	 */
+	protected void searchSelected() {
+		try {
+			int count = 0;
+			selectedsView.deselectAll();
+			String regex = regexSelected.getText();
+			if (regex.length() > 0)
+				regex = ".*" + regex + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
+			Pattern p = Pattern.compile(regex);
+			for (int i = 0; i < selectedsView.getItemCount(); i++)
+				if (selectedsView.getItem(i).toString().matches(regex)) {
+					selectedsView.select(i);
+					count++;
+				}
+			System.out.println(NLS.bind(Messages.ObjectSelectionDialog_3, count));
+		} catch (Exception ex) {
+			System.out.println(NLS.bind(Messages.ObjectSelectionDialog_5, ex.getMessage()));
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ObjectSelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java	(revision 324)
@@ -0,0 +1,433 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.dialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * build a query with the help of simple questions @ author mdecorde.
+ */
+public class QueryAssistDialog extends Dialog {
+	
+	/** The self. */
+	QueryAssistDialog self;
+	
+	/** The parent. */
+	Composite parent;
+	
+	/** The main panel. */
+	Composite mainPanel;
+	
+	/** The parent shell. */
+	Shell parentShell;
+
+	/** The query. */
+	String query;
+	
+	/** The nbwords. */
+	int nbwords = 0;
+	
+	/** The wordfields. */
+	List<WordField> wordfields = new ArrayList<WordField>();
+	
+	/** The linkfields. */
+	List<LinkField> linkfields = new ArrayList<LinkField>();
+
+	/** The properties. */
+	List<Property> properties;
+
+	/** The cherche label. */
+	Label chercheLabel;
+	
+	/** The wordcontainer. */
+	Composite wordcontainer;
+
+	private Corpus corpus;
+
+	private Combo structsCombo;
+
+	private Button withinButton = null;
+
+	private ScrolledComposite scrollComposite;
+
+	/**
+	 * Instantiates a new query assist dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param corpus the corpus
+	 */
+	public QueryAssistDialog(Shell parentShell, Corpus corpus) {
+		super(parentShell);
+		this.parentShell = parentShell;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+		this.corpus = corpus;
+		try {
+			properties = corpus.getOrderedProperties();
+		} catch (CqiClientException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.QueryAssistDialog_0);
+		newShell.setMinimumSize(300, 300);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite p) {
+		try {
+			this.self = this;
+			this.parent = p;
+			// System.out.println(parent.getLayout());
+			GridLayout mainlayout = new GridLayout(1, false);
+			mainPanel = new Composite(parent, SWT.NONE);
+			mainPanel.setLayout(mainlayout);
+			GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
+			mainPanel.setLayoutData(gridData);
+
+			// directory
+			chercheLabel = new Label(mainPanel, SWT.NONE);
+			chercheLabel.setAlignment(SWT.CENTER);
+			chercheLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.FILL, true, false));
+			chercheLabel.setText(Messages.QueryAssistDialog_2);
+			
+			scrollComposite = new ScrolledComposite(mainPanel, SWT.V_SCROLL);
+			scrollComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+
+			wordcontainer = new Composite(scrollComposite, SWT.NONE);
+			wordcontainer.setLayout(new GridLayout(1, true));
+
+			scrollComposite.setContent(wordcontainer);
+			scrollComposite.setExpandVertical(true);
+			scrollComposite.setExpandHorizontal(true);
+			scrollComposite.addControlListener(new ControlAdapter() {
+				@Override
+				public void controlResized(ControlEvent e) {
+					Rectangle r = scrollComposite.getClientArea();
+					scrollComposite.setMinSize(wordcontainer.computeSize(r.width, SWT.DEFAULT));
+				}
+			});
+
+			addWordField();
+
+//			Composite withinComposite = new Composite(mainPanel, SWT.NONE);
+//			withinComposite.setLayout(new GridLayout(2, false));
+//			withinButton = new Button(withinComposite, SWT.CHECK);
+//			withinButton.setText("within structure: ");
+//			withinButton.addSelectionListener(new SelectionListener() {
+//				@Override
+//				public void widgetSelected(SelectionEvent e) {
+//					structsCombo.setEnabled(withinButton.getSelection());
+//				}
+//				
+//				@Override
+//				public void widgetDefaultSelected(SelectionEvent e) { }
+//			});
+//			structsCombo = new Combo(withinComposite, SWT.READ_ONLY);
+//			structsCombo.setEnabled(false);
+//			int iText = 0;
+//			List<StructuralUnit> sus = corpus.getOrderedStructuralUnits();
+//			for (int i = 0 ; i < sus.size() ; i++) {
+//				StructuralUnit su = sus.get(i);
+//				if (su.getName().equals("txmcorpus")) continue;
+//				structsCombo.add(su.getName());
+//				if (su.getName().equals("text")) iText = i;
+//			}
+//			if (structsCombo.getItemCount() > 0) structsCombo.select(iText);
+			
+			Button addwordButton = new Button(mainPanel, SWT.PUSH);
+			addwordButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+			addwordButton.setText(Messages.QueryAssistDialog_1);
+			addwordButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					if (nbwords > 0) addLinkField();
+					addWordField();
+					parent.layout(true);
+					mainPanel.layout(true);
+					wordcontainer.layout(true);
+					scrollComposite.layout(true);
+					mainPanel.update();
+					wordcontainer.update();
+					Rectangle r = scrollComposite.getClientArea();
+					scrollComposite.setMinSize(wordcontainer.computeSize(r.width, SWT.DEFAULT));
+					updateShell();
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {
+				}
+			});
+
+		} catch (Exception e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return null;
+	}
+
+	/**
+	 * Adds the link field.
+	 */
+	protected void addLinkField() {
+		linkfields.add(new LinkField(wordcontainer, SWT.NONE));
+	}
+
+	/**
+	 * Adds the word field.
+	 */
+	private void addWordField() {
+		nbwords++;
+		WordField wf = new WordField(wordcontainer, SWT.NONE, nbwords);
+		wordfields.add(wf);
+
+		wordcontainer.update();
+		mainPanel.update();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		this.query = ""; //$NON-NLS-1$
+		this.query = wordfields.get(0).getQuery();
+		for (int i = 1; i < wordfields.size(); i++) {
+			LinkField lf = linkfields.get(i - 1);
+			WordField wf = wordfields.get(i);
+			query += lf.getQuery();
+			query += wf.getQuery();
+			query += " "; //$NON-NLS-1$
+		}
+		
+		if (withinButton != null && withinButton.getSelection() && structsCombo.getText().length() > 0) {
+			query += " within "+structsCombo.getText(); //$NON-NLS-1$
+		}
+
+		super.okPressed();
+	}
+
+	/**
+	 * Update shell.
+	 */
+	public void updateShell() {
+		parentShell.layout(true);
+	}
+
+	/**
+	 * Gets the query.
+	 *
+	 * @return the query
+	 */
+	public String getQuery() {
+		return this.query;
+	}
+
+	/**
+	 * The Class WordField.
+	 */
+	public class WordField extends Composite {
+		
+		/** The prop combo. */
+		Combo propCombo;
+		
+		/** The test combo. */
+		Combo testCombo;
+		
+		/** The value t. */
+		Text valueT;
+		
+		Button removeButton;
+
+		/**
+		 * Instantiates a new word field.
+		 *
+		 * @param parent the parent
+		 * @param style the style
+		 * @param no the no
+		 */
+		public WordField(Composite parent, int style, int no) {
+			super(parent, style);
+
+			this.setLayout(new GridLayout(5, false));
+
+			Label titleL = new Label(this, SWT.NONE);
+			titleL.setText(NLS.bind(Messages.QueryAssistDialog_8, no));
+			GridData datalayout = new GridData(GridData.FILL, GridData.CENTER,
+					true, false);
+			titleL.setLayoutData(datalayout);
+
+			propCombo = new Combo(this, SWT.READ_ONLY | SWT.SINGLE);
+			if (properties != null) {
+				for (Property p : properties)
+					propCombo.add(p.getName());
+				propCombo.select(0);
+			}
+
+			testCombo = new Combo(this, SWT.READ_ONLY | SWT.SINGLE);
+			testCombo.add(Messages.QueryAssistDialog_10);
+			testCombo.add(Messages.QueryAssistDialog_11);
+			testCombo.add(Messages.QueryAssistDialog_12);
+			testCombo.add(Messages.QueryAssistDialog_13);
+			testCombo.select(0);
+
+			valueT = new Text(this, SWT.SINGLE | SWT.BORDER);
+			GridData gdata = new GridData(GridData.FILL, GridData.FILL, false, false);
+			gdata.widthHint = 150;
+			gdata.minimumWidth = 150;
+			valueT.setLayoutData(gdata);
+//			removeButton = new Button(this, SWT.PUSH);
+//			removeButton.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
+//			removeButton.addSelectionListener(new SelectionListener() {
+//				
+//				@Override
+//				public void widgetSelected(SelectionEvent e) {
+//					
+//					int idx = QueryAssistDialog.this.wordfields.indexOf(WordField.this);
+//					System.out.println("field: "+idx);
+//					System.out.println(QueryAssistDialog.this.linkfields);
+//					if (QueryAssistDialog.this.linkfields.size() > 0) {
+//						if (idx > 0) idx--;
+//						LinkField field = QueryAssistDialog.this.linkfields.remove(idx);
+//						field.dispose();
+//					}
+//					QueryAssistDialog.this.wordfields.remove(WordField.this);
+//					QueryAssistDialog.this.nbwords--;
+//					WordField.this.dispose();
+//					
+//					wordcontainer.update();
+//					mainPanel.update();
+//					
+//
+//					QueryAssistDialog.this.parent.layout(true);
+//					QueryAssistDialog.this.mainPanel.layout(true);
+//					QueryAssistDialog.this.wordcontainer.layout(true);
+//					QueryAssistDialog.this.scrollComposite.layout(true);
+//				}
+//				
+//				@Override
+//				public void widgetDefaultSelected(SelectionEvent e) { }
+//			});
+		}
+
+		/**
+		 * Gets the query.
+		 *
+		 * @return the query
+		 */
+		public String getQuery() {
+			String query = "["; //$NON-NLS-1$
+			query += propCombo.getItem(propCombo.getSelectionIndex());
+			if (testCombo.getSelectionIndex() == 0)// equals
+				query += "=\"" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			else if (testCombo.getSelectionIndex() == 1)// starts with
+				query += "=\"" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			else if (testCombo.getSelectionIndex() == 2)// ends with
+				query += "=\".*" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			else if (testCombo.getSelectionIndex() == 3)// contains
+				query += "=\".*" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			return query + "]"; //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * The Class LinkField.
+	 */
+	public class LinkField extends Composite {
+		
+		/** The link combo. */
+		Combo linkCombo;
+
+		/**
+		 * Instantiates a new link field.
+		 *
+		 * @param parent the parent
+		 * @param style the style
+		 */
+		public LinkField(Composite parent, int style) {
+			super(parent, style);
+			this.setLayout(new RowLayout());
+
+			linkCombo = new Combo(this, SWT.READ_ONLY | SWT.SINGLE);
+			linkCombo.add(Messages.QueryAssistDialog_32);
+			linkCombo.add(Messages.QueryAssistDialog_33);
+			linkCombo.add(Messages.QueryAssistDialog_34);
+
+			linkCombo.select(0);
+		}
+
+		/**
+		 * Gets the query.
+		 *
+		 * @return the query
+		 */
+		public String getQuery() {
+			if (linkCombo.getSelectionIndex() == 0) // followed
+				return ""; //$NON-NLS-1$
+			else if (linkCombo.getSelectionIndex() == 1)// at least 0 word
+				return "[]{0,50}"; //$NON-NLS-1$
+			else if (linkCombo.getSelectionIndex() == 2)// at least 1 word
+				return "[]{1, 50}"; //$NON-NLS-1$
+			return ""; //$NON-NLS-1$
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ConfirmDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ConfirmDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ConfirmDialog.java	(revision 324)
@@ -0,0 +1,57 @@
+package org.txm.rcp.swt.dialog;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+public class ConfirmDialog extends MessageDialog {
+
+	public final static String[] dialogButtonLabels = { IDialogConstants.OK_LABEL,
+		IDialogConstants.CANCEL_LABEL };
+	public final static String TRUE = "true";
+	public final static String ROOT = "org.txm.confirmdialog.history.";
+
+	protected String id;
+	public ConfirmDialog(Shell parentShell, String id, String dialogTitle, String dialogMessage) {
+		super(parentShell, dialogTitle, null, dialogMessage,
+				MessageDialog.QUESTION_WITH_CANCEL, dialogButtonLabels, 1);
+		this.id = id;
+	}
+
+	protected Button checkDefault;
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite container = (Composite) super.createDialogArea(parent);
+		checkDefault = new Button(container, SWT.CHECK);
+		checkDefault.setText("Don't ask again");
+		boolean b = TRUE.equals(System.getProperty(ROOT+id));
+		checkDefault.setSelection(b);
+
+		checkDefault.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				boolean b = checkDefault.getSelection();
+				System.setProperty(ROOT+id, Boolean.toString(b));
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		return container;
+	}
+
+	@Override
+	public int open() {
+		boolean b = TRUE.equals(System.getProperty(ROOT+id));
+		if (b) return 0; // ok
+		
+		return super.open();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ConfirmDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/LastOpened.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/LastOpened.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/LastOpened.java	(revision 324)
@@ -0,0 +1,34 @@
+package org.txm.rcp.swt.dialog;
+
+import java.io.File;
+
+import org.txm.core.preferences.TXMPreferences;
+
+public class LastOpened {
+	public static String PREFERENCES_NODE = LastOpened.class.getCanonicalName();
+	
+	public static final String FOLDER = "FOLDER"; //$NON-NLS-1$
+	public static final String FILE = "FILE"; //$NON-NLS-1$
+	
+	public static void set(String ID, String folder) {
+		TXMPreferences.putString(PREFERENCES_NODE, ID+FOLDER, folder);
+	}
+	
+	public static void set(String ID, String folder, String file) {
+		TXMPreferences.putString(PREFERENCES_NODE, ID+FOLDER, folder);
+		TXMPreferences.putString(PREFERENCES_NODE, ID+FILE, file);
+	}
+	
+	public static void set(String ID, File outfile) {
+		TXMPreferences.putString(PREFERENCES_NODE, ID+FOLDER, outfile.getParent());
+		TXMPreferences.putString(PREFERENCES_NODE, ID+FILE, outfile.getName());
+	}
+	
+	public static String getFolder(String ID) {
+		return TXMPreferences.getString(PREFERENCES_NODE, ID+FOLDER);
+	}
+	
+	public static String getFile(String ID) {
+		return TXMPreferences.getString(PREFERENCES_NODE, ID+FILE);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/LastOpened.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ComboDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ComboDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ComboDialog.java	(revision 324)
@@ -0,0 +1,181 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.dialog;
+
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+// TODO: Auto-generated Javadoc
+/**
+ * build a query with the help of simple questions @ author mdecorde.
+ */
+public class ComboDialog extends Dialog {
+	
+	/** The self. */
+	ComboDialog self;
+	
+	/** The main panel. */
+	Composite mainPanel;
+	
+	/** The parent shell. */
+	Shell parentShell;
+
+	/** The values. */
+	List<String> values;
+	
+	/** The combo. */
+	private Combo combo;
+	
+	/** The selected index. */
+	private int selectedIndex = -1;
+	
+	/** The selected value. */
+	private String selectedValue = ""; //$NON-NLS-1$
+	
+	/** The default value. */
+	private String defaultValue;
+	
+	/** The title. */
+	private String title;
+
+	/**
+	 * Instantiates a new combo dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param title the title
+	 * @param values the values
+	 * @param defaultValue the default value
+	 */
+	public ComboDialog(Shell parentShell, String title, List<String> values,
+			String defaultValue) {
+		super(parentShell);
+		this.parentShell = parentShell;
+		this.setShellStyle(this.getShellStyle());
+		this.values = values;
+		this.defaultValue = defaultValue;
+		this.title = title;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(title);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite p) {
+		//System.out.println(p.getLayout());
+		combo = new Combo(p, SWT.READ_ONLY | SWT.SINGLE);
+		combo.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+				true, 5, 1));
+		combo.setItems(values.toArray(new String[] {}));
+		// combo.setLayoutData(new GridData(GridData.FILL,GridData.FILL, true,
+		// true));
+		if (values.size() > 0)
+			combo.select(0);
+		if (defaultValue != null)
+			selectValue(defaultValue);
+
+		return p;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		selectedIndex = combo.getSelectionIndex();
+		selectedValue = values.get(selectedIndex);
+		super.okPressed();
+	}
+
+	/**
+	 * Gets the values.
+	 *
+	 * @return the values
+	 */
+	public List<String> getValues() {
+		return values;
+	}
+
+	/**
+	 * Sets the values.
+	 *
+	 * @param values the new values
+	 */
+	public void setValues(List<String> values) {
+		this.values = values;
+		combo.setItems(values.toArray(new String[] {}));
+		if (values.size() > 0)
+			combo.select(0);
+	}
+
+	/**
+	 * Gets the selected index.
+	 *
+	 * @return the selected index
+	 */
+	public int getSelectedIndex() {
+		return selectedIndex;
+	}
+
+	/**
+	 * Gets the selected value.
+	 *
+	 * @return the selected value
+	 */
+	public String getSelectedValue() {
+		return selectedValue;
+	}
+
+	/**
+	 * Select value.
+	 *
+	 * @param string the string
+	 */
+	public void selectValue(String string) {
+		for (int i = 0; i < values.size(); i++)
+			if (values.get(i).equals(string)) {
+				combo.select(i);
+				break;
+			}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/ComboDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/UsernamePasswordDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/UsernamePasswordDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/UsernamePasswordDialog.java	(revision 324)
@@ -0,0 +1,108 @@
+package org.txm.rcp.swt.dialog;
+/*
+SWT/JFace in Action
+GUI Design with Eclipse 3.0
+Matthew Scarpino, Stephen Holder, Stanford Ng, and Laurent Mihalkovic
+
+ISBN: 1932394273
+
+Publisher: Manning
+ */
+
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class UsernamePasswordDialog extends Dialog {
+	private static final int RESET_ID = IDialogConstants.NO_TO_ALL_ID + 1;
+
+	private Text usernameField;
+	private Text passwordField;
+	boolean must[];
+	String user  = null, password = null;
+	String kr_name;
+	
+	public UsernamePasswordDialog(Shell parentShell, boolean must[], String kr_name) {
+		super(parentShell);
+		this.must = must;
+		this.kr_name = kr_name;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Login to "+kr_name);
+	}
+
+	protected Control createDialogArea(Composite parent) {
+		Composite comp = (Composite) super.createDialogArea(parent);
+
+		GridLayout layout = (GridLayout) comp.getLayout();
+		layout.numColumns = 2;
+
+		if (must[0]) {
+			Label usernameLabel = new Label(comp, SWT.RIGHT);
+			usernameLabel.setText("Username: ");
+
+			usernameField = new Text(comp, SWT.SINGLE);
+			GridData data = new GridData(GridData.FILL_HORIZONTAL);
+			usernameField.setLayoutData(data);
+		}
+		if (must[1]) {
+			Label passwordLabel = new Label(comp, SWT.RIGHT);
+			passwordLabel.setText("Password: ");
+
+			passwordField = new Text(comp, SWT.SINGLE | SWT.PASSWORD);
+			GridData data = new GridData(GridData.FILL_HORIZONTAL);
+			passwordField.setLayoutData(data);
+		}
+		return comp;
+	}
+
+	protected void createButtonsForButtonBar(Composite parent) {
+		super.createButtonsForButtonBar(parent);
+		createButton(parent, RESET_ID, "Reset All", false);
+	}
+
+	protected void buttonPressed(int buttonId) {
+		if (buttonId == RESET_ID) {
+			if (must[0]) {
+				usernameField.setText("");
+			}
+			if (must[1]) {
+				passwordField.setText("");
+			}
+		} else {
+			if (must[0]) {
+				user = usernameField.getText();
+			} else {
+				user = null;
+			}
+			if (must[1]) {
+				password= passwordField.getText();
+			} else {
+				password = null;
+			}
+			super.buttonPressed(buttonId);
+		}
+	}
+
+	public String getUser() {
+		return user;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/UsernamePasswordDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/PropertySelector.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/PropertySelector.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/PropertySelector.java	(revision 324)
@@ -0,0 +1,185 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.dialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class PropertySelector.
+ */
+public class PropertySelector extends Dialog {
+
+	/** The property. */
+	protected Property property;
+	
+	/** The properties. */
+	protected List<Property> properties;
+	
+	/** The ana prop combo. */
+	protected Combo anaPropCombo;
+
+	/** The title. */
+	protected String title;
+	
+	/** The mess. */
+	protected String mess;
+	
+	/** The corpus. */
+	protected Corpus corpus;
+
+	/**
+	 * Instantiates a new property selector.
+	 *
+	 * @param parentShell the parent shell
+	 * @param corpus the corpus
+	 */
+	public PropertySelector(Shell parentShell, Corpus corpus) {
+		super(parentShell);
+		try {
+			this.properties = new ArrayList<Property>(corpus.getOrderedProperties());
+			this.title = Messages.PropertySelector_0;
+			this.mess = Messages.PropertySelector_0;
+		} catch (CqiClientException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+
+	/**
+	 * Instantiates a new property selector.
+	 *
+	 * @param parentShell the parent shell
+	 * @param corpus the corpus
+	 * @param title the title
+	 * @param mess the mess
+	 */
+	public PropertySelector(Shell parentShell, Corpus corpus, String title,
+			String mess) {
+		super(parentShell);
+		this.corpus = corpus;
+		this.title = title;
+		this.mess = mess;
+		try {
+			this.properties = new ArrayList<Property>(corpus.getOrderedProperties());
+		} catch (CqiClientException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.PropertySelector_0);
+		if (title != null)
+			newShell.setText(title);
+	}
+
+	/** The composite. */
+	protected Composite composite;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout(2, false);
+		composite.setLayout(layout);
+
+		Label anaPropLabel = new Label(composite, SWT.NONE);
+		if (mess != null)
+			anaPropLabel.setText(mess);
+		else
+			anaPropLabel
+					.setText(Messages.Property);
+		anaPropLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+				false, false));
+
+		anaPropCombo = new Combo(composite, SWT.READ_ONLY);
+		anaPropCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+		int i = 0 ;
+		int iword = 0;
+		for (Property property : properties) {
+			anaPropCombo.add(property.getName());
+			if (property.getName().equals("word")) //$NON-NLS-1$
+				iword = i;
+			i++;
+		}
+		if (properties.size() > 0)
+			anaPropCombo.select(iword);
+		return composite;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		int propIndex = anaPropCombo.getSelectionIndex();
+		if (propIndex == -1) {
+			MessageDialog.openError(getShell(),
+					Messages.Invalid_analysis_property,
+					Messages.Structure_field_not_empty);
+			return;
+		}
+		property = properties.get(propIndex);
+
+		super.okPressed();
+	}
+
+	/**
+	 * Gets the property.
+	 *
+	 * @return the property
+	 */
+	public Property getProperty() {
+		return property;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/PropertySelector.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/TXMMessageBox.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/TXMMessageBox.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/TXMMessageBox.java	(revision 324)
@@ -0,0 +1,57 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.dialog;
+
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TXMMessageBox.
+ */
+public class TXMMessageBox {
+
+  /** The button. */
+  Button button;
+  
+  /**
+   * Instantiates a new tXM message box.
+   *
+   * @param shell the shell
+   * @param title the title
+   * @param message the message
+   * @param style the style
+   */
+  public static void show(Shell shell, String title, String message, int style) {
+	  MessageBox messageBox = new MessageBox(shell, style);
+      messageBox.setText(title);
+      messageBox.setMessage(message);
+      messageBox.open();
+  }
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/TXMMessageBox.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/MultipleValueDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/MultipleValueDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/MultipleValueDialog.java	(revision 324)
@@ -0,0 +1,126 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.dialog;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+// TODO: Auto-generated Javadoc
+/**
+ * build a query with the help of simple questions @ author mdecorde.
+ */
+public class MultipleValueDialog extends Dialog {
+	
+	/** The self. */
+	MultipleValueDialog self;
+	
+	/** The main panel. */
+	Composite mainPanel;
+	
+	/** The parent shell. */
+	Shell parentShell;
+
+	/** The values. */
+	LinkedHashMap<String, String> values;
+	HashMap<String, Text> widgets = new HashMap<String, Text>();
+	
+	/** The title. */
+	private String title;
+
+	/**
+	 * Instantiates a new combo dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param title the title
+	 * @param values the values
+	 * @param defaultValue the default value
+	 */
+	public MultipleValueDialog(Shell parentShell, String title, LinkedHashMap<String, String> values) {
+		super(parentShell);
+		this.parentShell = parentShell;
+		this.setShellStyle(this.getShellStyle());
+		this.values = values;
+		this.title = title;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(title);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite p) {
+		//System.out.println(p.getLayout());
+		
+		for (String name : values.keySet()) {
+			Label label = new Label(p, SWT.NONE);
+			label.setText(name+": "); //$NON-NLS-1$
+			label.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false,	false));
+			Text valueText = new Text(p, SWT.BORDER); 
+			valueText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 4, 1)); // 5 ?
+			valueText.setText(values.get(name));
+			widgets.put(name, valueText);
+		}
+		return p;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		for (String name : values.keySet())
+			values.put(name, widgets.get(name).getText());
+		super.okPressed();
+	}
+
+	/**
+	 * Gets the values.
+	 *
+	 * @return the values
+	 */
+	public HashMap<String, String> getValues() {
+		return values;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/MultipleValueDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/MultipleValueTreeDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/MultipleValueTreeDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/MultipleValueTreeDialog.java	(revision 324)
@@ -0,0 +1,221 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.dialog;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.txm.rcp.Messages;
+
+// TODO: Auto-generated Javadoc
+/**
+ * build a query with the help of simple questions @ author mdecorde.
+ */
+public class MultipleValueTreeDialog extends Dialog {
+
+	/** The self. */
+	MultipleValueTreeDialog self;
+	ScrolledComposite scrollComposite;
+	/** The main panel. */
+	Composite mainPanel;
+
+	/** The parent shell. */
+	Shell parentShell;
+
+	/** The values. */
+	LinkedHashMap<String, String> values;
+	private ArrayList<LinkedHashMap<String, String>> subvalues;
+
+	HashMap<String, Text> widgets = new HashMap<String, Text>();
+	ArrayList<HashMap<String, Text>> subwidgets = new ArrayList<HashMap<String, Text>>();
+
+	/** The title. */
+	private String title;
+	private Composite partsComposite;
+	private String itemSubName;
+
+	/**
+	 * Instantiates a new combo dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param title the title
+	 * @param values the values
+	 * @param defaultValue the default value
+	 */
+	public MultipleValueTreeDialog(Shell parentShell, String title, LinkedHashMap<String, String> values, 
+			ArrayList<LinkedHashMap<String, String>> subvalues, String itemSubName) {
+		super(parentShell);
+		this.parentShell = parentShell;
+		this.setShellStyle(this.getShellStyle()|SWT.RESIZE);
+		this.values = values;
+		this.subvalues = subvalues;
+		this.itemSubName = itemSubName;
+		this.title = title;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(title);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(final Composite p) {
+		//System.out.println(p.getLayout());
+
+		for (String name : values.keySet()) {
+			Label label = new Label(p, SWT.NONE);
+			label.setText(name+": "); //$NON-NLS-1$
+			label.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false,	false));
+			Text valueText = new Text(p, SWT.BORDER); 
+			valueText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 4, 1)); // 5 ?
+			valueText.setText(values.get(name));
+			widgets.put(name, valueText);
+		}
+
+		scrollComposite = new ScrolledComposite(p, SWT.V_SCROLL | SWT.BORDER);
+		scrollComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+		partsComposite = new Composite(scrollComposite, SWT.BORDER);
+		partsComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,	true));
+		partsComposite.setLayout(new GridLayout(2, true));
+		scrollComposite.setContent(partsComposite);
+		scrollComposite.setExpandVertical(true);
+		scrollComposite.setExpandHorizontal(true);
+		//		scrollComposite.addControlListener(new ControlAdapter() {
+		//			public void controlResized(ControlEvent e) {
+		//				Rectangle r = scrollComposite.getClientArea();
+		//				scrollComposite.setMinSize(partsComposite.computeSize(
+		//						r.width, SWT.DEFAULT));
+		//			}
+		//		});
+
+		Button addButton = new Button(p, SWT.PUSH);
+		addButton.setText(Messages.MultipleValueTreeDialog_0+itemSubName);
+		addButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				LinkedHashMap<String, String> another = subvalues.get(0);
+				LinkedHashMap<String, String> subs = new LinkedHashMap<String, String>();
+				subvalues.add(subs);
+				for(String key : another.keySet()) {
+					subs.put(key, key+subvalues.size());
+				}
+				addSubValues(partsComposite, subs);
+				System.out.println(subvalues);	
+				scrollComposite.layout(true);
+				partsComposite.getShell().layout(true);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+
+			}
+		});
+		for(String key : subvalues.get(0).keySet()) {
+			Label l = new Label(partsComposite, SWT.NONE);
+			l.setText(key);
+			l.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false,	false));
+		}
+		for(LinkedHashMap<String, String> subs : subvalues) {
+			addSubValues(partsComposite, subs);
+		}
+
+		return p;
+	}
+
+	public void addSubValues(Composite parent, LinkedHashMap<String, String> subs) {
+		HashMap<String, Text> texts = new HashMap<String, Text>();
+		subwidgets.add(texts);
+
+		for(String subname : subs.keySet()) {
+			//			Label l = new Label(parent, SWT.NONE);
+			//			l.setText("\t"+subname+": ");
+			//			l.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false,	false));
+
+			Text subValueText = new Text(parent, SWT.BORDER); 
+			subValueText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 1, 1)); 
+			subValueText.setText(subs.get(subname));
+			texts.put(subname, subValueText);
+		}
+
+		Rectangle r = parent.getClientArea();
+		parent.setSize(parent.computeSize(r.width, SWT.DEFAULT));
+
+		r = parent.getClientArea();
+		scrollComposite.setMinSize(parent.computeSize(r.width,
+				SWT.DEFAULT));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		for (String name : values.keySet()) {
+			values.put(name, widgets.get(name).getText());
+		}
+		for(int i = 0 ; i < subvalues.size() ; i++) {
+			HashMap<String, Text> texts = subwidgets.get(i);
+			LinkedHashMap<String, String> subs = subvalues.get(i);
+			for (String name : texts.keySet()) {
+				subs.put(name, texts.get(name).getText());
+			}
+		}
+		super.okPressed();
+	}
+
+	/**
+	 * Gets the values.
+	 *
+	 * @return the values
+	 */
+	public HashMap<String, String> getValues() {
+		return values;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/MultipleValueTreeDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/DynamicTableViewer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/DynamicTableViewer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/DynamicTableViewer.java	(revision 324)
@@ -0,0 +1,105 @@
+package org.txm.rcp.swt.widget;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.window.ApplicationWindow;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TableColumn;
+
+/**
+ * add/remove columns
+ * freeze column
+ * horizontal scrollbar for columns
+ * 
+ * @author mdecorde
+ *
+ */
+public class DynamicTableViewer extends TableViewer {
+
+	public DynamicTableViewer(Composite parent, int style) {
+		super(parent, style);
+		
+	}
+	
+	public TableViewerColumn addColumn(String name) {
+		//TableColumn c = new TableColumn(this.getTable(), SWT.H_SCROLL);
+		TableViewerColumn column = new TableViewerColumn(this, SWT.H_SCROLL);
+		column.getColumn().setText(name);
+		column.getColumn().setMoveable(true);
+		column.getColumn().setResizable(true);
+		column.getColumn().setToolTipText(name);
+		column.getColumn().setWidth(100);
+		
+		return column;
+	}
+
+	public static void main(String args[]) {
+		ApplicationWindow w = new ApplicationWindow(Display.getDefault().getActiveShell()) {
+			protected void configureShell(Shell shell) {
+				super.configureShell(shell);
+				shell.setSize(400, 400);
+			}
+
+			protected Control createContents(Composite parent) {
+				Composite composite = new Composite(parent, SWT.NONE);
+				composite.setLayout(new GridLayout(1, false));
+
+				DynamicTableViewer viewer = new DynamicTableViewer(composite, SWT.BORDER);
+				viewer.getTable().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+				viewer.getTable().setLinesVisible(true);
+				viewer.getTable().setHeaderVisible(true);
+				
+				viewer.setContentProvider(new ArrayContentProvider());
+				ArrayList<List<String>> data = new ArrayList<List<String>>();
+				data.add(Arrays.asList("1111111111111111111 111111111111 1 1 11111111111111 11111111111", "2", "3"));
+				data.add(Arrays.asList("11111111111 1111111111  1111 1 1 1 1 111111111111  1 1 1 1 1 1 1 11 1 1 1 ", "2", "3"));
+				data.add(Arrays.asList("1", "2", "3"));
+								
+				TableViewerColumn col = viewer.addColumn("first");
+				col.setLabelProvider(new ColumnLabelProvider() {
+				      @Override
+				      public String getText(Object element) {
+				        List p = (List) element;
+				        return p.get(0).toString();
+				      }
+				    });
+							
+				col = viewer.addColumn("second");
+				col.setLabelProvider(new ColumnLabelProvider() {
+				      @Override
+				      public String getText(Object element) {
+				        List p = (List) element;
+				        return p.get(1).toString();
+				      }
+				    });
+				
+				col = viewer.addColumn("third");
+				col.setLabelProvider(new ColumnLabelProvider() {
+				      @Override
+				      public String getText(Object element) {
+				        List p = (List) element;
+				        return p.get(2).toString();
+				      }
+				    });
+				
+				viewer.setInput(data);
+				return composite;
+			}
+		};
+		w.setBlockOnOpen(true);
+		w.open();
+		Display.getDefault().dispose();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/DynamicTableViewer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NamedAssistedQueryWidget.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NamedAssistedQueryWidget.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NamedAssistedQueryWidget.java	(revision 324)
@@ -0,0 +1,167 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.txm.core.messages.TXMCoreMessages;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.swt.dialog.QueryAssistDialog;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * the QueryWidget plus the button to open the QueryAssisDialog @ author
+ * mdecorde.
+ */
+public class NamedAssistedQueryWidget extends Composite {
+	
+	/** The magicstick. */
+	Button magicstick;
+	
+	/** The querywidget. */
+	QueryWidget querywidget;
+	Text nameField;
+
+	/**
+	 * Instantiates a new assisted query widget.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 * @param corpus the corpus
+	 */
+	public NamedAssistedQueryWidget(Composite parent, int style, final Corpus corpus) {
+		super(parent, SWT.NONE);
+		this.setLayout(new GridLayout(5, false));
+
+		Label l = new Label(this, SWT.NONE);
+		l.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, true));
+		l.setText("Name: "); //$NON-NLS-1$
+		
+		nameField = new Text(this, SWT.BORDER);
+		nameField.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, true));
+		
+		l = new Label(this, SWT.NONE);
+		l.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, true));
+		l.setText(TXMCoreMessages.QUERY_1);
+		
+		magicstick = new Button(this, SWT.PUSH);
+		magicstick.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, true));
+		magicstick.setImage(IImageKeys.getImage(IImageKeys.ACTION_ASSISTQUERY));
+		magicstick.setToolTipText(Messages.AssistedQueryWidget_0);
+		magicstick.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				QueryAssistDialog d = new QueryAssistDialog(e.display
+						.getActiveShell(), corpus);
+				// System.out.println(d);
+				if (d.open() == Window.OK) {
+					querywidget.setText(d.getQuery());
+				}
+
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+		
+		querywidget = new QueryWidget(this, style);
+		querywidget.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, true));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.swt.widgets.Control#addKeyListener(org.eclipse.swt.events.KeyListener)
+	 */
+	@Override
+	public void addKeyListener(KeyListener listener) {
+		this.querywidget.addKeyListener(listener);
+	}
+
+	/**
+	 * Gets the query string.
+	 *
+	 * @return the query string
+	 */
+	public String getQueryString() {
+		return querywidget.getQueryString();
+	}
+
+	/**
+	 * Gets the query string.
+	 *
+	 * @return the query string
+	 */
+	public String getQueryName() {
+		return nameField.getText();
+	}
+	
+	/**
+	 * Memorize.
+	 */
+	public void memorize() {
+		querywidget.memorize();
+	}
+
+	/**
+	 * Memorize.
+	 *
+	 * @param query the query
+	 */
+	public void memorize(String query) {
+		querywidget.memorize(query);
+	}
+
+	/**
+	 * Sets the text.
+	 *
+	 * @param query the new text
+	 */
+	public void setText(String query) {
+		querywidget.setText(query);
+	}
+
+	public void focus() {
+		querywidget.forceFocus();
+	}
+
+	public void setName(String string) {
+		nameField.setText(string);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NamedAssistedQueryWidget.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Shared swt widgets</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/SimpleSubcorpusPanel.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/SimpleSubcorpusPanel.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/SimpleSubcorpusPanel.java	(revision 324)
@@ -0,0 +1,256 @@
+package org.txm.rcp.swt.widget;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.txm.rcp.Messages;
+import org.txm.rcp.actions.CreateSubcorpusDialog;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.utils.logger.Log;
+
+public class SimpleSubcorpusPanel extends Composite {
+
+	public StructuralUnit selectedStructuralUnit;
+	public StructuralUnitProperty selectedStructuralUnitProperty;
+	public List<String> selectedValues;
+	public List<StructuralUnitProperty> selectableStructuralUnitProperties = null;
+
+	Combo structuralUnitsCombo;
+	Combo propertyCombo;
+	ListViewer valueCombo;
+	
+	List<StructuralUnit> structuralUnitsFinal;
+	private CreateSubcorpusDialog dialog;
+	private Corpus corpus;
+
+	public SimpleSubcorpusPanel(Composite parent, int style, CreateSubcorpusDialog dialog, Corpus corpus) {
+		super(parent, style);
+
+		this.dialog = dialog;
+		this.corpus = corpus;
+
+		GridLayout layout = new GridLayout(2, false);
+		this.setLayout(layout);
+
+		Label structureLabel = new Label(this, SWT.NONE);
+		structureLabel.setText(Messages.CreatePartitionDialog_2);
+		structureLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+
+		structuralUnitsCombo = new Combo(this, SWT.READ_ONLY);
+		structuralUnitsCombo.setLayoutData(new GridData(GridData.FILL,GridData.FILL, true, false));
+
+		Label propertyLabel = new Label(this, SWT.NONE);
+		propertyLabel.setText(Messages.CreatePartitionDialog_4);
+		propertyLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+				false, false));
+
+		propertyCombo = new Combo(this, SWT.READ_ONLY);
+		propertyCombo.setLayoutData(new GridData(GridData.FILL,GridData.FILL, true, false));
+
+		Label valuesLabel = new Label(this, SWT.NONE);
+		valuesLabel.setText(Messages.CreateSubcorpusDialog_6);
+		valuesLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+
+		valueCombo = new ListViewer(this, SWT.MULTI |SWT.V_SCROLL | SWT.BORDER | SWT.VIRTUAL);
+		valueCombo.setContentProvider(new ArrayContentProvider());
+//		valueCombo.setLabelProvider(new LabelProvider() {
+//
+//	        @Override
+//	        public String getText(Object element) {
+//	            return Activator.getSomeService().key2Value((Integer) element);
+//	        }
+//
+//	    });
+		GridData data = new GridData(GridData.FILL,GridData.FILL, true, false);
+		data.heightHint = 100;
+		valueCombo.getList().setLayoutData(data);
+	
+
+		// Load StructuralUnit
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+		List<StructuralUnit> structuralUnits = null;
+		try {
+			structuralUnits = corpus.getOrderedStructuralUnits();
+		} catch (Exception e) {
+			Log.severe(Messages.ObjectExplorer_9
+					+ Log.toString(e));
+			return;
+		}
+
+		structuralUnitsFinal = new ArrayList<StructuralUnit>();
+
+
+		for (StructuralUnit unit : structuralUnits) {
+			if (unit.getOrderedProperties() != null
+					&& unit.getOrderedProperties().size() != 0) {
+				if (!"txmcorpus".equals(unit.getName())) { // keep all but txmcorpus //$NON-NLS-1$
+					structuralUnitsFinal.add(unit);
+					structuralUnitsCombo.add(unit.getName());
+				}
+			}
+		}
+
+		if (structuralUnitsCombo.getItemCount() == 0) {
+			dialog.getButton(IDialogConstants.OK_ID).setEnabled(false);
+		} else {
+			String[] items = structuralUnitsCombo.getItems();
+			structuralUnitsCombo.select(0);
+			for (int i = 0 ; i < items.length ; i++)
+				if (items[i].equals("text")) { //$NON-NLS-1$
+					structuralUnitsCombo.select(i);
+					break;
+				}
+
+			selectedStructuralUnit = structuralUnitsFinal.get(0);
+		}
+		// Load StructuralUnitProperty
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+		structuralUnitsCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				System.out.println(Messages.SimpleSubcorpusPanel_0);
+				reloadProperties();
+			}
+		});
+
+		/*
+		 * for(StructuralUnitProperty property :
+		 * structuralUnitsFinal.get(0).getProperties()) {
+		 * propertyCombo.add(property.getName()); }
+		 * 
+		 * propertyCombo.select(0); selectedStructuralUnitProperty =
+		 * selectedStructuralUnit.getProperties().get(0);
+		 */
+		// Load Values
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+		propertyCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				reloadValues();
+			}
+		});
+
+		/*
+		 * try { for(String value :
+		 * selectedStructuralUnitProperty.getValues(corpus)) {
+		 * valueCombo.add(value); } } catch (CqiClientException e) {
+		 * System.err.println
+		 * (Messages.bind(Messages.ObjectExplorer_9, e)); }
+		 * valueCombo.select(0); selectedValue = valueCombo.getItem(0);
+		 */
+		valueCombo.getList().addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				ISelection sel = valueCombo.getSelection();
+				if (sel instanceof IStructuredSelection) {
+					selectedValues = ((IStructuredSelection)sel).toList();
+				}
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				// TODO Auto-generated method stub
+				
+			}
+		});
+
+		reloadProperties();
+	}
+
+	/**
+	 * Reload values.
+	 */
+	protected void reloadValues() {
+		List<String> values = null;
+		selectedStructuralUnitProperty = selectableStructuralUnitProperties
+				.get(propertyCombo.getSelectionIndex());
+		//System.out.println("Selectable su prop: "+selectableStructuralUnitProperties); //$NON-NLS-1$
+		//System.out.println("Selected line: "+propertyCombo.getSelectionIndex()); //$NON-NLS-1$
+		//System.out.println("Combo values: "+Arrays.toString(propertyCombo.getItems())); //$NON-NLS-1$
+		//System.out.println("Selected su prop: "+selectedStructuralUnitProperty); //$NON-NLS-1$
+		try {
+			values = selectedStructuralUnitProperty.getOrderedValues(corpus);
+			Collections.sort(values);
+		} catch (CqiClientException e) {
+			Log.severe(Messages.ObjectExplorer_9
+					+ Log.toString(e));
+			return;
+		}
+
+
+		valueCombo.setInput(values);
+		
+		if (valueCombo.getList().getItemCount() > 0) {
+			valueCombo.getList().select(0);
+			selectedValues = new ArrayList<String>();
+			selectedValues.add(valueCombo.getList().getItem(0));
+		}
+		GridData data = new GridData(GridData.FILL_BOTH);
+		data.heightHint = 10 * valueCombo.getList().getItemHeight();
+		valueCombo.getList().setLayoutData(data);
+		valueCombo.getList().getParent().layout();
+	}
+
+	/**
+	 * Reload properties.
+	 */
+	protected void reloadProperties() {
+
+		selectedStructuralUnit = structuralUnitsFinal.get(structuralUnitsCombo
+				.getSelectionIndex());
+
+		selectableStructuralUnitProperties = 
+				new ArrayList<StructuralUnitProperty>(selectedStructuralUnit.getOrderedProperties());
+		for (int i = 0 ; i < selectableStructuralUnitProperties.size() ; i++) {
+			StructuralUnitProperty property = selectableStructuralUnitProperties.get(i);
+			if ("text_base".equals(property.getFullName()) || //$NON-NLS-1$
+					"text_project".equals(property.getFullName())) //$NON-NLS-1$
+				selectableStructuralUnitProperties.remove(i);
+		}
+		propertyCombo.removeAll();
+		for (StructuralUnitProperty property : selectableStructuralUnitProperties) {
+			propertyCombo.add(property.getName());
+		}
+
+		if (selectedStructuralUnit.getName().equals("text")) { //$NON-NLS-1$
+			String[] items = propertyCombo.getItems();
+			for (int i = 0 ; i < items.length ; i++) {
+				if (items[i].equals("id")) { //$NON-NLS-1$
+					propertyCombo.select(i);
+					break;
+				}
+			}
+		} else {
+			propertyCombo.select(0);
+		}
+		reloadValues();
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/SimpleSubcorpusPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ComplexSortSelector.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ComplexSortSelector.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ComplexSortSelector.java	(revision 324)
@@ -0,0 +1,234 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.txm.functions.concordances.comparators.CompositeComparator;
+import org.txm.functions.concordances.comparators.LineComparator;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.utils.Logger;
+// TODO: Auto-generated Javadoc
+/**
+ * allow to build a Composite sorter of 1 to 4 keys @ author mdecorde.
+ */
+public class ComplexSortSelector extends Composite {
+
+	/** The standard comparators. */
+	HashMap<String, LineComparator> standardComparators = new HashMap<String, LineComparator>();
+	
+	/** The comparators names. */
+	List<String> comparatorsNames;
+
+	/** The editor. */
+	ConcordancesEditor editor;
+	
+	/** The default comparator. */
+	CompositeComparator defaultComparator;
+
+	/** The first key. */
+	Combo firstKey;
+	
+	/** The second key. */
+	Combo secondKey;
+	
+	/** The third key. */
+	Combo thirdKey;
+	
+	/** The fourth key. */
+	Combo fourthKey;
+
+	/**
+	 * Instantiates a new complex sort selector.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 */
+	public ComplexSortSelector(Composite parent, int style) {
+		super(parent, style);
+		GridLayout gl = new GridLayout(10, false);
+		gl.marginWidth = 0;
+		gl.marginLeft = 0;
+		gl.marginRight = 0;
+		this.setLayout(gl);
+
+		SelectionListener listener = new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				updateDefaultComparator();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		};
+		new Label(this, SWT.NONE).setText(Messages.ComplexSortSelector_0);
+		new Label(this, SWT.NONE).setText("#1"); //$NON-NLS-1$
+		firstKey = new Combo(this, SWT.NONE | SWT.READ_ONLY);
+		//firstKey.addSelectionListener(listener);
+		GridData griddata = new GridData(GridData.FILL, GridData.FILL, false,
+				true);
+		griddata.widthHint = 100;
+		firstKey.setLayoutData(griddata);
+
+		new Label(this, SWT.NONE).setText("#2"); //$NON-NLS-1$
+		secondKey = new Combo(this, SWT.NONE | SWT.READ_ONLY);
+		//secondKey.addSelectionListener(listener);
+		secondKey.setLayoutData(griddata);
+
+		new Label(this, SWT.NONE).setText("#3"); //$NON-NLS-1$
+		thirdKey = new Combo(this, SWT.NONE | SWT.READ_ONLY);
+		//thirdKey.addSelectionListener(listener);
+		thirdKey.setLayoutData(griddata);
+
+		new Label(this, SWT.NONE).setText("#4"); //$NON-NLS-1$
+		fourthKey = new Combo(this, SWT.NONE | SWT.READ_ONLY);
+		//fourthKey.addSelectionListener(listener);
+		fourthKey.setLayoutData(griddata);
+		
+		Button sortButton = new Button(this, SWT.PUSH);
+		sortButton.setText(Messages.ComplexSortSelector_2);
+		sortButton.addSelectionListener(listener);
+		
+	}
+
+	/**
+	 * Update default comparator.
+	 */
+	public void updateDefaultComparator() {
+		try {
+			ArrayList<LineComparator> comp = new ArrayList<LineComparator>();
+			comp.add(standardComparators.get(firstKey.getText()));
+			comp.add(standardComparators.get(secondKey.getText()));
+			comp.add(standardComparators.get(thirdKey.getText()));
+			comp.add(standardComparators.get(fourthKey.getText()));
+			defaultComparator.setComparators(comp);
+			System.out.println(Messages.ComplexSortSelector_1+comp);
+			editor.resetSortedColumn(firstKey.getSelectionIndex());
+			editor.setCurrentComparator(defaultComparator);
+			editor.sort();
+		} catch (Exception e) {
+			System.err.println(NLS.bind(Messages.ComplexSortSelector_5, e));
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+	
+	/**
+	 * Sets the key.
+	 *
+	 * @param no the new key
+	 */
+	public void setKey(int no)
+	{
+		firstKey.select(no);
+		secondKey.select(0);
+		thirdKey.select(0);
+		fourthKey.select(0);
+		
+	}
+
+	/**
+	 * Sets the comparators.
+	 *
+	 * @param editor the new comparators
+	 */
+	public void setComparators(ConcordancesEditor editor) {
+		this.editor = editor;
+
+		List<LineComparator> standardComparatorslist = editor
+				.getStandardComparators();
+		comparatorsNames = new ArrayList<String>(standardComparatorslist.size());
+		String[] tcomparatorsNames = new String[standardComparatorslist.size()];
+		for (int i = 0; i < standardComparatorslist.size(); i++) {
+			LineComparator comparator = standardComparatorslist.get(i);
+			comparatorsNames.add(comparator.getName());
+			tcomparatorsNames[i] = comparator.getName();
+			this.standardComparators.put(comparator.getName(), comparator);
+		}
+
+		firstKey.setItems(tcomparatorsNames);
+		secondKey.setItems(tcomparatorsNames);
+		thirdKey.setItems(tcomparatorsNames);
+		fourthKey.setItems(tcomparatorsNames);
+
+		List<LineComparator> userDefinedComparators = editor
+				.getUserDefinedComparators();
+		for (LineComparator c : userDefinedComparators) {
+			if (c.getName().equals(Messages.ComplexSortSelector_6)) {
+				defaultComparator = (CompositeComparator) c;
+				List<LineComparator> comp = defaultComparator.getComparators();
+				if (comp.size() >= 4) {
+					firstKey.select(comparatorsNames.indexOf(comp.get(0)));
+					secondKey.select(comparatorsNames.indexOf(comp.get(1)));
+					thirdKey.select(comparatorsNames.indexOf(comp.get(2)));
+					fourthKey.select(comparatorsNames.indexOf(comp.get(3)));
+				} else if (comp.size() >= 3) {
+					firstKey.select(comparatorsNames.indexOf(comp.get(0)));
+					secondKey.select(comparatorsNames.indexOf(comp.get(1)));
+					thirdKey.select(comparatorsNames.indexOf(comp.get(2)));
+					fourthKey.select(comparatorsNames.indexOf(comp.get(2)));
+				} else if (comp.size() == 2) {
+					firstKey.select(comparatorsNames.indexOf(comp.get(0)));
+					secondKey.select(comparatorsNames.indexOf(comp.get(1)));
+					thirdKey.select(comparatorsNames.indexOf(comp.get(1)));
+					fourthKey.select(comparatorsNames.indexOf(comp.get(1)));
+				} else if (comp.size() == 1) {
+					firstKey.select(comparatorsNames.indexOf(comp.get(0)));
+					secondKey.select(comparatorsNames.indexOf(comp.get(0)));
+					thirdKey.select(comparatorsNames.indexOf(comp.get(0)));
+					fourthKey.select(comparatorsNames.indexOf(comp.get(0)));
+				}
+				return;
+			}
+		}
+
+		// no default comparator found -> create one
+		defaultComparator = new CompositeComparator(
+				Messages.ComplexSortSelector_6, standardComparatorslist);
+		firstKey.select(0);
+		secondKey.select(0);
+		thirdKey.select(0);
+		fourthKey.select(0);
+		editor.getUserDefinedComparators().add(defaultComparator);
+		editor.setCurrentComparator(defaultComparator);
+		editor.sort();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ComplexSortSelector.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/preferences/TXMDirectoryFieldEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/preferences/TXMDirectoryFieldEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/preferences/TXMDirectoryFieldEditor.java	(revision 324)
@@ -0,0 +1,59 @@
+package org.txm.rcp.swt.widget.preferences;
+
+import java.awt.Desktop;
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.txm.utils.logger.Log;
+
+public class TXMDirectoryFieldEditor extends DirectoryFieldEditor {
+
+	Button openModelDirectoryButton;
+	
+	public TXMDirectoryFieldEditor() {
+		// TODO Auto-generated constructor stub
+	}
+
+	public TXMDirectoryFieldEditor(String name, String labelText,
+			Composite parent) {
+		super(name, labelText, parent);
+		
+		GridLayout gl = (GridLayout) parent.getLayout();
+		//System.out.println("GL size "+gl.numColumns);
+		setChangeButtonText("..."); //$NON-NLS-1$
+		
+		Button changeButton = getChangeControl(parent);
+		changeButton.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false));
+		
+		openModelDirectoryButton = new Button(parent, SWT.PUSH);
+		openModelDirectoryButton.setText("Open...");
+		openModelDirectoryButton.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false));
+		openModelDirectoryButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				try {
+					Desktop.getDesktop().open(new File(getTextControl().getText()));
+				} catch (IOException e1) {
+					System.out.println("Error while opening model path directory: "+e1); //$NON-NLS-1$
+					Log.printStackTrace(e1);
+				}
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {}
+		});
+	}
+	
+	@Override
+	public int getNumberOfControls() {
+		return super.getNumberOfControls() + 1;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/preferences/TXMDirectoryFieldEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/MultipleSelectionCombo.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/MultipleSelectionCombo.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/MultipleSelectionCombo.java	(revision 324)
@@ -0,0 +1,138 @@
+package org.txm.rcp.swt.widget;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.ShellAdapter;
+import org.eclipse.swt.events.ShellEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * http://www.ibm.com/developerworks/cn/opensource/os-cn-swtmulti/index.html?ca=drs-cn-1022
+ */
+public class MultipleSelectionCombo extends Composite {
+	Text displayText = null;
+	String[] comboItems = null;
+	int[] comboSelection = null;
+	Shell floatShell = null;
+	List list = null;
+	Button dropButton = null;
+	public MultipleSelectionCombo(Composite parent, String[] items,
+			int[] selection, int style) {
+		super(parent, style);
+		comboSelection = selection;
+		comboItems = items;
+		init();
+	}
+	private void init() {
+		GridLayout layout = new GridLayout();
+		layout.marginBottom = 0;
+		layout.marginTop = 0;
+		layout.marginLeft = 0;
+		layout.marginRight = 0;
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		setLayout(layout);
+		displayText = new Text(this, SWT.BORDER);
+		displayText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		displayText.addMouseListener(new MouseAdapter() {
+			public void mouseDown(MouseEvent event) {
+				super.mouseDown(event);
+				initFloatShell();
+			}
+		});
+	}
+	private void initFloatShell() {
+		Point p = displayText.getParent().toDisplay(displayText.getLocation());
+		Point size = displayText.getSize();
+		Rectangle shellRect = new Rectangle(p.x, p.y + size.y, size.x, 0);
+		floatShell = new Shell(MultipleSelectionCombo.this.getShell(),
+				SWT.NO_TRIM);
+		GridLayout gl = new GridLayout();
+		gl.marginBottom = 2;
+		gl.marginTop = 2;
+		gl.marginRight = 0;
+		gl.marginLeft = 0;
+		gl.marginWidth = 0;
+		gl.marginHeight = 0;
+		floatShell.setLayout(gl);
+		list = new List(floatShell, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL
+				| SWT.V_SCROLL);
+		for (String value : comboItems) {
+			list.add(value);
+		}
+		list.setSelection(comboSelection);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		list.setLayoutData(gd);
+		floatShell.setSize(shellRect.width, 100);
+		floatShell.setLocation(shellRect.x, shellRect.y);
+		list.addMouseListener(new MouseAdapter() {
+			public void mouseUp(MouseEvent event) {
+				super.mouseUp(event);
+				comboSelection = list.getSelectionIndices();
+				if ((event.stateMask & SWT.CTRL) == 0) {
+					floatShell.dispose();
+					displayText();
+				}
+			}
+		});
+		list.addKeyListener(new KeyListener() {
+			
+			@Override
+			public void keyReleased(KeyEvent e) {}
+			
+			@Override
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
+					comboSelection = list.getSelectionIndices();
+					
+						floatShell.dispose();
+						displayText();
+					
+				}
+			}
+		});
+		floatShell.addShellListener(new ShellAdapter() {
+			public void shellDeactivated(ShellEvent arg0) {
+				if (floatShell != null && !floatShell.isDisposed()) {
+					comboSelection = list.getSelectionIndices();
+					displayText();
+					floatShell.dispose();
+				}
+			}
+		});
+		floatShell.open();
+	}
+	private void displayText() {
+		if (comboSelection != null && comboSelection.length > 0) {
+			StringBuffer sb = new StringBuffer();
+			for (int i = 0; i < comboSelection.length; i++) {
+				if (i > 0)
+					sb.append(",");
+				sb.append(comboItems[comboSelection[i]]);
+			}
+			displayText.setText(sb.toString());
+		} else {
+			displayText.setText("");
+		}
+	}
+	public void setText(String text) {
+		displayText.setText(text);
+	}
+	public String getText() {
+		return displayText.getText();
+	}
+	public Text getTextWidget() {
+		return displayText;
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/MultipleSelectionCombo.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PartitionComposer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PartitionComposer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PartitionComposer.java	(revision 324)
@@ -0,0 +1,626 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.txm.core.messages.TXMCoreMessages;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.searchengine.cqp.corpus.query.QueryPart;
+// TODO: Auto-generated Javadoc
+/**
+ * used for assisted mode of partition creation @ author mdecorde.
+ */
+public class PartitionComposer extends Composite {
+
+	/** The self. */
+	PartitionComposer self;
+	
+	/** The struct combo. */
+	Combo structCombo;
+	
+	/** The prop combo. */
+	Combo propCombo;
+	
+	/** The available list. */
+	org.eclipse.swt.widgets.List availableList;
+
+	/** The parts. */
+	List<PartItem> parts = new ArrayList<PartItem>();
+
+	/** The corpus. */
+	Corpus corpus;
+	
+	/** The structure. */
+	StructuralUnit structure;
+	
+	/** The property. */
+	StructuralUnitProperty property;
+
+	/** The btn area. */
+	Composite parent, partArea, firstArea, dispoArea, btnArea;
+
+	private ScrolledComposite sc1;
+
+	/**
+	 * Instantiates a new partition composer.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 * @param corpus the corpus
+	 */
+	public PartitionComposer(Composite parent, int style, Corpus corpus) {
+		super(parent, style);
+		self = this;
+		this.setLayout(new GridLayout(1, true));
+		this.corpus = corpus;
+
+		firstArea = new Composite(this, SWT.NONE);
+		firstArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+		dispoArea = new Composite(this, SWT.NONE);
+		dispoArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+		btnArea = new Composite(this, SWT.NONE);
+		btnArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+				false));
+		
+		sc1 = new ScrolledComposite(this, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+		sc1.setLayout(new GridLayout(1, true));
+		sc1.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+		sc1.setExpandHorizontal( true );
+		sc1.setExpandVertical( true );
+		sc1.setMinSize( 0, 250 );
+		
+		partArea = new Composite(sc1, SWT.NONE);
+		sc1.setContent(partArea);
+		partArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+				true));
+
+		// struct&prop
+		RowLayout layout = new RowLayout();
+		layout.center = true;
+		firstArea.setLayout(layout);
+		Label structLabel = new Label(firstArea, SWT.NONE);
+		structLabel.setText(Messages.PartitionComposer_0);
+		structCombo = new Combo(firstArea, SWT.READ_ONLY | SWT.SINGLE);
+		try {
+			List<StructuralUnit> sus = corpus.getOrderedStructuralUnits();
+			Collections.sort(sus);
+			for (StructuralUnit su : sus) {
+				if (su.getName().equals("txmcorpus")) continue;
+				structCombo.add(su.getName());
+			}
+			getStructure();
+		} catch (CqiClientException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+			return;
+		}
+
+		if (structCombo.getItemCount() > 0) {
+			structCombo.select(0);
+			String[] items = structCombo.getItems();
+			for(int i = 0 ; i < items.length ; i++)
+				if (items[i].equals("text")) //$NON-NLS-1$
+				{
+					structCombo.select(i);
+					break;
+				}
+		}
+
+		structCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				reloadProperties();
+				updateDisplay();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		Label propLabel = new Label(firstArea, SWT.NONE);
+		propLabel.setText(TXMCoreMessages.PROPERTY_1);
+
+		propCombo = new Combo(firstArea, SWT.READ_ONLY | SWT.SINGLE);
+		reloadProperties();
+
+		propCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				reloadPropertyValues();
+				updateDisplay();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// dispo
+		GridLayout layout2 = new GridLayout(2, false);
+		dispoArea.setLayout(layout2);
+		Label dispoLabel = new Label(dispoArea, SWT.NONE);
+		dispoLabel.setText(Messages.PartitionComposer_2);
+		dispoLabel.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				false, false));
+		availableList = new org.eclipse.swt.widgets.List(dispoArea, SWT.MULTI
+				| SWT.READ_ONLY | SWT.V_SCROLL | SWT.BORDER);
+		GridData data = new GridData(GridData.FILL, GridData.FILL, true, true);
+		data.heightHint = 10 * availableList.getItemHeight();
+		availableList.setLayoutData(data);
+		reloadPropertyValues();
+
+		// btn
+		btnArea.setLayout(new RowLayout());
+		Button addPart = new Button(btnArea, SWT.PUSH);
+		addPart.setText(Messages.PartitionComposer_3);
+		addPart.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				//System.out.println(Messages.PartitionComposer_4);
+				PartItem p = new PartItem(partArea, SWT.BORDER, self);
+				GridData gdata = new GridData(GridData.FILL, GridData.FILL, true, true);
+				gdata.minimumHeight = 200;
+				p.setLayoutData(gdata);
+				p.setTitle(Messages.PartitionComposer_5 + (parts.size() + 1));
+				parts.add(p);
+				partArea.layout(true);
+				updateDisplay();
+				sc1.setMinSize(partArea.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+		Button rmvPart = new Button(btnArea, SWT.PUSH);
+		rmvPart.setText(Messages.PartitionComposer_6);
+		rmvPart.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				for (PartItem p : parts) {
+					for (String s : p.getColumns())
+						self.add(s);
+					p.dispose();
+				}
+				availableList.update();
+				parts.clear();
+				updateDisplay();
+				sc1.setMinSize(partArea.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+		// parts
+		partArea.setLayout(new GridLayout(3, false));
+		PartItem p = new PartItem(partArea, SWT.BORDER, self);
+		GridData gdata = new GridData(GridData.FILL, GridData.FILL, true, true);
+		gdata.minimumHeight = 200;
+		p.setLayoutData(gdata);
+		p.setTitle(Messages.PartitionComposer_5 + (parts.size() + 1));
+		parts.add(p);
+
+	}
+
+	/**
+	 * Update display.
+	 */
+	public void updateDisplay() {
+		firstArea.layout();
+		dispoArea.layout();
+		partArea.layout();
+		btnArea.layout();
+		super.getParent().layout();
+		super.getParent().getParent().layout();
+	}
+
+	/**
+	 * Reload properties.
+	 */
+	protected void reloadProperties() {
+		if (propCombo == null) return;
+		
+		propCombo.removeAll();
+		StructuralUnit su = getStructure();
+		List<StructuralUnitProperty> sups = su.getOrderedProperties();
+		Collections.sort(sups);
+		for (StructuralUnitProperty sup : sups) {
+			if (su.getName().equals("text") && (sup.getName().equals("base") || sup.getName().equals("project")) ) continue;
+			
+			propCombo.add(sup.getName());
+		}
+		
+		if (propCombo.getItemCount() > 0) {
+			propCombo.select(0);
+			String[] items = propCombo.getItems();
+			for (int i = 0 ; i < items.length ; i++)
+				if (items[i].equals("id")) { //$NON-NLS-1$
+					propCombo.select(i);
+					break;
+				}
+		}
+		propCombo.layout();
+
+		reloadPropertyValues();
+	}
+
+	/**
+	 * Removes the.
+	 *
+	 * @param values the values
+	 */
+	protected void remove(List<String> values) {
+		for (String s : values)
+			this.availableList.remove(s);
+		availableList.update();
+	}
+
+	/**
+	 * Adds the.
+	 *
+	 * @param s the s
+	 */
+	protected void add(String s) {
+		this.availableList.add(s);
+		availableList.update();
+	}
+
+	/**
+	 * Reload property values.
+	 */
+	private void reloadPropertyValues() {
+		if (availableList == null) return;
+		
+		String[] items;
+		availableList.removeAll();
+		try {
+			List<String> plist = getProperty().getOrderedValues(this.corpus);
+			Collections.sort(plist);
+			items = new String[plist.size()];
+			for (int i = 0; i < plist.size(); i++) {
+				items[i] = plist.get(i);
+			}
+		} catch (CqiClientException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+			return;
+		}
+
+		availableList.setItems(items);
+		availableList.setSize(400, 300);
+
+		for (PartItem p : parts) {
+			p.removeAll();
+		}
+		
+		availableList.update();
+		self.layout(true);
+		self.getParent().layout(true);
+	}
+
+	/**
+	 * Gets the structure.
+	 *
+	 * @return the structure
+	 */
+	public StructuralUnit getStructure() {
+		try {
+			int index = structCombo.getSelectionIndex();
+			if (index < 0)
+				if (structCombo.getItemCount() > 0)
+					index = 0;
+				else
+					return null;
+			structure = corpus.getStructuralUnit(structCombo.getItem(index));
+		} catch (CqiClientException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+			return null;
+		}
+		return structure;
+	}
+
+	/**
+	 * Gets the property.
+	 *
+	 * @return the property
+	 */
+	public StructuralUnitProperty getProperty() {
+		if (getStructure() == null)
+			return null;
+		int index = propCombo.getSelectionIndex();
+		if (index < 0)
+			if (propCombo.getItemCount() > 0)
+				index = 0;
+			else
+				return null;
+		property = structure.getProperty(propCombo.getItem(index));
+		return property;
+	}
+
+	/**
+	 * Gets the part queries.
+	 *
+	 * @return the part queries
+	 */
+	public List<String> getPartQueries() {
+		ArrayList<String> queries = new ArrayList<String>();
+		for (PartItem p : parts)
+			queries.add(p.getQuery());
+		return queries;
+	}
+
+	/**
+	 * Gets the selection.
+	 *
+	 * @return the selection
+	 */
+	public List<String> getSelection() {
+		return Arrays.asList(availableList.getSelection());
+	}
+
+	/**
+	 * The Class PartItem.
+	 */
+	class PartItem extends Composite {
+		
+		/** The composer. */
+		PartitionComposer composer;
+		
+		/** The columns. */
+		org.eclipse.swt.widgets.List columns;
+		
+		/** The title. */
+		Text title;
+		
+		/** The self p. */
+		PartItem selfP;
+
+		/**
+		 * Instantiates a new part item.
+		 *
+		 * @param parent the parent
+		 * @param style the style
+		 * @param _composer the _composer
+		 */
+		public PartItem(Composite parent, int style, PartitionComposer _composer) {
+			super(parent, style);
+			selfP = this;
+			this.composer = _composer;
+			this.setLayout(new GridLayout(4, false));
+
+			Label titleLabel = new Label(this, SWT.NONE);
+			titleLabel.setLayoutData(new GridData(GridData.FILL,
+					GridData.CENTER, false, false, 1, 1));
+			titleLabel.setText(Messages.PartitionComposer_8);
+			Font f = titleLabel.getFont();
+			FontData defaultFont = f.getFontData()[0];
+			defaultFont.setStyle(SWT.BOLD);
+			Font newf = new Font(titleLabel.getDisplay(), defaultFont);
+			titleLabel.setFont(newf);
+
+			title = new Text(this, SWT.BORDER);
+			title.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, false, 2, 1));
+
+			Button delete = new Button(this, SWT.PUSH);
+			delete.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE));
+			delete.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					false, false, 1, 1));
+			delete.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					PartItem p = selfP;
+
+					for (String s : p.getColumns())
+						self.add(s);
+					parts.remove(selfP);
+					p.dispose();
+
+					availableList.update();
+					updateDisplay();
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {
+				}
+			});
+			Button add = new Button(this, SWT.PUSH);
+			add.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+					false, 2, 1));
+			add.setText(Messages.PartitionComposer_9);
+			add.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					//System.out.println(Messages.bind(Messages.PartitionComposer_10, composer.getSelection()));
+					for (String s : composer.getSelection())
+						columns.add(s);
+					composer.remove(composer.getSelection());
+					layout(true);
+					if (composer.availableList.getItemCount() > 0)
+						composer.availableList.select(0);
+					composer.layout(true);
+					updateDisplay();
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {
+				}
+			});
+
+			Button rmv = new Button(this, SWT.PUSH);
+			rmv.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+					false, 2, 1));
+			rmv.setText(Messages.PartitionComposer_11);
+			rmv.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					//System.out.println(Messages.bind(Messages.PartitionComposer_12, getSelection()));
+					for (String s : getSelection())
+						composer.add(s);
+
+					for (String s : getSelection())
+						columns.remove(s);
+					layout(true);
+					composer.layout(true);
+					composer.getParent().layout(true);
+					availableList.update();
+					updateDisplay();
+
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {
+				}
+			});
+
+			columns = new org.eclipse.swt.widgets.List(this, SWT.MULTI
+					| SWT.READ_ONLY | SWT.BORDER | SWT.V_SCROLL);
+			columns.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, true, 4, 1));
+			columns.setSize(200, 300);
+		}
+
+		/**
+		 * Removes the all.
+		 */
+		public void removeAll() {
+			columns.removeAll();
+		}
+
+		/**
+		 * Sets the title.
+		 *
+		 * @param string the new title
+		 */
+		public void setTitle(String string) {
+			this.title.setText(string);
+		}
+
+		/**
+		 * Gets the columns.
+		 *
+		 * @return the columns
+		 */
+		public String[] getColumns() {
+			return columns.getItems();
+		}
+
+		/**
+		 * Gets the query.
+		 *
+		 * @return the query
+		 */
+		public String getQuery() {
+			return getSelection().toString();
+		}
+
+		/**
+		 * Gets the selection.
+		 *
+		 * @return the selection
+		 */
+		public List<String> getSelection() {
+			return Arrays.asList(columns.getSelection());
+		}
+	}
+
+	/**
+	 * Gets the partition.
+	 *
+	 * @return the partition
+	 */
+	public Partition getPartition() {
+		if (this.parts.size() == 0) {
+			System.out.println(Messages.PartitionComposer_1);
+			return null;
+		}
+		
+		List<String> queries = new ArrayList<String>();
+		List<String> partnames = new ArrayList<String>();
+		for (PartItem part : this.parts) {
+			if (part.columns.getItemCount() > 0) {
+				String value = ""; //$NON-NLS-1$
+				for (String s : part.columns.getItems())
+					value += Query.addBackSlash(s) + "|"; //$NON-NLS-1$
+				value = value.substring(0, value.length() - 1);
+				QueryPart q = new QueryPart(structure, property, value);
+				queries.add(q.getQueryString());
+				partnames.add(part.title.getText());
+			}
+		}
+
+		try {
+			Partition p = corpus.createPartition("", queries, partnames); //$NON-NLS-1$
+			return p;
+		} catch (CqiClientException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return null;
+	}
+
+	/**
+	 * Checks for unassigned.
+	 *
+	 * @return true, if successful
+	 */
+	public boolean hasUnassigned() {
+		return this.availableList.getItemCount() > 0;
+	}
+
+	public String getGeneratedName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PartitionComposer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/BooleanField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/BooleanField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/BooleanField.java	(revision 324)
@@ -0,0 +1,40 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.kohsuke.args4j.NamedOptionDef;
+
+/**
+ * Check button + Label
+ * @author mdecorde
+ *
+ */
+public class BooleanField extends LabelField {
+	
+	Button dt;
+	
+	public BooleanField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+		
+		dt = new Button(this, SWT.CHECK);
+		dt.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		//dt.setText(getWidgetLabel().replace(":", ""));
+		dt.setToolTipText(getWidgetUsage());
+		dt.setSelection("true".equals(getWidgetDefault())); //$NON-NLS-1$
+	}
+
+	public Boolean getWidgetValue() {
+		return dt.getSelection();
+	}
+	
+	public void setDefault(String text) {
+		dt.setSelection("true".equals(text));
+	}
+
+	@Override
+	public void resetToDefault() {
+		dt.setSelection("true".equals(getWidgetDefault())); //$NON-NLS-1$
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/BooleanField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FileField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FileField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FileField.java	(revision 324)
@@ -0,0 +1,69 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Text;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public class FileField extends LabelField {
+	Text t;
+	public FileField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+
+		this.setLayout(new GridLayout(3, false)); // has 3 cells
+		
+		t = new Text(this, SWT.SINGLE | SWT.BORDER);
+		t.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		resetToDefault();
+		
+		Button b = new Button(this, SWT.PUSH);
+		b.setText("..."); //$NON-NLS-1$
+		b.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String  value = null;
+				FileDialog d = new FileDialog(FileField.this.getShell());
+				try {
+					File f = new File(t.getText()).getCanonicalFile();
+					System.out.println(f);
+					d.setFilterPath(f.getParent());
+					d.setFileName(f.getName());
+				} catch (IOException e1) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
+				}
+				
+				value = d.open();
+				if (value != null) t.setText(value);
+			}
+		});
+	}
+
+	public File getWidgetValue() {
+		String value = t.getText();
+		if (value != null && value.trim().length() > 0) {
+			File ret = new File(value.trim());
+			return ret;
+		}
+		return null;
+	}
+	
+	
+	public void setDefault(String text) {
+		t.setText(text);
+	}
+
+	@Override
+	public void resetToDefault() {
+		t.setText(getWidgetDefault());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FileField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/LabelField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/LabelField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/LabelField.java	(revision 324)
@@ -0,0 +1,39 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.kohsuke.args4j.NamedOptionDef;
+
+/**
+ * Check button + Label
+ * @author mdecorde
+ *
+ */
+public abstract class LabelField extends ParameterField {
+	
+	Label l;
+	
+	public LabelField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+		this.setLayout(new GridLayout(2, false));
+		this.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
+		
+		l = new Label(this, SWT.NONE);
+		l.setAlignment(SWT.RIGHT);
+		l.setText(getWidgetLabel());
+		l.setToolTipText(getWidgetUsage());
+		GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		gd.widthHint = 100;
+		l.setLayoutData(gd);
+	}
+
+	public Object getWidgetValue() {
+		return null;
+	}
+	
+	@Override
+	public abstract void setDefault(String value);
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/LabelField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java	(revision 324)
@@ -0,0 +1,466 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.kohsuke.args4j.CmdLineParser;
+import org.kohsuke.args4j.NamedOptionDef;
+import org.kohsuke.args4j.spi.OptionHandler;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.utils.logger.Log;
+
+@SuppressWarnings("rawtypes")
+public class ParametersDialog extends Dialog {
+	Object bean;
+	String script;
+	String title;
+
+	List<NamedOptionDef> parameters;	
+	List<String> fieldNames = new ArrayList<String>(); // store all the declared parameters names 
+	LinkedHashMap<String, ParameterField> widgets = new LinkedHashMap<String, ParameterField>();
+	protected boolean error = false;
+	protected Map args; // store values given by another Macro, if contains all the needed values, no dialog is shown
+	protected int numberOfParameters; // number of parameters to show in the dialog box (not set by 'args'), if 0 parameters no dialog is shown
+	protected boolean mustShowDialog; // show dialog if args.size == 0 OR if there is at least one mandatory field to set
+
+	HashMap<String, Object> values = new HashMap<String, Object>(); // store the values of the parameters (may not contains all the values needed
+	Properties defaultValues; // default values set by the .properties file
+	Properties defaultScriptValues = new Properties(); // default values set by the Groovy script @Field@def annotation attribute
+
+	File propFile;
+	//	private int titleWidth;
+	//	private Composite parent;
+
+	/**
+	 * 
+	 * @param parentShell
+	 * @param bean
+	 * @param allParameters all the scripts annotations
+	 * @param args pre-filled fields
+	 */
+	public ParametersDialog(Shell parentShell, Object bean, List<OptionHandler> allParameters, Map args) {
+		super(parentShell);
+		if (bean != null)
+			this.script = bean.getClass().getName();
+		this.parameters = new ArrayList<NamedOptionDef>();
+		this.bean = bean;
+		this.args = args;
+		setShellStyle(getShellStyle() | SWT.RESIZE);
+
+		// count the number of fields to show. If "0" then don't show the dialog, see the "open()" function
+		// and select only the NamedOptionDef annotations
+		numberOfParameters = 0; // number of parameters not set by args
+		int numberOfMandatoryFields = 0;
+		for (OptionHandler arg : allParameters) {
+			if (arg.option instanceof NamedOptionDef) {
+				NamedOptionDef option = (NamedOptionDef)arg.option;
+				this.parameters.add(option);
+				fieldNames.add(option.name());
+				if (args.containsKey(option.name())) {
+					continue; // don't show the field
+				}
+				if (option.required()) numberOfMandatoryFields++;
+				numberOfParameters++;
+			}
+		}
+
+		mustShowDialog = numberOfMandatoryFields > 0 || (args.size() == 0 && numberOfParameters > 0);
+
+		// initialize the properties file default values store
+		defaultValues = new Properties();
+		String scriptRootDir = Toolbox.getParam(TBXPreferences.USER_TXM_HOME) + "/scripts"; //$NON-NLS-1$
+		File currentRootDir = new File(scriptRootDir, "macro"); //$NON-NLS-1$
+
+		propFile = new File(currentRootDir, this.script.replace(".", "/")+".properties");
+
+		if (propFile.exists()) {
+			try {
+				defaultValues.load(new FileReader(propFile));
+				Log.info("Retrieve previous macro parameters from "+propFile+" values="+defaultValues.entrySet());
+			} catch (Exception e) {
+				System.out.println("Failed to load previous values from "+propFile+": "+e);
+				Log.printStackTrace(e);
+			}
+		}
+
+		//initialize the script defautl values
+		for (NamedOptionDef option : this.parameters) {
+			String widgetName = option.widget();
+			String stringValue = option.def();
+			Object value = null;
+			if ("File".equals(widgetName) || "FileOpen".equals(widgetName)) { //$NON-NLS-1$
+				value = new File(stringValue);
+			} else if ("CreateFile".equals(widgetName) || "FileSave".equals(widgetName)) { //$NON-NLS-1$
+				value = new File(stringValue);
+			} else if ("Folder".equals(widgetName)) { //$NON-NLS-1$
+				value = new File(stringValue);
+			} else if ("Query".equals(widgetName)) { //$NON-NLS-1$
+				value = new Query(stringValue);
+			} else if ("Date".equals(widgetName)) { //$NON-NLS-1$
+				try {
+					value = DateField.formater.parse(stringValue);
+				} catch (ParseException e) {
+					System.out.println("Wrong default date format: "+stringValue+". Waiting for: "+DateField.STRINGFORMAT+". Error = "+e);
+					value = new Date();
+				}
+			}  else if ("Time".equals(widgetName)) { //$NON-NLS-1$
+				value = Integer.parseInt(stringValue);
+			} else if ("String".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			} else if ("StringArray".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			} else if ("StringArrayMultiple".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			} else if ("StructuralUnits".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			} else if ("Text".equals(widgetName)) { //$NON-NLS-1$
+				value = stringValue;
+			} else if ("Integer".equals(widgetName)) { //$NON-NLS-1$
+				value = Integer.parseInt(stringValue);
+			} else if ("Float".equals(widgetName)) { //$NON-NLS-1$
+				value = Float.parseFloat(stringValue);
+			} else if ("Boolean".equals(widgetName)) { //$NON-NLS-1$
+				value = Boolean.parseBoolean(stringValue);
+			} else {
+				System.out.println(Messages.ParametersDialog_10+widgetName+Messages.FileTreeContentProvider_4);
+			}
+		}
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		int idx2 = script.lastIndexOf("Macro");
+		if (idx2 < 0) idx2 = script.length();
+		title = Messages.bind(Messages.ParametersDialog_0,script.substring(script.lastIndexOf(".")+1, idx2));
+		newShell.setText(title);
+	}
+
+	protected void createButtonsForButtonBar(Composite parent) {
+		//create the reset button (hack of the Back button)
+		Button button = createButton(parent, IDialogConstants.BACK_ID,
+				"Reset values", false);
+		button.removeListener(SWT.Selection, button.getListeners(SWT.Selection)[0]);
+
+		button.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				//System.out.println("Reseting fields to default values");
+				for (String k : widgets.keySet()) {
+					widgets.get(k).resetToDefault();
+				}
+			}
+		});
+		if (numberOfParameters == 0) button.setEnabled(false);
+
+		super.createButtonsForButtonBar(parent);
+		this.getButton(IDialogConstants.OK_ID).setText(Messages.ParametersDialog_1);
+	}
+
+	protected Control createButtonBar(Composite parent) {
+		Control c = super.createButtonBar(parent);
+
+		//		int barWidth = c.getSize().x;
+		//		if (barWidth > titleWidth) {
+		//			GridData cdata = (GridData)(this.parent.getLayoutData());
+		//			cdata.widthHint = barWidth;
+		//		}
+
+		return c;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite composite) {
+		//this.parent = composite;
+		super.createDialogArea(composite);
+
+		GridLayout layout = new GridLayout(1, true);
+		composite.setLayout(layout);
+
+		//TODO: this width initialization does not works : it does not depends on the buttonBar width
+		//		GridData cdata = (GridData)(composite.getLayoutData());
+		//		titleWidth = FitFontSize.calculate(composite, title) + 100;
+		//		cdata.widthHint = titleWidth;
+
+		// initialize each widget + default value *of the widget*
+		for (NamedOptionDef option : parameters) {
+			//if (arg.option instanceof NamedOptionDef) {
+
+			//NamedOptionDef option = (NamedOptionDef)arg.option;
+
+			// if the 'args' contains a value filled by another Macro, don't show the widget
+			if (args.containsKey(option.name())) {
+				//System.out.println("Args contains '"+option.name()+"' with value '"+args.get(option.name())+"'");
+				continue; // don't show the field
+			}
+
+			// each widget is initialized with de default value set in @Field@def attribute
+			String widgetName = option.widget();
+			ParameterField widget = null;
+			if ("File".equals(widgetName) || "FileOpen".equals(widgetName)) { //$NON-NLS-1$
+				widget = new FileField(composite, SWT.NONE, option);
+			} else if ("CreateFile".equals(widgetName) || "FileSave".equals(widgetName)) { //$NON-NLS-1$
+				widget = new CreateFileField(composite, SWT.NONE, option);
+			} else if ("Folder".equals(widgetName)) { //$NON-NLS-1$
+				widget = new FolderField(composite, SWT.NONE, option);
+			} else if ("Query".equals(widgetName)) { //$NON-NLS-1$
+				widget = new QueryField(composite, SWT.NONE, option);
+			} else if ("Date".equals(widgetName)) { //$NON-NLS-1$
+				widget = new DateField(composite, SWT.NONE, option);
+			}  else if ("Time".equals(widgetName)) { //$NON-NLS-1$
+				widget = new TimeField(composite, SWT.NONE, option);
+			} else if ("String".equals(widgetName)) { //$NON-NLS-1$
+				widget = new StringField(composite, SWT.NONE, option);
+			} else if ("StringArray".equals(widgetName)) { //$NON-NLS-1$
+				widget = new StringArrayField(composite, SWT.NONE, option);
+			} else if ("StringArrayMultiple".equals(widgetName)) { //$NON-NLS-1$
+				widget = new StringArrayMultipleField(composite, SWT.NONE, option);
+			} else if ("StructuralUnits".equals(widgetName)) { //$NON-NLS-1$
+				widget = new CospusStructuresField(composite, SWT.NONE, option);
+			} else if ("Text".equals(widgetName)) { //$NON-NLS-1$
+				widget = new LongStringField(composite, SWT.NONE, option);
+			} else if ("Integer".equals(widgetName)) { //$NON-NLS-1$
+				widget = new IntegerField(composite, SWT.NONE, option);
+			} else if ("Float".equals(widgetName)) { //$NON-NLS-1$
+				widget = new FloatField(composite, SWT.NONE, option);
+			} else if ("Boolean".equals(widgetName)) { //$NON-NLS-1$
+				widget = new BooleanField(composite, SWT.NONE, option);
+			} else {
+				System.out.println(Messages.ParametersDialog_10+widgetName+Messages.FileTreeContentProvider_4);
+			}
+
+			if (widget != null) {
+				widgets.put(option.name(), widget);
+
+				// set default value in the fields, not enough if args contains the value
+				String value = defaultValues.getProperty(option.name());
+				if (value != null) { // set the default value using the properties stored
+					widget.setDefault(value);
+				}
+			}
+			//			}
+		}
+		new Label(composite, SWT.NONE).setText(Messages.ParametersDialog_11);
+
+		return composite;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		error = false;
+
+		// get widget values
+		for (String field : widgets.keySet()) {
+			ParameterField w = widgets.get(field);
+			Object value = w.getWidgetValue();
+
+			if (w.isWidgetMandatory() && value == null) {
+				System.out.println(Messages.ParametersDialog_12+field);
+				error = true;
+			} else if (value != null) {
+				values.put(field, value);
+				//System.out.println(""+field+"\t"+values.get(field));
+			} // else value is not filled
+		}
+
+		//initialize variables
+		if (!error) {
+			initializeMacroVariables();
+			saveParameters();
+
+			if (!error) {
+				super.okPressed();
+			}
+		} 
+	}
+
+	private void saveParameters() {
+		if (!error) {
+			try {
+				propFile.getParentFile().mkdirs();
+				defaultValues.store(new FileWriter(propFile), "");
+			} catch (IOException e) {
+				System.out.println("Warning: failed to store default macro valuesin "+propFile+": "+e);
+				Log.printStackTrace(e);
+			}
+		}
+	}
+
+
+	/**
+	 * can use the args map to initialize variable not set with the dialog box
+	 */
+	private void initializeMacroVariables() {
+		//		System.out.println("Initialize macro variables of "+fieldNames);
+		if (bean == null) return;
+		
+		Class c = bean.getClass();
+		for (String name :fieldNames) {
+			Object value = values.get(name);
+			if (value == null) { // no widget or not set by user
+				value = defaultScriptValues.get(name);
+			}
+			if (value == null) { // no default set by script
+				value = defaultValues.get(name);
+			}
+			//System.out.println("test if args contains name="+name+" "+args.containsKey(name));
+			if (args.containsKey(name)) { // the 'args' variable may contains values set by another Macro
+				value = args.get(name);
+			} else { // store the default value only if user set it in the dialog box
+				if (value != null) {
+					defaultValues.setProperty(name, value.toString());
+				}
+			}
+
+			try {
+				//System.out.println("setting "+name+ " with "+values.get(name));
+				Field field = c.getDeclaredField(name);
+				field.setAccessible(true);
+				field.set(bean, value);
+			}  catch (Exception e) {
+				System.out.println(Messages.ParametersDialog_14+e.getMessage());
+				Log.printStackTrace(e);
+				error = true;
+			}
+
+		}
+	}
+
+
+	protected boolean isError() {
+		return error;
+	}
+
+	public HashMap<String, Object> getValues() {
+		return values;
+	}
+
+	static boolean errorOpen,retOpen;
+	/**
+	 * Conveniance method to initialize the parameters dialog.
+	 * Can detect the "args" Groovy binding and use it to set variables
+	 * If all variables are set by "args" then don't show the dialog box
+	 * 
+	 * @param bean
+	 * @return
+	 */
+	public static boolean open(final Object bean) {
+		errorOpen = true;
+		retOpen = false;
+		
+//		if (!(bean instanceof groovy.lang.Script)) {
+//			System.out.println(Messages.ParametersDialog_15);
+//			return false;
+//		}
+
+		Object oArgs = null;
+		if (bean instanceof groovy.lang.Script) {
+			groovy.lang.Script script = (groovy.lang.Script) bean;
+
+			// if the "args" variable exists then use its values. Can be used to set a default value by another Macro
+			if (script.getBinding().hasVariable("args")) {
+				oArgs = script.getBinding().getVariable("args"); //$NON-NLS-1$
+			}
+		}
+
+		final Map args;
+		if (oArgs == null || !(oArgs instanceof Map)) {
+			args = new HashMap<String, Object>();
+		} else {
+			args = (Map)oArgs;
+		}
+
+		Display.getDefault().syncExec(new Runnable() {
+			public void run() { 
+				boolean okNames = true;
+				CmdLineParser parser = new CmdLineParser(bean);
+
+				Display display = Display.getCurrent();
+				Shell shell = display.getActiveShell();
+
+				// check names
+				Class c = bean.getClass();
+				for (OptionHandler opt : parser.getOptions()) {
+					try {
+						if (opt.option instanceof NamedOptionDef) {
+							NamedOptionDef option = (NamedOptionDef)opt.option;
+							c.getDeclaredField(option.name());
+						}
+					}  catch (NoSuchFieldException e) {
+						System.out.println(Messages.ParametersDialog_14+e.getMessage());
+						okNames = false;
+					}
+				}
+				if (okNames) {
+					ParametersDialog dialog = new ParametersDialog(shell, bean, parser.getOptions(), args);
+					if (dialog.getShell() != null)
+						dialog.getShell().setActive();
+					if (dialog.getMustShowDialog()) {
+						retOpen = dialog.open() == ParametersDialog.OK;
+						errorOpen = dialog.isError();
+					} else { // fields initialized by 'args'
+						dialog.initializeMacroVariables(); // with args
+						if (dialog.getNumberOfFields() > 0) dialog.saveParameters();
+						retOpen = true;
+						errorOpen = false;
+					}
+				}
+			}
+		});
+		return retOpen && !errorOpen;
+	}
+
+	public boolean getMustShowDialog() {
+		return mustShowDialog;
+	}
+
+	protected int getNumberOfFields() {
+		return numberOfParameters;
+	}
+
+	// TODO: uncomment this to enable "args" detection  
+	//	public int open() {
+	//		System.out.println("Number of parameters: "+numberOfParameters);
+	//		if (numberOfParameters == 0) {
+	//			return ParametersDialog.OK;
+	//		} else {
+	//			return super.open();
+	//		}
+	//	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/CospusStructuresField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/CospusStructuresField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/CospusStructuresField.java	(revision 324)
@@ -0,0 +1,76 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.kohsuke.args4j.NamedOptionDef;
+import org.txm.rcp.swt.widget.MultipleSelectionCombo;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+
+
+/**
+ * Allow to select one or several structural units name of the selected corpus in the corpora view
+ * 
+ * @author mdecorde
+ *
+ */
+public class CospusStructuresField extends LabelField {
+	MultipleSelectionCombo dt;
+	public CospusStructuresField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+
+		String[] values = {};
+		int[] selection = {};
+		
+		Object sel = CorporaView.getSelection();
+		if ((sel instanceof Corpus)) {
+			Corpus c = (Corpus)sel;
+			List<StructuralUnit> l;
+			try {
+				l = new ArrayList<StructuralUnit>(c.getOrderedStructuralUnits());
+				for (int i = 0 ; i < l.size() ; i++) {
+					String name = l.get(i).getName();
+					if ("text".equals(name) || "txmcorpus".equals(name)) {
+						l.remove(i);
+						i--;
+					}
+				}
+				
+				values = new String[l.size()];
+				for (int i = 0 ; i < l.size() ; i++) {
+					values[i] = l.get(i).getName();
+				}
+				if (values.length > 0) {
+					selection = new int[1];
+					selection[0] = 0;
+				}
+			} catch (CqiClientException e) {
+				e.printStackTrace();
+			}
+		}
+		
+		dt = new MultipleSelectionCombo(this, values, selection, SWT.NONE);
+		dt.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		
+		resetToDefault();
+	}
+
+	public String getWidgetValue() {
+		return dt.getText();
+	}
+
+	public void setDefault(String text) {
+		dt.setText(text);
+	}
+
+	@Override
+	public void resetToDefault() {
+		dt.setText(getWidgetDefault());
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/CospusStructuresField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParameterField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParameterField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParameterField.java	(revision 324)
@@ -0,0 +1,36 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.widgets.Composite;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public abstract class ParameterField extends Composite implements IParameterField {
+	NamedOptionDef parameter;
+	
+	public ParameterField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style);
+		this.parameter = parameter;
+	}
+	
+	public String getWidgetName() { return parameter.name(); }
+	public String getWidgetUsage() { return parameter.usage(); }
+	public String getMetaVar() { return parameter.metaVar(); }
+	
+	/**
+	 * 
+	 * @return the default value if the Macro has not been called previously
+	 */
+	public String getWidgetDefault() { return parameter.def(); }
+	public boolean isWidgetMandatory() { return parameter.required(); }
+	public boolean isWidgetMultiValued() { return parameter.isMultiValued(); }
+	
+	public String getWidgetLabel() {
+		return getWidgetName() + ((parameter.required()) ? " *" : "") + " : "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+	
+	
+	public abstract Object getWidgetValue();
+
+	public abstract void setDefault(String value);
+
+	public abstract void resetToDefault();
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParameterField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringArrayMultipleField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringArrayMultipleField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringArrayMultipleField.java	(revision 324)
@@ -0,0 +1,36 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.kohsuke.args4j.NamedOptionDef;
+import org.txm.rcp.swt.widget.MultipleSelectionCombo;
+
+public class StringArrayMultipleField extends LabelField {
+	MultipleSelectionCombo dt;
+	public StringArrayMultipleField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+
+		String[] values = getMetaVar().trim().split("\t");
+		int[] selection = {};
+		dt = new MultipleSelectionCombo(this, values, selection, SWT.NONE);
+		dt.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		
+		//dt.setItems(values);
+		
+		resetToDefault();
+	}
+
+	public String getWidgetValue() {
+		return dt.getText();
+	}
+
+	public void setDefault(String text) {
+		dt.setText(text);
+	}
+
+	@Override
+	public void resetToDefault() {
+		dt.setText(getWidgetDefault());
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringArrayMultipleField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/LongStringField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/LongStringField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/LongStringField.java	(revision 324)
@@ -0,0 +1,45 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public class LongStringField extends ParameterField {
+	Text dt;
+	public LongStringField(Composite parent, int style, NamedOptionDef param) {
+		super(parent, style, param);
+		this.setLayout(new GridLayout(2, false));
+		this.setLayoutData(new GridData(SWT.FILL, SWT.FILL,true, true));
+		
+		Label l = new Label(this, SWT.NONE);
+		l.setAlignment(SWT.RIGHT);
+		l.setText(getWidgetLabel());
+		l.setToolTipText(getWidgetUsage());
+		GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		gd.widthHint = 100;
+		l.setLayoutData(gd);
+		
+		dt = new Text(this, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
+	    dt.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+	    dt.setSize(200, 200);
+	    resetToDefault();
+	}
+
+	public String getWidgetValue() {
+		return dt.getText();
+	}
+
+	@Override
+	public void setDefault(String value) {
+		dt.setText(value);
+	}
+
+	@Override
+	public void resetToDefault() {
+		 dt.setText(getWidgetDefault());
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/LongStringField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/UIParameterException.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/UIParameterException.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/UIParameterException.java	(revision 324)
@@ -0,0 +1,25 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.txm.rcp.Messages;
+
+public class UIParameterException extends IllegalArgumentException {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -8914778777358750878L;
+	
+	/**
+	 * If true then the parameter dialog fields went wrong
+	 */
+	private boolean error;
+
+	public UIParameterException(boolean error) {
+		super(Messages.UIParameterException_0+true);
+		this.error = error;
+	}
+	
+	
+	public boolean isError() {
+		return error;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/UIParameterException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/IParameterField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/IParameterField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/IParameterField.java	(revision 324)
@@ -0,0 +1,5 @@
+package org.txm.rcp.swt.widget.parameters;
+
+public interface IParameterField {
+	public Object getWidgetValue();
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/IParameterField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/IntegerField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/IntegerField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/IntegerField.java	(revision 324)
@@ -0,0 +1,46 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Spinner;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public class IntegerField extends LabelField {
+	Spinner dt;
+	public IntegerField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+		
+		dt = new Spinner(this, SWT.BORDER);
+		dt.setMinimum(Integer.MIN_VALUE);
+		dt.setMaximum(Integer.MAX_VALUE);
+		dt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		resetToDefault();
+	}
+
+	public Integer getWidgetValue() {
+		return dt.getSelection();
+	}
+	
+	
+	public void setDefault(String text) {
+		try {
+			dt.setSelection(Integer.parseInt(text));
+		} catch(Exception e) {
+			System.out.println("Cannot set IntegerField with default properties value="+text+": "+e);
+		}
+	}
+
+	@Override
+	public void resetToDefault() {
+		if (getWidgetDefault().length() > 0) {
+			try {
+				dt.setSelection(Integer.parseInt(getWidgetDefault()));
+			} catch (Exception e) {
+				System.out.println("Cannot set IntegerField with default value="+getWidgetDefault()+": "+e);
+			}
+		}  else {
+			dt.setSelection(0);
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/IntegerField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/TimeField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/TimeField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/TimeField.java	(revision 324)
@@ -0,0 +1,53 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import java.util.Date;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DateTime;
+import org.eclipse.swt.widgets.Label;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public class TimeField extends ParameterField {
+	DateTime dt;
+	public TimeField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+		this.setLayout(new RowLayout(SWT.HORIZONTAL));
+		this.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
+		
+		Label l = new Label(this, SWT.NONE);
+		l.setAlignment(SWT.RIGHT);
+		l.setText(getWidgetLabel());
+		l.setToolTipText(getWidgetUsage());
+		GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		gd.widthHint = 100;
+		l.setLayoutData(gd);
+		
+		dt = new DateTime(this, SWT.TIME);
+		dt.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+	}
+
+	public Date getWidgetValue() {
+		int day = dt.getDay(); // Calendar.DAY_OF_MONTH
+		int hour = dt.getHours(); // Calendar.HOUR_OF_DAY
+		int min = dt.getMinutes(); // Calendar.MINUTE
+		int month = dt.getMonth(); // Calendar.MONTH
+		int second = dt.getSeconds(); // Calendar.SECOND
+		int year = dt.getYear(); // Calendar.YEAR
+		//TODO: not implemented
+		//System.out.println("year="+year+" month="+month+" day="+day+ " hour="+hour+" min="+min+" sec="+second); 
+		return null;
+	}
+
+	@Override
+	public void setDefault(String value) {
+		//TODO: not implemented
+	}
+
+	@Override
+	public void resetToDefault() {
+		//TODO: not implemented
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/TimeField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/CreateFileField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/CreateFileField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/CreateFileField.java	(revision 324)
@@ -0,0 +1,67 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Text;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public class CreateFileField extends LabelField {
+	Text t;
+	public CreateFileField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+
+		this.setLayout(new GridLayout(3, false)); // has 3 cells
+		
+		t = new Text(this, SWT.SINGLE | SWT.BORDER);
+		t.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		t.setText(getWidgetDefault());
+		Button b = new Button(this, SWT.PUSH);
+		b.setText("..."); //$NON-NLS-1$
+		b.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String  value = null;
+				FileDialog d = new FileDialog(CreateFileField.this.getShell(), SWT.SAVE);
+				try {
+					File f = new File(t.getText()).getCanonicalFile();
+					//System.out.println(f);
+					d.setFilterPath(f.getParent());
+					d.setFileName(f.getName());
+				} catch (IOException e1) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
+				}
+				
+				value = d.open();
+				if (value != null) t.setText(value);
+			}
+		});
+	}
+
+	public File getWidgetValue() {
+		String value = t.getText();
+		if (value != null && value.trim().length() > 0) {
+			File ret = new File(value.trim());
+			return ret;
+		}
+		return null;
+	}
+	
+	public void setDefault(String text) {
+		t.setText(text);
+	}
+
+	@Override
+	public void resetToDefault() {
+		t.setText(getWidgetDefault());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/CreateFileField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringArrayField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringArrayField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringArrayField.java	(revision 324)
@@ -0,0 +1,35 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public class StringArrayField extends LabelField {
+	Combo dt;
+	public StringArrayField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+
+		dt = new Combo(this, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
+		dt.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		
+		String[] values = getMetaVar().trim().split("\t");
+		dt.setItems(values);
+		
+		resetToDefault();
+	}
+
+	public String getWidgetValue() {
+		return dt.getText();
+	}
+
+	public void setDefault(String text) {
+		dt.setText(text);
+	}
+
+	@Override
+	public void resetToDefault() {
+		dt.setText(getWidgetDefault());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringArrayField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/QueryField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/QueryField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/QueryField.java	(revision 324)
@@ -0,0 +1,54 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.kohsuke.args4j.NamedOptionDef;
+import org.txm.rcp.swt.widget.QueryWidget;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+public class QueryField extends ParameterField {
+	QueryWidget w;
+	
+	public QueryField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+		this.setLayout(new GridLayout(2, false));
+		this.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
+
+		Label l = new Label(this, SWT.NONE);
+		l.setAlignment(SWT.RIGHT);
+		l.setText(getWidgetLabel());
+		l.setToolTipText(getWidgetUsage());
+		GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		gd.widthHint = 100;
+		l.setLayoutData(gd);
+
+		w = new QueryWidget(this, SWT.BORDER);
+		w.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		resetToDefault();
+	}
+
+	public Query getWidgetValue() {
+		return w.getQuery();
+	}
+
+	@Override
+	public void setDefault(String value) {
+		w.setText(value);
+	}
+
+	@Override
+	public void resetToDefault() {
+		if (getWidgetDefault().length() > 0) {
+			try {
+				w.setText(getWidgetDefault());
+			} catch(Exception e) {
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+			}
+		} else {
+			w.setText("");
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/QueryField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FloatField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FloatField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FloatField.java	(revision 324)
@@ -0,0 +1,38 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.kohsuke.args4j.NamedOptionDef;
+import org.txm.rcp.Messages;
+
+public class FloatField extends LabelField {
+	Text dt;
+	public FloatField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+
+		dt = new Text(this, SWT.SINGLE | SWT.BORDER);
+		dt.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		resetToDefault();
+	}
+
+	public Float getWidgetValue() {
+		try {
+			return Float.parseFloat(dt.getText());
+		} catch (Exception e) { 
+			System.out.println(Messages.ApplicationWorkbenchAdvisor_29+e.getMessage());
+		}
+		return null;
+	}
+	
+	
+	public void setDefault(String text) {
+		dt.setText(text);
+	}
+
+	@Override
+	public void resetToDefault() {
+		dt.setText(getWidgetDefault());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FloatField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/AScript.groovy
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/AScript.groovy	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/AScript.groovy	(revision 324)
@@ -0,0 +1,43 @@
+package org.txm.rcp.swt.widget.parameters;
+import org.kohsuke.args4j.*
+import groovy.transform.Field
+import org.txm.rcp.swt.widget.parameters.ParametersDialog
+
+@Field @Option(name="file", usage="a file", widget="File", required=true, def="aFile.ext")
+def file
+
+@Field @Option(name="dir", usage="a directory", widget="Folder", def="TEMP")
+def dir
+
+@Field @Option(name="ii", usage="an integer", widget="Integer", def="42")
+def ii = 0
+
+@Field @Option(name="f", usage="a float", widget="Float", def="42.42")
+def f = 0
+
+@Field @Option(name="shs", usage="a one line string", widget="String", def="default value")
+def shs = 0
+
+@Field @Option(name="ls", usage="a very long string with carriage return and stuffs", widget="Text", def="default\nvalue")
+def ls = 0
+
+@Field @Option(name="q", usage="a CQL", widget="Query", def="\"je\"")
+def q
+
+@Field @Option(name="date", usage="a date", widget="Date", def="1984-09-01")
+def date
+
+@Field @Option(name="bool", usage="a boolean", widget="Boolean", def="true")
+def bool
+
+if (!ParametersDialog.open(this)) return;
+
+println " RUNNING SCRIPT" //$NON-NLS-1$
+println "file $file" //$NON-NLS-1$
+println "dir $dir" //$NON-NLS-1$
+println "ii $ii" //$NON-NLS-1$
+println "f $f" //$NON-NLS-1$
+println "shs $shs" //$NON-NLS-1$
+println "ls $ls" //$NON-NLS-1$
+println "q $q" //$NON-NLS-1$
+println "date $date" //$NON-NLS-1$
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringField.java	(revision 324)
@@ -0,0 +1,31 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public class StringField extends LabelField {
+	Text dt;
+	public StringField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+
+		dt = new Text(this, SWT.SINGLE | SWT.BORDER);
+		dt.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		resetToDefault();
+	}
+
+	public String getWidgetValue() {
+		return dt.getText();
+	}
+
+	public void setDefault(String text) {
+		dt.setText(text);
+	}
+
+	@Override
+	public void resetToDefault() {
+		dt.setText(getWidgetDefault());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/StringField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FolderField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FolderField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FolderField.java	(revision 324)
@@ -0,0 +1,58 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import java.io.File;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Text;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public class FolderField extends LabelField {
+	Text t;
+	public FolderField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+		
+		this.setLayout(new GridLayout(3, false)); // has 3 cells
+		
+		t = new Text(this, SWT.SINGLE | SWT.BORDER);
+		t.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		resetToDefault();
+		
+		Button b = new Button(this, SWT.PUSH);
+		b.setText("..."); //$NON-NLS-1$
+		b.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String  value = null;
+				DirectoryDialog d = new DirectoryDialog(FolderField.this.getShell());
+				d.setFilterPath(t.getText());
+				value = d.open();
+				if (value != null) t.setText(value);
+			}
+		});
+	}
+
+	public File getWidgetValue() {
+		String value = t.getText();
+		if (value != null && value.trim().length() > 0) {
+			return new File(value.trim());
+		}
+		return null;
+	}
+	
+	
+	public void setDefault(String text) {
+		t.setText(text);
+	}
+
+	@Override
+	public void resetToDefault() {
+		t.setText(getWidgetDefault());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/FolderField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/DateField.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/DateField.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/DateField.java	(revision 324)
@@ -0,0 +1,61 @@
+package org.txm.rcp.swt.widget.parameters;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DateTime;
+import org.kohsuke.args4j.NamedOptionDef;
+
+public class DateField extends LabelField {
+	DateTime dt;
+	public static String STRINGFORMAT = "yyyy-MM-dd";
+	public static SimpleDateFormat formater = new SimpleDateFormat(STRINGFORMAT); //$NON-NLS-1$
+	public DateField(Composite parent, int style, NamedOptionDef parameter) {
+		super(parent, style, parameter);
+
+		dt = new DateTime(this, SWT.DATE | SWT.BORDER);
+		dt.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+		
+	}
+
+	public Date getWidgetValue() {
+		int day = dt.getDay(); // Calendar.DAY_OF_MONTH
+		int month = dt.getMonth(); // Calendar.MONTH
+		int year = dt.getYear(); // Calendar.YEAR
+
+		//System.out.println("year="+year+" month="+month+" day="+day+ " hour="+hour+" min="+min+" sec="+second); 
+
+		try {
+			return formater.parse(""+year+"-"+month+"-"+day); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		} catch (ParseException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+			return null;
+		}
+	}
+	
+	
+	public void setDefault(String text) {
+		//t.setText(text);
+		//TODO: not implemented
+	}
+
+	@Override
+	public void resetToDefault() {
+		if (getWidgetDefault().length() > 0) {
+			try {
+				Date date = formater.parse(getWidgetDefault());
+				dt.setYear(date.getYear());
+				dt.setMonth(date.getMonth());
+				dt.setDay(date.getDay());
+			} catch(Exception e) {
+				System.out.println("Failed to set default value with: "+getWidgetDefault()+": "+e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+			}
+		}
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/DateField.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AlwaysExpandedItem.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AlwaysExpandedItem.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AlwaysExpandedItem.java	(revision 324)
@@ -0,0 +1,13 @@
+package org.txm.rcp.swt.widget;
+
+import org.eclipse.swt.widgets.ExpandBar;
+import org.eclipse.swt.widgets.Item;
+
+public class AlwaysExpandedItem extends Item {
+
+	public AlwaysExpandedItem(ExpandBar parent, int style) {
+		super(parent, style);
+		// TODO Auto-generated constructor stub
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AlwaysExpandedItem.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/EmpantWidget.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/EmpantWidget.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/EmpantWidget.java	(revision 324)
@@ -0,0 +1,449 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Spinner;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Used by the Cooc Editor Allow to choose a structural unit and the size @
+ * author mdecorde.
+ */
+public class EmpantWidget extends Composite {
+
+	/** The struct type. */
+	Button structType;
+	
+	/** The word type. */
+	Button wordType;
+	
+	/** The structs. */
+	Combo structs;
+	
+	/** The max left. */
+	Spinner maxLeft;
+	
+	/** The max right. */
+	Spinner maxRight;
+	
+	/** The min right. */
+	Spinner minRight;
+	
+	/** The min left. */
+	Spinner minLeft;
+	
+	/** The check xword. */
+	Button checkXword;
+	
+	/** The check xword. */
+	Button checkLeft;
+	
+	/** The check xword. */
+	Button checkRight;
+
+	Label infoLabel;
+	
+	/** The corpus. */
+	Corpus corpus;
+
+	/**
+	 * Instantiates a new empant widget.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 * @param corpus the corpus
+	 */
+	public EmpantWidget(Composite parent, int style, Corpus corpus) {
+		super(parent, style);
+		this.corpus = corpus;
+		GridLayout mainLayout = new GridLayout(1, true);
+		//mainLayout.verticalSpacing = 0;
+		mainLayout.marginWidth = 0;
+		this.setLayout(mainLayout);
+		
+		Composite line1 = new Composite(this, style);
+		Composite line2 = new Composite(this, style);
+		line1.setLayout(new GridLayout(7, false));
+		line2.setLayout(new GridLayout(9, false));
+		line1.setLayoutData(new GridData(GridData.FILL, GridData.FILL,true,true));
+		line2.setLayoutData(new GridData(GridData.FILL, GridData.FILL,true,true));
+		
+		
+		Label l = new Label(line1, SWT.NONE);
+		l.setText(Messages.EmpantWidget_0);
+
+		wordType = new Button(line1, SWT.RADIO);
+		wordType.setText(Messages.EmpantWidget_1);
+		wordType.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				structs.setEnabled(false);
+				checkXword.setEnabled(false);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+		wordType.setSelection(true);
+
+		structType = new Button(line1, SWT.RADIO);
+		structType.setText(Messages.EmpantWidget_2);
+		structType.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				structs.setEnabled(true);
+				checkXword.setEnabled(true);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// [info]
+		structs = new Combo(line1, SWT.READ_ONLY | SWT.SINGLE | SWT.BORDER);
+		GridData layoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER);
+		structs.setLayoutData(layoutData);
+
+		checkLeft = new Button(line1, SWT.CHECK);
+		checkLeft.setSelection(true);
+		checkLeft.setText(Messages.EmpantWidget_8);
+		checkLeft.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				boolean sel = checkLeft.getSelection();
+				maxLeft.setEnabled(sel);
+				minLeft.setEnabled(sel);
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		
+		checkRight = new Button(line1, SWT.CHECK);
+		checkRight.setSelection(true);
+		checkRight.setText(Messages.EmpantWidget_9);
+		checkRight.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				boolean sel = checkRight.getSelection();
+				maxRight.setEnabled(sel);
+				minRight.setEnabled(sel);
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		
+		checkXword = new Button(line1, SWT.CHECK);
+		checkXword.setText(Messages.EmpantWidget_7);
+
+		
+		// LINE 2
+		l = new Label(line2, SWT.NONE);
+		l.setText(Messages.EmpantWidget_3);
+
+		// | [ ] [ ] [ |v] [ ] [ ] |
+		maxLeft = new Spinner(line2, SWT.BORDER);
+		maxLeft.setMinimum(0);
+		maxLeft.setMaximum(9999);
+		maxLeft.setIncrement(1);
+		maxLeft.setPageIncrement(10);
+		maxLeft.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				minLeft.setMaximum(maxLeft.getSelection());
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		l = new Label(line2, SWT.NONE);
+		l.setText(Messages.EmpantWidget_4);
+
+		minLeft = new Spinner(line2, SWT.BORDER);
+		minLeft.setMinimum(0);
+		minLeft.setMaximum(9999);
+		minLeft.setIncrement(1);
+		minLeft.setPageIncrement(10);
+		minLeft.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				maxLeft.setMinimum(minLeft.getSelection());
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+				
+		l = new Label(line2, SWT.NONE);
+		l.setText(Messages.EmpantWidget_5);
+
+		// [>]
+		minRight = new Spinner(line2, SWT.BORDER);
+		minRight.setMinimum(0);
+		minRight.setMaximum(9999);
+		minRight.setIncrement(1);
+		minRight.setPageIncrement(10);
+		minRight.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				maxRight.setMinimum(minRight.getSelection());
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		l = new Label(line2, SWT.NONE);
+		l.setText(Messages.EmpantWidget_6);
+
+		// [>|]
+		maxRight = new Spinner(line2, SWT.BORDER);
+		maxRight.setMinimum(0);
+		maxRight.setMaximum(9999);
+		maxRight.setIncrement(1);
+		maxRight.setPageIncrement(10);
+		maxRight.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				minRight.setMaximum(maxRight.getSelection());
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		infoLabel = new Label(line2, SWT.NONE);
+		GridData infoLabelData = new GridData(GridData.END, GridData.CENTER, true, false);
+		infoLabel.setLayoutData(infoLabelData);
+		
+		loadStructs();
+		structs.setEnabled(false);
+		checkXword.setEnabled(false);
+	}
+	
+	public void setInfo(String txt, String tooltip) {
+		infoLabel.setText(txt);
+		infoLabel.setToolTipText(tooltip);
+	}
+
+	/**
+	 * Load structs.
+	 */
+	private void loadStructs() {
+		try {
+			java.util.List<StructuralUnit> corpusstructuralunits = corpus
+					.getOrderedStructuralUnits();
+			for (StructuralUnit su : corpusstructuralunits)
+				if (!su.getName().equals("text") //$NON-NLS-1$
+						&& !su.getName().equals("txmcorpus")) //$NON-NLS-1$
+					structs.add(su.getName());
+			if (corpusstructuralunits.size() > 0)
+				structs.select(0);
+		} catch (CqiClientException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+
+	/**
+	 * Adds the first listener.
+	 *
+	 * @param selectionListener the selection listener
+	 */
+	public void addFirstListener(SelectionListener selectionListener) {
+		maxLeft.addSelectionListener(selectionListener);
+	}
+
+	/**
+	 * Adds the next listener.
+	 *
+	 * @param selectionListener the selection listener
+	 */
+	public void addNextListener(SelectionListener selectionListener) {
+		minRight.addSelectionListener(selectionListener);
+	}
+
+	/**
+	 * Adds the previous listener.
+	 *
+	 * @param selectionListener the selection listener
+	 */
+	public void addPreviousListener(SelectionListener selectionListener) {
+		minLeft.addSelectionListener(selectionListener);
+	}
+
+	/**
+	 * Adds the last listener.
+	 *
+	 * @param selectionListener the selection listener
+	 */
+	public void addLastListener(SelectionListener selectionListener) {
+		maxRight.addSelectionListener(selectionListener);
+	}
+
+	/**
+	 * Sets the max left.
+	 *
+	 * @param maxleft the new max left
+	 */
+	public void setMaxLeft(int maxleft) {
+		this.maxLeft.setSelection(maxleft);
+	}
+
+	/**
+	 * Sets the min left.
+	 *
+	 * @param minleft the new min left
+	 */
+	public void setMinLeft(int minleft) {
+		this.minLeft.setSelection(minleft);
+	}
+
+	/**
+	 * Sets the max right.
+	 *
+	 * @param maxright the new max right
+	 */
+	public void setMaxRight(int maxright) {
+		this.maxRight.setSelection(maxright);
+	}
+
+	/**
+	 * Sets the min right.
+	 *
+	 * @param minright the new min right
+	 */
+	public void setMinRight(int minright) {
+		this.minRight.setSelection(minright);
+	}
+
+	/**
+	 * Gets the max left.
+	 *
+	 * @return the max left
+	 */
+	public int getMaxLeft() {
+		if (maxLeft.isEnabled())
+			return maxLeft.getSelection();
+		return -1;
+	}
+
+	/**
+	 * Gets the min left.
+	 *
+	 * @return the min left
+	 */
+	public int getMinLeft() {
+		if (minLeft.isEnabled())
+			return minLeft.getSelection();
+		return -1;
+	}
+
+	/**
+	 * Gets the max right.
+	 *
+	 * @return the max right
+	 */
+	public int getMaxRight() {
+		if (maxRight.isEnabled())
+			return maxRight.getSelection();
+		return -1;
+	}
+
+	/**
+	 * Gets the min right.
+	 *
+	 * @return the min right
+	 */
+	public int getMinRight() {
+		if (minRight.isEnabled())
+			return minRight.getSelection();
+		return -1;
+	}
+
+	/**
+	 * Sets the structure.
+	 *
+	 * @param su the new structure
+	 */
+	public void setStructure(StructuralUnit su) {
+		if (su != null)
+			structs.setText(su.getName());
+		else
+			structs.setText(""); //$NON-NLS-1$
+	}
+
+	/**
+	 * Gets the struct.
+	 *
+	 * @return the struct
+	 */
+	public StructuralUnit getStruct() {
+		if (this.wordType.getSelection())
+			return null;
+		try {
+			if (structs.getText().length() == 0)
+				return null;
+			return this.corpus.getStructuralUnit(structs.getText());
+		} catch (CqiClientException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return null;
+	}
+
+	/**
+	 * Gets the x pivot.
+	 *
+	 * @return the x pivot
+	 */
+	public boolean getXPivot() {
+		return this.checkXword.getSelection();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/EmpantWidget.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PropertiesSelector.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PropertiesSelector.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PropertiesSelector.java	(revision 324)
@@ -0,0 +1,264 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ViewPropertySelectionDialog;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * Allow to choose a structural property @ author mdecorde.
+ */
+public class PropertiesSelector extends Composite {
+	
+	/** The corpus. */
+	Corpus corpus;
+	
+	/** The properties. */
+	List<Property> properties;
+	
+	/** The availableprops. */
+	List<Property> availableprops;
+	
+	/** The maxprops. */
+	int maxprops = -1;
+
+	/** The properties label. */
+	Label propertiesLabel;
+	
+	/** The openeditdialog. */
+	Button openeditdialog;
+	
+	/** The prop label. */
+	Label propLabel;
+	
+	/** The prop separator. */
+	String propSeparator = " ; "; //$NON-NLS-1$
+
+	/**
+	 * Instantiates a new properties selector.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 */
+	public PropertiesSelector(Composite parent, int style) {
+		super(parent, style);
+
+		// = properties
+		propLabel = new Label(this, SWT.NONE);
+		propLabel.setText(Messages.PropertiesSelector_1);
+		propLabel
+				.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, true));
+
+		// word_pos
+		propertiesLabel = new Label(this, SWT.NONE);
+		propertiesLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+				true));
+
+		openeditdialog = new Button(this, SWT.PUSH);
+		openeditdialog.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+				true));
+		openeditdialog.setText(Messages.PropertiesSelector_2);
+
+		openeditdialog.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				showEditorDialog();
+				refresh();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+
+			}
+		});
+	}
+	
+	public void addSelectionListener(SelectionListener listener) {
+		openeditdialog.addSelectionListener(listener);
+	}
+
+	/**
+	 * Sets the max property number.
+	 *
+	 * @param max the new max property number
+	 */
+	public void setMaxPropertyNumber(int max) {
+		this.maxprops = max;
+	}
+
+	/**
+	 * Refresh.
+	 */
+	public void refresh() {
+		String previous = propertiesLabel.getText();
+		StringBuffer buffer = new StringBuffer();
+		boolean first = true;
+		for (Property p : properties) {
+			if (first) {
+				first = false;
+			} else {
+				buffer.append(propSeparator);
+			}
+			
+			if (p instanceof StructuralUnitProperty)
+				buffer.append(((StructuralUnitProperty)p).getFullName()); 
+			else
+				buffer.append(p.getName()); 
+
+		}
+		if (buffer.length() > 0) {
+			propertiesLabel.setText(buffer.substring(0, buffer.length()));
+			propertiesLabel.getParent().layout();
+			propertiesLabel.getParent().getParent().layout();
+			propertiesLabel.getParent().getParent().getParent().layout();
+			//propertiesLabel.update(); //this line cause the SWT env to go crazy with Ubuntu 14.04 !!!
+		}
+		
+		if (!previous.equals(propertiesLabel.getText())) { // value changed !
+			for (Listener l : listeners) {
+				l.handleEvent(null);
+			}
+		}
+	}
+
+	/**
+	 * Show editor dialog.
+	 */
+	public void showEditorDialog() {
+		if (availableprops == null) return;
+		new ViewPropertySelectionDialog(this.getShell(), availableprops,
+				properties, maxprops).open();
+	}
+
+	/**
+	 * Sets the corpus.
+	 *
+	 * @param corpus the new corpus
+	 */
+	public void setCorpus(Corpus corpus) {
+		this.corpus = corpus;
+		this.properties = new ArrayList<Property>();
+		if (corpus == null)
+			return;
+		try {
+			availableprops = new ArrayList<Property>();
+			availableprops.addAll(corpus.getOrderedProperties());
+			//availableprops.addAll(corpus.getStructuralUnitProperties());
+			
+			for (int i = 0; i < availableprops.size(); i++) {
+				// remove TXM internal properties
+				if (availableprops.get(i).getName().equals("id")) { //$NON-NLS-1$
+					availableprops.remove(i);
+					i--;
+				}
+			}
+
+			if (availableprops.size() > 0) {
+				this.properties = new ArrayList<Property>();
+				for (int i = 0 ; i < availableprops.size() ; i++) {
+					if (availableprops.get(i).getName().equals("word")) { //$NON-NLS-1$
+						properties.add(availableprops.get(i));
+						availableprops.remove(i);
+						refresh();
+						break;
+					}
+				}
+			}
+		} catch (CqiClientException e) {
+			Log.severe(NLS.bind(Messages.PropertiesSelector_0, e.getMessage()));
+		}
+	}
+
+	/**
+	 * Gets the properties.
+	 *
+	 * @return the properties
+	 */
+	public List<Property> getProperties() {
+		return this.properties;
+	}
+	
+	/**
+	 * Gets the Available properties.
+	 *
+	 * @return the Available properties
+	 */
+	public List<Property> getAvailableProperties() {
+		return this.availableprops;
+	}
+
+	/**
+	 * Sets the properties.
+	 *
+	 * @param available the available
+	 * @param selected the selected
+	 */
+	public void setProperties(List<Property> available, List<Property> selected) {
+		// System.out.println("initialize prop selector with: "+available+" and "+selected);
+		availableprops = available;
+		this.properties = selected;
+		refresh();
+	}
+
+	/**
+	 * Sets the text.
+	 *
+	 * @param string the new text
+	 */
+	public void setText(String string) {
+		propLabel.setText(string);
+		propLabel.update();
+	}
+
+	public void clear() {
+		setText(""); //$NON-NLS-1$
+		setProperties(new ArrayList<Property>(), new ArrayList<Property>());
+	}
+
+	ArrayList<Listener> listeners = new ArrayList<Listener>();
+	public void addValueChangeListener(Listener listener) {
+		listeners.add(listener);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PropertiesSelector.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ComplexSubcorpusPanel.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ComplexSubcorpusPanel.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ComplexSubcorpusPanel.java	(revision 324)
@@ -0,0 +1,470 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.txm.rcp.Messages;
+import org.txm.rcp.utils.Logger;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ComplexSubcorpusPanel.
+ */
+public class ComplexSubcorpusPanel extends Composite{
+
+	/** The self. */
+	ComplexSubcorpusPanel self;
+	
+	/** The struct combo. */
+	Combo structCombo;
+
+	/** The corpus. */
+	Corpus corpus;
+	
+	/** The query. */
+	String query;
+	
+	/** The btn area. */
+	Composite parent, partArea, firstArea, dispoArea, btnArea;
+
+	/** The structuralunits. */
+	List<StructuralUnit> structuralunits; 
+	
+	/** The structural units properties. */
+	HashMap<StructuralUnit, List<StructuralUnitProperty>> structuralUnitsProperties = new HashMap<StructuralUnit, List<StructuralUnitProperty>>();
+	
+	/** The query items. */
+	ArrayList<QueryItem> queryItems = new ArrayList<QueryItem>();
+	
+	/** The queries panel. */
+	Composite queriesPanel;
+	
+	/** The query field. */
+	Text queryField;
+	
+	/** The and btn. */
+	Button andBtn;
+
+	/**
+	 * Instantiates a new complex subcorpus panel.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 * @param corpus the corpus
+	 */
+	public ComplexSubcorpusPanel(Composite parent, int style, Corpus corpus) {
+		super(parent, style);
+		self = this;
+		this.setLayout(new GridLayout(2, false));
+		this.corpus = corpus;
+
+		try {
+			this.structuralunits = new ArrayList<StructuralUnit>(corpus.getOrderedStructuralUnits());
+			for (int i = 0 ; i < this.structuralunits.size() ; i++) {
+				if (this.structuralunits.get(i).getName().equals("txmcorpus")) { //$NON-NLS-1$
+					this.structuralunits.remove(i);
+					i--;
+				}
+			}
+		} catch (CqiClientException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		for (StructuralUnit su : this.structuralunits) {
+			List<StructuralUnitProperty> properties = new ArrayList<StructuralUnitProperty>(su.getOrderedProperties());
+			if (su.getName().equals("text")) { //$NON-NLS-1$
+				for (int i = 0 ; i < properties.size() ; i++) {
+					if (properties.get(i).getName().equals("base") || //$NON-NLS-1$
+						properties.get(i).getName().equals("project")) { //$NON-NLS-1$
+						properties.remove(i);
+						i--;
+					}
+				}
+			}
+			structuralUnitsProperties.put(su, properties);
+		}
+
+		Group andorGroup = new Group(this, SWT.SHADOW_ETCHED_IN);
+		andorGroup.setText(Messages.ComplexSubcorpusPanel_0);
+		andorGroup.setLayout(new GridLayout(2, false));
+		andorGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
+
+		andBtn = new Button(andorGroup, SWT.RADIO);
+		andBtn.setText(Messages.ComplexSubcorpusPanel_1);
+		andBtn.setSelection(true);
+
+		Button orBtn = new Button(andorGroup, SWT.RADIO);
+		orBtn.setText(Messages.ComplexSubcorpusPanel_2);
+		
+		//structure choice
+		Label l = new Label(this, SWT.None);
+		l.setText(Messages.ParaBrowserEditor_5);
+		structCombo = new Combo(this, SWT.READ_ONLY);
+		structCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				for(QueryItem item : queryItems)
+					item.refreshProps();
+			}
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {}
+		});
+
+		int i_text = 0, i = 0;
+		for (StructuralUnit su : structuralunits) {
+			structCombo.add(su.getName());
+			if (su.getName().equals("text")) i_text = i; //$NON-NLS-1$
+			i++;
+		}
+		
+		if (structuralunits.size() > 0)
+			structCombo.select(i_text);
+
+		queriesPanel = new Composite(this, SWT.NONE);
+		queriesPanel.setLayout(new GridLayout(1, false));
+		queriesPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
+		QueryItem item = new QueryItem(queriesPanel, SWT.NONE);
+		item.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+		queryItems.add(item);
+		// choix OU / ET
+		// 3 combos : struc, prop, value
+		// Add/Rmv contrainte
+		// affichage requete
+		l = new Label(this, SWT.NONE);
+		l.setText(Messages.ComplexSubcorpusPanel_4);
+		queryField = new Text(this, SWT.BORDER);
+		queryField.setLayoutData(new GridData(GridData.FILL,GridData.FILL,true, false));
+		Button refreshBtn = new Button(this, SWT.PUSH);
+		refreshBtn.setText(Messages.ComplexSubcorpusPanel_5);
+		refreshBtn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				updateQueryField();
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				
+			}
+		});
+		
+		// first init
+		updateQueryField();
+	}
+	
+	public void updateQueryField() {
+		queryField.setText(getQueryString());
+		queryField.update();
+	}
+
+	/**
+	 * Update display.
+	 */
+	public void updateDisplay() {
+		firstArea.layout();
+		dispoArea.layout();
+		partArea.layout();
+		btnArea.layout();
+		parent.layout();
+		parent.getParent().layout();
+	}
+	
+	/**
+	 * Gets the query string.
+	 *
+	 * @return the query string
+	 */
+	public String getQueryString()
+	{
+		String structName = this.structCombo.getText();
+		
+		String query = "/region["+structName+",a]::"; //$NON-NLS-1$ //$NON-NLS-2$
+		int nbitem = 0;
+		for (QueryItem item : queryItems) {
+			if (nbitem != 0)
+				if (andBtn.getSelection())
+					query += " &"; //$NON-NLS-1$
+				else
+					query += " |"; //$NON-NLS-1$
+			String prop = item.selectedSup.getFullName();
+			ISelection sel = item.valueCombo.getSelection();
+			String value = ""; //$NON-NLS-1$
+			if (sel instanceof IStructuredSelection) {
+				value = ((IStructuredSelection)sel).getFirstElement().toString();
+			}
+			int equals = item.testCombo.getSelectionIndex();
+			
+			if (equals == 0) // is
+				query += " a."+prop+"=\""+value+"\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			else if (equals == 1) // is not
+				query += " a."+prop+"!=\""+value+"\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			else if (equals == 2) // contains
+				query += " a."+prop+"=\".*"+value+".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			else // does not contain
+				query += " a."+prop+"!=\".*"+value+".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			
+			nbitem++;
+		}
+		
+		/*
+		String query = "["; //$NON-NLS-1$ //$NON-NLS-2$
+		int nbitem = 0;
+		
+		for (QueryItem item : queryItems) {
+			if (nbitem != 0)
+				if (andBtn.getSelection())
+					query += " &"; //$NON-NLS-1$
+				else
+					query += " |"; //$NON-NLS-1$
+			String prop = item.selectedSup.getFullName();
+			ISelection sel = item.valueCombo.getSelection();
+			String value = ""; //$NON-NLS-1$
+			if (sel instanceof IStructuredSelection) {
+				value = ((IStructuredSelection)sel).getFirstElement().toString();
+			}
+			int equals = item.testCombo.getSelectionIndex();
+			
+			if (equals == 0) // is
+				query += " a."+prop+"=\""+value+"\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			else if (equals == 1) // is not
+				query += " a."+prop+"!=\""+value+"\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			else if (equals == 2) // contains
+				query += " a."+prop+"=\".*"+value+".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			else // does not contain
+				query += " a."+prop+"!=\".*"+value+".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			
+			nbitem++;
+		}
+		*/
+		
+		/** // 
+		for (QueryItem item : queryItems) {
+			if (nbitem != 0) { // adding a constraint
+				if (andBtn.getSelection())
+					query += " &"; //$NON-NLS-1$
+				else
+					query += " |"; //$NON-NLS-1$
+			}
+			String prop = item.selectedSup.getFullName();
+			ISelection sel = item.valueCombo.getSelection();
+			String value = ""; //$NON-NLS-1$
+			if (sel instanceof IStructuredSelection) {
+				value = ((IStructuredSelection)sel).getFirstElement().toString();
+			}
+			int equals = item.testCombo.getSelectionIndex();
+			
+			if (equals == 0) // is
+				query += " _."+prop+"=\""+value+"\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			else if (equals == 1) // is not
+				query += " _."+prop+"!=\""+value+"\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			else if (equals == 2) // contains
+				query += " _."+prop+"=\".*"+value+".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			else // does not contain
+				query += " _."+prop+"!=\".*"+value+".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			
+			nbitem++;
+		}
+		query += "] expand to "+structName;
+		*/
+		return query;
+	}
+	
+	public String getQueryFieldValue() {
+		String query = this.queryField.getText();
+		if (query == null || query.length() == 0) {
+			query = getQueryString();
+		}
+		return query;
+	}
+
+	public String getGeneratedName() {
+		String generated = this.corpus.getName(); 
+		for (QueryItem item : queryItems)
+			generated += "_"+item.selectedSup.getName(); //$NON-NLS-1$
+		return generated;
+	}
+	
+	/**
+	 * The Class QueryItem.
+	 */
+	class QueryItem extends Composite {
+
+		/** The prop combo. */
+		Combo propCombo;
+		
+		/** The test combo. */
+		Combo testCombo;
+		
+		/** The value combo. */
+		ListViewer valueCombo;
+
+		/** The sups. */
+		List<StructuralUnitProperty> sups;
+		
+		/** The selected sup. */
+		StructuralUnitProperty selectedSup;
+		
+		/** The selected su. */
+		StructuralUnit selectedSu;
+
+		/**
+		 * Instantiates a new query item.
+		 *
+		 * @param parent the parent
+		 * @param style the style
+		 */
+		public QueryItem(Composite parent, int style) {
+			super(parent, style);
+
+			this.setLayout(new GridLayout(5, false));
+			propCombo = new Combo(this, SWT.READ_ONLY);
+			propCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+			propCombo.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					refreshValues();
+				}
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {}
+			});
+
+			testCombo = new Combo(this, SWT.READ_ONLY);
+			testCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+			testCombo.add("is"); //$NON-NLS-1$
+			testCombo.add("is not"); //$NON-NLS-1$
+			testCombo.add(Messages.QueryAssistDialog_13);
+			testCombo.add(Messages.ComplexSubcorpusPanel_16);
+			testCombo.select(0);
+
+			valueCombo = new ListViewer(this, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER | SWT.VIRTUAL);
+			valueCombo.setContentProvider(new ArrayContentProvider());
+			GridData data = new GridData(GridData.FILL,GridData.FILL, true, false);
+			data.heightHint = testCombo.getItemHeight();
+			valueCombo.getList().setLayoutData(data);
+			if (structuralunits.size() > 0) {
+				refreshProps();
+			}
+
+			Button btnAdd  = new Button(this, SWT.PUSH);
+			btnAdd.setText("+"); //$NON-NLS-1$
+			btnAdd.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					//System.out.println("add constraint");
+					QueryItem item = new QueryItem(queriesPanel, SWT.NONE);
+					item.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+					queryItems.add(item);
+					ComplexSubcorpusPanel.this.layout();
+					//System.out.println(getQueryString());
+				}
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {}
+			});
+
+			Button btnRmv  = new Button(this, SWT.PUSH);
+			btnRmv.setText("-"); //$NON-NLS-1$
+			btnRmv.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					if (queryItems.size() > 1) {
+						System.out.println(Messages.ObjectExplorer_9);
+						QueryItem.this.dispose();
+						queryItems.remove(QueryItem.this);
+						ComplexSubcorpusPanel.this.layout();
+					}
+				}
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {}
+			});
+		}
+
+		/**
+		 * Refresh props.
+		 */
+		private void refreshProps() {
+			propCombo.removeAll();
+			selectedSu = structuralunits.get(structCombo.getSelectionIndex());
+			sups = structuralUnitsProperties.get(selectedSu);
+
+			for (StructuralUnitProperty sup : sups)
+				propCombo.add(sup.getName());
+
+			if (sups.size() > 0) {
+				selectedSup = sups.get(0);
+				propCombo.select(0);
+				refreshValues();
+			}
+		}
+
+		/**
+		 * Refresh values.
+		 */
+		private void refreshValues() {
+			
+			selectedSup = sups.get(propCombo.getSelectionIndex()); 
+			try {
+				valueCombo.setInput(selectedSup.getOrderedValues());
+			} catch (CqiClientException e1) {
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
+			}
+			if (valueCombo.getList().getItemCount() > 0)
+				valueCombo.getList().select(0);
+		}
+
+		/**
+		 * Gets the structural unit.
+		 *
+		 * @return the structural unit
+		 */
+		public StructuralUnit getStructuralUnit() {
+			return null;
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ComplexSubcorpusPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NavigationWidget.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NavigationWidget.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NavigationWidget.java	(revision 324)
@@ -0,0 +1,219 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.txm.rcp.Messages;
+
+// TODO: Auto-generated Javadoc
+/**
+ * [<< |< < label > >| >>] @ author mdecorde.
+ */
+public class NavigationWidget extends Composite {
+
+	/** The info line. */
+	Label infoLine;
+	Text currentPosition;
+	
+	/** The first. */
+	Button first;
+	
+	/** The last. */
+	Button last;
+	
+	/** The next. */
+	Button next;
+	
+	/** The prev. */
+	Button prev;
+	
+
+	/** The n line per page. */
+	int nLinePerPage;
+	private Color whiteColor;
+
+	/**
+	 * Instantiates a new navigation widget.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 */
+	public NavigationWidget(Composite parent, int style) {
+		super(parent, style);
+		this.setLayout(new GridLayout(6, false));
+
+		// | [|<] [<] [info] [>] [>|] |
+
+		// [|<]
+		first = new Button(this, SWT.PUSH);
+		first.setText(Messages.ConcordancesEditor_11);
+		first.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+		first.setEnabled(false);
+
+		// [<]
+		prev = new Button(this, SWT.PUSH);
+		prev.setText(Messages.ConcordancesEditor_12);
+		prev.setEnabled(false);
+
+		// [current]
+		currentPosition = new Text(this, SWT.NONE);
+		GridData currentPositionLayoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER, SWT.CENTER, true, false);
+		currentPosition.setLayoutData(currentPositionLayoutData);
+		currentPosition.setTextLimit(6);
+		currentPosition.setEditable(false);
+		
+		// [info]
+		infoLine = new Label(this, SWT.NONE);
+		GridData layoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER, SWT.CENTER, true, false);
+		infoLine.setLayoutData(layoutData);
+		
+		whiteColor = currentPosition.getBackground();
+		currentPosition.setBackground(infoLine.getBackground());
+
+		// [>]
+		next = new Button(this, SWT.PUSH);
+		next.setText(Messages.ConcordancesEditor_13);
+		next.setEnabled(false);
+
+		// [>|]
+		last = new Button(this, SWT.PUSH);
+		last.setText(Messages.ConcordancesEditor_14);
+		last.setEnabled(false);
+	}
+	
+
+	public void addGoToKeyListener(KeyListener keyListener) {
+		currentPosition.addKeyListener(keyListener);
+		currentPosition.setEditable(true);
+		currentPosition.setBackground(whiteColor);
+		//currentPosition.setBackground(new Color(currentPosition.get));
+	}
+
+	/**
+	 * Adds the first listener.
+	 *
+	 * @param selectionListener the selection listener
+	 */
+	public void addFirstListener(SelectionListener selectionListener) {
+		first.addSelectionListener(selectionListener);
+	}
+
+	/**
+	 * Adds the next listener.
+	 *
+	 * @param selectionListener the selection listener
+	 */
+	public void addNextListener(SelectionListener selectionListener) {
+		next.addSelectionListener(selectionListener);
+	}
+
+	/**
+	 * Adds the previous listener.
+	 *
+	 * @param selectionListener the selection listener
+	 */
+	public void addPreviousListener(SelectionListener selectionListener) {
+		prev.addSelectionListener(selectionListener);
+	}
+
+	/**
+	 * Adds the last listener.
+	 *
+	 * @param selectionListener the selection listener
+	 */
+	public void addLastListener(SelectionListener selectionListener) {
+		last.addSelectionListener(selectionListener);
+	}
+
+	/**
+	 * Sets the first enabled.
+	 *
+	 * @param b the new first enabled
+	 */
+	public void setFirstEnabled(boolean b) {
+		first.setEnabled(b);
+	}
+
+	/**
+	 * Sets the last enabled.
+	 *
+	 * @param b the new last enabled
+	 */
+	public void setLastEnabled(boolean b) {
+		last.setEnabled(b);
+	}
+
+	/**
+	 * Sets the next enabled.
+	 *
+	 * @param b the new next enabled
+	 */
+	public void setNextEnabled(boolean b) {
+		next.setEnabled(b);
+	}
+
+	/**
+	 * Sets the previous enabled.
+	 *
+	 * @param b the new previous enabled
+	 */
+	public void setPreviousEnabled(boolean b) {
+		prev.setEnabled(b);
+	}
+
+	/**
+	 * Sets the info line text.
+	 *
+	 * @param s the new info line text
+	 */
+	public void setInfoLineText(String current, String s) {
+		this.currentPosition.setText(current);
+		this.infoLine.setText(s);
+		this.layout();
+	}
+
+
+	 public int getCurrent() {
+		 int ret = -1;
+		 try {
+			 ret = Integer.parseInt(currentPosition.getText());
+		 } catch(Exception e) {
+			 System.out.println(Messages.NavigationWidget_0+e);
+		 }
+		return ret;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/NavigationWidget.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ObjectSelector.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ObjectSelector.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ObjectSelector.java	(revision 324)
@@ -0,0 +1,218 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.txm.rcp.Messages;
+import org.txm.rcp.swt.dialog.ObjectSelectionDialog;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ObjectSelector.
+ */
+public class ObjectSelector extends Composite {
+
+	/** The selected. */
+	List<Object> selected;
+	
+	/** The available. */
+	List<Object> available;
+	
+	/** The max. */
+	int max = -1;
+	
+	/** The maxdisplay. */
+	int maxdisplay = -1;
+
+	/** The prop label. */
+	Label propLabel;
+	
+	/** The properties label. */
+	Label propertiesLabel;
+	
+	/** The openeditdialog. */
+	Button openeditdialog;
+
+	/** The separator. */
+	String separator = "_"; //$NON-NLS-1$
+
+	/**
+	 * Instantiates a new object selector.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 */
+	public ObjectSelector(Composite parent, int style) {
+		super(parent, style);
+		this.setLayout(new GridLayout(3, false));
+
+		propLabel = new Label(this, SWT.NONE);
+		propLabel.setText(Messages.ObjectSelector_0);
+		propLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, true));
+
+		// word_pos
+		propertiesLabel = new Label(this, SWT.NONE);
+		propertiesLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+				true));
+
+		openeditdialog = new Button(this, SWT.PUSH);
+		openeditdialog.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+				true));
+		openeditdialog.setText(Messages.ObjectSelector_1);
+
+		openeditdialog.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				showEditorDialog();
+				refresh();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+
+			}
+		});
+	}
+
+	/**
+	 * Refresh.
+	 */
+	public void refresh() {
+		StringBuffer buffer = new StringBuffer();
+		int count = 0;
+		if (maxdisplay > 0)
+			for (Object p : selected) {
+				count++;
+				buffer.append(p.toString() + separator); 
+				if (maxdisplay > 0 && count >= maxdisplay) {
+					buffer.append("..."); //$NON-NLS-1$
+					break;
+				}
+			}
+		if (buffer.length() > 0) {
+			propertiesLabel.setText(buffer.substring(0, buffer.length() - 1));
+		} else
+			propertiesLabel.setText(""); //$NON-NLS-1$
+		propertiesLabel.getParent().layout(true);
+		this.getParent().layout(true);
+		this.getParent().getParent().layout(true);
+	}
+
+	/**
+	 * Show editor dialog.
+	 */
+	public void showEditorDialog() {
+		new ObjectSelectionDialog(this.getShell(), available, selected, max)
+				.open();
+	}
+
+	/**
+	 * Gets the selection.
+	 *
+	 * @return the selection
+	 */
+	public List<Object> getSelection() {
+		return this.selected;
+	}
+
+	/**
+	 * Gets the available.
+	 *
+	 * @return the available
+	 */
+	public List<Object> getAvailable() {
+		return this.available;
+	}
+
+	// SETTERS
+	/**
+	 * Sets the max property number.
+	 *
+	 * @param max the new max property number
+	 */
+	public void setMaxPropertyNumber(int max) {
+		this.max = max;
+	}
+
+	/**
+	 * Sets the max display number.
+	 *
+	 * @param max the new max display number
+	 */
+	public void setMaxDisplayNumber(int max) {
+		this.maxdisplay = max;
+	}
+
+	/**
+	 * Sets the label text.
+	 *
+	 * @param txt the new label text
+	 */
+	public void setLabelText(String txt) {
+		this.propLabel.setText(txt);
+	}
+
+	/**
+	 * Sets the edits the text.
+	 *
+	 * @param txt the new edits the text
+	 */
+	public void setEditText(String txt) {
+		openeditdialog.setText(txt);
+	}
+
+	/**
+	 * Sets the objects.
+	 *
+	 * @param available the available
+	 * @param selected the selected
+	 */
+	@SuppressWarnings("unchecked")
+	public void setObjects(List available, List selected) {
+		this.available = available;
+		this.selected = selected;
+		refresh();
+	}
+
+	/**
+	 * Sets the separator.
+	 *
+	 * @param string the new separator
+	 */
+	public void setSeparator(String string) {
+		this.separator = string;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ObjectSelector.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AssistedQueryWidget.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AssistedQueryWidget.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AssistedQueryWidget.java	(revision 324)
@@ -0,0 +1,142 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.swt.dialog.QueryAssistDialog;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.query.Query;
+// TODO: Auto-generated Javadoc
+/**
+ * the QueryWidget plus the button to open the QueryAssisDialog @ author
+ * mdecorde.
+ */
+public class AssistedQueryWidget extends Composite {
+	
+	/** The magicstick button: opens the QueryAssist dialog. */
+	protected Button magicstick;
+	
+	/** The querywidget. */
+	protected QueryWidget querywidget;
+
+	private QueryAssistDialog d;
+
+	/**
+	 * Instantiates a new assisted query widget.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 * @param corpus the corpus
+	 */
+	public AssistedQueryWidget(Composite parent, int style, final Corpus corpus) {
+		super(parent, SWT.NONE);
+		this.setLayout(new GridLayout(2, false));
+
+		magicstick = new Button(this, SWT.PUSH);
+		magicstick.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				false, true));
+		magicstick.setImage(IImageKeys.getImage(IImageKeys.ACTION_ASSISTQUERY));
+		magicstick.setToolTipText(Messages.AssistedQueryWidget_0);
+		magicstick.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				d = new QueryAssistDialog(e.display.getActiveShell(), corpus);
+				if (d.open() == Window.OK) {
+					querywidget.setText(d.getQuery());
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+
+		querywidget = new QueryWidget(this, style);
+		querywidget.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+	}
+	
+	public boolean setFocus() {
+		return this.querywidget.setFocus();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.swt.widgets.Control#addKeyListener(org.eclipse.swt.events.KeyListener)
+	 */
+	@Override
+	public void addKeyListener(KeyListener listener) {
+		if (querywidget != null)
+			this.querywidget.addKeyListener(listener);
+	}
+
+	/**
+	 * Gets the query string.
+	 *
+	 * @return the query string
+	 */
+	public String getQueryString() {
+		return querywidget.getQueryString();
+	}
+
+	/**
+	 * Memorize.
+	 */
+	public void memorize() {
+		querywidget.memorize();
+	}
+
+	/**
+	 * Memorize.
+	 *
+	 * @param query the query
+	 */
+	public void memorize(String query) {
+		querywidget.memorize(query);
+	}
+
+	/**
+	 * Sets the text.
+	 *
+	 * @param query the new text
+	 */
+	public void setText(String query) {
+		querywidget.setText(query);
+	}
+
+	public Query getQuery() {
+		return new Query(getQueryString());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AssistedQueryWidget.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java	(revision 324)
@@ -0,0 +1,121 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.swt.widget;
+
+import java.util.Deque;
+import java.util.LinkedList;
+
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+// TODO: Auto-generated Javadoc
+/**
+ * A widget to enter query strings. It features query history and accepts both
+ * full CQP query strings and simplif ied query strings (see
+ * {@link org.txm.searchengine.cqp.corpus.query.Query#fixQuery(String)})
+ * 
+ * @author jmague
+ * 
+ */
+public class QueryWidget extends Combo {
+
+	/** The history. */
+	private static Deque<String> history = new LinkedList<String>();
+
+	/**
+	 * Instantiates a new query widget.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 */
+	public QueryWidget(Composite parent, int style) {
+		super(parent, style);
+		this.setItems(history.toArray(new String[history.size()]));
+	}
+
+	/**
+	 * Gets the CQP query string inferred from the user input.
+	 *
+	 * @return the CQP query string
+	 */
+	public String getQueryString() {
+		String rawQuery;
+		if (getSelectionIndex() < 0)
+			rawQuery = getText();
+		else
+			rawQuery = this.getItem(this.getSelectionIndex());
+		return Query.fixQuery(rawQuery);
+	}
+
+	/**
+	 * Memorize.
+	 */
+	public void memorize() {
+		String inputString;
+		if (getSelectionIndex() == -1)
+			inputString = getText();
+		else
+			inputString = getItems()[getSelectionIndex()];
+		history.remove(inputString);
+		history.addFirst(inputString);
+		this.setItems(history.toArray(new String[history.size()]));
+		this.setText(this.getItem(0));
+	}
+
+	/**
+	 * Memorize.
+	 *
+	 * @param query the query to memorize
+	 */
+	public void memorize(String query) {
+		String inputString = query;
+		this.setText(query);
+		history.remove(inputString);
+		history.addFirst(inputString);
+		this.setItems(history.toArray(new String[history.size()]));
+		this.setText(this.getItem(0));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.swt.widgets.Combo#checkSubclass()
+	 */
+	@Override
+	protected void checkSubclass() {
+	}
+
+	/**
+	 * Gets the query.
+	 *
+	 * @return the query
+	 */
+	public Query getQuery() {
+		
+		return new Query(this.getQueryString());
+	};
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementColumnLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementColumnLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementColumnLabelProvider.java	(revision 324)
@@ -0,0 +1,32 @@
+package org.txm.rcp.swt.provider;
+
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.w3c.dom.Element;
+
+public class ElementColumnLabelProvider extends ColumnLabelProvider {
+	
+	String key;
+	
+	public ElementColumnLabelProvider(String key) {
+		this.key = key;
+	}
+	/** (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 * 
+	 * @param element 
+	 * @param columnIndex 
+	 */
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+	
+	@Override
+	public String getText(Object element) {
+		if (element != null && element instanceof Element) {
+			Element elem = (Element) element;
+			return elem.getAttribute(key);
+		}
+		return "#no Element"; //$NON-NLS-1$
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementColumnLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementLabelProvider.java	(revision 324)
@@ -0,0 +1,31 @@
+package org.txm.rcp.swt.provider;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.w3c.dom.Element;
+
+public class ElementLabelProvider extends LabelProvider implements ITableLabelProvider {
+	
+	/** (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 * 
+	 * @param element 
+	 * @param columnIndex 
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+	
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		if (element != null && element instanceof Element) {
+			Element elem = (Element) element;
+			if (columnIndex < elem.getAttributes().getLength())
+				return elem.getAttributes().item(columnIndex).getNodeValue();
+			return "#idx too high"; //$NON-NLS-1$
+		}
+		return "#not Element"; //$NON-NLS-1$
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementTreeLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementTreeLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementTreeLabelProvider.java	(revision 324)
@@ -0,0 +1,54 @@
+package org.txm.rcp.swt.provider;
+
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.w3c.dom.Element;
+import org.txm.rcp.Messages;
+
+public class ElementTreeLabelProvider extends ColumnLabelProvider {
+	
+	String parentName;
+	String[] parentAttrs;
+
+	String childName;
+	String[] childAttrs;
+	
+	int index = 0;
+	public ElementTreeLabelProvider(int column, String parentName, String childName, String[] parentAttrs, String[] childAttrs) {
+		this.parentName = parentName;
+		this.childName = childName;
+		this.parentAttrs = parentAttrs;
+		this.childAttrs = childAttrs;
+		this.index = column;
+	}
+	
+	@Override
+	public String getText(Object obj) {
+		if(obj instanceof Element) {
+			Element elem = (Element) obj; 
+			if (elem.getNodeName().equals(parentName)) {
+				return show(elem, index, parentAttrs);
+			} else if (elem.getNodeName().equals(childName)) {
+				return show(elem, index, childAttrs);
+			} else {
+				return Messages.ElementTreeLabelProvider_0;
+			}
+			
+		}
+		return Messages.ElementTreeLabelProvider_1;
+	}
+
+	private String show(Element elem, int index, String[] attrs) {
+		if(index >= attrs.length) return ""; //$NON-NLS-1$
+		return elem.getAttribute(attrs[index]);
+	}
+	
+	public Image getColumnImage(Object obj, int index){
+		return null;
+	}
+
+	@Override
+	public Image getImage(Object obj){
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementTreeLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/SimpleLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/SimpleLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/SimpleLabelProvider.java	(revision 324)
@@ -0,0 +1,24 @@
+package org.txm.rcp.swt.provider;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class SimpleLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+	/** (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 * 
+	 * @param element 
+	 * @param columnIndex 
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		return ""+element; //$NON-NLS-1$
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/SimpleLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ListLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ListLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ListLabelProvider.java	(revision 324)
@@ -0,0 +1,32 @@
+package org.txm.rcp.swt.provider;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class ListLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+	/** (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 * 
+	 * @param element 
+	 * @param columnIndex 
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+	
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		if (element != null && element instanceof List) {
+			List<Object> list = (List<Object>) element;
+			if(columnIndex < list.size())
+				return ""+list.get(columnIndex); //$NON-NLS-1$
+			return "#idx too high"; //$NON-NLS-1$
+		}
+		return "#not list"; //$NON-NLS-1$
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ListLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/NodeListContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/NodeListContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/NodeListContentProvider.java	(revision 324)
@@ -0,0 +1,30 @@
+package org.txm.rcp.swt.provider;
+
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.w3c.dom.NodeList;
+
+public class NodeListContentProvider implements IContentProvider, IStructuredContentProvider {
+
+	@Override
+	public Object[] getElements(Object inputElement) {
+		NodeList list = (NodeList)inputElement;
+		Object[] objs = new Object[list.getLength()];
+		for(int i = 0 ; i < list.getLength() ; i++)
+			objs[i] = list.item(i);
+		return objs;
+	}
+
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		// TODO Auto-generated method stub
+		
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/NodeListContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/HashMapLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/HashMapLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/HashMapLabelProvider.java	(revision 324)
@@ -0,0 +1,39 @@
+package org.txm.rcp.swt.provider;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class HashMapLabelProvider extends LabelProvider implements ITableLabelProvider {
+	
+	ArrayList<Object> keys;
+	
+	public HashMapLabelProvider(ArrayList<Object> keys)
+	{
+		this.keys = keys;
+	}
+	
+	/** (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 * 
+	 * @param element 
+	 * @param columnIndex 
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+	
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		if (element != null && element instanceof HashMap) {
+			if(columnIndex < keys.size())
+				return ""+((HashMap) element).get(keys.get(columnIndex)); //$NON-NLS-1$
+			return "#idx too high"; //$NON-NLS-1$
+		}
+		return "#not list"; //$NON-NLS-1$
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/HashMapLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementTreeContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementTreeContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementTreeContentProvider.java	(revision 324)
@@ -0,0 +1,82 @@
+package org.txm.rcp.swt.provider;
+
+import java.util.Arrays;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+public class ElementTreeContentProvider implements ITreeContentProvider{
+
+	String parentName;
+	String[] parentAttrs;
+
+	String childName;
+	String[] childAttrs;
+	
+	public ElementTreeContentProvider(String parentName, String childName, String[] parentAttrs, String[] childAttrs) {
+		this.parentName = parentName;
+		this.childName = childName;
+		this.parentAttrs = parentAttrs;
+		this.childAttrs = childAttrs;
+	}
+	
+	@Override
+	public void dispose() { }
+
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }
+
+	@Override
+	public Object[] getElements(Object inputElement) {
+		NodeList nlist = (NodeList) inputElement;
+		Object[] children = new Object[nlist.getLength()];
+		for(int i = 0 ; i < children.length ; i++)
+			children[i] = nlist.item(i);
+		System.out.println("Elements: "+Arrays.toString(children)); //$NON-NLS-1$
+		return children;
+	}
+
+	@Override
+	public Object[] getChildren(Object parentElement) {
+		if( parentElement == null ) return new Object[0];
+		if( parentElement instanceof Element) {
+			Element elem = (Element) parentElement;
+			System.out.println("elem: "+elem); //$NON-NLS-1$
+			if( elem.getNodeName().equals(parentName)) {
+				NodeList nlist = elem.getElementsByTagName(childName);
+				Object[] children = new Object[nlist.getLength()];
+				for(int i = 0 ; i < children.length ; i++)
+					children[i] = nlist.item(i);
+				return children;
+			} else {
+				return new Object[0];
+			}
+		}
+		return new Object[0];
+	}
+
+	@Override
+	public Object getParent(Object element) {
+		if( element instanceof Element) {
+			Element elem = (Element) element;
+			if( elem.getNodeName().equals(parentName)) {
+				return null;
+			} else {
+				return elem.getParentNode();
+			}
+
+		}
+		return null;
+	}
+
+	@Override
+	public boolean hasChildren(Object element) {
+		if( element instanceof Element) {
+			return ((Element)element).getChildNodes().getLength() > 0;
+		}
+		return false;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ElementTreeContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ListContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ListContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ListContentProvider.java	(revision 324)
@@ -0,0 +1,26 @@
+package org.txm.rcp.swt.provider;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+public class ListContentProvider implements IStructuredContentProvider {
+
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }
+
+	@Override
+	public Object[] getElements(Object inputElement) {
+		if (inputElement instanceof List) {
+			return ((List)inputElement).toArray();
+		}
+		return new Object[0];
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/provider/ListContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_ru_utf8.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_ru_utf8.properties	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_ru_utf8.properties	(revision 324)
@@ -0,0 +1,863 @@
+About_Menu_Label=О платформе TXM...
+AdapterFactory_0=** Предупреждение: корпус {0} поврежден. Некоторые команды могут быть недоступны или функционировать некорркетно.
+AddBase_1=Новый корпус: {0}.
+AddBase_10=Платформа TXM готова к использованию.
+AddBase_16=** Невозможно записать язык {0} как свойство ''LANG'' структуры <txmcorpus>
+AddBase_17=** Файл {0} недоступен
+AddBase_19=Внимание
+AddBase_2=** Ошибка загрузки корпуса из папки: {0}.\nНевозможно найти необходимые составные элементы.
+AddBase_20=Корпус {0} уже существует. Хотите ли вы его заменить?
+AddBase_22=Файл {0} не соответствует формату TXM.
+AddBase_23=Корпус {0} не имеет свойства ''LANG'' при структуре <txmcorpus>
+AddBase_24=** Не удалось загрузить корпус {0}
+AddBase_25=Корпус TXM в бинарном формате - это либо файл с расширением .txm или .zip, либо директория с папками ''html'', ''data'', ''registry'', ''txm''
+AddBase_27=Загрузить корпус
+AddBase_28=Извлечение бинарного корпуса
+AddBase_29=Извлечено {0} за {1}
+AddBase_31=** Не удалось загрузить бинарный корпус: {0}
+AddBase_32=Загрузка корпуса в платформу
+AddBase_33=Перезагрузка платформы
+AddBase_34=Рабочая среда TXM не инициализирована. Пожалуйста, перезагрузите TXM.
+AddBase_4=** Не удалось загрузить бинарный корпу (null error).
+AddBase_7=** Не удалось создать бинарный корпус.
+AddProject_3=Введите название проекта
+AdvancePreferencePage_1=Папка установки TXM
+AdvancePreferencePage_12=Уровень детализации отчета
+AdvancePreferencePage_13=Добавить технический комментарий
+AdvancePreferencePage_14=Копировать отчет в файл
+AdvancePreferencePage_2=Папка пользователя TXM
+AdvancePreferencePage_3=Показывать время выполнения на консоли
+AdvancePreferencePage_4=N/A_Expert user mode
+Property=Свойства:
+NumberOfLines=Число строк:
+ApplicationWorkbenchAdvisor_0=Инициализация платформы...
+ApplicationWorkbenchAdvisor_1=Инициализация платформы...
+ApplicationWorkbenchAdvisor_11=Загрузка демонстрационных корпусов
+ApplicationWorkbenchAdvisor_12=** Ошибка: переменная среды ''TXMHOME'' задана ({0}), но нет папки: 
+ApplicationWorkbenchAdvisor_13=** Не удалось создать папку TXMHOME : {0}
+ApplicationWorkbenchAdvisor_14=\ проверка расширения:  
+ApplicationWorkbenchAdvisor_16=N/A_Removing old corpus backup directory: 
+ApplicationWorkbenchAdvisor_17=N/A_.
+ApplicationWorkbenchAdvisor_18=N/A_Corpus already backuped: 
+ApplicationWorkbenchAdvisor_19=** Не удалось задать параметры программы TreeTagger : {0}
+ApplicationWorkbenchAdvisor_2=Загрузка опций установки TXM из: {0}
+ApplicationWorkbenchAdvisor_20=N/A_\ in 
+ApplicationWorkbenchAdvisor_22=N/A_Processing folder: 
+ApplicationWorkbenchAdvisor_23=N/A_\ ...
+ApplicationWorkbenchAdvisor_24=N/A_Failed moving old corpus from 
+ApplicationWorkbenchAdvisor_25=Чтение опций из места установки: {0}
+ApplicationWorkbenchAdvisor_26=N/A_\ to  
+ApplicationWorkbenchAdvisor_27=Рабочая папка TXM уже существует. Загрузить ранее созданные корпусы?
+ApplicationWorkbenchAdvisor_28=Сохранение рабочей папки...
+ApplicationWorkbenchAdvisor_29=N/A_Error: 
+ApplicationWorkbenchAdvisor_3=Проверка наличия рабочей папки
+ApplicationWorkbenchAdvisor_30=Перемещение существующих корпусов...
+ApplicationWorkbenchAdvisor_31=** Не удалось создать рабочее пространство ''default.xml''
+ApplicationWorkbenchAdvisor_32=** TreeTagger не установлен или неверно заданы пути доступа.
+ApplicationWorkbenchAdvisor_33=Пути доступа к TreeTagger приведены к значениями по умолчанию.
+ApplicationWorkbenchAdvisor_34=** Ошибка: не удалсоь создать папку для сохранения корпуса
+ApplicationWorkbenchAdvisor_35=N/A_\nCorpus 
+ApplicationWorkbenchAdvisor_36=Перемещение \ 
+ApplicationWorkbenchAdvisor_37=\ в 
+ApplicationWorkbenchAdvisor_38=Внимание: корпус уже был сохранен.
+ApplicationWorkbenchAdvisor_39=Не хватает папки в директории установки TXM : {0}
+ApplicationWorkbenchAdvisor_4=Проверка установки TreeTagger
+ApplicationWorkbenchAdvisor_40=** Не удалось скопировать файлы из папки TXMINSTALL в TXMHOME: {0}
+ApplicationWorkbenchAdvisor_41=** Не удалось задать опции: {0}
+ApplicationWorkbenchAdvisor_42=\ перемещение 
+ApplicationWorkbenchAdvisor_43=Corpora {0} not restored, since this setup provides more recent ones.
+ApplicationWorkbenchAdvisor_43_single=Corpus {0} not restored, since this setup provides more recent ones.
+ApplicationWorkbenchAdvisor_44=** Невозможно перенести корпус 
+ApplicationWorkbenchAdvisor_45=** Файл не читается: {0}
+ApplicationWorkbenchAdvisor_46=N/A_\nCorpus 
+ApplicationWorkbenchAdvisor_47=** Невозможно сохранить существующие корпусы:
+ApplicationWorkbenchAdvisor_48=\nCorpus ''{0}'' could not be restored and are moved to ''{1}''.
+ApplicationWorkbenchAdvisor_49=N/A_Initializing the toolbox...
+ApplicationWorkbenchAdvisor_5=Стандартный выход
+ApplicationWorkbenchAdvisor_51=** Не удалось загрузить корпус из файла: 
+ApplicationWorkbenchAdvisor_52=** Не удалось загрузить демонстрационные корпусы: {0}
+ApplicationWorkbenchAdvisor_53=Восстановление корпусов из {0}
+ApplicationWorkbenchAdvisor_54=Преобразование корпусов из формата TXM 0.5 
+ApplicationWorkbenchAdvisor_55=\ в формат TXM 0.6.
+ApplicationWorkbenchAdvisor_56=** Не удалось преобразовать корпус в формат TXM 0.6
+ApplicationWorkbenchAdvisor_57=Загрузка преобразованного корпуса 0.5 
+ApplicationWorkbenchAdvisor_58=Загрузка корпуса 0.6 
+ApplicationWorkbenchAdvisor_59=** Ошибка во время загрузки 
+ApplicationWorkbenchAdvisor_6=Исключение: 
+ApplicationWorkbenchAdvisor_60=** Ошибка: корпус 
+ApplicationWorkbenchAdvisor_61=\ не является бинарным корпусом TXM 0.6
+ApplicationWorkbenchAdvisor_7=Создание рабочего пространства пользователя TXM.
+ApplicationWorkbenchAdvisor_71=Загрузка демонстрационных корпусов.
+ApplicationWorkbenchAdvisor_8=Путь установки: {0}
+ApplicationWorkbenchAdvisor_9=** Ошибка чтения файла опций установки
+ApplicationWorkbenchAdvisor_init=Запуск...
+ApplicationWorkbenchAdvisor_init_failed=** Запуск платформы прерван. Пожалуйста, отрегулируйте опции (в меню ''Файл>Опции'')
+ApplicationWorkbenchAdvisor_ready=Готово.
+Application_4=N/A_This file is not meant to run TXM. Please consult TXM user manual.
+Application_6=** Вы должны установить версию 1.6 Java или более поздниюю, прежде чем запустить TXM, установленная на этой машине версия Java: {0}
+AssistedQueryWidget_0=Ouvrir l''assistant de requêtes
+BackToText_0=Показать в полнотекстовом режиме
+CANT_CREATE_GRAPHIC=** Невозможно создать график
+CQPPreferenceInitializer_0=localhost
+CQPPreferenceInitializer_1=anonymous
+CQPPreferencePage_0=N/A_CQPlib path
+CQPPreferencePage_1=Использовать сетевой протокол
+CQPPreferencePage_10=Удаленный &сервер CWB
+CQPPreferencePage_11=Удаленный сервер: &имя машины
+CQPPreferencePage_12=Удаленный сервер: &номер порта
+CQPPreferencePage_13=Удаленный сервер: &логин
+CQPPreferencePage_14=Удаленный сервер: &пароль
+CQPPreferencePage_15=Путь к исполняемому &файлу ''cqpserver''
+CQPPreferencePage_16=Путь к папке &Регистр сервера CWB
+CQPPreferencePage_17=Путь к файлу инициализации сервера CWB
+CQPPreferencePage_18=Дополнительные опции сервера CWB: 
+Cannot_ask_simple_when_advance=Невозможно отобразить закладку простых опций, когда пользователь выбрал отображение дополнительных опций
+ColRowInfosLabelProvider_19=Qual
+ColRowInfosLabelProvider_9=\u03C7²
+ColsRowsInfosEditor_0=Ошибочный ввод
+ColsRowsInfosEditor_2=Информация: {0}
+Commands_0=Ошибка: невозможно инициализировать команды
+ComplexSortSelector_0=Ключи для сортировки:
+ComplexSortSelector_1=Мульти-сортировка
+ComplexSortSelector_2=Сортировка
+ComplexSortSelector_5=** Ошибка при сортировке: {0}
+ComplexSortSelector_6=по умолчанию
+ComplexSort_0=Открытие диалогового окна сложной сортировки
+ComplexSort_1=&Сложная сортировка
+ComplexSort_10=Недопустимый блок сравнения
+ComplexSort_11=Необходимо выбрать не менее двух блоков сравнения
+ComplexSort_12=Добавить в выделенному
+ComplexSort_14=Удалить из выделенного
+ComplexSort_16=Поднять выделение на один уровень
+ComplexSort_18=Опустить выделение на один уровень
+ComplexSort_2=Задать и использовать сложную сортировку
+ComplexSort_3=Выберите сложную сортировку
+ComplexSort_4=&Новый
+ComplexSort_5=Создать новый метод сортировки
+ComplexSort_6=Имя: 
+ComplexSort_9=Поле Имя обязательно.
+ComplexSubcorpusPanel_0=Выделить
+ComplexSubcorpusPanel_1=Все критерии
+ComplexSubcorpusPanel_16=не содержит
+ComplexSubcorpusPanel_2=отдельные критерии
+ComplexSubcorpusPanel_4=Запрос 
+ComplexSubcorpusPanel_5=Обновить
+ComputeConcordance_0=Открытие окна конкорданса
+ComputeConcordance_1=N/A_Failed to open concordance editor.
+ComputeCoocFromLines_0=Идет расчет совместной встречаемости
+ComputeCoocFromLines_1=Открытие таблицы совместной встречаемости
+ComputeCoocMatrix_0=N/A_Cooc matrix: 
+ComputeCoocMatrix_1=N/A_Number of nodes: 
+ComputeCoocMatrix_10=N/A_Distance
+ComputeCoocMatrix_11=N/A_Minimal co frequence
+ComputeCoocMatrix_12=N/A_Outfile : none
+ComputeCoocMatrix_13=N/A_Choose outfile
+ComputeCoocMatrix_2=N/A_Number of edges: 
+ComputeCoocMatrix_3=N/A_Distance: 
+ComputeCoocMatrix_4=N/A_Writing cooc matrix in GRAPHML file: 
+ComputeCoocMatrix_5=N/A_\"
+ComputeCoocMatrix_7=N/A_CoocMatrix parameters
+ComputeCooccurrences_0=Загрузка таблицы совместной встречаемости
+ComputeCooccurrences_1=** Невозможно вычислить совместную встречаемость в выделении
+ComputeFrequencyList_2=Расчет списка значений свойства {0} в корпусе {1}
+ComputeIndexFromLines_0=Выполнить команду Индекс на выделении
+ComputeLexicalTable_0=Составление словарной таблицы {0}
+ComputeLexicalTable_1=Составление словарной таблицы {0} со свойством {1}
+ComputeLexicalTable_10=Открытие словарной таблицы
+ComputeLexicalTable_12=Употребления в индексе
+ComputeLexicalTable_13=Выберите пределы для расчетов
+ComputeLexicalTable_16=Использовать все употребления
+ComputeLexicalTable_2=N/A_no property
+ComputeLexicalTable_3=Открытие диалогового окна конфигурации пределов
+ComputeLexicalTable_5=** Невозможно построить словарную таблицу из Индекса, рассчитанного на корпусе
+ComputeLexicalTable_6=** Списки значений должны строиться на одинаковых сочетаниях свойств: {0}
+ComputeLexicalTable_7=Списки значений должны иметь одинаковое распределение: {0}
+ComputeLexicalTable_9=** Диалоговое окно словарной таблицы: невозможно получить размер корпуса. Причина {0}
+ComputeReferencer_0=Открытие результата Ссылок
+ComputeSpecificitiesDialog_0=** Диалоговое окно ''Расчет специфичности'' - {0}
+ComputeSpecificitiesDialog_1=** Синтаксическая ошибка в регулярном выражении: {0}
+ComputeSpecificitiesDialog_3=Фокус:
+ComputeSpecificitiesDialog_4=Фокус части:
+ComputeSpecificitiesDialog_9=Нет доступного фильтра для части
+ComputeSpecificities_0=Расчет специфичности
+ComputeSpecificities_2=Расчет специфичности {0}, свойство {1} 
+ComputeSpecifities_10=Открытие таблицы результатов специфичности
+ComputeSpecifities_11=Расчет специфичности в словарной таблице {0}
+ComputeSpecifities_2=Обновление вида корпусов...
+ComputeSpecifities_3=Расчет специфичности в подкорпусе {0} корпуса {1}, свойство {2}
+Compute_Specificities=Расчет специфичности
+ConcordancerPreferencePage_3=Параметры конкордансов
+ConcordancerPreferencePage_4=Количество строк на &Странице : 
+ConcordancerPreferencePage_5=&Левый контекст (в словах)
+ConcordancerPreferencePage_6=&Правый контекст (в словах)
+ConcordancesEditorContributor_0=Конкорданс
+ConcordancesEditor_0=Последняя ошибка CQi : 
+ConcordancesEditor_1=Ссылка
+ConcordancesEditor_11=|<
+ConcordancesEditor_12=<
+ConcordancesEditor_13=>
+ConcordancesEditor_14=>|
+ConcordancesEditor_16=&Мотив: 
+ConcordancesEditor_18=&Редактировать
+ConcordancesEditor_19={0} употреблений
+ConcordancesEditor_2=Левый контекст
+ConcordancesEditor_20=Загрузка данных о строке...
+ConcordancesEditor_26=идентификатор проекта {0} идентификатор корпуса {1} идентификатор текста {2}
+ConcordancesEditor_27=Возврат к тексту: текст {0} отсутствует
+ConcordancesEditor_29=Страница не найдена... для 
+ConcordancesEditor_3=Мотив
+ConcordancesEditor_30=Возврат к тексту: издание по умолчанию не найдено
+ConcordancesEditor_34=Загрузка конкорданса
+ConcordancesEditor_37=Сортировка ссылок
+ConcordancesEditor_38=Скрыть параметры
+ConcordancesEditor_39=Показать параметры
+ConcordancesEditor_4=Правый контекст
+ConcordancesEditor_41=Сортировка левого контекста
+ConcordancesEditor_43=Корпус {0} не имеет ссылок по умолчанию: {1}
+ConcordancesEditor_45=Сортировка мотива
+ConcordancesEditor_46=** Невозможно показать в тексте: {0}
+ConcordancesEditor_48=Сортировка правого контекста
+ConcordancesEditor_5=Конкорданс мотива <{0}> в корпусе {1}
+ConcordancesEditor_50=Открытие издания
+ConcordancesEditor_52=Готово: один результат
+ConcordancesEditor_55=Открытие диалогового окна свойств
+ConcordancesEditor_56=Начало расчета конкордансов
+ConcordancesEditor_6=Сортировка...
+ConcordancesEditor_7=N/A_CQP error: 
+ConcordancesEditor_8=N/A_The corpus has no text_id property
+ConvertCorpus_0=N/A_Corpus conversion failed.
+CorporaView_0=Корпус
+CorporaView_1=** Ошибка: {0}
+CorporaView_2=** Не удалось получить размеры корпуса {0}
+CorporaView_3=** Произошла ошибка при расчете конкорданса
+CorporaView_4=N/A_CoocMatrix symbol is: 
+CorporaView_5=** Произошла ошибка при расчете специфичности
+CorporaView_6=** Не удалось открыть окно Мастера ссылок\t
+CorporaView_7=** Произошла ошибка при расчете словарной таблицы
+CorporaView_9=** Ошибка: не удается проивести запись в {0}
+CorpusPage_0=Издания
+CorpusPage_1=Добавить издание
+CorpusPage_10=Свойства слова
+CorpusPage_11=Добавить определение свойства
+CorpusPage_12=Добавить опредление свойства структуры
+CorpusPage_13=Удалить определение свойства
+CorpusPage_14=Подкорпуса и распределения по умолчанию
+CorpusPage_15=Добавить подкорпус
+CorpusPage_16=N/A_punctuation characters
+CorpusPage_17=Удалить подкорпус
+CorpusPage_18=Добавить распределение
+CorpusPage_19=N/A_Elision characters
+CorpusPage_2=Удалить издание
+CorpusPage_20=Удалить распределение
+CorpusPage_21=Добавить запрос
+CorpusPage_22=N/A_End of sentence characters
+CorpusPage_23=Удалить запрос
+CorpusPage_24=Свойства структуры
+CorpusPage_25=Добавить определение свойства структуры
+CorpusPage_26=N/A_Annotate the corpus
+CorpusPage_27=Удалить определение свойства структуры
+CorpusPage_28=Использовать только эти тесты при словарной сегментации
+CorpusPage_29=Добавить параметр
+CorpusPage_3=Шрифт
+CorpusPage_31=Удалить параметр
+CorpusPage_32=Добавить тест
+CorpusPage_33=Добавить параметр
+CorpusPage_34=Удалить тест
+CorpusPage_35=1.\tНажмите на значок 
+CorpusPage_36= ''папка'', чтобы 
+CorpusPage_37=выбрать папку с исходными материалами.
+CorpusPage_38=2.\tВы можете изменить параметры на следующих этапах.
+CorpusPage_39=3.\tВы можете 
+CorpusPage_4=Добавить параметр
+CorpusPage_40=сохранить параметры импорта,
+CorpusPage_41=\ нажав на значок дискеты: 
+CorpusPage_42=4.\tЧтобы
+CorpusPage_43=начать импортирование,
+CorpusPage_44=\ нажмите на этот значок: 
+CorpusPage_45=ПИ
+CorpusPage_46=Папка с исходными материалами не содержала файл ''import.xml''. Создан новый.
+CorpusPage_47=Ошибка при создании файла ''import.xml'' 
+CorpusPage_48=Загрузка параметров импорта из файла: 
+CorpusPage_49=N/A_Default
+CorpusPage_5=N/A_Whitespace characters
+CorpusPage_50=Параметры модуля: 
+CorpusPage_51=Только эти тесты
+CorpusPage_52=Сохранение параметров импорта...
+CorpusPage_53=Имя корпуса обязательно
+CorpusPage_54=Имя корпуса должно содержать хотя бы одну букву
+CorpusPage_55=Только эти тесты
+CorpusPage_6=Удалить параметр
+CorpusPage_60=N/A_OK
+CorpusPage_65=N/A_Cannot save import configuration. No source folder selected.
+CorpusPage_66=N/A_Cannot start import configuration. No source folder selected.
+CorpusPage_7=Общая информация
+CorpusPage_8=Имя корпуса*
+CorpusPage_9=Описание - HTML
+CreateFile_1=Новый файл: {0}
+CreateFolder_1=Новая папка: {0}
+CreateFrequencyList_8=Загрузка таблицы частотности
+CreateMacro_0=N/A_Macro name
+CreateMacro_1=N/A_Please write the macro name
+CreatePartitionDialog_0=Создать Распределение
+CreatePartitionDialog_1=Простое
+CreatePartitionDialog_16=Запросы не должны быть пустыми
+CreatePartitionDialog_2=&Структура: 
+CreatePartitionDialog_3=С подсказкой
+CreatePartitionDialog_4=С&войство: 
+CreatePartitionDialog_5=Продвинутое
+CreatePartitionDialog_6=&Имя: 
+CreatePartitionDialog_7=Часть 
+CreatePartitionDialog_8=Не задана ни одна часть
+CreatePartitionDialog_9=Имя распределения не вводилось. Автоматическое имя: {0}
+CreatePartition_0=Создание распределения по {0}
+CreatePartition_2=** Ошибка: распределение не создано
+CreatePartition_5=Готово: {0} пунктов на {1} употреблений
+CreatePartition_55=N/A_Done: {0} items for {1} occurrences
+CreatePartition_6=Готово: {0} частей
+CreatePartition_9=Обновление вида корпусов...
+CreateSubCorpus_0=** Ошибка: подкорпус не был создан
+CreateSubCorpus_1=Последняя ошибка CQP: 
+CreateSubCorpus_2=N/A_Failed to get last CQP error: 
+CreateSubCorpus_begin=Новый &Подкорпус
+CreateSubCorpus_create=Создать новый подокорпус для {0}
+CreateSubcorpusDialog_0=Создать подкорпус
+CreateSubcorpusDialog_10=&Запрос: 
+CreateSubcorpusDialog_11=Некорректное имя
+CreateSubcorpusDialog_13=Некорректный запрос
+CreateSubcorpusDialog_14=Поле Запрос не должно быть пустым.
+CreateSubcorpusDialog_6=Зна&чение: 
+CreateSubcorpusDialog_8=Имя подкорпуса создано автоматически.
+CreateSubcorpus_7=Составление подкорпуса для {0}, структура {1}, свойство {2} : {3}
+CreateSubcorpus_8=Готово : {0} образован 
+CreateSubcorpus_9=Составление подкорпуса для {0} по запросу <{1}>
+DONE=Готово: {0}
+DefineReferencePattern_0=Шаблон ссылок для отображения
+DefineReferencePattern_1=Шаблон ссылок для &отображения
+DefineReferencePattern_2=Шаблон ссылок для отображения
+DefineReferencePattern_3=Шаблон ссылок для &сортировки
+DefineReferencePattern_4=Шаблон ссылок для сортировки
+DefineReferencePattern_5=Шаблон ссылок для сортировки
+DeleteFile_0=Вы уверены, что хотите удалить 
+DeleteFile_2=** Не удалось удалить файл 
+DeleteInCorporaView_1=** Ошибка при удалении подкорпуса {0}
+DeleteInCorporaView_2=** Ошибка при удалении распределения {0}
+DeleteLines_0=Таблица должна содержать хотя бы одну строчку
+DeleteLines_1=Вы уверены?
+DeleteObject_0=Вы действительно хотите удалить {0}?
+DeleteObject_10={0} удален(о)
+DeleteObject_3=** Ошибка во время удаления
+DeleteObject_4=Ошибка во время удаления {0} : {1}
+DeleteObject_5=Удаление {0}
+DiagnosticPreferencePage_1=Описание
+DiagnosticPreferencePage_2=Число отображаемых значений свойства
+DiagnosticPreferencePage_3=Сортировать части по размеру
+Diagnostique_0=Структурные единицы {0}
+Diagnostique_1=Информация о {0} уже сформирована. Хотите ли Вы ее обновить?
+Diagnostique_10=Получение информации о структурных единицах
+Diagnostique_11=Открытие окна
+Diagnostique_2=** Ошибка при чтении файла *informations* 
+Diagnostique_7=Создание окна с информацией
+Diagnostique_8=Получение общей информации
+Diagnostique_9=Получение данных о словарных единицах
+ERROR_WHILE_LOADING_CONCORDANCE_LINE=** Ошибка во время загрузки строк конкорданса: {0}
+ElementTreeLabelProvider_0=** Ошибка: элемент не записан 
+ElementTreeLabelProvider_1=** Ошибка: объект не является ''org.w3c.Element''
+EmpantWidget_0=Контекст: 
+EmpantWidget_1=форма
+EmpantWidget_2=структура
+EmpantWidget_3=от -
+EmpantWidget_4=до -
+EmpantWidget_5=и от
+EmpantWidget_6=до
+EmpantWidget_7=вклюая структуру, содержащую мотив
+EmpantWidget_8=Активный левый контекст
+EmpantWidget_9=Активный правый контекст
+Error_computing_specificities=** Ошибка во время расчета специфичности: {0}
+Error_creating_partition=** Ошибка во время создания распределения: {0}
+ExecuteGroovyScriptFromFile_2=Скрипт Groovy должен находиться в папке {0}
+ExecuteGroovyScript_0=\ мс
+ExecuteGroovyScript_1=N/A_Error during parameters initialisation
+ExecuteGroovyScript_2=N/A_The user canceled the script execution
+ExecuteRScript_1=Выполнение 
+ExecuteRScript_2=Готово: 
+ExecuteRScript_3=\ мс
+ExecuteRText_0=Выполнение выделения текста... 
+ExecuteRText_1=** Ошибка во время выполнения скрипта R {0}: {1}
+ExecuteRText_2=\ мс
+ExecuteScriptImport_0=Начало импортирования
+ExecuteScriptImport_1=** Файл скрипта {0} не найден
+ExecuteScriptImport_2=** Ошибка: папка ''corpora'' не существует: 
+ExecuteScriptImport_3=N/A_Error: the folder {0} still exists. Cannot continue import. You can delete it manually and restart the import.
+ExecuteScriptImport_5=** Ошибка в параметрах словарной сегментации: импортирование прервано.
+ExecuteScriptImport_6=Импортирование не завершено.
+ExecuteScriptImport_7=Импортирование завершено: 
+ExecuteScriptImport_8=** Ошибка при загрузке корпуса
+ExecuteScriptR_0=** Файл скрипта R {0} не найден
+ExecuteScriptR_1=** Ошибка при выполнении скрипта R {0}: {1}
+ExecuteScript_3=** Не найдено ни одного интерпретатора для расширения файла скрипта 
+Exit_Menu_Label=Выход
+Explorer_0=Папка {0} не должна быть удалена
+Explorer_1=N/A_Go to parent folder
+Explorer_2=N/A_Go to TXM home
+Explorer_3=TXM
+Explorer_4=\u21E7
+Explorer_5=\u21BB
+Explorer_6=N/A_Refresh
+Explorer_7=N/A_\u2302
+Explorer_8=N/A_Go to TXM Home
+ExportCorpus_0=** Не удалось экспортировать корпу {0}
+ExportCorpus_3=Экпортирование 
+ExportCorpus_4=Готово, бинарный файл - {0}
+ExportPreferencePage_1=Конфигурация экспорта
+ExportPreferencePage_18=Разделитель полей
+ExportPreferencePage_19=Разделитель текста
+ExportPreferencePage_21=Формат графиков R по умолчанию
+ExportPreferencePage_3=Кодировка экспортируемых файлов
+ExportPreferencePage_4=Показать результаты экспорта в текстовом редакторе
+ExportResult_0=Экспорт результатов
+ExportResult_1=N/A_Exporting...
+ExportResult_2=Результаты экспорта сохранены: 
+ExportResult_3=** Экспорт: невозможно создать файл {0}: {1}
+ExportResult_4=** Не удалось произвести экспорт в 
+ExportResult_5=** Не удается прочитать {0}
+ExportResult_6=** Не удалось экспортировать результат {0}: {1}
+ExportSVG_0=N/A_Exporting SVG...
+ExportSVG_2=N/A_Exporting with device: 
+FAILED_TO_PARSE_OPTIONS=** Не удалось проанализировать опции TXM {0}: {1}
+FAILED_TO_SAVE_PREFERENCES=** Не удалось сохранить персональные настройки
+FactorialMapEditor_0=Факторы:  
+FactorialMapEditor_10=** Внутренняя ошибка: ошибка выбора плана ФАС
+FactorialMapEditor_11=Изменить размер
+FactorialMapEditor_13=Обновление факторного плана
+FactorialMapEditor_4=Показать: 
+FactorialMapEditor_5=колонки
+FactorialMapEditor_6=строки
+FactorialMapEditor_8=Перезагрузка факторного плана
+FileExplorerPreferencePage_0=Рег. выр. скрытых файлов
+FileExplorerPreferencePage_1=Показать скрытые файлы
+FileExplorerPreferencePage_2=Показать папки
+FileTreeContentProvider_1=** Проводник: некорректное регулярное выражение
+FileTreeContentProvider_2=\ ОШИБКА 
+FileTreeContentProvider_3=Элемент ошибки: ''
+FileTreeContentProvider_4=''
+FrequencyListEditorInput_0=Список форм
+FrequencyListEditorInput_1=Pareto
+FrequencyListEditorInput_2=Список форм не может быть пустым
+FrequencyListEditorInput_3=Форма
+FrequencyListEditorInput_4=Частотность
+FrequencyListEditorInput_5=Цепочка знаков
+FrequencyListEditorInput_6=Целое
+FrequencyListEditorInput_9=Тип
+GenericMultiPageEditor_1=** Внутренняя ошибка: невозможно показать данные {0}.
+GenericMultiPageEditor_3=** Внутренняя ошибка: число редакторов RCP ({0}) должно соответствовать числу вводов ({1}).
+GetConcordancesDialog_0=** Диалоговое окно конкордансов: {0}
+GetConcordancesDialog_1=Расчет специфичности 
+GetConcordancesDialog_13=Вы должны выбрать одно свойство
+GetConcordancesDialog_14=Некорректное свойство
+GetConcordancesDialog_15=Вы должны выбрать одно свойство
+GetConcordancesDialog_4=С&войство : 
+GetConcordancesDialog_5=&Левый контекст (слова) : 
+GetConcordancesDialog_6=&Правый контекст (слова) : 
+GetConcordancesDialog_7=&Ссылка: 
+GetConcordances_4=** Ошибка при расчете конкордансов: {0}
+GraphicalLogger_0=** Ошибка {0}
+GroovyConsole_4=\nВнутренняя ошибка.
+GroovyConsole_5=Ошибка: 
+ImportDialog_0=Параметры импорта - {0}
+ImportDialog_1=Папка с исходными материалами
+ImportDialog_13=Не удается найти корпус в бинарном формате в этой папке
+ImportDialog_14=Кодировка по умолчанию этого компьютера
+ImportDialog_16=Угадать
+ImportDialog_19=Язык по умолчанию этого компьютера
+ImportDialog_22=Выбрать
+ImportDialog_23=Опции
+ImportDialog_4=Кодировка букв: 
+ImportDialog_5=Основной язык: 
+ImportDialog_6=Параметры словарной сегментации: 
+ImportFormEditor_0=** отсутствует скрипт для импорта {0} 
+ImportPreferencePage_0=Кодировка
+ImportSelectedText_0=Импорт текста из буфера обмена
+ImportSelectedText_1=буфер обмена
+ImportSelectedText_10=Идентифицированный язык 
+ImportSelectedText_12=Невозможно определить язык текста. Будет использован 
+ImportSelectedText_2=** Буфер обмена пуст
+ImportSelectedText_3=Подтвердить
+ImportSelectedText_4=Корпус {0} будет удален
+ImportSelectedText_6=** Внутренняя ошибка: не удается найти проект ''default'' 
+InternalCorpusView_0=** Ошибка при подготовке информации о корпусе
+InternalCorpusView_1=Перезагрузить
+InternalCorpusView_2=** Внутренняя ошибка: getText {0}
+InternalViewEditor_1=Подготовка внутреннего вида...
+InternalViewEditor_10=Внутренний вид: ошибка инициализации: 
+InternalViewEditor_11=OK
+InternalViewEditor_16=Ошибка
+InternalViewEditor_2=Получение следующего результата...
+InternalViewEditor_25=сформированный запрос: 
+InternalViewEditor_3=Перезагрузка интерфейса
+InternalViewEditor_4=Структура: 
+InternalViewEditor_5=Свойство структуры: 
+Invalid_analysis_property=Некорректное свойство
+JobHandler_0=N/A_Canceling...
+JobHandler_1=N/A_Canceling 
+JobHandler_2=N/A_\ canceling requested
+JobHandler_3=N/A_Failed to cancel 
+JobsTimer_12=ч., 
+JobsTimer_13=\ мин. и 
+JobsTimer_15=Проделано за {0} ({1}).
+JobsTimer_16=. (
+JobsTimer_17=\ мс)
+JobsTimer_19=\u041F\u0440\u043E\u0434\u0435\u043B\u0430\u043D\u043E \u0437\u0430 {0}.
+JobsTimer_2=\ мс
+JobsTimer_20=Job: 
+JobsTimer_21=Exec: 
+JobsTimer_5=\ с
+JobsTimer_9=\ мин. и 
+LanguageSwitchHandler_0=Язык интерфейса (LOCALE) не был определен
+LanguageSwitchHandler_1=Файл {0} не найден
+LanguageSwitchHandler_3=Выбрать язык
+LanguageSwitchHandler_5=** Изменение яызка: некорректый формат URL {0}
+LanguageSwitchHandler_7=TXM.ini : 
+LexicalTableEditor_1=** Ошибка: Не совпадает число колонок: до 
+LexicalTableEditor_10=Объед. или Удал. колонок
+LexicalTableEditor_11=Объед. колонок: {0}
+LexicalTableEditor_12=Удал. колонок: {0}
+LexicalTableEditor_13=Объед. или Удал. строк
+LexicalTableEditor_14=** Не удалось импортировать словарную таблицу
+LexicalTableEditor_15=** Ошибка при импортировании данных:  
+LexicalTableEditor_16=Фильтрация строк
+LexicalTableEditor_18=Объединение строк
+LexicalTableEditor_2=, Fmin 
+LexicalTableEditor_3=, Fmax 
+LexicalTableEditor_4=Оставить
+LexicalTableEditor_5=Оставить {0} строк, Fmin {1}
+LexicalTableEditor_6=Fmin :
+LexicalTableEditor_7=\ после  
+LexicalTableEditor_8=Число строк 
+LexicalTablePreferencePage_0=Словарная таблица
+LexicalTablePreferencePage_1=Минимальная частотность
+LexicalTable_1=Свойство
+LineLabelProvider_1=Не должно происходить
+LocalePreferencePage_1=Конфигрурация языка пользовательского интерфейса
+LocalePreferencePage_2=Язык интерфейса 
+MacrosExplorer_0=N/A_New macro
+MacrosExplorer_1=N/A_Create a new macro from a template
+MainPage_0=Главная страница
+MainPage_1=Главный
+MainPage_10=\tЧтобы перейти на следующую панель, используйте закладку снизу.\n
+MainPage_11=3-\tВы можете сохранить параметры импорта с помощью значка дискеты.\n
+MainPage_12=4-\tДля запуска импорта нажмите на зелёную стрелку.
+MainPage_13=параллелизм
+MainPage_14=Корпуса
+MainPage_15=Добавить параллельный корпус
+MainPage_17=Введите имя корпуса
+MainPage_18=Входная стилевая таблица XSL
+MainPage_19=Параметры словарной сегментации
+MainPage_2=Параметры импорта в модуле {0}
+MainPage_20=Основной язык
+MainPage_22=Удалить корпус
+MainPage_23=Кодировка
+MainPage_25=Введите имя удаляемого корпуса
+MainPage_27=Гиперссылки
+MainPage_28=** Ошибка при получении кодировки
+MainPage_29=Добавить гиперссылку
+MainPage_3=Папка с исходными материалами: 
+MainPage_30=Создать гиперссылку из корпуса: 
+MainPage_31=Выберите 2 корпуса:
+MainPage_33=seg
+MainPage_34=Удалить гиперссылку
+MainPage_36=Введите номер удаляемой строки
+MainPage_38=Убрать гиперссылку №
+MainPage_39=Введите корректное число
+MainPage_4=Имя корпуса (базы)
+MainPage_40=Первый корпус
+MainPage_42=Структура выравнивания
+MainPage_44=* \n(имя архива без расширения, в котором будет храниться корпус)
+MainPage_45=Описание
+MainPage_46=Добавить 
+MainPage_47=N/A_
+MainPage_49=N/A_base name is mandatory
+MainPage_5=N/A_Opening...
+MainPage_50=N/A_refresh links table
+MainPage_52=N/A_The source directory does not contain import.xml
+MainPage_53=N/A_Sorry, ''the import.xml'' file could not been created
+MainPage_54=N/A_Load params from: 
+MainPage_55=N/A_Params: 
+MainPage_6=N/A_Saving...
+MainPage_7=N/A_Starting...
+MainPage_8=N/A_1-\tClick on the ''folder'' icon to choose the source directory\n
+MainPage_9=N/A_2-\tIf you want to add details such as default subcorpus, exemple queries or types of word properties,\n
+MergeCols_1=Новое имя
+MergeCols_2=Имя новой колонки, образованной объединением
+MergeCols_5=Имена: 
+MergeCols_6=Объединение колонок завершено.
+MergeDeleteDialog_0=объединить
+MergeDeleteDialog_1=Объединить/Удалить
+MergeDeleteDialog_4=имя результата объединения
+MergeLines_2=Наберите имя новой строки, образованной в результате объединения
+MetadataPage_1=Метаданные
+MetadataPage_2=Параметры метаданных
+MetadataPage_3=Открыть файл с метаданными
+MetadataPage_4=Заглавия колонок в файле с метаданными 
+MetadataPage_5=Индентификатор текста
+MetadataPage_7=** Не удалось найти файл с метаданными {0}
+MultipleValueTreeDialog_0=добавление: 
+NavigationWidget_0=N/A_Error while getting current position value : 
+ObjectExplorer_0=Информация: 
+ObjectExplorer_10=Удалить свойство
+ObjectExplorer_12=Набрать имя удаляемого свойства
+ObjectExplorer_15=Добавить свойство нижестоящим элементам
+ObjectExplorer_2=Значение
+ObjectExplorer_21=Удалить свойство у нижестоящих элементов
+ObjectExplorer_26=Имя
+ObjectExplorer_27=Ключ
+ObjectExplorer_3=Новое свойство
+ObjectExplorer_4=Имя свойства
+ObjectExplorer_5=Введите имя добавляемого свойства
+ObjectExplorer_7=новое имя
+ObjectExplorer_9=
+ObjectSelectionDialog_0=Селектор значений
+ObjectSelectionDialog_3=Найдено {0} значений
+ObjectSelectionDialog_5=Некорректное регулярное выражение: {0}
+ObjectSelector_0=Объект: 
+ObjectSelector_1=Выбор
+OpenBiblio_1=** В корпусе нет ни одного текста {0}
+OpenBiblio_2=Выбрать текст
+OpenBiblio_7=** Не удается найти текст {0} в корпусе {1}
+OpenBiblio_9=** Нет ни одной библиографической записи для текста {0}
+OpenBrowser_0=** Ошибка при открытии библиографической записи 
+OpenBrowser_1=. URL
+OpenEdition_0=Выбрать часть
+OpenEdition_1=** Не удалось загрузить издание {0}
+OpenEdition_3=Открытие издания 
+OpenEdition_5=** Не удается найти первый текст с идентификатором {0} в корпусе или
+OpenEdition_7=** Не удается найти издание по умолчанию 
+OpenEdition_8=** Не удается найти первую страницу издания 
+OpenEmptyEditor_2=** Библиография: не удается найти папку {0}
+OpenGraph_8=** Не удается октрыть график {0}
+OpenParaBrowser_0=Открытие Парабраузер//
+OpenSVGGraph_0=График SVG 
+OpenTXMUserPreferences_0=Параметры по умолчанию
+OpenURI_0=** OpenURL : Рабочий стол не поддерживается
+OpenURI_1=** Ошибка при открытии файла {0}
+ParaBrowserEditor_11=ParaBrowser : get next({0}) struct {1} paraid {2} value {3}
+ParaBrowserEditor_18=-Перейти к 
+ParaBrowserEditor_19=-Оставаться на месте!!!!! NEXT - 
+ParaBrowserEditor_21=_
+ParaBrowserEditor_22=Открыть встроенный браузер
+ParaBrowserEditor_3=Ссылка : 
+ParaBrowserEditor_4=Ссылки
+ParaBrowserEditor_5=Структура
+ParaBrowserEditor_9=Ссылки: {0} : {1}
+ParametersDialog_0={0} parameters input
+ParametersDialog_1=N/A_Run
+ParametersDialog_10=N/A_Unknowed widget name: ''
+ParametersDialog_11=N/A_(* mandatory fields)
+ParametersDialog_12=N/A_** Error : missing value: 
+ParametersDialog_13=N/A_** Error : format error: 
+ParametersDialog_14=N/A_Error in @Option name declaration: 
+ParametersDialog_15=N/A_Error: the bean is not a groovy.lang.Script object
+ParametersDialog_17=N/A_Error: the ''monitor'' (JobHandler class) binding is missing. Got\: {0}.
+PartitionComposer_0=Структура: 
+PartitionComposer_11=Удалить
+PartitionComposer_2=Выбрать значения для назначения: 
+PartitionComposer_3=Новая часть
+PartitionComposer_5=Часть
+PartitionComposer_6=Удалить все части
+PartitionComposer_8=Заголовок: 
+PartitionComposer_9=Назначить
+PartsSize_0=N/A_\n Sorted by size
+PartsSize_10=Размеры распределения {0} корпуса {1} в порядке величины
+PartsSize_2=N/A_Number of words per part
+PasteFile_1=** Ошибка при копировании  
+PasteFile_3=** Не удалось удалить
+PasteFile_4= : 
+Preferences_Menu_Label=Опции
+ProgressionForm_0=N/A_Type :
+ProgressionForm_1=N/A_cumulatif
+ProgressionForm_10=N/A_R�p�t�
+ProgressionForm_11=N/A_N&&B
+ProgressionForm_12=N/A_REQUETES :
+ProgressionForm_13=N/A_ajouter
+ProgressionForm_14=N/A_supprimer
+ProgressionForm_2=N/A_densit�
+ProgressionForm_3=N/A_Echelle
+ProgressionForm_5=N/A_Options d''affichage
+ProgressionForm_6=N/A_Unit� structurelle :
+ProgressionForm_7=N/A_Propri�t� :
+ProgressionForm_8=N/A_Exp. R�g. :
+ProgressionForm_9=N/A_Syles de ligne diff�rents
+PropertiesSelector_0=Не удается загрузить свойства корпуса {0} ({1})
+PropertiesSelector_1=Свойства: 
+PropertiesSelector_2=Править
+PropertySelector_0=Выбрать свойство
+PurgeCorpora_0=Осторожно! Эта команда приведет к удалению всех выделенных корпусов. Продолжить?
+PurgeCorpora_1=Удаляемые корпуса 
+PurgeCorpora_10=Создание нового рабочего пространства
+PurgeCorpora_12=Перезагрузка платформы
+PurgeCorpora_13=** Ошибка: не удалось найти рабочее пространство: 
+PurgeCorpora_2=** Внимание! не были удалены корпуса: 
+PurgeCorpora_3=Осторожно! Эта команда приведет к удалению всех корпусов. Продолжить?
+PurgeCorpora_4=** Ошибка: переменная окружения ''TXMHOME'' не задана (ее значение по умолчанию -  ''$HOME/TXM''). Работа прекращена.
+PurgeCorpora_5=Удаление всех корпусов
+PurgeCorpora_7=** Не удалось удалить корпуса
+PurgeCorpora_9=** Не удалось удалить регистр
+QueriesView_1=Экспортировать всё
+QueriesView_10=ошибка: 
+QueriesView_5=Запросы:\n
+QueryAssistDialog_0=Мастер Запросов
+QueryAssistDialog_1=Дополнительное слово
+QueryAssistDialog_10=совпадает с
+QueryAssistDialog_11=начинается с
+QueryAssistDialog_12=заканчивается на
+QueryAssistDialog_13=содержит
+QueryAssistDialog_2=Я ищу: 
+QueryAssistDialog_3= слово
+QueryAssistDialog_32=за ним 
+QueryAssistDialog_33=с интервалом не менее 0 слов
+QueryAssistDialog_34=с интервалом не менее 1 слова
+QueryAssistDialog_8=- Слово №
+QueryIndexEditor_0=N/A_Query Index of 
+QueryIndexEditor_1=N/A_replacing line: 
+QueryIndexEditor_10=N/A_queries
+QueryIndexEditor_11=N/A_QueryIndex tooltip
+QueryIndexEditor_2=N/A_Failed to add line with query: 
+QueryIndexEditor_3=N/A_Line added.
+QueryIndexEditor_4=N/A_Load from a file
+QueryIndexEditor_5=N/A_*.properties
+QueryIndexEditor_6=N/A_Cannot read from file: 
+QueryIndexEditor_7=N/A_Link to concordance
+QueryIndexEditor_8=N/A_Link to progression
+QueryIndexEditor_9=N/A_delete lines
+RPreferencePage_0=N/A_Run RServe in debug mode
+RPreferencePage_1=N/A_Port (default is 6311)
+RPreferencePage_2=Путь к исполняемому &файлу R
+RPreferencePage_3=Удаленное соединение
+RPreferencePage_4=Адрес сервера
+RPreferencePage_5=Пользователь
+RPreferencePage_6=Пароль
+RPreferencePage_7=Использовать передачу данных R через файл
+RVariablesView_1=Обновить переменные
+RVariablesView_2=Показать отчет об оценках
+RVariablesView_9=имя TXM {0} >> имя R {1}
+ReferencerEditor_0=Расчет ссылок <{0}> в {1} с приоритетом {2} по шаблону {3}
+ReferencerEditor_10=Получение индексов
+ReferencerEditor_11=Ссылки
+ReferencerEditor_12=Группировка позиций по индексам
+ReferencerEditor_13=Обновление интерфейса
+ReferencerEditor_17=Показ первой страницы результатов 
+ReferencerEditor_19=Показ последней страницы результатов 
+ReferencerEditor_21=Показ следующей страницы результатов 
+ReferencerEditor_23=Показ предыдущей страницы результатов 
+ReferencerEditor_25=Открытие конкорданса
+ReferencerEditor_5=Расчет ссылок {0}
+ReferencerEditor_6=Шаблон ссылок 
+ReferencerEditor_7=Ни одного результата
+ReferencerEditor_8=Получение употреблений
+ReferencerEditor_9=Единицы
+ReferencerPreferencePage_2=Ссылки
+ReferencerPreferencePage_3=Сортировать ссылки по частотности
+RenameFile_0=Переименовать файл
+RenameFile_2=Переименование через: 
+RenameFile_3=** Не удалось переименовать 
+ProgressionDialog_0=Параметры прогрессии 
+ProgressionDialog_1=Тип графа: 
+ProgressionDialog_10=Прогрессия: некорректное регулярное выражение: 
+ProgressionDialog_11=Масштаб полос
+ProgressionDialog_13=Опции вида
+ProgressionDialog_14=Различные стили строк
+ProgressionDialog_15=Повторять идентичные значения
+ProgressionDialog_16=Ч/Б
+ProgressionDialog_17=Ошибка: мультипликатор полосы: 
+ProgressionDialog_2=кумулятивный
+ProgressionDialog_3=плотность
+ProgressionDialog_4=Структурная единица: 
+ProgressionDialog_5=удалить
+ProgressionDialog_7=Рег. Выр.: 
+ProgressionDialog_8=Запросы: 
+ProgressionDialog_9=добавить
+ProgressionEditorInput_0=PROGRESSION NAME
+RestartTXM_0=Перезагрузка видов...
+RestartTXM_1=Перезагрузить TXM
+RunGroovyScript_0=Выполнение скрипта
+RunGroovyScript_1=&Выполнить скрипт
+RunGroovyScript_2=Выполнить скрипт
+RunGroovyScript_3=*.groovy
+RunGroovyScript_4=Ошибка при открытии скрипта groovy : {0}
+RunGroovyScript_8=** Ошибка при выполнении скрипта groovy : {0}
+RunGroovyScript_9=Выполнение скрипта
+SVGGraphicEditor_1=Не удается показать график на основе предоставленной информации.
+SaveAs_2=** Не удалось сохранить 
+ScriptPreferencePage_0=Следующий номер сессии 
+ScriptPreferencePage_3=&Корневая папка
+SendToR_0=Передача в рабочее пространство R: 
+SendToR_3=Поиск видов...
+SetContextSize_1=Задать размер &контекстов
+SetContextSize_2=Задать размер контекстов
+SetContextSize_3=Размер левого контекста
+SetContextSize_4=Размер правого контекста
+SetEncoding_0=Изменить кодировку
+SetEncoding_1=Изменить кодировку.\n\n\tИспользуемая кодировка: 
+SetEncoding_2=\n\tКодировка по умолчанию:  
+SetLineNumber_0=Количество строк на странице
+SetLineNumber_1=№ строки
+SetSortProperty_1=Задать свойство &Сортировки
+SetSortProperty_2=Задать свойство сортировки
+SetSortProperty_3=Свойство сортировки
+ShowSelected_4=Править свойство ''LANG''
+ShowSvgHelp_0=Команды SVG
+ShowSvgHelp_1=Перевод: Shift + Левый щелчок + Перетащить\n
+ShowSvgHelp_2=Масштаб +/- : Shift + Правый щелчок + Перетащить\n
+ShowSvgHelp_3=Увеличение выделения: Ctrl + Левый щелчок + Перетащить\n
+ShowSvgHelp_4=Поворот: Ctrl + Правый щелчок + Перетащить\n
+ShowSvgHelp_5=Исходное состояние: F5
+SingularValuesEditor_0=Ошибочный ввод
+SortPropertySelection_0=Выбрать свойства для сортировки
+Structure_field_not_empty=Поле Структура не должно быть пустым.
+Submit_0=Сохранить
+TXMCqpServerWatcher_0=Поисковая машина остановлена
+TXMCqpServerWatcher_1=Пожалуйста, подождите, пока поисковая машина перезагружается...
+TXMRServeWatcher_0=Статистическая машина остановлена
+TXMRServeWatcher_1=Пожалуйста, подождите, пока статистическая машина перезагружается...
+TXMRServeWatcher_2=Ok
+TXMRServeWatcher_3=Перезагрузка вида корпусов...
+TXMRServeWatcher_4=Пожалуйста, подождите...
+TablableVector_0=Обе таблицы должны быть одинакового размера.
+TableEditor_0=Невозможно показать таблицу с предложенной информацией
+TableKeyListener_1=Наберите регулярное выражение вашего запроса
+TableKeyListener_6=Скопированные строки: \n
+TableSorter_0=Номер колонки слишком велик.
+TextometriePreferencePage_0=N/A_Automatically find new updates and notify me
+TextometriePreferencePage_1=N/A_General preferences
+TextometriePreferencePage_14=Настройки сохранены в 
+TextometriePreferencePage_15=Экспорт настроек в файл
+TextometriePreferencePage_18=Настройки импортированы из 
+TextometriePreferencePage_19=Необходимо закрыть окно настроек, чтобы TXM могла их обновить
+TextometriePreferencePage_2=N/A_Auto updates
+TextometriePreferencePage_20=Импортировать из файла
+TreeTaggerPreferencePage_0=N/A_Don''t normalize apotrophes to '' 
+TreeTaggerPreferencePage_1=Путь к установочной папке TreeTagger
+TreeTaggerPreferencePage_2=Путь к папке с языковыми моделами для TreeTagger
+TreeTaggerPreferencePage_3=Опции [разделитель ''  '' (2 пробела)]
+TxmBrowser_0=Начало
+TxmBrowser_10=Не удается запустить встроенные браузер. Вы должны отрегулировать соответствующий параметр в Настройках, с помощью меню Общие / Веб браузер
+TxmBrowser_11=Нет предыдущего текста
+TxmBrowser_12=Нет следующего текста
+TxmBrowser_5=предыдущая страница
+TxmBrowser_6=следующая страница
+TxmBrowser_7=В конец
+TxmBrowser_8=следующий текст
+TxmBrowser_9=предыдущий текст
+TxmCommand_1=Загрузка расширения
+TxtEditor_0=ТекстовыйРедактор: 
+TxtEditor_1=Найденная кодировка 
+UIParameterException_0=N/A_Error  
+UserPreferencePage_0=Страница Пользователя
+UserPreferencePage_3=Не требуется подтверждение для удаления объекта
+ViewPropertySelectionDialog_0=Выбрать свойства
+ViewPropertySelection_0=Выбрать свойства
+IndexToCooccurrence_0=** Ошибка при связывании Индекса и Совместной встречаемости
+IndexToLexicalTable_0=Невозможно составить словарную таблицу из Индекса, полученного на Корпусе
+WordCloudPreferencePage_0=N/A_Maximum number of words
+WordCloudPreferencePage_1=N/A_Minimal frequency
+WordCloudPreferencePage_2=N/A_Percents of rotated words
+WordCloudPreferencePage_3=N/A_Random color order

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_ru_utf8.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/InstallPluginHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/InstallPluginHandler.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/InstallPluginHandler.java	(revision 324)
@@ -0,0 +1,95 @@
+package org.txm.rcp.p2.plugins;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
+import org.eclipse.equinox.internal.p2.ui.discovery.repository.RepositoryDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
+import org.eclipse.equinox.internal.p2.ui.sdk.InstallNewSoftwareHandler;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.AdvancePreferencePage;
+import org.txm.utils.logger.Log;
+
+/**
+ * NK: InstallPluginHandler invokes the simplified install wizard
+ * 
+ */
+public class InstallPluginHandler extends InstallNewSoftwareHandler {
+
+	/**
+	 * The constructor.
+	 */
+	public InstallPluginHandler() {
+		super();
+	}
+
+	protected void doExecute(LoadMetadataRepositoryJob job) {
+		//super.doExecute(job);
+		
+		ProvisioningUI provisioningUI = ProvisioningUI.getDefaultUI();
+		//URI[] knownedRepos = provisioningUI.getRepositoryTracker().getKnownRepositories(provisioningUI.getSession());
+		//System.out.println("REPOS: "+Arrays.toString(knownedRepos));
+		//getProvisioningUI().openInstallWizard(null, null, job);
+		
+		
+		Catalog catalog = new Catalog();
+		catalog.setEnvironment(DiscoveryCore.createEnvironment());
+		catalog.setVerifyUpdateSiteAvailability(false);
+		
+		RepositoryDiscoveryStrategy strategy = new RepositoryDiscoveryStrategy();
+		try {
+			String updateLevel = TxmPreferences.getString(AdvancePreferencePage.UPDATE_LEVEL, "STABLE");//$NON-NLS-1$
+			boolean alphaMode = false;
+			boolean betaMode = false;
+			boolean devMode = false;
+			if ("DEV".equals(updateLevel)) {//$NON-NLS-1$
+				devMode = alphaMode = betaMode = true;
+			} else if ("ALPHA".equals(updateLevel)) {//$NON-NLS-1$
+				alphaMode = betaMode = true;
+			} else if ("BETA".equals(updateLevel)) {//$NON-NLS-1$
+				betaMode = true;
+			}
+			Log.info("Update levels: alpha="+alphaMode+" beta="+betaMode); //$NON-NLS-1$ //$NON-NLS-2$
+			
+			strategy.addLocation(new URI(TXMUpdateHandler.UPDATESITE+"/ext/stable")); //$NON-NLS-1$
+			
+			if (devMode) {
+				strategy.addLocation(new URI(TXMUpdateHandler.UPDATESITE+"/ext/dev")); //$NON-NLS-1$
+			}
+			
+			if (alphaMode) {
+				strategy.addLocation(new URI(TXMUpdateHandler.UPDATESITE+"/ext/alpha")); //$NON-NLS-1$
+			}
+			if (betaMode) {
+				strategy.addLocation(new URI(TXMUpdateHandler.UPDATESITE+"/ext/beta")); //$NON-NLS-1$
+			}
+		} catch (URISyntaxException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		
+//		for (URI location : knownedRepos) {
+//			strategy.addLocation(location);
+//		}
+		
+		catalog.getDiscoveryStrategies().add(strategy);
+//		System.out.println("Catalogs: ");
+//		for (AbstractDiscoveryStrategy strg : catalog.getDiscoveryStrategies()) {
+//			System.out.println("Strategy: "+strg);
+//			System.out.println(" Categories: "+strg.getCategories());
+//			System.out.println(" Items: "+strg.getItems());
+//		}
+		CatalogConfiguration configuration = new CatalogConfiguration();
+		configuration.setShowTagFilter(false);
+		
+		DiscoveryWizard wizard = new TXMDiscoveryWizard(catalog, configuration);
+		WizardDialog dialog = new WizardDialog(WorkbenchUtil.getShell(), wizard);
+		dialog.open();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/InstallPluginHandler.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMCatalogViewer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMCatalogViewer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMCatalogViewer.java	(revision 324)
@@ -0,0 +1,52 @@
+package org.txm.rcp.p2.plugins;
+
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.ControlListItem;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CategoryItem;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+public class TXMCatalogViewer extends CatalogViewer{
+
+	public TXMCatalogViewer(Catalog catalog, IShellProvider shellProvider,
+			IRunnableContext context, CatalogConfiguration configuration) {
+		super(catalog, shellProvider, context, configuration);
+		// TODO Auto-generated constructor stub
+	}
+
+	protected ControlListItem<?> doCreateViewerItem(Composite parent, Object element) {
+		if (element instanceof CatalogItem) {
+			return new TXMDiscoveryItem(parent, SWT.BORDER, getResources(), shellProvider, (CatalogItem) element, this);
+		} else if (element instanceof CatalogCategory) {
+			return new CategoryItem(parent, SWT.NONE, getResources(), (CatalogCategory) element);
+		}
+		return null;
+	}
+
+	public void modifySelection(final CatalogItem connector, boolean selected) {
+		super.modifySelection(connector, selected);
+	}
+
+	protected void doCheckCatalog() {
+		//System.out.println("DO CHECK CATALOG");
+		int categoryWithConnectorCount = 0;
+		int itemCount = getCatalog().getItems().size();
+		
+		for (CatalogCategory category : getCatalog().getCategories()) {
+			categoryWithConnectorCount += category.getItems().size();
+		}
+		
+		if (categoryWithConnectorCount == 0 && itemCount == 0) {
+			// nothing was discovered: notify the user
+			MessageDialog.openWarning(shellProvider.getShell(), Messages.ConnectorDiscoveryWizardMainPage_noConnectorsFound, Messages.ConnectorDiscoveryWizardMainPage_noConnectorsFound_description);
+		}
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMCatalogViewer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/FixUpdateHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/FixUpdateHandler.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/FixUpdateHandler.java	(revision 324)
@@ -0,0 +1,72 @@
+package org.txm.rcp.p2.plugins;
+
+import java.net.URI;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.AdvancePreferencePage;
+import org.txm.utils.logger.Log;
+
+public class FixUpdateHandler extends UpdateHandler {
+
+	/**
+	 * Execute the command.
+	 */
+	public Object execute(ExecutionEvent event) {
+		String profileId = getProvisioningUI().getProfileId();
+		IProvisioningAgent agent = getProvisioningUI().getSession().getProvisioningAgent();
+		
+		if (agent != null) {
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			if (registry != null) {
+				registry.getProfile(profileId);
+			}
+		}
+		
+		run(agent);
+		return null;
+	}
+	
+	public static void run(IProvisioningAgent agent) {
+		
+		String profileId = ProvisioningUI.getDefaultUI().getProfileId();
+//		IProvisioningAgent agent = ProvisioningUI.getDefaultUI().getSession().getProvisioningAgent();
+
+		if (agent != null) {
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			if (registry != null) {
+				registry.getProfile(profileId);
+			}
+		}
+		
+		// Look for a profile.  We may not immediately need it in the
+		// handler, but if we don't have one, whatever we are trying to do
+		// will ultimately fail in a more subtle/low-level way.  So determine
+		// up front if the system is configured properly.
+//		int attempt = 10;
+//		while (attempt > 0) {
+//			if (TXMUpdateHandler.patchGZProfile()) {
+//				attempt = -1;
+//			}
+//			attempt--;
+//			try { Thread.sleep(200); } catch (InterruptedException e) {
+//				e.printStackTrace();
+//				attempt = 0;
+//			}
+//		}
+//		if (attempt == 0) {
+//			System.out.println("Update profile was not generated by the p2 plugin. Aborting.");
+//			return;
+//		}
+
+		// this is the default repository
+		//TXMUpdateHandler.addDefaultUpdateSites(agent);
+
+		Log.info(Messages.FixUpdateHandler_0);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/FixUpdateHandler.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMSizeComputingWizardPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMSizeComputingWizardPage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMSizeComputingWizardPage.java	(revision 324)
@@ -0,0 +1,116 @@
+package org.txm.rcp.p2.plugins;
+
+import java.text.NumberFormat;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+
+public abstract class TXMSizeComputingWizardPage extends TXMResolutionResultsWizardPage {
+	protected Label sizeInfo;
+	protected long size;
+	Job sizingJob;
+	private IProvisioningPlan lastComputedPlan = null;
+
+	protected TXMSizeComputingWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, ProfileChangeOperation initialResolution) {
+		super(ui, wizard, root, initialResolution);
+		// Compute size immediately if a plan is available.  This may or may not finish before
+		// the widgetry is created.
+		if (initialResolution != null && initialResolution.hasResolved())
+			computeSizing(initialResolution.getProvisioningPlan(), initialResolution.getProvisioningContext());
+		else
+			// Set the size to indicate there is no size yet.
+			size = ProvUI.SIZE_NOTAPPLICABLE;
+	}
+
+	protected void computeSizing(final IProvisioningPlan plan, final ProvisioningContext provisioningContext) {
+		if (plan == lastComputedPlan)
+			return;
+		lastComputedPlan = plan;
+		size = ProvUI.SIZE_UNKNOWN;
+		updateSizingInfo();
+		if (sizingJob != null)
+			sizingJob.cancel();
+		sizingJob = new Job(ProvUIMessages.SizeComputingWizardPage_SizeJobTitle) {
+			protected IStatus run(IProgressMonitor monitor) {
+				size = ProvUI.getSize(ProvUI.getEngine(getProvisioningUI().getSession()), plan, provisioningContext, monitor);
+				if (monitor.isCanceled())
+					return Status.CANCEL_STATUS;
+				if (display != null) {
+					display.asyncExec(new Runnable() {
+						public void run() {
+							updateSizingInfo();
+						}
+					});
+				}
+				return Status.OK_STATUS;
+			}
+
+		};
+		sizingJob.setUser(false);
+		sizingJob.setSystem(true);
+		sizingJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
+		sizingJob.schedule();
+	}
+
+	protected void createSizingInfo(Composite parent) {
+		sizeInfo = new Label(parent, SWT.NONE);
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
+		sizeInfo.setLayoutData(data);
+		updateSizingInfo();
+	}
+
+	protected void updateSizingInfo() {
+		if (sizeInfo != null && !sizeInfo.isDisposed()) {
+			if (size == ProvUI.SIZE_NOTAPPLICABLE)
+				sizeInfo.setVisible(false);
+			else {
+				sizeInfo.setText(NLS.bind(ProvUIMessages.UpdateOrInstallWizardPage_Size, getFormattedSize()));
+				sizeInfo.setVisible(true);
+			}
+		}
+	}
+
+	protected String getFormattedSize() {
+		if (size == ProvUI.SIZE_UNKNOWN || size == ProvUI.SIZE_UNAVAILABLE)
+			return ProvUIMessages.IUDetailsLabelProvider_Unknown;
+		if (size > 1000L) {
+			long kb = size / 1000L;
+			return NLS.bind(ProvUIMessages.IUDetailsLabelProvider_KB, NumberFormat.getInstance().format(new Long(kb)));
+		}
+		return NLS.bind(ProvUIMessages.IUDetailsLabelProvider_Bytes, NumberFormat.getInstance().format(new Long(size)));
+	}
+
+	public void dispose() {
+		if (sizingJob != null) {
+			sizingJob.cancel();
+			sizingJob = null;
+		}
+	}
+
+	public void updateStatus(IUElementListRoot root, ProfileChangeOperation op) {
+		super.updateStatus(root, op);
+		if (op != null && op.getProvisioningPlan() != null)
+			computeSizing(op.getProvisioningPlan(), op.getProvisioningContext());
+	}
+
+	protected IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan) {
+		return plan.getAdditions();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMSizeComputingWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryInstallOperation.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryInstallOperation.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryInstallOperation.java	(revision 324)
@@ -0,0 +1,363 @@
+package org.txm.rcp.p2.plugins;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.*;
+import java.util.*;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.ui.IProvHelpContextIds;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.dialogs.PreselectedIUInstallWizard;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningWizardDialog;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.operations.*;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/***
+ * Copy of DiscoveryInstallOperation but uses a personalized install wizard
+ * 
+ * @author nkredens
+ *
+ */
+public class TXMDiscoveryInstallOperation implements IRunnableWithProgress {
+	private final List<CatalogItem> installableConnectors;
+
+	private final ProvisioningUI provisioningUI;
+
+	private Set<URI> repositoryLocations;
+
+	public TXMDiscoveryInstallOperation(List<CatalogItem> installableConnectors) {
+		if (installableConnectors == null || installableConnectors.isEmpty()) {
+			throw new IllegalArgumentException();
+		}
+		this.installableConnectors = new ArrayList<CatalogItem>(
+				installableConnectors);
+		this.provisioningUI = ProvisioningUI.getDefaultUI();
+	}
+
+	public void run(IProgressMonitor progressMonitor)
+			throws InvocationTargetException, InterruptedException {
+		try {
+			SubMonitor monitor = SubMonitor.convert(progressMonitor,
+					Messages.InstallConnectorsJob_task_configuring, 100);
+			try {
+				final IInstallableUnit[] ius = computeInstallableUnits(monitor
+						.newChild(50));
+
+				checkCancelled(monitor);
+
+				final InstallOperation installOperation = resolve(
+						monitor.newChild(50), ius,
+						repositoryLocations.toArray(new URI[0]));
+
+				checkCancelled(monitor);
+
+				Display.getDefault().asyncExec(new Runnable() {
+					public void run() {
+						// provisioningUI.openInstallWizard(Arrays.asList(ius),
+						// installOperation, null);
+						PreselectedIUInstallWizard wizard = new TXMPreselectedIUInstallWizard(
+								provisioningUI, installOperation, Arrays.asList(ius), null);
+						wizard.setRemediationOperation(null);
+						WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
+						dialog.create();
+						PlatformUI
+								.getWorkbench()
+								.getHelpSystem()
+								.setHelp(dialog.getShell(),
+										IProvHelpContextIds.INSTALL_WIZARD);
+						dialog.open();
+					}
+				});
+			} finally {
+				monitor.done();
+			}
+		} catch (OperationCanceledException e) {
+			throw new InterruptedException();
+		} catch (Exception e) {
+			throw new InvocationTargetException(e);
+		}
+	}
+
+	private void checkCancelled(IProgressMonitor monitor) {
+		if (monitor.isCanceled()) {
+			throw new OperationCanceledException();
+		}
+	}
+
+	private InstallOperation resolve(IProgressMonitor monitor,
+			final IInstallableUnit[] ius, URI[] repositories)
+			throws CoreException {
+		final InstallOperation installOperation = provisioningUI
+				.getInstallOperation(Arrays.asList(ius), repositories);
+		IStatus operationStatus = installOperation
+				.resolveModal(new SubProgressMonitor(monitor,
+						installableConnectors.size()));
+		if (operationStatus.getSeverity() > IStatus.WARNING) {
+			throw new CoreException(operationStatus);
+		}
+		return installOperation;
+	}
+
+	public IInstallableUnit[] computeInstallableUnits(SubMonitor monitor)
+			throws CoreException {
+		try {
+			monitor.setWorkRemaining(100);
+			// add repository urls and load meta data
+			List<IMetadataRepository> repositories = addRepositories(monitor
+					.newChild(50));
+			final List<IInstallableUnit> installableUnits = queryInstallableUnits(
+					monitor.newChild(50), repositories);
+			removeOldVersions(installableUnits);
+			checkForUnavailable(installableUnits);
+			return installableUnits
+					.toArray(new IInstallableUnit[installableUnits.size()]);
+
+			// MultiStatus status = new MultiStatus(DiscoveryUi.ID_PLUGIN, 0,
+			// Messages.PrepareInstallProfileJob_ok, null);
+			// ius = installableUnits.toArray(new
+			// IInstallableUnit[installableUnits.size()]);
+			// ProfileChangeRequest profileChangeRequest =
+			// InstallAction.computeProfileChangeRequest(ius, profileId,
+			// status, new SubProgressMonitor(monitor,
+			// installableConnectors.size()));
+			// if (status.getSeverity() > IStatus.WARNING) {
+			// throw new CoreException(status);
+			// }
+			// if (profileChangeRequest == null) {
+			// // failed but no indication as to why
+			// throw new CoreException(new Status(IStatus.ERROR,
+			// DiscoveryUi.ID_PLUGIN,
+			// Messages.PrepareInstallProfileJob_computeProfileChangeRequestFailed,
+			// null));
+			// }
+			// PlannerResolutionOperation operation = new
+			// PlannerResolutionOperation(
+			// Messages.PrepareInstallProfileJob_calculatingRequirements,
+			// profileId, profileChangeRequest, null,
+			// status, true);
+			// IStatus operationStatus = operation.execute(new
+			// SubProgressMonitor(monitor, installableConnectors.size()));
+			// if (operationStatus.getSeverity() > IStatus.WARNING) {
+			// throw new CoreException(operationStatus);
+			// }
+			//
+			// plannerResolutionOperation = operation;
+
+		} catch (URISyntaxException e) {
+			// should never happen, since we already validated URLs.
+			throw new CoreException(new Status(IStatus.ERROR,
+					DiscoveryUi.ID_PLUGIN,
+					Messages.InstallConnectorsJob_unexpectedError_url, e));
+		} catch (MalformedURLException e) {
+			// should never happen, since we already validated URLs.
+			throw new CoreException(new Status(IStatus.ERROR,
+					DiscoveryUi.ID_PLUGIN,
+					Messages.InstallConnectorsJob_unexpectedError_url, e));
+		} finally {
+			monitor.done();
+		}
+	}
+
+	/***
+	 * Verifies that we found what we were looking for: it's possible that we
+	 * have connector descriptors that are no longer available on their
+	 * respective sites. In that case we must inform the user. Unfortunately
+	 * this is the earliest point at which we can know.
+	 */
+	private void checkForUnavailable(
+			final List<IInstallableUnit> installableUnits) throws CoreException {
+		// at least one selected connector could not be found in a repository
+		Set<String> foundIds = new HashSet<String>();
+		for (IInstallableUnit unit : installableUnits) {
+			foundIds.add(unit.getId());
+		}
+
+		String message = ""; //$NON-NLS-1$
+		String detailedMessage = ""; //$NON-NLS-1$
+		for (CatalogItem descriptor : installableConnectors) {
+			StringBuilder unavailableIds = null;
+			for (String id : descriptor.getInstallableUnits()) {
+				if (!foundIds.contains(id)) {
+					if (unavailableIds == null) {
+						unavailableIds = new StringBuilder();
+					} else {
+						unavailableIds
+								.append(Messages.InstallConnectorsJob_commaSeparator);
+					}
+					unavailableIds.append(id);
+				}
+			}
+			if (unavailableIds != null) {
+				if (message.length() > 0) {
+					message += Messages.InstallConnectorsJob_commaSeparator;
+				}
+				message += descriptor.getName();
+
+				if (detailedMessage.length() > 0) {
+					detailedMessage += Messages.InstallConnectorsJob_commaSeparator;
+				}
+				detailedMessage += NLS
+						.bind(Messages.PrepareInstallProfileJob_notFoundDescriptorDetail,
+								new Object[] { descriptor.getName(),
+										unavailableIds.toString(),
+										descriptor.getSiteUrl() });
+			}
+		}
+
+		if (message.length() > 0) {
+			// instead of aborting here we ask the user if they wish to proceed
+			// anyways
+			final boolean[] okayToProceed = new boolean[1];
+			final String finalMessage = message;
+			Display.getDefault().syncExec(new Runnable() {
+				public void run() {
+					okayToProceed[0] = MessageDialog.openQuestion(
+							WorkbenchUtil.getShell(),
+							Messages.InstallConnectorsJob_questionProceed,
+							NLS.bind(
+									Messages.InstallConnectorsJob_questionProceed_long,
+									new Object[] { finalMessage }));
+				}
+			});
+			if (!okayToProceed[0]) {
+				throw new CoreException(
+						new Status(
+								IStatus.ERROR,
+								DiscoveryUi.ID_PLUGIN,
+								NLS.bind(
+										Messages.InstallConnectorsJob_connectorsNotAvailable,
+										detailedMessage), null));
+			}
+		}
+	}
+
+	/***
+	 * Filters those installable units that have a duplicate in the list with a
+	 * higher version number. it's possible that some repositories will host
+	 * multiple versions of a particular feature. we assume that the user wants
+	 * the highest version.
+	 */
+	private void removeOldVersions(final List<IInstallableUnit> installableUnits) {
+		Map<String, Version> symbolicNameToVersion = new HashMap<String, Version>();
+		for (IInstallableUnit unit : installableUnits) {
+			Version version = symbolicNameToVersion.get(unit.getId());
+			if (version == null || version.compareTo(unit.getVersion()) < 0) {
+				symbolicNameToVersion.put(unit.getId(), unit.getVersion());
+			}
+		}
+		if (symbolicNameToVersion.size() != installableUnits.size()) {
+			for (IInstallableUnit unit : new ArrayList<IInstallableUnit>(
+					installableUnits)) {
+				Version version = symbolicNameToVersion.get(unit.getId());
+				if (!version.equals(unit.getVersion())) {
+					installableUnits.remove(unit);
+				}
+			}
+		}
+	}
+
+	/***
+	 * Perform a query to get the installable units. This causes p2 to determine
+	 * what features are available in each repository. We select installable
+	 * units by matching both the feature id and the repository; it is possible
+	 * though unlikely that the same feature id is available from more than one
+	 * of the selected repositories, and we must ensure that the user gets the
+	 * one that they asked for.
+	 */
+	private List<IInstallableUnit> queryInstallableUnits(SubMonitor monitor,
+			List<IMetadataRepository> repositories) throws URISyntaxException {
+		final List<IInstallableUnit> installableUnits = new ArrayList<IInstallableUnit>();
+
+		monitor.setWorkRemaining(repositories.size());
+		for (final IMetadataRepository repository : repositories) {
+			checkCancelled(monitor);
+			final Set<String> installableUnitIdsThisRepository = getDescriptorIds(repository);
+			IQueryResult<IInstallableUnit> result = repository.query(
+					createInstalledIUsQuery(), monitor.newChild(1));
+			for (Iterator<IInstallableUnit> iter = result.iterator(); iter
+					.hasNext();) {
+				IInstallableUnit iu = iter.next();
+				String id = iu.getId();
+				if (installableUnitIdsThisRepository.contains(id))
+					installableUnits.add(iu);
+			}
+		}
+		return installableUnits;
+	}
+
+	protected IQuery<IInstallableUnit> createInstalledIUsQuery() {
+		return QueryUtil.createIUGroupQuery();
+	}
+
+	private List<IMetadataRepository> addRepositories(SubMonitor monitor)
+			throws MalformedURLException, URISyntaxException,
+			ProvisionException {
+		// tell p2 that it's okay to use these repositories
+		ProvisioningSession session = ProvisioningUI.getDefaultUI()
+				.getSession();
+		RepositoryTracker repositoryTracker = ProvisioningUI.getDefaultUI()
+				.getRepositoryTracker();
+		repositoryLocations = new HashSet<URI>();
+		monitor.setWorkRemaining(installableConnectors.size() * 5);
+		for (CatalogItem descriptor : installableConnectors) {
+			URI uri = new URL(descriptor.getSiteUrl()).toURI();
+			if (repositoryLocations.add(uri)) {
+				checkCancelled(monitor);
+				repositoryTracker.addRepository(uri, null, session);
+				// ProvisioningUtil.addMetaDataRepository(url.toURI(), true);
+				// ProvisioningUtil.addArtifactRepository(url.toURI(), true);
+				// ProvisioningUtil.setColocatedRepositoryEnablement(url.toURI(),
+				// true);
+			}
+			monitor.worked(1);
+		}
+
+		// fetch meta-data for these repositories
+		ArrayList<IMetadataRepository> repositories = new ArrayList<IMetadataRepository>();
+		monitor.setWorkRemaining(repositories.size());
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) session
+				.getProvisioningAgent().getService(
+						IMetadataRepositoryManager.SERVICE_NAME);
+		for (URI uri : repositoryLocations) {
+			checkCancelled(monitor);
+			IMetadataRepository repository = manager.loadRepository(uri,
+					monitor.newChild(1));
+			repositories.add(repository);
+		}
+		return repositories;
+	}
+
+	private Set<String> getDescriptorIds(final IMetadataRepository repository)
+			throws URISyntaxException {
+		final Set<String> installableUnitIdsThisRepository = new HashSet<String>();
+		// determine all installable units for this repository
+		for (CatalogItem descriptor : installableConnectors) {
+			try {
+				if (repository.getLocation().equals(
+						new URL(descriptor.getSiteUrl()).toURI())) {
+					installableUnitIdsThisRepository.addAll(descriptor
+							.getInstallableUnits());
+				}
+			} catch (MalformedURLException e) {
+				// will never happen, ignore
+			}
+		}
+		return installableUnitIdsThisRepository;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryInstallOperation.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMIUDetailsGroup.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMIUDetailsGroup.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMIUDetailsGroup.java	(revision 324)
@@ -0,0 +1,146 @@
+package org.txm.rcp.p2.plugins;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.actions.PropertyDialogAction;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ILayoutConstants;
+import org.eclipse.equinox.internal.p2.ui.dialogs.IUDetailsGroup;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.window.SameShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Widget;
+
+/***
+ * Copy of IUDetailsGroup, a Browser object is used instead of a Text for the detailsArea
+ * 
+ * @author nkredens
+ *
+ */
+public class TXMIUDetailsGroup extends IUDetailsGroup {
+	private static final String LINKACTION = "linkAction"; //$NON-NLS-1$
+
+	private GridLayout layout;
+	private Browser detailsArea;
+	private GridData gd;
+	private Link propLink;
+	private ISelectionProvider selectionProvider;
+	private int widthHint;
+	private boolean scrollable;
+	private String lastText;
+
+	public TXMIUDetailsGroup(SashForm parent, ISelectionProvider selectionProvider, int widthHint, boolean scrollable) {
+		super(parent, selectionProvider, widthHint, scrollable);
+		/*
+		 * Remove the child made by the superclass, 
+		 * this is the only way to proceed since everything is private
+		 */
+		Control[] childs = parent.getChildren();
+		Control last = childs[childs.length -1];
+		last.dispose();
+		
+		this.selectionProvider = selectionProvider;
+		this.widthHint = widthHint;
+		this.scrollable = scrollable;
+		createGroupComposite(parent);
+	}
+
+	/**
+	 * Creates the group composite that holds the details area
+	 * @param parent The parent composite
+	 */
+	void createGroupComposite(Composite parent) {
+		Group detailsComposite = new Group(parent, SWT.NONE);
+		GC gc = new GC(parent);
+		gc.setFont(JFaceResources.getDialogFont());
+		FontMetrics fontMetrics = gc.getFontMetrics();
+		gc.dispose();
+
+		detailsComposite.setText(ProvUIMessages.ProfileModificationWizardPage_DetailsLabel);
+		layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		detailsComposite.setLayout(layout);
+		gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		detailsComposite.setLayoutData(gd);
+
+		gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		gd.verticalIndent = Dialog.convertVerticalDLUsToPixels(fontMetrics, IDialogConstants.VERTICAL_SPACING);
+		gd.heightHint = Dialog.convertHeightInCharsToPixels(fontMetrics, ILayoutConstants.DEFAULT_DESCRIPTION_HEIGHT);
+		gd.minimumHeight = Dialog.convertHeightInCharsToPixels(fontMetrics, ILayoutConstants.MINIMUM_DESCRIPTION_HEIGHT);
+		gd.widthHint = widthHint;
+		if (scrollable)
+			detailsArea = new Browser(detailsComposite, SWT.WRAP | SWT.READ_ONLY | SWT.V_SCROLL);
+		else
+			detailsArea = new Browser(detailsComposite, SWT.WRAP | SWT.READ_ONLY);
+		detailsArea.setLayoutData(gd);
+
+		gd = new GridData(SWT.END, SWT.BOTTOM, true, false);
+		gd.horizontalIndent = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.HORIZONTAL_MARGIN);
+		propLink = createLink(detailsComposite, new PropertyDialogAction(new SameShellProvider(parent.getShell()), selectionProvider), ProvUIMessages.AvailableIUsPage_GotoProperties);
+		propLink.setLayoutData(gd);
+
+		// set the initial state based on selection
+		propLink.setVisible(!selectionProvider.getSelection().isEmpty());
+
+	}
+
+	/**
+	 * Set the detail text
+	 */
+	public void setDetailText(String text) {
+		// If the string is the same but the user has scrolled, the text
+		// widget will reset the selection.  This makes it look like the text
+		// has changed when it hasn't.  For this reason, we check equality first.
+		if (lastText == null || !lastText.equals(text))
+			detailsArea.setText(text);
+		lastText = text;
+	}
+
+	/**
+	 * Toggles the property link for the details area.
+	 */
+	public void enablePropertyLink(boolean enable) {
+		propLink.setVisible(enable);
+	}
+
+	private Link createLink(Composite parent, IAction action, String text) {
+		Link link = new Link(parent, SWT.PUSH);
+		link.setText(text);
+
+		link.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				IAction linkAction = getLinkAction(event.widget);
+				if (linkAction != null) {
+					linkAction.runWithEvent(event);
+				}
+			}
+		});
+		link.setToolTipText(action.getToolTipText());
+		link.setData(LINKACTION, action);
+		return link;
+	}
+
+	IAction getLinkAction(Widget widget) {
+		Object data = widget.getData(LINKACTION);
+		if (data == null || !(data instanceof IAction)) {
+			return null;
+		}
+		return (IAction) data;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMIUDetailsGroup.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMUpdateHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMUpdateHandler.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMUpdateHandler.java	(revision 324)
@@ -0,0 +1,535 @@
+package org.txm.rcp.p2.plugins;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.Arrays;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKMessages;
+import org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.operations.RemediationOperation;
+import org.eclipse.equinox.p2.operations.RemedyConfig;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.AdvancePreferencePage;
+import org.txm.utils.logger.Log;
+import org.txm.utils.zip.GZip;
+
+public class TXMUpdateHandler extends UpdateHandler {
+
+	public static final String UPDATESITE = "http://textometrie.ens-lyon.fr/dist"; // ->http://txm.sourceforge.net/updates
+	//public static final String UPDATESITE = "http://txm.textometrie.org/updates"; // ->http://txm.sourceforge.net/updates 
+	//public static final String UPDATESITE = "http://txm.sourceforge.net/updates";
+	//public static final String UPDATESITE = "http://txm.ish-lyon.cnrs.fr/updates";
+	//public static final String UPDATESITE = "file:"+System.getProperty("user.home")+"/TEMP/updates";
+	public static final String ID = "org.txm.rcp.p2.plugins.TXMUpdateHandler";
+	
+	/**
+	 * Execute the command.
+	 */
+	public Object execute(ExecutionEvent event) {
+
+		
+		// Look for a profile.  We may not immediately need it in the
+		// handler, but if we don't have one, whatever we are trying to do
+		// will ultimately fail in a more subtle/low-level way.  So determine
+		// up front if the system is configured properly.
+		try {
+			String profileId = getProvisioningUI().getProfileId();
+			IProvisioningAgent agent = getProvisioningUI().getSession().getProvisioningAgent();
+
+			if (agent != null) {
+				IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+				if (registry != null) {
+					registry.getProfile(profileId);
+				}
+			}
+
+//			if (!patchGZProfile()) {
+//				System.out.println("TXM failed to prepare update profile. Aborting update.");
+//				return null;
+//			}
+
+			// this is the default repository
+			URL baseURL = new URL(UPDATESITE+"/index.html");
+			try {
+				InputStream s = baseURL.openStream();
+				s.close();
+			} catch(Exception e) {
+				System.out.println("Update site is not reachable: "+UPDATESITE+", aborting.");
+				return false;
+			}
+			
+			addDefaultUpdateSites(agent);
+			addDefaultPluginSites(agent);
+
+			// add alpha and beta repos if needed
+			// from bundle org.eclipse.equinox.p2.console
+
+//			Log.warning("Test if install directory rights are correct: read&write");
+//			File aboutFile = new File(TxmPreferences.get(Toolbox.INSTALL_DIR), "TXM");
+//			
+//			if (!(aboutFile.canRead() && aboutFile.canWrite()) ) {
+//				MessageDialog.open(MessageDialog.ERROR, Display.getCurrent().getActiveShell(), "Update error", "The update could not be done. The TXM installed file rights are not correct (read and write)", 0);
+//				System.out.println("Details: "+aboutFile.getAbsolutePath() +" exists "+aboutFile.exists()+" can be read "+aboutFile.canRead()+" can be writen "+aboutFile.canWrite());
+//			} else {
+				Log.warning("Looking for TXM updates...");
+				super.execute(event);
+//			}
+		} catch(Exception e) {
+			System.out.println("Could not update TXM: "+e);
+			Log.printStackTrace(e);
+		}
+		return null;
+	}
+	
+	/**
+	 * Return a shell appropriate for parenting dialogs of this handler.
+	 * @return a Shell
+	 */
+	protected Shell getShell() {
+		//System.out.println("MY GETSHELL: "+Display.getCurrent().getActiveShell());
+		return new Shell();
+	}
+
+	public static boolean patchGZProfile() {
+		//TODO: is this still useful with TXM 0.7.7 ? 
+		String path = System.getProperty("osgi.instance.area"); //$NON-NLS-1$
+		URL location = null;
+		try {
+			location = new URL(path); //$NON-NLS-1$
+		} catch (MalformedURLException e) {
+			Log.severe(NLS.bind(Messages.LanguageSwitchHandler_5, location));
+			return false;
+		}
+
+		File txmConfigDir = new File(location.getFile());
+		//File txmConfigDir = new File("/home/mdecorde/.txm"); // test only
+		File profileDir = new File(txmConfigDir, "p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile");
+
+		Log.info("Looking for profile in : "+txmConfigDir);
+		//System.out.println(txmConfigDir);
+		//System.out.println(profileDir);
+
+		if (!profileDir.exists()) {
+			Log.severe("p2 profile directory does not exists: "+profileDir);
+			return false;
+		}
+
+		//1- find profile.gz
+		File gzFile = findNewestGZFile(profileDir);
+		if (gzFile == null) {
+			Log.severe("No profile GZ file found");
+			return false;
+		} else {
+			try {
+				//2- extract profil from gz profile
+				File profileXMLFile = GZip.uncompress(gzFile, profileDir);
+				//3- patch xml by removing lock properties
+				patchProfile(profileXMLFile);
+				//4- delete old gz profile
+				if (!gzFile.delete()) {
+					Log.severe("Could not delete old profile GZfile: "+gzFile);
+					return false;
+				}
+
+				//File lockFile = new File(profileDir, ".lock");
+				//System.out.println("Delete .lock file: "+lockFile+" "+lockFile.delete());
+
+				//5- compress new profile
+				GZip.compress(profileXMLFile, gzFile);
+				//6- clean files
+				if (!profileXMLFile.delete()) {
+					Log.severe("Could not delete temporary profile XML file: "+profileXMLFile);
+					return false;
+				}
+				Log.info("Profile archive patched: "+gzFile);
+				return true;
+			} catch (IOException e) {
+				Log.severe("Failed to fix profile file: "+e);
+				Log.printStackTrace(e);
+				return false;
+			}
+		}
+	}
+
+	public static void addDefaultUpdateSites(IProvisioningAgent agent) {
+		String uriDefault = UPDATESITE+"/main/stable";
+		try {
+			URI repoUriDefault = new URI(uriDefault);
+			addURL(agent, repoUriDefault);
+			//URI repoKepler = new URI("http://download.eclipse.org/releases/kepler");
+			//addURL(agent, repoKepler);			
+		} catch( Exception e ) {
+			Log.severe("Could not add update default repository: " + uriDefault);
+			Log.printStackTrace(e);
+		}
+		
+		String updateLevel = TxmPreferences.getString(AdvancePreferencePage.UPDATE_LEVEL, "STABLE"); //$NON-NLS-1$
+		boolean alphaMode = false;
+		boolean betaMode = false;
+		boolean devMode = false;
+		if ("DEV".equals(updateLevel)) {//$NON-NLS-1$
+			devMode = alphaMode = betaMode = true;
+		} else if ("ALPHA".equals(updateLevel)) {//$NON-NLS-1$
+			alphaMode = betaMode = true;
+		} else if ("BETA".equals(updateLevel)) {//$NON-NLS-1$
+			betaMode = true;
+		}
+		Log.info("Update levels: dev="+devMode+" alpha="+alphaMode+" beta="+betaMode);
+
+		String uriDev = UPDATESITE+"/main/dev";//$NON-NLS-1$
+		try {
+			URI repoUriDev = new URI(uriDev);
+			if (devMode) {
+				addURL(agent, repoUriDev);
+			} else {
+				removeURL(agent, repoUriDev);
+			}
+		} catch( Exception e ) {
+			Log.severe("Could not add update DEV repository: " + uriDev);
+			e.printStackTrace();
+		}
+		
+		String uriAlpha = UPDATESITE+"/main/alpha";//$NON-NLS-1$
+		try {
+			URI repoUriAlpha = new URI(uriAlpha);
+			if (alphaMode) {
+				addURL(agent, repoUriAlpha);
+			} else {
+				removeURL(agent, repoUriAlpha);
+			}
+		} catch( Exception e ) {
+			Log.severe("Could not add update ALPHA repository: " + uriAlpha);
+			e.printStackTrace();
+		}
+
+		String uriBeta = UPDATESITE+"/main/beta";//$NON-NLS-1$
+		try {
+			URI repoUriBeta = new URI(uriBeta);
+			if (betaMode) {
+				addURL(agent, repoUriBeta);
+			} else {
+				removeURL(agent, repoUriBeta);
+			}
+		} catch( Exception e ) {
+			Log.severe("Can not add update BETA repository: " + uriBeta);
+		}
+	}
+	
+	public static void addDefaultPluginSites(IProvisioningAgent agent) {
+		String uriDefault = UPDATESITE+"/ext/stable";
+		try {
+			URI repoUriDefault = new URI(uriDefault);
+			addURL(agent, repoUriDefault);
+			//URI repoKepler = new URI("http://download.eclipse.org/releases/kepler");
+			//addURL(agent, repoKepler);			
+		} catch( Exception e ) {
+			Log.severe("Could not add update default repository: " + uriDefault);
+			Log.printStackTrace(e);
+		}
+		
+		String updateLevel = TxmPreferences.getString(AdvancePreferencePage.UPDATE_LEVEL, "STABLE"); //$NON-NLS-1$
+		boolean alphaMode = false;
+		boolean betaMode = false;
+		boolean devMode = false;
+		if ("DEV".equals(updateLevel)) {//$NON-NLS-1$
+			devMode = alphaMode = betaMode = true;
+		} else if ("ALPHA".equals(updateLevel)) {//$NON-NLS-1$
+			alphaMode = betaMode = true;
+		} else if ("BETA".equals(updateLevel)) {//$NON-NLS-1$
+			betaMode = true;
+		}
+		Log.info("Update levels: dev="+devMode+" alpha="+alphaMode+" beta="+betaMode);
+
+		String uriDev = UPDATESITE+"/ext/dev";//$NON-NLS-1$
+		try {
+			URI repoUriDev = new URI(uriDev);
+			if (devMode) {
+				addURL(agent, repoUriDev);
+			} else {
+				removeURL(agent, repoUriDev);
+			}
+		} catch( Exception e ) {
+			Log.severe("Could not add update DEV repository: " + uriDev);
+			e.printStackTrace();
+		}
+		
+		String uriAlpha = UPDATESITE+"/ext/alpha";//$NON-NLS-1$
+		try {
+			URI repoUriAlpha = new URI(uriAlpha);
+			if (alphaMode) {
+				addURL(agent, repoUriAlpha);
+			} else {
+				removeURL(agent, repoUriAlpha);
+			}
+		} catch( Exception e ) {
+			Log.severe("Could not add update ALPHA repository: " + uriAlpha);
+			e.printStackTrace();
+		}
+
+		String uriBeta = UPDATESITE+"/ext/beta";//$NON-NLS-1$
+		try {
+			URI repoUriBeta = new URI(uriBeta);
+			if (betaMode) {
+				addURL(agent, repoUriBeta);
+			} else {
+				removeURL(agent, repoUriBeta);
+			}
+		} catch( Exception e ) {
+			Log.severe("Can not add update BETA repository: " + uriBeta);
+		}
+
+	}
+
+	public static boolean addURL(IProvisioningAgent agent, URI location) {
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+		IArtifactRepositoryManager manager2 = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+
+		if (manager == null) {
+			System.out.println("No metadata repository manager found");
+			return false;
+		}
+		if (manager2 == null) {
+			System.out.println("No artifact repository manager found");
+			return false;
+		}
+
+		try {
+			//manager.removeRepository(location)
+			manager.loadRepository(location, null);
+		} catch (Exception e) {
+			System.out.println("No repo - create a newmetadata repo");
+			// for convenience create and add a repository here
+			String repositoryName = location + " - metadata";
+			try {
+				manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
+			} catch (ProvisionException e2) {
+				System.out.println("Error while adding metadata repo: "+location);
+				Log.printStackTrace(e);
+				return false;
+			}
+		}
+
+		try {
+			//manager.removeRepository(location)
+			manager2.loadRepository(location, null);
+			return true;
+		} catch (Exception e) {
+			// could not load a repo at that location so create one as a convenience
+			String repositoryName = location + " - artifacts";
+			try {
+				System.out.println("No repo - create a new artifact repo");
+				manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
+				return true;
+			} catch (Exception e2) {
+				System.out.println("Error while adding artifact repo: "+location);
+				Log.printStackTrace(e);
+				return false;
+			}
+		}
+	}
+
+	public static boolean removeURL(IProvisioningAgent agent, URI location) {
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+		IArtifactRepositoryManager manager2 = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+
+		if (manager == null) {
+			System.out.println("No metadata repository manager found");
+			return false;
+		}
+		if (manager2 == null) {
+			System.out.println("No artifact repository manager found");
+			return false;
+		}
+
+		manager.removeRepository(location);
+		manager2.removeRepository(location);
+
+		return true;
+	}
+
+	private static void patchProfile(File profileXMLFile) throws IOException {
+
+		File tmpFile = File.createTempFile("tmp", ".profile", profileXMLFile.getParentFile());
+
+		BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(profileXMLFile), "UTF-8"));
+		BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tmpFile), "UTF-8"));
+
+		String line = br.readLine();
+		boolean firstLine = true;
+		while (line != null) {
+			if (!firstLine) {
+				writer.write("\n");
+			}
+
+			String trimedLine = line.trim();
+			if (trimedLine.startsWith("<property name='org.eclipse.equinox.p2.type.lock' value='")) {
+				writer.write("<property name='org.eclipse.equinox.p2.type.lock' value='0'/>");
+			} else {
+				writer.write(line);
+			}
+			firstLine= false;
+			line = br.readLine();
+		}
+		writer.close();
+		br.close();
+
+		if (!(profileXMLFile.delete() && tmpFile.renameTo(profileXMLFile))) {
+			throw new IOException("failed to rewrite profile file: "+profileXMLFile);
+		}
+	}
+
+	private static File findNewestGZFile(File profileDir) {
+		File[] files = profileDir.listFiles(new FilenameFilter() {
+			@Override
+			public boolean accept(File dir, String name) {
+				return name.toLowerCase().endsWith(".gz");
+			}
+		});
+
+		if (files == null || files.length == 0) return null;
+
+		Arrays.sort(files);
+		return files[files.length-1];
+	}
+	
+	// COPY FROM UpdateHandler class
+	boolean hasNoRepos = false;
+	UpdateOperation operation;
+
+	@Override
+	protected void doExecute(LoadMetadataRepositoryJob job) {
+		//System.out.println("TXMUpdateHandler: doExecute(...)");
+		if (hasNoRepos) {
+			if (getProvisioningUI().getPolicy().getRepositoriesVisible()) {
+				System.out.println(ProvSDKMessages.UpdateHandler_NoSitesMessage);
+			}
+			return;
+		}
+		// Report any missing repositories.
+		job.reportAccumulatedStatus();
+		if (continueWorkingWithOperation(operation, getShell())) {
+			if (operation.getResolutionResult() == Status.OK_STATUS) {
+				getProvisioningUI().openUpdateWizard(false, operation, job);
+			} else {
+
+				final RemediationOperation remediationOperation = new RemediationOperation(getProvisioningUI().getSession(), operation.getProfileChangeRequest(), RemedyConfig.getCheckForUpdateRemedyConfigs());
+				ProvisioningJob job2 = new ProvisioningJob(ProvSDKMessages.RemediationOperation_ResolveJobName, getProvisioningUI().getSession()) {
+					@Override
+					public IStatus runModal(IProgressMonitor monitor) {
+						monitor.beginTask(ProvSDKMessages.RemediationOperation_ResolveJobTask, RemedyConfig.getAllRemedyConfigs().length);
+						return remediationOperation.resolveModal(monitor);
+					}
+				};
+				job2.addJobChangeListener(new JobChangeAdapter() {
+					public void done(IJobChangeEvent event) {
+						if (PlatformUI.isWorkbenchRunning()) {
+							PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+								public void run() {
+									getProvisioningUI().openUpdateWizard(true, operation, remediationOperation, null);
+								}
+							});
+						}
+					}
+
+				});
+				getProvisioningUI().schedule(job2, StatusManager.SHOW | StatusManager.LOG);
+			}
+		}
+	}
+	
+	/**
+	 * Answer a boolean indicating whether the caller should continue to work with the
+	 * specified operation.  This method is used when an operation has been resolved, but
+	 * the UI may have further restrictions on continuing with it.
+	 * 
+	 * @param operation the operation in question.  It must already be resolved.
+	 * @param shell the shell to use for any interaction with the user
+	 * @return <code>true</code> if processing of the operation should continue, <code>false</code> if
+	 * not.  It is up to the implementor to report any errors to the user when answering <code>false</code>.
+	 */
+	public boolean continueWorkingWithOperation(ProfileChangeOperation operation, Shell shell) {
+		//System.out.println("Test if any update available");
+		Assert.isTrue(operation.getResolutionResult() != null);
+		IStatus status = operation.getResolutionResult();
+		// user cancelled
+		if (status.getSeverity() == IStatus.CANCEL)
+			return false;
+
+		// Special case those statuses where we would never want to open a wizard
+		if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
+			//ProvUI.reportStatus(status, StatusManager.BLOCK);
+			//System.out.println("No update available.");
+			return false;
+		}
+
+		// there is no plan, so we can't continue.  Report any reason found
+		if (operation.getProvisioningPlan() == null && !status.isOK()) {
+			StatusManager.getManager().handle(status, StatusManager.LOG | StatusManager.SHOW);
+			
+			return false;
+		}
+
+		// Allow the wizard to open otherwise.
+		return true;
+	}
+
+	protected void doPostLoadBackgroundWork(IProgressMonitor monitor) throws OperationCanceledException {
+		operation = getProvisioningUI().getUpdateOperation(null, null);
+		// check for updates
+		IStatus resolveStatus = operation.resolveModal(monitor);
+		if (resolveStatus.getSeverity() == IStatus.CANCEL)
+			throw new OperationCanceledException();
+	}
+
+	protected boolean preloadRepositories() {
+		hasNoRepos = false;
+		RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
+		if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
+			hasNoRepos = true;
+			return false;
+		}
+		return super.preloadRepositories();
+	}
+
+	@Override
+	protected String getProgressTaskName() {
+		return ProvSDKMessages.UpdateHandler_ProgressTaskName;
+	}
+	
+	
+	
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMUpdateHandler.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMSelectableIUsPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMSelectableIUsPage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMSelectableIUsPage.java	(revision 324)
@@ -0,0 +1,467 @@
+package org.txm.rcp.p2.plugins;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.CopyUtils;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ILayoutConstants;
+import org.eclipse.equinox.internal.p2.ui.dialogs.IResolutionErrorReportingPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.IUDetailsGroup;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.SelectableIUsPage;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.layout.*;
+import org.eclipse.swt.widgets.*;
+
+public class TXMSelectableIUsPage extends SelectableIUsPage {
+
+	private static final String DIALOG_SETTINGS_SECTION = "SelectableIUsPage"; //$NON-NLS-1$
+
+	IUElementListRoot root;
+	Object[] initialSelections;
+	ProfileChangeOperation resolvedOperation;
+	CheckboxTableViewer tableViewer;
+	IUDetailsGroup iuDetailsGroup;
+	ProvElementContentProvider contentProvider;
+	IUDetailsLabelProvider labelProvider;
+	protected Display display;
+	protected Policy policy;
+	SashForm sashForm;
+
+	public TXMSelectableIUsPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, Object[] initialSelections) {
+		super(ui, wizard, root, initialSelections); //$NON-NLS-1$
+		this.root = root;
+		if (root == null)
+			root = new IUElementListRoot();
+		if (initialSelections == null)
+			this.initialSelections = new IInstallableUnit[0];
+		else
+			this.initialSelections = initialSelections;
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		display = parent.getDisplay();
+		sashForm = new SashForm(parent, SWT.VERTICAL);
+		FillLayout layout = new FillLayout();
+		sashForm.setLayout(layout);
+		GridData data = new GridData(GridData.FILL_BOTH);
+		sashForm.setLayoutData(data);
+		initializeDialogUnits(sashForm);
+
+		Composite composite = new Composite(sashForm, SWT.NONE);
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.marginWidth = 0;
+		gridLayout.marginHeight = 0;
+		composite.setLayout(gridLayout);
+
+		tableViewer = createTableViewer(composite);
+		data = new GridData(GridData.FILL_BOTH);
+		data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
+		data.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH);
+		Table table = tableViewer.getTable();
+		table.setLayoutData(data);
+		table.setHeaderVisible(true);
+		activateCopy(table);
+		IUColumnConfig[] columns = getColumnConfig();
+		for (int i = 0; i < columns.length; i++) {
+			TableColumn tc = new TableColumn(table, SWT.LEFT, i);
+			tc.setResizable(true);
+			tc.setText(columns[i].getColumnTitle());
+			tc.setWidth(columns[i].getWidthInPixels(table));
+		}
+
+		tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			void setDetailText(ProfileChangeOperation resolvedOperation) {
+				String detail = null;
+				Object selectedElement = getSelectedElement();
+				IInstallableUnit selectedIU = ElementUtils.elementToIU(selectedElement);
+				IUDetailsGroup detailsGroup = getDetailsGroup();
+
+				// We either haven't resolved, or we failed to resolve and reported some error
+				// while doing so.  
+				if (resolvedOperation == null || !resolvedOperation.hasResolved() || getProvisioningWizard().statusOverridesOperation()) {
+					// See if the wizard status knows something more about it.
+					IStatus currentStatus = getProvisioningWizard().getCurrentStatus();
+					if (!currentStatus.isOK()) {
+						detail = currentStatus.getMessage();
+						detailsGroup.enablePropertyLink(false);
+					} else if (selectedIU != null) {
+						detail = getIUDescription(selectedElement);
+						detailsGroup.enablePropertyLink(true);
+					} else {
+						detail = ""; //$NON-NLS-1$
+						detailsGroup.enablePropertyLink(false);
+					}
+					detailsGroup.setDetailText(detail);
+					return;
+				}
+
+				// An IU is selected and we have resolved.  Look for information about the specific IU.
+				if (selectedIU != null) {
+					detail = resolvedOperation.getResolutionDetails(selectedIU);
+					if (detail != null) {
+						detailsGroup.enablePropertyLink(false);
+						detailsGroup.setDetailText(detail);
+						return;
+					}
+					// No specific error about this IU.  Show the overall error if it is in error.
+					if (resolvedOperation.getResolutionResult().getSeverity() == IStatus.ERROR) {
+						detail = resolvedOperation.getResolutionDetails();
+						if (detail != null) {
+							detailsGroup.enablePropertyLink(false);
+							detailsGroup.setDetailText(detail);
+							return;
+						}
+					}
+
+					// The overall status is not an error, or else there was no explanatory text for an error.
+					// We may as well just show info about this iu.
+					detailsGroup.enablePropertyLink(true);
+					detailsGroup.setDetailText(getIUDescription(selectedElement));
+					return;
+				}
+
+				//No IU is selected, give the overall report
+				detail = resolvedOperation.getResolutionDetails();
+				detailsGroup.enablePropertyLink(false);
+				if (detail == null)
+					detail = ""; //$NON-NLS-1$
+				detailsGroup.setDetailText(detail);
+			}
+			private Object getSelectedElement() {
+				Object[] elements = getSelectedElements();
+				if (elements.length == 0)
+					return null;
+				return elements[0];
+			}
+			
+			public void selectionChanged(SelectionChangedEvent event) {
+				setDetailText(resolvedOperation);
+			}
+		});
+		
+		tableViewer.addCheckStateListener(new ICheckStateListener() {
+			void setDetailText(ProfileChangeOperation resolvedOperation) {
+				String detail = null;
+				Object selectedElement = getSelectedElement();
+				IInstallableUnit selectedIU = ElementUtils.elementToIU(selectedElement);
+				IUDetailsGroup detailsGroup = getDetailsGroup();
+
+				// We either haven't resolved, or we failed to resolve and reported some error
+				// while doing so.  
+				if (resolvedOperation == null || !resolvedOperation.hasResolved() || getProvisioningWizard().statusOverridesOperation()) {
+					// See if the wizard status knows something more about it.
+					IStatus currentStatus = getProvisioningWizard().getCurrentStatus();
+					if (!currentStatus.isOK()) {
+						detail = currentStatus.getMessage();
+						detailsGroup.enablePropertyLink(false);
+					} else if (selectedIU != null) {
+						detail = getIUDescription(selectedElement);
+						detailsGroup.enablePropertyLink(true);
+					} else {
+						detail = ""; //$NON-NLS-1$
+						detailsGroup.enablePropertyLink(false);
+					}
+					detailsGroup.setDetailText(detail);
+					return;
+				}
+
+				// An IU is selected and we have resolved.  Look for information about the specific IU.
+				if (selectedIU != null) {
+					detail = resolvedOperation.getResolutionDetails(selectedIU);
+					if (detail != null) {
+						detailsGroup.enablePropertyLink(false);
+						detailsGroup.setDetailText(detail);
+						return;
+					}
+					// No specific error about this IU.  Show the overall error if it is in error.
+					if (resolvedOperation.getResolutionResult().getSeverity() == IStatus.ERROR) {
+						detail = resolvedOperation.getResolutionDetails();
+						if (detail != null) {
+							detailsGroup.enablePropertyLink(false);
+							detailsGroup.setDetailText(detail);
+							return;
+						}
+					}
+
+					// The overall status is not an error, or else there was no explanatory text for an error.
+					// We may as well just show info about this iu.
+					detailsGroup.enablePropertyLink(true);
+					detailsGroup.setDetailText(getIUDescription(selectedElement));
+					return;
+				}
+
+				//No IU is selected, give the overall report
+				detail = resolvedOperation.getResolutionDetails();
+				detailsGroup.enablePropertyLink(false);
+				if (detail == null)
+					detail = ""; //$NON-NLS-1$
+				detailsGroup.setDetailText(detail);
+			}
+			private Object getSelectedElement() {
+				Object[] elements = getSelectedElements();
+				if (elements.length == 0)
+					return null;
+				return elements[0];
+			}
+				
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				// If the checkEvent is on a locked update element, uncheck it and select it.
+				if (event.getElement() instanceof AvailableUpdateElement) {
+					AvailableUpdateElement checkedElement = (AvailableUpdateElement) event.getElement();
+					if (checkedElement.isLockedForUpdate()) {
+						event.getCheckable().setChecked(checkedElement, false);
+						// Select the element so that the locked description is displayed
+						CheckboxTableViewer viewer = ((CheckboxTableViewer) event.getSource());
+						int itemCount = viewer.getTable().getItemCount();
+						for (int i = 0; i < itemCount; i++) {
+							if (viewer.getElementAt(i).equals(checkedElement)) {
+								viewer.getTable().deselectAll();
+								viewer.getTable().select(i);
+								setDetailText(resolvedOperation);
+								break;
+							}
+						}
+					}
+				}
+				updateSelection();
+			}
+		});
+
+		// Filters and sorters before establishing content, so we don't refresh unnecessarily.
+		IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
+		comparator.useColumnConfig(ProvUI.getIUColumnConfig());
+		tableViewer.setComparator(comparator);
+		tableViewer.setComparer(new ProvElementComparer());
+
+		contentProvider = new ProvElementContentProvider();
+		tableViewer.setContentProvider(contentProvider);
+		labelProvider = new IUDetailsLabelProvider(null, ProvUI.getIUColumnConfig(), getShell());
+		tableViewer.setLabelProvider(labelProvider);
+		tableViewer.setInput(root);
+		setInitialCheckState();
+
+		// Select and Deselect All buttons
+		createSelectButtons(composite);
+
+		// Controls for filtering/presentation/site selection
+		Composite controlsComposite = new Composite(composite, SWT.NONE);
+		gridLayout = new GridLayout();
+		gridLayout.marginWidth = 0;
+		gridLayout.marginHeight = 0;
+		gridLayout.numColumns = 2;
+		gridLayout.makeColumnsEqualWidth = true;
+		gridLayout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		controlsComposite.setLayout(layout);
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+		controlsComposite.setLayoutData(gd);
+
+		// The text area shows a description of the selected IU, or error detail if applicable.
+		iuDetailsGroup = new TXMIUDetailsGroup(sashForm, tableViewer, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH), true);
+
+		updateStatus(root, resolvedOperation);
+		setControl(sashForm);
+		sashForm.setWeights(getSashWeights());
+		Dialog.applyDialogFont(sashForm);
+	}
+
+	private void createSelectButtons(Composite parent) {
+		Composite buttonParent = new Composite(parent, SWT.NONE);
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.numColumns = 3;
+		gridLayout.marginWidth = 0;
+		gridLayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		buttonParent.setLayout(gridLayout);
+		GridData data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
+		buttonParent.setLayoutData(data);
+
+		Button selectAll = new Button(buttonParent, SWT.PUSH);
+		selectAll.setText(ProvUIMessages.SelectableIUsPage_Select_All);
+		setButtonLayoutData(selectAll);
+		selectAll.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				tableViewer.setAllChecked(true);
+				updateSelection();
+			}
+		});
+
+		Button deselectAll = new Button(buttonParent, SWT.PUSH);
+		deselectAll.setText(ProvUIMessages.SelectableIUsPage_Deselect_All);
+		setButtonLayoutData(deselectAll);
+		deselectAll.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				tableViewer.setAllChecked(false);
+				updateSelection();
+			}
+		});
+
+		// dummy to take extra space
+		Label dummy = new Label(buttonParent, SWT.NONE);
+		data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		dummy.setLayoutData(data);
+
+		// separator underneath
+		Label sep = new Label(buttonParent, SWT.HORIZONTAL | SWT.SEPARATOR);
+		data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
+		data.horizontalSpan = 3;
+		sep.setLayoutData(data);
+	}
+
+	protected CheckboxTableViewer createTableViewer(Composite parent) {
+		// The viewer allows selection of IU's for browsing the details,
+		// and checking to include in the provisioning operation.
+		CheckboxTableViewer v = CheckboxTableViewer.newCheckList(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);
+		return v;
+	}
+
+	public Object[] getCheckedIUElements() {
+		if (tableViewer == null)
+			return initialSelections;
+		return tableViewer.getCheckedElements();
+	}
+
+	public Object[] getSelectedIUElements() {
+		return ((IStructuredSelection) tableViewer.getSelection()).toArray();
+	}
+
+	protected Object[] getSelectedElements() {
+		return ((IStructuredSelection) tableViewer.getSelection()).toArray();
+	}
+
+	protected IInstallableUnit[] elementsToIUs(Object[] elements) {
+		IInstallableUnit[] theIUs = new IInstallableUnit[elements.length];
+		for (int i = 0; i < elements.length; i++) {
+			theIUs[i] = ProvUI.getAdapter(elements[i], IInstallableUnit.class);
+		}
+		return theIUs;
+	}
+
+	protected void setInitialCheckState() {
+		if (initialSelections == null) {
+			return;
+		}
+
+		ArrayList<Object> selections = new ArrayList<Object>(initialSelections.length);
+
+		for (int i = 0; i < initialSelections.length; i++) {
+			if (initialSelections[i] instanceof AvailableUpdateElement) {
+				AvailableUpdateElement element = (AvailableUpdateElement) initialSelections[i];
+				if (element.isLockedForUpdate()) {
+					continue;
+				}
+			}
+			selections.add(initialSelections[i]);
+		}
+		tableViewer.setCheckedElements(selections.toArray(new Object[selections.size()]));
+	}
+
+	/*
+	 * Overridden so that we don't call getNextPage().
+	 * We use getNextPage() to start resolving the operation so
+	 * we only want to do that when the next button is pressed.
+	 * 
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
+	 */
+	public boolean canFlipToNextPage() {
+		return isPageComplete();
+	}
+
+	/*
+	 * Overridden to null out any cached page so that the wizard
+	 * is always consulted.  This allows wizards to do things like
+	 * synchronize previous page selections with this page.
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#getPreviousPage()
+	 */
+	public IWizardPage getPreviousPage() {
+		setPreviousPage(null);
+		return super.getPreviousPage();
+	}
+
+	protected String getClipboardText(Control control) {
+		StringBuffer buffer = new StringBuffer();
+		Object[] elements = getSelectedElements();
+		for (int i = 0; i < elements.length; i++) {
+			if (i > 0)
+				buffer.append(CopyUtils.NEWLINE);
+			buffer.append(labelProvider.getClipboardText(elements[i], CopyUtils.DELIMITER));
+		}
+		return buffer.toString();
+	}
+
+	protected IInstallableUnit getSelectedIU() {
+		java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
+		if (units.size() == 0)
+			return null;
+		return units.get(0);
+	}
+
+	protected IUDetailsGroup getDetailsGroup() {
+		return iuDetailsGroup;
+	}
+
+	protected boolean isCreated() {
+		return tableViewer != null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage#updateCaches(org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot, org.eclipse.equinox.p2.operations.ProfileChangeOperation)
+	 */
+	protected void updateCaches(IUElementListRoot newRoot, ProfileChangeOperation op) {
+		resolvedOperation = op;
+		if (newRoot != null && root != newRoot) {
+			root = newRoot;
+			if (tableViewer != null)
+				tableViewer.setInput(newRoot);
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage#setCheckedElements(java.lang.Object[])
+	 */
+	public void setCheckedElements(Object[] elements) {
+		if (tableViewer == null)
+			initialSelections = elements;
+		else
+			tableViewer.setCheckedElements(elements);
+	}
+
+	protected SashForm getSashForm() {
+		return sashForm;
+	}
+
+	protected String getDialogSettingsName() {
+		return getWizard().getClass().getName() + "." + DIALOG_SETTINGS_SECTION; //$NON-NLS-1$
+	}
+
+	protected int getColumnWidth(int index) {
+		return tableViewer.getTable().getColumn(index).getWidth();
+	}
+
+	void updateSelection() {
+		setPageComplete(tableViewer.getCheckedElements().length > 0);
+		getProvisioningWizard().operationSelectionsChanged(this);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMSelectableIUsPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMResolutionResultsWizardPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMResolutionResultsWizardPage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMResolutionResultsWizardPage.java	(revision 324)
@@ -0,0 +1,382 @@
+package org.txm.rcp.p2.plugins;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.dialogs.CopyUtils;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ILayoutConstants;
+import org.eclipse.equinox.internal.p2.ui.dialogs.IUDetailsGroup;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionResultsWizardPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.*;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public abstract class TXMResolutionResultsWizardPage extends ResolutionResultsWizardPage {
+
+	private static final String DIALOG_SETTINGS_SECTION = "ResolutionResultsPage"; //$NON-NLS-1$
+
+	protected IUElementListRoot input;
+	ProfileChangeOperation resolvedOperation;
+	TreeViewer treeViewer;
+	ProvElementContentProvider contentProvider;
+	IUDetailsLabelProvider labelProvider;
+	protected Display display;
+	private IUDetailsGroup iuDetailsGroup;
+	SashForm sashForm;
+
+	protected TXMResolutionResultsWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot input, ProfileChangeOperation operation) {
+		super(ui, wizard, input, operation); //$NON-NLS-1$
+		this.resolvedOperation = operation;
+		if (input == null)
+			this.input = new IUElementListRoot();
+		else
+			this.input = input;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		display = parent.getDisplay();
+		sashForm = new SashForm(parent, SWT.VERTICAL);
+		FillLayout layout = new FillLayout();
+		sashForm.setLayout(layout);
+		GridData data = new GridData(GridData.FILL_BOTH);
+		sashForm.setLayoutData(data);
+		initializeDialogUnits(sashForm);
+
+		Composite composite = new Composite(sashForm, SWT.NONE);
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.marginWidth = 0;
+		gridLayout.marginHeight = 0;
+		composite.setLayout(gridLayout);
+
+		treeViewer = createTreeViewer(composite);
+		data = new GridData(GridData.FILL_BOTH);
+		data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
+		data.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH);
+		Tree tree = treeViewer.getTree();
+		tree.setLayoutData(data);
+		tree.setHeaderVisible(true);
+		activateCopy(tree);
+		TreeViewerColumn nameColumn = new TreeViewerColumn(treeViewer, SWT.LEFT);
+		nameColumn.getColumn().setText(ProvUIMessages.ProvUI_NameColumnTitle);
+		nameColumn.getColumn().setWidth(400);
+		nameColumn.getColumn().setMoveable(true);
+		nameColumn.setLabelProvider(new ColumnLabelProvider() {
+			public String getText(Object element) {
+				IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
+				String label = iu.getProperty(IInstallableUnit.PROP_NAME, null);
+				if (label == null)
+					label = iu.getId();
+				return label;
+			}
+
+			public Image getImage(Object element) {
+				if (element instanceof ProvElement)
+					return ((ProvElement) element).getImage(element);
+				if (ProvUI.getAdapter(element, IInstallableUnit.class) != null)
+					return ProvUIImages.getImage(ProvUIImages.IMG_IU);
+				return null;
+			}
+
+			public String getToolTipText(Object element) {
+				if (element instanceof AvailableIUElement && ((AvailableIUElement) element).getImageOverlayId(null) == ProvUIImages.IMG_INFO)
+					return ProvUIMessages.RemedyElementNotHighestVersion;
+				return super.getToolTipText(element);
+			}
+		});
+		TreeViewerColumn versionColumn = new TreeViewerColumn(treeViewer, SWT.LEFT);
+		versionColumn.getColumn().setText(ProvUIMessages.ProvUI_VersionColumnTitle);
+		versionColumn.getColumn().setWidth(200);
+		versionColumn.setLabelProvider(new ColumnLabelProvider() {
+			public String getText(Object element) {
+				IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
+				if (element instanceof IIUElement) {
+					if (((IIUElement) element).shouldShowVersion())
+						return iu.getVersion().toString();
+					return ""; //$NON-NLS-1$
+				}
+				return iu.getVersion().toString();
+			}
+		});
+		TreeViewerColumn idColumn = new TreeViewerColumn(treeViewer, SWT.LEFT);
+		idColumn.getColumn().setText(ProvUIMessages.ProvUI_IdColumnTitle);
+		idColumn.getColumn().setWidth(200);
+
+		idColumn.setLabelProvider(new ColumnLabelProvider() {
+			public String getText(Object element) {
+				IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
+				return iu.getId();
+			}
+		});
+
+		// Filters and sorters before establishing content, so we don't refresh unnecessarily.
+		IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
+		comparator.useColumnConfig(getColumnConfig());
+		treeViewer.setComparator(comparator);
+		treeViewer.setComparer(new ProvElementComparer());
+		ColumnViewerToolTipSupport.enableFor(treeViewer);
+		contentProvider = new ProvElementContentProvider();
+		treeViewer.setContentProvider(contentProvider);
+		//		labelProvider = new IUDetailsLabelProvider(null, getColumnConfig(), getShell());
+		//		treeViewer.setLabelProvider(labelProvider);
+
+		// Optional area to show the size
+		createSizingInfo(composite);
+
+		// The text area shows a description of the selected IU, or error detail if applicable.
+		iuDetailsGroup = new TXMIUDetailsGroup(sashForm, treeViewer, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH), true);
+
+		setControl(sashForm);
+		sashForm.setWeights(getSashWeights());
+		Dialog.applyDialogFont(sashForm);
+
+		// Controls for filtering/presentation/site selection
+		Composite controlsComposite = new Composite(composite, SWT.NONE);
+		gridLayout = new GridLayout();
+		gridLayout.marginWidth = 0;
+		gridLayout.marginHeight = 0;
+		gridLayout.numColumns = 2;
+		gridLayout.makeColumnsEqualWidth = true;
+		gridLayout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		controlsComposite.setLayout(layout);
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+		controlsComposite.setLayoutData(gd);
+
+		final Runnable runnable = new Runnable() {
+			public void run() {
+				treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+					void setDetailText(ProfileChangeOperation resolvedOperation) {
+						String detail = null;
+						Object selectedElement = getSelectedElement();
+						IInstallableUnit selectedIU = ElementUtils.elementToIU(selectedElement);
+						IUDetailsGroup detailsGroup = getDetailsGroup();
+
+						// We either haven't resolved, or we failed to resolve and reported some error
+						// while doing so.  
+						if (resolvedOperation == null || !resolvedOperation.hasResolved() || getProvisioningWizard().statusOverridesOperation()) {
+							// See if the wizard status knows something more about it.
+							IStatus currentStatus = getProvisioningWizard().getCurrentStatus();
+							if (!currentStatus.isOK()) {
+								detail = currentStatus.getMessage();
+								detailsGroup.enablePropertyLink(false);
+							} else if (selectedIU != null) {
+								detail = getIUDescription(selectedElement);
+								detailsGroup.enablePropertyLink(true);
+							} else {
+								detail = ""; //$NON-NLS-1$
+								detailsGroup.enablePropertyLink(false);
+							}
+							detailsGroup.setDetailText(detail);
+							return;
+						}
+
+						// An IU is selected and we have resolved.  Look for information about the specific IU.
+						if (selectedIU != null) {
+							detail = resolvedOperation.getResolutionDetails(selectedIU);
+							if (detail != null) {
+								detailsGroup.enablePropertyLink(false);
+								detailsGroup.setDetailText(detail);
+								return;
+							}
+							// No specific error about this IU.  Show the overall error if it is in error.
+							if (resolvedOperation.getResolutionResult().getSeverity() == IStatus.ERROR) {
+								detail = resolvedOperation.getResolutionDetails();
+								if (detail != null) {
+									detailsGroup.enablePropertyLink(false);
+									detailsGroup.setDetailText(detail);
+									return;
+								}
+							}
+
+							// The overall status is not an error, or else there was no explanatory text for an error.
+							// We may as well just show info about this iu.
+							detailsGroup.enablePropertyLink(true);
+							detailsGroup.setDetailText(getIUDescription(selectedElement));
+							return;
+						}
+
+						//No IU is selected, give the overall report
+						detail = resolvedOperation.getResolutionDetails();
+						detailsGroup.enablePropertyLink(false);
+						if (detail == null)
+							detail = ""; //$NON-NLS-1$
+						detailsGroup.setDetailText(detail);
+					}
+					private Object getSelectedElement() {
+						Object[] elements = getSelectedElements();
+						if (elements.length == 0)
+							return null;
+						return elements[0];
+					}
+					public void selectionChanged(SelectionChangedEvent event) {
+						setDetailText(resolvedOperation);
+					}
+				});
+				setDrilldownElements(input, resolvedOperation);
+				treeViewer.setInput(input);
+			}
+		};
+
+		if (resolvedOperation != null && !resolvedOperation.hasResolved()) {
+			try {
+				getContainer().run(true, false, new IRunnableWithProgress() {
+					public void run(IProgressMonitor monitor) {
+						resolvedOperation.resolveModal(monitor);
+						display.asyncExec(runnable);
+					}
+				});
+			} catch (Exception e) {
+				StatusManager.getManager().handle(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, e.getMessage(), e));
+			}
+		} else {
+			runnable.run();
+		}
+	}
+
+	@Override
+	public void updateStatus(IUElementListRoot newRoot, ProfileChangeOperation op) {
+		super.updateStatus(newRoot, op);
+	}
+
+	protected void createSizingInfo(Composite parent) {
+		// Default is to do nothing
+	}
+
+	public boolean performFinish() {
+		if (resolvedOperation.getResolutionResult().getSeverity() != IStatus.ERROR) {
+			getProvisioningUI().schedule(resolvedOperation.getProvisioningJob(null), StatusManager.SHOW | StatusManager.LOG);
+			return true;
+		}
+		return false;
+	}
+
+	protected TreeViewer getTreeViewer() {
+		return treeViewer;
+	}
+
+	public IProvisioningPlan getCurrentPlan() {
+		if (resolvedOperation != null)
+			return resolvedOperation.getProvisioningPlan();
+		return null;
+	}
+
+	protected Object[] getSelectedElements() {
+		return ((IStructuredSelection) treeViewer.getSelection()).toArray();
+	}
+
+	protected IInstallableUnit getSelectedIU() {
+		java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
+		if (units.size() == 0)
+			return null;
+		return units.get(0);
+	}
+
+	protected boolean shouldCompleteOnCancel() {
+		return false;
+	}
+
+	protected Collection<IInstallableUnit> getIUs() {
+		return ElementUtils.elementsToIUs(input.getChildren(input));
+	}
+
+	void setDrilldownElements(IUElementListRoot root, ProfileChangeOperation operation) {
+		if (operation == null || operation.getProvisioningPlan() == null)
+			return;
+		Object[] elements = root.getChildren(root);
+		for (int i = 0; i < elements.length; i++) {
+			if (elements[i] instanceof QueriedElement) {
+				((QueriedElement) elements[i]).setQueryable(getQueryable(operation.getProvisioningPlan()));
+			}
+		}
+	}
+
+	protected abstract String getOperationLabel();
+
+	/**
+	 * Returns the restart policy for this operation.
+	 * 
+	 * @return an integer constant describing whether the running profile
+	 * needs to be restarted. 
+	 * 
+	 * @see ProvisioningJob#RESTART_NONE
+	 * @see ProvisioningJob#RESTART_ONLY
+	 * @see ProvisioningJob#RESTART_OR_APPLY
+	 *
+	 */
+	protected int getRestartPolicy() {
+		return ProvisioningJob.RESTART_OR_APPLY;
+	}
+
+	/**
+	 * Returns the task name for this operation, or <code>null</code> to display
+	 * a generic task name.
+	 */
+	protected String getOperationTaskName() {
+		return null;
+	}
+
+	protected TreeViewer createTreeViewer(Composite parent) {
+		return new TreeViewer(parent, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
+	}
+
+	protected abstract IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan);
+
+	protected String getClipboardText(Control control) {
+		return CopyUtils.getIndentedClipboardText(getSelectedElements(), labelProvider);
+	}
+
+	protected IUDetailsGroup getDetailsGroup() {
+		return iuDetailsGroup;
+	}
+
+	protected boolean isCreated() {
+		return treeViewer != null;
+	}
+
+	protected void updateCaches(IUElementListRoot newRoot, ProfileChangeOperation op) {
+		resolvedOperation = op;
+		if (newRoot != null) {
+			setDrilldownElements(newRoot, resolvedOperation);
+			if (treeViewer != null) {
+				if (input != newRoot)
+					treeViewer.setInput(newRoot);
+				else
+					treeViewer.refresh();
+			}
+			input = newRoot;
+		}
+	}
+
+	protected String getDialogSettingsName() {
+		return getWizard().getClass().getName() + "." + DIALOG_SETTINGS_SECTION; //$NON-NLS-1$
+	}
+
+	protected int getColumnWidth(int index) {
+		return treeViewer.getTree().getColumn(index).getWidth();
+	}
+
+	protected SashForm getSashForm() {
+		return sashForm;
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMResolutionResultsWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMInstallWizardPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMInstallWizardPage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMInstallWizardPage.java	(revision 324)
@@ -0,0 +1,25 @@
+package org.txm.rcp.p2.plugins;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+public class TXMInstallWizardPage extends TXMSizeComputingWizardPage {
+
+	public TXMInstallWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, ProfileChangeOperation operation) {
+		super(ui, wizard, root, operation);
+		setTitle(ProvUIMessages.InstallWizardPage_Title);
+		setDescription(ProvUIMessages.InstallWizardPage_NoCheckboxDescription);
+	}
+
+	protected String getOperationLabel() {
+		return ProvUIMessages.InstallIUOperationLabel;
+	}
+
+	protected String getOperationTaskName() {
+		return ProvUIMessages.InstallIUOperationTask;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMInstallWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryUi.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryUi.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryUi.java	(revision 324)
@@ -0,0 +1,65 @@
+package org.txm.rcp.p2.plugins;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.equinox.internal.p2.ui.discovery.operations.DiscoveryInstallOperation;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.CommonColors;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/***
+ * Copy of DiscoveryUi, uses a TXMDiscoveryInstallOperation runnable object 	 
+ * 
+ * @author nkredens
+ *
+ */
+public abstract class TXMDiscoveryUi {
+	public static final String ID_PLUGIN = "org.eclipse.equinox.p2.ui.discovery"; //$NON-NLS-1$
+
+	private static CommonColors commonColors;
+
+	private TXMDiscoveryUi() {
+		// don't allow clients to instantiate
+	}
+
+	public static boolean install(List<CatalogItem> descriptors,
+			IRunnableContext context) {
+		try {
+			IRunnableWithProgress runner = new TXMDiscoveryInstallOperation(
+					descriptors);
+			context.run(true, true, runner);
+		} catch (InvocationTargetException e) {
+			IStatus status = new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN,
+					NLS.bind(Messages.ConnectorDiscoveryWizard_installProblems,
+							new Object[] { e.getCause().getMessage() }),
+					e.getCause());
+			StatusManager.getManager().handle(
+					status,
+					StatusManager.SHOW | StatusManager.BLOCK
+							| StatusManager.LOG);
+			return false;
+		} catch (InterruptedException e) {
+			// canceled
+			return false;
+		}
+		return true;
+	}
+
+	public static CommonColors getCommonsColors() {
+		if (commonColors == null) {
+			commonColors = new CommonColors(Display.getDefault(),
+					JFaceResources.getResources());
+		}
+		return commonColors;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryUi.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMPreselectedIUInstallWizard.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMPreselectedIUInstallWizard.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMPreselectedIUInstallWizard.java	(revision 324)
@@ -0,0 +1,43 @@
+package org.txm.rcp.p2.plugins;
+
+import java.util.Collection;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.InstallWizardPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.PreselectedIUInstallWizard;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionResultsWizardPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.SelectableIUsPage;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.InstallOperation;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/***
+ * PreselectedIUInstallWizard using a personalized main page (SelectableIUsPage)
+ * 
+ * @author nkredens
+ *
+ */
+public class TXMPreselectedIUInstallWizard extends PreselectedIUInstallWizard {
+
+	public TXMPreselectedIUInstallWizard(ProvisioningUI ui,
+			InstallOperation operation,
+			Collection<IInstallableUnit> initialSelections,
+			LoadMetadataRepositoryJob job) {
+		super(ui, operation, initialSelections, job);
+	}
+	
+	protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
+		mainPage = new TXMSelectableIUsPage(ui, this, input, selections);
+		mainPage.setTitle(ProvUIMessages.PreselectedIUInstallWizard_Title);
+		mainPage.setDescription(ProvUIMessages.PreselectedIUInstallWizard_Description);
+		((SelectableIUsPage) mainPage).updateStatus(input, operation);
+		return mainPage;
+	}
+	
+	protected ResolutionResultsWizardPage createResolutionPage() {
+		return new TXMInstallWizardPage(ui, this, root, operation);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMPreselectedIUInstallWizard.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryItem.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryItem.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryItem.java	(revision 324)
@@ -0,0 +1,266 @@
+package org.txm.rcp.p2.plugins;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.discovery.model.Overview;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.AbstractDiscoveryItem;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryItem;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryResources;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTError;
+import org.eclipse.swt.browser.*;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+
+/***
+ * Copy of DiscoveryItem but replace the description field with an HTML field
+ * 
+ * @author Steffen Pingel
+ * @author mdecorde
+ * 
+ */
+public class TXMDiscoveryItem<T extends CatalogItem> extends AbstractDiscoveryItem<T> implements PropertyChangeListener {
+
+	Button checkbox;
+
+	private Composite checkboxContainer;
+
+	private final CatalogItem item;
+
+	//private Label description;
+	private Browser browser;
+
+	private Label iconLabel;
+
+	private ToolItem infoButton;
+
+	private Label nameLabel;
+
+	private Link providerLabel;
+
+	private final IShellProvider shellProvider;
+
+	private final TXMCatalogViewer viewer;
+
+	public TXMDiscoveryItem(Composite parent, int style, DiscoveryResources resources, IShellProvider shellProvider, final T item, TXMCatalogViewer viewer) {
+		super(parent, style, resources, item);
+		this.shellProvider = shellProvider;
+		this.item = item;
+		this.viewer = viewer;
+		item.addPropertyChangeListener(this);
+		this.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				item.removePropertyChangeListener(TXMDiscoveryItem.this);
+			}
+		});
+		createContent();
+		initializeListeners();
+	}
+
+	private void createContent() {
+		GridLayout layout = new GridLayout(3, false);
+		layout.marginLeft = 7;
+		layout.marginTop = 2;
+		layout.marginBottom = 2;
+		setLayout(layout);
+
+		checkboxContainer = new Composite(this, SWT.INHERIT_NONE);
+		GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.BEGINNING).span(1, 2).applyTo(checkboxContainer);
+		GridLayoutFactory.fillDefaults().spacing(1, 1).numColumns(2).applyTo(checkboxContainer);
+
+		checkbox = new Button(checkboxContainer, SWT.CHECK | SWT.INHERIT_FORCE);
+		checkbox.setSelection(item.isSelected());
+		checkbox.setText(" "); //$NON-NLS-1$
+		// help UI tests
+		checkbox.setData("connectorId", item.getId()); //$NON-NLS-1$
+		// FIXME
+		//      checkbox.addFocusListener(new FocusAdapter() {
+			//          @Override
+			//          public void focusGained(FocusEvent e) {
+		//              bodyScrolledComposite.showControl(this);
+		//          }
+		//      });
+		GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(checkbox);
+
+		iconLabel = new Label(checkboxContainer, SWT.NONE);
+		GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(iconLabel);
+		if (item.getIcon() != null) {
+			iconLabel.setImage(resources.getIconImage(item.getSource(), item.getIcon(), 32, false));
+		}
+
+		nameLabel = new Label(this, SWT.NONE);
+		GridDataFactory.fillDefaults().grab(true, false).align(SWT.BEGINNING, SWT.CENTER).applyTo(nameLabel);
+		nameLabel.setFont(resources.getSmallHeaderFont());
+		if (item.isInstalled()) {
+			nameLabel.setText(NLS.bind(Messages.DiscoveryItem_Extension_installed, item.getName()));
+		} else {
+			nameLabel.setText(item.getName());
+		}
+
+		if (hasTooltip()) {
+			ToolBar toolBar = new ToolBar(this, SWT.FLAT);
+			GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar);
+
+			infoButton = new ToolItem(toolBar, SWT.PUSH);
+			infoButton.setImage(resources.getInfoImage());
+			infoButton.setToolTipText(Messages.ConnectorDiscoveryWizardMainPage_tooltip_showOverview);
+			hookTooltip(toolBar, infoButton, this, nameLabel, item.getSource(), item.getOverview(), null);
+		} else {
+			Label label = new Label(this, SWT.NULL);
+			label.setText(" "); //$NON-NLS-1$
+		}
+		
+		browser = new Browser(this, SWT.NULL | SWT.WRAP);
+		
+		GridDataFactory.fillDefaults().grab(true, true).span(3, 1).hint(200, SWT.DEFAULT).applyTo(browser);
+		String descriptionText = item.getDescription();
+		int maxDescriptionLength = 162;
+		if (descriptionText == null) {
+			descriptionText = ""; //$NON-NLS-1$
+		}
+		if (descriptionText.length() > maxDescriptionLength) {
+			descriptionText = descriptionText.substring(0, maxDescriptionLength);
+		}  
+	    
+		browser.setText(descriptionText);
+		//browser.setUrl("file:/home/nkredens/Bureau/test.html");
+/*
+		description = new Label(this, SWT.NULL | SWT.WRAP);
+		GridDataFactory.fillDefaults().grab(true, false).span(3, 1).hint(100, SWT.DEFAULT).applyTo(description);
+		String descriptionText = item.getDescription();
+		int maxDescriptionLength = 162;
+		if (descriptionText == null) {
+			descriptionText = ""; //$NON-NLS-1$
+		}
+		if (descriptionText.length() > maxDescriptionLength) {
+			descriptionText = descriptionText.substring(0, maxDescriptionLength);
+		}
+		description.setText(descriptionText);
+	*/	
+
+		createProviderLabel();
+	}
+
+	public void createProviderLabel() {
+		providerLabel = new Link(this, SWT.RIGHT);
+		GridDataFactory.fillDefaults().span(3, 1).align(SWT.BEGINNING, SWT.CENTER).applyTo(providerLabel);
+		// always disabled color to make it less prominent
+		providerLabel.setForeground(resources.getColorDisabled());
+		if (item.getCertification() != null) {
+			providerLabel.setText(NLS.bind(Messages.DiscoveryViewer_Certification_Label0, new String[] {item.getProvider(), item.getLicense(), item.getCertification().getName()}));
+			if (item.getCertification().getUrl() != null) {
+				providerLabel.addSelectionListener(new SelectionAdapter() {
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						WorkbenchUtil.openUrl(item.getCertification().getUrl(), IWorkbenchBrowserSupport.AS_EXTERNAL);
+					}
+				});
+			}
+			Overview overview = new Overview();
+			overview.setSummary(item.getCertification().getDescription());
+			overview.setUrl(item.getCertification().getUrl());
+			Image image = resources.getIconImage(item.getSource(), item.getCertification().getIcon(), 48, true);
+			hookTooltip(providerLabel, providerLabel, this, providerLabel, item.getSource(), overview, image);
+		} else if (item.getLicense() != null) {
+			providerLabel.setText(NLS.bind(Messages.ConnectorDiscoveryWizardMainPage_provider_and_license, item.getProvider(), item.getLicense()));
+		} else {
+			providerLabel.setText(item.getProvider());
+		}
+	}
+
+	protected boolean hasTooltip() {
+		return item.getOverview() != null && item.getOverview().getSummary() != null && item.getOverview().getSummary().length() > 0;
+	}
+
+	public void initializeListeners() {
+		checkbox.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				widgetSelected(e);
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				boolean selected = checkbox.getSelection();
+				maybeModifySelection(selected);
+			}
+		});
+		MouseListener connectorItemMouseListener = new MouseAdapter() {
+			@Override
+			public void mouseUp(MouseEvent e) {
+				boolean selected = !checkbox.getSelection();
+				if (maybeModifySelection(selected)) {
+					checkbox.setSelection(selected);
+				}
+			}
+		};
+		checkboxContainer.addMouseListener(connectorItemMouseListener);
+		this.addMouseListener(connectorItemMouseListener);
+		iconLabel.addMouseListener(connectorItemMouseListener);
+		nameLabel.addMouseListener(connectorItemMouseListener);
+		// the provider has clickable links
+		//providerLabel.addMouseListener(connectorItemMouseListener);
+		//description.addMouseListener(connectorItemMouseListener);
+		browser.addMouseListener(connectorItemMouseListener);
+	}
+
+	protected boolean maybeModifySelection(boolean selected) {
+		if (selected) {
+			if (item.isInstalled()) {
+				MessageDialog.openWarning(shellProvider.getShell(), Messages.DiscoveryItem_Connector_already_installed_Error_Title, NLS.bind(Messages.DiscoveryItem_Connector_already_installed_Error_Message, item.getName()));
+				return false;
+			}
+			if (item.getAvailable() != null && !item.getAvailable()) {
+				MessageDialog.openWarning(shellProvider.getShell(), Messages.ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable, NLS.bind(Messages.ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable, item.getName()));
+				return false;
+			}
+		}
+		viewer.modifySelection(item, selected);
+		return true;
+	}
+
+	public void propertyChange(PropertyChangeEvent evt) {
+		if (!isDisposed()) {
+			getDisplay().asyncExec(new Runnable() {
+				public void run() {
+					if (!isDisposed()) {
+						refresh();
+					}
+				}
+			});
+		}
+	}
+
+	@Override
+	protected void refresh() {
+		boolean enabled = !item.isInstalled() && (item.getAvailable() == null || item.getAvailable());
+
+		checkbox.setEnabled(enabled);
+		nameLabel.setEnabled(enabled);
+		providerLabel.setEnabled(enabled);
+		//description.setEnabled(enabled);
+		browser.setEnabled(enabled);
+
+		Color foreground;
+		if (enabled) {
+			foreground = getForeground();
+		} else {
+			foreground = resources.getColorDisabled();
+		}
+		nameLabel.setForeground(foreground);
+		//description.setForeground(foreground);
+		browser.setForeground(foreground);
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryItem.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMCatalogPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMCatalogPage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMCatalogPage.java	(revision 324)
@@ -0,0 +1,21 @@
+package org.txm.rcp.p2.plugins;
+
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogPage;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer;
+import org.eclipse.swt.widgets.Composite;
+
+public class TXMCatalogPage extends CatalogPage {
+
+	public TXMCatalogPage(Catalog catalog) {
+		super(catalog);
+		// TODO Auto-generated constructor stub
+	}
+
+	protected CatalogViewer doCreateViewer(Composite parent) {
+		CatalogViewer viewer = new TXMCatalogViewer(getCatalog(), this, getContainer(), getWizard().getConfiguration());
+		viewer.setMinimumHeight(MINIMUM_HEIGHT);
+		viewer.createControl(parent);
+		return viewer;
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMCatalogPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryWizard.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryWizard.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryWizard.java	(revision 324)
@@ -0,0 +1,25 @@
+package org.txm.rcp.p2.plugins;
+
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogPage;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
+
+public class TXMDiscoveryWizard extends DiscoveryWizard {
+
+	public TXMDiscoveryWizard(Catalog catalog,
+			CatalogConfiguration configuration) {
+		super(catalog, configuration);
+		
+	}
+	
+    protected CatalogPage doCreateCatalogPage() {
+    	return new TXMCatalogPage(getCatalog());
+	}
+    
+    @Override
+    public boolean performFinish() {
+    	return TXMDiscoveryUi.install(getCatalogPage().getInstallableConnectors(), getContainer());
+    }
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMDiscoveryWizard.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/Messages.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/Messages.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/Messages.java	(revision 324)
@@ -0,0 +1,1209 @@
+
+package org.txm.rcp;
+
+import org.eclipse.osgi.util.NLS;
+import org.txm.utils.messages.Utf8NLS;
+
+public class Messages extends NLS {
+	
+	// The Constant BUNDLE_NAME. 
+	private static final String BUNDLE_NAME = "org.txm.rcp.messages"; //$NON-NLS-1$
+
+	public static String SORT_COLUMN;
+	public static String SORT_DONE;
+
+	public static String About_Menu_Label;
+	public static String AdapterFactory_0;
+	public static String AddBase_1;
+	public static String AddBase_10;
+	public static String AddBase_16;
+	public static String AddBase_17;
+	public static String AddBase_19;
+	public static String AddBase_2;
+	public static String AddBase_20;
+	public static String AddBase_22;
+	public static String AddBase_23;
+	public static String AddBase_24;
+	public static String AddBase_25;
+	public static String AddBase_27;
+	public static String AddBase_28;
+	public static String AddBase_29;
+	public static String AddBase_31;
+	public static String AddBase_32;
+	public static String AddBase_33;
+	public static String AddBase_34;
+	public static String AddBase_4;
+	public static String AddBase_7;
+	public static String AddProject_3;
+	public static String AdvancePreferencePage_0;
+
+	public static String AdvancePreferencePage_1;
+	public static String AdvancePreferencePage_12;
+	public static String AdvancePreferencePage_13;
+	public static String AdvancePreferencePage_14;
+	public static String AdvancePreferencePage_2;
+	public static String AdvancePreferencePage_3;
+	public static String AdvancePreferencePage_4;
+
+	public static String AdvancePreferencePage_6;
+	public static String AnnotationPreferences_0;
+	public static String AnnotationPreferences_1;
+	public static String AnnotationPreferences_2;
+	public static String AdvancePreferencePage_7;
+	
+	public static String Property;
+	public static String NumberOfLines;
+	
+	public static String ApplicationWorkbenchAdvisor_0;
+	public static String ApplicationWorkbenchAdvisor_1;
+	public static String ApplicationWorkbenchAdvisor_11;
+	public static String ApplicationWorkbenchAdvisor_12;
+	public static String ApplicationWorkbenchAdvisor_13;
+	public static String ApplicationWorkbenchAdvisor_14;
+	public static String ApplicationWorkbenchAdvisor_15;
+	public static String ApplicationWorkbenchAdvisor_16;
+	public static String ApplicationWorkbenchAdvisor_17;
+	public static String ApplicationWorkbenchAdvisor_18;
+	public static String ApplicationWorkbenchAdvisor_19;
+	public static String ApplicationWorkbenchAdvisor_2;
+	public static String ApplicationWorkbenchAdvisor_20;
+	public static String ApplicationWorkbenchAdvisor_21;
+	public static String ApplicationWorkbenchAdvisor_22;
+	public static String ApplicationWorkbenchAdvisor_23;
+	public static String ApplicationWorkbenchAdvisor_24;
+	public static String ApplicationWorkbenchAdvisor_25;
+	public static String ApplicationWorkbenchAdvisor_26;
+	public static String ApplicationWorkbenchAdvisor_27;
+	public static String ApplicationWorkbenchAdvisor_28;
+	public static String ApplicationWorkbenchAdvisor_29;
+	public static String ApplicationWorkbenchAdvisor_3;
+	public static String ApplicationWorkbenchAdvisor_30;
+	public static String ApplicationWorkbenchAdvisor_31;
+	public static String ApplicationWorkbenchAdvisor_32;
+	public static String ApplicationWorkbenchAdvisor_33;
+	public static String ApplicationWorkbenchAdvisor_34;
+	public static String ApplicationWorkbenchAdvisor_35;
+	public static String ApplicationWorkbenchAdvisor_36;
+	public static String ApplicationWorkbenchAdvisor_37;
+	public static String ApplicationWorkbenchAdvisor_38;
+	public static String ApplicationWorkbenchAdvisor_39;
+	public static String ApplicationWorkbenchAdvisor_4;
+	public static String ApplicationWorkbenchAdvisor_40;
+	public static String ApplicationWorkbenchAdvisor_41;
+	public static String ApplicationWorkbenchAdvisor_42;
+	public static String ApplicationWorkbenchAdvisor_43;
+	public static String ApplicationWorkbenchAdvisor_43_single;
+	public static String ApplicationWorkbenchAdvisor_44;
+	public static String ApplicationWorkbenchAdvisor_45;
+	public static String ApplicationWorkbenchAdvisor_46;
+	public static String ApplicationWorkbenchAdvisor_47;
+	public static String ApplicationWorkbenchAdvisor_48;
+	public static String ApplicationWorkbenchAdvisor_49;
+	public static String ApplicationWorkbenchAdvisor_5;
+	public static String ApplicationWorkbenchAdvisor_51;
+	public static String ApplicationWorkbenchAdvisor_52;
+	public static String ApplicationWorkbenchAdvisor_53;
+	public static String ApplicationWorkbenchAdvisor_54;
+	public static String ApplicationWorkbenchAdvisor_55;
+	public static String ApplicationWorkbenchAdvisor_56;
+	public static String ApplicationWorkbenchAdvisor_57;
+	public static String ApplicationWorkbenchAdvisor_58;
+	public static String ApplicationWorkbenchAdvisor_59;
+	public static String ApplicationWorkbenchAdvisor_6;
+	public static String ApplicationWorkbenchAdvisor_60;
+	public static String ApplicationWorkbenchAdvisor_61;
+	public static String ApplicationWorkbenchAdvisor_63;
+	public static String ApplicationWorkbenchAdvisor_64;
+	public static String ApplicationWorkbenchAdvisor_65;
+	public static String ApplicationWorkbenchAdvisor_66;
+	public static String ApplicationWorkbenchAdvisor_67;
+	public static String ApplicationWorkbenchAdvisor_68;
+	public static String ApplicationWorkbenchAdvisor_69;
+	public static String ApplicationWorkbenchAdvisor_7;
+	public static String ApplicationWorkbenchAdvisor_71;
+	public static String ApplicationWorkbenchAdvisor_72;
+	public static String ApplicationWorkbenchAdvisor_73;
+	public static String ApplicationWorkbenchAdvisor_74;
+	public static String ApplicationWorkbenchAdvisor_75;
+	public static String ApplicationWorkbenchAdvisor_76;
+	public static String ApplicationWorkbenchAdvisor_77;
+	public static String ApplicationWorkbenchAdvisor_78;
+	public static String ApplicationWorkbenchAdvisor_79;
+	public static String ApplicationWorkbenchAdvisor_8;
+	public static String ApplicationWorkbenchAdvisor_86;
+	public static String ApplicationWorkbenchAdvisor_87;
+	public static String ApplicationWorkbenchAdvisor_88;
+	public static String ApplicationWorkbenchAdvisor_89;
+	public static String ApplicationWorkbenchAdvisor_9;
+	public static String ApplicationWorkbenchAdvisor_init;
+	public static String ApplicationWorkbenchAdvisor_init_failed;
+
+	public static String ApplicationWorkbenchAdvisor_PROGRESS_BAR_LOADING_CORPORA;
+	public static String ApplicationWorkbenchAdvisor_ready;
+
+	public static String ApplicationWorkbenchWindowAdvisor_0;
+
+	public static String ApplicationWorkbenchWindowAdvisor_9;
+	public static String Application_0;
+
+	public static String Application_1;
+
+	public static String Application_10;
+
+	public static String Application_11;
+
+	public static String Application_2;
+
+	public static String Application_4;
+	public static String Application_6;
+
+	public static String Application_8;
+
+	public static String Application_9;
+	public static String AssistedQueryWidget_0;
+	public static String BackToText_0;
+	public static String CANT_CREATE_GRAPHIC;
+	public static String CQPPreferenceInitializer_0;
+	public static String CQPPreferenceInitializer_1;
+	public static String CQPPreferencePage_0;
+	public static String CQPPreferencePage_1;
+	public static String CQPPreferencePage_10;
+	public static String CQPPreferencePage_11;
+	public static String CQPPreferencePage_12;
+	public static String CQPPreferencePage_13;
+	public static String CQPPreferencePage_14;
+	public static String CQPPreferencePage_15;
+	public static String CQPPreferencePage_16;
+	public static String CQPPreferencePage_17;
+	public static String CQPPreferencePage_18;
+	public static String CaEditor_0;
+
+	public static String Cannot_ask_simple_when_advance;
+	public static String ColRowInfosLabelProvider_19;
+	public static String ColRowInfosLabelProvider_9;
+	public static String ColsRowsInfosEditor_0;
+	public static String ColsRowsInfosEditor_2;
+	public static String Commands_0;
+	public static String ComplexSortSelector_0;
+	public static String ComplexSortSelector_1;
+	public static String ComplexSortSelector_2;
+	public static String ComplexSortSelector_5;
+	public static String ComplexSortSelector_6;
+	public static String ComplexSort_0;
+	public static String ComplexSort_1;
+	public static String ComplexSort_10;
+	public static String ComplexSort_11;
+	public static String ComplexSort_12;
+	public static String ComplexSort_14;
+	public static String ComplexSort_16;
+	public static String ComplexSort_18;
+	public static String ComplexSort_2;
+	public static String ComplexSort_3;
+	public static String ComplexSort_4;
+	public static String ComplexSort_5;
+	public static String ComplexSort_6;
+	public static String ComplexSort_9;
+	public static String ComplexSubcorpusPanel_0;
+	public static String ComplexSubcorpusPanel_1;
+	public static String ComplexSubcorpusPanel_16;
+	public static String ComplexSubcorpusPanel_2;
+	public static String ComplexSubcorpusPanel_4;
+	public static String ComplexSubcorpusPanel_5;
+	public static String ComputeConcordance_0;
+	public static String ComputeConcordance_1;
+	public static String ComputeCoocFromLines_0;
+	public static String ComputeCoocFromLines_1;
+	public static String ComputeCoocMatrix_0;
+	public static String ComputeCoocMatrix_1;
+	public static String ComputeCoocMatrix_10;
+	public static String ComputeCoocMatrix_11;
+	public static String ComputeCoocMatrix_12;
+	public static String ComputeCoocMatrix_13;
+	public static String ComputeCoocMatrix_2;
+	public static String ComputeCoocMatrix_3;
+	public static String ComputeCoocMatrix_4;
+	public static String ComputeCoocMatrix_7;
+	public static String ComputeCooccurrences_0;
+	public static String ComputeCooccurrences_1;
+
+	public static String ComputeCooccurrences_2;
+	public static String ComputeFrequencyList_2;
+	public static String ComputeIndexFromLines_0;
+
+	public static String ComputeInternalView_0;
+
+	public static String ComputeInternalView_1;
+	public static String ComputeLexicalTable_0;
+	public static String ComputeLexicalTable_1;
+	public static String ComputeLexicalTable_10;
+	public static String ComputeLexicalTable_12;
+	public static String ComputeLexicalTable_13;
+	public static String ComputeLexicalTable_16;
+	public static String ComputeLexicalTable_2;
+	public static String ComputeLexicalTable_3;
+
+	public static String ComputeLexicalTable_4;
+	public static String ComputeLexicalTable_5;
+	public static String ComputeLexicalTable_6;
+	public static String ComputeLexicalTable_7;
+	public static String ComputeLexicalTable_9;
+	public static String ComputeReferencer_0;
+	public static String ComputeSpecificitiesDialog_0;
+	public static String ComputeSpecificitiesDialog_1;
+	public static String ComputeSpecificitiesDialog_3;
+	public static String ComputeSpecificitiesDialog_4;
+	public static String ComputeSpecificitiesDialog_9;
+	public static String ComputeSpecificities_0;
+	public static String ComputeSpecificities_2;
+	public static String ComputeSpecifities_0;
+
+	public static String ComputeSpecifities_1;
+
+	public static String ComputeSpecifities_10;
+	public static String ComputeSpecifities_11;
+	public static String ComputeSpecifities_2;
+	public static String ComputeSpecifities_3;
+
+	public static String ComputeSpecifities_4;
+	public static String Compute_Specificities;
+
+	public static String ComputeDiagnostic_0;
+
+	public static String ComputeDiagnostic_1;
+	public static String ConcordancerPreferencePage_3;
+	public static String ConcordancerPreferencePage_4;
+	public static String ConcordancerPreferencePage_5;
+	public static String ConcordancerPreferencePage_6;
+	public static String ConcordancesEditorContributor_0;
+	public static String ConcordancesEditor_0;
+	public static String ConcordancesEditor_1;
+
+	public static String ConcordancesEditor_10;
+
+	public static String ConcordancesEditor_101;
+
+	public static String ConcordancesEditor_108;
+	public static String ConcordancesEditor_11;
+
+	public static String ConcordancesEditor_111;
+
+	public static String ConcordancesEditor_112;
+
+	public static String ConcordancesEditor_113;
+	public static String ConcordancesEditor_12;
+	public static String ConcordancesEditor_13;
+	public static String ConcordancesEditor_14;
+
+	public static String ConcordancesEditor_15;
+	public static String ConcordancesEditor_16;
+
+	public static String ConcordancesEditor_17;
+	public static String ConcordancesEditor_18;
+	public static String ConcordancesEditor_19;
+	public static String ConcordancesEditor_2;
+	public static String ConcordancesEditor_20;
+
+	public static String ConcordancesEditor_21;
+
+	public static String ConcordancesEditor_22;
+
+	public static String ConcordancesEditor_23;
+
+	public static String ConcordancesEditor_24;
+
+	public static String ConcordancesEditor_25;
+	public static String ConcordancesEditor_26;
+	public static String ConcordancesEditor_27;
+
+	public static String ConcordancesEditor_28;
+	public static String ConcordancesEditor_29;
+	public static String ConcordancesEditor_3;
+	public static String ConcordancesEditor_30;
+
+	public static String ConcordancesEditor_31;
+
+	public static String ConcordancesEditor_32;
+
+	public static String ConcordancesEditor_33;
+	public static String ConcordancesEditor_34;
+
+	public static String ConcordancesEditor_35;
+
+	public static String ConcordancesEditor_36;
+
+	public static String ConcordancesEditor_37;
+	public static String ConcordancesEditor_38;
+	public static String ConcordancesEditor_39;
+	public static String ConcordancesEditor_4;
+
+	public static String ConcordancesEditor_40;
+
+	public static String ConcordancesEditor_41;
+
+	public static String ConcordancesEditor_42;
+	public static String ConcordancesEditor_43;
+
+	public static String ConcordancesEditor_44;
+
+	public static String ConcordancesEditor_45;
+	public static String ConcordancesEditor_46;
+
+	public static String ConcordancesEditor_47;
+
+	public static String ConcordancesEditor_48;
+
+	public static String ConcordancesEditor_49;
+	public static String ConcordancesEditor_5;
+	public static String ConcordancesEditor_50;
+
+	public static String ConcordancesEditor_51;
+
+	public static String ConcordancesEditor_52;
+
+	public static String ConcordancesEditor_53;
+
+	public static String ConcordancesEditor_54;
+
+	public static String ConcordancesEditor_55;
+	public static String ConcordancesEditor_56;
+
+	public static String ConcordancesEditor_57;
+
+	public static String ConcordancesEditor_58;
+
+	public static String ConcordancesEditor_59;
+
+	public static String ConcordancesEditor_6;
+
+	public static String ConcordancesEditor_60;
+
+	public static String ConcordancesEditor_61;
+
+	public static String ConcordancesEditor_62;
+
+	public static String ConcordancesEditor_63;
+
+	public static String ConcordancesEditor_64;
+
+	public static String ConcordancesEditor_65;
+
+	public static String ConcordancesEditor_66;
+
+	public static String ConcordancesEditor_67;
+
+	public static String ConcordancesEditor_68;
+
+	public static String ConcordancesEditor_69;
+	public static String ConcordancesEditor_7;
+
+	public static String ConcordancesEditor_70;
+
+	public static String ConcordancesEditor_71;
+
+	public static String ConcordancesEditor_72;
+
+	public static String ConcordancesEditor_73;
+
+	public static String ConcordancesEditor_74;
+
+	public static String ConcordancesEditor_75;
+
+	public static String ConcordancesEditor_76;
+
+	public static String ConcordancesEditor_77;
+
+	public static String ConcordancesEditor_78;
+
+	public static String ConcordancesEditor_79;
+	public static String ConcordancesEditor_8;
+
+	public static String ConcordancesEditor_80;
+
+	public static String ConcordancesEditor_81;
+
+	public static String ConcordancesEditor_82;
+
+	public static String ConcordancesEditor_83;
+
+	public static String ConcordancesEditor_84;
+
+	public static String ConcordancesEditor_85;
+
+	public static String ConcordancesEditor_86;
+
+	public static String ConcordancesEditor_87;
+
+	public static String ConcordancesEditor_88;
+
+	public static String ConcordancesEditor_9;
+
+	public static String ConcordancesEditor_99;
+	public static String ConcordancesEditor_100;
+	public static String ConcordancesEditor_110;
+	public static String ConcordancesEditor_114;
+	public static String ConcordancesEditor_115;
+	public static String ConcordancesEditor_116;
+	public static String ConvertCorpus_0;
+	public static String CorporaView_0;
+	public static String CorporaView_1;
+	public static String CorporaView_2;
+	public static String CorporaView_3;
+	public static String CorporaView_4;
+	public static String CorporaView_5;
+	public static String CorporaView_6;
+	public static String CorporaView_7;
+	public static String CorporaView_9;
+	public static String CorpusPage_0;
+	public static String CorpusPage_1;
+	public static String CorpusPage_10;
+	public static String CorpusPage_11;
+	public static String CorpusPage_12;
+	public static String CorpusPage_13;
+	public static String CorpusPage_14;
+	public static String CorpusPage_15;
+	public static String CorpusPage_16;
+	public static String CorpusPage_16a;
+	public static String CorpusPage_17;
+	public static String CorpusPage_18;
+	public static String CorpusPage_19;
+	public static String CorpusPage_2;
+	public static String CorpusPage_20;
+	public static String CorpusPage_21;
+	public static String CorpusPage_22;
+	public static String CorpusPage_23;
+	public static String CorpusPage_24;
+	public static String CorpusPage_25;
+	public static String CorpusPage_26;
+	public static String CorpusPage_27;
+	public static String CorpusPage_28;
+	public static String CorpusPage_29;
+	public static String CorpusPage_3;
+
+	public static String CorpusPage_30;
+	public static String CorpusPage_31;
+	public static String CorpusPage_32;
+	public static String CorpusPage_33;
+	public static String CorpusPage_34;
+	public static String CorpusPage_35;
+	public static String CorpusPage_36;
+	public static String CorpusPage_37;
+	public static String CorpusPage_38;
+	public static String CorpusPage_39;
+	public static String CorpusPage_4;
+	public static String CorpusPage_40;
+	public static String CorpusPage_41;
+	public static String CorpusPage_42;
+	public static String CorpusPage_43;
+	public static String CorpusPage_44;
+	public static String CorpusPage_45;
+	public static String CorpusPage_46;
+	public static String CorpusPage_47;
+	public static String CorpusPage_48;
+	public static String CorpusPage_49;
+	public static String CorpusPage_5;
+	public static String CorpusPage_50;
+	public static String CorpusPage_51;
+	public static String CorpusPage_52;
+	public static String CorpusPage_53;
+	public static String CorpusPage_54;
+	public static String CorpusPage_55;
+
+	public static String CorpusPage_57;
+	public static String CorpusPage_6;
+	public static String CorpusPage_60;
+
+	public static String CorpusPage_61;
+
+	public static String CorpusPage_63;
+
+	public static String CorpusPage_64;
+	public static String CorpusPage_65;
+	public static String CorpusPage_66;
+	public static String CorpusPage_67;
+	
+	public static String CorpusPage_7;
+	public static String CorpusPage_8;
+
+	public static String CorpusPage_80;
+	public static String CorpusPage_9;
+
+	public static String CorpusPage_90;
+
+	public static String CorpusPage_91;
+
+	public static String CorpusPage_92;
+
+	public static String CorpusPage_93;
+	public static String CreateFile_1;
+	public static String CreateFolder_1;
+	public static String CreateFrequencyList_8;
+	public static String CreateMacro_0;
+	public static String CreateMacro_1;
+	public static String CreatePartitionDialog_0;
+	public static String CreatePartitionDialog_1;
+
+	public static String CreatePartitionDialog_10;
+	public static String CreatePartitionDialog_16;
+	public static String CreatePartitionDialog_2;
+	public static String CreatePartitionDialog_3;
+	public static String CreatePartitionDialog_4;
+	public static String CreatePartitionDialog_5;
+	public static String CreatePartitionDialog_6;
+	public static String CreatePartitionDialog_7;
+	public static String CreatePartitionDialog_8;
+	public static String CreatePartitionDialog_9;
+	public static String CreatePartition_0;
+	public static String CreatePartition_2;
+	public static String CreatePartition_5;
+	public static String CreatePartition_55;
+	public static String CreatePartition_6;
+	public static String RefreshingCorporaView;
+	public static String CreateSubCorpus_0;
+
+	public static String CreateSubCorpus_1;
+	public static String LastCQPError;
+	public static String CreateSubCorpus_2;
+
+	public static String CreateSubCorpus_3;
+	public static String CreateSubCorpus_begin;
+	public static String CreateSubCorpus_create;
+	public static String CreateSubcorpusDialog_0;
+	public static String CreateSubcorpusDialog_10;
+	public static String CreateSubcorpusDialog_11;
+	public static String CreateSubcorpusDialog_13;
+	public static String CreateSubcorpusDialog_14;
+	public static String CreateSubcorpusDialog_6;
+	public static String CreateSubcorpusDialog_8;
+	public static String CreateSubcorpus_7;
+	public static String CreateSubcorpus_8;
+	public static String CreateSubcorpus_9;
+	public static String DONE;
+	public static String DefineReferencePattern_0;
+	public static String DefineReferencePattern_1;
+	public static String DefineReferencePattern_2;
+	public static String DefineReferencePattern_3;
+	public static String DefineReferencePattern_4;
+	public static String DefineReferencePattern_5;
+	public static String DeleteFile_0;
+	public static String DeleteFile_2;
+	public static String DeleteInCorporaView_1;
+	public static String DeleteInCorporaView_2;
+	public static String DeleteLines_0;
+	public static String DeleteLines_1;
+	public static String DeleteObject_0;
+	public static String DeleteObject_1;
+
+	public static String DeleteObject_10;
+	public static String DeleteObject_3;
+	public static String DeleteObject_4;
+	public static String DeleteObject_5;
+	public static String DiagnosticPreferencePage_1;
+	public static String DiagnosticPreferencePage_2;
+	public static String DiagnosticPreferencePage_3;
+	public static String Diagnostique_0;
+	public static String Diagnostique_1;
+	public static String Diagnostique_10;
+	public static String Diagnostique_11;
+	public static String Diagnostique_2;
+	public static String Diagnostique_7;
+	public static String Diagnostique_8;
+	public static String Diagnostique_9;
+	public static String ERROR_WHILE_LOADING_CONCORDANCE_LINE;
+	public static String ElementTreeLabelProvider_0;
+	public static String ElementTreeLabelProvider_1;
+	public static String EmpantWidget_0;
+	public static String EmpantWidget_1;
+	public static String EmpantWidget_2;
+	public static String EmpantWidget_3;
+	public static String EmpantWidget_4;
+	public static String EmpantWidget_5;
+	public static String EmpantWidget_6;
+	public static String EmpantWidget_7;
+	public static String EmpantWidget_8;
+	public static String EmpantWidget_9;
+	public static String Error_computing_specificities;
+	public static String Error_creating_partition;
+	public static String ExecuteGroovyScriptFromFile_2;
+	public static String ExecuteGroovyScript_0;
+	public static String ExecuteGroovyScript_1;
+	public static String ExecuteGroovyScript_2;
+
+	public static String ExecuteGroovyScript_9;
+	public static String ExecuteRScript_1;
+	public static String ExecuteRScript_2;
+	public static String ExecuteRScript_3;
+	public static String ExecuteRText_0;
+	public static String ExecuteRText_1;
+	public static String ExecuteRText_2;
+	public static String ExecuteScriptImport_0;
+	public static String ExecuteScriptImport_1;
+	public static String ExecuteScriptImport_2;
+	public static String ExecuteScriptImport_3;
+	public static String ExecuteScriptImport_5;
+	public static String ExecuteScriptImport_6;
+	public static String ExecuteScriptImport_7;
+	public static String ExecuteScriptImport_8;
+	public static String ExecuteScriptR_0;
+	public static String ExecuteScriptR_1;
+	public static String ExecuteScript_0;
+
+	public static String ExecuteScript_1;
+
+	public static String ExecuteScript_2;
+
+	public static String ExecuteScript_3;
+
+	public static String ExecuteScript_4;
+
+	public static String ExecuteScript_5;
+
+	public static String ExecuteScript_6;
+
+	public static String ExecuteScript_7;
+	public static String Exit_Menu_Label;
+	public static String Explorer_0;
+	public static String Explorer_1;
+	public static String Explorer_2;
+	public static String Explorer_3;
+	public static String Explorer_4;
+	public static String Explorer_5;
+	public static String Explorer_6;
+	public static String Explorer_7;
+	public static String Explorer_8;
+	public static String ExportCorpus_0;
+	public static String ExportCorpus_3;
+	public static String ExportCorpus_4;
+	public static String ExportPreferencePage_1;
+	public static String ExportPreferencePage_18;
+	public static String ExportPreferencePage_19;
+	public static String ExportPreferencePage_21;
+	public static String ExportPreferencePage_3;
+	public static String ExportPreferencePage_4;
+	public static String ExportAnnotation_0;
+	public static String ExportResult_0;
+	public static String ExportResult_1;
+	public static String ExportResult_2;
+	public static String ExportResult_3;
+	public static String ExportResult_4;
+	public static String ExportResult_5;
+	public static String ExportResult_6;
+	public static String ExportSVG_0;
+
+	public static String ExportSVG_1;
+	public static String ExportSVG_2;
+
+	public static String ExportSVG_3;
+	public static String FAILED_TO_PARSE_OPTIONS;
+	public static String FAILED_TO_SAVE_PREFERENCES;
+	public static String FactorialMapEditor_0;
+	public static String FactorialMapEditor_10;
+	public static String FactorialMapEditor_11;
+	public static String FactorialMapEditor_13;
+	public static String FactorialMapEditor_4;
+	public static String FactorialMapEditor_5;
+	public static String FactorialMapEditor_6;
+	public static String FactorialMapEditor_8;
+	public static String FileExplorerPreferencePage_0;
+	public static String FileExplorerPreferencePage_1;
+	public static String FileExplorerPreferencePage_2;
+	public static String FileTreeContentProvider_1;
+	public static String FileTreeContentProvider_2;
+	public static String FileTreeContentProvider_3;
+	public static String FileTreeContentProvider_4;
+	public static String FrequencyListEditorInput_0;
+	public static String FrequencyListEditorInput_1;
+	public static String FrequencyListEditorInput_2;
+	public static String FrequencyListEditorInput_3;
+	public static String FrequencyListEditorInput_4;
+	public static String FrequencyListEditorInput_5;
+	public static String FrequencyListEditorInput_6;
+	public static String FrequencyListEditorInput_9;
+	public static String GenericMultiPageEditor_1;
+	public static String GenericMultiPageEditor_3;
+	public static String GetConcordancesDialog_0;
+	public static String GetConcordancesDialog_1;
+	public static String GetConcordancesDialog_13;
+	public static String GetConcordancesDialog_14;
+	public static String GetConcordancesDialog_15;
+	public static String GetConcordancesDialog_4;
+	public static String GetConcordancesDialog_5;
+	public static String GetConcordancesDialog_6;
+	public static String GetConcordancesDialog_7;
+	public static String GetConcordances_4;
+	public static String GraphicalLogger_0;
+	public static String GroovyConsole_4;
+	public static String GroovyConsole_5;
+	public static String ImportDialog_0;
+	public static String ImportDialog_1;
+	public static String ImportDialog_13;
+	public static String ImportDialog_14;
+	public static String ImportDialog_16;
+	public static String ImportDialog_19;
+	public static String ImportDialog_22;
+	public static String ImportDialog_23;
+	public static String ImportDialog_4;
+	public static String ImportDialog_5;
+	public static String ImportDialog_6;
+	public static String ImportFormEditor_0;
+
+	public static String ImportFormEditor_1;
+	public static String ImportPreferencePage_0;
+
+	public static String ImportPreferencePage_2;
+
+	public static String ImportPreferencePage_3;
+
+	public static String ImportPreferencePage_4;
+
+	public static String ImportPreferencePage_5;
+	public static String ImportSelectedText_0;
+	public static String ImportSelectedText_1;
+	public static String ImportSelectedText_10;
+	public static String ImportSelectedText_12;
+	public static String ImportSelectedText_2;
+	public static String ImportSelectedText_3;
+	public static String ImportSelectedText_4;
+	public static String ImportSelectedText_6;
+	public static String InternalCorpusView_0;
+	public static String InternalCorpusView_1;
+	public static String InternalCorpusView_2;
+	public static String InternalViewEditor_1;
+	public static String InternalViewEditor_10;
+	public static String InternalViewEditor_11;
+	public static String InternalViewEditor_16;
+	public static String InternalViewEditor_2;
+	public static String InternalViewEditor_25;
+	public static String InternalViewEditor_3;
+	public static String InternalViewEditor_4;
+	public static String InternalViewEditor_5;
+	public static String Invalid_analysis_property;
+	public static String JobHandler_0;
+	public static String JobHandler_1;
+	public static String JobHandler_2;
+	public static String JobHandler_3;
+	public static String JobsTimer_12;
+	public static String JobsTimer_13;
+	public static String JobsTimer_15;
+	public static String JobsTimer_16;
+	public static String JobsTimer_17;
+	public static String JobsTimer_19;
+	public static String JobsTimer_2;
+	public static String JobsTimer_20;
+	public static String JobsTimer_21;
+	public static String JobsTimer_5;
+	public static String JobsTimer_9;
+	public static String LanguageSwitchHandler_0;
+	public static String LanguageSwitchHandler_1;
+	public static String LanguageSwitchHandler_3;
+	public static String LanguageSwitchHandler_5;
+	public static String LanguageSwitchHandler_7;
+	public static String LineLabelProvider_1;
+	public static String LoadBinaryCorpus_0;
+
+	public static String LoadBinaryCorpus_1;
+
+	public static String LoadBinaryCorpus_10;
+
+	public static String LoadBinaryCorpus_11;
+
+	public static String LoadBinaryCorpus_12;
+
+	public static String LoadBinaryCorpus_13;
+
+	public static String LoadBinaryCorpus_14;
+
+	public static String LoadBinaryCorpus_15;
+
+	public static String LoadBinaryCorpus_2;
+
+	public static String LoadBinaryCorpus_3;
+
+	public static String LoadBinaryCorpus_4;
+
+	public static String LoadBinaryCorpus_5;
+
+	public static String LoadBinaryCorpus_6;
+
+	public static String LoadBinaryCorpus_7;
+
+	public static String LocalePreferencePage_1;
+	public static String LocalePreferencePage_2;
+	public static String MacroExplorer_2;
+
+	public static String MacrosExplorer_0;
+	public static String MacrosExplorer_1;
+	public static String MainPage_0;
+	public static String MainPage_1;
+	public static String MainPage_10;
+	public static String MainPage_11;
+	public static String MainPage_12;
+	public static String MainPage_13;
+	public static String MainPage_14;
+	public static String MainPage_15;
+	public static String MainPage_17;
+	public static String MainPage_18;
+	public static String MainPage_19;
+	public static String MainPage_2;
+	public static String MainPage_20;
+	public static String MainPage_22;
+	public static String MainPage_23;
+	public static String MainPage_25;
+	public static String MainPage_27;
+	public static String MainPage_28;
+	public static String MainPage_29;
+	public static String MainPage_3;
+	public static String MainPage_30;
+	public static String MainPage_31;
+	public static String MainPage_33;
+	public static String MainPage_34;
+	public static String MainPage_36;
+	public static String MainPage_38;
+	public static String MainPage_39;
+	public static String MainPage_4;
+	public static String MainPage_40;
+	public static String MainPage_42;
+	public static String MainPage_44;
+	public static String MainPage_45;
+	public static String MainPage_46;
+	public static String MainPage_47;
+	public static String MainPage_49;
+	public static String MainPage_5;
+	public static String MainPage_50;
+	public static String MainPage_52;
+	public static String MainPage_53;
+	public static String MainPage_54;
+	public static String MainPage_55;
+	public static String MainPage_6;
+	public static String MainPage_7;
+	public static String MainPage_8;
+	public static String MainPage_9;
+	public static String MergeCols_1;
+	public static String MergeCols_2;
+	public static String MergeCols_5;
+	public static String MergeCols_6;
+	public static String MergeDeleteDialog_0;
+	public static String MergeDeleteDialog_1;
+	public static String MergeDeleteDialog_4;
+	public static String MergeLines_2;
+	public static String MetadataPage_1;
+	public static String MetadataPage_2;
+	public static String MetadataPage_3;
+	public static String MetadataPage_4;
+	public static String MetadataPage_5;
+	public static String MetadataPage_7;
+	public static String MultipleValueTreeDialog_0;
+	public static String NavigationWidget_0;
+	public static String ObjectExplorer_0;
+	public static String ObjectExplorer_10;
+	public static String ObjectExplorer_12;
+	public static String ObjectExplorer_15;
+	public static String ObjectExplorer_2;
+	public static String ObjectExplorer_21;
+	public static String ObjectExplorer_26;
+	public static String ObjectExplorer_27;
+	public static String ObjectExplorer_3;
+	public static String ObjectExplorer_4;
+	public static String ObjectExplorer_5;
+	public static String ObjectExplorer_7;
+	public static String ObjectExplorer_9;
+	public static String ObjectSelectionDialog_0;
+	public static String ObjectSelectionDialog_3;
+	public static String ObjectSelectionDialog_5;
+	public static String ObjectSelector_0;
+	public static String ObjectSelector_1;
+	public static String OpenBiblio_1;
+	public static String OpenBiblio_2;
+	public static String OpenBiblio_7;
+	public static String OpenBiblio_9;
+	public static String OpenBrowser_0;
+	public static String OpenBrowser_1;
+	public static String OpenEdition_0;
+	public static String OpenEdition_1;
+
+	public static String OpenEdition_2;
+	public static String OpenEdition_3;
+	public static String OpenEdition_5;
+	public static String OpenEdition_7;
+	public static String OpenEdition_8;
+	public static String OpenEmptyEditor_2;
+	public static String OpenGraph_8;
+	public static String OpenParaBrowser_0;
+	public static String OpenSVGGraph_0;
+	public static String OpenTXMUserPreferences_0;
+	public static String OpenURI_0;
+	public static String OpenURI_1;
+	public static String ParaBrowserEditor_11;
+	public static String ParaBrowserEditor_18;
+	public static String ParaBrowserEditor_19;
+	public static String ParaBrowserEditor_21;
+	public static String ParaBrowserEditor_22;
+	public static String ParaBrowserEditor_3;
+	public static String ParaBrowserEditor_4;
+	public static String ParaBrowserEditor_5;
+	public static String ParaBrowserEditor_9;
+	public static String ParametersDialog_0;
+	public static String ParametersDialog_1;
+	public static String ParametersDialog_10;
+	public static String ParametersDialog_11;
+	public static String ParametersDialog_12;
+	public static String ParametersDialog_13;
+	public static String ParametersDialog_14;
+	public static String ParametersDialog_15;
+	public static String ParametersDialog_17;
+	public static String PartitionComposer_0;
+	public static String PartitionComposer_1;
+
+	public static String PartitionComposer_11;
+	public static String PartitionComposer_2;
+	public static String PartitionComposer_3;
+	public static String PartitionComposer_5;
+	public static String PartitionComposer_6;
+	public static String PartitionComposer_8;
+	public static String PartitionComposer_9;
+	public static String PartsSize_0;
+	public static String PartsSize_10;
+	public static String PartsSize_2;
+	public static String PasteFile_1;
+	public static String PasteFile_3;
+	public static String PasteFile_4;
+	public static String Preferences_Menu_Label;
+	public static String ProgressionForm_0;
+	public static String ProgressionForm_1;
+	public static String ProgressionForm_10;
+	public static String ProgressionForm_11;
+	public static String ProgressionForm_12;
+	public static String ProgressionForm_13;
+	public static String ProgressionForm_14;
+	public static String ProgressionForm_2;
+	public static String ProgressionForm_3;
+	public static String ProgressionForm_5;
+	public static String ProgressionForm_6;
+	public static String ProgressionForm_7;
+	public static String ProgressionForm_8;
+	public static String ProgressionForm_9;
+	public static String PropertiesSelector_0;
+	public static String PropertiesSelector_1;
+	public static String PropertiesSelector_2;
+	public static String PropertySelector_0;
+	public static String PurgeCorpora_0;
+	public static String PurgeCorpora_1;
+	public static String PurgeCorpora_10;
+	public static String PurgeCorpora_12;
+	public static String PurgeCorpora_13;
+	public static String PurgeCorpora_2;
+	public static String PurgeCorpora_3;
+	public static String PurgeCorpora_4;
+	public static String PurgeCorpora_5;
+	public static String PurgeCorpora_7;
+	public static String PurgeCorpora_9;
+	public static String QueriesView_1;
+	public static String QueriesView_10;
+	public static String QueriesView_5;
+	public static String QueryAssistDialog_0;
+	public static String QueryAssistDialog_1;
+	public static String QueryAssistDialog_10;
+	public static String QueryAssistDialog_11;
+	public static String QueryAssistDialog_12;
+	public static String QueryAssistDialog_13;
+	public static String QueryAssistDialog_2;
+	public static String QueryAssistDialog_3;
+	public static String QueryAssistDialog_32;
+	public static String QueryAssistDialog_33;
+	public static String QueryAssistDialog_34;
+	public static String QueryAssistDialog_8;
+	public static String QueryIndexEditor_0;
+	public static String QueryIndexEditor_1;
+	public static String QueryIndexEditor_10;
+	public static String QueryIndexEditor_11;
+	public static String QueryIndexEditor_2;
+	public static String QueryIndexEditor_3;
+	public static String QueryIndexEditor_4;
+	public static String QueryIndexEditor_5;
+	public static String QueryIndexEditor_6;
+	public static String QueryIndexEditor_7;
+	public static String QueryIndexEditor_8;
+	public static String QueryIndexEditor_9;
+	public static String RConsole_0;
+
+	public static String RConsole_1;
+
+	public static String RVariablesView_1;
+	public static String RVariablesView_2;
+	public static String RVariablesView_9;
+	public static String ReferencerEditor_0;
+	public static String ReferencerEditor_10;
+	public static String ReferencerEditor_11;
+	public static String ReferencerEditor_12;
+	public static String ReferencerEditor_13;
+	public static String ReferencerEditor_17;
+	public static String ReferencerEditor_19;
+	public static String ReferencerEditor_21;
+	public static String ReferencerEditor_23;
+	public static String ReferencerEditor_25;
+	public static String ReferencerEditor_5;
+	public static String ReferencerEditor_6;
+	public static String ReferencerEditor_7;
+	public static String ReferencerEditor_8;
+	public static String ReferencerEditor_9;
+	public static String ReferencerPreferencePage_2;
+	public static String ReferencerPreferencePage_3;
+	public static String RenameFile_0;
+	public static String RenameFile_2;
+	public static String RenameFile_3;
+	public static String ProgressionDialog_0;
+	public static String ProgressionDialog_1;
+	public static String ProgressionDialog_10;
+	public static String ProgressionDialog_11;
+	public static String ProgressionDialog_13;
+	public static String ProgressionDialog_14;
+	public static String ProgressionDialog_15;
+	public static String ProgressionDialog_16;
+	public static String ProgressionDialog_17;
+	public static String ProgressionDialog_2;
+	public static String ProgressionDialog_3;
+	public static String ProgressionDialog_4;
+	public static String ProgressionDialog_5;
+	public static String ProgressionDialog_7;
+	public static String ProgressionDialog_8;
+	public static String ProgressionDialog_9;
+	public static String ProgressionEditorInput_0;
+	public static String RestartTXM_0;
+	public static String RestartTXM_1;
+	public static String RunGroovyScript_0;
+	public static String RunGroovyScript_1;
+	public static String RunGroovyScript_2;
+	public static String RunGroovyScript_3;
+	public static String RunGroovyScript_4;
+	public static String RunGroovyScript_8;
+	public static String RunGroovyScript_9;
+	public static String RunGroovyScript_10;
+	public static String SVGGraphicEditor_1;
+	public static String SaveAs_2;
+	public static String ScriptPreferencePage_0;
+
+	public static String ScriptPreferencePage_1;
+	public static String ScriptPreferencePage_3;
+	public static String SetContextSize_1;
+	public static String SetContextSize_2;
+	public static String SetContextSize_3;
+	public static String SetContextSize_4;
+	public static String SetEncoding_0;
+	public static String SetEncoding_1;
+	public static String SetEncoding_2;
+	public static String SetLineNumber_0;
+	public static String SetLineNumber_1;
+	public static String SetSortProperty_1;
+	public static String SetSortProperty_2;
+	public static String SetSortProperty_3;
+	public static String ShowSelected_4;
+	public static String ShowSvgHelp_0;
+	public static String ShowSvgHelp_1;
+	public static String ShowSvgHelp_2;
+	public static String ShowSvgHelp_3;
+	public static String ShowSvgHelp_4;
+	public static String ShowSvgHelp_5;
+	public static String SimpleSubcorpusPanel_0;
+
+	public static String SingularValuesEditor_0;
+	public static String SortPropertySelection_0;
+	public static String Structure_field_not_empty;
+	public static String Submit_0;
+
+	public static String SummaryView_0;
+	public static String TXMCqpServerWatcher_0;
+	public static String TXMCqpServerWatcher_1;
+	public static String TXMRServeWatcher_0;
+	public static String TXMRServeWatcher_1;
+	public static String TXMRServeWatcher_2;
+	public static String TXMRServeWatcher_3;
+	public static String TXMRServeWatcher_4;
+	public static String TablableVector_0;
+	public static String TableEditor_0;
+	public static String TableKeyListener_0;
+
+	public static String TableKeyListener_1;
+	public static String TableKeyListener_6;
+	public static String TableSorter_0;
+	public static String TextometriePreferencePage_0;
+	public static String TextometriePreferencePage_1;
+	public static String TextometriePreferencePage_14;
+	public static String TextometriePreferencePage_15;
+	public static String TextometriePreferencePage_18;
+	public static String TextometriePreferencePage_19;
+	public static String TextometriePreferencePage_2;
+	public static String TextometriePreferencePage_20;
+	public static String TextualPlansSection_milestone_label;
+
+	public static String TextualPlansSection_milestone_tooltip;
+
+	public static String TextualPlansSection_outsidetext_label;
+
+	public static String TextualPlansSection_outsidetext_tooltip;
+
+	public static String TextualPlansSection_outsidetexttoedit_label;
+
+	public static String TextualPlansSection_outsidetexttoedit_tooltip;
+
+	public static String TextualPlansSection_save_error;
+
+	public static String TextualPlansSection_title;
+
+	public static String TextualPlansSection_update_error;
+
+	public static String TreeTaggerPreferencePage_0;
+	public static String TreeTaggerPreferencePage_1;
+	public static String TreeTaggerPreferencePage_2;
+	public static String TreeTaggerPreferencePage_3;
+	public static String TxmBrowser_0;
+	public static String TxmBrowser_10;
+	public static String TxmBrowser_11;
+	public static String TxmBrowser_12;
+	public static String TxmBrowser_5;
+	public static String TxmBrowser_6;
+	public static String TxmBrowser_7;
+	public static String TxmBrowser_8;
+	public static String TxmBrowser_9;
+	public static String TxmCommand_1;
+	public static String TxtEditor_0;
+	public static String TxtEditor_1;
+	public static String UIParameterException_0;
+	public static String UserPreferencePage_0;
+
+	public static String UserPreferencePage_1;
+	public static String UserPreferencePage_3;
+	public static String ViewPropertySelectionDialog_0;
+	public static String ViewPropertySelection_0;
+	public static String IndexToCooccurrence_0;
+	public static String IndexToLexicalTable_0;
+
+	public static String WordCloudPreferencePage_0;
+	public static String WordCloudPreferencePage_1;
+	public static String WordCloudPreferencePage_2;
+	public static String WordCloudPreferencePage_3;
+	public static String ConcordancesEditor_referenceColumn_text;
+	public static String ConcordancesEditor_xpndtmNewExpanditem_text;
+	public static String ConcordancesEditor_xpndtmNewParameters_text;
+	public static String ConcordancesEditor_xpndtmNewExpanditem_text_1;
+	public static String ConcordancesEditor_xpndtmNewExpanditem_text_2;
+
+	public static String CleanPerspective_1;
+	public static String CleanPerspective_2;
+	public static String ExecuteLastGroovyScript_0;
+	public static String ExecuteLastGroovyScript_1;
+	public static String ExecuteLastGroovyScript_3;
+	public static String ShowSelected_0;
+	public static String SaveBeforeExecutionDialog_0;
+	public static String DownloadJobHandler_0;
+	public static String FixUpdateHandler_0;
+	
+	static {
+		// initialize resource bundle
+		Utf8NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+		//NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	public static String SEARCH;
+
+	private Messages() {
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/Messages.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/perspective/LabPerspective.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/perspective/LabPerspective.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/perspective/LabPerspective.java	(revision 324)
@@ -0,0 +1,82 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.perspective;
+
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.rcp.views.fileexplorer.Explorer;
+import org.txm.rcp.views.fileexplorer.MacroExplorer;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RPerspective.
+ */
+public class LabPerspective implements IPerspectiveFactory {
+	
+	public final static String ID = "org.txm.rcp.perspective.LabPerspective";
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
+	 */
+	@Override
+	public void createInitialLayout(IPageLayout layout) {
+		String editorArea = layout.getEditorArea();
+		layout.setEditorAreaVisible(true);
+		layout.setFixed(false);
+		
+		IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.25f, editorArea); //$NON-NLS-1$
+		left.addView(CorporaView.ID);
+		left.addView(Explorer.ID);
+		left.addView(MacroExplorer.ID);
+
+		layout.getViewLayout(CorporaView.ID).setCloseable(false);
+		layout.getViewLayout(Explorer.ID).setCloseable(false);
+		
+		IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.66f, editorArea); //$NON-NLS-1$
+		bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
+	}
+	
+	public static boolean isActive() {
+		IWorkbench wb = PlatformUI.getWorkbench();
+		IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
+		if (win == null) return false;
+		IWorkbenchPage page = win.getActivePage();
+		if (page == null) return false;
+		IPerspectiveDescriptor perspective = page.getPerspective();
+		if (perspective == null) return false;
+
+		return ID.equals(perspective.getId());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/perspective/LabPerspective.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/perspective/TXMPerspective.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/perspective/TXMPerspective.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/perspective/TXMPerspective.java	(revision 324)
@@ -0,0 +1,78 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.perspective;
+
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.rcp.views.fileexplorer.Explorer;
+
+// TODO: Auto-generated Javadoc
+/**
+ * define which view are opened at TXM start up 
+ * @author mdecorde.
+ */
+public class TXMPerspective implements IPerspectiveFactory {
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.perspective.TXMPerspective"; //$NON-NLS-1$
+	static IPageLayout initialLayout;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
+	 */
+	@Override
+	public void createInitialLayout(IPageLayout layout) {
+		
+		TXMPerspective.initialLayout = layout;
+		//System.out.println("INITIAL LAYOUT="+initialLayout);
+		String editorArea = layout.getEditorArea();
+		layout.setEditorAreaVisible(true);
+
+		IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.25f, editorArea); //$NON-NLS-1$
+		left.addView(CorporaView.ID);
+		left.addView(Explorer.ID);
+
+		layout.getViewLayout(CorporaView.ID).setCloseable(false);
+		layout.getViewLayout(Explorer.ID).setCloseable(false);
+		
+		IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.66f, editorArea); //$NON-NLS-1$
+		// bottom.addView(IPageLayout.ID_OUTLINE);
+		bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
+		//bottom.addView("org.eclipse.ui.views.ProgressView"); //$NON-NLS-1$
+		// bottom.addView(GroovyConsole.ID);
+		// bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
+		
+	}
+	
+	public static IPageLayout getInitiaLayout() {
+		return initialLayout;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/perspective/TXMPerspective.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/txm.ppf
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/txm.ppf	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/txm.ppf	(revision 324)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project type="java bundle">
+<settings name="txm">
+<replacespace enable="false" string="_"/>
+<emptykeys enable="true"/>
+<saveWYSIWYGmode enable="true"/>
+</settings>
+<files workdirectory="/home/sheiden/workspace/org.txm.rcpapp/src/main/java/org/txm/rcp">
+<default filename="messages.properties">
+<properties encoding="java utf" visible="true" withescape="true"/>
+</default>
+<file filename="messages_fr.properties">
+<properties encoding="java utf" visible="true" withescape="true"/>
+</file>
+</files>
+<scanner>
+<files enable="false" rootdir="./"/>
+</scanner>
+</project>
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationActionBarAdvisor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationActionBarAdvisor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationActionBarAdvisor.java	(revision 324)
@@ -0,0 +1,211 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import org.eclipse.jface.action.ICoolBarManager;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.eclipse.ui.application.ActionBarAdvisor;
+import org.eclipse.ui.application.IActionBarConfigurer;
+//import org.txm.rcp.actions.ComputeSpecificities;
+//import org.txm.rcp.actions.CreateFrequencyList;
+//import org.txm.rcp.actions.CreatePartition;
+//import org.txm.rcp.actions.CreateSubcorpus;
+//import org.txm.rcp.actions.GetConcordances;
+import org.txm.rcp.actions.RunGroovyScript;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Controls the availables commands in toolbar
+ */
+@Deprecated
+public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
+
+	/**
+	 * Instantiates a new application action bar advisor.
+	 *
+	 * @param configurer the configurer
+	 */
+	public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
+		super(configurer);
+	}
+
+	/** The exit action. */
+	private IWorkbenchAction exitAction;
+
+	/** The about action. */
+	private IWorkbenchAction aboutAction;
+
+	/** The preference action. */
+	private IWorkbenchAction preferenceAction;
+
+	/** The delete action. */
+	private IWorkbenchAction deleteAction;
+
+	/** The compute specificities. */
+	//private ComputeSpecificities computeSpecificities;
+
+	/** The get concordances. */
+	//private GetConcordances getConcordances;
+
+	//private CreatePartition createPartition;
+
+	//private CreateSubcorpus createSubcorpus;
+
+	/** The create frequency list. */
+	//private CreateFrequencyList createFrequencyList;
+
+	// private ComputeCorrespondanceAnalysis computeCorrespondanceAnalysis;
+
+	/** The import action. */
+	private RunGroovyScript importAction;
+
+	/** The help action. */
+	private IWorkbenchAction helpAction;
+	
+	/** The help search action. */
+	private IWorkbenchAction helpSearchAction;
+	
+	/** The dynamic help action. */
+	private IWorkbenchAction dynamicHelpAction;
+
+	/**
+	 * build all the actions of the application, many are deprecated.
+	 *
+	 * @param window the window
+	 */
+	@Override
+	protected void makeActions(IWorkbenchWindow window) {
+
+		preferenceAction = ActionFactory.PREFERENCES.create(window);
+		preferenceAction.setText(Messages.Preferences_Menu_Label);
+		register(preferenceAction);
+		exitAction = ActionFactory.QUIT.create(window);
+		exitAction.setText(Messages.Exit_Menu_Label);
+		register(exitAction);
+		aboutAction = ActionFactory.ABOUT.create(window);
+		aboutAction.setText(Messages.About_Menu_Label);
+		register(aboutAction);
+		deleteAction = ActionFactory.DELETE.create(window);
+		// register(deleteAction);
+		//computeSpecificities = new ComputeSpecificities(window);
+		//register(computeSpecificities);
+		//createPartition = new CreatePartition(window);
+		//register(createPartition);
+		//createSubcorpus = new CreateSubcorpus(window);
+		//register(createSubcorpus);
+		helpAction = ActionFactory.HELP_CONTENTS.create(window);
+		register(helpAction);
+		dynamicHelpAction = ActionFactory.DYNAMIC_HELP.create(window);
+		register(dynamicHelpAction);
+		{
+			helpSearchAction = ActionFactory.HELP_SEARCH.create(window);
+			register(helpSearchAction);
+		}
+		//createFrequencyList = new CreateFrequencyList(window);
+		//register(createFrequencyList);
+
+		// TODO remettre l'analyse par correspondance dans la toolbar principale
+		// computeCorrespondanceAnalysis = new
+		// ComputeCorrespondanceAnalysis(window);
+		// register(computeCorrespondanceAnalysis);
+
+		//getConcordances = new GetConcordances(window);
+		//register(getConcordances);
+
+		// System.out.println(Messages.ApplicationActionBarAdvisor_0);
+		importAction = new RunGroovyScript(window);
+		register(importAction);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.application.ActionBarAdvisor#fillMenuBar(org.eclipse.jface.action.IMenuManager)
+	 */
+	@Override
+	protected void fillMenuBar(IMenuManager menuBar) {
+		// MenuManager fileMenu = new MenuManager(Messages.File_Menu_Label1,
+		// Messages.File_Menu_Label2);
+		// fileMenu.add(openFileCommand.);
+		// fileMenu.add(preferenceAction);
+		// fileMenu.add(importAction);
+		// fileMenu.add(new Separator());
+		// fileMenu.add(exitAction);
+
+		// MenuManager corpusMenu = new MenuManager(Messages.Corpus_Menu_Label1,
+		// Messages.Corpus_Menu_Label2);
+		// corpusMenu.add(createSubcorpus);
+		// corpusMenu.add(createPartition);
+		// corpusMenu.add(new Separator());
+		// corpusMenu.add(createFrequencyList);
+		// corpusMenu.add(getConcordances);
+		// corpusMenu.add(computeSpecificities);
+		// TODO remettre l'analyse par correspondance dans le menu corpus
+		// corpusMenu.add(computeCorrespondanceAnalysis);
+
+		// MenuManager helpMenu = new MenuManager(Messages.Help_Menu_Label1,
+		// Messages.Help_Menu_Label2);
+		// helpMenu.add(helpAction);
+		// helpMenu.add(dynamicHelpAction);
+		// helpMenu.add(helpSearchAction);
+		// helpMenu.add(aboutAction);
+
+		// menuBar.add(fileMenu);
+		// menuBar.add(corpusMenu);
+		// menuBar.add(helpMenu);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.application.ActionBarAdvisor#fillCoolBar(org.eclipse.jface.action.ICoolBarManager)
+	 */
+	@Override
+	protected void fillCoolBar(ICoolBarManager coolBar) {
+		// IToolBarManager toolbar = new ToolBarManager(coolBar.getStyle());
+		// coolBar.add(toolbar);
+		// toolbar.add(createSubcorpus);
+		// toolbar.add(createPartition);
+		// toolbar.add(new Separator());
+		// toolbar.add(createFrequencyList);
+		// toolbar.add(getConcordances);
+		// toolbar.add(computeSpecificities);
+		// toolbar.add(computeCorrespondanceAnalysis);
+	}
+
+	/**
+	 * Fill tray item.
+	 *
+	 * @param trayItem the tray item
+	 */
+	protected void fillTrayItem(IMenuManager trayItem) {
+		trayItem.add(aboutAction);
+		trayItem.add(exitAction);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationActionBarAdvisor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Application classes</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/SVGComposite.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/SVGComposite.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/SVGComposite.java	(revision 324)
@@ -0,0 +1,128 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.svg;
+import java.awt.Frame;
+import java.net.URL;
+
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import org.eclipse.swt.awt.SWT_AWT;
+import org.eclipse.swt.widgets.Composite;
+import org.txm.rcp.utils.Logger;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class SVGComposite.
+ */
+public class SVGComposite extends Composite{
+
+	static
+	{
+		System.setProperty("sun.awt.noerasebackground", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	/** The old rect. */
+	private org.eclipse.swt.graphics.Rectangle oldRect = null;
+	
+	/** The panel. */
+	SVGPanel panel;
+	
+	/**
+	 * Instantiates a new sVG composite.
+	 *
+	 * @param parent the parent
+	 * @param style the style
+	 */
+	public SVGComposite(Composite parent, int style) {
+		super(parent, style);
+		/*org.eclipse.swt.graphics.Rectangle newRect = this.getClientArea();
+
+		if (oldRect != null) {
+			int heightDelta = newRect.height - oldRect.height;
+			int widthDelta = newRect.width - oldRect.width;
+			if ((heightDelta > 0) || (widthDelta > 0)) {
+				GC gc = new GC(this);
+				try {
+					gc.fillRectangle(newRect.x, oldRect.height, newRect.width, heightDelta);
+					gc.fillRectangle(oldRect.width, newRect.y, widthDelta, newRect.height);
+				} finally {
+					gc.dispose();
+				}
+			}
+		}
+		oldRect = newRect;
+*/
+
+		
+		try {
+			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+		} catch (ClassNotFoundException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} catch (InstantiationException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} catch (IllegalAccessException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} catch (UnsupportedLookAndFeelException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		Frame frame = SWT_AWT.new_Frame(this);
+		try {
+			panel = new SVGPanel(frame);
+		}
+		catch(Throwable exception){Logger.printStackTrace(exception);}
+		frame.add(panel);
+		frame.setVisible(true);
+
+	}
+
+	/**
+	 * Reset zoom.
+	 */
+	public void resetZoom() {
+		panel.resetZoom();
+	}
+
+	/**
+	 * Sets the SVG file.
+	 *
+	 * @param url the new sVG file
+	 */
+	public void setSVGFile(URL url) {
+		//System.out.println("LOAD SVG FROM URL: "+url);
+		panel.loadSVGDocument(url.toExternalForm());
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/SVGComposite.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Display SVG in swt composite</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/SVGPanel.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/SVGPanel.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/SVGPanel.java	(revision 324)
@@ -0,0 +1,228 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.svg;
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseWheelEvent;
+import java.awt.event.MouseWheelListener;
+import java.awt.geom.AffineTransform;
+import java.util.List;
+
+import javax.swing.JPanel;
+
+import org.apache.batik.swing.JSVGCanvas;
+import org.apache.batik.swing.gvt.AbstractImageZoomInteractor;
+import org.apache.batik.swing.gvt.AbstractPanInteractor;
+import org.apache.batik.swing.gvt.AbstractResetTransformInteractor;
+import org.apache.batik.swing.gvt.AbstractZoomInteractor;
+import org.apache.batik.swing.gvt.Interactor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class SVGPanel.
+ */
+public class SVGPanel extends JPanel{
+	
+	/** The Constant serialVersionUID. */
+	private static final long serialVersionUID = -4381954167495751486L;
+	// The SVG canvas.
+	/** The svg canvas. */
+	protected JSVGCanvas svgCanvas = new JSVGCanvas();
+	
+	/** The frame. */
+	private Frame frame;
+
+	// ----------------------------------------------------------------------
+	// Interactors
+	// ----------------------------------------------------------------------
+
+	/**
+	 * An interactor to perform a zoom.
+	 * <p>Binding: BUTTON1 + CTRL Key</p>
+	 */
+	protected Interactor zoomInteractor = new AbstractZoomInteractor() {
+		@Override
+		public boolean startInteraction(InputEvent ie) {
+			int mods = ie.getModifiers();
+			return
+			ie.getID() == MouseEvent.MOUSE_PRESSED &&
+			(mods & InputEvent.BUTTON1_MASK) != 0 &&
+			(mods & InputEvent.CTRL_MASK) != 0;
+		}
+	};
+
+	/**
+	 * An interactor to perform a realtime zoom.
+	 * <p>Binding: BUTTON3 + SHif T Key</p>
+	 */
+	protected Interactor imageZoomInteractor
+	= new AbstractImageZoomInteractor() {
+		@Override
+		public boolean startInteraction(InputEvent ie) {
+			int mods = ie.getModifiers();
+			return
+			ie.getID() == MouseEvent.MOUSE_PRESSED &&
+			(mods & InputEvent.BUTTON3_MASK) != 0 &&
+			(mods & InputEvent.SHIFT_MASK) != 0;
+		}
+	};
+
+	/**
+	 * An interactor to perform a translation.
+	 * <p>Binding: BUTTON1 + SHif T Key</p>
+	 */
+	protected Interactor panInteractor = new AbstractPanInteractor() {
+		@Override
+		public boolean startInteraction(InputEvent ie) {
+			int mods = ie.getModifiers();
+			return
+			ie.getID() == MouseEvent.MOUSE_PRESSED &&
+			(mods & InputEvent.BUTTON3_MASK) != 0 &&
+			(mods & InputEvent.SHIFT_MASK) != 1;
+		}
+	};
+
+	/**
+	 * An interactor to reset the rendering transform.
+	 * <p>Binding: CTRL+SHif T+BUTTON3</p>
+	 */
+	protected Interactor resetTransformInteractor =
+		new AbstractResetTransformInteractor() {
+		@Override
+		public boolean startInteraction(InputEvent ie) {
+			int mods = ie.getModifiers();
+			return
+			ie.getID() == MouseEvent.MOUSE_CLICKED &&
+			(mods & InputEvent.BUTTON2_MASK) != 0 &&
+			(mods & InputEvent.SHIFT_MASK) != 1 &&
+			(mods & InputEvent.CTRL_MASK) != 1;
+		}
+	};
+
+	
+	/** The zoom. */
+	int zoom = 0;
+	
+	/**
+	 * Instantiates a new sVG panel.
+	 *
+	 * @param frame2 the frame2
+	 */
+	public SVGPanel(Frame frame2)
+	{
+		super(new BorderLayout());
+		this.frame = frame2;
+
+		this.add("Center", svgCanvas); //$NON-NLS-1$
+
+		List<Interactor> list = svgCanvas.getInteractors();
+		list.clear();
+		list.add(zoomInteractor);
+		list.add(imageZoomInteractor);
+		list.add(panInteractor);
+		list.add(resetTransformInteractor);
+
+		this.addMouseWheelListener(new MouseWheelListener() {
+
+			@Override
+			public void mouseWheelMoved(MouseWheelEvent e) {
+				if (e.getUnitsToScroll() < 0)
+				{
+					zoom++;
+					//System.out.println("in");
+					AffineTransform at;
+					JPanel c = (JPanel)e.getSource();
+
+					int xStart = e.getX();
+					int yStart = e.getY();
+
+					at = AffineTransform.getTranslateInstance(xStart, yStart);
+					int dy = zoom;
+					double s;
+					if (dy < 0) {	
+						s = -1f/dy;
+					} else {
+						s = dy;
+					}
+
+					at.scale(s, s);
+					at.translate(-xStart, -yStart);
+					if (at.getDeterminant() != 0)
+						svgCanvas.setRenderingTransform(at);
+				} else {
+					zoom--;
+					//System.out.println("out");
+					AffineTransform at;
+					JPanel c = (JPanel)e.getSource();
+
+					int xStart = e.getX();
+					int yStart = e.getY();
+
+					at = AffineTransform.getTranslateInstance(xStart, yStart);
+					int dy = zoom;
+					double s;
+					if (dy < 0) {
+						s = -1f/dy;
+					} else {
+						s =  dy;
+					}
+
+					at.scale(s, s);
+					at.translate(-xStart, -yStart);
+					if (at.getDeterminant() != 0)
+						svgCanvas.setRenderingTransform(at);
+				}
+			}
+		});
+
+	}
+
+	/**
+	 * Reset zoom.
+	 */
+	public void resetZoom()
+	{
+		AffineTransform trans = AffineTransform.getTranslateInstance(0, 0);
+		trans.scale(1, 1);
+		svgCanvas.setRenderingTransform(trans);
+
+	}
+
+	/**
+	 * Load svg document.
+	 *
+	 * @param url the url
+	 */
+	public void loadSVGDocument(String url) {
+		svgCanvas.show();
+		svgCanvas.loadSVGDocument(url);
+		frame.pack();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/svg/SVGPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/wizard/ImportCorpusWizard.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/wizard/ImportCorpusWizard.java	(revision 323)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/wizard/ImportCorpusWizard.java	(revision 324)
@@ -18,7 +18,7 @@
 import org.eclipse.ui.dialogs.WizardImportPage;
 import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
 import org.eclipse.ui.dialogs.WizardResourceImportPage;
-import org.txm.rcpapplication.IImageKeys;
+import org.txm.rcp.IImageKeys;
 
 public class ImportCorpusWizard extends WizardResourceImportPage implements IImportWizard {
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/CreateSubCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/CreateSubCorpus.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/CreateSubCorpus.java	(revision 324)
@@ -0,0 +1,166 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.base;
+
+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.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.actions.CreateSubcorpusDialog;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Subcorpus;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Command which creates a subcorpus from a Corpus @ author mdecorde.
+ */
+public class CreateSubCorpus extends AbstractHandler {
+
+	/** The selection. */
+	private IStructuredSelection selection;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		if (selection == null) {
+			System.out.println(Messages.CreateSubCorpus_1+HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActiveEditor());
+			return null;
+		}
+		Object firstElement = selection.getFirstElement();
+		
+		if (!(firstElement instanceof Corpus)) {
+			System.out.println(Messages.CreateSubCorpus_3+firstElement);
+			return null;
+		}
+		
+		final Corpus corpus = (Corpus) firstElement;
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		final CreateSubcorpusDialog d = new CreateSubcorpusDialog(shell, corpus);
+		int code = d.open();
+		if (code == Window.OK) {
+			JobHandler jobhandler = new JobHandler(NLS.bind(
+					Messages.CreateSubCorpus_create, corpus.getName())) {
+				@Override
+				protected IStatus run(IProgressMonitor monitor) {		
+					this.runInit(monitor);
+					JobsTimer.start();
+					try {
+						monitor.beginTask(Messages.CreateSubCorpus_begin, 100);
+						final Subcorpus subcorpus;
+
+						if (d.isAdvancedSelected() || d.isAssistedSelected()) {
+							Query q = new Query(d.getQuery());
+							System.out.println(NLS.bind(Messages.CreateSubcorpus_9,
+								corpus.getName(), q.getQueryString())); 
+							subcorpus = corpus.createSubcorpus(q, d.getName());
+						} 
+						else {
+							System.out.println(NLS.bind(Messages.CreateSubcorpus_7,
+							new Object[]{corpus.getName(), d.getStructuralUnit(),
+									d.getStructuralUnitProperty(), d.getValues()}));
+							
+							//Escape regex char of prop values
+							//List<String> values = d.getValues();
+							//for(int i = 0 ; i < values.size() ; i++)
+							//	values.set(i, Query.addBackSlash(values.get(i)));
+							
+							subcorpus = corpus.createSubcorpus(d
+									.getStructuralUnit(), d
+									.getStructuralUnitProperty(),
+									d.getValues(), d.getName());
+
+						}
+						
+						if(subcorpus == null)
+						{
+							monitor.done();
+							System.out.println(Messages.CreateSubCorpus_0);
+							return Status.CANCEL_STATUS;
+						}
+						
+						System.out.println(NLS.bind(Messages.CreateSubcorpus_8
+								, subcorpus.getName()));
+						monitor.worked(50);
+
+						monitor.subTask(Messages.RefreshingCorporaView);
+						syncExec(new Runnable() {
+							@Override
+							public void run() {
+								CorporaView.refresh();
+								//System.out.println("expand");
+								CorporaView.expand(subcorpus.getParent());
+							}
+						});
+
+						monitor.worked(100);
+					} catch (ThreadDeath td) {
+						return Status.CANCEL_STATUS;
+					} catch (CqiClientException e) {
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+						Log.severe(e.toString());
+						
+						try {
+							System.out.println(Messages.LastCQPError+Toolbox.getCqiClient().getLastCQPError());
+						} catch (Exception e1) {
+							System.out.println(Messages.CreateSubCorpus_2+e1);
+							org.txm.rcp.utils.Logger.printStackTrace(e1);
+						}
+					} finally {
+						monitor.done();
+						JobsTimer.stopAndPrint();
+					}				
+					return Status.OK_STATUS;
+				}
+			};
+			jobhandler.startJob();
+		}
+		return null;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/CreateSubCorpus.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/DeleteObject.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/DeleteObject.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/DeleteObject.java	(revision 324)
@@ -0,0 +1,372 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.base;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+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.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.Workbench;
+import org.txm.core.results.ITXMResult;
+import org.txm.functions.Function;
+import org.txm.functions.concordances.Concordance;
+//import org.txm.functions.queryindex.QueryIndex;
+import org.txm.functions.referencer.Referencer;
+import org.txm.lexicaltable.core.functions.LexicalTable;
+import org.txm.objects.TxmObject;
+import org.txm.rcp.editors.TXMEditorPart;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.preferences.UserPreferencePage;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.BasesView;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.statsengine.r.rcp.views.RVariablesView;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * Delete the selection: TXMObjects and results code for the results must be
+ * added manually here @ author mdecorde.
+ */
+public class DeleteObject extends AbstractHandler {
+
+	private static boolean shouldRestartToolbox = false;
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		final IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		
+		if (!askContinueToDelete(selection)) return null;
+		
+		JobHandler job = new JobHandler("Deleting", true) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				delete(selection);
+				return Status.OK_STATUS;
+			}
+		};
+		job.schedule();
+		try {
+			job.join();
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+			return Status.CANCEL_STATUS;
+		}
+		return job.getResultObject();
+	}
+
+	private static boolean continueToDelete = true;
+	public static synchronized boolean askContinueToDelete(final IStructuredSelection selection) {
+		continueToDelete = true;
+		
+		boolean dontShowAlert = !TxmPreferences.getBoolean(
+				UserPreferencePage.USER_ALERT_DELETE, false);
+		
+		if (dontShowAlert) {
+			Display.getDefault().syncExec(new Runnable() {
+				@Override
+				public void run() {
+					MessageBox messageBox = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_QUESTION
+							| SWT.YES | SWT.NO);
+					messageBox.setMessage(NLS.bind(Messages.DeleteObject_0, selection.toList()));
+					int response = messageBox.open();
+					if (response != SWT.YES) {
+						StatusLine.setMessage(""); //$NON-NLS-1$
+						continueToDelete = false;
+					}
+				}
+			});
+		}
+		return continueToDelete;
+	}
+	
+	/**
+	 * Delete.
+	 *
+	 * @param sel the selection of object to delete
+	 */
+	public static HashSet<Object> delete(ISelection sel) {
+		IStructuredSelection selection = (IStructuredSelection) sel;
+		if (selection.size() == 0) return new HashSet<Object>();
+		
+		List<Object> objects = new ArrayList<Object>(selection.toList());
+		return delete(objects);
+	}
+	
+
+	/**
+	 * Delete.
+	 *
+	 * @param objects the objects to delete
+	 * @return 
+	 */
+	public synchronized static HashSet<Object> delete(final List<Object> objects) {
+		StatusLine.setMessage(NLS.bind(Messages.DeleteObject_5, objects));
+		
+		final HashSet<Object> allObjectDeleted = new HashSet<Object>();
+		shouldRestartToolbox = false;
+		while (objects.size() > 0) {
+			Object o = objects.get(0);
+			try {
+				List<Object> deleted = delete(o);
+				allObjectDeleted.addAll(deleted);
+				if (deleted.size() == 0) {
+					StatusLine.setMessage(Messages.DeleteObject_3+" : "+o);
+					return new HashSet<Object>();
+				}
+				// remove results already deleted
+				objects.removeAll(deleted);
+			} catch(Exception e) {
+				Log.info(NLS.bind(Messages.DeleteObject_4, o, e)); 
+				StatusLine.error(NLS.bind(Messages.DeleteObject_4, o, e)); 
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+				return new HashSet<Object>();
+			}
+		}
+		
+		if (allObjectDeleted.size() > 0) {
+			
+			if (shouldRestartToolbox) {
+				org.txm.Toolbox.restartWorkspace();
+				org.txm.Toolbox.restartSearchEngine();
+				
+				System.err.println(Messages.AddBase_10);
+				StatusLine.setMessage(Messages.AddBase_10);
+			}
+			
+			Display.getDefault().syncExec(new Runnable() {
+				@Override
+				public void run() {
+					try {
+						CorporaView.refresh();
+						BasesView.refresh();
+						QueriesView.refresh();
+						RVariablesView.refresh();
+						
+						//close corresponding editors
+						for(Object obj : allObjectDeleted) {
+							closeEditorOfSelection(obj);
+						}
+					} catch(Exception e) { }
+				}
+			});
+		}
+
+		StatusLine.setMessage(""); //$NON-NLS-1$
+		return allObjectDeleted;
+	}
+
+	/**
+	 * Delete.
+	 *
+	 * @param o the o
+	 * @return the list
+	 */
+	// FIXME: when TXMResult will be implemented, remove all unused code
+	public static List<Object> delete(Object o) {
+		ArrayList<Object> deleted = new ArrayList<Object>();
+		if (o instanceof TxmObject) {
+			Log.info(NLS.bind(Messages.DeleteObject_10, ((TxmObject) o).getName()));
+
+			try {
+				if (o instanceof Corpus) {
+					Corpus c = (Corpus)o;
+					if (o instanceof MainCorpus) {
+						shouldRestartToolbox = true;
+					}
+					deleted.addAll(c.clearResults());
+					deleted.addAll(c.getSubcorpora());
+					deleted.addAll(c.getPartitions());
+
+					if (!((TxmObject) o).delete()) {
+						Log.info(Messages.DeleteObject_3);
+						return new ArrayList<Object>(0);
+					}
+				} else if (o instanceof Partition) {
+					Partition p = (Partition)o;
+					for (int i = 0 ; i < p.getResults().size() ; i++) {
+						deleted.addAll(delete(p.getResults().get(i)));
+						i--;
+					}
+					if (!((TxmObject) o).delete()) {
+						Log.info(Messages.DeleteObject_3);
+						return new ArrayList<Object>(0);
+					}
+				}
+			} catch (Exception e) {
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+			}
+//		} else if (o instanceof Lexicon) {
+//			Lexicon l = (Lexicon) o;
+//			Corpus c = l.getCorpus();
+//			c.dropLexicon(l.getProperty());
+//			System.out.println(NLS.bind(Messages.DeleteObject_10, l.getName()));
+//		} else if (o instanceof SpecificitesResult) {
+//			SpecificitesResult specif = (SpecificitesResult) o;
+//			
+//			ITXMResult p = specif.getParent();
+//			
+//			if (p != null) {
+//				if (p instanceof Partition)	{
+//					p.removeResult(specif.getLexicalTable());
+//				}
+//				p.removeResult(specif);
+//			}
+//			System.out.println(NLS.bind(Messages.DeleteObject_10, specif.getName()));
+		} else if (o instanceof Concordance) {
+			Concordance conc = (Concordance) o;
+			Corpus c = conc.getCorpus();
+			c.removeResult(conc);
+			conc.cleanMemory();
+			System.out.println(NLS.bind(Messages.DeleteObject_10, conc.getName()));
+		} else if (o instanceof Referencer) {
+			Referencer referencer = (Referencer) o;
+			Corpus c = referencer.getCorpus();
+			c.removeResult(referencer);
+			System.out.println(NLS.bind(Messages.DeleteObject_10, referencer.getName()));
+//		} else if (o instanceof Cooccurrence) {
+//			Cooccurrence cooc = (Cooccurrence) o;
+//			Corpus c = cooc.getCorpus();
+//			c.removeResult(cooc);
+//			System.out.println(NLS.bind(Messages.DeleteObject_10, cooc.getName()));
+//		} else if (o instanceof Progression) {
+//			Progression rep = (Progression) o;
+//			Corpus c = rep.getCorpus();
+//			c.removeResult(rep);
+//			System.out.println(NLS.bind(Messages.DeleteObject_10, rep.getName()));
+//		} else if (o instanceof Index) {
+//			Index voc = (Index) o;
+//			voc.getHasResultsParent().removeResult(voc);
+//			System.out.println(NLS.bind(Messages.DeleteObject_10, voc.getName()));
+			//FIXME
+//		} else if (o instanceof CA) {
+//			CA ca = (CA) o;
+//			for (int i = 0 ; i < ca.getResults().size() ; i++) {
+//				deleted.addAll(delete(ca.getResults().get(i)));
+//				i--;
+//			}
+//			ca.delete();
+//			deleted.add(ca);
+//			System.out.println(NLS.bind(Messages.DeleteObject_10, ca.getName()));
+//		} else if (o instanceof CAH) {
+//			CAH cah = (CAH) o;
+//			cah.delete();
+//			deleted.add(cah);
+//			System.out.println(NLS.bind(Messages.DeleteObject_10, cah.getName()));
+		} else if (o instanceof LexicalTable) {
+			LexicalTable lt = (LexicalTable) o;
+			for (int i = 0 ; i < lt.getResults().size() ; i++) {
+				deleted.addAll(delete(lt.getResults().get(i)));
+				i--;
+			}
+			lt.getParent().removeResult(lt);
+			System.out.println(NLS.bind(Messages.DeleteObject_10, lt.getName()));
+			
+		}
+		// FIXME: when TXMResult will be implemented, only this code must be left
+		else if (o instanceof ITXMResult) {
+			((ITXMResult) o).delete();
+			System.out.println(NLS.bind(Messages.DeleteObject_10, ((ITXMResult) o).getName()));
+		}
+		else if (o instanceof Function) {
+			Function l = (Function) o;
+			l.delete();
+			System.out.println(NLS.bind(Messages.DeleteObject_10, l));
+		}
+
+
+		deleted.add(o);
+		
+		return deleted;
+	}
+
+	/**
+	 * Close the editors which uses an Object.
+	 *
+	 * @param o the object used by an editor
+	 */
+	public static void closeEditorOfSelection(Object o)
+	{
+		for (IWorkbenchPage page : getPages()) {
+			for (IEditorReference editorref : page.getEditorReferences()) {
+				IEditorPart editor = editorref.getEditor(false);
+
+				if (editor instanceof CustomizableEditor)	{
+					if (o.equals(((CustomizableEditor)editor).getSource()))	{
+						editor.getEditorSite().getPage().closeEditor(editor, true);
+					}
+				}
+				else if(editor instanceof TXMEditorPart)	{
+					if (o == ((TXMEditorPart)editor).getResultData())	{
+						editor.getEditorSite().getPage().closeEditor(editor, true);
+					}
+				}
+				
+			}
+		}
+	}
+
+	/**
+	 * Gets the pages.
+	 *
+	 * @return the pages
+	 */
+	public static IWorkbenchPage[] getPages()
+	{
+		for (IWorkbenchWindow win : Workbench.getInstance().getWorkbenchWindows()) {
+			return win.getPages();
+		}
+		return new IWorkbenchPage[0];
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/DeleteObject.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/CreatePartition.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/CreatePartition.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/CreatePartition.java	(revision 324)
@@ -0,0 +1,131 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.base;
+
+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.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.actions.CreatePartitionDialog;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Command which creates a Partition from a Corpus @ author mdecorde.
+ */
+public class CreatePartition extends AbstractHandler {
+
+	/** The window. */
+	private IWorkbenchWindow window;
+
+	/** The selection. */
+	private IStructuredSelection selection;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
+	 * .ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		final Corpus corpus = (Corpus) selection.getFirstElement();
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		final CreatePartitionDialog d = new CreatePartitionDialog(shell, corpus);
+		int code = d.open();
+		if (code == Window.OK) {
+			try {
+				JobHandler jobhandler = new JobHandler(NLS.bind(
+						Messages.CreatePartition_0, corpus.getName())) {
+					@Override
+					protected IStatus run(IProgressMonitor monitor) {
+						this.runInit(monitor);
+						try {
+							JobsTimer.start();
+							monitor.beginTask(
+									NLS.bind(Messages.CreatePartition_0,
+											corpus.getName()), 100);
+							System.out.println(NLS.bind(
+									Messages.CreatePartition_0,
+									corpus.getName()));
+							final Partition partition = d.getPartition();
+							if (partition == null) {
+								monitor.done();
+								System.out.println(Messages.CreatePartition_2);
+								return Status.CANCEL_STATUS;
+							}
+							System.out.println(NLS.bind(
+									Messages.CreatePartition_6,
+									partition.getNPart()));
+							monitor.worked(95);
+
+							monitor.subTask(Messages.RefreshingCorporaView);
+							syncExec(new Runnable() {
+								@Override
+								public void run() {
+									CorporaView.refresh();
+									CorporaView.expand(partition.getParent());
+								}
+							});
+							monitor.worked(100);
+						} catch (ThreadDeath td) {
+							return Status.CANCEL_STATUS;
+						} finally {
+							monitor.done();
+							JobsTimer.stopAndPrint();
+						}
+						return Status.OK_STATUS;
+					}
+				};
+				jobhandler.startJob();
+
+			} catch (Exception e) {
+				System.err.println(NLS.bind(Messages.Error_creating_partition,
+						e));
+			}
+		}
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/CreatePartition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/ExportCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/ExportCorpus.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/ExportCorpus.java	(revision 324)
@@ -0,0 +1,145 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.base;
+
+import java.io.File;
+
+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.jface.dialogs.MessageDialog;
+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.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Call the function Information on a MainCorpus, a SubCorpus and a Partition
+ * show basic stats and give some properties values @ author mdecorde.
+ */
+public class ExportCorpus extends AbstractHandler {
+
+	public final static String ID = "org.txm.rcp.commands.base.ExportCorpus"; //$NON-NLS-1$
+	/** The selection. */
+	private IStructuredSelection selection;
+
+	/** The lastopenedfile. */
+	private static String lastopenedfile;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
+	 * .ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+
+		String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		if (!(selection.getFirstElement() instanceof MainCorpus))
+			return null;
+
+		final MainCorpus corpus = (MainCorpus) selection.getFirstElement();
+
+		if (corpus.isModified()) {
+			boolean ret = MessageDialog.openConfirm(shell, "Export - "+corpus.getName()+" annotations not saved", "Do you wish to export without the current annotations?\n\n(to include the current annotations in the exported corpus, you need to save them before calling the \"Export\" command)");
+			if (!ret) return null;
+		}
+		
+		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+		String[] exts = {"*.txm", "*.zip"}; //$NON-NLS-1$ //$NON-NLS-2$
+		dialog.setFilterExtensions(exts);
+		if (LastOpened.getFile(ID) != null) {
+			lastopenedfile = LastOpened.getFolder(ID)
+					+ "/" + LastOpened.getFile(ID); //$NON-NLS-1$
+		} else if (lastopenedfile != null) {
+			dialog.setFilterPath(new File(lastopenedfile).getAbsolutePath());
+		} else {
+			dialog.setFilterPath(txmhome + "/samples"); //$NON-NLS-1$
+		}
+
+		dialog.setFileName(corpus.getName()+".txm");
+		
+		if (dialog.open() != null) {
+			String filepath = dialog.getFilterPath()
+					+ "/" + dialog.getFileName(); //$NON-NLS-1$
+			if (!(filepath.endsWith(".txm") || filepath.endsWith(".zip"))) { //$NON-NLS-1$ //$NON-NLS-2$
+				filepath += ".txm"; //$NON-NLS-1$
+			}
+			LastOpened.set(ID, dialog.getFilterPath(), dialog.getFileName());
+			lastopenedfile = filepath;
+			final File outfile = new File(filepath);
+			JobHandler jobhandler = new JobHandler(NLS.bind(
+					Messages.ExportCorpus_3, corpus.getName())) {
+				@Override
+				protected IStatus run(IProgressMonitor monitor) {
+					this.runInit(monitor);
+					try {
+						monitor.beginTask(
+								NLS.bind(Messages.ExportCorpus_3,
+										corpus.getName()), 100);
+						
+
+						if (!corpus.export(outfile, this)) {
+							System.out.println(NLS.bind(
+									Messages.ExportCorpus_0, corpus.getName()));
+						}
+
+						System.out.println(Messages.bind(Messages.ExportCorpus_4,outfile.getAbsolutePath()));
+						monitor.worked(100);
+					} catch (ThreadDeath td) {
+						return Status.CANCEL_STATUS;
+					} finally {
+						monitor.done();
+					}
+					return Status.OK_STATUS;
+				}
+			};
+			jobhandler.startJob();
+		}
+
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/ExportCorpus.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/OpenEdition.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/OpenEdition.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/OpenEdition.java	(revision 324)
@@ -0,0 +1,218 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.base;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.objects.Edition;
+import org.txm.objects.Page;
+import org.txm.objects.Text;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.editors.TXMBrowser;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.Part;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.Subcorpus;
+import org.txm.searchengine.cqp.corpus.query.Match;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * Open a text edition from: a main corpus : the first text of the maincorpus a
+ * sub-corpus : the first text of the subcorpus a partition : the user must
+ * choose one of the text used in the partition @ author mdecorde.
+ */
+public class OpenEdition extends AbstractHandler {
+
+	/** The Constant ID. */
+	public final static String ID = "org.txm.rcp.commands.base.OpenEdition"; //$NON-NLS-1$
+
+	/** The lastopenedfile. */
+	public static String lastopenedfile;
+
+	private Text text;
+
+	private Edition edition;
+
+	private Page page;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		if (selection.getFirstElement() instanceof Corpus) {
+			openEdition((Corpus) selection.getFirstElement());
+		} else if (selection.getFirstElement() instanceof Partition) {
+			try {
+				Partition p = (Partition) selection.getFirstElement();
+				Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+				
+				ElementListSelectionDialog d = new ElementListSelectionDialog(
+						shell, new ILabelProvider() {
+							@Override
+							public void removeListener(
+									ILabelProviderListener listener) {
+							}
+
+							@Override
+							public boolean isLabelProperty(Object element,
+									String property) {
+								return false;
+							}
+
+							@Override
+							public void dispose() {
+							}
+
+							@Override
+							public void addListener(
+									ILabelProviderListener listener) {
+							}
+
+							@Override
+							public Image getImage(Object element) {
+								return null;
+							}
+
+							@Override
+							public String getText(Object element) {
+								return element.toString();
+							}
+						});
+				d.setTitle(Messages.OpenEdition_0);
+				d.setMessage(Messages.OpenEdition_0);
+				d.setMultipleSelection(false);
+				d.setElements(p.getParts().toArray());
+				if (d.open() == Window.OK) {
+					for (Part part : p.getParts()) {
+						if (part.getName().equals(d.getFirstResult().toString()))
+							openEdition(part);
+					}
+				}
+				// choose part
+				// open edition
+			} catch (Exception e) {
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Open edition.
+	 *
+	 * @param corpus the corpus
+	 * @return the object
+	 */
+	public Object openEdition(Corpus corpus) {
+		String textid = null;
+		text = null;
+		System.out.println(Messages.bind(Messages.OpenEdition_3,corpus));
+		try {
+			
+			if (corpus instanceof Subcorpus) {
+				Subcorpus sub = (Subcorpus)corpus;
+				List<Match> matches = sub.getMatches();
+				if (matches.size() > 0) {
+					StructuralUnit text_su = corpus.getStructuralUnit("text"); //$NON-NLS-1$
+					Property text_id = text_su.getProperty("id"); //$NON-NLS-1$
+
+					textid = matches.get(0).getValueForProperty(text_id);
+					if (textid != null) text = corpus.getMainCorpus().getText(textid);
+				}
+			}
+//			QueryResult result = corpus.query(new Query("<text> []"), "get_edition", false); //$NON-NLS-1$ //$NON-NLS-2$ 
+//			StructuralUnit text_su = corpus.getStructuralUnit("text"); //$NON-NLS-1$
+//			Property text_id = text_su.getProperty("id"); //$NON-NLS-1$
+
+// 			if (result.getNMatch() > 0) textid = result.getMatches(0, 1).get(0).getValueForProperty(text_id);
+			MainCorpus maincorpus = corpus.getMainCorpus();
+			
+			if (maincorpus == null) {
+				System.out.println(Messages.OpenEdition_2+corpus);
+				return null;
+			}
+
+			if (maincorpus.getEditionNames().size() == 0) {
+				System.out.println("No edition available.");
+				return null;
+			}
+			
+			if (text == null) {
+				text = maincorpus.getFirstText();
+			}
+
+			if (text == null) {
+				System.out.println(Messages.bind(Messages.OpenEdition_5,textid));
+				return null;
+			}
+			
+			textid = text.getName();
+
+			edition = text.getEdition(maincorpus.getDefaultEdition()); 
+			if (edition == null) {
+				System.out.println(Messages.OpenEdition_7+text);
+				return null;
+			}
+
+			page = edition.getFirstPage();
+			if (page == null) {
+				System.out.println(Messages.OpenEdition_8+edition);
+				return null;
+			}
+
+			TXMBrowser attachedBrowserEditor = OpenBrowser.openEdition(page.getFile().getAbsolutePath());
+			attachedBrowserEditor.setEdition(edition);
+			attachedBrowserEditor.setCorpus(corpus);
+			attachedBrowserEditor.showPage(page);
+		} catch (Exception e1) {
+			System.out.println(NLS.bind(Messages.OpenEdition_1, corpus));
+			System.out.println(NLS.bind(Messages.CorporaView_1, Log.toString(e1)));
+			return null;
+		}
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/OpenEdition.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Commands which deals with the CWB corpora view</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/OpenBiblio.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/OpenBiblio.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/OpenBiblio.java	(revision 324)
@@ -0,0 +1,142 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.base;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.objects.Text;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.editors.TXMBrowser;
+import org.txm.rcp.swt.dialog.ComboDialog;
+import org.txm.searchengine.cqp.corpus.Corpus;
+// TODO: Auto-generated Javadoc
+/**
+ * Open a text edition from: a main corpus : the first text of the maincorpus a
+ * sub-corpus : the first text of the subcorpus a partition : the user must
+ * choose one of the text used in the partition @ author mdecorde.
+ */
+public class OpenBiblio extends AbstractHandler {
+
+	/** The Constant ID. */
+	public final static String ID = "org.txm.rcp.commands.base.OpenBiblio"; //$NON-NLS-1$
+
+	/** The lastopenedfile. */
+	public static String lastopenedfile;
+
+	/** The textids. */
+	private ArrayList<String> textids;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+
+		if (selection.getFirstElement() instanceof Corpus) {
+			Corpus corpus = (Corpus) selection.getFirstElement();
+
+			textids = new ArrayList<String>(corpus.getTextsID());
+			if (textids.size() == 0)
+			{
+				System.out.println(NLS.bind(Messages.OpenBiblio_1, corpus.getName()));
+				return null;
+			}
+
+			ComboDialog dialog = new ComboDialog(shell, Messages.OpenBiblio_2, textids, textids.get(0));
+			if (dialog.open() == Window.OK)
+			{
+				String textid = dialog.getSelectedValue();
+				openBiblio(corpus, textid);
+			}
+		}
+		else if (selection.getFirstElement() instanceof Text)
+		{
+			Text text = (Text) selection.getFirstElement();
+			openBiblio(text);
+		}
+		return null;
+	}
+
+	/**
+	 * Open biblio.
+	 *
+	 * @param base the base
+	 * @param textid the textid
+	 * @return the object
+	 */
+	public Object openBiblio(Corpus corpus, String textid ) {
+
+		Text text = corpus.getMainCorpus().getText(textid);
+		if (text == null) {
+			System.out.println(NLS.bind(Messages.OpenBiblio_7, textid, corpus.getName()));
+			return null;
+		}
+
+		return openBiblio(text);
+	}
+
+	/**
+	 * Open biblio.
+	 *
+	 * @param text the text
+	 * @return the object
+	 */
+	public Object openBiblio(Text text) {
+
+		if (text == null)
+		{
+			return null;
+		}
+		if (text.getBiblioPath() == null) {
+			System.out.println(NLS.bind(Messages.OpenBiblio_9, text.getName()));
+			return null;
+		}
+		String url = text.getBiblioPath().toString();
+		if (url.trim().length() == 0) {
+			System.out.println(NLS.bind(Messages.OpenBiblio_9, text.getName()));
+			return null;
+		}
+		TXMBrowser attachedBrowserEditor = OpenBrowser.openEdition(url);
+		//attachedBrowserEditor.setCorpus(text.getCorpus());
+		return null;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/base/OpenBiblio.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/InitializeKnowledgeRepository.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/InitializeKnowledgeRepository.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/InitializeKnowledgeRepository.java	(revision 324)
@@ -0,0 +1,77 @@
+package org.txm.rcp.commands.annotation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.annotation.repository.KnowledgeRepository;
+import org.txm.annotation.repository.KnowledgeRepositoryManager;
+import org.txm.rcp.swt.dialog.UsernamePasswordDialog;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+
+public class InitializeKnowledgeRepository extends AbstractHandler {
+
+	public static final String ID = InitializeKnowledgeRepository.class.getCanonicalName();
+	
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		ISelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		if (!(sel instanceof IStructuredSelection)) return null;
+		IStructuredSelection selection = (IStructuredSelection) sel;
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof MainCorpus))
+			return null;
+		
+		MainCorpus corpus = (MainCorpus) s;
+		return get(corpus);
+	}
+	
+	/**
+	 * Use this method to set eventual login+password needed by SQL knowledge repositories
+	 * 
+	 * @param corpus
+	 * @return
+	 */
+	public static List<KnowledgeRepository> get(MainCorpus corpus) {
+		List<KnowledgeRepository> ret = new ArrayList<KnowledgeRepository>();
+		
+		for (String kr_name : corpus.getKnowledgeRepositoryNames()) {
+			KnowledgeRepository kr = corpus.getKnowledgeRepository(kr_name);
+			if (kr == null) {
+				System.out.println("Warning '"+kr_name+"' KR is null. Please check KR configuration.");
+				continue;
+			}
+			//System.out.println("IS CREDENTIAL NEEDED: "+kr_name+" "+corpus);
+			boolean[] must = KnowledgeRepositoryManager.mustLoginToKnowledgeRepository(kr_name, corpus);
+			
+			if (must[0] || must[1]) {
+				System.out.println("Asking credentials for "+kr_name+" KR login");
+				UsernamePasswordDialog dialog = new UsernamePasswordDialog(Display.getCurrent().getActiveShell(), must, kr_name);
+				
+				if (dialog.open() == UsernamePasswordDialog.OK) {
+					System.out.println("Temporary save login+password");
+					System.setProperty(KnowledgeRepository.LOGIN_KEY+kr_name, dialog.getUser());
+					System.setProperty(KnowledgeRepository.PASSWORD_KEY+kr_name, dialog.getPassword());
+				} else {
+					System.out.println("Cancelling login for "+kr_name+" KR");
+					continue; // ignoring
+				}
+			}
+			
+			if (!kr.checkConnection()) {
+				System.out.println("Error during connection to '"+kr_name+"'. Please check login, password and Internet connection.");
+			} else {
+				ret.add(kr);
+			}
+		}
+		return ret;
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/InitializeKnowledgeRepository.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/ExportStandoff.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/ExportStandoff.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/ExportStandoff.java	(revision 324)
@@ -0,0 +1,148 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.annotation;
+
+import java.io.File;
+
+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.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+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.Toolbox;
+import org.txm.annotation.AnnotationManager;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Open a file in the TxtEditor @ author mdecorde.
+ */
+public class ExportStandoff extends AbstractHandler {
+
+	public static final String ID = ExportStandoff.class.getCanonicalName();
+	
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		if (!(sel instanceof IStructuredSelection)) return null;
+		IStructuredSelection selection = (IStructuredSelection) sel;
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof MainCorpus)) {
+			System.out.println("Selection is not a Corpus. Aborting.");
+			return null;
+		}
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		//FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+		MainCorpus corpus = (MainCorpus) s;
+		String path = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		dialog.setFilterPath(path); //To set a specific path
+		dialog.setFileName(corpus.getName()+"_annotations.zip");
+		dialog.setFilterExtensions(new String[]{"*.zip"});
+		if (dialog.open() != null) {
+			StatusLine.setMessage(Messages.ExportAnnotation_0);
+			String filepath = dialog.getFilterPath();
+			String filename = dialog.getFileName();
+
+			final File resultZipFile = new File(filepath, filename);
+			LastOpened.set(ID, resultZipFile.getParent(), resultZipFile.getName());
+			
+			exportAnnotations(corpus, resultZipFile);
+		}
+		return corpus;
+	}
+
+	public static boolean exportAnnotations(final MainCorpus corpus, final File resultZipFile) {
+		final AnnotationManager am = corpus.getAnnotationManager();
+		if (am == null) return true; // nothing to do
+		
+		JobHandler saveJob = SaveAnnotations.save(corpus);
+		if (saveJob != null)
+			try {
+				saveJob.join();
+			} catch (InterruptedException e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			}
+		
+		JobHandler jobhandler = new JobHandler("Exporting annotations as standoff for "+corpus) { //$NON-NLS-1$
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					monitor.beginTask("Exporting annotations as standoff", 100);
+					
+					monitor.setTaskName("Writing annotations in XML-TXM stand-off files");
+					/*if (MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), "Before saving annotations...", "All editors using this corpus are going to be closed. Continue ?")) {
+						return false;
+					}*/
+					
+					///lecture de tous les fichiers un par un
+					///chaque annotation est récupérée et selon l'annotateur, écrite dans un fichier spécifique à celui-ci
+
+					if (!am.exportAnnotationsToSyMoGIH(resultZipFile)) {
+						System.out.println("Error while saving stand-off annotations (see logs above).");
+						return Status.CANCEL_STATUS;
+					}
+					monitor.worked(30);
+					
+					System.out.println("Done.");
+
+				} catch(Exception e) {
+					System.out.println("Error while saving annotations: "+e);
+					Log.printStackTrace(e);
+					return Status.CANCEL_STATUS;
+				}
+				return Status.OK_STATUS;
+			}
+		};
+
+		jobhandler.startJob(true);
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/ExportStandoff.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/SaveAnnotations.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/SaveAnnotations.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/SaveAnnotations.java	(revision 324)
@@ -0,0 +1,104 @@
+package org.txm.rcp.commands.annotation;
+
+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.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.annotation.AnnotationManager;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.CloseEditorsUsing;
+import org.txm.rcp.commands.workspace.UpdateCorpus;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.utils.logger.Log;
+
+public class SaveAnnotations extends AbstractHandler {
+
+	public static final String ID = SaveAnnotations.class.getCanonicalName();
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		if (!(sel instanceof IStructuredSelection)) return null;
+		IStructuredSelection selection = (IStructuredSelection) sel;
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof MainCorpus))
+			return null;
+		MainCorpus corpus = (MainCorpus) s;
+		save(corpus);
+
+		return corpus;
+	}
+
+	public static JobHandler save(final MainCorpus corpus) {
+		final AnnotationManager am = corpus.getAnnotationManager();
+		if (am == null) return null; // nothing to do
+		
+		if (!corpus.needToSaveAnnotations()) {
+			return null;
+		}
+
+		//System.out.println("DISPLAY="+Display.getDefault());
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				if (!MessageDialog.openConfirm(Display.getDefault().getActiveShell(), "Before saving annotations...", "All editors using this corpus are going to be closed. Continue ?")) {
+					return;
+				}
+			}
+		});
+
+		JobHandler jobhandler = new JobHandler("Saving annotations of "+corpus) { //$NON-NLS-1$
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					monitor.beginTask("Saving annotations", 100);
+
+					monitor.setTaskName("writing annotations in XML-TXM files");
+					boolean rez = am.saveAnnotations();
+					monitor.worked(30);
+
+					if (rez) {
+						System.out.println("Annotations are saved in XML-TXM files. Updating corpus indexes and editions");
+
+						monitor.setTaskName("updating corpus indexes and editions");
+						if (UpdateCorpus.update(corpus) != null) {
+							monitor.worked(50);
+							this.syncExec(new Runnable() {
+								public void run() {CorporaView.refreshObject(corpus);}
+							});
+						} else {
+							monitor.worked(50);
+							System.out.println("Fail to update corpus. Aborting");
+							System.out.println("Fix XML-TXM files and call command 'UpdateCorpus'");
+						}
+					} else {
+						System.out.println("Error while saving annotations (see logs above).");
+					}
+
+				} catch(Exception e) {
+					System.out.println("Error while saving annotations: "+e);
+					Log.printStackTrace(e);
+					return Status.CANCEL_STATUS;
+				}
+				return Status.OK_STATUS;
+			}
+		};
+
+		jobhandler.startJob(true);
+
+		return jobhandler;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/annotation/SaveAnnotations.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyMacro.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyMacro.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyMacro.java	(revision 324)
@@ -0,0 +1,119 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.rcp.swt.dialog.LastOpened;
+// TODO: Auto-generated Javadoc
+/**
+ * Handler: execute a Macro (Groovy script that opens an UI for parameters)
+ */
+public class ExecuteGroovyMacro extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.ExecuteMacro"; //$NON-NLS-1$
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		// the file to execute
+		String result = ""; //$NON-NLS-1$
+		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (page != null && page instanceof TxtEditor) {
+			TxtEditor te = (TxtEditor) page;
+			selection = HandlerUtil.getActiveWorkbenchWindow(event)
+					.getActivePage().getSelection();
+			FileStoreEditorInput input = (FileStoreEditorInput) te
+					.getEditorInput();
+
+			File f = new File(input.getURI().getPath());
+			result = f.getAbsolutePath();
+		} else if (selection != null
+				& selection instanceof IStructuredSelection) {
+			File file = null;
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			for (Iterator<Object> iterator = strucSelection.iterator(); iterator
+					.hasNext();) {
+				file = (File) iterator.next();
+				result = file.getAbsolutePath();
+				break;
+			}
+		}
+
+		if (result == "") { //$NON-NLS-1$
+			Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+					.getShell();
+			FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+			if (LastOpened.getFile(ID) != null) {
+				dialog.setFilterPath(LastOpened.getFolder(ID));
+				dialog.setFileName(LastOpened.getFile(ID));
+			}
+			dialog.setFilterExtensions(new String[] { "*.groovy" }); //$NON-NLS-1$
+
+			IPreferencesService service = Platform.getPreferencesService();
+			String scriptRootDir = Toolbox.getParam(TBXPreferences.USER_TXM_HOME) + "/scripts"; //$NON-NLS-1$
+
+			dialog.setFilterPath(scriptRootDir);
+			result = dialog.open();
+			if (result == null) return null;
+			LastOpened.set(ID, new File(result));
+		}
+
+		execute(result, page, selection);
+		return null;
+	}
+	
+	public static void execute(String scriptpath, IWorkbenchPart page, ISelection selection) {
+		IPreferencesService service = Platform.getPreferencesService();
+		String scriptRootDir = Toolbox.getParam(TBXPreferences.USER_TXM_HOME) + "/scripts"; //$NON-NLS-1$
+		File currentRootDir = new File(scriptRootDir, "macro"); //$NON-NLS-1$
+		
+		ExecuteGroovyScript.executeScript(currentRootDir, scriptpath, page, selection, false);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyMacro.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFolder.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFolder.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFolder.java	(revision 324)
@@ -0,0 +1,109 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+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.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.views.fileexplorer.Explorer;
+import org.txm.rcp.views.fileexplorer.MacroExplorer;
+// TODO: Auto-generated Javadoc
+/**
+ * Handler: create a directory depending on the selection
+ */
+public class CreateFolder extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.CreateFolder"; //$NON-NLS-1$
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+
+		//get scripts dir
+		String dir = TxmPreferences.getString(TBXPreferences.USER_TXM_HOME, System.getProperty("user.home")); //$NON-NLS-1$
+
+		//if selection is a file, get its path
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		boolean useSavedValue = true;
+		if (selection instanceof IStructuredSelection) {
+			IStructuredSelection sel = (IStructuredSelection) selection;
+			Object obj = sel.getFirstElement();
+
+			if (obj instanceof File) {
+				File current = ((File)obj);
+				if (current.isDirectory())
+					dir = current.getAbsolutePath();
+				else
+					dir = current.getParent();
+				useSavedValue = false;
+			}
+		}
+		//ask new file name
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+
+		if (LastOpened.getFile(ID) != null && useSavedValue) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+			dialog.setFileName(LastOpened.getFile(ID));
+		} else {
+			dialog.setFilterPath(dir);
+		}
+		String path = dialog.open();
+		if (path == null) return null;
+		//create the new file
+		File newfile = new File(path);
+		LastOpened.set(ID, newfile.getParent(), newfile.getName());
+		if (!newfile.exists() && newfile.getParentFile().canWrite()) {
+			if (newfile.mkdir())
+				System.out.println(NLS.bind(Messages.CreateFolder_1, newfile.getAbsolutePath()));
+
+		}
+		Explorer.refresh();
+		MacroExplorer.refresh();
+
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFolder.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFile.java	(revision 324)
@@ -0,0 +1,130 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+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.Platform;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.jface.viewers.ISelection;
+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.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.preferences.ScriptPreferenceInitializer;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.views.fileexplorer.Explorer;
+import org.txm.rcp.views.fileexplorer.MacroExplorer;
+// TODO: Auto-generated Javadoc
+/**
+ * Handler: create a file depending on the selection
+ */
+public class CreateFile extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.CreateFile"; //$NON-NLS-1$
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		//get scripts dir
+		IPreferencesService service = Platform.getPreferencesService();
+		String scriptCurrentDir = service.getString(Application.PLUGIN_ID,
+				ScriptPreferencePage.SCRIPT_CURRENT_DIR,
+				ScriptPreferenceInitializer.SCRIPT_CURRENT_DIR_DEFAULT,
+				null);
+
+		boolean useSavedValue = true; // if a file/folder is selected, dont use the saved value
+		
+		//if selection is a file, get its path
+		IWorkbenchWindow activeW = HandlerUtil.getActiveWorkbenchWindow(event);
+		if (activeW != null) {
+			IWorkbenchPage activeP = activeW.getActivePage();
+			if (activeP != null) {
+				ISelection selection = activeP.getSelection();
+				if (selection != null && selection instanceof IStructuredSelection) {
+					IStructuredSelection sel = (IStructuredSelection) selection;
+					Object obj = sel.getFirstElement();
+					if (obj instanceof File) {
+						File current = ((File)obj);
+						if (current.isDirectory()) {
+							scriptCurrentDir = current.getAbsolutePath();
+						} else {
+							scriptCurrentDir = current.getParent();
+						}
+						useSavedValue = false;
+					}
+					
+				}
+			}
+		}
+
+		//ask new file name
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+		if (LastOpened.getFile(ID) != null && useSavedValue) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+			dialog.setFileName(LastOpened.getFile(ID));
+		} else {
+			dialog.setFilterPath(scriptCurrentDir);
+		}
+		String path = dialog.open();
+
+		if (path == null) return null;
+
+		//create the new file
+		File newfile = new File(path);
+		LastOpened.set(ID, newfile.getParent(), newfile.getName());
+		if (!newfile.exists() && newfile.getParentFile().canWrite()) {
+			try {
+				if (newfile.createNewFile()) {
+					System.out.println(NLS.bind(Messages.CreateFile_1, newfile.getAbsolutePath()));
+					//OpenFile.openfile(newfile);
+				}
+			} catch (IOException e) {
+				System.out.println(e.getLocalizedMessage());
+			}
+		}
+		EditFile.openfile(newfile);
+		Explorer.refresh();
+		MacroExplorer.refresh();
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeReferencer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeReferencer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeReferencer.java	(revision 324)
@@ -0,0 +1,85 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.function;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.editors.input.ReferencerEditorInput;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Open the concordance editor @ author mdecorde.
+ */
+public class ComputeReferencer extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		if (!Toolbox.isSearchEngineInitialized()) return false;
+		
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof Corpus))
+			return null;
+		
+		final Corpus corpus = (Corpus) s;
+		openEditor(corpus);
+		return null;
+	}
+
+	public static boolean openEditor(Corpus corpus) {
+		if (!Toolbox.isSearchEngineInitialized()) return false;
+		
+		ReferencerEditorInput editorInput = new ReferencerEditorInput(corpus, null);
+
+		IWorkbenchWindow window = TXMWindows.getActiveWindow();
+		IWorkbenchPage page = window.getActivePage();
+		try {
+			StatusLine.setMessage(Messages.ComputeReferencer_0);
+			page.openEditor(editorInput,"org.txm.rcp.editors.referencer.ReferencerEditor"); //$NON-NLS-1$
+			return true;
+		} catch (PartInitException e) {
+			System.err.println(Messages.CorporaView_6+ e);
+		}
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeReferencer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeInterTextDistance.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeInterTextDistance.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeInterTextDistance.java	(revision 324)
@@ -0,0 +1,75 @@
+package org.txm.rcp.commands.function;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandlerListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.rosuda.REngine.REXPMismatchException;
+import org.txm.functions.intertextualdistance.InterTextDistance;
+import org.txm.lexicaltable.core.functions.LexicalTable;
+import org.txm.rcp.utils.Logger;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.clientExceptions.InvalidCqpIdException;
+import org.txm.statsengine.core.StatException;
+
+public class ComputeInterTextDistance extends AbstractHandler {
+
+	private IStructuredSelection selection;
+
+	@Override
+	public void addHandlerListener(IHandlerListener handlerListener) {
+		super.addHandlerListener(handlerListener);
+	}
+
+	@Override
+	public void dispose() {
+		super.dispose();
+	}
+
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof LexicalTable))
+			return null;
+		LexicalTable table = (LexicalTable) s;
+		InterTextDistance dist = new InterTextDistance(table.getData());
+
+		try {
+			dist.compute();
+			table.getPartition().getResults().add(dist);
+		} catch (CqiClientException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} catch (InvalidCqpIdException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} catch (REXPMismatchException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} catch (StatException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return null;
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return super.isEnabled();
+	}
+
+	@Override
+	public boolean isHandled() {
+		return super.isHandled();
+	}
+
+	@Override
+	public void removeHandlerListener(IHandlerListener handlerListener) {
+		super.removeHandlerListener(handlerListener);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeInterTextDistance.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Commands which call textometry functions</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportResult.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportResult.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportResult.java	(revision 324)
@@ -0,0 +1,208 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.function;
+
+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.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.ca.core.functions.CA;
+import org.txm.cah.core.functions.CAH;
+import org.txm.cooccurrence.core.functions.Cooccurrence;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.functions.Function;
+import org.txm.functions.concordances.Concordance;
+import org.txm.functions.referencer.Referencer;
+import org.txm.index.core.functions.Index;
+import org.txm.lexicaltable.core.functions.LexicalTable;
+import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
+import org.txm.progression.core.functions.Progression;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.preferences.ExportPreferencePage;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.specificities.core.functions.SpecificitesResult;
+// TODO: Auto-generated Javadoc
+/**
+ * export a result of a result by calling the function toTxt(File f) then show
+ * the result in the text editor @ author mdecorde.
+ */
+public class ExportResult 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.getParam(TBXPreferences.USER_TXM_HOME);
+		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+
+		String extensions[] = {"*.csv"}; //$NON-NLS-1$
+		if (s instanceof Function) {
+			extensions = ((Function)s).getExportTXTExtensions(); //$NON-NLS-1$
+		}
+		dialog.setFilterExtensions(extensions);
+
+		if (LastOpened.getFile(ID) != null) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+		}
+
+		if (dialog.open() != null) {
+			StatusLine.setMessage(Messages.ExportResult_0);
+			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) {
+				System.err.println(NLS.bind(Messages.ExportResult_3, outfile, e1));
+			}
+			if (!outfile.canWrite()) {
+				System.out.println(NLS.bind(Messages.ExportResult_5, outfile));
+				return null;
+			}
+			if (!outfile.isFile()) {
+				System.out.println("Error: " + outfile + " is not a file"); //$NON-NLS-1$ //$NON-NLS-2$
+				return null;
+			}
+
+			final String encoding = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.EXPORT_ENCODING); //$NON-NLS-1$
+			String _colseparator = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.EXPORT_COLSEPARATOR);
+			final String colseparator = _colseparator;
+			String _txtseparator = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.EXPORT_TXTSEPARATOR);
+			final String txtseparator = _txtseparator;
+
+			JobHandler jobhandler = new JobHandler(Messages.ExportResult_0) {
+				@Override
+				protected IStatus run(IProgressMonitor monitor) {
+					try {
+						this.runInit(monitor);
+						monitor.beginTask(Messages.ExportResult_1, 100);
+
+						if (s instanceof Function)
+							((Function)s).setCurrentMonitor(this); // Allows Functions to protect themselves from interruption
+
+						if (s instanceof SpecificitesResult)
+							((SpecificitesResult) s).toTxt(outfile, encoding, colseparator, txtseparator);
+						else if (s instanceof Concordance)
+							((Concordance) s).toTxt(outfile, encoding, colseparator, txtseparator);
+						else if (s instanceof Cooccurrence)
+							((Cooccurrence) s).toTxt(outfile, encoding, colseparator, txtseparator);
+						else if (s instanceof Referencer)
+							((Referencer) s).toTxt(outfile, encoding, colseparator, txtseparator);
+						else if (s instanceof Lexicon)
+							((Lexicon) s).toTxt(outfile, encoding, colseparator, txtseparator);
+						else if (s instanceof Index)
+							((Index) s).toTxt(outfile, encoding, colseparator, txtseparator);
+						else if (s instanceof LexicalTable) {
+							this.acquireSemaphore(); // this is not a org.txm.Function and does not have the acquireSemaphore and releaseSemaphore methods
+							((LexicalTable) s).toTxt(outfile, encoding, colseparator, txtseparator);
+							this.releaseSemaphore();
+						} else if (s instanceof CA) {
+							((CA) s).toTxt(outfile, encoding);
+						} else if (s instanceof CAH) {
+							((CAH) s).toTxt(outfile, encoding);
+						} else if (s instanceof Progression) {
+							((Progression) s).toTxt(outfile, encoding);
+						} else if (s instanceof Function) {
+							((Function)s).toTxt(outfile, encoding, colseparator, txtseparator);
+						}
+
+						if (outfile.exists()) {
+							// Open internal editor in the UI thread
+							if(TxmPreferences.getBoolean(TBXPreferences.EXPORT_SHOW))	{
+								this.syncExec(new Runnable() {
+									@Override
+									public void run() {
+										EditFile.openfile(outfile.getAbsolutePath());
+									}
+								});
+							}
+
+							System.out.println(NLS.bind("", outfile.getAbsolutePath())); //$NON-NLS-1$
+						} else {
+							System.out.println(NLS.bind(Messages.ExportResult_6, outfile.getAbsolutePath()));
+						}
+					} catch (ThreadDeath td) {
+						if (s instanceof Function)
+							((Function)s).clean();
+						return Status.CANCEL_STATUS;
+					} catch (Exception e) {
+						System.out.println(NLS.bind(Messages.ExportResult_6, s, e));
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+						return Status.CANCEL_STATUS;
+					} finally {
+						if (s instanceof Function)
+							((Function)s).setCurrentMonitor(null);
+						monitor.done();
+						JobsTimer.stopAndPrint();
+					}
+					return Status.OK_STATUS;
+				}
+			};
+
+			jobhandler.startJob();
+		}
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportResult.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeDiagnostic.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeDiagnostic.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeDiagnostic.java	(revision 324)
@@ -0,0 +1,202 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.function;
+
+import java.io.File;
+
+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.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.functions.diagnostic.Diagnostic;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.editors.TXMWebBrowserEditor;
+import org.txm.rcp.preferences.DiagnosticPreferencePage;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.searchengine.cqp.AbstractCqiClient;
+import org.txm.searchengine.cqp.NetCqiClient;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.CorpusManager;
+import org.txm.utils.AsciiUtils;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Call the function Information on a MainCorpus, a SubCorpus and a Partition
+ * show basic stats and give some properties values 
+ * @author mdecorde.
+ */
+public class ComputeDiagnostic extends AbstractHandler {
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/** The response. */
+	int response = SWT.YES;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		if (!Toolbox.isSearchEngineInitialized()) return false;
+		
+		Object sel = HandlerUtil.getCurrentSelection(event);
+		if (!(sel instanceof IStructuredSelection)) {
+			Log.warning(Messages.ComputeDiagnostic_0);
+			return null;
+		}
+		
+		selection = (IStructuredSelection) sel;
+		if (!(selection.getFirstElement() instanceof Corpus)) {
+			System.out.println(Messages.ComputeDiagnostic_1+selection.getFirstElement());
+			return null;
+		}
+		
+		final Corpus corpus = (Corpus) selection.getFirstElement();
+
+		String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		if (!new File(txmhome, "informations").exists()) //$NON-NLS-1$
+			new File(txmhome, "informations").mkdir(); //$NON-NLS-1$
+		String filename = corpus.getParent().getName()+"-"+corpus.getName(); //$NON-NLS-1$
+		filename = AsciiUtils.buildId(filename);
+		final File diagfile = new File(
+				txmhome, "results/" + filename + "-infos.html"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		AbstractCqiClient cqi = CorpusManager.getCorpusManager().getCqiClient();
+		if (diagfile.exists() && cqi instanceof NetCqiClient) {
+			Shell s = new Shell();
+			MessageBox messageBox = new MessageBox(s, SWT.ICON_QUESTION
+					| SWT.YES | SWT.NO);
+			messageBox.setMessage(NLS.bind(Messages.Diagnostique_1, diagfile.getName()));
+			response = messageBox.open();
+		}
+
+		JobHandler jobhandler = new JobHandler(NLS.bind(Messages.Diagnostique_0, corpus.getName())) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					JobsTimer.start();
+					//this.setCurrentMonitor(monitor);
+					monitor.beginTask(NLS.bind(Messages.Diagnostique_0, corpus.getName()), 100);
+					final int maxvalue = TxmPreferences.getInt(DiagnosticPreferencePage.MAXVALUE);
+					diagfile.getParentFile().mkdir();
+					
+					if (monitor.isCanceled())
+						return Status.CANCEL_STATUS;
+					
+					if (response == SWT.YES) {
+						diagfile.delete();
+						
+						monitor.subTask(Messages.Diagnostique_7);
+						Diagnostic diag = new Diagnostic(corpus, maxvalue);
+						monitor.worked(5);
+						if (monitor.isCanceled()) {
+							monitor.done();
+							return Status.CANCEL_STATUS;
+						}
+						
+						monitor.subTask(Messages.Diagnostique_8);
+						diag.stepGeneralInfos();
+						monitor.worked(10);
+						if(monitor.isCanceled()) {
+							monitor.done();
+							return Status.CANCEL_STATUS;
+						}
+						
+						monitor.subTask(Messages.Diagnostique_9);
+						diag.stepLexicalProperties();
+						monitor.worked(20);
+						if (monitor.isCanceled()) {
+							monitor.done();
+							return Status.CANCEL_STATUS;
+						}
+						
+						monitor.subTask(Messages.Diagnostique_10);
+						diag.stepStructuralUnits();
+						monitor.worked(50);
+						if (monitor.isCanceled()) {
+							monitor.done();
+							return Status.CANCEL_STATUS;
+						}
+						
+						if (monitor.isCanceled())
+							return Status.CANCEL_STATUS;
+						
+						//if(diagfile.exists() && diagfile.canRead())
+						diag.toHTML(diagfile);
+						if (!diagfile.exists() || !diagfile.canRead()) {
+							System.out.println(Messages.Diagnostique_2+corpus+": "+diagfile);  //$NON-NLS-1$
+							monitor.done();
+							return Status.CANCEL_STATUS;
+						}
+					}
+
+					monitor.subTask(Messages.Diagnostique_11);
+					monitor.worked(5);
+					syncExec(new Runnable() {
+						@Override
+						public void run() {
+							TXMWebBrowserEditor editor = OpenBrowser.openfile(diagfile.getAbsolutePath());
+							//editor.focus();
+							//CorporaView.refresh();
+							//CorporaView.expand(corpus);
+							
+						}
+					});
+
+				} catch (ThreadDeath td) {
+					return Status.CANCEL_STATUS;
+				} catch (Exception e) {
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				} finally {
+					monitor.done();
+					JobsTimer.stopAndPrint();
+				}	
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob();
+
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeDiagnostic.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportSVG.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportSVG.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportSVG.java	(revision 324)
@@ -0,0 +1,185 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.function;
+
+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.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.utils.io.FileCopy;
+
+/**
+ * save the SVG file selected @ author mdecorde.
+ */
+@Deprecated
+public class ExportSVG extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.function.ExportSVG"; //$NON-NLS-1$
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		// FIXME : implement charts engine after we defined if here we need to export the chart or the view
+//		try {
+//			// After that call directly "ExportChart" or "ExportChartEditorView"
+//			System.out.println(Messages.ExportSVG_0);
+//			Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+//
+//			String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+//
+//			// get editor
+//			IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event)
+//					.getActivePage().getActivePart();
+//
+//			String prefDevice = TxmPreferences.getString(ExportPreferencePage.RDEVICE, "SVG"); //$NON-NLS-1$
+//			RDevice device = RDevice.valueOf(prefDevice.toUpperCase());
+//			System.out.println(NLS.bind(Messages.ExportSVG_2, device));
+//
+//			new File(txmhome, "results").mkdir(); //$NON-NLS-1$
+//			File svgSourceFile = new File(txmhome, "results/temp"+device.getExt()); //$NON-NLS-1$
+//			
+//			if (page instanceof SVGGraphicEditor) {
+//				SVGGraphicEditor te = (SVGGraphicEditor) page;
+//				svgSourceFile = te.getSVGFile();
+//				device = RDevice.SVG;
+//			} else if (page instanceof CorporaView) {
+//				CorporaView view = (CorporaView) page;
+//				StructuredSelection sel = (StructuredSelection) view.getTreeViewer().getSelection();
+//				Object obj = sel.getFirstElement();
+//				//System.out.println("sel: "+obj);
+//				if (obj instanceof CAH) {
+//					ChartsEngine.getChartsEngine(RChartsEngine.class).getChartCreator(CAH.class).createChartFile(obj, svgSourceFile, CAHPreferences.PREFERENCES_NODE);
+////						((CAH)obj).toSVG(svgSourceFile, device);
+//				}
+//				else if (obj instanceof Progression) {
+//					ChartsEngine.getChartsEngine(RChartsEngine.class).getChartCreator(Progression.class).createChartFile(obj, svgSourceFile, ProgressionPreferences.PREFERENCES_NODE);
+////						((Progression)obj).toSvg(svgSourceFile, device);
+//				}
+//			}
+//
+//			if (svgSourceFile != null && svgSourceFile.exists()) {
+//				String ext = null;
+//				if (svgSourceFile.getName().lastIndexOf(".") > 0) { //$NON-NLS-1$
+//					ext = svgSourceFile.getName();
+//					ext = ext.substring(ext.lastIndexOf("."), ext.length()); //$NON-NLS-1$
+//				}
+//				FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+//				String[] exts = {"*"+device.getExt()}; //$NON-NLS-1$
+//				dialog.setFilterExtensions(exts);
+//				
+//				if (LastOpened.getFile(ID) != null) {
+//					dialog.setFilterPath(LastOpened.getFolder(ID));
+//					//dialog.setFileName(LastOpened.getFile(ID));
+//				} else {
+//					dialog.setFilterPath(txmhome);
+//				}
+//
+//				File outfile;
+//
+//				if (dialog.open() != null) {
+//					String filename =  dialog.getFileName(); //$NON-NLS-1$
+//					if (!filename.endsWith(device.getExt())) 
+//						filename = filename+device.getExt();
+//					outfile = new File(dialog.getFilterPath(), filename);
+//					LastOpened.set(ID, outfile);
+//				} else
+//					return null;
+//
+//				try {
+//					JobsTimer.start();
+//					StatusLine.setMessage(""); //$NON-NLS-1$
+//					FileCopy.copy(svgSourceFile, outfile);
+//					if (outfile.exists()) {
+//						System.out.println(NLS.bind(Messages.ExportSVG_1, outfile, device.getName())); 
+//					} else {
+//						System.out.println(NLS.bind(Messages.ExportSVG_3 + outfile, device.getExt()));
+//					}
+//
+//				} catch (IOException e) {
+//					System.err.println("Export failed: " + svgSourceFile //$NON-NLS-1$
+//							+ "" + outfile + ": " + e); //$NON-NLS-1$ //$NON-NLS-2$ 
+//				}
+//			}
+//		} catch(Exception e) {
+//			System.out.println(e.getLocalizedMessage());
+//			org.txm.rcp.utils.Logger.printStackTrace(e);
+//		}
+		return null;
+	}
+
+	/**
+	 * Export.
+	 *
+	 * @param infile the infile
+	 */
+	public static void export(File infile) {
+		// Shell shell =
+		// HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		FileDialog dialog = new FileDialog(new Shell(), SWT.SAVE);
+		if (LastOpened.getFile(ID) != null) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+			dialog.setFileName(LastOpened.getFile(ID));
+		} else {
+			dialog.setFilterPath(txmhome);
+		}
+
+		File outfile;
+
+		if (dialog.open() != null) {
+			outfile = new File(dialog.getFilterPath(), dialog.getFileName());
+			LastOpened.set(ID, outfile);
+		} else
+			return;
+
+		try {
+			FileCopy.copy(infile, outfile);
+		} catch (IOException e) {
+			System.out.println("Error: " + infile //$NON-NLS-1$
+					+ "" + outfile + ": " + e); //$NON-NLS-1$ //$NON-NLS-2$ 
+		}
+
+		if (outfile.exists()) {
+			System.out.println(NLS.bind(Messages.ExportSVG_1, outfile, ""));  //$NON-NLS-1$
+		} else {
+			System.out.println(NLS.bind(Messages.ExportSVG_3 + outfile, "")); //$NON-NLS-1$
+		}
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ExportSVG.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeIntersection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeIntersection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeIntersection.java	(revision 324)
@@ -0,0 +1,100 @@
+package org.txm.rcp.commands.function;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandlerListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.searchengine.cqp.AbstractCqiClient;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.CqpObject;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.Subcorpus;
+
+public class ComputeIntersection extends AbstractHandler {
+
+	@Override
+	public void addHandlerListener(IHandlerListener handlerListener) {
+		super.addHandlerListener(handlerListener);
+	}
+
+	@Override
+	public void dispose() {
+		super.dispose();
+	}
+
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		ISelection isel = HandlerUtil.getCurrentSelection(event);
+		if (!(isel instanceof IStructuredSelection)) return null;
+		IStructuredSelection selection = (IStructuredSelection) isel;
+		List list = selection.toList();
+		ArrayList<Subcorpus> subcorpora = new ArrayList<Subcorpus>();
+		for (Object o : list) if (o instanceof Subcorpus) subcorpora.add((Subcorpus) o);
+
+		if (subcorpora.size() != 2) {
+			System.out.println("Error: selection size != 2 : "+subcorpora.size());
+			return null;
+		}
+
+		HashSet<MainCorpus> set = new HashSet<MainCorpus>();
+		for (Subcorpus s : subcorpora) set.add(s.getMainCorpus());
+		if (set.size() > 1) {
+			System.out.println("Error: selected subcorpus have different main corpus: "+set);
+			return null;
+		}
+
+		MainCorpus ancestor = subcorpora.get(0).getMainCorpus();
+		String id1 = subcorpora.get(0).getQualifiedCqpId();
+		String id2 = subcorpora.get(1).getQualifiedCqpId();
+		String cqpid = CqpObject.subcorpusNamePrefix + Corpus.getNextSubcorpusCounter();
+		String command = "inter";
+		AbstractCqiClient CQI = Toolbox.getCqiClient();
+
+		//TODO: finish the command
+		
+//		String query = cqpid+"="+command+" "+id1+" "+id2+";";
+//		try {
+//			CQI.query(query)
+//		} catch (Exception e) {
+//			println "Error: "+CQI.getLastError()+". Please restart TXM."
+//			return;
+//		}
+//
+//		Subcorpus subcorpus = new Subcorpus(cqpid, name, ancestor, new Query("$command $id1 $id2;"));
+//
+//		println "$subcorpus stored in $ancestor"
+//
+//		monitor.syncExec(new Runnable() {
+//			public void run() {
+//				CorporaView.refresh();
+//				CorporaView.expand(subcorpus.getParent());
+//			}
+//		});
+
+		return null;
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return super.isEnabled();
+	}
+
+	@Override
+	public boolean isHandled() {
+		return super.isHandled();
+	}
+
+	@Override
+	public void removeHandlerListener(IHandlerListener handlerListener) {
+		super.removeHandlerListener(handlerListener);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeIntersection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeInternalView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeInternalView.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeInternalView.java	(revision 324)
@@ -0,0 +1,83 @@
+package org.txm.rcp.commands.function;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandlerListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.editors.input.InternalViewEditorInput;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.utils.logger.Log;
+
+public class ComputeInternalView extends AbstractHandler {
+
+	private IWorkbenchWindow window;
+	private IStructuredSelection selection;
+	private InternalViewEditorInput editorInput;
+
+	@Override
+	public void addHandlerListener(IHandlerListener handlerListener) {
+		super.addHandlerListener(handlerListener);
+	}
+
+	@Override
+	public void dispose() {
+		super.dispose();
+	}
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		if (!Toolbox.isSearchEngineInitialized()) return false;
+		
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		Object sel = HandlerUtil.getCurrentSelection(event);
+		if (!(sel instanceof IStructuredSelection)) {
+			Log.warning(Messages.ComputeInternalView_0);
+			return null;
+		}
+		
+		selection = (IStructuredSelection) sel;
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof Corpus)) {
+			System.out.println(Messages.ComputeInternalView_1);
+			return null;
+		}
+		final Corpus corpus = (Corpus) s;
+		editorInput = new InternalViewEditorInput(corpus, null);
+
+		IWorkbenchPage page = window.getActivePage();
+		try {
+			StatusLine.setMessage(Messages.ComputeReferencer_0);
+			page.openEditor(editorInput,"org.txm.rcp.editors.internal.InternalViewEditor"); //$NON-NLS-1$
+		
+		} catch (PartInitException e) {
+			System.err.println(Messages.CorporaView_6+ e);
+		}
+
+		return null;
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return super.isEnabled();
+	}
+
+	@Override
+	public boolean isHandled() {
+		return super.isHandled();
+	}
+
+	@Override
+	public void removeHandlerListener(IHandlerListener handlerListener) {
+		super.removeHandlerListener(handlerListener);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeInternalView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/OpenParaBrowser.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/OpenParaBrowser.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/OpenParaBrowser.java	(revision 324)
@@ -0,0 +1,100 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.function;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.editors.input.ParaBrowserEditorInput;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Display and browse text of structural unit of parallel corpora @ author
+ * mdecorde.
+ */
+public class OpenParaBrowser extends AbstractHandler {
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.commands.function.OpenParaBrowser"; //$NON-NLS-1$
+
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/** The editor input. */
+	private ParaBrowserEditorInput editorInput;
+
+	// org.txm.rcp.commands.function.OpenParaBrowser
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		/*
+		 * Object s = selection.getFirstElement(); if (s == null) return null;
+		 * if (!(s instanceof MainCorpus)) return null; final MainCorpus corpus =
+		 * (MainCorpus) s;
+		 */
+		List<Object> list = selection.toList();
+		List<MainCorpus> corpusList = new ArrayList<MainCorpus>();
+		for (Object co : list)
+			corpusList.add((MainCorpus) co);
+
+		editorInput = new ParaBrowserEditorInput(corpusList);// Put a list of
+																// corpus
+
+		IWorkbenchPage page = window.getActivePage();
+		try {
+			StatusLine
+					.setMessage(Messages.OpenParaBrowser_0);
+			page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.parabrowser.ParaBrowserEditor"); //$NON-NLS-1$
+		} catch (PartInitException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		return null;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/OpenParaBrowser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeConcordance.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeConcordance.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeConcordance.java	(revision 324)
@@ -0,0 +1,255 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.function;
+
+import javax.inject.Inject;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl;
+import org.eclipse.e4.ui.model.application.ui.advanced.impl.PlaceholderImpl;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MStackElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement;
+import org.eclipse.e4.ui.model.application.ui.basic.impl.PartSashContainerImpl;
+import org.eclipse.e4.ui.model.application.ui.basic.impl.PartStackImpl;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
+import org.eclipse.e4.ui.workbench.modeling.EPlaceholderResolver;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPartService;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.ISaveablePart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.EditorReference;
+import org.eclipse.ui.internal.PartService;
+import org.eclipse.ui.internal.Workbench;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.internal.WorkbenchWindow;
+import org.eclipse.ui.internal.WorkingSet;
+import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
+import org.txm.Toolbox;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+import cern.colt.Arrays;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Open the concordance editor @ author mdecorde.
+ */
+public class ComputeConcordance extends AbstractHandler {
+
+	/** The selection. */
+	private IStructuredSelection selection;
+
+	/** The editor input. */
+	private ConcordancesEditorInput editorInput;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		ISelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		if (!(sel instanceof IStructuredSelection)) return null;
+		selection = (IStructuredSelection) sel;
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof Corpus))
+			return null;
+		Corpus corpus = (Corpus) s;
+		if (openEditor(corpus)) {
+
+		} else {
+			System.out.println(Messages.ComputeConcordance_1);
+		}
+
+		return null;
+	}
+
+	@Inject
+	public static boolean openEditor(Corpus corpus) {
+		if (!Toolbox.isSearchEngineInitialized()) return false;
+		ConcordancesEditorInput editorInput = new ConcordancesEditorInput(corpus, null);
+
+		// MD: test of manipulating the editor's position in the UI
+		/*
+		Workbench wb = (Workbench) PlatformUI.getWorkbench();
+
+		System.out.println("Workbench: " + wb);
+		for (IWorkbenchWindow iwindow : wb.getWorkbenchWindows()) {
+			WorkbenchWindow window = (WorkbenchWindow) iwindow;
+
+			System.out.println(" Window: "+window);
+			for (IWorkbenchPage ipage :window.getPages()) {
+				WorkbenchPage page = (WorkbenchPage)ipage;
+				System.out.println("  Page: "+page);
+				
+				for (IEditorReference ieditor : page.getInternalEditorReferences()) {
+					EditorReference editor = (EditorReference)ieditor;
+					System.out.println("   Editor: "+editor+" "+editor.getId());
+					System.out.println("    part: "+ieditor.getPart(false));
+				}
+				for (IEditorPart dirtyEditor : page.getDirtyEditors()) {
+					System.out.println("   IEditorPart: "+dirtyEditor);
+				}
+
+				for (ISaveablePart dirtyPart : page.getDirtyParts()) {
+					System.out.println("   ISaveablePart: "+dirtyPart);
+				}
+
+				for (EditorReference editorref : page.getInternalEditorReferences()) {
+					System.out.println("   EditorReference: "+editorref+" "+editorref.getId());
+				}
+				//				for (IViewReference viewref : page.getViewReferences()) {
+				//					System.out.println("   IViewReference: "+viewref+" "+viewref.getId());
+				//				}
+				for (IWorkingSet iworkingset : page.getWorkingSets()) {
+					WorkingSet workingset = (WorkingSet)iworkingset;
+					System.out.println("   WorkingSet: "+workingset+" "+workingset.getId());
+					for (IAdaptable a : workingset.getElements()) {
+						System.out.println("    IAdaptable: "+a);
+					}
+				}
+
+				MWindow modelwindow = window.getModel();
+				
+				System.out.println("MWindow: "+modelwindow);
+				for (MWindowElement elem : modelwindow.getChildren()) {
+					if (elem instanceof PartSashContainerImpl) {
+						printChildren(elem, " ");
+//						PartSashContainerImpl psc = (PartSashContainerImpl)elem;
+//						System.out.println(" PartSashContainerImpl: "+psc);
+//						for (MPartSashContainerElement elem2 : psc.getChildren()) {
+//
+//							if (elem2 instanceof PerspectiveStackImpl) {
+//								PerspectiveStackImpl psi = (PerspectiveStackImpl)elem2;
+//								System.out.println("  PerspectiveStackImpl: "+psi);
+//								for (MPerspective p : psi.getChildren()) {
+//									System.out.println("   MPerspective: "+p);
+//									for (MPartSashContainerElement elem3 : p.getChildren()) {
+//										if (elem3 instanceof PartSashContainerImpl) {
+//											PartSashContainerImpl psci = (PartSashContainerImpl)elem3;
+//											printChildren(psci, "    ");
+//										} else {
+//											System.out.println("    MPartSashContainerElement: "+elem3);
+//										}
+//									}
+//								}
+//							} else if (elem2 instanceof PartStackImpl) {
+//								PartStackImpl psi = (PartStackImpl)elem2;
+//								System.out.println("  PartStackImpl: "+psi);
+//								for (MStackElement e : psi.getChildren()) {
+//									System.out.println("   MStackElement: "+e);
+//								}
+//							} else {
+//								System.out.println("  MPartSashContainerElement: "+elem2+" id="+elem2.getElementId());
+//							}
+//						}
+					} else {
+						System.out.println(" MWindowElement: "+elem);
+					}
+				}
+			}
+		}
+	*/
+		try {
+			StatusLine.setMessage(Messages.ComputeConcordance_0);
+			IEditorPart editor = TXMWindows.getActiveWindow().getActivePage()
+					.openEditor(editorInput, "org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
+			
+//			WorkbenchWindow window = (WorkbenchWindow)TXMWindows.getActiveWindow();
+//			MWindow model = window.getModel();
+//			EModelService modelService = model.getContext().get(EModelService.class);
+//			EPartService partService = model.getContext().get(EPartService.class);
+//			modelService.find("org.eclipse.ui.editorss", model); // find org.eclipse.ui.editorss?					
+//			MPart part = partService.createPart("org.txm.rcp.editors.ConcordancesEditor");
+//// NEXT STEPS : find partStack, add the part, show the part http://stackoverflow.com/questions/26912078/open-an-editing-partas-an-editor-in-previous-eclipse-versions-in-eclipse-rcp-4
+// ? direct access to PlaceholderImpl : elementId=org.eclipse.ui.editorss	
+			if (editor == null) return false;
+			
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+		return true;
+	}
+
+	@SuppressWarnings("unused")
+	private static void printChildren(Object o, String space) {
+
+		System.out.println(space+o.getClass().getSimpleName()+": "+o);
+		
+		if (o instanceof PlaceholderImpl) {
+			PlaceholderImpl phi = (PlaceholderImpl)o;
+			System.out.println("phi: "+phi);
+		} else if (o instanceof PartSashContainerImpl) {
+			PartSashContainerImpl psci = (PartSashContainerImpl)o;
+			for (MPartSashContainerElement e :psci.getChildren()) {
+				printChildren(e, space+" ");
+			}
+		} else if (o instanceof PerspectiveStackImpl) {
+			PerspectiveStackImpl psi = (PerspectiveStackImpl)o;
+			for (MPerspective p : psi.getChildren()) {
+				printChildren(p,space+" ");
+			}
+		} else if (o instanceof MPerspective) {
+			MPerspective p = (MPerspective)o;
+			for (MPartSashContainerElement e : p.getChildren()) {
+				printChildren(e, space+" ");
+			}
+		} else if (o instanceof PartStackImpl) {
+			PartStackImpl psi = (PartStackImpl)o;
+			for (MStackElement e : psi.getChildren()) {
+				printChildren(e, space+" ");
+			}
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/ComputeConcordance.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenBrowser.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenBrowser.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenBrowser.java	(revision 324)
@@ -0,0 +1,232 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.browser.BrowserViewer;
+import org.eclipse.ui.internal.browser.WebBrowserEditorInput;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.TXMBrowser;
+import org.txm.rcp.editors.TXMWebBrowserEditor;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Open the internal browser of TXM with a file @ author mdecorde.
+ */
+@SuppressWarnings("restriction") //$NON-NLS-1$
+public class OpenBrowser extends AbstractHandler {
+
+	/** The Constant ID. */
+	public final static String ID = "org.txm.rcp.commands.OpenBrowser"; //$NON-NLS-1$
+
+	/** The lastopenedfile. */
+	public static String lastopenedfile;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+
+		String filename = event
+				.getParameter("org.txm.rcp.commands.commandParameter2"); //$NON-NLS-1$
+		if (filename != null && !filename.matches("") && !filename.matches(" ")) //$NON-NLS-1$ //$NON-NLS-2$
+		{
+			openfile(filename);
+			return null;
+		}
+
+		File file = null;
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection != null & selection instanceof IStructuredSelection) {
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			for (Object next : strucSelection.toList()) {
+				if (next instanceof File) {
+					file = (File) next;
+					break;
+				}
+			}
+		}
+
+		if (file == null) {
+			FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+			String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+			if (LastOpened.getFile(ID) != null) {
+				dialog.setFilterPath(LastOpened.getFolder(ID));
+				dialog.setFileName(LastOpened.getFile(ID));
+			} else {
+				dialog.setFilterPath(txmhome); 
+			}
+			if (dialog.open() != null) {
+				String filepath = dialog.getFilterPath()
+						+ "/" + dialog.getFileName(); //$NON-NLS-1$
+				LastOpened.set(ID, dialog.getFilterPath(), dialog.getFileName());
+				if (dialog.getFileName().length() > 0) {
+					lastopenedfile = filepath;
+					return openfile(filepath);
+				}
+			}
+		} else {
+			if (file.isDirectory()) {
+				FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+				dialog.setFilterPath(file.getAbsolutePath());
+				if (dialog.open() == null) return null;
+				String filepath = dialog.getFilterPath()
+						+ "/" + dialog.getFileName(); //$NON-NLS-1$
+				LastOpened.set(ID, dialog.getFilterPath(), dialog.getFileName());
+				lastopenedfile = filepath;
+				return openfile(filepath);
+			} else
+				return openfile(file.getAbsolutePath());
+		}
+		return null;
+	}
+
+	/**
+	 * Openfile.
+	 *
+	 * @param filepath the filepath
+	 * @return the txm browser
+	 */
+	static public TXMBrowser openEdition(String filepath) {
+		return openEdition(filepath, new File(filepath).getName());
+	}
+
+	/**
+	 * Openfile.
+	 *
+	 * @param filepath the filepath
+	 * @return the txm browser
+	 */
+	static public TXMWebBrowserEditor openfile(String filepath) {
+		return openfile(filepath, new File(filepath).getName());
+	}
+
+	/**
+	 * Open a file given a path in a Web editor.
+	 *
+	 * @param filepath the filepath
+	 * @param editorname the editorname
+	 * @return the txm browser
+	 */
+	public static TXMBrowser openEdition(String filepath, String editorname) {
+		try {
+			// WebBrowserEditorInput editorInput = new WebBrowserEditorInput();
+			//TODO: is web browser type order useful ?
+			//System.setProperty("org.eclipse.swt.browser.DefaultType", "ie,mozilla,webkit");
+			//System.setProperty("org.eclipse.swt.browser.XULRunnerPath", "");
+			WebBrowserEditorInput editorInput;
+			File localfile = new File(filepath);
+			if (localfile.exists())
+				editorInput = new WebBrowserEditorInput(localfile.toURI()
+						.toURL(), BrowserViewer.BUTTON_BAR
+						| BrowserViewer.LOCATION_BAR);
+			else
+				editorInput = new WebBrowserEditorInput(new URL(filepath),
+						BrowserViewer.BUTTON_BAR | BrowserViewer.LOCATION_BAR);
+			IWorkbenchWindow window = PlatformUI.getWorkbench()
+					.getActiveWorkbenchWindow();
+			IWorkbenchPage page = window.getActivePage();
+
+			TXMBrowser editor = (TXMBrowser) page.openEditor(editorInput,
+					TXMBrowser.ID, true);
+			editor.setName(editorname);
+			return editor;
+		} catch (MalformedURLException e) {
+			Log.severe(Messages.OpenBrowser_0+e.toString()+Messages.OpenBrowser_1+filepath);
+			System.out.println(Messages.OpenBrowser_0+e.toString()+Messages.OpenBrowser_1+filepath);
+		} catch (PartInitException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return null;
+	}
+
+	/**
+	 * Openfile.
+	 *
+	 * @param filepath the filepath
+	 * @param editorname the editorname
+	 * @return the txm browser
+	 */
+	@SuppressWarnings("restriction") //$NON-NLS-1$
+	public static TXMWebBrowserEditor openfile(String filepath, String editorname) {
+		try {
+			// WebBrowserEditorInput editorInput = new WebBrowserEditorInput();
+			WebBrowserEditorInput editorInput;
+			File localfile = new File(filepath);
+			if (localfile.exists())
+				editorInput = new WebBrowserEditorInput(localfile.toURI()
+						.toURL(), BrowserViewer.BUTTON_BAR
+						| BrowserViewer.LOCATION_BAR);
+			else
+				editorInput = new WebBrowserEditorInput(new URL(filepath),
+						BrowserViewer.BUTTON_BAR | BrowserViewer.LOCATION_BAR);
+			
+			IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+			//System.out.println("Window: "+window);
+			IWorkbenchPage page = window.getActivePage();
+
+			TXMWebBrowserEditor editor = (TXMWebBrowserEditor) page.openEditor(editorInput,
+					TXMWebBrowserEditor.WEB_BROWSER_EDITOR_ID, true);
+			editor.setTitle(editorname);
+
+			return editor;
+		} catch (MalformedURLException e) {
+			Log.severe(Messages.OpenBrowser_0+e.toString()+Messages.OpenBrowser_1+filepath);
+			System.out.println(Messages.OpenBrowser_0+e.toString()+Messages.OpenBrowser_1+filepath);
+		} catch (PartInitException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenBrowser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/TxmCommand.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/TxmCommand.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/TxmCommand.java	(revision 324)
@@ -0,0 +1,26 @@
+package org.txm.rcp.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.txm.rcp.Messages;
+
+public class TxmCommand extends AbstractHandler {
+
+	protected String name = "noname"; //$NON-NLS-1$
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+	
+	public void install()
+	{
+		System.out.println(Messages.TxmCommand_1+name);
+	}
+	
+	public void preInstall()
+	{
+		System.out.println(Messages.TxmCommand_1+name);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/TxmCommand.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CopyFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CopyFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CopyFile.java	(revision 324)
@@ -0,0 +1,70 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+// TODO: Auto-generated Javadoc
+/**
+ * Handler: copy the selected file. 
+ * 
+ * @mdecorde
+ */
+public class CopyFile extends AbstractHandler {
+
+	public static File toCopy;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection instanceof IStructuredSelection) {
+			Object o = ((IStructuredSelection)selection).getFirstElement();
+
+			if (o instanceof File) {
+				File file = (File)o;
+				copy(file);
+			}
+		}
+		return null;
+	}
+	
+	public static void copy(File file) {
+		toCopy = file;
+		CutFile.toCut = null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CopyFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenWelcomePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenWelcomePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenWelcomePage.java	(revision 324)
@@ -0,0 +1,85 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Locale;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.txm.rcp.Activator;
+import org.txm.utils.logger.Log;
+
+/**
+ * Open the internal browser of TXM with a file 
+ * 
+ * @author mdecorde.
+ */
+public class OpenWelcomePage extends AbstractHandler {
+
+	/** The Constant ID. */
+	public final static String ID = "org.txm.rcp.commands.OpenWelcomePage"; //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		openWelcomePage();
+		return null;
+	}
+
+	public static void openWelcomePage() {
+		
+		String locale = Locale.getDefault().getLanguage();
+		String version = Platform.getBundle(Activator.PLUGIN_ID).getVersion().toString();
+		int idx = version.lastIndexOf("."); //$NON-NLS-1$
+		if (idx > 0) version = version.substring(0, idx); // remove the "qualifier" part
+		
+		String urlString = "http://txm.sourceforge.net/welcome/"+version+"/"+locale+"/welcome.html";
+		try {
+			URL url = new URL(urlString);
+			try {
+				url.openStream().close();
+			} catch (IOException e) {
+				Log.info(e.getMessage());
+				Log.printStackTrace(e);
+				urlString = "http://txm.sourceforge.net/welcome/"+version+"/en/welcome.html";
+				url = new URL(urlString);
+			}
+			OpenBrowser.openfile(urlString); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		} catch (MalformedURLException e) {
+			Log.severe(e.getMessage());
+			Log.printStackTrace(e);
+		}
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenWelcomePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/PasteFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/PasteFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/PasteFile.java	(revision 324)
@@ -0,0 +1,134 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+import org.txm.rcp.utils.IOClipboard;
+import org.txm.rcp.views.fileexplorer.Explorer;
+import org.txm.rcp.views.fileexplorer.MacroExplorer;
+// TODO: Auto-generated Javadoc
+/**
+ * Execute a groovy script file in the same thread a the RCP @ author mdecorde.
+ */
+public class PasteFile extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection instanceof IStructuredSelection) {
+			Object o = ((IStructuredSelection)selection).getFirstElement();
+
+			if (o instanceof File) {
+				paste((File)o);
+			}
+		}
+		return null;
+	}
+	
+	public static void paste(File folder) {
+
+		if (folder.isFile()) folder = folder.getParentFile();
+		if (folder.isDirectory() && folder.canWrite()) {
+			if (CopyFile.toCopy != null) {
+				File source = CopyFile.toCopy;
+				if (source.isDirectory()) return; // don't copy directory
+				
+				File dest = new File(folder, source.getName());
+				while (dest.exists()) {
+					dest = new File(folder, "copy_"+dest.getName()); //$NON-NLS-1$
+				}
+				try {
+					if (!org.txm.utils.io.FileCopy.copy(source, dest))
+						System.out.println(Messages.PasteFile_1+source+Messages.ApplicationWorkbenchAdvisor_37+dest);
+				} catch (IOException e) {
+					System.out.println(Messages.PasteFile_1+source+Messages.ApplicationWorkbenchAdvisor_37+dest+Messages.PasteFile_4+e);
+				}
+			} else if (CutFile.toCut != null) {
+				File source = CutFile.toCut;
+				if (source.isDirectory()) return; // don't move directory
+				File dest = new File(folder, source.getName());
+				while (dest.exists()) {
+					dest = new File(folder, "copy_"+dest.getName()); //$NON-NLS-1$
+				}
+				try {
+					if (!org.txm.utils.io.FileCopy.copy(source, dest))
+						System.out.println(Messages.PasteFile_1+source+Messages.ApplicationWorkbenchAdvisor_37+dest);
+					if (!source.delete()) 
+						System.out.println(Messages.PasteFile_3+source);
+					CutFile.toCut = null;
+				} catch (IOException e) {
+					System.out.println(Messages.PasteFile_1+source+Messages.ApplicationWorkbenchAdvisor_37+dest+Messages.PasteFile_4+e);
+				}
+			} else {
+				// check clipboard content
+				String[] paths = IOClipboard.readFiles();
+				if (paths == null) return;
+				System.out.println("Coping files: "+StringUtils.join(Arrays.asList(paths), ", "));
+				for (String path : paths) {
+					File source = new File(path);
+					File dest = new File(folder, source.getName());
+					while (dest.exists()) {
+						dest = new File(folder, "copy_"+dest.getName()); //$NON-NLS-1$
+					}
+					
+					try {
+						if (source.isDirectory()) {
+							org.txm.utils.io.FileCopy.copyFiles(source, dest);
+						} else {
+							if (!org.txm.utils.io.FileCopy.copy(source, dest))
+								System.out.println(Messages.PasteFile_1+source+Messages.ApplicationWorkbenchAdvisor_37+dest);
+						}
+						
+					} catch (IOException e) {
+						System.out.println(Messages.PasteFile_1+source+Messages.ApplicationWorkbenchAdvisor_37+dest+Messages.PasteFile_4+e);
+					}
+				}
+			}
+			CopyFile.toCopy = null;
+			CutFile.toCut = null;
+			Explorer.refresh();
+			MacroExplorer.refresh();
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/PasteFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/RestartTXM.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/RestartTXM.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/RestartTXM.java	(revision 324)
@@ -0,0 +1,103 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+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.osgi.util.NLS;
+import org.txm.Toolbox;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.utils.JobHandler;
+
+// TODO: Auto-generated Javadoc
+/**
+ * restart TXM: restart searchengine, statengine, workspace... 
+ * @author mdecorde
+ * 
+ */
+public class RestartTXM extends AbstractHandler {
+
+	/** The ID. */
+	static public String ID = "org.txm.rcp.commands.RestartTXM"; //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		JobHandler jobhandler = new JobHandler("Restarting...") { 
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				JobsTimer.start();
+				try {
+					monitor.beginTask(Messages.RestartTXM_1, 100);
+					//Toolbox.updateProperties(TxmPreferences.getProperties());
+					Toolbox.restart();
+
+					monitor.worked(95);
+					syncExec(new Runnable() {
+						@Override
+						public void run() {
+							reloadViews();
+						}
+					});
+
+				} catch (Exception e) {
+					System.out.println(NLS.bind(Messages.RunGroovyScript_8, e));
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				} finally {
+					monitor.done();
+				}
+				JobsTimer.stopAndPrint();
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob();
+		return event;
+	}
+
+	public static void reloadViews() {
+		//System.out.println(Messages.RestartTXM_0);
+		org.txm.rcp.views.corpora.CorporaView.reload();
+		org.txm.rcp.views.corpora.CorporaView.refresh();
+		org.txm.statsengine.r.rcp.views.RConsole.reload();
+		org.txm.rcp.views.BasesView.reload();
+		org.txm.rcp.views.BasesView.refresh();
+		org.txm.rcp.views.QueriesView.reload();
+		org.txm.rcp.views.QueriesView.refresh();
+		//System.err.println(Messages.AddBase_10);
+		//StatusLine.setMessage(Messages.AddBase_10);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/RestartTXM.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/BuildCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/BuildCorpus.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/BuildCorpus.java	(revision 324)
@@ -0,0 +1,95 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.workspace;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.commands.IHandlerListener;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class BuildCorpus.
+ */
+public class BuildCorpus implements IHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#addHandlerListener(org.eclipse.core.commands.IHandlerListener)
+	 */
+	@Override
+	public void addHandlerListener(IHandlerListener handlerListener) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#isEnabled()
+	 */
+	@Override
+	public boolean isEnabled() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#isHandled()
+	 */
+	@Override
+	public boolean isHandled() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#removeHandlerListener(org.eclipse.core.commands.IHandlerListener)
+	 */
+	@Override
+	public void removeHandlerListener(IHandlerListener handlerListener) {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/BuildCorpus.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/ConvertCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/ConvertCorpus.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/ConvertCorpus.java	(revision 324)
@@ -0,0 +1,89 @@
+package org.txm.rcp.commands.workspace;
+
+import java.io.File;
+
+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.osgi.util.NLS;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.importer.Convert5To6;
+import org.txm.objects.Base;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.RestartTXM;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.utils.DeleteDir;
+
+public class ConvertCorpus extends AbstractHandler {
+	JobHandler jobhandler;
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		DirectoryDialog dialog = new DirectoryDialog(shell);
+
+		dialog.setFilterPath(Toolbox.getParam(TBXPreferences.USER_TXM_HOME));
+		String path = dialog.open();
+
+		final File corpora = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME),
+				"corpora"); //$NON-NLS-1$
+		final File indir = new File(path);
+		final File outdir = new File(corpora, indir.getName() + 6);
+		DeleteDir.deleteDirectory(outdir);
+
+		jobhandler = new JobHandler("Converting...") {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					try {
+						Convert5To6 converter = new Convert5To6(indir, outdir);
+						this.acquireSemaphore();
+						converter.start();
+						this.releaseSemaphore();
+
+						Base base = LoadBinaryCorpus.loadBinaryCorpus(outdir);
+						if (base == null) {
+							System.out.println(Messages.ConvertCorpus_0);
+							return Status.CANCEL_STATUS;
+						}
+					} catch (Throwable e) {
+						System.out.println(NLS.bind(Messages.RunGroovyScript_8,
+								e));
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					} finally {
+						monitor.done();
+					}
+
+					this.acquireSemaphore();
+					org.txm.Toolbox.restartWorkspace();
+					org.txm.Toolbox.restartSearchEngine();
+					this.releaseSemaphore();
+
+					syncExec(new Runnable() {
+						@Override
+						public void run() {
+							RestartTXM.reloadViews();
+						}
+					});
+				} catch (ThreadDeath td) {
+					monitor.done();
+					return Status.CANCEL_STATUS;
+				}
+
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob();
+		return event;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/ConvertCorpus.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/AddText.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/AddText.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/AddText.java	(revision 324)
@@ -0,0 +1,89 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.workspace;
+import java.io.File;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+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.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.views.BasesView;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class AddText.
+ */
+public class AddText extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.workspace.AddText"; //$NON-NLS-1$
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		System.out.println(""); //$NON-NLS-1$
+		Corpus corpus = null;
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection != null & selection instanceof IStructuredSelection) {
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			for (Iterator<Object> iterator = strucSelection.iterator(); iterator
+					.hasNext();) {
+				corpus = (Corpus) iterator.next();
+				break;
+			}
+		}
+
+		String filepath = ""; //$NON-NLS-1$
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		FileDialog dialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI);
+		if (LastOpened.getFile(ID) != null) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+			dialog.setFileName(LastOpened.getFile(ID));
+		}
+		if (dialog.open() != null) {
+			for (String filename : dialog.getFileNames()) {
+				filepath = dialog.getFilterPath() + "/" + filename; //$NON-NLS-1$
+				if (corpus != null && filepath != null && !filepath.matches("")) //$NON-NLS-1$
+					corpus.addText(new File(filepath));
+				LastOpened.set(ID, filepath, filename);
+			}
+			BasesView.refresh();
+		}
+
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/AddText.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RecodeCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RecodeCorpus.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RecodeCorpus.java	(revision 324)
@@ -0,0 +1,142 @@
+package org.txm.rcp.commands.workspace;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.logging.Level;
+import java.util.regex.Pattern;
+
+import javax.xml.stream.XMLStreamException;
+
+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.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.kohsuke.args4j.Option;
+import org.txm.Toolbox;
+import org.txm.annotation.conversion.CorpusRuledConvertion;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.importer.ImportKeys;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.commands.CloseEditorsUsing;
+import org.txm.rcp.commands.ExecuteImportScript;
+import org.txm.rcp.swt.widget.parameters.ParametersDialog;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.utils.logger.Log;
+
+public class RecodeCorpus extends AbstractHandler {
+
+	public static final String ID = RecodeCorpus.class.getCanonicalName();
+
+	@Option(name="conversionFile", usage="conversionFile", widget="File", required=true, def="conv.tsv")
+	protected File conversionFile;
+	@Option(name="oldType", usage="oldType", widget="String", required=true, def="pos")
+	protected String oldType;
+	@Option(name="newType", usage="newType", widget="String", required=true, def="pos2")
+	protected String newType;
+	@Option(name="gestionInconnus", usage="oldType", widget="String", required=true, def="abandon")
+	protected String gestionInconnus;
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection isel = HandlerUtil.getCurrentSelection(event);
+		if (isel == null) return null ;
+		if (!(isel instanceof IStructuredSelection)) return null ;
+		IStructuredSelection selection = (IStructuredSelection) isel;
+		Object s = selection.getFirstElement();
+		if (!(s instanceof MainCorpus)) return null;
+
+		final MainCorpus corpus = (MainCorpus) s;
+
+		try {
+			if (ParametersDialog.open(this)) {
+
+				JobHandler job = new JobHandler("Recode corpus ") {
+					@Override
+					protected IStatus run(IProgressMonitor monitor) {
+						try {
+							recode(corpus, conversionFile, oldType, newType, monitor);
+						} catch (Exception e) {
+							System.out.println("Fail to convert properties of corpus "+corpus);
+							e.printStackTrace();
+							return Status.CANCEL_STATUS;
+						}
+						return Status.OK_STATUS;
+					}
+				};
+				job.startJob();
+				return corpus;
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+		return corpus;
+	}
+
+	public static JobHandler recode(final MainCorpus corpus, CorpusRuledConvertion crc, String oldType, String newType, IProgressMonitor monitor) throws IOException, CqiClientException, XMLStreamException {
+
+		Property p1 = corpus.getProperty(oldType);
+		if (p1 == null) {
+			System.out.println("Corpus "+corpus+" has not property "+oldType);
+			return null;
+		}
+
+		System.out.println("Recoding "+corpus+" property "+oldType+" in "+newType);
+
+		monitor.beginTask("Recoding corpus properties...", 2);
+		monitor.setTaskName("Recoding XML-TXM files");
+		// apply conversion file
+		if (!crc.process(corpus)) {
+			System.out.println("Failed to edit XML-TXM of the corpus: "+corpus);
+			return null;
+		}
+		monitor.worked(1);
+		
+		// update corpus indexes and edition
+		String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+
+		BaseParameters params = corpus.getBase().getBaseParameters();
+		params.getKeyValueParameters().put(ImportKeys.MULTITHREAD, "false"); //too soon
+		params.getKeyValueParameters().put(ImportKeys.DEBUG, Log.getLevel().intValue() < Level.WARNING.intValue()); // need debug for experimental stuff
+		params.getKeyValueParameters().put(ImportKeys.UPDATECORPUS, "true");
+
+		monitor.setTaskName("Updating corpus");
+		File scriptDir = new File(txmhome, "scripts/import");
+		File script = new File(scriptDir, "xtzLoader.groovy");
+		System.out.println("Updating corpus "+corpus+" using "+params.paramFile);
+		JobHandler ret = ExecuteImportScript.executeScript(script.getAbsolutePath(), params);
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {CloseEditorsUsing.corpus(corpus);}
+		});
+		monitor.worked(1);
+		return ret;
+	}
+
+	public static JobHandler recode(final MainCorpus corpus, LinkedHashMap<Pattern, String> rules, String oldType, String newType, IProgressMonitor monitor) throws IOException, CqiClientException, XMLStreamException {
+
+		// apply conversion file
+		CorpusRuledConvertion crc = new CorpusRuledConvertion(rules, newType, oldType);
+		return recode(corpus, crc, oldType, newType , monitor);
+	}
+
+	public static JobHandler recode(final MainCorpus corpus, File conversionFile, String oldType, String newType, IProgressMonitor monitor) throws IOException, CqiClientException, XMLStreamException {
+		System.out.println("Create CorpusRuledConvertion with "+conversionFile);
+		// apply conversion file
+		CorpusRuledConvertion crc = new CorpusRuledConvertion(conversionFile, oldType, newType);
+
+		return recode(corpus, crc, oldType, newType, monitor);
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RecodeCorpus.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java	(revision 324)
@@ -0,0 +1,62 @@
+package org.txm.rcp.commands.workspace;
+
+import java.io.File;
+import java.util.logging.Level;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.importer.ImportKeys;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.commands.CloseEditorsUsing;
+import org.txm.rcp.commands.ExecuteImportScript;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.utils.logger.Log;
+
+public class UpdateCorpus extends AbstractHandler {
+
+	public static final String ID = UpdateCorpus.class.getCanonicalName();
+	
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		ISelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		if (!(sel instanceof IStructuredSelection)) return null;
+		IStructuredSelection selection = (IStructuredSelection) sel;
+
+		Object s = selection.getFirstElement();
+		if (!(s instanceof MainCorpus))
+			return null;
+		MainCorpus corpus = (MainCorpus) s;
+		update(corpus);
+		
+		return corpus;
+	}
+	
+	public static JobHandler update(final MainCorpus corpus) {
+		
+		String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		
+		BaseParameters params = corpus.getBase().getBaseParameters();
+		params.getKeyValueParameters().put(ImportKeys.MULTITHREAD, "false"); //too soon
+		params.getKeyValueParameters().put(ImportKeys.DEBUG, Log.getLevel().intValue() < Level.WARNING.intValue()); // need debug for experimental stuff
+		params.getKeyValueParameters().put(ImportKeys.UPDATECORPUS, "true");
+		
+		File scriptDir = new File(txmhome, "scripts/import");
+		File script = new File(scriptDir, "xtzLoader.groovy");
+		System.out.println("Updating corpus "+corpus+" using "+params.paramFile);
+		JobHandler ret = ExecuteImportScript.executeScript(script.getAbsolutePath(), params);
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {CloseEditorsUsing.corpus(corpus);}
+		});
+		return ret;
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/package.html	(revision 324)
@@ -0,0 +1,9 @@
+<html>
+<body>
+	<p>
+		Commands which deals with the base view <br /> not used yet The only
+		command used is AddBase which loads a base from binary files of a
+		corpus
+	</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/AddProject.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/AddProject.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/AddProject.java	(revision 324)
@@ -0,0 +1,86 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.workspace;
+
+import org.txm.rcp.Messages;
+import org.txm.rcp.views.BasesView;
+
+import java.util.Iterator;
+
+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.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.objects.Project;
+import org.txm.objects.Workspace;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class AddProject.
+ */
+public class AddProject extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		System.out.println(""); //$NON-NLS-1$
+		Workspace w = null;
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection != null & selection instanceof IStructuredSelection) {
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			for (Iterator<Object> iterator = strucSelection.iterator(); iterator
+					.hasNext();) {
+				Project p = (Project) iterator.next();
+				w = p.getWorkspace();
+				break;
+			}
+		}
+
+		String name = ""; //$NON-NLS-1$
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		InputDialog dlg = new InputDialog(shell,
+				"", Messages.AddProject_3, name, null); //$NON-NLS-1$
+		if (dlg.open() == Window.OK) {
+			// User clicked OK; update the label with the input
+			name = dlg.getValue();
+		}
+
+		if (w != null && name != null && !name.matches("")) //$NON-NLS-1$
+			w.addProject(name);
+		BasesView.refresh();
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/AddProject.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java	(revision 324)
@@ -0,0 +1,315 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.workspace;
+
+import java.io.File;
+import java.util.ArrayList;
+
+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.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.objects.Base;
+import org.txm.objects.Project;
+import org.txm.objects.Workspace;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.commands.RestartTXM;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.utils.DeleteDir;
+import org.txm.utils.logger.Log;
+import org.txm.utils.zip.Zip;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Create a base from binary files of a base.
+ *
+ * @author mdecorde
+ */
+public class LoadBinaryCorpus extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.workspace.AddBase"; //$NON-NLS-1$
+
+	File corpusdir;
+	private File zipFile;
+	private File backup;
+	String basedirname;
+
+	@Override
+	/**
+	 * calling this command will : open a directory dialog and try to load the content of the selected directory
+	 */
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		// create dialog to get the corpus directory
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+		dialog.setFilterExtensions(new String[]{"*.txm", "*.zip"});
+		if (LastOpened.getFile(ID) != null) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+			dialog.setFileName(LastOpened.getFile(ID));
+		}
+
+		if (dialog.open() != null) {
+			final String path = dialog.getFilterPath();
+			final String filename = dialog.getFileName();
+
+			zipFile = new File(path, filename);
+			LastOpened.set(ID, zipFile);
+
+			return loadBinaryCorpusArchive(zipFile);
+		}
+		return null;
+	}
+
+	private void restoreCorpus(File backup, File basedir) {
+		System.out.println(Messages.LoadBinaryCorpus_10+basedir.getName()+Messages.LoadBinaryCorpus_11);
+		if (backup.exists()) {
+			System.out.println(Messages.LoadBinaryCorpus_12);
+			DeleteDir.deleteDirectory(basedir);
+			if (basedir.exists()) {
+				System.out.println(Messages.LoadBinaryCorpus_13+basedir+Messages.LoadBinaryCorpus_14+backup);
+				return;
+			}
+			if (!backup.renameTo(basedir)) {
+				System.out.println(Messages.LoadBinaryCorpus_15+backup);
+				return;
+			}
+			org.txm.Toolbox.restartWorkspace();
+			org.txm.Toolbox.restartSearchEngine();
+
+		}
+	}
+
+	/**
+	 * Load a binary corpus archive: 
+	 * 
+	 * 1- test if the corpus directory is already used
+	 * 2- delete previous corpus version
+	 * 3- unzip the archive
+	 * 4- load the binary corpus directory
+	 * 5- restart TXM engines
+	 */
+	public boolean loadBinaryCorpusArchive(final File zipFile) throws ExecutionException {
+
+		String filename = zipFile.getName();
+		final File corporaDir = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "corpora"); //$NON-NLS-1$
+		corporaDir.mkdir();
+
+		if (!filename.endsWith(".txm") && !filename.endsWith(".zip")) { //$NON-NLS-1$ //$NON-NLS-2$
+			System.out.println(Messages.AddBase_25);
+			System.out.println(NLS.bind(Messages.AddBase_22, zipFile));
+			return false;
+		}
+
+		if (!zipFile.canRead()) {
+			System.out.println(NLS.bind(Messages.AddBase_17, zipFile));
+			return false;
+		}
+
+		//build binary dir path			
+		basedirname = Zip.getRoot(zipFile);
+		corpusdir = new File(corporaDir, basedirname);
+
+		if (corpusdir.exists()) {
+			boolean b = MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), Messages.AddBase_19, NLS.bind(Messages.AddBase_20, corpusdir.getName().toUpperCase()));
+			if (b) {
+				//TODO: to enable backup of binary corpus I need to be able to reload correctly a corpus in CQP corpus manager
+//				backup = new File(corpusdir.getParentFile(), corpusdir.getName()+"-back"); //$NON-NLS-1$
+//				DeleteDir.deleteDirectory(backup);
+//				if (backup.exists()) {
+//					System.out.println(Messages.LoadBinaryCorpus_1+backup);
+//					return false;
+//				}
+//				if (!corpusdir.renameTo(backup)) {
+//					System.out.println(Messages.LoadBinaryCorpus_2+backup);
+//					return false;
+//				}
+				DeleteDir.deleteDirectory(corpusdir);
+				if (corpusdir.exists()) {
+					System.out.println("Error: previous binary corpus directory was not deleted: "+corpusdir);
+					return false;
+				}
+			} else {
+				return false; // abandon
+			}
+		}
+
+		// scan dir
+		JobHandler jobhandler = new JobHandler(
+				NLS.bind(Messages.AddBase_1, corpusdir.getName())) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					//ZIPPED FILE
+					monitor.beginTask(Messages.AddBase_27, 100);
+					monitor.subTask(Messages.AddBase_28);
+					try {
+						//System.out.println(NLS.bind(Messages.AddBase_29, zipFile, corporaDir));
+						Zip.decompress(zipFile.getAbsolutePath(), corporaDir.getAbsolutePath(), false, this);
+					} catch (Exception e) {
+						System.out.println(NLS.bind(Messages.AddBase_31, e));
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+						return Status.CANCEL_STATUS;
+					}
+					monitor.worked(50);
+
+					monitor.subTask(Messages.AddBase_32);
+					Base base = loadBinaryCorpus(new File(corporaDir, basedirname));
+					if (base == null) {
+						System.out.println(Messages.AddBase_4);
+						return Status.CANCEL_STATUS;
+					}
+					//System.out.println("fin load base");
+					monitor.worked(40);
+					monitor.subTask(Messages.AddBase_33);
+
+					this.acquireSemaphore();
+					//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+					org.txm.Toolbox.restartWorkspace();
+					org.txm.Toolbox.restartSearchEngine();
+					this.releaseSemaphore();
+
+					final Base base2 = Toolbox.workspace.getDefaultProject().getBase(base.getName()); //$NON-NLS-1$
+					if (base2 == null) {
+						System.out.println(Messages.LoadBinaryCorpus_4);
+						return null;
+					}
+
+					//TODO: restore backup step: if thecorpus load failed retrieve corpus backup
+//					//System.out.println("New corpus list: "+base.getCorpora());
+//					if (base.getCorpora().size() == 0) {
+//						System.out.println(Messages.LoadBinaryCorpus_5);
+//						//restoreCorpus(backup, corpusdir);
+//					} else {
+//						for (String name : base.getCorpora().keySet()) {
+//							Corpus corpus = base.getCorpus(name);
+//							//System.out.println("Testing corpus with name "+name);
+//							if (corpus == null) continue;
+//
+//							try {
+//								System.out.print(Messages.LoadBinaryCorpus_6+corpus);
+//								corpus.getSize();
+//								System.out.println(Messages.LoadBinaryCorpus_0);
+//								DeleteDir.deleteDirectory(backup);
+//							} catch (Exception e) {
+//								System.out.println(Messages.LoadBinaryCorpus_3+e+Messages.LoadBinaryCorpus_7);
+//								//Toolbox.getCqiClient().dropCorpus(name);
+//								//Log.info(NLS.bind(Messages.AddBase_23, basename.toUpperCase())); 
+//								Log.info(Log.toString(e));
+//								//restoreCorpus(backup, corpusdir);
+//							}
+//						}
+//					} 
+
+					syncExec(new Runnable() {
+						@Override
+						public void run() {
+							RestartTXM.reloadViews();
+							//System.out.println("Select newly loaded corpus: "+base2.getCorpora().values());
+							CorporaView.select(new ArrayList<MainCorpus>(base2.getCorpora().values()));
+							System.err.println(Messages.AddBase_10);
+							StatusLine.setMessage(Messages.AddBase_10);
+						}
+					});
+				} catch (ThreadDeath td) { 
+					return Status.CANCEL_STATUS;
+				} catch (Exception e2) {
+					org.txm.rcp.utils.Logger.printStackTrace(e2);
+				} finally {
+					monitor.done();
+				}
+				return Status.OK_STATUS;
+				//return Status.CANCEL_STATUS;
+			}
+		};
+
+		try {
+			jobhandler.startJob();
+		} catch (Exception e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		return true;
+	}
+
+	/**
+	 * load the content of the file if its a directory containing at least the sub folders :
+	 * txm, html, data and registry.
+	 *
+	 * @param binCorpusDirectory the basedir
+	 * @return the base
+	 * @throws Exception the exception
+	 */
+	public static Base loadBinaryCorpus(File binCorpusDirectory) throws Exception {
+		if (!(binCorpusDirectory.exists() && binCorpusDirectory.isDirectory())) {
+			Log.severe(NLS.bind(Messages.AddBase_24, binCorpusDirectory.getAbsolutePath()));
+			System.out.println(NLS.bind(Messages.AddBase_24, binCorpusDirectory.getAbsolutePath()));
+			return null; 
+		}
+
+		//File txmregistry = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "registry"); //$NON-NLS-1$
+		//txmregistry.mkdir();
+		File txmcorpora = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "corpora"); //$NON-NLS-1$
+		txmcorpora.mkdir();
+
+		Workspace w = org.txm.Toolbox.workspace;
+		if (w == null) {
+			System.out.println(Messages.AddBase_34);
+			return null;
+		}
+		Project p = w.getProject("default"); //$NON-NLS-1$
+		if (p == null) {
+			System.out.println(Messages.AddBase_34);
+			return null;
+		}
+		Base base = p.scanDirectory(binCorpusDirectory);
+		if (base == null) {
+			Log.severe(NLS.bind(Messages.AddBase_2, binCorpusDirectory)); 
+			return null;
+		}
+
+		w.save();
+		return base;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveText.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveText.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveText.java	(revision 324)
@@ -0,0 +1,69 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.workspace;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.objects.Text;
+import org.txm.rcp.views.BasesView;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RemoveText.
+ */
+public class RemoveText extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		System.out.println(""); //$NON-NLS-1$
+		Text p = null;
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection != null & selection instanceof IStructuredSelection) {
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			for (Iterator<Object> iterator = strucSelection.iterator(); iterator
+					.hasNext();) {
+				p = (Text) iterator.next();
+				break;
+			}
+		}
+
+		if (p != null)
+			p.getCorpus().removeText(p.getName());
+
+		BasesView.refresh();
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveText.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveProject.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveProject.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveProject.java	(revision 324)
@@ -0,0 +1,69 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.workspace;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.objects.Project;
+import org.txm.rcp.views.BasesView;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RemoveProject.
+ */
+public class RemoveProject extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		System.out.println(""); //$NON-NLS-1$
+		Project p = null;
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection != null & selection instanceof IStructuredSelection) {
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			for (Iterator<Object> iterator = strucSelection.iterator(); iterator
+					.hasNext();) {
+				p = (Project) iterator.next();
+				break;
+			}
+		}
+
+		if (p != null)
+			p.getWorkspace().removeProject(p.getName());
+
+		BasesView.refresh();
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveProject.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/SetSearchEngine.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/SetSearchEngine.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/SetSearchEngine.java	(revision 324)
@@ -0,0 +1,123 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.workspace;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.util.Util;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.importer.cwb.CwbEncode;
+import org.txm.rcp.Application;
+import org.txm.rcp.preferences.CQPPreferencePage;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class SetSearchEngine.
+ * 
+ * not used
+ */
+@Deprecated
+public class SetSearchEngine extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+//		IPreferencesService service = Platform.getPreferencesService();
+//		String currentengine = service.getString(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_PATH_TO_REGISTRY, "", null); //$NON-NLS-1$
+//		currentengine = new File(currentengine).getParent();
+//
+//		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+//				.getShell();
+//		DirectoryDialog dialog = new DirectoryDialog(shell, SWT.OPEN);
+//		dialog.setFilterPath(currentengine);
+//
+//		if (dialog.open() != null) {
+//			String path = dialog.getFilterPath();
+//			System.out.println("import searchengine " + path); //$NON-NLS-1$
+//			CwbEncode.patchDir(new File(path));
+//
+//			Preferences preferences = new InstanceScope()
+//					.getNode(Application.PLUGIN_ID);
+//
+//			preferences.put(TBXPreferences.CQI_SERVER_PATH_TO_REGISTRY, path
+//					+ "/registry"); //$NON-NLS-1$
+//
+//			if (Util.isWindows()) //$NON-NLS-1$ //$NON-NLS-2$
+//				preferences.put(
+//						TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, path
+//								+ "/bin/cqpserver.exe"); //$NON-NLS-1$
+//			else
+//				preferences.put(
+//						TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, path
+//								+ "/bin/cqpserver"); //$NON-NLS-1$
+//
+//			preferences.put(TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE,
+//					path + "/cqpserver.init"); //$NON-NLS-1$
+//			try {
+//				preferences.flush();
+//			} catch (BackingStoreException e) {
+//				org.txm.rcp.utils.Logger.printStackTrace(e);
+//			}
+//
+//			org.txm.Toolbox.shutdown();
+//			try {
+//				org.txm.Toolbox
+//						.initialize(org.txm.rcp.ApplicationWorkbenchAdvisor
+//								.getProperties());
+//			} catch (Exception e) {
+//				// TODO Auto-generated catch block
+//				org.txm.rcp.utils.Logger.printStackTrace(e);
+//			}
+//			org.txm.rcp.views.CorporaView.refresh();
+//
+//			System.out
+//					.println("preferences " + preferences.get(TBXPreferences.CQI_SERVER_PATH_TO_REGISTRY, null)); //$NON-NLS-1$
+//			System.out
+//					.println("preferences " + preferences.get(TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, null)); //$NON-NLS-1$
+//			System.out
+//					.println("preferences " + preferences.get(TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE, null)); //$NON-NLS-1$
+//		}
+
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/SetSearchEngine.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/PurgeCorpora.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/PurgeCorpora.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/PurgeCorpora.java	(revision 324)
@@ -0,0 +1,132 @@
+package org.txm.rcp.commands.workspace;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+
+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.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.ListSelectionDialog;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.objects.Workspace;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.commands.RestartTXM;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.CorpusManager;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.utils.DeleteDir;
+@Deprecated
+public class PurgeCorpora extends AbstractHandler {
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		Shell s = new Shell();
+		try {
+			List<MainCorpus> input = CorpusManager.getCorpusManager().getCorpora();
+			ListSelectionDialog corporaDialogs = new ListSelectionDialog(s, input,
+					new ArrayContentProvider(), new LabelProvider(), Messages.PurgeCorpora_0);
+
+			corporaDialogs.open();
+			Object[] toRemove = corporaDialogs.getResult();
+			System.out.println(Messages.PurgeCorpora_1+ Arrays.toString(toRemove));
+			if (toRemove.length == input.size()) {
+				deleteAll(s);
+			} else {
+				for(Object obj : corporaDialogs.getResult()) {
+					MainCorpus corpus = (MainCorpus) obj;
+					try {
+						corpus.delete();
+					} catch (Exception e) {
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					}
+				}
+				RestartTXM.reloadViews();
+			}
+		} catch (CqiClientException e1) {
+			System.out.println(Messages.PurgeCorpora_2+e1);
+			deleteAll(s);
+		}
+
+		return null;
+	}
+
+	public void deleteAll(Shell s) {
+
+		MessageBox messageBox = new MessageBox(s, SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+		messageBox.setMessage(Messages.PurgeCorpora_3);
+		int response = messageBox.open();
+		if (response != SWT.YES) {
+			StatusLine.setMessage(""); //$NON-NLS-1$
+			return;
+		}
+		
+		String path = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		if (path == null || path.trim().length() == 0) {
+			System.out.println(Messages.PurgeCorpora_4);
+			return;
+		}
+
+		final File workspace = new File(path);
+		if (workspace.exists()) {
+			JobHandler jobhandler = new JobHandler("Purging corpora...") { 
+				@Override
+				protected IStatus run(IProgressMonitor monitor) {
+					this.runInit(monitor);
+					try {
+						System.out.println(Messages.PurgeCorpora_5);
+						File corpora = new File(workspace, "corpora"); //$NON-NLS-1$
+						if (!DeleteDir.deleteDirectory(corpora)) {
+							System.out.println(Messages.PurgeCorpora_7);
+						}
+						corpora.mkdir();
+
+						File registry = new File(workspace, "registry"); //$NON-NLS-1$
+						if (!DeleteDir.deleteDirectory(registry)) {
+							System.out.println(Messages.PurgeCorpora_9);
+						}
+						registry.mkdir();
+						System.out.println(Messages.PurgeCorpora_10);
+						File xmlfile = new File(workspace, "workspaces/default.xml"); //$NON-NLS-1$
+						this.acquireSemaphore();
+						Toolbox.workspace = Workspace.createEmptyWorkspace(xmlfile);
+						this.releaseSemaphore();
+						
+						System.out.println(Messages.PurgeCorpora_12);
+
+						syncExec(new Runnable() {
+							@Override
+							public void run() {
+								RestartTXM.reloadViews();
+							}
+						});
+					} catch (ThreadDeath td) {
+						return Status.CANCEL_STATUS;
+					} catch (Exception e) {
+						System.out.println(NLS.bind(Messages.RunGroovyScript_8, e));
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					} finally {
+						monitor.done();
+					}
+
+					return Status.OK_STATUS;
+				}
+			};
+			jobhandler.startJob();
+		} else {
+			System.out.println(Messages.PurgeCorpora_13+workspace.getAbsolutePath());
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/PurgeCorpora.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveBase.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveBase.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveBase.java	(revision 324)
@@ -0,0 +1,69 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.workspace;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.objects.Base;
+import org.txm.rcp.views.BasesView;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RemoveBase.
+ */
+public class RemoveBase extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		System.out.println(""); //$NON-NLS-1$
+		Base p = null;
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection != null & selection instanceof IStructuredSelection) {
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			for (Iterator<Object> iterator = strucSelection.iterator(); iterator
+					.hasNext();) {
+				p = (Base) iterator.next();
+				break;
+			}
+		}
+
+		if (p != null)
+			p.getProject().removeBase(p.getName());
+
+		BasesView.refresh();
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/RemoveBase.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/queryview/Copy.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/queryview/Copy.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/queryview/Copy.java	(revision 324)
@@ -0,0 +1,86 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.queryview;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.objects.SavedQuery;
+import org.txm.rcp.utils.IOClipboard;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Copy.
+ */
+public class Copy extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		copy(selection);
+
+		return null;
+	}
+
+	/**
+	 * Copy.
+	 *
+	 * @param selection the selection
+	 */
+	public static void copy(IStructuredSelection selection)
+	{
+		String query = ""; //$NON-NLS-1$
+		List list = selection.toList();
+		if (list.size() > 1)
+		{
+			for(Object q : selection.toList())
+			{
+				if (q instanceof SavedQuery)
+				{
+					if (query.length() != 0)
+						query +=" | "; //$NON-NLS-1$
+					query += "("+((SavedQuery)q).getQuery().getQueryString()+")"; //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+		}
+		else
+		{
+			query = ((SavedQuery)selection.getFirstElement()).getQuery().getQueryString();
+		}
+		
+		IOClipboard.write(query);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/queryview/Copy.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/queryview/Paste.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/queryview/Paste.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/queryview/Paste.java	(revision 324)
@@ -0,0 +1,87 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.queryview;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.utils.IOClipboard;
+import org.txm.rcp.views.QueriesView;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Paste.
+ */
+public class Paste extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		if (selection.getFirstElement() instanceof Corpus)
+		{
+			Corpus c = (Corpus) selection.getFirstElement();
+			String from = IOClipboard.read();	
+			paste(c, from);
+		}
+		return null;
+	}
+	
+	/**
+	 * Paste.
+	 *
+	 * @param base the base
+	 * @param newquery the newquery
+	 */
+	public static void paste(Corpus corpus, String newquery)
+	{
+		corpus.addQueryLog(new Query(newquery), new ArrayList<String>());
+		QueriesView.refresh();
+	}
+	
+	/**
+	 * Paste.
+	 *
+	 * @param base the base
+	 */
+	public static void paste(Corpus corpus)
+	{
+		String newquery = IOClipboard.read();
+		corpus.addQueryLog(new Query(newquery), new ArrayList<String>());
+		QueriesView.refresh();
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/queryview/Paste.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenImportForm.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenImportForm.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenImportForm.java	(revision 324)
@@ -0,0 +1,77 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.txm.rcp.editors.imports.ImportFormEditor;
+import org.txm.rcp.editors.input.ImportFormEditorInput;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Open a file in the TxtEditor @ author mdecorde.
+ */
+public class OpenImportForm extends AbstractHandler {
+
+	/** The lastopenedfile. */
+	public static String lastopenedfile;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		String filename = event.getParameter("org.txm.rcp.commands.importscript"); //$NON-NLS-1$
+		openfile(filename);
+		return null;
+	}
+
+	/**
+	 * Openfile.
+	 *
+	 * @param filepath the filepath
+	 */
+	static public void openfile(String filepath) {
+		try {
+			ImportFormEditorInput editorInput = new ImportFormEditorInput(new File(filepath));
+			IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+			IWorkbenchPage page = window.getActivePage();
+			IEditorPart a = page.openEditor(editorInput, ImportFormEditor.ID, true);
+		} catch (Throwable e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenImportForm.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteLastGroovyScript.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteLastGroovyScript.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteLastGroovyScript.java	(revision 324)
@@ -0,0 +1,100 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * Handler: execute a Macro (Groovy script that opens an UI for parameters)
+ */
+public class ExecuteLastGroovyScript extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.ExecuteMacro"; //$NON-NLS-1$
+	public static File lastScript;
+	public static boolean macro = false;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		
+		execute(page, selection);
+		
+		return null;
+	}
+	
+	public static void setLastScript(File s, boolean b) {
+		lastScript = s;
+		macro = b;
+	}
+	
+	/**
+	 * Execute last Groovy script
+	 * 
+	 * @param page
+	 * @param selection
+	 */
+	public static void execute(IWorkbenchPart page, ISelection selection) {
+		if (lastScript == null) return; // no last script
+		if (macro)
+			System.out.println(Messages.ExecuteLastGroovyScript_0+lastScript);
+		else 
+			System.out.println(Messages.ExecuteLastGroovyScript_1+lastScript);
+		
+		//IPreferencesService service = Platform.getPreferencesService();
+		String scriptRootDir = Toolbox.getParam(TBXPreferences.USER_TXM_HOME) + "/scripts"; //$NON-NLS-1$
+		File currentRootDir;
+		if (macro) {
+			currentRootDir = new File(scriptRootDir, "macro"); //$NON-NLS-1$
+		} else {
+			currentRootDir = new File(scriptRootDir, "user"); //$NON-NLS-1$
+		}
+		
+		if (!currentRootDir.exists()) {
+			System.out.println(Messages.ExecuteLastGroovyScript_3+currentRootDir);
+			return;
+		}
+		
+		ExecuteGroovyScript.executeScript(currentRootDir, lastScript.getAbsolutePath(), page, selection, false);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteLastGroovyScript.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScriptFromFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScriptFromFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScriptFromFile.java	(revision 324)
@@ -0,0 +1,90 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Application;
+import org.txm.rcp.preferences.ScriptPreferenceInitializer;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.rcp.swt.dialog.LastOpened;
+/**
+ *  Ask the user to select a Groovy script using a File dialog and execute it
+ */
+public class ExecuteGroovyScriptFromFile extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.ExecuteGroovyScriptFromFile"; //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		// the file to execute
+		String result; //$NON-NLS-1$
+		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActivePart();
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+
+		IPreferencesService service = Platform.getPreferencesService();
+		String scriptCurrentDir = service.getString(Application.PLUGIN_ID,
+				ScriptPreferencePage.SCRIPT_ROOT_DIR,
+				ScriptPreferenceInitializer.SCRIPT_ROOT_DIR_DEFAULT,
+				null);
+
+		FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+
+		if (LastOpened.getFile(ID) != null) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+			dialog.setFileName(LastOpened.getFile(ID));
+		} else {
+			dialog.setFilterPath(scriptCurrentDir);
+		}
+
+		dialog.setFilterExtensions(new String[] { "*.groovy" }); //$NON-NLS-1$
+		dialog.setFilterPath(scriptCurrentDir);
+		result = dialog.open();
+		if (result == null) return null;
+		
+		LastOpened.set(ID, new File(result));
+		ExecuteGroovyScript.executeScript(result, page, selection);
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScriptFromFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteImportScript.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteImportScript.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteImportScript.java	(revision 324)
@@ -0,0 +1,334 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import groovy.lang.Binding;
+import groovy.lang.GroovyClassLoader;
+import groovy.util.GroovyScriptEngine;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.logging.Level;
+
+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.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.importer.ImportKeys;
+import org.txm.objects.Base;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.commands.workspace.LoadBinaryCorpus;
+import org.txm.rcp.preferences.ScriptPreferenceInitializer;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.rcp.utils.GSERunner;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.tokenizer.TokenizerClasses;
+import org.txm.utils.BundleUtils;
+import org.txm.utils.DeleteDir;
+import org.txm.utils.ExecTimer;
+import org.txm.utils.logger.Log;
+import org.w3c.dom.Element;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Execute an import module (Groovy script).
+ * Binds parameters to the script :
+ * paramsBinding: parameter file
+ * monitor= the job	
+ * debug=true|false
+ * readyToLoad=tested after the script. If true then the process went OK. 
+ *
+ * @author mdecorde
+ */
+public class ExecuteImportScript extends AbstractHandler {
+
+	/** The lastopenedbase. */
+	public static File lastopenedbase;
+	protected static GroovyScriptEngine gse;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		String filename = null, filepath = null;
+		if (event.getParameters().containsKey("org.txm.rcp.commands.commandParameter3")) {
+			filename = event.getParameter("org.txm.rcp.commands.commandParameter3"); //$NON-NLS-1$
+			filepath = "scripts/import/" + filename; //$NON-NLS-1$
+		} else {
+			Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+			FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+			dialog.setFilterPath(Toolbox.getParam(TBXPreferences.USER_TXM_HOME)+"/scripts/import");
+			filepath = dialog.open();
+		}
+		
+		if (filepath == null) return null;
+		
+		OpenImportForm.openfile(filepath);
+		return null;
+	}
+
+
+	public static JobHandler executeScript(String scriptFilePath,
+			File paramFile) {
+		BaseParameters params = null;
+		try {
+			params = new BaseParameters(paramFile);
+		} catch (Exception e1) {
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
+			System.out.println("Error while reading import parameters from: "+paramFile);
+			return null;
+		}
+		return executeScript(scriptFilePath, params);
+	}
+
+	/**
+	 * 
+	 * @param scriptFilePath 
+	 * @param params
+	 * @return
+	 */
+	public static JobHandler executeScript(final String scriptFilePath, BaseParameters params) {
+
+		final File script = new File(scriptFilePath);
+		getImportScriptFromToolboxPlugin(script); // if the file is missing or older than the Toolbox jar script
+
+		// We could not found the script in the Toolbox plugin files
+		if (!script.exists()) {
+			System.err.println(NLS.bind(Messages.ExecuteScriptImport_1, scriptFilePath));
+			return null;
+		}
+
+		Display.getDefault().syncExec(new Runnable() {
+			public void run() {	StatusLine.setMessage(Messages.ExecuteScriptImport_0); }
+		});
+
+		final String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		final File corporadir = new File(txmhome,"corpora"); //$NON-NLS-1$
+		corporadir.mkdir(); // the binary corpus are stored here
+		if (!corporadir.exists()) {
+			System.out.println(Messages.ExecuteScriptImport_2+corporadir);
+			Log.severe(Messages.ExecuteScriptImport_2+corporadir);
+			return null;
+		}
+
+		// groovy configuration
+		IPreferencesService service = Platform.getPreferencesService();
+		String scriptRootDir = service.getString(Application.PLUGIN_ID,
+				ScriptPreferencePage.SCRIPT_ROOT_DIR,
+				ScriptPreferenceInitializer.SCRIPT_ROOT_DIR_DEFAULT, null);
+		
+//		ClassLoader parent = ExecuteImportScript.class.getClassLoader();
+//		final GroovyClassLoader loader = new GroovyClassLoader(parent);
+		
+		
+		final String[] roots = new String[] { 
+				script.getParent(),
+				scriptRootDir };
+		
+		
+		params.load(); // reload params
+
+		// the binary directory which is going to be created
+
+		final File basedir = new File(corporadir, params.name);
+		final File tempBinDirectory = new File(basedir.getAbsolutePath()+"_temp"); //$NON-NLS-1$
+		final File errorBinDirectory = new File(basedir.getAbsolutePath()+"_error"); //$NON-NLS-1$
+		if (tempBinDirectory.exists()) DeleteDir.deleteDirectory(tempBinDirectory);
+		if (errorBinDirectory.exists()) DeleteDir.deleteDirectory(errorBinDirectory);
+
+		boolean updatingCorpus = "true".equals(params.getKeyValueParameters().get(ImportKeys.UPDATECORPUS));
+		if (!updatingCorpus) { 
+			if (basedir.exists()) {
+				Shell shell = new Shell(); // ask user if he's sure
+				boolean b = MessageDialog.openConfirm(shell, Messages.AddBase_19, NLS.bind(Messages.AddBase_20, basedir.getName().toUpperCase()));
+				if (b) {
+					// shutdown TBX (and cwb) to free index files
+					Toolbox.shutdownSearchEngine();
+					//DeleteDir.deleteDirectory(basedir);
+					basedir.renameTo(tempBinDirectory);
+				} else {
+					return null;
+				}
+			}
+			if (basedir.exists()) {
+				System.out.println(Messages.bind(Messages.ExecuteScriptImport_3, basedir));
+				return null;
+			}
+		}
+		
+		if (Toolbox.isSearchEngineInitialized()) Toolbox.shutdownSearchEngine();
+		final BaseParameters p = params;
+		JobHandler jobhandler = new JobHandler(Messages.RunGroovyScript_0
+				+ script.getAbsolutePath()) { //$NON-NLS-1$
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				Base base = null;
+				try {
+					//this.setCurrentMonitor(monitor);
+					monitor.beginTask(Messages.RunGroovyScript_10 + p.rootDir, 100); //$NON-NLS-1$
+
+					//org.txm.Toolbox.shutdownSearchEngine();
+					monitor.worked(5);
+
+					if (ExecuteImportScript.gse == null)	{
+						ExecuteImportScript.gse = GSERunner.createGSERunner(roots);
+					}
+
+					Binding binding = new Binding();
+					binding.setProperty("paramsBinding", p); //$NON-NLS-1$
+					binding.setProperty("monitor", this); //$NON-NLS-1$
+
+					boolean logLevel = Log.getLevel().intValue() < Level.WARNING.intValue();			
+					binding.setProperty("debug", logLevel); //$NON-NLS-1$
+					binding.setProperty("readyToLoad", Boolean.FALSE); //$NON-NLS-1$
+
+					Element corpusElem = p.corpora.get(p.getCorpusName());
+					Element tokenizerElement = p.getTokenizerElement(corpusElem);
+					TokenizerClasses.reset();
+					if (!TokenizerClasses.loadFromNode(tokenizerElement)) {
+						System.out.println(Messages.ExecuteScriptImport_5);
+						monitor.done();
+						if (basedir.exists()) basedir.renameTo(errorBinDirectory);
+						if (tempBinDirectory.exists()) tempBinDirectory.renameTo(basedir);
+						return Status.CANCEL_STATUS;
+					}
+
+					ExecTimer.start();
+					Log.info(Messages.RunGroovyScript_0 + script.getAbsolutePath()); //$NON-NLS-1$
+					gse.run(script.getName(), binding); // run the groovy import script
+					System.out.println("\n"+Messages.ExecuteScriptImport_7+ExecTimer.stop()); //$NON-NLS-1$
+					monitor.worked(90);
+					
+					TokenizerClasses.reset();
+
+					Object ready = binding.getVariable("readyToLoad"); //$NON-NLS-1$
+					if (ready != null && ready instanceof Boolean) {
+						Boolean readyToLoad = (Boolean)ready;
+						//System.out.println("TRY TO LOAD THE BINARY CORPUS CREATED: "+basedir);
+						if (readyToLoad) {
+							base = LoadBinaryCorpus.loadBinaryCorpus(basedir);
+							if (base == null) {
+								System.out.println(Messages.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("Restart Toolbox search engine"); //$NON-NLS-1$
+							Toolbox.restartSearchEngine();
+							final Base base2 = base;
+							syncExec(new Runnable() {
+								@Override
+								public void run() {
+									RestartTXM.reloadViews();
+									CorporaView.select(new ArrayList<MainCorpus>(base2.getCorpora().values()));
+									System.out.println(Messages.AddBase_10);
+									StatusLine.setMessage(Messages.AddBase_10);
+								}
+							});
+							this.releaseSemaphore();
+
+							DeleteDir.deleteDirectory(tempBinDirectory);
+						} else {
+							System.out.println(Messages.ExecuteScriptImport_6);
+							if (basedir.exists()) basedir.renameTo(errorBinDirectory);
+							if (tempBinDirectory.exists()) tempBinDirectory.renameTo(basedir);
+						}
+					}
+				} catch (ThreadDeath td) {
+					return Status.CANCEL_STATUS;
+				} catch (Exception e) {
+					System.out.println(NLS.bind(Messages.RunGroovyScript_8, e));
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				} finally {
+					if (!Toolbox.isSearchEngineInitialized()) { // the import failed
+						monitor.setTaskName("Restarting Toolbox search engine"); //$NON-NLS-1$
+						Toolbox.restartSearchEngine();
+						
+						syncExec(new Runnable() {
+							@Override
+							public void run() {
+								RestartTXM.reloadViews();
+							}
+						});
+					}
+					
+					monitor.done();
+				}
+				System.gc();
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob(true);
+		return jobhandler;
+	}
+	
+	/**
+	 * Allow to retrieve an import script from the Toolbox plugin.
+	 * 
+	 * If TXM is run from Eclipse, then the file is copyied, else it is extracted from TXM installation directory
+	 * 
+	 * @param script the import script Loader to retrieve
+	 * @return
+	 */
+	public static boolean getImportScriptFromToolboxPlugin(File script) {
+		Log.info("Retriving "+script+" from Toolbox plugin if script.date < toolbox_script.date");
+		
+		// retrieve the script relative path "quickLoader" -> "quick"
+		String scriptPackage = script.getName();
+		int idx = scriptPackage.indexOf("Loader");
+		scriptPackage = "org/txm/importer/" + scriptPackage.substring(0, idx);
+		
+		return BundleUtils.replaceFilesIfNewer("org.txm.core", "src/groovy", scriptPackage, 
+				script.getName(), script);
+	}
+}
+

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteImportScript.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenLocalizedWebPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenLocalizedWebPage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenLocalizedWebPage.java	(revision 324)
@@ -0,0 +1,159 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Locale;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.txm.rcp.Activator;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.LocalePreferencePage;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Open the internal browser of TXM with a file
+ * 
+ * @author mdecorde.
+ */
+public class OpenLocalizedWebPage extends AbstractHandler {
+
+	/** The Constant ID. */
+	public final static String ID = "org.txm.rcp.commands.OpenLocalizedWebPage"; //$NON-NLS-1$
+
+	public static final String URL_SFWEB = "http://txm.sourceforge.net";
+	public static final String URL_SFFILES = "https://sourceforge.net/projects/txm";
+	
+	public static final String TEXTOMETRIE = "textometrie"; //$NON-NLS-1$
+	public static final String TEXTOMETRIE_DOCS = "textometrie_docs"; //$NON-NLS-1$
+	public static final String SF = "sf"; //$NON-NLS-1$
+	public static final String SF_DOCS = "sf_docs"; //$NON-NLS-1$
+	public static final String TREETAGGER = "treetagger"; //$NON-NLS-1$
+	public static final String REFMAN = "refman"; //$NON-NLS-1$
+	public static final String PDFREFMAN = "pdfrefman"; //$NON-NLS-1$
+	public static final String BUG = "bug"; //$NON-NLS-1$
+	public static final String FEATURE = "feature"; //$NON-NLS-1$
+	public static final String MAILINGLIST = "mailinglist"; //$NON-NLS-1$
+	public static final String FAQ = "faq"; //$NON-NLS-1$
+	public static final String CONTRIB = "contrib"; //$NON-NLS-1$
+	public static final String TXMUSERS = "txm-users wiki"; //$NON-NLS-1$
+	public static final String MACROS = "macros"; //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		String key = event
+				.getParameter("org.txm.rcp.commands.commandParameter3"); //$NON-NLS-1$
+		if (key != null && key.trim().length() > 0) {
+			openfile(key);
+			return null;
+		}
+
+		return null;
+	}
+	
+	static public String getValidURL(String urltoTest, String safeUrl) {
+		try {
+			URL url = new URL(urltoTest);
+			try {
+				url.openStream().close();
+			} catch (IOException e) {
+				Log.info(e.getMessage());
+				Log.printStackTrace(e);
+				return safeUrl;
+			}
+		} catch (MalformedURLException e) {
+			Log.severe(e.getMessage());
+			Log.printStackTrace(e);
+		}
+		return urltoTest;
+	}
+
+	/**
+	 * Openfile.
+	 *
+	 * @param filepath the filepath
+	 * @return the txm browser
+	 */
+	static public Object openfile(String key) {
+		
+		String version = Platform.getBundle(Activator.PLUGIN_ID).getVersion().toString();
+		int idx = version.lastIndexOf("."); //$NON-NLS-1$
+		if (idx > 0) version = version.substring(0, idx); // remove the "qualifier" part
+		
+		String locale = Locale.getDefault().getLanguage();
+		
+		if (TEXTOMETRIE.equals(key)) {
+			return OpenBrowser.openfile(getValidURL("http://textometrie.ens-lyon.fr/?lang="+locale, "http://textometrie.ens-lyon.fr/?lang=en")); //$NON-NLS-1$
+		} else if (FAQ.equals(key)) {
+			return OpenBrowser.openfile("https://groupes.renater.fr/wiki/txm-users/public/faq"); //$NON-NLS-1$
+		} else if (CONTRIB.equals(key)) {
+			return OpenBrowser.openfile("https://groupes.renater.fr/wiki/txm-users/public/contribuer"); //$NON-NLS-1$
+		} else if (SF_DOCS.equals(key)) {
+			return OpenBrowser.openfile(URL_SFFILES+"/files/documentation"); //$NON-NLS-1$
+		} else if (SF.equals(key)) {
+			return OpenBrowser.openfile(URL_SFFILES); //$NON-NLS-1$
+		} else if (TEXTOMETRIE_DOCS.equals(key)) {
+			return OpenBrowser.openfile(getValidURL("http://textometrie.ens-lyon.fr/spip.php?rubrique85&lang="+locale, "http://textometrie.ens-lyon.fr/spip.php?rubrique85&lang=en")); //$NON-NLS-1$
+		} else if (TREETAGGER.equals(key)) {
+			return OpenBrowser.openfile(getValidURL(URL_SFWEB+"/doc/treetagger/"+locale+"/install.html", URL_SFWEB+"/doc/treetagger/en/install.html")); //$NON-NLS-1$ //$NON-NLS-2$
+		} else if (REFMAN.equals(key)) {
+			return OpenBrowser.openfile(getValidURL(URL_SFWEB+"/doc/manual/"+version+"/"+locale+"/manual1.xhtml", URL_SFWEB+"/doc/manual/"+version+"/en/manual1.xhtml")); //$NON-NLS-1$
+		} else if (PDFREFMAN.equals(key)) {
+			return OpenBrowser.openfile(URL_SFFILES+"/files/documentation/Manuel%20de%20TXM%200.7%20FR.pdf/download"); //$NON-NLS-1$ 
+		} else if (BUG.equals(key)) {
+			if (locale.equals("fr")) { //$NON-NLS-1$
+				return OpenBrowser.openfile("https://groupes.renater.fr/wiki/txm-users/public/retours_de_bugs_logiciel"); //$NON-NLS-1$
+			} else {
+				return OpenBrowser.openfile("https://sourceforge.net/p/txm/feature-requests/?source=navbar"); //$NON-NLS-1$
+			}
+		} else if (FEATURE.equals(key)) {
+			if (locale.equals("fr")) { //$NON-NLS-1$
+				return OpenBrowser.openfile("https://groupes.renater.fr/wiki/txm-users/public/demande_de_fonctionnalites"); //$NON-NLS-1$
+			} else {
+				return OpenBrowser.openfile("http://sourceforge.net/tracker/?group_id=247041&atid=1190851"); //$NON-NLS-1$
+			}
+		} else if (MAILINGLIST.equals(key)) {
+			return OpenBrowser.openfile("https://groupes.renater.fr/sympa/subscribe/txm-users"); //$NON-NLS-1$
+		} else if (MACROS.equals(key)) {
+			return OpenBrowser.openfile("https://groupes.renater.fr/wiki/txm-users/public/macros"); //$NON-NLS-1$
+		} else if (TXMUSERS.equals(key)) {
+			return OpenBrowser.openfile("https://groupes.renater.fr/wiki/txm-users"); //$NON-NLS-1$
+		} else { // no key associated, key is an URL
+			return OpenBrowser.openfile(key); //$NON-NLS-1$
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenLocalizedWebPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenGraph.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenGraph.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenGraph.java	(revision 324)
@@ -0,0 +1,201 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+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.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.SVGGraphicEditor;
+import org.txm.rcp.editors.TXMWebBrowserEditor;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.OpenURI;
+// TODO: Auto-generated Javadoc
+/**
+ * Open the graphics editor. It can open SVN, PNG, etc depending on the Device given.
+ */
+@Deprecated
+// FIXME: to move to org.txm.chartsengine.svgbatik.rcp
+public class OpenGraph extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.OpenGraph"; //$NON-NLS-1$
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		String svgFile = ""; //$NON-NLS-1$
+		File file = null;
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+
+		if (file == null || file.isDirectory()) {
+			FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+			if (LastOpened.getFile(ID) != null) {
+				dialog.setFilterPath(LastOpened.getFolder(ID));
+				dialog.setFileName(LastOpened.getFile(ID));
+			}
+			if (dialog.open() == null) return null;
+			svgFile = dialog.getFilterPath() + "/" + dialog.getFileName(); //$NON-NLS-1$
+			LastOpened.set(ID, dialog.getFilterPath(), dialog.getFileName());
+			OpenFile(svgFile);
+		}
+
+		return null;
+	}
+
+	/**
+	 * Open file.
+	 *
+	 * @param filepath the filepath
+	 * @return the i editor part
+	 */
+	public static IEditorPart OpenFile(String filepath) {
+		return OpenFile(filepath, new File(filepath).getName());
+	}
+
+	/**
+	 * Open file.
+	 *
+	 * @param file the file
+	 * @return the i editor part
+	 */
+	public static IEditorPart OpenFile(File file) {
+		return OpenFile(file.getAbsolutePath(), file.getName());
+	}
+
+	/**
+	 * Open file.
+	 *
+	 * @param filepath the filepath
+	 * @param device the device
+	 * @return the i editor part
+	 */
+//	@Deprecated
+//	// FIXME: this method is R charts engine dependent. But it seems to no be used so we may remove it
+//	public static IEditorPart OpenFile(String filepath, RDevice device) {
+//		return OpenFile(filepath, new File(filepath).getName(), device, null);
+//	}
+//
+//	/**
+//	 * Open file.
+//	 *
+//	 * @param file the file
+//	 * @param device the device
+//	 * @return the i editor part
+//	 */
+//	@Deprecated
+//	// FIXME: this method is R charts engine dependent. But it seems to no be used so we may remove it
+//	public static IEditorPart OpenFile(File file, RDevice device) {
+//		return OpenFile(file.getAbsolutePath(), file.getName(), device, null);
+//	}
+
+	/**
+	 * Open file.
+	 *
+	 * @param filepath the filepath
+	 * @param editorname the editorname
+	 * @return the i editor part
+	 */
+	public static IEditorPart OpenFile(String filepath, String editorname) {
+		File graphfile = new File(filepath);
+		if (filepath.endsWith(".svg") || filepath.endsWith(".SVG")) //$NON-NLS-1$ //$NON-NLS-2$
+		{
+			return OpenSVGGraph.OpenSVGFile(filepath, editorname);
+		}
+		else if (filepath.endsWith(".png") || filepath.endsWith(".PNG") ||  //$NON-NLS-1$ //$NON-NLS-2$
+				filepath.endsWith(".jpg") || filepath.endsWith(".JPG") ||  //$NON-NLS-1$ //$NON-NLS-2$
+				filepath.endsWith(".jpeg") || filepath.endsWith(".JPEG")) //$NON-NLS-1$ //$NON-NLS-2$
+		{
+			return OpenBrowser.openfile(graphfile.getAbsolutePath());
+		}
+		else
+		{
+			if (!OpenURI.open(graphfile))
+				System.out.println(NLS.bind(Messages.OpenGraph_8, graphfile.getAbsolutePath()));
+			return null;
+		}
+	}
+
+	/**
+	 * Open file.
+	 *
+	 * @param filepath the filepath
+	 * @param editorname the editorname
+	 * @param device the device
+	 * @param image the image
+	 * @return the i editor part
+	 */
+//	@Deprecated
+	// FIXME: this method is R charts engine dependent. But it seems to no be used so we may remove it
+//	public static IEditorPart OpenFile(String filepath, String editorname, RDevice device, String image) {
+//		File graphfile = new File(filepath);
+//		if (device.equals(RDevice.SVG)) {
+//			SVGGraphicEditor editor = OpenSVGGraph.OpenSVGFile(filepath, editorname);
+//			if (image != null && IImageKeys.getImage(image) != null)
+//				editor.setIcon(IImageKeys.getImage(image));
+//			return editor;
+//		} else if (device.equals(RDevice.PNG) || device.equals(RDevice.JPEG)) {
+//			TXMWebBrowserEditor editor = OpenBrowser.openfile(graphfile.getAbsolutePath(), editorname);
+//			if (image != null && IImageKeys.getImage(image) != null)
+//				editor.setTitleImage(IImageKeys.getImage(image));
+//			return editor;
+//		} else {
+//			if (!OpenURI.open(graphfile))
+//				System.out.println(NLS.bind(Messages.OpenGraph_8, graphfile.getAbsolutePath()));
+//			return null;
+//		}
+//
+//	}
+
+	/**
+	 * Open file.
+	 *
+	 * @param file the file
+	 * @param device the device
+	 * @param name the name
+	 * @param image the image
+	 * @return the i editor part
+	 */
+//	@Deprecated
+	// FIXME: this method is R charts engine dependent. But it seems to no be used so we may remove it
+//	public static IEditorPart OpenFile(File file, RDevice device, String name, String image) {
+//		return OpenFile(file.getAbsolutePath(), name, device, image);
+//	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenGraph.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteScript.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteScript.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteScript.java	(revision 324)
@@ -0,0 +1,201 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.rcp.preferences.ScriptPreferenceInitializer;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.statsengine.r.rcp.handlers.ExecuteRScript;
+// TODO: Auto-generated Javadoc
+/**
+ * Execute a script. It uses the file extension to execute it as Groovy or R
+ * 
+ * Later : use shabang
+ */
+public class ExecuteScript extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.ExecuteScript"; //$NON-NLS-1$
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		// the file to execute
+		String result = ""; //$NON-NLS-1$
+		boolean executionFromEditor = false;
+		TxtEditor txteditor = null;
+		
+		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (page != null && page instanceof TxtEditor) {
+			txteditor = (TxtEditor) page;
+			selection = HandlerUtil.getActiveWorkbenchWindow(event)
+					.getActivePage().getSelection();
+			FileStoreEditorInput input = (FileStoreEditorInput) txteditor
+					.getEditorInput();
+
+			File f = new File(input.getURI().getPath());
+			result = f.getAbsolutePath();
+			executionFromEditor = true;
+		} else if (selection != null
+				& selection instanceof IStructuredSelection) {
+			File file = null;
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			for (Iterator<Object> iterator = strucSelection.iterator(); iterator
+					.hasNext();) {
+				file = (File) iterator.next();
+				result = file.getAbsolutePath();
+				break;
+			}
+		}
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		// no file found, ask user
+		if (result == "") //$NON-NLS-1$
+		{
+			FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+			if (LastOpened.getFile(ID) != null) {
+				dialog.setFilterPath(LastOpened.getFolder(ID));
+				dialog.setFileName(LastOpened.getFile(ID));
+			}
+			dialog.setFilterExtensions(new String[] { "*.groovy" }); //$NON-NLS-1$
+
+			IPreferencesService service = Platform.getPreferencesService();
+			String scriptCurrentDir = service.getString(Application.PLUGIN_ID,
+					ScriptPreferencePage.SCRIPT_CURRENT_DIR,
+					ScriptPreferenceInitializer.SCRIPT_CURRENT_DIR_DEFAULT,
+					null);
+
+			dialog.setFilterPath(scriptCurrentDir);
+			result = dialog.open();
+			if (result == null) return null;
+			LastOpened.set(ID, new File(result));
+		}
+
+		if (executionFromEditor && txteditor != null) { // save file if needed 
+			if (txteditor.isSaveOnCloseNeeded()) { // check if file need to be saved
+				boolean doit = TxmPreferences.getBoolean(ScriptPreferencePage.SAVE_BEFORE_EXECUTION, false);
+				//System.out.println("Save file? "+doit);
+				if (!doit) { // ask user
+					MessageDialog dialog = new MessageDialog(shell, Messages.ExecuteScript_0+result, null,
+							Messages.ExecuteScript_1, MessageDialog.QUESTION, new String[] {Messages.ExecuteScript_2, Messages.ExecuteScript_4,
+							Messages.ExecuteScript_5}, 0) {
+						Button checkDefault;
+						 @Override
+						  protected Control createDialogArea(Composite parent) {
+						    Composite container = (Composite) super.createDialogArea(parent);
+						    checkDefault = new Button(container, SWT.CHECK);
+						    checkDefault.setText(Messages.ExecuteScript_6);
+						    boolean b = TxmPreferences.getBoolean(ScriptPreferencePage.SAVE_BEFORE_EXECUTION, false);
+						    checkDefault.setSelection(b);
+						    
+						    checkDefault.addSelectionListener(new SelectionListener() {
+								
+								@Override
+								public void widgetSelected(SelectionEvent e) {
+									boolean b = checkDefault.getSelection();
+									TxmPreferences.set(ScriptPreferencePage.SAVE_BEFORE_EXECUTION, b);
+								}
+								
+								@Override
+								public void widgetDefaultSelected(SelectionEvent e) { }
+							});
+						    return container;
+						  }
+					};
+					int c = dialog.open();
+					if (c == 1) {
+						System.out.println(Messages.ExecuteScript_7);
+						return null;
+					} else if (c == 2) {
+						//System.out.println("Don't save and run.");
+						doit = false;
+					} else if (c == 0)  {
+						//System.out.println("Save and run.");
+						doit = true;
+					}
+				}
+
+				if (doit) {
+					//System.out.println("Saving file...");
+					txteditor.doSave(null);
+				}
+			}
+		}
+
+		executeScript(result, page, selection);
+		return null;
+	}
+
+	/**
+	 * Execute script.
+	 *
+	 * @param scriptpath the scriptfile
+	 */
+	public void executeScript(String scriptpath, final  IWorkbenchPart page, final ISelection selection) {
+		if (scriptpath == null) return;
+		File script = new File(scriptpath);
+		if (!script.exists()) return;
+
+		if (script.getName().endsWith(".groovy")) { //$NON-NLS-1$
+			ExecuteGroovyScript.executeScript(scriptpath, page, selection);
+		} else if (script.getName().endsWith(".R")) { //$NON-NLS-1$
+			ExecuteRScript.executeScript(scriptpath);
+		} else {
+			System.out.println(Messages.ExecuteScript_3+script.getName());
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteScript.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Copy.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Copy.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Copy.java	(revision 324)
@@ -0,0 +1,79 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.krview;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.annotation.repository.AnnotationType;
+import org.txm.annotation.repository.SQLKnowledgeRepository;
+import org.txm.annotation.repository.TypedValue;
+import org.txm.rcp.utils.IOClipboard;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Copy KnowledgeRepository or AnnotationType toString() in clipboard
+ */
+public class Copy extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+//		System.out.println("Copy: "+selection);
+		copy(selection);
+
+		return null;
+	}
+
+	/**
+	 * Copy.
+	 *
+	 * @param selection the selection
+	 */
+	public static void copy(IStructuredSelection selection)
+	{
+		Object selectedItem = selection.getFirstElement();
+		
+		String text = null;
+		if (selectedItem instanceof SQLKnowledgeRepository) {
+			text = ((SQLKnowledgeRepository)selectedItem).toHumanString();
+		} else if (selectedItem instanceof AnnotationType) {
+			text = ((AnnotationType)selectedItem).toHumanString();
+		} else if (selectedItem instanceof TypedValue) {
+			text = ((TypedValue)selectedItem).toHumanString();
+		}
+		if (text != null) {
+			IOClipboard.write(text);
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Copy.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Delete.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Delete.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Delete.java	(revision 324)
@@ -0,0 +1,150 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.krview;
+
+import java.util.ArrayList;
+import java.util.List;
+
+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.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.annotation.repository.AnnotationType;
+import org.txm.annotation.repository.KnowledgeRepository;
+import org.txm.annotation.repository.KnowledgeRepositoryManager;
+import org.txm.annotation.repository.LocalKnowledgeRepository;
+import org.txm.annotation.repository.SQLKnowledgeRepository;
+import org.txm.annotation.repository.TypedValue;
+import org.txm.functions.concordances.Line;
+import org.txm.rcp.Messages;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.fileexplorer.Explorer;
+import org.txm.rcp.views.knowledgerepositories.KRView;
+import org.txm.searchengine.cqp.corpus.query.Match;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Copy KnowledgeRepository or AnnotationType toString() in clipboard
+ */
+public class Delete extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+//		System.out.println("Delete: "+selection);
+		delete(selection);
+
+		return null;
+	}
+
+	/**
+	 * Copy.
+	 *
+	 * @param selection the selection
+	 */
+	public static void delete(IStructuredSelection selection)
+	{
+		Object selectedItem = selection.getFirstElement();
+
+		if (selectedItem instanceof SQLKnowledgeRepository) {
+
+		} else if (selectedItem instanceof LocalKnowledgeRepository) {
+			LocalKnowledgeRepository kr = ((LocalKnowledgeRepository)selectedItem);
+			System.out.println("Delete a LocalKnowledgeRepository...");
+			
+			//TODO: confirm message dialog to generate
+			//KnowledgeRepositoryManager.deleteKnowledgeRepository(kr);
+			//KRView.refresh();
+			
+		} else if (selectedItem instanceof AnnotationType) {
+			final AnnotationType t = ((AnnotationType)selectedItem);
+			KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(t.getKnowledgeRepository());
+			
+			if (kr instanceof LocalKnowledgeRepository) {
+				final LocalKnowledgeRepository lkr = ((LocalKnowledgeRepository)kr);
+				System.out.println("Delete an AnnotationType...");
+				
+				/*JobHandler job = new JobHandler("Deleting all annotations for type : "+t) {
+					@Override
+					protected IStatus run(IProgressMonitor monitor) {
+						this.setCurrentMonitor(monitor);
+						try {*/
+							lkr.deleteType(t);
+							//TODO: For each corpus, get AnnotationManager and deleteAnnotations
+							//annotManager.deleteAnnotations(t, job);
+						/*} catch(Exception e) {
+							Log.severe("Error while deleting annotations "+e);
+							Log.printStackTrace(e);
+							return Status.CANCEL_STATUS;
+						}
+						return Status.OK_STATUS;
+					}
+				};
+				job.schedule();*/
+				
+				
+				//TODO: must delete corpus possible annotations
+				KRView.refresh();
+			}
+		} else if (selectedItem instanceof TypedValue) {
+			TypedValue v = (TypedValue) selectedItem;
+			TreeViewer tree = KRView.getTree();
+			
+			if (tree != null) {
+				TreeItem[] selItems = tree.getTree().getSelection();
+				if (selItems.length == 0) return;
+				TreeItem first = selItems[0];
+				Object o = first.getData();
+				if (o instanceof TypedValue) {
+					TypedValue selectedTypedValue = (TypedValue)o;
+					if (selectedTypedValue.getId().equals(v.getId())) {
+						TreeItem parentTreeItem = first.getParentItem();
+						Object o2 = parentTreeItem.getData();
+						if (o2 instanceof AnnotationType) {
+							AnnotationType t = (AnnotationType)o2;
+							KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(t.getKnowledgeRepository());
+							kr.deleteValue(v);
+							tree.refresh();
+						}
+					}
+				}
+			}
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Delete.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Reload.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Reload.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Reload.java	(revision 324)
@@ -0,0 +1,68 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.krview;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.annotation.repository.KnowledgeRepository;
+import org.txm.rcp.views.knowledgerepositories.KRView;
+
+/**
+ * Reloads a KnowledgeRepository
+ */
+public class Reload extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+//		System.out.println("Reload: "+selection);
+		reload(selection);
+
+		return null;
+	}
+
+	/**
+	 * Copy.
+	 *
+	 * @param selection the selection
+	 */
+	public static void reload(IStructuredSelection selection)
+	{
+		Object selectedItem = selection.getFirstElement();
+		if (selectedItem instanceof KnowledgeRepository) {
+			((KnowledgeRepository)selectedItem).reload();
+			KRView.refresh();
+		}
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Reload.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Add.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Add.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Add.java	(revision 324)
@@ -0,0 +1,126 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.krview;
+
+import java.io.File;
+
+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.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.annotation.repository.AnnotationType;
+import org.txm.annotation.repository.KnowledgeRepository;
+import org.txm.annotation.repository.KnowledgeRepositoryManager;
+import org.txm.annotation.repository.LocalKnowledgeRepository;
+import org.txm.annotation.repository.SQLKnowledgeRepository;
+import org.txm.annotation.repository.TypedValue;
+import org.txm.rcp.views.knowledgerepositories.KRView;
+import org.txm.utils.AsciiUtils;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Copy KnowledgeRepository or AnnotationType toString() in clipboard
+ */
+public class Add extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+//		System.out.println("Add: "+selection);
+		add(selection);
+
+		return null;
+	}
+
+	/**
+	 * Copy.
+	 *
+	 * @param selection the selection
+	 */
+	public static void add(IStructuredSelection selection)
+	{
+		Object selectedItem = selection.getFirstElement();
+		if (selectedItem instanceof SQLKnowledgeRepository) {
+
+		} else if (selectedItem instanceof LocalKnowledgeRepository) {
+			LocalKnowledgeRepository kr = ((LocalKnowledgeRepository)selectedItem);
+			Shell shell = Display.getDefault().getActiveShell();
+			InputDialog dialog = new InputDialog(shell, "Type name", "Please enter the new type name", "", null);
+			if (dialog.open() == InputDialog.OK) {
+				String name = dialog.getValue();
+				String id = AsciiUtils.buildId(name);
+				
+				//Generate an URL page 
+				//String pathFile = KnowledgeRepositoryManager.generateLocalURLPage(kr.getName(), name, id);
+				String pathFile = null; //@TODO build page for type or KR will be done in another version (after 0.7.8)
+				//System.out.println("URL for new type : "+pathFile);
+				AnnotationType at = kr.addType(name, id, pathFile);
+				KRView.refresh();
+				//kr.add(at);
+			} else {
+				System.out.println("Creation aborted.");
+			}
+		} else if (selectedItem instanceof AnnotationType) {
+			AnnotationType t = ((AnnotationType)selectedItem);
+
+			String krname = t.getKnowledgeRepository();
+			
+			KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(krname);
+			if (kr instanceof LocalKnowledgeRepository) {
+				LocalKnowledgeRepository lkr = ((LocalKnowledgeRepository)kr);
+				System.out.println("Add a value...");
+				Shell shell = Display.getDefault().getActiveShell();
+				InputDialog dialog = new InputDialog(shell, "Value name", "Please enter the new value name", "", null);
+				if (dialog.open() == InputDialog.OK) {
+					String name = dialog.getValue();
+					String id = name;
+					/*String baseid = AsciiUtils.buildId(name);
+					String id = AsciiUtils.buildId(name);
+					int c = 1;
+					while (kr.getValue(t, id) != null) {
+						id = baseid+"_"+(c++);
+					}*/
+					TypedValue val = lkr.addValue(name, id, t.getId());
+					//t.addTypedValue(val);
+					KnowledgeRepositoryManager.generateLocalURLPage(lkr.getName(), t.getName(), t.getId());
+					KRView.refresh();
+				}
+			}
+		} else if (selectedItem instanceof TypedValue) {
+		
+
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Add.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Informations.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Informations.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Informations.java	(revision 324)
@@ -0,0 +1,85 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.krview;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.annotation.repository.AnnotationType;
+import org.txm.annotation.repository.LocalKnowledgeRepository;
+import org.txm.annotation.repository.SQLKnowledgeRepository;
+import org.txm.annotation.repository.TypedValue;
+import org.txm.rcp.commands.OpenLocalizedWebPage;
+
+/**
+ * Shows a web page displaying informations about the current selection
+ */
+public class Informations extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+//		System.out.println("Informations: "+selection);
+		show(selection);
+
+		return null;
+	}
+
+	/**
+	 * Copy.
+	 *
+	 * @param selection the selection
+	 */
+	public static void show(IStructuredSelection selection)
+	{
+		Object selectedItem = selection.getFirstElement();
+		
+		String url = "";
+		if (selectedItem instanceof SQLKnowledgeRepository) {
+			url = ((SQLKnowledgeRepository)selectedItem).getURL();
+		} else if (selectedItem instanceof LocalKnowledgeRepository) {
+			LocalKnowledgeRepository kr = ((LocalKnowledgeRepository)selectedItem);
+			url = ((LocalKnowledgeRepository)selectedItem).getURL();
+		} else if (selectedItem instanceof AnnotationType) {
+			url = ((AnnotationType)selectedItem).getURL();
+		} else if (selectedItem instanceof TypedValue) {
+			url = ""; // TODO: see how to retrieve its KR
+		}
+		
+		if (url != null && url.length() > 0) {
+			OpenLocalizedWebPage.openfile(url);
+		} else {
+			System.out.println(selectedItem);
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/Informations.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/OpenKRView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/OpenKRView.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/OpenKRView.java	(revision 324)
@@ -0,0 +1,68 @@
+package org.txm.rcp.commands.krview;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.annotation.repository.AnnotationType;
+import org.txm.rcp.views.knowledgerepositories.KRView;
+
+// extends org.eclipse.ui.views.showView
+public class OpenKRView extends AbstractHandler {
+	public static final String ID = OpenKRView.class.getCanonicalName(); // org.txm.rcp.commands.krview.OpenKRView
+
+	@Override
+	public final Object execute(final ExecutionEvent event)
+			throws ExecutionException {
+		System.out.println("hello");
+		IWorkbenchWindow window = HandlerUtil
+				.getActiveWorkbenchWindowChecked(event);
+
+		try {
+			openView(window);
+		} catch (PartInitException e) {
+			throw new ExecutionException("Part could not be initialized", e); //$NON-NLS-1$
+		}
+
+		return null;
+	}
+
+	/**
+	 * Opens the view with the given identifier.
+	 * 
+	 * @param viewId
+	 *            The view to open; must not be <code>null</code>
+	 * @throws PartInitException
+	 *             If the part could not be initialized.
+	 */
+	public static void openView(final IWorkbenchWindow activeWorkbenchWindow, AnnotationType type)
+					throws PartInitException {
+
+		final IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
+		if (activePage == null) {
+			return;
+		}
+
+		activePage.showView(KRView.ID);
+		
+		if (type != null) {
+			KRView.showType(type);
+		}
+	}
+	
+	/**
+	 * Opens the view with the given identifier.
+	 * 
+	 * @param viewId
+	 *            The view to open; must not be <code>null</code>
+	 * @throws PartInitException
+	 *             If the part could not be initialized.
+	 */
+	public static void openView(final IWorkbenchWindow activeWorkbenchWindow)
+					throws PartInitException {
+		openView(activeWorkbenchWindow, null);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/krview/OpenKRView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ImportSelectedText.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ImportSelectedText.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ImportSelectedText.java	(revision 324)
@@ -0,0 +1,177 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.Locale;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.objects.BaseParameters;
+import org.txm.objects.Project;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.corpus.CorpusManager;
+import org.txm.utils.LangDetector;
+import org.txm.utils.xml.DomUtils;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+// TODO: Auto-generated Javadoc
+/**
+ * Import the text in the Clipboard as a corpus. the loader used is the
+ * QuickLoader 
+ * @author mdecorde
+ * 
+ */
+public class ImportSelectedText extends AbstractHandler {
+
+	/** The nextclipcorpus. */
+	static public int nextclipcorpus = 1;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		String result = org.txm.rcp.utils.IOClipboard.read();
+		if (result == null || result.length() == 0) {
+			System.out.println("No copied text. Aborting.");
+			return null;
+		}
+		System.out.println(Messages.ImportSelectedText_0);
+		Project projet;
+		try {
+			projet = Toolbox.workspace.getProject("default"); //$NON-NLS-1$
+		} catch (Exception e) {
+			System.out.println(Messages.ImportSelectedText_6+e);
+			return null;
+		}
+		try {
+			String corpusName = Messages.ImportSelectedText_1+(nextclipcorpus++);
+			while (projet.getBase(corpusName) != null)
+				corpusName = Messages.ImportSelectedText_1+(nextclipcorpus++);
+			importText(result, corpusName);
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return null;
+	}
+
+	/**
+	 * Import text.
+	 *
+	 * @param text the text
+	 * @param basename the basename
+	 * @return the object
+	 * @throws IOException 
+	 * @throws SAXException 
+	 * @throws ParserConfigurationException 
+	 */
+	public static Object importText(String text, String basename) throws IOException, ParserConfigurationException, SAXException {
+				
+		if (text.length() == 0) {
+			System.err.println(Messages.ImportSelectedText_2);
+			return null;
+		}
+		String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		new File(txmhome, "clipboard").mkdir(); //$NON-NLS-1$
+		File clipboardDirectory = new File(txmhome, "clipboard/" + basename); //$NON-NLS-1$
+		
+		if (CorpusManager.getCorpusManager().hasCorpus(clipboardDirectory.getName())) {
+			Shell shell = new Shell();
+			boolean b = MessageDialog.openConfirm(shell,
+					Messages.ImportSelectedText_3,
+					NLS.bind(Messages.ImportSelectedText_4, clipboardDirectory.getName()));
+			if (!b)
+				return null;
+		}
+		
+		org.txm.utils.DeleteDir.deleteDirectory(clipboardDirectory);
+		clipboardDirectory.mkdirs();
+		File quicksrc = new File(clipboardDirectory, basename + ".txt"); //$NON-NLS-1$
+		File PARAMS = new File(clipboardDirectory, "import.xml"); //$NON-NLS-1$
+		BaseParameters.createEmptyParams(PARAMS, basename);
+		
+		if (!PARAMS.exists()) {
+			System.out.println("Error: the configuration file was not created. Aborting import.");
+			return false;
+		}
+		
+		BaseParameters params = new BaseParameters(PARAMS);
+		params.load();
+		
+		Element corpusElem = params.corpora.get(params.getCorpusName());
+		
+		// write the text file
+		String encoding = corpusElem.getAttribute("encoding"); //$NON-NLS-1$
+		File scriptfile = new File(txmhome, "scripts/import/quickLoader.groovy"); //$NON-NLS-1$ 
+		try {
+			Writer writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(quicksrc)), encoding); 
+			writer.write(text.replace("\t", "    ")); //$NON-NLS-1$ //$NON-NLS-2$
+			writer.close();
+		} catch (Exception e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+			return null;
+		}
+		
+//		if (quicksrc.length() > LangDetector.MINIMALSIZE) {
+//			LangDetector detector = new LangDetector(quicksrc);
+//			corpusElem.setAttribute("lang", detector.getLang()); //$NON-NLS-1$
+//			System.out.println(Messages.ImportSelectedText_10+corpusElem.getAttribute("lang"));  //$NON-NLS-1$
+//		} else { System.out.println(Messages.ImportSelectedText_12+corpusElem.getAttribute("lang"));}  //$NON-NLS-1$
+		
+		String locale = Locale.getDefault().getLanguage();
+		String lang = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.IMPORT_DEFAULT_LANG, locale);
+		if (lang.length() == 0) lang = locale;
+		if ("??".equals(lang)) { //$NON-NLS-1$
+			LangDetector detector = new LangDetector(quicksrc);
+			lang = detector.getLang();
+			System.out.println(Messages.ImportSelectedText_10+lang);
+		}
+		corpusElem.setAttribute("lang", lang); //$NON-NLS-1$
+		System.out.println(Messages.ImportSelectedText_12+corpusElem.getAttribute("lang")); //$NON-NLS-1$
+		
+		DomUtils.save(params.root.getOwnerDocument(), params.paramFile);
+		new ExecuteImportScript().executeScript(scriptfile.getAbsolutePath(), params.paramFile); 
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ImportSelectedText.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ShowSelected.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ShowSelected.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ShowSelected.java	(revision 324)
@@ -0,0 +1,69 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * show informations of the selected TxmObject @ author mdecorde.
+ */
+public class ShowSelected extends AbstractHandler implements IHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection instanceof IStructuredSelection) {
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			Object elem = strucSelection.getFirstElement();
+			
+			if (elem instanceof File) {
+				File f = (File)elem;
+				System.out.println(Messages.ShowSelected_0);
+				System.out.println(" path="+f.getAbsolutePath());
+				System.out.println(" size="+f.length()/1000+" kb");
+				System.out.println(" rights: read="+f.canRead()+" write="+f.canWrite()+" execute="+f.canExecute());
+			} else {
+				System.out.println(elem);
+			}
+		}
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ShowSelected.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CutFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CutFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CutFile.java	(revision 324)
@@ -0,0 +1,70 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.utils.IOClipboard;
+// TODO: Auto-generated Javadoc
+/**
+ * Handler: cuts the selected file 
+ */
+public class CutFile extends AbstractHandler {
+
+	public static File toCut;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection instanceof IStructuredSelection) {
+			Object o = ((IStructuredSelection)selection).getFirstElement();
+
+			if (o instanceof File) {
+				File file = (File)o;
+				cut(file);
+			}
+		}
+		return null;
+	}
+	
+	public static void cut(File file) {
+		toCut = file;
+		CopyFile.toCopy = null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CutFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CleanPerspective.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CleanPerspective.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CleanPerspective.java	(revision 324)
@@ -0,0 +1,54 @@
+package org.txm.rcp.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.txm.rcp.Messages;
+import org.txm.utils.logger.Log;
+
+public class CleanPerspective extends AbstractHandler {
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) {
+		//System.out.println("clean perspective");
+		IWorkbenchPart part = HandlerUtil.getActivePart(event);
+		//System.out.println("part: "+part.getTitle());
+		IWorkbenchPage page = part.getSite().getPage();
+		//System.out.println("page: "+page.getLabel());
+		if (page.isEditorAreaVisible()) {
+			//System.out.println(" page is visible");
+			IEditorReference[] editors = page.getEditorReferences();
+			IViewReference[] views = page.getViewReferences();
+			if (editors.length == 0 && views.length == 0) {
+				//System.out.println("  no editor");
+				page.setEditorAreaVisible(false);
+			} else {
+				//System.out.println("  editors: "+editors.length);
+			}
+		} else {
+			//System.out.println(" page is not visible");
+		}
+		
+		IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+		if (handlerService != null) {
+			try {
+				handlerService.executeCommand("org.eclipse.ui.window.resetPerspective", null); //$NON-NLS-1$
+			} catch (Exception e) {
+				System.out.println(Messages.CleanPerspective_1+e);
+				Log.printStackTrace(e);
+			}
+		} else {
+			System.out.println(Messages.CleanPerspective_2);
+		}
+		
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CleanPerspective.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScript.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScript.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScript.java	(revision 324)
@@ -0,0 +1,354 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import groovy.lang.Binding;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.net.MalformedURLException;
+import java.util.Iterator;
+import java.util.List;
+
+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.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.jface.viewers.ISelection;
+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.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.swt.widget.parameters.UIParameterException;
+import org.txm.rcp.utils.GSERunner;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+// TODO: Auto-generated Javadoc
+/**
+ * Execute a Groovy script
+ * 
+ * @mdecorde
+ */
+public class ExecuteGroovyScript extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.ExecuteGroovyScript"; //$NON-NLS-1$
+	private static GSERunner gse;
+	private static String scriptRootDir;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		// the file to execute
+		String result = ""; //$NON-NLS-1$
+		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+
+		ISelection sel =  HandlerUtil.getCurrentSelection(event); 
+
+		if (page != null && page instanceof TxtEditor) {
+			TxtEditor te = (TxtEditor) page;
+			FileStoreEditorInput input = (FileStoreEditorInput) te
+					.getEditorInput();
+
+			File f = new File(input.getURI().getPath());
+			result = f.getAbsolutePath();
+		} else if (sel != null
+				& sel instanceof IStructuredSelection) {
+			File file = null;
+			IStructuredSelection strucSelection = (IStructuredSelection) sel;
+			for (Iterator<Object> iterator = strucSelection.iterator(); iterator
+					.hasNext();) {
+				file = (File) iterator.next();
+				result = file.getAbsolutePath();
+				break;
+			}
+		}
+
+		if ("".equals(result)) { //$NON-NLS-1$
+			Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+					.getShell();
+			FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+			if (LastOpened.getFile(ID) != null) {
+				dialog.setFilterPath(LastOpened.getFolder(ID));
+				dialog.setFileName(LastOpened.getFile(ID));
+			}
+			dialog.setFilterExtensions(new String[] { "*.groovy" }); //$NON-NLS-1$
+
+			IPreferencesService service = Platform.getPreferencesService();
+			String scriptCurrentDir = Toolbox.getParam(TBXPreferences.USER_TXM_HOME) + "/scripts"; //$NON-NLS-1$
+
+			dialog.setFilterPath(scriptCurrentDir);
+			result = dialog.open();
+			if (result == null) return null;
+			LastOpened.set(ID, new File(result));
+		}
+		executeScript(result, page, sel);
+
+		return null;
+	}
+
+	/**
+	 * 
+	 * @param currentRootDir
+	 * @param scriptpath
+	 * @param page current active page, might be null
+	 * @param sel current selection, might be null
+	 */
+	public static void executeScript(String scriptpath, final  IWorkbenchPart page, final ISelection selection, boolean modal) {
+		IPreferencesService service = Platform.getPreferencesService();
+		//		String scriptRootDir = service.getString(Application.PLUGIN_ID,
+		//				ScriptPreferencePage.SCRIPT_ROOT_DIR,
+		//				ScriptPreferenceInitializer.SCRIPT_ROOT_DIR_DEFAULT, null);
+		//		
+		String scriptRootDir = Toolbox.getParam(TBXPreferences.USER_TXM_HOME) + "/scripts"; //$NON-NLS-1$
+		File currentRootDir = new File(scriptRootDir, "user"); //$NON-NLS-1$
+
+		executeScript(currentRootDir, scriptpath, page, selection, modal);
+	}
+
+	/**
+	 * 
+	 * @param currentRootDir
+	 * @param scriptpath
+	 * @param page current active page, might be null
+	 * @param sel current selection, might be null
+	 */
+	public static void executeScript(String scriptpath, final  IWorkbenchPart page, final ISelection selection) {
+		executeScript(scriptpath, page, selection, false);
+	}
+
+	/**
+	 * 
+	 * @param currentRootDir
+	 * @param scriptpath
+	 * @param page current active page, might be null
+	 * @param sel current selection, might be null
+	 */
+	public static void executeScript(final File currentRootDir, String scriptpath, final  IWorkbenchPart page, final ISelection sel, final boolean modal) {
+		// check script
+		final File scriptfile = new File(scriptpath);
+		if (!scriptfile.exists()) {
+			System.err.println(NLS.bind(Messages.ExecuteScriptImport_1, scriptpath));
+			return;
+		}
+		ExecuteLastGroovyScript.setLastScript(scriptfile, currentRootDir.getName().equals("macro")); // register last groovy script //$NON-NLS-1$
+
+		// get current selection of the corpora view
+		final Object corpusViewSelection = CorporaView.getSelection();
+		final Object corpusViewSelections = CorporaView.getSelections();
+
+		final Object selection;
+		final List selections;
+		if (sel != null && sel instanceof IStructuredSelection) {
+			selection = ((IStructuredSelection)sel).getFirstElement();
+			selections = ((IStructuredSelection)sel).toList();
+		} else {
+			selection = sel;
+			selections = null;
+		}
+
+		String tmp = Toolbox.getParam(TBXPreferences.USER_TXM_HOME) + "/scripts"; //$NON-NLS-1$
+		if (!tmp.equals(scriptRootDir)) {
+			scriptRootDir = tmp;
+			gse = null;
+			//System.out.println("SCRIPT ROOT DIR CHANGED tmp="+tmp);
+		}
+
+		String dir = currentRootDir.getAbsolutePath();
+		String path = scriptfile.getAbsolutePath();
+		if (!path.startsWith(dir)) {
+			System.out.println(Messages.bind(Messages.ExecuteGroovyScriptFromFile_2, dir));
+			return;
+		}
+		final String relativepath = path.substring(dir.length()+1);
+
+		if (gse == null) {
+			String[] roots = new String[] { 
+					scriptRootDir+"/user/", //$NON-NLS-1$
+					scriptRootDir+"/macro/", //$NON-NLS-1$
+					scriptRootDir+"/import/", //$NON-NLS-1$
+			}; 
+
+
+			gse = GSERunner.createGSERunner(roots);
+
+			File jardir = new File(scriptRootDir,"lib"); //$NON-NLS-1$
+			if (jardir.exists() && jardir.isDirectory()) {
+				for (File f: jardir.listFiles(new FilenameFilter() {
+					@Override
+					public boolean accept(File dir, String name) {
+						return name.endsWith(".jar"); //$NON-NLS-1$
+					}
+				}))
+				{
+					try {
+						gse.getGroovyClassLoader().addURL(f.toURI().toURL());
+					} catch (MalformedURLException e) {
+						// TODO Auto-generated catch block
+						e.printStackTrace();
+					}
+				}
+			}	
+			gse.getGroovyClassLoader().addClasspath(scriptRootDir); // for the .class files if any
+		}
+
+
+		JobHandler jobhandler = new JobHandler(NLS.bind(Messages.ExecuteRScript_1,scriptfile.getName())) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				//this.setCurrentMonitor(monitor);
+				monitor.beginTask(NLS.bind(Messages.ExecuteRScript_1, scriptfile.getName()), 100);
+
+				try {
+					Binding binding = new Binding();
+					binding.setVariable("editor", page); //$NON-NLS-1$
+					binding.setVariable("selection", selection); //$NON-NLS-1$
+					binding.setVariable("selections", selections); //$NON-NLS-1$
+					binding.setVariable("corpusViewSelection", corpusViewSelection); //$NON-NLS-1$
+					binding.setVariable("corpusViewSelections", corpusViewSelections); //$NON-NLS-1$
+					binding.setProperty("monitor", this); //$NON-NLS-1$
+					binding.setProperty("gse", gse);
+					
+					System.out.println(NLS.bind(Messages.ExecuteRScript_1, scriptfile.getName()));
+					long time = System.currentTimeMillis();
+					gse.run(relativepath, binding);
+					
+					System.out.println(Messages.ExecuteRScript_2+(System.currentTimeMillis()-time)+Messages.ExecuteGroovyScript_0);
+				} catch (ThreadDeath td) {
+					return Status.CANCEL_STATUS;
+				} catch (UIParameterException e) {
+					if (e.isError()) {
+						System.out.println(Messages.ExecuteGroovyScript_1);
+					} else {
+						System.out.println(Messages.ExecuteGroovyScript_2);
+					}
+				} catch (Exception e) {
+					System.out.println(Messages.ExecuteGroovyScript_9+e);
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				} finally {
+					monitor.done();			
+				}
+				return Status.OK_STATUS;
+			}
+		};
+
+		jobhandler.startJob(modal);
+		//        //gse.loadScriptByName("scripts/B.groovy");
+		//		gse.run("A.groovy", new Binding());
+
+		//		ClassLoader parent = getClass().getClassLoader();
+		//		GroovyClassLoader loader = new GroovyClassLoader(parent);
+		//
+		//		List<File> classPath = new ArrayList<File>();
+		//		classPath.add(new File(scriptRootDir));
+		/*classPath.add(new File(scriptfile));
+		classPath.add(new File(scriptfile).getParentFile().getParentFile());
+		classPath.add(new File("")); //$NON-NLS-1$*/
+		// System.out.println(classPath);
+		//System.out.println("Build groovy scripts - Start");
+		//org.txm.Build.run();
+		//System.out.println("Build groovy scripts - Done");
+
+		//		Class groovyClass = null;
+		//		for (File f : classPath)
+		//			loader.addClasspath(f.getAbsolutePath());
+		//		loader.setShouldRecompile(true);
+		//
+		//		try {
+		//			groovyClass = loader.parseClass(new File(scriptfile));
+		//		} catch (CompilationFailedException e) {
+		//			org.txm.rcp.utils.Logger.printStackTrace(e);
+		//		} catch (IOException e) {
+		//			org.txm.rcp.utils.Logger.printStackTrace(e);
+		//		}
+		//
+		//		// let's call some method on an instance
+		//		GroovyObject groovyObject = null;
+		//		try {
+		//			groovyObject = (GroovyObject) groovyClass.newInstance();
+		//		} catch (InstantiationException e) {
+		//			org.txm.rcp.utils.Logger.printStackTrace(e);
+		//		} catch (IllegalAccessException e) {
+		//			org.txm.rcp.utils.Logger.printStackTrace(e);
+		//		}
+		//
+		//		Object[] args = {};
+		//		try {
+		//			groovyObject.invokeMethod("run", args); //$NON-NLS-1$
+		//		} catch (Exception e) {
+		//			System.err.println(e);
+		//			org.txm.rcp.utils.Logger.printStackTrace(e);
+		//		}
+
+		/*
+		 * try { File script = new File(scriptfile); // GroovyImportScriptRunner
+		 * g = new GroovyImportScriptRunner(new File(""),new ArrayList<File>());
+		 * 
+		 * GroovyClassLoader classLoader = new
+		 * GroovyClassLoader(this.getClass().getClassLoader());
+		 * classLoader.addURL(script.getParentFile().toURI().toURL());
+		 * 
+		 * GroovyScriptEngine gse = new
+		 * GroovyScriptEngine(script.getParent(),classLoader);
+		 * gse.run(script.getAbsolutePath(), new Binding());
+		 * System.out.println("END : execute script RCP "); } catch (Exception
+		 * e) { // TODO Auto-generated catch block org.txm.rcp.utils.Logger.printStackTrace(e); }
+		 * 
+		 * /* if (scriptfile == "") return; final File script = new
+		 * File(scriptfile);
+		 * 
+		 * String[] roots = new String[] {script.getParent()};
+		 * System.out.println("SCRIPTROOTDIR "+script.getParent());
+		 * System.out.println("SCRIPT "+script); GroovyScriptEngine gse; try {
+		 * gse = new GroovyScriptEngine(roots); for(File f :
+		 * script.getParentFile().listFiles())
+		 * gse.loadScriptByName(f.getName()); Binding binding = new Binding();
+		 * 
+		 * System.out.println("start execution"); gse.run(script.getName(),
+		 * binding); System.out.println("end execution"); } catch (Exception e)
+		 * {org.txm.rcp.utils.Logger.printStackTrace(e);}
+		 */
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyScript.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/EditSelectedFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/EditSelectedFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/EditSelectedFile.java	(revision 324)
@@ -0,0 +1,126 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.txm.Toolbox;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.utils.logger.Log;
+
+/**
+ * Open a file in the TxtEditor
+ * 
+ * @author mdecorde.
+ */
+public class EditSelectedFile extends AbstractHandler {
+
+	public static final String ID = EditSelectedFile.class.getCanonicalName(); //$NON-NLS-1$
+	/** The lastopenedfile. */
+	public static String lastopenedfile;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		File file = null;
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection != null & selection instanceof IStructuredSelection) {
+			IStructuredSelection strucSelection = (IStructuredSelection) selection;
+			for (Object o : strucSelection.toList())
+				if (o != null && o instanceof File) {
+					file = (File)o;
+					break;
+				}
+		}
+
+		if (file == null) {
+			System.out.println("Selection has no file. Aborting.");
+			return null;
+		} else {
+			if (file.isDirectory()) {
+				System.out.println("Selected file is a directory. Aborting.");
+				return null;
+			} else {
+				openfile(file.getAbsolutePath());
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * Open a file in TXM TxtEditor.
+	 *
+	 * @param filepath the filepath
+	 */
+	static public void openfile(File file) {
+		if (file.isDirectory())
+			return;
+		try {
+			IFileStore fileOnLocalDisk = EFS.getLocalFileSystem().getStore(file.toURI());
+
+			FileStoreEditorInput editorInput = new FileStoreEditorInput(fileOnLocalDisk);
+			IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+			IWorkbenchPage page = window.getActivePage();
+
+			IEditorPart a = page.openEditor(editorInput, TxtEditor.ID, true);
+			TxtEditor editor = (TxtEditor) a;
+		} catch (Exception e) {
+			Log.printStackTrace(e);
+		}
+	}
+
+	/**
+	 * Openfile.
+	 *
+	 * @param filepath the filepath
+	 */
+	static public void openfile(String filepath) {
+		openfile(new File(filepath));
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/EditSelectedFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenManual.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenManual.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenManual.java	(revision 324)
@@ -0,0 +1,92 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.awt.Desktop;
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Locale;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.TxmPreferences;
+import org.txm.utils.logger.Log;
+
+/**
+ * Open the internal browser of TXM with a file @ author mdecorde.
+ */
+public class OpenManual extends AbstractHandler {
+
+	public static final HashMap<String, String> files = new HashMap<String, String>();
+	public static final String default_locale = "fr";
+	static {
+		files.put("fr", "Manuel de TXM 0.7 FR.pdf");
+		files.put("en", "TXM Manual 0.7 EN.pdf");
+	}
+
+	/** The Constant ID. */
+	public final static String ID = "org.txm.rcp.commands.OpenWelcomePage"; //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		open();
+		return null;
+	}
+
+	public static void open() {
+		String locale = Locale.getDefault().getLanguage();
+		String installdir = TxmPreferences.getString(TBXPreferences.INSTALL_DIR, ""); //$NON-NLS-1$
+
+		String file = files.get(locale);
+		if (file == null) file = files.get(default_locale);
+
+		File man = new File(installdir, "doc/"+file);
+		if (!man.exists()) {
+			man = new File(installdir, "doc/"+files.get(default_locale));
+		}
+
+		if (man.exists()) {
+			Log.info("Opening file: "+man);
+			try {
+				Desktop.getDesktop().open(man);
+			} catch (IOException e) {
+				System.out.println("Error: manual not opened: "+e);
+				Log.printStackTrace(e);
+			}
+		} else {
+			System.out.println("Error: manual not found: "+man.getAbsolutePath());
+			Log.severe("Error: manual not found: "+man.getAbsolutePath());
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenManual.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/DeleteFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/DeleteFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/DeleteFile.java	(revision 324)
@@ -0,0 +1,125 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+import org.txm.rcp.views.fileexplorer.Explorer;
+import org.txm.rcp.views.fileexplorer.MacroExplorer;
+import org.txm.utils.DeleteDir;
+// TODO: Auto-generated Javadoc
+/**
+ * Execute a groovy script file in the same thread a the RCP @ author mdecorde.
+ */
+public class DeleteFile extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection instanceof IStructuredSelection) {
+			Object o = ((IStructuredSelection)selection).getFirstElement();
+
+			if (o instanceof File) {
+				File file = (File)o;
+				delete(file);
+			}
+		}
+		return null;
+	}
+
+	public static void delete(File file) {
+		//ask new file name
+
+		Shell shell = new Shell();
+		MessageBox dialog = new MessageBox(shell, SWT.YES | SWT.NO);
+		dialog.setMessage(Messages.DeleteFile_0+file+" ? ");  //$NON-NLS-1$
+
+		int buttonID = dialog.open();
+		switch(buttonID) {
+		case SWT.YES:
+			if (file.isFile()) {
+				if (!file.delete()) System.out.println(Messages.DeleteFile_2+file);
+			} else if (file.isDirectory()) {
+				if (!DeleteDir.deleteDirectory(file)) System.out.println(Messages.DeleteFile_2+file);
+			}
+			Explorer.refresh();
+			MacroExplorer.refresh();
+		case SWT.NO:
+			// exits here ...
+			break;
+		case SWT.CANCEL:
+			// does nothing ...
+		}
+	}
+
+	public static void delete(List files) {
+		Shell shell = new Shell();
+		MessageBox dialog = new MessageBox(shell, SWT.YES | SWT.NO);
+		dialog.setMessage(Messages.DeleteFile_0+files+" ? ");  //$NON-NLS-1$
+		
+		int buttonID = dialog.open();
+		switch(buttonID) {
+		case SWT.YES:
+			for (Object o : files) {
+				if (o instanceof File) {
+					File file = (File) o;
+					if (file.exists())
+					if (file.isFile()) {
+						if (!file.delete()) System.out.println(Messages.DeleteFile_2+file);
+					} else if (file.isDirectory()) {
+						if (!DeleteDir.deleteDirectory(file)) System.out.println(Messages.DeleteFile_2+file);
+					}
+				}
+			}
+			Explorer.refresh();
+			MacroExplorer.refresh();
+		case SWT.NO:
+			// exits here ...
+			break;
+		case SWT.CANCEL:
+			// does nothing ...
+		}
+		
+		
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/DeleteFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenSVGGraph.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenSVGGraph.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenSVGGraph.java	(revision 324)
@@ -0,0 +1,117 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.SVGGraphicEditor;
+import org.txm.rcp.editors.input.SVGGraphicEditorInput;
+import org.txm.rcp.swt.dialog.LastOpened;
+// TODO: Auto-generated Javadoc
+/**
+ * open a SVG file in an editor @ author mdecorde.
+ */
+public class OpenSVGGraph extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.OpenSVGGraph"; //$NON-NLS-1$
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		String svgFile = ""; //$NON-NLS-1$
+		File file = null;
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+
+		if (file == null || file.isDirectory()) {
+			FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+			if (LastOpened.getFile(ID) != null) {
+				dialog.setFilterPath(LastOpened.getFolder(ID));
+				dialog.setFileName(LastOpened.getFile(ID));
+			}
+			if (dialog.open() == null) return null;
+			svgFile = dialog.getFilterPath() + "/" + dialog.getFileName(); //$NON-NLS-1$
+			LastOpened.set(ID, dialog.getFilterPath(), dialog.getFileName());
+			OpenSVGFile(svgFile);
+		}
+
+		return null;
+	}
+
+	/**
+	 * Open svg file.
+	 *
+	 * @param filepath the filepath
+	 * @return the sVG graphic editor
+	 */
+	public static SVGGraphicEditor OpenSVGFile(String filepath) {
+		return OpenSVGFile(filepath, Messages.OpenSVGGraph_0);
+	}
+
+	/**
+	 * Open svg file.
+	 *
+	 * @param filepath the filepath
+	 * @param name the name
+	 * @return the sVG graphic editor
+	 */
+	public static SVGGraphicEditor OpenSVGFile(String filepath, String name) {
+		//System.out.println("SVGFile path : "+filepath); //$NON-NLS-1$
+		IEditorInput editorInput = new SVGGraphicEditorInput(filepath, name);
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		//IWorkbenchWindow window = TXMWindows.getActiveWindow(); //.getActiveWorkbenchWindow()
+		IWorkbenchPage page = window.getActivePage();
+		SVGGraphicEditor editor = null;
+		try {
+			// System.out.println("open svg editor" );
+			editor = (SVGGraphicEditor) page.openEditor(editorInput,
+					SVGGraphicEditor.ID, true);
+			editor.resetView();
+			// System.out.println("open svg editor - DONE" );
+		} catch (PartInitException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return editor;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenSVGGraph.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CloseEditorsUsing.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CloseEditorsUsing.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CloseEditorsUsing.java	(revision 324)
@@ -0,0 +1,42 @@
+package org.txm.rcp.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.txm.rcp.commands.base.DeleteObject;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+public class CloseEditorsUsing  extends AbstractHandler {
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+	
+		return null;
+	}
+
+	public static int corpus(Corpus corpus) {
+		int c = 0;
+		
+		for (IWorkbenchPage page : DeleteObject.getPages()) {
+			for (IEditorReference editorref : page.getEditorReferences()) {
+				IEditorPart editor = editorref.getEditor(false);
+
+				if (editor instanceof CustomizableEditor) {
+					//System.out.println("checking editor "+editor.getTitle());
+					CustomizableEditor ceditor = ((CustomizableEditor)editor);
+					if (corpus.equals(ceditor.getSource()))
+						editor.getEditorSite().getPage().closeEditor(editor, true);
+					else if (ceditor.usingCorpus(corpus)) {
+						editor.getEditorSite().getPage().closeEditor(editor, true);
+					}
+				}
+			}
+		}
+		
+		return c;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CloseEditorsUsing.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/SaveAs.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/SaveAs.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/SaveAs.java	(revision 324)
@@ -0,0 +1,98 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.editor;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.views.fileexplorer.Explorer;
+// TODO: Auto-generated Javadoc
+/**
+ * Execute a groovy script file in the same thread a the RCP @ author mdecorde.
+ */
+public class SaveAs extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.editor.SaveAs"; //$NON-NLS-1$
+	private static String previousPath;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		// the file to execute
+		IWorkbenchPart part = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+		if (part instanceof TxtEditor) {
+			TxtEditor editor = (TxtEditor)part;
+			String text = editor.getTextViewer().getTextWidget().getText();
+		
+			Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+					.getShell();
+
+			
+			FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+			if (LastOpened.getFile(ID) != null) {
+				dialog.setFilterPath(LastOpened.getFolder(ID));
+				dialog.setFileName(LastOpened.getFile(ID));
+			}
+			String result = dialog.open();
+			if (result == null) return null;
+			File resultFile = new File(result);
+			LastOpened.set(ID, resultFile.getParent(), resultFile.getName());
+			if (resultFile != null && resultFile.getParentFile().exists()) {
+				previousPath = result;
+				try {
+					OutputStreamWriter output = new OutputStreamWriter(new FileOutputStream(resultFile) , "UTF-8"); //$NON-NLS-1$
+					output.write(text);
+					output.close();
+					
+					EditFile.openfile(resultFile);
+					Explorer.refresh();
+				} catch (Exception e) {
+					System.out.println(Messages.SaveAs_2+resultFile+Messages.PasteFile_4+e);
+				}
+			}
+		}
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/SaveAs.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/SetEncoding.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/SetEncoding.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/SetEncoding.java	(revision 324)
@@ -0,0 +1,82 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.editor;
+
+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.window.Window;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.editors.text.IEncodingSupport;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.TxtEditor;
+
+/**
+ * @author mdecorde
+ * Change the encoding of the currently selected text editor
+ */
+public class SetEncoding extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+		if (page != null && page instanceof TxtEditor) {
+			TxtEditor te = (TxtEditor) page;
+			setEncoding(te);
+		}
+
+		return null;
+	}
+
+	public static void setEncoding(TxtEditor te) {
+		try {
+			IEncodingSupport encodingSupport = (IEncodingSupport) te.getAdapter(IEncodingSupport.class);		
+			String currentEncoding = encodingSupport.getEncoding();
+			String defaultEncoding = encodingSupport.getDefaultEncoding();
+			if (currentEncoding == null) currentEncoding = defaultEncoding;
+			Shell sh = new Shell();
+			InputDialog dlg = new InputDialog(sh,
+					Messages.SetEncoding_0, Messages.SetEncoding_1+currentEncoding+Messages.SetEncoding_2+defaultEncoding, currentEncoding, null);
+			if (dlg.open() == Window.OK) {
+				String newEncoding = dlg.getValue();
+				if (newEncoding != null && newEncoding.trim().length() > 0 && !newEncoding.trim().equals(currentEncoding)) {
+					encodingSupport.setEncoding(newEncoding);
+				}
+			}
+		} catch(Exception e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/SetEncoding.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/CustomizableEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/CustomizableEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/CustomizableEditor.java	(revision 324)
@@ -0,0 +1,80 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.editor;
+
+import org.eclipse.swt.graphics.Image;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface CustomizableEditor.
+ */
+public interface CustomizableEditor {
+	
+	/**
+	 * Sets the name.
+	 *
+	 * @param name the new name
+	 */
+	public void setName(String name);
+	
+	/**
+	 * Sets the icon.
+	 *
+	 * @param titleImage the new icon
+	 */
+	public void setIcon(Image titleImage);
+	
+	/**
+	 * Sets the source.
+	 *
+	 * @param source the new source
+	 */
+	public void setSource(Object source);
+	
+	/**
+	 * Gets the source.
+	 *
+	 * @return the source
+	 */
+	public Object getSource();
+
+	public Object toConcordance();
+	public Object toIndex();
+	public Object toProgression();
+
+	public boolean usingCorpus(Corpus corpus);
+
+	/**
+	 * WIP will use the lazy loading feature
+	 * 
+	 * @param corpus
+	 * @return
+	 */
+	public boolean updateCorpus(Corpus corpus);
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/CustomizableEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/Copy.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/Copy.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/Copy.java	(revision 324)
@@ -0,0 +1,60 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.editor;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.utils.IOClipboard;
+// TODO: Auto-generated Javadoc
+/**
+ * Handler: cuts the selected file 
+ */
+public class Copy extends AbstractHandler {
+
+	public static File toCut;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection instanceof ITextSelection) {
+			String o = ((ITextSelection)selection).getText();
+			IOClipboard.write(o);
+		}
+		return null;
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/Copy.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/DeleteLines.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/DeleteLines.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/DeleteLines.java	(revision 324)
@@ -0,0 +1,92 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.editor;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.functions.concordances.Concordance;
+import org.txm.functions.concordances.Line;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+
+/**
+ * Allow the user to delete lines in a Concordance table.
+ * @author mdecorde
+ * @author sjacquot
+ */
+public class DeleteLines extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		// ISelection selection =
+		// HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getSelection();
+
+		IWorkbenchPart editor = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+		if (editor instanceof ConcordancesEditor) {
+			ConcordancesEditor ceditor = (ConcordancesEditor) editor;
+			deleteConcordanceLines(ceditor);
+		}
+
+		return null;
+	}
+
+
+	public static void deleteConcordanceLines(ConcordancesEditor editor) {
+		TableViewer viewer = editor.getLineTableViewer();
+		Concordance concordance = editor.getConcordance();
+		if (concordance == null) return;
+		IStructuredSelection sel = (IStructuredSelection) viewer.getSelection();
+		@SuppressWarnings("unchecked")
+		List<Line> lines = sel.toList();
+
+		if (lines.size() == 0) return;
+
+		try {
+		//	System.out.println("Delete line "+lines);
+			if (concordance.removeLines(lines)) {
+				editor.fillDisplayArea(editor.getTopLine(), editor.getBottomLine()-lines.size());
+			}
+		} catch (Exception e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/editor/DeleteLines.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteText.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteText.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteText.java	(revision 324)
@@ -0,0 +1,95 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.statsengine.r.rcp.handlers.ExecuteRText;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Handler: execute a selection of code from the TxtEditor. It uses the file extension to execute it as Groovy or R.
+ * 
+ * 
+ * @author mdecorde.
+ */
+public class ExecuteText extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection selection = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getSelection();
+		if(!(selection instanceof TextSelection)) return null;
+		
+		TextSelection t = (TextSelection) selection;
+		String result = t.getText();
+
+		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActivePart();
+		if (!(page instanceof TxtEditor)) return null;
+		TxtEditor te = (TxtEditor) page;
+		FileStoreEditorInput input = (FileStoreEditorInput) te.getEditorInput();
+
+		File f = new File(input.getURI().getPath());
+		String scriptfile = f.getAbsolutePath();
+
+		return executeText(result, scriptfile);
+	}
+
+	/**
+	 * Execute text.
+	 *
+	 * @param text the text
+	 * @param scriptfile the scriptfile
+	 * @return the object
+	 */
+	public static Object executeText(final String text, final String scriptfile) {
+		File script = new File(scriptfile);
+		if (script.getName().endsWith(".groovy")) { //$NON-NLS-1$
+			ExecuteGroovyText.executeText(text, scriptfile);
+		} else if (script.getName().endsWith(".R")) { //$NON-NLS-1$
+			ExecuteRText.executeText(text);
+		} else {
+			System.out.println(Messages.ExecuteScript_3+script.getName());
+		}
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteText.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/BackToTextCommand.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/BackToTextCommand.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/BackToTextCommand.java	(revision 324)
@@ -0,0 +1,18 @@
+package org.txm.rcp.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.txm.functions.concordances.Line;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+
+public abstract class BackToTextCommand extends AbstractHandler {
+
+	protected String name = "BackToText"; //$NON-NLS-1$
+	@Override
+	public abstract Object execute(ExecutionEvent event) throws ExecutionException;
+	
+	public boolean backToText(ConcordancesEditor editor, Line line) {
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/BackToTextCommand.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/DownloadFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/DownloadFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/DownloadFile.java	(revision 324)
@@ -0,0 +1,84 @@
+package org.txm.rcp.commands;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.txm.rcp.utils.DownloadJobHandler;
+import org.txm.utils.logger.Log;
+
+public class DownloadFile  extends AbstractHandler {
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public static boolean download(URL url, File outputDirectory) {
+		String filename = url.getFile();
+		File outfile = new File(outputDirectory, filename);
+		Boolean done = false;
+
+		BufferedOutputStream writeFile = null;
+		HttpURLConnection connection = null;
+		InputStream input = null;
+		try {
+			connection = (HttpURLConnection)url.openConnection();  
+			connection.connect();  
+
+			// Check if the request is handled successfully  
+			if (connection.getResponseCode() / 100 == 2) { 
+
+				// size in bytes  
+				final int contentLength = connection.getContentLength(); 
+
+				if (contentLength == -1) {
+					System.out.println("Could not get file size");
+				} else {
+					done = false;
+
+					DownloadJobHandler job = new DownloadJobHandler("Download "+url, outfile, contentLength, done);
+					job.schedule();					
+
+					writeFile = new BufferedOutputStream(new FileOutputStream(outfile));
+					input = connection.getInputStream();
+					byte[] buffer = new byte[1024];
+					int read;
+					while ((read = input.read(buffer)) > 0)
+						writeFile.write(buffer, 0, read);
+
+					done = true;
+					job.done();
+				}
+			}
+		} catch (IOException e) {
+			Log.printStackTrace(e);
+			return false;
+		} finally {
+			if (writeFile != null)
+				try {
+					writeFile.close();
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			if (input != null)
+				try {
+					input.close();
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			if (connection != null) connection.disconnect();
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/DownloadFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/RenameFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/RenameFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/RenameFile.java	(revision 324)
@@ -0,0 +1,84 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+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.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+import org.txm.rcp.views.fileexplorer.Explorer;
+import org.txm.rcp.views.fileexplorer.MacroExplorer;
+// TODO: Auto-generated Javadoc
+/**
+ * Execute a groovy script file in the same thread a the RCP @ author mdecorde.
+ */
+public class RenameFile extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection selection = HandlerUtil.getCurrentSelection(event);
+		if (selection instanceof IStructuredSelection) {
+			Object o = ((IStructuredSelection)selection).getFirstElement();
+
+			if (o instanceof File) {
+				File file = (File)o;
+				rename(file);
+			}
+		}
+		return null;
+	}
+
+	public static void rename(File file) {
+		String newname = file.getName();
+		InputDialog dlg = new InputDialog(new Shell(),
+				Messages.RenameFile_0, Messages.RenameFile_0+newname, newname, null);
+		if (dlg.open() == Window.OK) {
+			newname = dlg.getValue();
+			System.out.println(Messages.RenameFile_2+newname);
+			if (newname.equals(file.getName())) return; // nothing to do
+			if (newname == null || newname.trim().length() == 0) return; // error
+			
+			if (!file.renameTo(new File(file.getParentFile(), newname)))
+				System.out.println(Messages.RenameFile_3+file+Messages.ApplicationWorkbenchAdvisor_37+newname);
+			Explorer.refresh();
+			MacroExplorer.refresh();
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/RenameFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenTestEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenTestEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenTestEditor.java	(revision 324)
@@ -0,0 +1,84 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.editors.TestEditor;
+import org.txm.rcp.editors.input.TestEditorInput;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Open the concordance editor @ author mdecorde.
+ */
+public class OpenTestEditor extends AbstractHandler {
+
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/** The editor input. */
+	private TestEditorInput editorInput;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		ISelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		
+		editorInput = new TestEditorInput(sel);
+
+		IWorkbenchPage page = window.getActivePage();
+		try {
+			StatusLine.setMessage(Messages.ComputeConcordance_0);
+			TestEditor testEditor = (TestEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.TestEditor"); //$NON-NLS-1$
+			//conceditor.setFocus(""); //$NON-NLS-1$
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+
+		return null;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenTestEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenTXMUserPreferences.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenTXMUserPreferences.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenTXMUserPreferences.java	(revision 324)
@@ -0,0 +1,128 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.util.Arrays;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.preference.IPreferenceNode;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.preference.PreferenceManager;
+import org.eclipse.jface.preference.PreferenceNode;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog;
+import org.txm.cooccurrence.rcp.preferences.CoocPreferencePage;
+import org.txm.progression.rcp.preferences.ProgressionPreferencePage;
+import org.txm.rcp.Messages;
+import org.txm.rcp.preferences.ConcordancerPreferencePage;
+import org.txm.rcp.preferences.DiagnosticPreferencePage;
+import org.txm.rcp.preferences.ExportPreferencePage;
+import org.txm.rcp.preferences.LocalePreferencePage;
+import org.txm.rcp.preferences.ReferencerPreferencePage;
+import org.txm.rcp.preferences.UserPreferencePage;
+import org.txm.specificities.rcp.preferences.SpecificitiesPreferencePage;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class OpenTXMUserPreferences.
+ */
+// FIXME: see if this class is still in used
+public class OpenTXMUserPreferences extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		configureWorkspaceSettings();
+		
+		return null;
+	}
+
+
+	/**
+	 * Configure workspace settings.
+	 */
+	protected void configureWorkspaceSettings() {
+
+		IPreferenceNode userNode = new PreferenceNode(UserPreferencePage.ID, new UserPreferencePage());
+		
+		Arrays.toString(userNode.getSubNodes());
+		
+		IPreferenceNode concordanceNode = new PreferenceNode(ConcordancerPreferencePage.ID, new ConcordancerPreferencePage());
+//		IPreferenceNode cooccurrencesNode = new PreferenceNode(CoocPreferencePage.ID, new CoocPreferencePage());
+//		IPreferenceNode caNode = new PreferenceNode(CAPreferencePage.ID, new CAPreferencePage());
+		IPreferenceNode informationsNode = new PreferenceNode(DiagnosticPreferencePage.ID, new DiagnosticPreferencePage());
+		IPreferenceNode exportNode = new PreferenceNode(ExportPreferencePage.ID, new ExportPreferencePage());
+		IPreferenceNode languageNode = new PreferenceNode(LocalePreferencePage.ID, new LocalePreferencePage());
+//		IPreferenceNode progressionNode = new PreferenceNode(ProgressionPreferencePage.ID, new ProgressionPreferencePage());
+//		IPreferenceNode specifNode = new PreferenceNode(SpecificitiesPreferencePage.ID, new SpecificitiesPreferencePage());
+//		IPreferenceNode ltNode = new PreferenceNode(LexicalTablePreferencePage.ID, new LexicalTablePreferencePage());
+		IPreferenceNode refNode = new PreferenceNode(ReferencerPreferencePage.ID, new ReferencerPreferencePage());
+
+		userNode.add(concordanceNode);
+//		userNode.add(cooccurrencesNode);
+//		userNode.add(caNode);
+		userNode.add(informationsNode);
+		userNode.add(exportNode);
+		userNode.add(languageNode);
+//		userNode.add(progressionNode);
+//		userNode.add(specifNode);
+//		userNode.add(ltNode);
+		userNode.add(refNode);
+		
+		PreferenceManager manager = new PreferenceManager();
+		manager.addToRoot(userNode);
+
+		//manager.addTo(, concordanceNode);
+		showPreferencePage(manager);
+	}
+
+	/**
+	 * Show preference page.
+	 *
+	 * @param manager the manager
+	 */
+	protected void showPreferencePage(PreferenceManager manager) {
+		
+
+		final PreferenceDialog dialog = new WorkbenchPreferenceDialog(new Shell(), manager);
+		BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+			@Override
+			public void run() {
+				dialog.create();
+				dialog.setMessage(Messages.OpenTXMUserPreferences_0);
+				dialog.open();
+			}
+		});
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenTXMUserPreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyText.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyText.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyText.java	(revision 324)
@@ -0,0 +1,181 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import groovy.lang.Binding;
+import groovy.lang.GroovyShell;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.codehaus.groovy.control.CompilationFailedException;
+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.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.rcp.preferences.ScriptPreferenceInitializer;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+
+// TODO: Auto-generated Javadoc
+/**
+ * execute a selection of Groovy code from the TxtEditor 
+ * 
+ * @author mdecorde.
+ */
+public class ExecuteGroovyText extends AbstractHandler {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
+	 * .ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection selection = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getSelection();
+		if (!(selection instanceof TextSelection))
+			return null;
+		TextSelection t = (TextSelection) selection;
+		String result = t.getText();
+
+		IWorkbenchPart page = HandlerUtil.getActiveWorkbenchWindow(event)
+				.getActivePage().getActivePart();
+		TxtEditor te = (TxtEditor) page;
+		FileStoreEditorInput input = (FileStoreEditorInput) te.getEditorInput();
+
+		File f = new File(input.getURI().getPath());
+		String scriptfile = f.getAbsolutePath();
+
+		executeText(result, scriptfile);
+		return null;
+	}
+
+	/**
+	 * Execute text.
+	 * 
+	 * @param text
+	 *            the text
+	 * @param scriptfile
+	 *            the scriptfile
+	 * @return the object
+	 */
+	public static Object executeText(final String text, final String scriptfile) {
+		if (!new File(scriptfile).exists()) {
+			System.err.println(NLS.bind(Messages.ExecuteScriptImport_1,
+					scriptfile));
+			return null;
+		}
+		IPreferencesService service = Platform.getPreferencesService();
+		final String scriptRootDir = service.getString(Application.PLUGIN_ID,
+				ScriptPreferencePage.SCRIPT_ROOT_DIR,
+				ScriptPreferenceInitializer.SCRIPT_ROOT_DIR_DEFAULT, null);
+
+		// get current selection of the corpora view
+				final Object corpusViewSelection = CorporaView.getSelection();
+				final Object corpusViewSelections = CorporaView.getSelections();
+				final Object selection = null;
+				final List selections = null;
+				
+		JobHandler jobhandler = new JobHandler("run") { //$NON-NLS-1$
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				// this.setCurrentMonitor(monitor);
+				this.runInit(monitor);
+
+				try {
+					List<File> classPath = new ArrayList<File>();
+					classPath.add(new File(scriptRootDir));
+					classPath.add(new File(scriptfile));
+					classPath.add(new File(scriptfile).getParentFile());
+					classPath.add(new File(".")); //$NON-NLS-1$
+					// System.out.println(classPath);
+					
+					Binding binding = new Binding();
+					//binding.setVariable("editor", page); //$NON-NLS-1$
+					binding.setVariable("selection", selection); //$NON-NLS-1$
+					binding.setVariable("selections", selections); //$NON-NLS-1$
+					binding.setVariable("corpusViewSelection", corpusViewSelection); //$NON-NLS-1$
+					binding.setVariable("corpusViewSelections", corpusViewSelections); //$NON-NLS-1$
+					binding.setProperty("monitor", this); //$NON-NLS-1$
+					//binding.setProperty("gse", gse);
+					GroovyShell shell = new GroovyShell(this.getClass()
+							.getClassLoader(), binding);
+
+					for (File file : classPath) {
+						try {
+							shell.getClassLoader().addURL(file.toURI().toURL());
+							shell.getClassLoader().addClasspath(
+									file.getAbsolutePath());
+						} catch (MalformedURLException e) {
+							org.txm.rcp.utils.Logger.printStackTrace(e);
+							return null;
+						}
+					}
+
+					// try {
+					System.out.println("Executing text selection..."); //$NON-NLS-1$
+					long time = System.currentTimeMillis();
+					shell.evaluate(text);
+					System.out
+							.println("Done: " + (System.currentTimeMillis() - time) + Messages.ExecuteRScript_3); //$NON-NLS-1$
+				} catch (ThreadDeath td) { 
+					return Status.CANCEL_STATUS;
+				} catch (CompilationFailedException e) {
+					System.err.println(e);
+				} catch (Exception e) {
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				}
+				return Status.OK_STATUS;
+			}
+		};
+
+		jobhandler.startJob();
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ExecuteGroovyText.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/CooccurrencesToConcordances.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/CooccurrencesToConcordances.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/CooccurrencesToConcordances.java	(revision 324)
@@ -0,0 +1,140 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.cooccurrence.core.functions.Cooccurrence;
+import org.txm.cooccurrence.core.functions.Cooccurrence.CLine;
+import org.txm.cooccurrence.rcp.editors.CooccurrencesEditor;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+// TODO: Auto-generated Javadoc
+/**
+ * use the lines of a cooc result to build a concordance @ author mdecorde.
+ */
+public class CooccurrencesToConcordances extends AbstractHandler {
+
+	/** The window. */
+	private static IWorkbenchWindow window;
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/** The editor input. */
+	private static ConcordancesEditorInput editorInput;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		CooccurrencesEditor ceditor = null;
+		IEditorPart editor = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActiveEditor();
+		ceditor = (CooccurrencesEditor) editor;
+		
+		link(ceditor, selection);
+		return null;
+	}
+	
+	/**
+	 * Link.
+	 *
+	 * @param editor the editor
+	 * @param selection the selection
+	 */
+	public static void link(CooccurrencesEditor editor, IStructuredSelection selection)
+	{
+
+		assert (selection.getFirstElement() instanceof CLine);
+
+		Cooccurrence cooc = ((CLine) selection.getFirstElement()).getCooc();
+		
+		int nbProps = cooc.getProperties().size();
+		List<Property> props = cooc.getProperties();
+		List<CLine> list = selection.toList();
+		//System.out.println("Cooc lines "+list);
+
+		String query = "["; //$NON-NLS-1$
+		for (int p = 0; p < nbProps; p++) {
+			query += props.get(p) + "=\""; //$NON-NLS-1$
+			for (int l = 0; l < list.size(); l++) {
+				CLine line = list.get(l);
+				String s = line.props.get(p);
+				s = Query.addBackSlash(s);
+				query += s + "|"; //$NON-NLS-1$
+			}
+			query = query.substring(0, query.length() - 1);
+			query += "\" & "; //$NON-NLS-1$
+		}
+		query = query.substring(0, query.length() - 3);
+		query += "] "; //$NON-NLS-1$
+		
+		int maxempan = Math.max(cooc.getMaxLeft(), cooc.getMaxRight()); 
+		if (cooc.getIncludeXPivot() && maxempan == 0) maxempan = 1;  
+		
+		String maxempanstr = "within " + maxempan + " "; //$NON-NLS-1$ //$NON-NLS-2$
+		if (cooc.getStructure() != null) maxempanstr += cooc.getStructure().getName(); 
+		
+		query = "("+cooc.getQuery()+" []* "+query+") | ("+query+" []* "+cooc.getQuery()+") "+maxempanstr; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+		
+		Corpus corpus = cooc.getCorpus();
+
+		editorInput = new ConcordancesEditorInput(corpus, null);
+
+		IWorkbenchPage page = editor.getEditorSite().getWorkbenchWindow().getActivePage();
+		
+		try {
+			ConcordancesEditor conceditor = (ConcordancesEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
+			conceditor.setQuery(query);
+			conceditor.compute();
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/CooccurrencesToConcordances.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToLexicalTable.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToLexicalTable.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToLexicalTable.java	(revision 324)
@@ -0,0 +1,142 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import java.util.ArrayList;
+
+import org.apache.batik.util.gui.CSSMediaPanel.Dialog;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ListSelectionDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.index.core.functions.Index;
+import org.txm.lexicaltable.core.functions.LexicalTable;
+import org.txm.lexicaltable.core.statsengine.data.ILexicalTable;
+import org.txm.lexicaltable.core.statsengine.r.data.LexicalTableImpl;
+import org.txm.lexicaltable.rcp.editors.LexicalTableEditorInput;
+import org.txm.rcp.handlers.BaseAbstractHandler;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.statsengine.r.core.data.QuantitativeDataStructureImpl;
+import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class IndexToLexicalTable.
+ */
+public class IndexToLexicalTable extends BaseAbstractHandler {
+
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+	private static Shell shell;
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		if(!this.checkStatsEngine()) {
+			return null;
+		}
+
+		
+		// TODO Auto-generated method stub
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		return null;
+	}
+
+	/**
+	 * Builds the lexical table.
+	 *
+	 * @param voc the voc
+	 * @param from the from
+	 * @param to the to
+	 * @return true, if successful
+	 */
+	public boolean buildLexicalTable(Index voc, int from, int to) {
+		LexicalTable table;
+
+		if (!voc.isComputedWithPartition()) {
+			
+			System.out.println(Messages.IndexToLexicalTable_0);
+			StatusLine.setMessage(Messages.IndexToLexicalTable_0);
+			return false;
+		}
+
+		System.out.println(Messages.ComputeLexicalTable_3);
+		ArrayList<String> choices = new ArrayList<String>();
+		choices.add(Messages.ComputeLexicalTable_16);
+		choices.add(Messages.ComputeLexicalTable_12);
+		ListSelectionDialog dialog = new ListSelectionDialog(shell, 
+				choices, new ArrayContentProvider(), new LabelProvider(), 
+				Messages.ComputeLexicalTable_13);
+		
+		int ret = dialog.open();
+		//System.out.println("ret= "+ret);
+		if (ret == Dialog.OK_OPTION) {
+			
+		} else {
+			return false;
+		}
+		
+		try {
+			table = new LexicalTable(voc, QuantitativeDataStructureImpl
+					.createSymbole(LexicalTableImpl.class));
+		} catch (RWorkspaceException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+			return false;
+		}
+
+		try {
+			IWorkbenchWindow window = PlatformUI.getWorkbench()
+					.getActiveWorkbenchWindow();
+			IWorkbenchPage page = window.getActivePage();
+			LexicalTableEditorInput editorInput = new LexicalTableEditorInput(table);
+			StatusLine.setMessage(Messages.ComputeLexicalTable_10);
+			page.openEditor(editorInput, "org.txm.rcp.editors.lexicaltable.LexicalTableEditor"); //$NON-NLS-1$
+		} catch (PartInitException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} 
+
+		return true;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToLexicalTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToCooccurrence.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToCooccurrence.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToCooccurrence.java	(revision 324)
@@ -0,0 +1,161 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.cooccurrence.rcp.editors.CooccurrenceEditorInput;
+import org.txm.cooccurrence.rcp.editors.CooccurrencesEditor;
+import org.txm.index.core.functions.Line;
+import org.txm.index.rcp.editors.IndexEditor;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+// TODO: Auto-generated Javadoc
+/**
+ * use the lines of a index to compute a concordance 
+ * @author mdecorde.
+ */
+public class IndexToCooccurrence extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IWorkbenchWindow window;
+		IStructuredSelection selection;
+		CooccurrenceEditorInput editorInput;
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		assert (selection.getFirstElement() instanceof Line);
+
+		String query = getQuery(selection);
+
+		// System.out.println(query);
+
+		IndexEditor voceditor = (IndexEditor) HandlerUtil
+				.getActiveWorkbenchWindow(event).getActivePage()
+				.getActivePart();
+		Corpus corpus = voceditor.getCorpus();
+
+		editorInput = new CooccurrenceEditorInput(corpus);
+
+		IWorkbenchPage page = window.getActivePage();
+		try {
+			CooccurrencesEditor conceditor = (CooccurrencesEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.cooccurrences.CooccurrencesEditor"); //$NON-NLS-1$
+			conceditor.setFocus(query);
+			conceditor.compute();
+		} catch (Exception e) {
+			System.out.println(Messages.IndexToCooccurrence_0);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		return null;
+	}
+
+	/**
+	 * Link.
+	 *
+	 * @param voceditor the voceditor
+	 * @param selection the selection
+	 * @return the object
+	 */
+	public static Object link(IndexEditor voceditor,
+			IStructuredSelection selection) {
+		assert (selection.getFirstElement() instanceof Line);
+		String query = getQuery(selection);
+		if (query.length() == 0)
+			return null;
+		Corpus corpus = voceditor.getCorpus();
+		CooccurrenceEditorInput editorInput = new CooccurrenceEditorInput(corpus);
+
+		IWorkbenchPage page = voceditor.getEditorSite().getWorkbenchWindow()
+				.getActivePage();
+		try {
+			CooccurrencesEditor conceditor = (CooccurrencesEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.cooccurrences.CooccurrencesEditor"); //$NON-NLS-1$
+			conceditor.setFocus(query);
+			conceditor.compute();
+		} catch (Exception e) {
+			System.out.println(Messages.IndexToCooccurrence_0);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		return null;
+	}
+
+	/**
+	 * Gets the query.
+	 *
+	 * @param selection the selection
+	 * @return the query
+	 */
+	private static String getQuery(IStructuredSelection selection) {
+		String query = ""; //$NON-NLS-1$
+
+		Line line = (Line) selection.getFirstElement();
+		int nbToken = line.getUnitsProperties().get(0).size();
+		int nbProps = line.getProperties().size();
+		int nbLines = selection.size();
+		List<Line> lines = selection.toList();
+		List<Property> props = line.getProperties();
+		for (int t = 0; t < nbToken; t++) {
+			query += "["; //$NON-NLS-1$
+			for (int p = 0; p < nbProps; p++) {
+				query += props.get(p) + "=\""; //$NON-NLS-1$
+				for (int l = 0; l < nbLines; l++) {
+					line = lines.get(l);
+					List<List<String>> values = line.getUnitsProperties();
+					String s = values.get(p).get(t);
+					s = Query.addBackSlash(s);
+					query += s + "|"; //$NON-NLS-1$
+				}
+				query = query.substring(0, query.length() - 1);
+				query += "\" & "; //$NON-NLS-1$
+			}
+			query = query.substring(0, query.length() - 3);
+			query += "] "; //$NON-NLS-1$
+		}
+		query = query.substring(0, query.length() - 1);
+		return query;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToCooccurrence.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToProgression.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToProgression.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToProgression.java	(revision 324)
@@ -0,0 +1,157 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.index.core.functions.Line;
+import org.txm.index.rcp.editors.IndexEditor;
+import org.txm.progression.rcp.dialogs.ProgressionDialog;
+import org.txm.progression.rcp.handlers.ComputeProgression;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+// TODO: Auto-generated Javadoc
+/**
+ * use the lines of a index to compute a Progression
+ * @author mdecorde
+ */
+public class IndexToProgression extends AbstractHandler {
+
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/** The editor input. */
+	private ConcordancesEditorInput editorInput;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		assert (selection.getFirstElement() instanceof Line);
+
+		List<Query> queries = getQueries(selection);
+
+		IndexEditor voceditor = (IndexEditor) HandlerUtil
+				.getActiveWorkbenchWindow(event).getActivePage()
+				.getActivePart();
+		Corpus corpus = voceditor.getCorpus();
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		final ProgressionDialog d = new ProgressionDialog(shell, corpus,
+				queries);
+		int code = d.open();
+		if (code == Window.OK) {
+			ComputeProgression.computeProgression(d);
+		}
+		return null;
+	}
+
+	/**
+	 * Link.
+	 *
+	 * @param voceditor the voceditor
+	 * @param selection the selection
+	 * @return the object
+	 */
+	public static Object link(IndexEditor voceditor,
+			IStructuredSelection selection) {
+		// window = HandlerUtil.getActiveWorkbenchWindow(event);
+		// selection = (IStructuredSelection)
+		// HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getSelection();
+
+		assert (selection.getFirstElement() instanceof Line);
+
+		List<Query> queries = getQueries(selection);
+		if (queries.size() == 0)
+			return null;
+		// IndexEditor voceditor = (IndexEditor)
+		// HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActivePart();
+		Corpus corpus = voceditor.getCorpus();
+
+		Shell shell = voceditor.getSite().getShell();
+		final ProgressionDialog d = new ProgressionDialog(shell, corpus,
+				queries);
+		int code = d.open();
+		if (code == Window.OK) {
+			ComputeProgression.computeProgression(d);
+		}
+		return null;
+	}
+
+	/**
+	 * Gets the queries.
+	 *
+	 * @param selection the selection
+	 * @return the queries
+	 */
+	public static List<Query> getQueries(IStructuredSelection selection) {
+		List<Line> lines = selection.toList();
+		List<Query> queries = new ArrayList<Query>();
+		for (Line line : lines) {
+			String query = ""; //$NON-NLS-1$
+			int nbToken = line.getUnitsProperties().get(0).size();
+			int nbProps = line.getProperties().size();
+			List<List<String>> values = line.getUnitsProperties();
+			List<Property> props = line.getProperties();
+			for (int t = 0; t < nbToken; t++) {
+				query += "["; //$NON-NLS-1$
+				for (int p = 0; p < nbProps; p++) {
+					query += props.get(p) + "=\""; //$NON-NLS-1$
+					String s = values.get(p).get(t);
+					s = Query.addBackSlash(s);
+					query += s;
+					query += "\" & "; //$NON-NLS-1$
+				}
+				query = query.substring(0, query.length() - 3);
+				query += "] "; //$NON-NLS-1$
+			}
+			queries.add(new Query(query));
+		}
+		return queries;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToProgression.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ReferencerToConc.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ReferencerToConc.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ReferencerToConc.java	(revision 324)
@@ -0,0 +1,140 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.functions.ReferencePattern;
+import org.txm.functions.referencer.Referencer;
+import org.txm.functions.referencer.Referencer.Line;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.rcp.editors.referencer.ReferencerEditor;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ReferencerToConc.
+ */
+public class ReferencerToConc extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil
+		.getActiveWorkbenchWindow(event).getActivePage().getSelection();
+
+		ReferencerEditor refeditor = (ReferencerEditor) HandlerUtil
+		.getActiveWorkbenchWindow(event).getActivePage()
+		.getActivePart();
+
+		return link(refeditor, selection);
+	}
+
+	/**
+	 * Link.
+	 *
+	 * @param refeditor the refeditor
+	 * @param iSelection the selection
+	 * @return the object
+	 */
+	public static Object link(ReferencerEditor refeditor, ISelection iSelection)
+	{
+		IStructuredSelection selection = (IStructuredSelection) iSelection;
+		String query = getQuery(selection);
+		if (query.length() == 0)
+			return null;
+		Corpus corpus = refeditor.getCorpus();
+		ConcordancesEditorInput editorInput = new ConcordancesEditorInput(
+				corpus, null);
+
+		IWorkbenchPage page = refeditor.getEditorSite().getWorkbenchWindow()
+		.getActivePage();
+		try {
+			ConcordancesEditor conceditor = (ConcordancesEditor) page
+			.openEditor(editorInput,
+					"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
+			conceditor.setQuery(query);
+			ReferencePattern rp = new ReferencePattern();
+			for(Property p : refeditor.getReferencer().getPattern())
+				rp.addProperty(p);
+			conceditor.setRefViewPattern(rp);
+			conceditor.compute();
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+
+		return null;
+	}
+
+	/**
+	 * Gets the query.
+	 *
+	 * @param selection the selection
+	 * @return the query
+	 */
+	private static String getQuery(IStructuredSelection selection) {
+		String query = ""; //$NON-NLS-1$
+
+		Line fline = (Line) selection.getFirstElement();
+		Referencer ref = fline.getReferencer();
+		int nbToken = 1;
+
+		List<Line> lines = selection.toList();
+
+		Property prop = ref.getProperty();
+		for (int t = 0; t < nbToken; t++) 
+		{
+			query += "["+prop + "=\""; //$NON-NLS-1$ //$NON-NLS-2$
+
+			for (Line line : lines) {
+				String s = line.getPropValue();
+				s = Query.addBackSlash(s);
+				query += s + "|"; //$NON-NLS-1$
+			}
+			query = query.substring(0, query.length() - 1);
+			query += "\"] "; //$NON-NLS-1$
+		}
+		query = query.substring(0, query.length() - 1);
+		return query;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ReferencerToConc.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/TextToConcordance.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/TextToConcordance.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/TextToConcordance.java	(revision 324)
@@ -0,0 +1,98 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.IEditionEditor;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * use the ITextSelection to compute a concordance
+ * 
+ * @author mdecorde.
+ */
+public class TextToConcordance extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		//System.out.println("Call TextToConcordance");
+		IWorkbenchWindow window;
+		ConcordancesEditorInput editorInput;
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		//selection = HandlerUtil.getCurrentSelection(event);
+		
+		IEditorPart editor = window.getActivePage().getActiveEditor();
+
+		if (editor instanceof IEditionEditor) {
+			
+			//System.out.println(((TXMBrowser)editor).getWordIDsSelection());
+			String query = ((IEditionEditor)editor).getTextSelection();
+			if (query.length() == 0) {
+				System.out.println("No text selection. Aborting.");
+				return null;
+			}
+			query = fixQuery(query);
+			
+			Corpus corpus = ((IEditionEditor)editor).getCorpus();
+			editorInput = new ConcordancesEditorInput(corpus, null);
+
+			IWorkbenchPage page = window.getActivePage();
+			try {
+				ConcordancesEditor conceditor = (ConcordancesEditor) page
+						.openEditor(editorInput,
+								"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
+				conceditor.setQuery(query);
+				conceditor.compute();
+			} catch (PartInitException e) {
+				System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+			}
+		}
+		return null;
+	}
+	
+	public static String fixQuery(String query) {
+		query = "\""+query.replaceAll("\"", "\\\"");//.replaceAll("("+TokenizerClasses.regPunct+")", " $1 ");
+		query = query.replaceAll(" +", "\" \"")+"\"";
+		return query;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/TextToConcordance.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ConcordanceToIndex.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ConcordanceToIndex.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ConcordanceToIndex.java	(revision 324)
@@ -0,0 +1,133 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.txm.functions.concordances.Line;
+import org.txm.index.rcp.editors.IndexEditor;
+import org.txm.index.rcp.editors.IndexEditorInput;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+// TODO: Auto-generated Javadoc
+/**
+ * use the lines of a index to compute a concordance @ author mdecorde.
+ */
+public class ConcordanceToIndex extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		return null;
+	}
+
+	/**
+	 * Link.
+	 *
+	 * @param concordanceEditor the concordance editor
+	 * @param selection the selection
+	 * @return the object
+	 */
+	public static Object link(ConcordancesEditor concordanceEditor,
+			IStructuredSelection selection) {
+		if (selection.getFirstElement() == null) return null;
+		assert (selection.getFirstElement() instanceof Line);
+		String query = getQuery(selection);
+		if (query.length() == 0) return null;
+		Corpus corpus = concordanceEditor.getCorpus();
+		IndexEditorInput editorInput = new IndexEditorInput(corpus);
+
+		IWorkbenchPage page = concordanceEditor.getEditorSite()
+				.getWorkbenchWindow().getActivePage();
+		try {
+			IndexEditor voceditor = (IndexEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.index.IndexEditor"); //$NON-NLS-1$
+			voceditor.setFocus(query);
+			voceditor.compute();
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+
+		return null;
+	}
+
+	/**
+	 * Gets the query.
+	 *
+	 * @param selection the selection
+	 * @return the query
+	 */
+	private static String getQuery(IStructuredSelection selection) {
+		String query = ""; //$NON-NLS-1$
+
+		Line line = (Line) selection.getFirstElement();
+		List<Property> props = line.getConcordance().getKeywordViewProperties();
+		int nbToken = line.getKeywordsViewProperties().get(props.get(0)).size();
+		int nbProps = line.getKeywordsAnalysisProperty().size();
+		int nbLines = selection.size();
+		List<Line> lines = selection.toList();
+
+		for (int t = 0; t < nbToken; t++) {
+			query += "["; //$NON-NLS-1$
+			for (int p = 0; p < nbProps; p++) {
+				Property property = props.get(p);
+				query += props.get(p) + "=\""; //$NON-NLS-1$
+				for (int l = 0; l < nbLines; l++) {
+					line = lines.get(l);
+					Map<Property, List<String>> values = line
+							.getKeywordsViewProperties();
+					String s = values.get(property).get(t);
+					//s = s.replace(".","\\.").replace("?","\\?").replace("+","\\+").replace("\"","\\\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+					s = Query.addBackSlash(s);
+					query += s + "|"; //$NON-NLS-1$
+				}
+				query = query.substring(0, query.length() - 1);
+				query += "\" & "; //$NON-NLS-1$
+			}
+			query = query.substring(0, query.length() - 3);
+			query += "] "; //$NON-NLS-1$
+		}
+		query = query.substring(0, query.length() - 1);
+		return query;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ConcordanceToIndex.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToConcordance.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToConcordance.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToConcordance.java	(revision 324)
@@ -0,0 +1,203 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.index.core.functions.Line;
+import org.txm.index.rcp.editors.IndexEditor;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+// TODO: Auto-generated Javadoc
+/**
+ * use the lines of a index to compute a concordance @ author mdecorde.
+ */
+public class IndexToConcordance extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IWorkbenchWindow window;
+		IStructuredSelection selection;
+		ConcordancesEditorInput editorInput;
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		assert (selection.getFirstElement() instanceof Line);
+
+		String query = getQuery(selection);
+
+		// System.out.println(query);
+
+		IndexEditor voceditor = (IndexEditor) HandlerUtil
+				.getActiveWorkbenchWindow(event).getActivePage()
+				.getActivePart();
+
+		//		if (!(voceditor instanceof DictionnaryEditor)) {
+		//			// show alert
+		//		}
+
+		Corpus corpus = voceditor.getCorpus();
+
+		editorInput = new ConcordancesEditorInput(corpus, null);
+
+		IWorkbenchPage page = window.getActivePage();
+		try {
+			ConcordancesEditor conceditor = (ConcordancesEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
+			conceditor.setQuery(query);
+			conceditor.compute();
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+
+		return null;
+	}
+
+	/**
+	 * Link.
+	 *
+	 * @param voceditor the voceditor
+	 * @param selection the selection
+	 * @return the object
+	 */
+	public static Object link(IndexEditor voceditor,
+			IStructuredSelection selection) {
+		assert (selection.getFirstElement() instanceof Line);
+		String query = getQuery(selection);
+		if (query.length() == 0)
+			return null;
+		Corpus corpus = voceditor.getCorpus();
+		ConcordancesEditorInput editorInput = new ConcordancesEditorInput(
+				corpus, null);
+//		try {
+//			System.out.println("Compute indexResult query: "+voceditor.getQuery());
+//			QueryResult indexResult = corpus.query(voceditor.getQuery(), "Index", false);
+//			System.out.println("N result: "+indexResult.getNMatch());
+//
+//			System.out.println("Compute indexOccResult query: "+query);
+//			QueryResult indexOccResult = corpus.query(new Query(query), "IndexOcc", false);
+//			System.out.println("N result: "+indexOccResult.getNMatch());
+//
+//			String queryname = "Q"+Corpus.getNextQueryCounter();
+//			String interQueryString = queryname+"=intersect "+indexResult.getQualifiedCqpId()+" "+indexOccResult.getQualifiedCqpId()+";"; 
+//			System.out.println("Compute inter query: "+interQueryString);
+//			((MemCqiClient)Toolbox.getCqiClient()).query(interQueryString);
+//			
+//			QueryResult inter = new QueryResult(queryname, queryname, corpus, new Query(interQueryString));
+//			System.out.println("indexResult size: "+indexResult.getNMatch());
+//			System.out.println("indexOccResult size: "+indexOccResult.getNMatch());
+//			System.out.println("inter size: "+inter.getNMatch());
+//			
+//			QueryResult inter2 = corpus.query(new Query("intersect "+indexResult.getQualifiedCqpId()+" "+indexOccResult.getQualifiedCqpId()), "Q"+Corpus.getNextQueryCounter(),false);
+//			System.out.println("inter2 size: "+inter2.getNMatch());
+//		} catch (Exception e) {
+//			e.printStackTrace();
+//			try {
+//				System.out.println("CQP error: "+Toolbox.getCqiClient().getLastError());
+//			} catch (Exception e1) {
+//				e1.printStackTrace();
+//			}
+//		}
+//		
+//		return null;
+
+		IWorkbenchPage page = voceditor.getEditorSite().getWorkbenchWindow()
+				.getActivePage();
+		try {
+			ConcordancesEditor conceditor = (ConcordancesEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
+			conceditor.setQuery(query);
+			conceditor.compute();
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+
+		return null;
+	}
+
+
+	/**
+	 * Gets the query.
+	 *
+	 * @param selection the selection
+	 * @return the query
+	 */
+	private static String getQuery(IStructuredSelection selection) {
+		String query = ""; //$NON-NLS-1$
+
+		Line line = (Line) selection.getFirstElement();
+		int nbToken = line.getUnitsProperties().get(0).size();
+		int nbProps = line.getProperties().size();
+		int nbLines = selection.size();
+		List<Line> lines = selection.toList();
+		List<Property> props = line.getProperties();
+		for (int t = 0; t < nbToken; t++) {
+			query += "["; //$NON-NLS-1$
+			for (int p = 0; p < nbProps; p++) {
+				if (props.get(p) instanceof StructuralUnitProperty) {
+					query += "_."+((StructuralUnitProperty)props.get(p)).getFullName() + "=\""; //$NON-NLS-1$ //$NON-NLS-2$
+				} else {
+					query += props.get(p) + "=\""; //$NON-NLS-1$
+				}
+				for (int l = 0; l < nbLines; l++) {
+					line = lines.get(l);
+					List<List<String>> values = line.getUnitsProperties();
+					String s = values.get(p).get(t);
+					s = Query.addBackSlash(s);
+					query += s + "|"; //$NON-NLS-1$
+				}
+				query = query.substring(0, query.length() - 1);
+				query += "\" & "; //$NON-NLS-1$
+			}
+			query = query.substring(0, query.length() - 3);
+			query += "] "; //$NON-NLS-1$
+		}
+		query = query.substring(0, query.length() - 1);
+		return query;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToConcordance.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToIndex.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToIndex.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToIndex.java	(revision 324)
@@ -0,0 +1,68 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * @author mdecorde.
+ * calls the editor's method toIndex
+ */
+public class ToIndex extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
+		IEditorPart editor = page.getActiveEditor();
+		if (editor instanceof CustomizableEditor) {
+			return link((CustomizableEditor) editor);
+		}
+		return null;
+	}
+
+	/**
+	 * Link.
+	 *
+	 * @param editor
+	 * @return the object
+	 */
+	public static Object link(CustomizableEditor editor) {
+		return editor.toIndex();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToIndex.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/LexiconToIndex.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/LexiconToIndex.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/LexiconToIndex.java	(revision 324)
@@ -0,0 +1,144 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.index.core.functions.Line;
+import org.txm.index.rcp.editors.IndexEditor;
+import org.txm.index.rcp.editors.IndexEditorInput;
+import org.txm.lexicon.rcp.editors.DictionnaryEditor;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
+
+// TODO: Auto-generated Javadoc
+/**
+ * use the lines of a index to compute a concordance.
+ *
+ * @author mdecorde
+ */
+public class LexiconToIndex extends AbstractHandler {
+
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		DictionnaryEditor dictEditor = null;
+		IEditorPart editor = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActiveEditor();
+		dictEditor = (DictionnaryEditor) editor;
+		
+		link(dictEditor, selection);
+		return null;
+	}
+
+	/**
+	 * Link.
+	 *
+	 * @param dictEditor the dict editor
+	 * @param selection the selection
+	 * @return the object
+	 */
+	public static Object link(DictionnaryEditor dictEditor,
+			IStructuredSelection selection) {
+		assert (selection.getFirstElement() instanceof Line);
+		String query = getQuery(selection);
+		if (query.length() == 0)
+			return null;
+		Corpus corpus = dictEditor.getCorpus();
+		IndexEditorInput editorInput = new IndexEditorInput(corpus);
+
+		IWorkbenchPage page = dictEditor.getEditorSite()
+				.getWorkbenchWindow().getActivePage();
+		try {
+			IndexEditor voceditor = (IndexEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.index.IndexEditor"); //$NON-NLS-1$
+			voceditor.setFocus(query);
+			voceditor.compute();
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+
+		return null;
+	}
+
+	/**
+	 * Gets the query.
+	 *
+	 * @param selection the selection
+	 * @return the query
+	 */
+	private static String getQuery(IStructuredSelection selection) {
+		String query = ""; //$NON-NLS-1$
+
+		Line line = (Line) selection.getFirstElement();
+		List<Property> props = line.getProperties();
+		int nbToken = line.getUnitsProperties().get(0).size();
+		int nbProps = props.size();
+		int nbLines = selection.size();
+		List<Line> lines = selection.toList();
+
+		for (int t = 0; t < nbToken; t++) {
+			query += "["; //$NON-NLS-1$
+			for (int p = 0; p < nbProps; p++) {
+
+				query += props.get(p) + "=\""; //$NON-NLS-1$
+				for (int l = 0; l < nbLines; l++) {
+					line = lines.get(l);
+					List<List<String>> values = line.getUnitsProperties();
+					String s = values.get(p).get(t);
+					s = Query.addBackSlash(s);
+					query += s + "|"; //$NON-NLS-1$
+				}
+				query = query.substring(0, query.length() - 1);
+				query += "\" & "; //$NON-NLS-1$
+			}
+			query = query.substring(0, query.length() - 3);
+			query += "] "; //$NON-NLS-1$
+		}
+		query = query.substring(0, query.length() - 1);
+		return query;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/LexiconToIndex.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToProgression.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToProgression.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToProgression.java	(revision 324)
@@ -0,0 +1,68 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * @author mdecorde.
+ * calls the editor's method toProgression
+ */
+public class ToProgression extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
+		IEditorPart editor = page.getActiveEditor();
+		if (editor instanceof CustomizableEditor) {
+			return link((CustomizableEditor) editor);
+		}
+		return null;
+	}
+
+	/**
+	 * Link.
+	 *
+	 * @param editor
+	 * @return the object
+	 */
+	public static Object link(CustomizableEditor editor) {
+		return editor.toProgression();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToProgression.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Commands which create link between 2 textometry function</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToConcordance.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToConcordance.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToConcordance.java	(revision 324)
@@ -0,0 +1,68 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.link;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * calls the editor's method "toConcordance"
+ * @author mdecorde.
+ */
+public class ToConcordance extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
+		IEditorPart editor = page.getActiveEditor();
+		if (editor instanceof CustomizableEditor) {
+			return link((CustomizableEditor) editor);
+		}
+		return null;
+	}
+
+	/**
+	 * Link.
+	 *
+	 * @param editor
+	 * @return the object
+	 */
+	public static Object link(CustomizableEditor editor) {
+		return editor.toConcordance();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ToConcordance.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Common commands</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/CopySelection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/CopySelection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/CopySelection.java	(revision 324)
@@ -0,0 +1,70 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.R;
+
+import java.lang.reflect.Method;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class CopySelection.
+ */
+public class CopySelection extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		copyFirst(selection);
+
+		return null;
+	}
+
+	/**
+	 * Copy first.
+	 *
+	 * @param selection the selection
+	 */
+	public static void copyFirst(IStructuredSelection selection)
+	{
+		Object selectedItem = selection.getFirstElement();
+		String text = ""; //$NON-NLS-1$
+		try {
+			Method getname = selectedItem.getClass().getMethod("getSymbol"); //$NON-NLS-1$
+			text = (String)getname.invoke(selectedItem);
+		} catch (Exception e2) {}
+		org.txm.rcp.utils.IOClipboard.write(text);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/CopySelection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/Submit.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/Submit.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/Submit.java	(revision 324)
@@ -0,0 +1,113 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.R;
+
+import java.io.File;
+
+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.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.statsengine.r.rcp.handlers.ExecuteRScript;
+import org.txm.statsengine.r.rcp.handlers.ExecuteRText;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Submit. Deprecated due to ExecuteScript command
+ */
+@Deprecated
+public class Submit extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(final ExecutionEvent event) throws ExecutionException {
+
+		IWorkbenchWindow wb = HandlerUtil.getActiveWorkbenchWindow(event);
+		IWorkbenchPage ap = wb.getActivePage();
+		IWorkbenchPart editor = ap.getActivePart();
+
+		if (editor == null)
+			return null;
+
+		if (editor instanceof TxtEditor) {
+			final TxtEditor Teditor = (TxtEditor) editor;
+			final ISelection selection = Teditor.getSelectionProvider().getSelection();
+			JobHandler job = new JobHandler(Messages.Submit_0, true) {
+
+				@Override
+				protected IStatus run(final IProgressMonitor monitor) {
+					this.syncExec(new Runnable() {
+						@Override
+						public void run() {
+							try {
+								if (selection == null) {
+									Teditor.doSave(monitor);
+									File script = Teditor.getEditedFile();
+									ExecuteRScript.executeScript(script.getAbsolutePath());
+								} else {
+									if (selection instanceof TextSelection) {
+										TextSelection t = (TextSelection) selection;
+										String result = t.getText();
+
+										if (result.length() > 0) {
+											ExecuteRText.executeText(result);
+										} else {
+											Teditor.doSave(monitor);
+											FileStoreEditorInput input = (FileStoreEditorInput) Teditor.getEditorInput();
+											File script = new File(input.getURI().getPath());
+											ExecuteRScript.executeScript(script.getAbsolutePath());
+										}
+									}
+								}
+							}
+							catch(Throwable e){org.txm.rcp.utils.Logger.printStackTrace(e);}
+						}
+					});
+					monitor.done();
+					return Status.OK_STATUS;
+				}
+			};
+			job.schedule();
+
+		}
+		return event;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/Submit.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/OpenEmptyEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/OpenEmptyEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/OpenEmptyEditor.java	(revision 324)
@@ -0,0 +1,91 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.R;
+
+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.osgi.util.NLS;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class OpenEmptyEditor.
+ */
+public class OpenEmptyEditor extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		File txmhome = new File(TxmPreferences.getString(TBXPreferences.USER_TXM_HOME, "")); //$NON-NLS-1$
+		File scripts = new File(txmhome, "scripts"); //$NON-NLS-1$
+		scripts.mkdir();
+		if (!scripts.exists())
+		{
+			System.out.println(NLS.bind(Messages.OpenEmptyEditor_2, scripts));
+			return null;
+		}
+		
+		File Rscripts = new File(scripts, "R"); //$NON-NLS-1$
+		Rscripts.mkdir();
+		if (!Rscripts.exists())
+		{
+			System.out.println(NLS.bind(Messages.OpenEmptyEditor_2, Rscripts));
+			return null;
+		}
+		
+		int nosession = TxmPreferences.getInt(ScriptPreferencePage.NO_SESSION, 1);
+		
+		File temp = new File(Rscripts, "session"+nosession+".R"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		//create newt session no
+		nosession++;
+		TxmPreferences.set(ScriptPreferencePage.NO_SESSION, nosession);
+		
+		try {
+			temp.createNewFile();
+		} catch (IOException e) {
+			System.out.println(Log.toString(e));
+			return null;
+		}
+		
+		EditFile.openfile(temp.getAbsolutePath());
+		
+		return null;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/OpenEmptyEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/ShowSvgHelp.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/ShowSvgHelp.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/ShowSvgHelp.java	(revision 324)
@@ -0,0 +1,65 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.R;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ShowSvgHelp.
+ */
+public class ShowSvgHelp extends AbstractHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		MessageDialog.openInformation(new Shell(), Messages.ShowSvgHelp_0, 
+				Messages.ShowSvgHelp_1 +
+				Messages.ShowSvgHelp_2 +
+				Messages.ShowSvgHelp_3 +
+				Messages.ShowSvgHelp_4 +
+				Messages.ShowSvgHelp_5);
+		return event;
+		
+		/*
+		 * <li>Faire glisser : Shif t+Left Mouse+drag</li>
+<li>Zoom avant et arrière : Shif t+Right Mouse+drag</li>
+<li>Zoom par sélection : Ctrl+Left Mouse+drag</li>
+<li>Rotation : Ctrl+Right Mouse+drag</li>
+<li>Retour à la vue initiale : F5</li>
+		 */
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/R/ShowSvgHelp.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/tests/NilsTest.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/tests/NilsTest.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/tests/NilsTest.java	(revision 324)
@@ -0,0 +1,119 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.tests;
+
+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.jobs.IJobManager;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.utils.Logger;
+import org.txm.utils.logger.Log;
+
+public class NilsTest extends AbstractHandler {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
+	 * .ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		JobHandler jobhandler = new JobHandler("Testing TXM") { //$NON-NLS-1$
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				// this.setCurrentMonitor(monitor);
+				this.runInit(monitor);
+				JobsTimer.start();
+				int ii = 0;
+				try {
+					// while (ii++ < 999999999) {
+					// ii = 0;
+					// }
+					monitor.beginTask("Testing commands", 100); //$NON-NLS-1$
+					monitor.subTask("P1"); //$NON-NLS-1$
+					//Thread.sleep(3000);
+					monitor.worked(30);// if (monitor.isCanceled()) return
+										// Status.CANCEL_STATUS;
+
+					this.acquireSemaphore();
+					System.out.println("test");
+//					Logger.addFlag(Logger.STATUSLINE);
+				//	Logger.severe("test severe std");
+//					Logger.addFlag(Logger.MSGBOX);
+//					Logger.removeFlag(Logger.CONSOLE);
+//					Logger.severe("severe status line", Logger.STATUSLINE);
+//					Logger.info("info msgbox", Logger.MSGBOX | Logger.CONSOLE);
+//					Logger.info("info std");
+//					Logger.warning("warn all", Logger.STATUSLINE | Logger.MSGBOX);
+					Logger.info("NilsTest running", Logger.STATUSLINE_REMAIN); //$NON-NLS-1$
+					throw new Exception("test exception");
+					/*
+					try {
+						monitor.subTask("P2"); //$NON-NLS-1$
+						Thread.sleep(1000);
+						monitor.worked(30);// if (monitor.isCanceled()) return
+											// Status.CANCEL_STATUS;
+					} catch (Exception e) {
+						System.out.println("catch p2"); //$NON-NLS-1$
+					}
+
+					this.releaseSemaphore();
+
+					monitor.subTask("P3"); //$NON-NLS-1$
+					Thread.sleep(1000);
+					monitor.worked(40);// if (monitor.isCanceled()) return
+										// Status.CANCEL_STATUS;
+										 * 
+				*/
+				} catch (InterruptedException e) {
+					System.out.println("Thread interrupted"); //$NON-NLS-1$
+				} catch (Exception e) {
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				} catch (ThreadDeath e) {
+					// org.txm.rcp.utils.Logger.printStackTrace(e);
+					return Status.CANCEL_STATUS;
+				} finally {
+					monitor.done();
+					JobsTimer.stopAndPrint();
+				}
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob();
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/tests/NilsTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/tests/TestImports.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/tests/TestImports.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/tests/TestImports.java	(revision 324)
@@ -0,0 +1,231 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands.tests;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+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.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.commands.ExecuteImportScript;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.utils.zip.Zip;
+
+public class TestImports extends AbstractHandler {
+
+	public static String ID = "org.txm.rcp.commands.tests.TestImports";
+
+	static HashMap<String, String> scripts = new HashMap<String, String>();
+	static {
+		scripts.clear();
+		scripts.put("cnr", "discoursLoader.groovy"); // cnr +csv
+		scripts.put("hyperbase", "hyperbaseLoader.groovy"); // old hyperbase
+		scripts.put("alceste", "alcesteLoader.groovy"); // alceste
+		scripts.put("alceste2", "alcesteLoader.groovy"); // alceste
+		scripts.put("bfm", "bfmLoader.groovy"); // xml-tei-bfm
+		scripts.put("frantext", "frantextLoader.groovy"); // xml-tei-bfm
+		scripts.put("xml", "xmlLoader.groovy"); // xml
+		scripts.put("factiva", "factivaLoader.groovy"); // factiva
+		scripts.put("xml", "xmlLoader.groovy"); // <w attr="" atrt2="">
+		scripts.put("xmlws", "xmlLoader.groovy"); // <w attr="" atrt2="">
+		scripts.put("txt", "quickLoader.groovy"); // txt + csv
+		scripts.put("transcriber", "transcriberLoader.groovy"); // echant EVS +
+																// csv
+		scripts.put("xmltxm", "xmltxmLoader.groovy"); // domi
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
+	 * .ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		final File scriptsdir = new File(txmhome, "scripts/import");
+		// final File sourcesdir = new
+		// File(System.getProperty("user.home"),"xml/TESTS");
+		final int delta = 100 / scripts.size();
+
+		System.out
+				.println("Please select the directory containing source directories for the following import modules :");
+		System.out.println(scripts.toString());
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		DirectoryDialog dialog = new DirectoryDialog(shell, SWT.OPEN);
+
+		if (LastOpened.getFile(ID) != null) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+		} else {
+			dialog.setFilterPath(System.getProperty("user.home"));
+		}
+		String path = dialog.open();
+
+		if (path == null)
+			return null;
+
+		final File sourcesdir = new File(path);
+
+		if (!scriptsdir.exists()) {
+			System.out.println("Error: TXM is not well installed.");
+			System.out.println("Cannot find TXM import scripts directory: "
+					+ scriptsdir);
+			return null;
+		}
+
+		if (!sourcesdir.exists()) {
+			System.out.println("Cannot find test sources directory: "
+					+ sourcesdir);
+			return null;
+		}
+
+		System.out
+				.println("Select the directory containing the source directories : "
+						+ scripts.keySet());
+		JobHandler jobhandler = new JobHandler(
+				"Testing TXM - select the directory containing the source dierctories") {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+					File outDir = new File(txmhome, "results/TESTS-imports");
+					outDir.mkdirs();
+					ArrayList<File> missings = new ArrayList<File>();
+					try {
+						monitor.beginTask("Testing imports", 100);
+						JobsTimer.start();
+
+						for (String filename : scripts.keySet()) {
+							final File source = new File(sourcesdir, filename);
+							final File script = new File(scriptsdir,
+									scripts.get(filename));
+
+							if (source.exists()) {
+								final BaseParameters params = new BaseParameters(
+										new File(source, "import.xml"));
+								params.load();
+								params.rootDir = source.getAbsolutePath(); // fix
+																			// source
+																			// dir
+								params.saveToElement();
+								
+								this.acquireSemaphore();
+								boolean returnSave = params.save();
+								this.releaseSemaphore();
+								
+								if (!returnSave) {
+									System.out
+											.println("ERROR: could not save import configuration: "
+													+ params.paramFile);
+									continue;
+								}
+								System.out.println("USING ROOT DIR : "
+										+ params.rootDir);
+								this.syncExec(new Runnable() {
+									public void run() {
+										new ExecuteImportScript()
+												.executeScript(script
+														.getAbsolutePath(),
+														params.paramFile);
+									}
+								});
+							} else {
+								System.out
+										.println("Warning: Missing source directory: "
+												+ source);
+								missings.add(source);
+							}
+							monitor.worked(delta);
+							if (monitor.isCanceled())
+								return Status.CANCEL_STATUS;
+						}
+					} catch (Exception e) {
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+						return Status.CANCEL_STATUS;
+					}
+
+					String date = BaseParameters.dateformat.format(new java.util.Date());
+					File zipFile = new File(outDir.getParentFile(),
+							"TESTS_imports_" + date + ".zip");
+					File zipFile2 = new File(outDir.getParentFile(),
+							"TESTS_imports_.odt");
+					this.acquireSemaphore();
+					zipFile.delete();
+					zipFile2.delete();
+					this.releaseSemaphore();
+					if (missings.size() > 0)
+						System.out.println("Missing sources directories: "
+								+ missings);
+					monitor.beginTask(
+							"Testing imports: results will be compressed in "
+									+ zipFile.getAbsolutePath(), 100);
+					System.out
+							.println("Testing imports: results will be compressed in "
+									+ zipFile.getAbsolutePath());
+					try {
+						this.acquireSemaphore();
+						Zip.compress(outDir, zipFile2);
+						zipFile2.renameTo(zipFile);
+						this.releaseSemaphore();
+					} catch (IOException e) {
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+						return Status.CANCEL_STATUS;
+					}
+				} catch (ThreadDeath td) {
+					return Status.CANCEL_STATUS;
+				} finally {
+					monitor.done();
+					JobsTimer.stopAndPrint();
+				}
+				return Status.OK_STATUS;
+			}
+		};
+
+		jobhandler.startJob();
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/tests/TestImports.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/EditFile.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/EditFile.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/EditFile.java	(revision 324)
@@ -0,0 +1,115 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.editors.TxtEditor;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.utils.logger.Log;
+
+/**
+ * Open a file in the TxtEditor
+ * 
+ * @author mdecorde.
+ */
+public class EditFile extends AbstractHandler {
+
+	public static final String ID = EditFile.class.getCanonicalName(); //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+
+		FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+		if (LastOpened.getFile(ID) != null) {
+			dialog.setFilterPath(LastOpened.getFolder(ID));
+			dialog.setFileName(LastOpened.getFile(ID));
+		} else {
+			dialog.setFilterPath(txmhome);
+		}
+		if (dialog.open() == null) return null;
+		String filepath = dialog.getFilterPath() + "/" + dialog.getFileName(); //$NON-NLS-1$
+		LastOpened.set(ID, dialog.getFilterPath(), dialog.getFileName());
+		openfile(filepath);
+
+		return null;
+	}
+
+	/**
+	 * Open a file in TXM TxtEditor.
+	 *
+	 * @param filepath the filepath
+	 */
+	static public void openfile(File file) {
+		if (file.isDirectory())
+			return;
+		try {
+			IFileStore fileOnLocalDisk = EFS.getLocalFileSystem().getStore(file.toURI());
+
+			FileStoreEditorInput editorInput = new FileStoreEditorInput(fileOnLocalDisk);
+			IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+			IWorkbenchPage page = window.getActivePage();
+
+			IEditorPart a = page.openEditor(editorInput, TxtEditor.ID, true);
+			TxtEditor editor = (TxtEditor) a;
+		} catch (Exception e) {
+			Log.printStackTrace(e);
+		}
+	}
+
+	/**
+	 * Openfile.
+	 *
+	 * @param filepath the filepath
+	 */
+	static public void openfile(String filepath) {
+		openfile(new File(filepath));
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/EditFile.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateMacro.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateMacro.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateMacro.java	(revision 324)
@@ -0,0 +1,209 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.commands;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.preferences.ScriptPreferenceInitializer;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.views.fileexplorer.Explorer;
+import org.txm.rcp.views.fileexplorer.MacroExplorer;
+import org.txm.utils.AsciiUtils;
+import org.txm.utils.io.IOUtils;
+// TODO: Auto-generated Javadoc
+/**
+ * Handler: creates a macro template
+ */
+public class CreateMacro extends AbstractHandler {
+
+	private static final String ID = "org.txm.rcp.commands.CreateMacro"; //$NON-NLS-1$
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		//get scripts dir
+		IPreferencesService service = Platform.getPreferencesService();
+		String scriptRootDir = service.getString(Application.PLUGIN_ID,
+				ScriptPreferencePage.SCRIPT_ROOT_DIR,
+				ScriptPreferenceInitializer.SCRIPT_ROOT_DIR_DEFAULT, null);
+		File currentRootDir = new File(scriptRootDir, "macro"); //$NON-NLS-1$
+
+		//if selection is a file, get its path
+		String dir = null;
+		IWorkbenchWindow activeW = HandlerUtil.getActiveWorkbenchWindow(event);
+		if (activeW != null) {
+			IWorkbenchPage activeP = activeW.getActivePage();
+			if (activeP != null) {
+				ISelection selection = activeP.getSelection();
+				if (selection != null && selection instanceof IStructuredSelection) {
+					IStructuredSelection sel = (IStructuredSelection) selection;
+					Object obj = sel.getFirstElement();
+					if (obj instanceof File) {
+						File current = ((File)obj);
+						if (current.isDirectory()) {
+							dir = current.getAbsolutePath();
+						} else {
+							dir = current.getParent();
+						}
+					}
+				}
+			}
+		}
+
+		if (dir == null) {
+			dir = currentRootDir.getAbsolutePath();
+		}
+		
+		//ask new file name
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
+		InputDialog dialog = new InputDialog(shell, Messages.CreateMacro_0, Messages.CreateMacro_1, "", null); //$NON-NLS-1$
+		
+		dialog.open();
+		String name = dialog.getValue();
+		
+		return createMacro(dir, name);
+	}
+	
+	public static boolean createMacro(String dir, String name) {
+		if (name == null) return false;
+		if (dir == null) return false;
+		
+		int idx = dir.indexOf("scripts/macro/org/txm/macro/");
+		String packagePath = "org.txm.macro";
+		if (idx > 0) {
+			String sub = dir.substring(idx + "scripts/macro/org/txm/macro/".length(), dir.length()).replaceAll("/", ".").replaceAll("\\\\", ".");
+			if (sub.trim().length() > 0) {
+				packagePath += "."+sub;
+			}
+		}
+		name = name.replaceAll("\\p{Punct}", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		name = AsciiUtils.convertNonAscii(name);
+		name = name.substring(0, 1).toUpperCase()+name.substring(1);
+		StringBuffer tmp = new StringBuffer();
+		for (int i = 0 ; i < name.length() ; i++) {
+			if (name.charAt(i) == ' ') {
+				i++;
+				if (i <name.length() )
+					tmp.append((""+name.charAt(i)).toUpperCase()); //$NON-NLS-1$
+			} else {
+				tmp.append(name.charAt(i));
+			}
+		}
+		name = tmp.toString();
+		if (name == null) return false;
+
+		//create the new file
+		File newfile = new File(dir, name+"Macro.groovy"); //$NON-NLS-1$
+		LastOpened.set(ID, newfile.getParent(), newfile.getName());
+		if (!newfile.exists() && newfile.getParentFile().canWrite()) {
+			try {
+				if (newfile.createNewFile()) {
+					System.out.println(NLS.bind(Messages.CreateFile_1, newfile.getAbsolutePath()));
+					
+					PrintWriter writer = IOUtils.getWriter(newfile, "UTF-8"); //$NON-NLS-1$
+					writer.println("// STANDARD DECLARATIONS"); //$NON-NLS-1$
+					writer.println("package "+packagePath); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("import org.kohsuke.args4j.*"); //$NON-NLS-1$
+					writer.println("import groovy.transform.Field"); //$NON-NLS-1$
+					writer.println("import org.txm.rcp.swt.widget.parameters.*"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("// BEGINNING OF PARAMETERS"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("// Declare each parameter here"); //$NON-NLS-1$
+					writer.println("// (available widget types: Query, File, Folder, String, Text, Boolean, Integer, Float and Date)"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("//@Field @Option(name=\"query\", usage=\"an example query\", widget=\"Query\", required=true, def='[pos=\"V.*\"]')"); //$NON-NLS-1$
+					writer.println("//def query"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("//@Field @Option(name=\"file\", usage=\"an example file\", widget=\"File\", required=true, def=\"C:/Temp/foo.txt\")"); //$NON-NLS-1$
+					writer.println("//def file"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("//@Field @Option(name=\"folder\", usage=\"an example folder\", widget=\"Folder\", required=false, def=\"C:/Temp\")"); //$NON-NLS-1$
+					writer.println("//def folder"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("//@Field @Option(name=\"date\", usage=\"an example date\", widget=\"Date\", required=false, def=\"1984-09-01\")"); //$NON-NLS-1$
+					writer.println("//def date"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("//@Field @Option(name=\"integer\", usage=\"an example integer\", widget=\"Integer\", required=false, def=\"42\")"); //$NON-NLS-1$
+					writer.println("//def integer"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("//@Field @Option(name=\"floatValue\", usage=\"an example float\", widget=\"Float\", required=false, def=\"42.42\")"); //$NON-NLS-1$
+					writer.println("//def floatValue"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("//@Field @Option(name=\"string\", usage=\"an example string\", widget=\"String\", required=false, def=\"hello world!\")"); //$NON-NLS-1$
+					writer.println("//def string"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("//@Field @Option(name=\"longString\", usage=\"an example longString\", widget=\"Text\", required=false, def=\"hello world!\")"); //$NON-NLS-1$
+					writer.println("//def longString"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("//@Field @Option(name=\"bool\", usage=\"an example boolean\", widget=\"Boolean\", required=false, def=\"true\")"); //$NON-NLS-1$
+					writer.println("//def bool"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("// Open the parameters input dialog box"); //$NON-NLS-1$
+					writer.println("if (!ParametersDialog.open(this)) return;"); //$NON-NLS-1$
+					writer.println(""); //$NON-NLS-1$
+					writer.println("// END OF PARAMETERS"); //$NON-NLS-1$ 
+					writer.println(""); //$NON-NLS-1$
+					writer.println("println \"corpora selection: \"+corpusViewSelection"); //$NON-NLS-1$
+					writer.close();
+					
+					EditFile.openfile(newfile);
+					//Explorer.refresh();
+					MacroExplorer.refresh();
+				}
+			} catch (IOException e) {
+				System.out.println(e.getLocalizedMessage());
+				return false;
+			}
+		}
+		
+		
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/CreateMacro.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/tests/AnnotationLookUp.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/tests/AnnotationLookUp.java	(revision 323)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/tests/AnnotationLookUp.java	(revision 324)
@@ -14,7 +14,7 @@
 import org.txm.annotation.repository.KnowledgeRepositoryManager;
 import org.txm.annotation.repository.TypedValue;
 import org.txm.annotation.storage.temporary.TemporaryAnnotationManager;
-import org.txm.rcpapplication.commands.annotation.InitializeKnowledgeRepository;
+import org.txm.rcp.commands.annotation.InitializeKnowledgeRepository;
 import org.txm.searchengine.cqp.corpus.CorpusManager;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.searchengine.cqp.corpus.query.Match;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMWindows.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMWindows.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMWindows.java	(revision 324)
@@ -0,0 +1,29 @@
+package org.txm.rcp;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * 
+ * Util to get the active Window
+ * 
+ * @author mdecorde
+ *
+ */
+public class TXMWindows {
+	public static IWorkbenchWindow getActiveWindow() {
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window == null) {
+			IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
+			if (windows.length > 0) {
+				window = windows[0];
+			}
+		}
+		return window;
+	}
+	
+	public static Display getDisplay() {
+		return PlatformUI.getWorkbench().getDisplay();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMWindows.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMClassLoader.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMClassLoader.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMClassLoader.java	(revision 324)
@@ -0,0 +1,20 @@
+package org.txm.rcp;
+
+import java.util.HashSet;
+
+public class TXMClassLoader extends ClassLoader {
+	private HashSet<ClassLoader> loaders;
+
+	public TXMClassLoader(HashSet<ClassLoader> loaders2) {
+		this.loaders  = loaders2;
+	}
+	
+    public Class findClass(String name) throws ClassNotFoundException {
+        for (ClassLoader cl : loaders) {
+        	try {
+        		return cl.loadClass(name);
+        	} catch(Exception e) {}
+        }
+        throw new ClassNotFoundException(name);
+    }
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMClassLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchWindowAdvisor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchWindowAdvisor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchWindowAdvisor.java	(revision 324)
@@ -0,0 +1,167 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import java.util.Iterator;
+
+import org.eclipse.e4.ui.model.application.ui.SideValue;
+import org.eclipse.e4.ui.model.application.ui.basic.MTrimBar;
+import org.eclipse.e4.ui.model.application.ui.basic.MTrimElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MTrimmedWindow;
+import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
+import org.eclipse.e4.ui.model.application.ui.menu.MToolControl;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.application.ActionBarAdvisor;
+import org.eclipse.ui.application.IActionBarConfigurer;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+import org.eclipse.ui.internal.WorkbenchWindow;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Configures TXM Windows
+ */
+public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
+
+	/**
+	 * Instantiates a new application workbench window advisor.
+	 *
+	 * @param configurer the configurer
+	 */
+	public ApplicationWorkbenchWindowAdvisor(
+			IWorkbenchWindowConfigurer configurer) {
+		super(configurer);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#createActionBarAdvisor(org.eclipse.ui.application.IActionBarConfigurer)
+	 */
+	@Override
+	public ActionBarAdvisor createActionBarAdvisor(
+			IActionBarConfigurer configurer) {
+		return new ApplicationActionBarAdvisor(configurer);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#preWindowOpen()
+	 */
+	@Override
+	public void preWindowOpen() {
+		IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
+		configurer.setShowProgressIndicator(true);
+		configurer.setInitialSize(new Point(1024, 768));
+		configurer.setShowMenuBar(true);
+		configurer.setShowCoolBar(true);
+		configurer.setShowStatusLine(true);
+		configurer.setShowFastViewBars(false);
+		configurer.setShowProgressIndicator(true);
+		configurer.setShowPerspectiveBar(true);
+		configurer.setTitle(Messages.Explorer_3);
+
+		// This is a patch to remove the Quick Search Field and spacers from the Main toolbar
+		Log.warning(Messages.ApplicationWorkbenchWindowAdvisor_0);
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window instanceof WorkbenchWindow) {
+			MWindow model = ((WorkbenchWindow) window).getModel();
+			EModelService modelService = model.getContext().get(
+					EModelService.class);
+
+			MTrimBar trimBar = modelService.getTrim((MTrimmedWindow) model,
+					SideValue.TOP);
+			Iterator<MTrimElement> it = trimBar.getChildren().iterator();
+			while (it.hasNext()) {
+				MTrimElement next = it.next();
+				//System.out.println("Element: "+next.getElementId());
+				if ("com.none.playActionSet".equals(next.getElementId())) continue; //$NON-NLS-1$
+				if ("org.eclipse.ui.edit.text.actionSet.annotationNavigation".equals(next.getElementId())) continue; //$NON-NLS-1$
+				if ("org.eclipse.ui.edit.text.actionSet.navigation".equals(next.getElementId())) continue; //$NON-NLS-1$
+				if ("org.eclipse.search.searchActionSet".equals(next.getElementId())) continue; //$NON-NLS-1$
+				if ("org.eclipse.debug.ui.launchActionSet".equals(next.getElementId())) continue; //$NON-NLS-1$
+				if ("org.eclipse.ui.browser.editor".equals(next.getElementId())) continue; //$NON-NLS-1$
+				// Team
+				//if ("org.eclipse.team.svn.ui.SVNTeamPreferences".equals(next.getElementId())) continue;
+				if ("group.editor".equals(next.getElementId())) continue; //$NON-NLS-1$
+				if ("SearchField".equals(next.getElementId())) continue;
+				//if ("PerspectiveSpacer".equals(next.getElementId())) continue;
+				//if ("Spacer Glue".equals(next.getElementId())) continue;
+				//if ("Search-PS Glue".equals(next.getElementId())) continue;
+				if ("PerspectiveSwitcher".equals(next.getElementId())) continue; //$NON-NLS-1$
+				//System.out.println("DEL Element: "+next.getElementId());
+				if (next instanceof MToolControl)
+					next.setToBeRendered(false);
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#postWindowOpen()
+	 */
+	@Override
+	public void postWindowOpen() {
+		Log.warning(Messages.ApplicationWorkbenchWindowAdvisor_9);
+		StatusLine.set(getWindowConfigurer().getActionBarConfigurer().getStatusLineManager());
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		page.hideActionSet("org.eclipse.ui.edit.text.actionSet.navigation"); //$NON-NLS-1$
+		page.hideActionSet("org.eclipse.ui.edit.text.actionSet.annotationNavigation"); //$NON-NLS-1$
+		page.hideActionSet("org.eclipse.ui.run"); //$NON-NLS-1$
+		//page.hideActionSet("org.eclipse.team.svn.ui.SVNTeamPreferences"); //$NON-NLS-1$
+		// StatusLine.setMessage(Messages.ApplicationWorkbenchWindowAdvisor_statusready);
+
+		IContributionItem[] mItems, mSubItems;
+		IMenuManager mm = getWindowConfigurer ().getActionBarConfigurer ().getMenuManager ();
+		mm.remove("org.eclipse.ui.run");
+//		mItems = mm.getItems ();
+//		for (int i = 0; i < mItems.length; i++)
+//		{
+//			if (mItems[i] instanceof MenuManager)
+//			{
+//				mSubItems = ((MenuManager) mItems[i]).getItems ();
+//				for (int j = 0; j < mSubItems.length; j++)
+//				{
+//					System.out.println("menu : "+mItems[i].getId());
+//					if (mItems[i].getId ().equals ("file"))
+//						((MenuManager) mItems[i]).remove ("org.eclipse.ui.openLocalFile");
+//					else if (mItems[i].getId ().equals ("help"))
+//					{
+//						((MenuManager) mItems[i]).remove ("group.updates");
+//						((MenuManager) mItems[i]).remove ("org.eclipse.update.ui.updateMenu");
+//						((MenuManager) mItems[i]).remove ("org.eclipse.ui.actions.showKeyAssistHandler");
+//					}
+//				}
+//			}
+//		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchWindowAdvisor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_ru.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_ru.properties	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_ru.properties	(revision 324)
@@ -0,0 +1,1088 @@
+
+About_Menu_Label = О платформе TXM...
+
+AdapterFactory_0 = ** Предупреждение: корпус {0} поврежден. Некоторые команды могут быть недоступны или функционировать некорркетно.
+
+AddBase_1  = Новый корпус: {0}.
+AddBase_10 = Платформа TXM готова к использованию.
+AddBase_16 = ** Невозможно записать язык {0} как свойство ''LANG'' структуры <txmcorpus>
+AddBase_17 = ** Файл {0} недоступен
+AddBase_19 = Внимание
+AddBase_2  = ** Ошибка загрузки корпуса из папки: {0}.\nНевозможно найти необходимые составные элементы.
+AddBase_20 = Корпус {0} уже существует. Хотите ли вы его заменить?
+AddBase_22 = Файл {0} не соответствует формату TXM.
+AddBase_23 = Корпус {0} не имеет свойства ''LANG'' при структуре <txmcorpus>
+AddBase_24 = ** Не удалось загрузить корпус {0}
+AddBase_25 = Корпус TXM в бинарном формате - это либо файл с расширением .txm или .zip, либо директория с папками 'html', 'data', 'registry', 'txm'
+AddBase_27 = Загрузить корпус
+AddBase_28 = Извлечение бинарного корпуса
+AddBase_29 = Извлечено {0} за {1}
+AddBase_31 = ** Не удалось загрузить бинарный корпус: {0}
+AddBase_32 = Загрузка корпуса в платформу
+AddBase_33 = Перезагрузка платформы
+AddBase_34 = Рабочая среда TXM не инициализирована. Пожалуйста, перезагрузите TXM.
+AddBase_4  = ** Не удалось загрузить бинарный корпу (null error).
+AddBase_7  = ** Не удалось создать бинарный корпус.
+
+AddProject_3 = Введите название проекта
+
+AdvancePreferencePage_1  = Папка установки TXM
+AdvancePreferencePage_12 = Уровень детализации отчета
+AdvancePreferencePage_13 = Добавить технический комментарий
+AdvancePreferencePage_14 = Копировать отчет в файл
+AdvancePreferencePage_2  = Папка пользователя TXM
+AdvancePreferencePage_3  = Показывать время выполнения на консоли
+AdvancePreferencePage_4  = N/A_Expert user mode
+
+ApplicationWorkbenchAdvisor_0           = Инициализация платформы...
+ApplicationWorkbenchAdvisor_1           = Инициализация платформы...
+ApplicationWorkbenchAdvisor_11          = Загрузка демонстрационных корпусов
+ApplicationWorkbenchAdvisor_12          = ** Ошибка: переменная среды ''TXMHOME'' задана ({0}), но нет папки: 
+ApplicationWorkbenchAdvisor_13          = ** Не удалось создать папку TXMHOME : {0}
+ApplicationWorkbenchAdvisor_14          = \ проверка расширения:  
+ApplicationWorkbenchAdvisor_16          = N/A_Removing old corpus backup directory {0}. 
+ApplicationWorkbenchAdvisor_17          = .
+ApplicationWorkbenchAdvisor_18          = Corpora already backuped in ''{0}'' : {1} 
+ApplicationWorkbenchAdvisor_19          = ** Не удалось задать параметры программы TreeTagger : {0}
+ApplicationWorkbenchAdvisor_2           = Загрузка опций установки TXM из: {0}
+ApplicationWorkbenchAdvisor_20          = N/A_ in 
+ApplicationWorkbenchAdvisor_22          = N/A_Processing folder: 
+ApplicationWorkbenchAdvisor_23          = \ ...
+ApplicationWorkbenchAdvisor_24          = N/A_Failed moving old corpus from 
+ApplicationWorkbenchAdvisor_25          = Чтение опций из места установки: {0}
+ApplicationWorkbenchAdvisor_26          = N/A_ to 
+ApplicationWorkbenchAdvisor_27          = Рабочая папка TXM уже существует. Загрузить ранее созданные корпусы?
+ApplicationWorkbenchAdvisor_28          = Сохранение рабочей папки...
+ApplicationWorkbenchAdvisor_29          = N/A_Error: 
+ApplicationWorkbenchAdvisor_3           = Проверка наличия рабочей папки
+ApplicationWorkbenchAdvisor_30          = Перемещение существующих корпусов...
+ApplicationWorkbenchAdvisor_31          = ** Не удалось создать рабочее пространство 'default.xml'
+ApplicationWorkbenchAdvisor_32          = ** TreeTagger не установлен или неверно заданы пути доступа.
+ApplicationWorkbenchAdvisor_33          = Пути доступа к TreeTagger приведены к значениями по умолчанию.
+ApplicationWorkbenchAdvisor_34          = ** Ошибка: не удалсоь создать папку для сохранения корпуса
+ApplicationWorkbenchAdvisor_35          = N/A_\nCorpus 
+ApplicationWorkbenchAdvisor_36          = Перемещение  
+ApplicationWorkbenchAdvisor_37          = \ в 
+ApplicationWorkbenchAdvisor_38          = Внимание: корпус уже был сохранен.
+ApplicationWorkbenchAdvisor_39          = Не хватает папки в директории установки TXM : {0}
+ApplicationWorkbenchAdvisor_4           = Проверка установки TreeTagger
+ApplicationWorkbenchAdvisor_40          = ** Не удалось скопировать файлы из папки TXMINSTALL в TXMHOME: {0}
+ApplicationWorkbenchAdvisor_41          = ** Не удалось задать опции: {0}
+ApplicationWorkbenchAdvisor_42          = \ перемещение 
+ApplicationWorkbenchAdvisor_43          = Corpora {0} not restored, since this setup provides more recent ones.
+ApplicationWorkbenchAdvisor_43_single   = Corpus {0} not restored, since this setup provides more recent ones.
+ApplicationWorkbenchAdvisor_44          = ** Невозможно перенести корпус 
+ApplicationWorkbenchAdvisor_45          = ** Файл не читается: {0}
+ApplicationWorkbenchAdvisor_46          = N/A_\nCorpus 
+ApplicationWorkbenchAdvisor_47          = ** Невозможно сохранить существующие корпусы:
+ApplicationWorkbenchAdvisor_48          = \nCorpus ''{0}'' could not be restored and are moved to ''{1}''.
+ApplicationWorkbenchAdvisor_49          = N/A_Initializing the toolbox...
+ApplicationWorkbenchAdvisor_5           = Стандартный выход
+ApplicationWorkbenchAdvisor_51          = ** Не удалось загрузить корпус из файла: 
+ApplicationWorkbenchAdvisor_52          = ** Не удалось загрузить демонстрационные корпусы: {0}
+ApplicationWorkbenchAdvisor_53          = Восстановление корпусов из 
+ApplicationWorkbenchAdvisor_54          = Преобразование корпусов из формата TXM 0.5 
+ApplicationWorkbenchAdvisor_55          = \ в формат TXM 0.6.
+ApplicationWorkbenchAdvisor_56          = ** Не удалось преобразовать корпус в формат TXM 0.6
+ApplicationWorkbenchAdvisor_57          = Загрузка преобразованного корпуса 0.5 
+ApplicationWorkbenchAdvisor_58          = Загрузка корпуса 0.6 
+ApplicationWorkbenchAdvisor_59          = ** Ошибка во время загрузки 
+ApplicationWorkbenchAdvisor_6           = Исключение: 
+ApplicationWorkbenchAdvisor_60          = ** Ошибка: корпус 
+ApplicationWorkbenchAdvisor_61          = \ не является бинарным корпусом TXM 0.6
+ApplicationWorkbenchAdvisor_7           = Создание рабочего пространства пользователя TXM.
+ApplicationWorkbenchAdvisor_71          = Загрузка демонстрационных корпусов.
+ApplicationWorkbenchAdvisor_8           = Путь установки: {0}
+ApplicationWorkbenchAdvisor_9           = ** Ошибка чтения файла опций установки
+ApplicationWorkbenchAdvisor_init        = Запуск {0}...
+ApplicationWorkbenchAdvisor_init_failed = ** Запуск платформы прерван. Пожалуйста, отрегулируйте опции (в меню 'Файл>Опции')
+ApplicationWorkbenchAdvisor_ready       = Готово.
+
+Application_4                           = N/A_This file is not meant to run TXM. Please consult TXM user manual.
+Application_6                           = ** Вы должны установить версию 1.6 Java или более поздниюю, прежде чем запустить TXM, установленная на этой машине версия Java: {0}
+
+AssistedQueryWidget_0 = Ouvrir l'assistant de requêtes
+
+BackToText_0 = Показать в полнотекстовом режиме
+
+CAHEditor_0 = N/A_Computing CAH
+
+CAHPreferencePage_0 = Показывать графики в 2D
+CAHPreferencePage_1 = Классификация
+CAHPreferencePage_2 = Число кластеров
+CAHPreferencePage_3 = Метод
+CAHPreferencePage_4 = Метрика
+
+CANT_CREATE_GRAPHIC = ** Невозможно создать график
+
+CAPreferencePage_0 = Формат колонки Качество
+CAPreferencePage_1 = Формат колонки Вклад
+CAPreferencePage_3 = Показать колонки в графике факторного плана
+CAPreferencePage_4 = Показать строчки в графике факторного плана
+CAPreferencePage_5 = Формат колонки Масса
+CAPreferencePage_6 = Формат колонки Дистанция
+CAPreferencePage_7 = Формат колонки Cos²
+CAPreferencePage_8 = Формат колонки Coord
+
+CQPPreferenceInitializer_0 = localhost
+CQPPreferenceInitializer_1 = anonymous
+
+CQPPreferencePage_0  = N/A_CQPlib path
+CQPPreferencePage_1  = Использовать сетевой протокол
+CQPPreferencePage_10 = Удаленный &сервер CWB
+CQPPreferencePage_11 = Удаленный сервер: &имя машины
+CQPPreferencePage_12 = Удаленный сервер: &номер порта
+CQPPreferencePage_13 = Удаленный сервер: &логин
+CQPPreferencePage_14 = Удаленный сервер: &пароль
+CQPPreferencePage_15 = Путь к исполняемому &файлу 'cqpserver'
+CQPPreferencePage_16 = Путь к папке &Регистр сервера CWB
+CQPPreferencePage_17 = Путь к файлу инициализации сервера CWB
+CQPPreferencePage_18 = Дополнительные опции сервера CWB: 
+
+Cannot_ask_simple_when_advance = Невозможно отобразить закладку простых опций, когда пользователь выбрал отображение дополнительных опций
+
+ColRowInfosLabelProvider_19 = Qual
+ColRowInfosLabelProvider_9  = χ²
+
+ColsRowsInfosEditor_0 = Ошибочный ввод
+ColsRowsInfosEditor_2 = Информация: {0}
+
+Commands_0 = Ошибка: невозможно инициализировать команды
+
+ComplexSortSelector_0 = Ключи для сортировки:
+ComplexSortSelector_1 = Мульти-сортировка
+ComplexSortSelector_2 = Сортировка
+ComplexSortSelector_5 = ** Ошибка при сортировке: {0}
+ComplexSortSelector_6 = по умолчанию
+
+ComplexSort_0         = Открытие диалогового окна сложной сортировки
+ComplexSort_1         = &Сложная сортировка
+ComplexSort_10        = Недопустимый блок сравнения
+ComplexSort_11        = Необходимо выбрать не менее двух блоков сравнения
+ComplexSort_12        = Добавить в выделенному
+ComplexSort_14        = Удалить из выделенного
+ComplexSort_16        = Поднять выделение на один уровень
+ComplexSort_18        = Опустить выделение на один уровень
+ComplexSort_2         = Задать и использовать сложную сортировку
+ComplexSort_3         = Выберите сложную сортировку
+ComplexSort_4         = &Новый
+ComplexSort_5         = Создать новый метод сортировки
+ComplexSort_6         = Имя: 
+ComplexSort_9         = Поле Имя обязательно.
+
+ComplexSubcorpusPanel_0  = Выделить
+ComplexSubcorpusPanel_1  = Все критерии
+ComplexSubcorpusPanel_16 = не содержит
+ComplexSubcorpusPanel_2  = отдельные критерии
+ComplexSubcorpusPanel_4  = Запрос 
+ComplexSubcorpusPanel_5  = Обновить
+
+ComputeCAH_0 = Расчет Классификации {0}
+ComputeCAH_1 = Показать график
+ComputeCAH_2 = ** Не удается записать данные во временный файл
+ComputeCAH_3 = Расчет классификации с 
+
+ComputeClassification_5 = Колонки
+ComputeClassification_6 = Строчки
+
+ComputeConcordance_0 = Открытие окна конкорданса
+ComputeConcordance_1 = N/A_Failed to open concordance editor.
+
+ComputeCoocFromLines_0 = Идет расчет совместной встречаемости
+ComputeCoocFromLines_1 = Открытие таблицы совместной встречаемости
+
+ComputeCoocMatrix_0  = N/A_Cooc matrix: 
+ComputeCoocMatrix_1  = N/A_Number of nodes: 
+ComputeCoocMatrix_10 = N/A_Distance
+ComputeCoocMatrix_11 = N/A_Minimal co frequence
+ComputeCoocMatrix_12 = N/A_Outfile : none
+ComputeCoocMatrix_13 = N/A_Choose outfile
+ComputeCoocMatrix_2  = N/A_Number of edges: 
+ComputeCoocMatrix_3  = N/A_Distance: 
+ComputeCoocMatrix_4  = N/A_Writing cooc matrix in GRAPHML file: 
+ComputeCoocMatrix_5  = N/A_"
+ComputeCoocMatrix_7  = N/A_CoocMatrix parameters
+
+ComputeCooccurrences_0 = Загрузка таблицы совместной встречаемости
+ComputeCooccurrences_1 = ** Невозможно вычислить совместную встречаемость в выделении
+
+ComputeFrequencyList_2 = Расчет списка значений свойства {0} в корпусе {1}
+
+ComputeIndexFromLines_0 = Выполнить команду Индекс на выделении
+
+ComputeLexicalTable_0  = Составление словарной таблицы {0}
+ComputeLexicalTable_1  = Составление словарной таблицы {0} со свойством {1}
+ComputeLexicalTable_10 = Открытие словарной таблицы
+ComputeLexicalTable_12 = Употребления в индексе
+ComputeLexicalTable_13 = Выберите пределы для расчетов
+ComputeLexicalTable_16 = Использовать все употребления
+ComputeLexicalTable_2  = N/A_no property
+ComputeLexicalTable_3  = Открытие диалогового окна конфигурации пределов
+ComputeLexicalTable_5  = ** Невозможно построить словарную таблицу из Индекса, рассчитанного на корпусе
+ComputeLexicalTable_6  = ** Списки значений должны строиться на одинаковых сочетаниях свойств: {0}
+ComputeLexicalTable_7  = Списки значений должны иметь одинаковое распределение: {0}
+ComputeLexicalTable_9  = ** Диалоговое окно словарной таблицы: невозможно получить размер корпуса. Причина {0}
+
+ComputeProgression_0  = Функция Прогрессия в настоящее время недоступна на прерывных подкорпусах.
+ComputeProgression_1  = N/A_Failed to get last CQP error: 
+ComputeProgression_10 = Открытие графика прогрессии
+ComputeProgression_12 = Готово: показано {0} позиций
+ComputeProgression_13 = ** Не удалось рассчитать прогрессию: {0}
+ComputeProgression_2  = Расчет прогрессии <{0}> в корпусе {1}
+ComputeProgression_3  = N/A_Done: no match found.
+ComputeProgression_4  = Расчет прогрессии {0} по запросу: {1}, структура: {2}, свойство: {3}, кумулятивность: {4}
+ComputeProgression_9  = ** {0} недоступен для записи
+
+ComputeReferencer_0 = Открытие результата Ссылок
+
+ComputeSpecificitiesDialog_0 = ** Диалоговое окно ''Расчет специфичности'' - {0}
+ComputeSpecificitiesDialog_1 = ** Синтаксическая ошибка в регулярном выражении: {0}
+ComputeSpecificitiesDialog_3 = Фокус:
+ComputeSpecificitiesDialog_4 = Фокус части:
+ComputeSpecificitiesDialog_9 = Нет доступного фильтра для части
+
+ComputeSpecificities_0       = Расчет специфичности
+ComputeSpecificities_2       = Расчет специфичности {0}, свойство {1} 
+
+ComputeSpecifities_10 = Открытие таблицы результатов специфичности
+ComputeSpecifities_11 = Расчет специфичности в словарной таблице {0}
+ComputeSpecifities_2  = Обновление вида корпусов...
+ComputeSpecifities_3  = Расчет специфичности в подкорпусе {0} корпуса {1}, свойство {2}
+
+Compute_Specificities        = Расчет специфичности
+
+ConcordancerPreferencePage_3 = Параметры конкордансов
+ConcordancerPreferencePage_4 = Количество строк на &Странице : 
+ConcordancerPreferencePage_5 = &Левый контекст (в словах)
+ConcordancerPreferencePage_6 = &Правый контекст (в словах)
+
+ConcordancesEditorContributor_0 = Конкорданс
+
+ConcordancesEditor_0            = Последняя ошибка CQi : 
+ConcordancesEditor_1            = Ссылка
+ConcordancesEditor_11           = |<
+ConcordancesEditor_12           = <
+ConcordancesEditor_13           = >
+ConcordancesEditor_14           = >|
+ConcordancesEditor_16           = &Мотив: 
+ConcordancesEditor_18           = &Редактировать
+ConcordancesEditor_19           = {0} употреблений
+ConcordancesEditor_2            = Левый контекст
+ConcordancesEditor_20           = Загрузка данных о строке...
+ConcordancesEditor_26           = идентификатор проекта {0} идентификатор корпуса {1} идентификатор текста {2}
+ConcordancesEditor_27           = Возврат к тексту: текст {0} отсутствует
+ConcordancesEditor_29           = Страница не найдена... для 
+ConcordancesEditor_3            = Мотив
+ConcordancesEditor_30           = Возврат к тексту: издание по умолчанию не найдено
+ConcordancesEditor_34           = Загрузка конкорданса
+ConcordancesEditor_37           = Сортировка ссылок
+ConcordancesEditor_38           = Скрыть параметры
+ConcordancesEditor_39           = Показать параметры
+ConcordancesEditor_4            = Правый контекст
+ConcordancesEditor_41           = Сортировка левого контекста
+ConcordancesEditor_43           = Корпус {0} не имеет ссылок по умолчанию: {1}
+ConcordancesEditor_45           = Сортировка мотива
+ConcordancesEditor_46           = ** Невозможно показать в тексте: {0}
+ConcordancesEditor_48           = Сортировка правого контекста
+ConcordancesEditor_5            = Конкорданс мотива <{0}> в корпусе {1}
+ConcordancesEditor_50           = Открытие издания
+ConcordancesEditor_52           = Готово: один результат
+ConcordancesEditor_55           = Открытие диалогового окна свойств
+ConcordancesEditor_56           = Начало расчета конкордансов
+ConcordancesEditor_6            = Сортировка...
+ConcordancesEditor_7            = N/A_Failed to get last CQP error: 
+ConcordancesEditor_8            = N/A_The corpus has no text_id property
+
+ConvertCorpus_0 = N/A_Corpus conversion failed.
+
+CoocPreferencePage_0  = Формат индекса (по умолчанию 0.0000E00)
+CoocPreferencePage_1  = Минимальный порог количества совместных употреблений
+CoocPreferencePage_11 = Минимум справа
+CoocPreferencePage_12 = Максимум справа
+CoocPreferencePage_2  = Минимальный порог частотности совместной встречаемости
+CoocPreferencePage_3  = Минимальный порог индекса совместной встречаемости
+CoocPreferencePage_4  = Максимум слева
+CoocPreferencePage_5  = Совместная встречаемость
+CoocPreferencePage_6  = Минимум слева
+CoocPreferencePage_8  = N/A_Use partial lexical table
+
+CooccurrencesEditor_0  = Сортировать по: {0}
+CooccurrencesEditor_10 = Совместная частотность
+CooccurrencesEditor_11 = Значение индекса не соответствует формату двойной плавающей точки
+CooccurrencesEditor_12 = Расчет совместной встречаемости {0}
+CooccurrencesEditor_13 = Отладка расчета совместной встречаемости
+CooccurrencesEditor_14 = Расчет совместной встречаемости
+CooccurrencesEditor_15 = Отображение результатов
+CooccurrencesEditor_16 = ** Невозможно вычислить совместную встречаемость без контекстов
+CooccurrencesEditor_17 = Индекс
+CooccurrencesEditor_18 = Порог индекса должен быть действительным числом, отличным от {0}
+CooccurrencesEditor_2  = Рассчитать
+CooccurrencesEditor_20 = Расчет совместной встречаемости  <{0}> в корпусе {1}
+CooccurrencesEditor_23 = Готово: ни одного результата.
+CooccurrencesEditor_24 = Готово: один результат.
+CooccurrencesEditor_27 = Расчет запроса
+CooccurrencesEditor_28 = Расчет ответов
+CooccurrencesEditor_29 = Расчет подписей к строкам
+CooccurrencesEditor_3  = Свойства совместных употреблений: 
+CooccurrencesEditor_30 = Подсчет
+CooccurrencesEditor_31 = Расчет словарной таблицы
+CooccurrencesEditor_32 = Расчет показателей специфичности\	
+CooccurrencesEditor_33 = Начало расчета совместной встречаемости
+CooccurrencesEditor_34 = Готово: {1} совместных употреблений на {0} употреблений мотива
+CooccurrencesEditor_4  = Пороги: Част ≥
+CooccurrencesEditor_5  = Совм-част ≥ 
+CooccurrencesEditor_6  = Показатель ≥ 
+CooccurrencesEditor_8  = Кооккуррент
+CooccurrencesEditor_9  = Средняя дистанция
+
+CorporaView_0 = Корпус
+CorporaView_1 = ** Ошибка: {0}
+CorporaView_2 = ** Не удалось получить размеры корпуса {0}
+CorporaView_3 = ** Произошла ошибка при расчете конкорданса
+CorporaView_4 = N/A_CoocMatrix symbol is: 
+CorporaView_5 = ** Произошла ошибка при расчете специфичности
+CorporaView_6 = ** Не удалось открыть окно Мастера ссылок\	
+CorporaView_7 = ** Произошла ошибка при расчете словарной таблицы
+CorporaView_9 = ** Ошибка: не удается проивести запись в {0}
+
+CorpusPage_0  = Издания
+CorpusPage_1  = Добавить издание
+CorpusPage_10 = Свойства слова
+CorpusPage_11 = Добавить определение свойства
+CorpusPage_12 = Добавить опредление свойства структуры
+CorpusPage_13 = Удалить определение свойства
+CorpusPage_14 = Подкорпуса и распределения по умолчанию
+CorpusPage_15 = Добавить подкорпус
+CorpusPage_16 = N/A_caract�res de ponctuations s�parateurs
+CorpusPage_17 = Удалить подкорпус
+CorpusPage_18 = Добавить распределение
+CorpusPage_19 = N/A_caract�res d'ellision
+CorpusPage_2  = Удалить издание
+CorpusPage_20 = Удалить распределение
+CorpusPage_21 = Добавить запрос
+CorpusPage_22 = N/A_caract�res de fin de phrase
+CorpusPage_23 = Удалить запрос
+CorpusPage_24 = Свойства структуры
+CorpusPage_25 = Добавить определение свойства структуры
+CorpusPage_26 = N/A_Annotate the corpus
+CorpusPage_27 = Удалить определение свойства структуры
+CorpusPage_28 = Использовать только эти тесты при словарной сегментации
+CorpusPage_29 = Добавить параметр
+CorpusPage_3  = Шрифт
+CorpusPage_31 = Удалить параметр
+CorpusPage_32 = Добавить тест
+CorpusPage_33 = Добавить параметр
+CorpusPage_34 = Удалить тест
+CorpusPage_35 = 1.\	Нажмите на значок 
+CorpusPage_36 = 'папка', чтобы 
+CorpusPage_37 = выбрать папку с исходными материалами.
+CorpusPage_38 = 2.\	Вы можете изменить параметры на следующих этапах.
+CorpusPage_39 = 3.\	Вы можете 
+CorpusPage_4  = Добавить параметр
+CorpusPage_40 = сохранить параметры импорта,
+CorpusPage_41 = \ нажав на значок дискеты: 
+CorpusPage_42 = 4.\	Чтобы
+CorpusPage_43 = начать импортирование,
+CorpusPage_44 = \ нажмите на этот значок: 
+CorpusPage_45 = ПИ
+CorpusPage_46 = Папка с исходными материалами не содержала файл 'import.xml'. Создан новый.
+CorpusPage_47 = Ошибка при создании файла 'import.xml' 
+CorpusPage_48 = Загрузка параметров импорта из файла: 
+CorpusPage_49 = N/A_Default
+CorpusPage_5  = N/A_caract�res blancs s�parateurs
+CorpusPage_50 = Параметры модуля: 
+CorpusPage_51 = Только эти тесты
+CorpusPage_52 = Сохранение параметров импорта...
+CorpusPage_53 = Имя корпуса обязательно
+CorpusPage_54 = Имя корпуса должно содержать хотя бы одну букву
+CorpusPage_55 = Только эти тесты
+CorpusPage_6  = Удалить параметр
+CorpusPage_60 = N/A_OK
+CorpusPage_61 = Edit XSL stylesheet...
+CorpusPage_65 = N/A_Cannot save import configuration. No source folder selected.
+CorpusPage_66 = N/A_Cannot start import configuration. No source folder selected.
+CorpusPage_7  = Общая информация
+CorpusPage_8  = Имя корпуса*
+CorpusPage_9  = Описание - HTML
+
+CorrespondanceAnalysisEditorInput_0  = Собственные значения
+CorrespondanceAnalysisEditorInput_1  = Факт. план
+CorrespondanceAnalysisEditorInput_10 = ФАС
+CorrespondanceAnalysisEditorInput_2  = Гистограмма собственных значений propres
+CorrespondanceAnalysisEditorInput_26 = Масса
+CorrespondanceAnalysisEditorInput_27 = Дист
+CorrespondanceAnalysisEditorInput_29 = Конт
+CorrespondanceAnalysisEditorInput_3  = Результат анализа соответствий не может быть пустым 
+CorrespondanceAnalysisEditorInput_30 = Cos²
+CorrespondanceAnalysisEditorInput_4  = Фактор
+CorrespondanceAnalysisEditorInput_8  = Инф Строчки
+CorrespondanceAnalysisEditorInput_9  = Инф Колонки
+
+CreateFile_1 = Новый файл: {0}
+
+CreateFolder_1 = Новая папка: {0}
+
+CreateFrequencyList_8 = Загрузка таблицы частотности
+
+CreateMacro_0 = N/A_Macro name
+CreateMacro_1 = N/A_Please write the macro name
+
+CreatePartitionDialog_0  = Создать Распределение
+CreatePartitionDialog_1  = Простое
+CreatePartitionDialog_16 = Запросы не должны быть пустыми
+CreatePartitionDialog_2  = &Структура: 
+CreatePartitionDialog_3  = С подсказкой
+CreatePartitionDialog_4  = С&войство: 
+CreatePartitionDialog_5  = Продвинутое
+CreatePartitionDialog_6  = &Имя: 
+CreatePartitionDialog_7  = &Часть 
+CreatePartitionDialog_8  = Не задана ни одна часть
+CreatePartitionDialog_9  = Имя распределения не вводилось. Автоматическое имя: {0}
+
+CreatePartition_0        = Создание распределения по {0}
+CreatePartition_2        = ** Ошибка: распределение не создано
+CreatePartition_5        = Готово: {0} пунктов на {1} употреблений
+CreatePartition_55       = N/A_Done: {0} items for {1} occurrences
+CreatePartition_6        = Готово: {0} частей
+
+CreateSubCorpus_0      = ** Ошибка: подкорпус не был создан
+CreateSubCorpus_2      = N/A_Failed to get last CQP error: 
+CreateSubCorpus_begin  = Новый &Подкорпус
+CreateSubCorpus_create = Создать новый подокорпус для {0}
+
+CreateSubcorpusDialog_0  = Создать подкорпус
+CreateSubcorpusDialog_10 = &Запрос: 
+CreateSubcorpusDialog_11 = Некорректное имя
+CreateSubcorpusDialog_13 = Некорректный запрос
+CreateSubcorpusDialog_14 = Поле Запрос не должно быть пустым.
+CreateSubcorpusDialog_6  = Зна&чение: 
+CreateSubcorpusDialog_8  = Имя подкорпуса создано автоматически.
+
+CreateSubcorpus_7        = Составление подкорпуса для {0}, структура {1}, свойство {2} : {3}
+CreateSubcorpus_8        = Готово : {0} образован 
+CreateSubcorpus_9        = Составление подкорпуса для {0} по запросу <{1}>
+
+DONE = Готово: {0}
+
+DefineReferencePattern_0 = Шаблон ссылок для отображения
+DefineReferencePattern_1 = Шаблон ссылок для &отображения
+DefineReferencePattern_2 = Шаблон ссылок для отображения
+DefineReferencePattern_3 = Шаблон ссылок для &сортировки
+DefineReferencePattern_4 = Шаблон ссылок для сортировки
+DefineReferencePattern_5 = Шаблон ссылок для сортировки
+
+DeleteFile_0 = Вы уверены, что хотите удалить 
+DeleteFile_2 = ** Не удалось удалить файл 
+
+DeleteInCorporaView_1 = ** Ошибка при удалении подкорпуса {0}
+DeleteInCorporaView_2 = ** Ошибка при удалении распределения {0}
+
+DeleteLines_0 = Таблица должна содержать хотя бы одну строчку
+DeleteLines_1 = Вы уверены?
+
+DeleteObject_0  = Вы действительно хотите удалить {0}?
+DeleteObject_10 = {0} удален(о)
+DeleteObject_3  = ** Ошибка во время удаления
+DeleteObject_4  = Ошибка во время удаления {0} : {1}
+DeleteObject_5  = Удаление {0}
+
+DiagnosticPreferencePage_1 = Описание
+DiagnosticPreferencePage_2 = Число отображаемых значений свойства
+DiagnosticPreferencePage_3 = Сортировать части по размеру
+
+Diagnostique_0  = Структурные единицы {0}
+Diagnostique_1  = Информация о {0} уже сформирована. Хотите ли Вы ее обновить?
+Diagnostique_10 = Получение информации о структурных единицах
+Diagnostique_11 = Открытие окна
+Diagnostique_2  = ** Ошибка при чтении файла *informations* 
+Diagnostique_7  = Создание окна с информацией
+Diagnostique_8  = Получение общей информации
+Diagnostique_9  = Получение данных о словарных единицах
+
+ERROR_WHILE_LOADING_CONCORDANCE_LINE = ** Ошибка во время загрузки строк конкорданса: {0}
+
+ElementTreeLabelProvider_0 = ** Ошибка: элемент не записан 
+ElementTreeLabelProvider_1 = ** Ошибка: объект не является 'org.w3c.Element'
+
+EmpantWidget_0 = Контекст: 
+EmpantWidget_1 = форма
+EmpantWidget_2 = структура
+EmpantWidget_3 = от -
+EmpantWidget_4 = до -
+EmpantWidget_5 = и от
+EmpantWidget_6 = до
+EmpantWidget_7 = вклюая структуру, содержащую мотив
+EmpantWidget_8 = Активный левый контекст
+EmpantWidget_9 = Активный правый контекст
+
+Error_computing_specificities = ** Ошибка во время расчета специфичности: {0}
+Error_creating_partition      = ** Ошибка во время создания распределения: {0}
+
+ExecuteGroovyScriptFromFile_2 = Скрипт Groovy должен находиться в папке 
+
+ExecuteGroovyScript_0         = \ мс
+ExecuteGroovyScript_1         = N/A_Error during parameters initialisation
+ExecuteGroovyScript_2         = N/A_The user canceled the script execution
+
+ExecuteRScript_1 = Выполнение 
+ExecuteRScript_2 = Готово: 
+ExecuteRScript_3 = \ мс
+
+ExecuteRText_0 = Выполнение выделения текста... 
+ExecuteRText_1 = ** Ошибка во время выполнения скрипта R {0}: {1}
+ExecuteRText_2 = \ мс
+
+ExecuteScriptImport_0 = Начало импортирования
+ExecuteScriptImport_1 = ** Файл скрипта {0} не найден
+ExecuteScriptImport_2 = ** Ошибка: папка 'corpora' не существует: 
+ExecuteScriptImport_3 = N/A_Error: the folder {0} still exists. Cannot continue import. You can delete it manually and restart the import.
+ExecuteScriptImport_5 = ** Ошибка в параметрах словарной сегментации: импортирование прервано.
+ExecuteScriptImport_6 = Импортирование не завершено.
+ExecuteScriptImport_7 = Импортирование завершено: 
+ExecuteScriptImport_8 = ** Ошибка при загрузке корпуса
+
+ExecuteScriptR_0 = ** Файл скрипта R {0} не найден
+ExecuteScriptR_1 = ** Ошибка при выполнении скрипта R {0}: {1}
+
+ExecuteScript_3       = ** Не найдено ни одного интерпретатора для расширения файла скрипта 
+
+Exit_Menu_Label = Выход
+
+Explorer_0 = Папка {0} не должна быть удалена
+Explorer_1 = N/A_Go to parent folder
+Explorer_2 = N/A_Go to TXM home
+Explorer_3 = TXM
+Explorer_4 = ⇧
+Explorer_5 = ↻
+Explorer_6 = N/A_Refresh
+Explorer_7 = N/A_⌂
+Explorer_8 = N/A_Go to TXM home
+
+ExportCorpus_0 = ** Не удалось экспортировать корпу {0}
+ExportCorpus_3 = Экпортирование 
+ExportCorpus_4 = Готово, бинарный файл - {0} 
+
+ExportPreferencePage_1  = Конфигурация экспорта
+ExportPreferencePage_18 = Разделитель полей
+ExportPreferencePage_19 = Разделитель текста
+ExportPreferencePage_21 = Формат графиков R по умолчанию
+ExportPreferencePage_3  = Кодировка экспортируемых файлов
+ExportPreferencePage_4  = Показать результаты экспорта в текстовом редакторе
+
+ExportResult_0 = Экспорт результатов
+ExportResult_1 = N/A_Exporting...
+ExportResult_2 = Результаты экспорта сохранены: 
+ExportResult_3 = ** Экспорт: невозможно создать файл {0}: {1}
+ExportResult_4 = ** Не удалось произвести экспорт в 
+ExportResult_5 = ** Не удается прочитать {0}
+ExportResult_6 = ** Не удалось экспортировать результат {0}: {1}
+
+ExportSVG_0 = N/A_Exporting SVG...
+ExportSVG_2 = N/A_Exporting with device: 
+
+FAILED_TO_PARSE_OPTIONS    = ** Не удалось проанализировать опции TXM {0}: {1}
+FAILED_TO_SAVE_PREFERENCES = ** Не удалось сохранить персональные настройки
+
+FactorialMapEditor_0  = Факторы:  
+FactorialMapEditor_10 = ** Внутренняя ошибка: ошибка выбора плана ФАС
+FactorialMapEditor_11 = Изменить размер
+FactorialMapEditor_13 = Обновление факторного плана
+FactorialMapEditor_4  = Показать: 
+FactorialMapEditor_5  = колонки
+FactorialMapEditor_6  = строки
+FactorialMapEditor_8  = Перезагрузка факторного плана
+
+FileExplorerPreferencePage_0 = Рег. выр. скрытых файлов
+FileExplorerPreferencePage_1 = Показать скрытые файлы
+FileExplorerPreferencePage_2 = Показать папки
+
+FileTreeContentProvider_1 = ** Проводник: некорректное регулярное выражение
+FileTreeContentProvider_2 = \ ОШИБКА 
+FileTreeContentProvider_3 = Элемент ошибки: '
+FileTreeContentProvider_4 = '
+
+FrequencyListEditorInput_0 = Список форм
+FrequencyListEditorInput_1 = Pareto
+FrequencyListEditorInput_2 = Список форм не может быть пустым
+FrequencyListEditorInput_3 = Форма
+FrequencyListEditorInput_4 = Частотность
+FrequencyListEditorInput_5 = Цепочка знаков
+FrequencyListEditorInput_6 = Целое
+FrequencyListEditorInput_9 = Тип
+
+GenericMultiPageEditor_1 = ** Внутренняя ошибка: невозможно показать данные {0}.
+GenericMultiPageEditor_3 = ** Внутренняя ошибка: число редакторов RCP ({0}) должно соответствовать числу вводов ({1}).
+
+GetConcordancesDialog_0  = ** Диалоговое окно конкордансов: {0}
+GetConcordancesDialog_1  = Расчет специфичности 
+GetConcordancesDialog_13 = Вы должны выбрать одно свойство
+GetConcordancesDialog_14 = Некорректное свойство
+GetConcordancesDialog_15 = Вы должны выбрать одно свойство
+GetConcordancesDialog_4  = С&войство : 
+GetConcordancesDialog_5  = &Левый контекст (слова) : 
+GetConcordancesDialog_6  = &Правый контекст (слова) : 
+GetConcordancesDialog_7  = &Ссылка: 
+
+GetConcordances_4        = ** Ошибка при расчете конкордансов: {0}
+
+GraphicalLogger_0 = ** Ошибка {0}
+
+GroovyConsole_4 = \nВнутренняя ошибка.
+GroovyConsole_5 = Ошибка: 
+
+ImportDialog_0  = Параметры импорта - {0}
+ImportDialog_1  = Папка с исходными материалами
+ImportDialog_13 = Не удается найти корпус в бинарном формате в этой папке
+ImportDialog_14 = Кодировка по умолчанию этого компьютера
+ImportDialog_16 = Угадать
+ImportDialog_19 = Язык по умолчанию этого компьютера
+ImportDialog_22 = Выбрать
+ImportDialog_23 = Опции
+ImportDialog_4  = Кодировка букв: 
+ImportDialog_5  = Основной язык: 
+ImportDialog_6  = Параметры словарной сегментации: 
+
+ImportFormEditor_0 = ** отсутствует скрипт для импорта {0} 
+
+ImportPreferencePage_0 = Кодировка
+
+ImportSelectedText_0  = Импорт текста из буфера обмена
+ImportSelectedText_1  = clipboard
+ImportSelectedText_10 = Идентифицированный язык 
+ImportSelectedText_12 = Будет использован 
+ImportSelectedText_2  = ** Буфер обмена пуст
+ImportSelectedText_3  = Подтвердить
+ImportSelectedText_4  = Корпус {0} будет удален
+ImportSelectedText_6  = ** Внутренняя ошибка: не удается найти проект 'default' 
+
+IndexToCooccurrence_0 = ** Ошибка при связывании Индекса и Совместной встречаемости
+
+IndexToLexicalTable_0 = Невозможно составить словарную таблицу из Индекса, полученного на Корпусе
+
+InternalCorpusView_0 = ** Ошибка при подготовке информации о корпусе
+InternalCorpusView_1 = Перезагрузить
+InternalCorpusView_2 = ** Внутренняя ошибка: getText {0}
+
+InternalViewEditor_1  = Подготовка внутреннего вида...
+InternalViewEditor_10 = Внутренний вид: ошибка инициализации: 
+InternalViewEditor_11 = OK
+InternalViewEditor_16 = Ошибка
+InternalViewEditor_2  = Получение следующего результата...
+InternalViewEditor_25 = сформированный запрос: 
+InternalViewEditor_3  = Перезагрузка интерфейса
+InternalViewEditor_4  = Структура: 
+InternalViewEditor_5  = Свойство структуры: 
+
+Invalid_analysis_property = Некорректное свойство
+
+JobHandler_0 = N/A_Canceling...
+JobHandler_1 = N/A_Canceling 
+JobHandler_2 = N/A_ canceling requested
+JobHandler_3 = N/A_Failed to cancel 
+
+JobsTimer_12 = ч., 
+JobsTimer_13 = \ мин. и 
+JobsTimer_15 = Проделано за {0} ({1}).
+JobsTimer_16 = . (
+JobsTimer_17 = \ мс)
+JobsTimer_19 = Проделано за {0}.
+JobsTimer_2  = \ мс
+JobsTimer_20 = Job: 
+JobsTimer_21 = Exec: 
+JobsTimer_5  = \ с
+JobsTimer_9  = \ мин. и 
+
+LanguageSwitchHandler_0 = Язык интерфейса (LOCALE) не был определен
+LanguageSwitchHandler_1 = Файл {0} не найден
+LanguageSwitchHandler_3 = Выбрать язык
+LanguageSwitchHandler_5 = ** Изменение яызка: некорректый формат URL {0}
+LanguageSwitchHandler_7 = TXM.ini : 
+
+LastCQPError = Последняя ошибка CQP: 
+
+LineLabelProvider_1 = Не должно происходить
+
+LocalePreferencePage_1 = Конфигрурация языка пользовательского интерфейса
+LocalePreferencePage_2 = Язык интерфейса 
+
+MacrosExplorer_0 = N/A_New macro
+MacrosExplorer_1 = N/A_Create a new macro from a template
+
+MainPage_0  = Главная страница
+MainPage_1  = Главный
+MainPage_10 = \	Чтобы перейти на следующую панель, используйте закладку снизу.\n
+MainPage_11 = 3-\	Вы можете сохранить параметры импорта с помощью значка дискеты.\n
+MainPage_12 = 4-\	Для запуска импорта нажмите на зелёную стрелку.
+MainPage_13 = параллелизм
+MainPage_14 = Корпуса
+MainPage_15 = Добавить параллельный корпус
+MainPage_17 = Введите имя корпуса
+MainPage_18 = Входная стилевая таблица XSL
+MainPage_19 = Параметры словарной сегментации
+MainPage_2  = Параметры импорта в модуле {0}
+MainPage_20 = Основной язык
+MainPage_22 = Удалить корпус
+MainPage_23 = Кодировка
+MainPage_25 = Введите имя удаляемого корпуса
+MainPage_27 = Гиперссылки
+MainPage_28 = ** Ошибка при получении кодировки
+MainPage_29 = Добавить гиперссылку
+MainPage_3  = Папка с исходными материалами: 
+MainPage_30 = Создать гиперссылку из корпуса: 
+MainPage_31 = Выберите 2 корпуса:
+MainPage_33 = seg
+MainPage_34 = Удалить гиперссылку
+MainPage_36 = Введите номер удаляемой строки
+MainPage_38 = Убрать гиперссылку №
+MainPage_39 = Введите корректное число
+MainPage_4  = Имя корпуса (базы)
+MainPage_40 = Первый корпус
+MainPage_42 = Структура выравнивания
+MainPage_44 = * \n(имя архива без расширения, в котором будет храниться корпус)
+MainPage_45 = Описание
+MainPage_46 = Добавить 
+MainPage_47 = N/A_
+MainPage_49 = N/A_base name is mandatory
+MainPage_5  = N/A_Opening...
+MainPage_50 = N/A_refresh links table
+MainPage_52 = N/A_The source directory does not contain import.xml
+MainPage_53 = N/A_Sorry, 'the import.xml' file could not been created
+MainPage_54 = N/A_Load params from: 
+MainPage_55 = N/A_Params: 
+MainPage_6  = N/A_Saving...
+MainPage_7  = N/A_Starting...
+MainPage_8  = N/A_1-\	Click on the 'folder' icon to choose the source directory\n
+MainPage_9  = N/A_2-\	If you want to add details such as default subcorpus, exemple queries or types of word properties,\n
+
+MergeCols_1 = Новое имя
+MergeCols_2 = Имя новой колонки, образованной объединением
+MergeCols_5 = Имена: 
+MergeCols_6 = Объединение колонок завершено.
+
+MergeDeleteDialog_0 = объединить
+MergeDeleteDialog_1 = Объединить/Удалить
+MergeDeleteDialog_4 = имя результата объединения
+
+MergeLines_2 = Наберите имя новой строки, образованной в результате объединения
+
+MetadataPage_1 = Метаданные
+MetadataPage_2 = Параметры метаданных
+MetadataPage_3 = Refresh
+MetadataPage_4 = Заглавия колонок в файле с метаданными 
+MetadataPage_5 = Индентификатор текста
+MetadataPage_7 = No metadata file {0}
+
+MultipleValueTreeDialog_0 = добавление: 
+
+NavigationWidget_0 = N/A_Error while getting current position value : 
+
+ObjectExplorer_0  = Информация: 
+ObjectExplorer_10 = Удалить свойство
+ObjectExplorer_12 = Набрать имя удаляемого свойства
+ObjectExplorer_15 = Добавить свойство нижестоящим элементам
+ObjectExplorer_2  = Значение
+ObjectExplorer_21 = Удалить свойство у нижестоящих элементов
+ObjectExplorer_26 = Имя
+ObjectExplorer_27 = Ключ
+ObjectExplorer_3  = Новое свойство
+ObjectExplorer_4  = Имя свойства
+ObjectExplorer_5  = Введите имя добавляемого свойства
+ObjectExplorer_7  = новое имя
+
+ObjectSelectionDialog_0 = Селектор значений
+ObjectSelectionDialog_3 = Найдено {0} значений
+ObjectSelectionDialog_5 = Некорректное регулярное выражение: {0}
+
+ObjectSelector_0 = Объект: 
+ObjectSelector_1 = Выбор
+
+OpenBiblio_1 = ** В корпусе нет ни одного текста {0}
+OpenBiblio_2 = Выбрать текст
+OpenBiblio_7 = ** Не удается найти текст {0} в корпусе {1}
+OpenBiblio_9 = ** Нет ни одной библиографической записи для текста {0}
+
+OpenBrowser_0 = ** Ошибка при открытии библиографической записи 
+OpenBrowser_1 = . URL
+
+OpenEdition_0 = Выбрать часть
+OpenEdition_1 = ** Не удалось загрузить издание {0}
+OpenEdition_3 = Открытие издания {0} 
+OpenEdition_5 = ** Не удается найти первый текст с идентификатором {0} в корпусе или
+OpenEdition_7 = ** Не удается найти издание по умолчанию 
+OpenEdition_8 = ** Не удается найти первую страницу издания 
+
+OpenEmptyEditor_2 = ** Библиография: не удается найти папку {0}
+
+OpenGraph_8 = ** Не удается октрыть график {0}
+
+OpenParaBrowser_0 = Открытие Парабраузер//
+
+OpenSVGGraph_0 = График SVG 
+
+OpenTXMUserPreferences_0 = Параметры по умолчанию
+
+OpenURI_0 = ** OpenURL : Рабочий стол не поддерживается
+OpenURI_1 = ** Ошибка при открытии файла {0}
+
+ParaBrowserEditor_11 = ParaBrowser : get next({0}) struct {1} paraid {2} value {3}
+ParaBrowserEditor_18 = -Перейти к 
+ParaBrowserEditor_19 = -Оставаться на месте!!!!! NEXT - 
+ParaBrowserEditor_21 = _
+ParaBrowserEditor_22 = Открыть встроенный браузер
+ParaBrowserEditor_3  = Ссылка : 
+ParaBrowserEditor_4  = Ссылки
+ParaBrowserEditor_5  = Структура
+ParaBrowserEditor_9  = Ссылки: {0} : {1}
+
+ParametersDialog_0  = {0} parameters input
+ParametersDialog_1  = N/A_Run
+ParametersDialog_10 = N/A_Unknowed widget name: '
+ParametersDialog_11 = N/A_(* mandatory fields)
+ParametersDialog_12 = N/A_** Error : missing value: 
+ParametersDialog_13 = N/A_** Error : format error: 
+ParametersDialog_14 = N/A_Error in @Option name declaration: 
+ParametersDialog_15 = N/A_Error: the bean is not a groovy.lang.Script object
+ParametersDialog_17 = N/A_Error: the ''monitor'' (JobHandler class) binding is missing. Got: {0}.
+
+PartitionComposer_0  = Структура: 
+PartitionComposer_11 = Удалить
+PartitionComposer_2  = Выбрать значения для назначения: 
+PartitionComposer_3  = Новая часть
+PartitionComposer_5  = Часть
+PartitionComposer_6  = Удалить все части
+PartitionComposer_8  = Заголовок: 
+PartitionComposer_9  = Назначить
+
+PartsSize_0  = N/A_\n Sorted by size
+PartsSize_10 = Размеры распределения {0} корпуса {1} в порядке величины
+PartsSize_18 = Размеры: {0}
+PartsSize_2  = N/A_Number of words per part
+
+PasteFile_1 = ** Ошибка при копировании  
+PasteFile_3 = ** Не удалось удалить
+PasteFile_4 = : 
+
+Preferences_Menu_Label = Опции
+
+ProgressionDialog_0  = Параметры прогрессии 
+ProgressionDialog_1  = Тип графа: 
+ProgressionDialog_10 = Прогрессия: некорректное регулярное выражение: 
+ProgressionDialog_11 = Масштаб полос
+ProgressionDialog_13 = Опции вида
+ProgressionDialog_14 = Различные стили строк
+ProgressionDialog_15 = Повторять идентичные значения
+ProgressionDialog_16 = Ч/Б
+ProgressionDialog_17 = Ошибка: мультипликатор полосы: 
+ProgressionDialog_2  = кумулятивный
+ProgressionDialog_3  = плотность
+ProgressionDialog_4  = Структурная единица: 
+ProgressionDialog_5  = удалить
+ProgressionDialog_7  = Рег. Выр.: 
+ProgressionDialog_8  = Запросы: 
+ProgressionDialog_9  = добавить
+
+ProgressionEditorInput_0 = PROGRESSION NAME
+
+ProgressionForm_0  = N/A_Type :
+ProgressionForm_1  = N/A_cumulatif
+ProgressionForm_10 = N/A_R�p�t�
+ProgressionForm_11 = N/A_N&&B
+ProgressionForm_12 = N/A_REQUETES :
+ProgressionForm_13 = N/A_ajouter
+ProgressionForm_14 = N/A_supprimer
+ProgressionForm_2  = N/A_densit�
+ProgressionForm_3  = N/A_Echelle
+ProgressionForm_5  = N/A_Options d'affichage
+ProgressionForm_6  = N/A_Unit� structurelle :
+ProgressionForm_7  = N/A_Propri�t� :
+ProgressionForm_8  = N/A_Exp. R�g. :
+ProgressionForm_9  = N/A_Syles de ligne diff�rents
+
+PropertiesSelector_0 = Не удается загрузить свойства корпуса {0} ({1})
+PropertiesSelector_1 = Свойства: 
+PropertiesSelector_2 = Править
+
+PropertySelector_0 = Выбрать свойство
+
+PurgeCorpora_0  = Осторожно! Эта команда приведет к удалению всех выделенных корпусов. Продолжить?
+PurgeCorpora_1  = Удаляемые корпуса 
+PurgeCorpora_10 = Создание нового рабочего пространства
+PurgeCorpora_12 = Перезагрузка платформы
+PurgeCorpora_13 = ** Ошибка: не удалось найти рабочее пространство: 
+PurgeCorpora_2  = ** Внимание! не были удалены корпуса: 
+PurgeCorpora_3  = Осторожно! Эта команда приведет к удалению всех корпусов. Продолжить?
+PurgeCorpora_4  = ** Ошибка: переменная окружения 'TXMHOME' не задана (ее значение по умолчанию -  '$HOME/TXM'). Работа прекращена.
+PurgeCorpora_5  = Удаление всех корпусов
+PurgeCorpora_7  = ** Не удалось удалить корпуса
+PurgeCorpora_9  = ** Не удалось удалить регистр
+
+QueriesView_1  = Экспортировать всё
+QueriesView_10 = ошибка: 
+QueriesView_5  = Запросы:\n
+
+QueryAssistDialog_0  = Мастер Запросов
+QueryAssistDialog_1  = Дополнительное слово
+QueryAssistDialog_10 = совпадает с
+QueryAssistDialog_11 = начинается с
+QueryAssistDialog_12 = заканчивается на
+QueryAssistDialog_13 = содержит
+QueryAssistDialog_2  = Я ищу: 
+QueryAssistDialog_3  = слово
+QueryAssistDialog_32 = за ним 
+QueryAssistDialog_33 = с интервалом не менее 0 слов
+QueryAssistDialog_34 = с интервалом не менее 1 слова
+QueryAssistDialog_8  = - Слово №
+
+QueryIndexEditor_0  = N/A_Query Index of 
+QueryIndexEditor_1  = N/A_replacing line: 
+QueryIndexEditor_10 = N/A_queries
+QueryIndexEditor_11 = N/A_QueryIndex tooltip
+QueryIndexEditor_2  = N/A_Failed to add line with query: 
+QueryIndexEditor_3  = N/A_Line added.
+QueryIndexEditor_4  = N/A_Load from a file
+QueryIndexEditor_5  = N/A_*.properties
+QueryIndexEditor_6  = N/A_Cannot read from file: 
+QueryIndexEditor_7  = N/A_Link to concordance
+QueryIndexEditor_8  = N/A_Link to progression
+QueryIndexEditor_9  = N/A_delete lines
+
+RVariablesView_1 = Обновить переменные
+RVariablesView_2 = Показать отчет об оценках
+RVariablesView_9 = имя TXM {0} >> имя R {1}
+
+ReferencerEditor_0  = Расчет ссылок <{0}> в {1} с приоритетом {2} по шаблону {3}
+ReferencerEditor_10 = Получение индексов
+ReferencerEditor_11 = Ссылки
+ReferencerEditor_12 = Группировка позиций по индексам
+ReferencerEditor_13 = Обновление интерфейса
+ReferencerEditor_17 = Показ первой страницы результатов 
+ReferencerEditor_19 = Показ последней страницы результатов 
+ReferencerEditor_21 = Показ следующей страницы результатов 
+ReferencerEditor_23 = Показ предыдущей страницы результатов 
+ReferencerEditor_25 = Открытие конкорданса
+ReferencerEditor_5  = Расчет ссылок {0}
+ReferencerEditor_6  = Шаблон ссылок 
+ReferencerEditor_7  = Ни одного результата
+ReferencerEditor_8  = Получение употреблений
+ReferencerEditor_9  = Единицы
+
+ReferencerPreferencePage_2 = Ссылки
+ReferencerPreferencePage_3 = Сортировать ссылки по частотности
+
+RefreshingCorporaView = Обновление вида корпусов...
+
+RenameFile_0 = Переименовать файл
+RenameFile_2 = Переименование через: 
+RenameFile_3 = ** Не удалось переименовать 
+
+RestartTXM_0 = Перезагрузка видов...
+RestartTXM_1 = Перезагрузить TXM
+
+RunGroovyScript_0 = Выполнение скрипта
+RunGroovyScript_1 = &Выполнить скрипт
+RunGroovyScript_2 = Выполнить скрипт
+RunGroovyScript_3 = *.groovy
+RunGroovyScript_4 = Ошибка при открытии скрипта groovy : {0}
+RunGroovyScript_8 = ** Ошибка при выполнении скрипта groovy : {0}
+RunGroovyScript_9 = Выполнение скрипта
+
+SVGGraphicEditor_1 = Не удается показать график на основе предоставленной информации.
+
+SaveAs_2 = ** Не удалось сохранить 
+
+ScriptPreferencePage_0 = Следующий номер сессии 
+ScriptPreferencePage_3 = &Корневая папка
+
+SetContextSize_1 = Задать размер &контекстов
+SetContextSize_2 = Задать размер контекстов
+SetContextSize_3 = Размер левого контекста
+SetContextSize_4 = Размер правого контекста
+
+SetEncoding_0 = Изменить кодировку
+SetEncoding_1 = Изменить кодировку.\n\n\	Используемая кодировка: 
+SetEncoding_2 = \n\	Кодировка по умолчанию:  
+
+SetLineNumber_0 = Количество строк на странице
+SetLineNumber_1 = № строки
+
+SetSortProperty_1 = Задать свойство &Сортировки
+SetSortProperty_2 = Задать свойство сортировки
+SetSortProperty_3 = Сортировка свойств 
+
+ShowSelected_4 = Править свойство 'LANG'
+
+ShowSvgHelp_0 = Команды SVG
+ShowSvgHelp_1 = Перевод: Shift + Левый щелчок + Перетащить\n
+ShowSvgHelp_2 = Масштаб +/- : Shift + Правый щелчок + Перетащить\n
+ShowSvgHelp_3 = Увеличение выделения: Ctrl + Левый щелчок + Перетащить\n
+ShowSvgHelp_4 = Поворот: Ctrl + Правый щелчок + Перетащить\n
+ShowSvgHelp_5 = Исходное состояние: F5
+
+SingularValuesEditor_0 = Ошибочный ввод
+
+SortPropertySelection_0 = Сортировка свойств 
+
+Structure_field_not_empty = Поле Структура не должно быть пустым.
+
+Submit_0 = Сохранить
+
+TXMCqpServerWatcher_0 = Поисковая машина остановлена
+TXMCqpServerWatcher_1 = Пожалуйста, подождите, пока поисковая машина перезагружается...
+
+TXMRServeWatcher_0 = Статистическая машина остановлена
+TXMRServeWatcher_1 = Пожалуйста, подождите, пока статистическая машина перезагружается...
+TXMRServeWatcher_2 = Ok
+TXMRServeWatcher_3 = Перезагрузка вида корпусов...
+TXMRServeWatcher_4 = Пожалуйста, подождите...
+
+TablableVector_0 = Обе таблицы должны быть одинакового размера.
+
+TableEditor_0 = Невозможно показать таблицу с предложенной информацией
+
+TableKeyListener_1 = Наберите регулярное выражение вашего запроса
+TableKeyListener_6 = Скопированные строки: \n
+
+TableSorter_0 = Номер колонки слишком велик.
+
+TextometriePreferencePage_0  = N/A_Automatically find new updates and notify me
+TextometriePreferencePage_1  = N/A_General preferences backup
+TextometriePreferencePage_14 = Настройки сохранены в 
+TextometriePreferencePage_15 = Экспорт настроек в файл
+TextometriePreferencePage_18 = Настройки импортированы из 
+TextometriePreferencePage_19 = Необходимо закрыть окно настроек, чтобы TXM могла их обновить
+TextometriePreferencePage_2  = N/A_Automatic updates
+TextometriePreferencePage_20 = Импортировать из файла
+
+TreeTaggerPreferencePage_0 = N/A_Don't normalize apostrophes to ' 
+TreeTaggerPreferencePage_1 = Путь к установочной папке TreeTagger
+TreeTaggerPreferencePage_2 = Путь к папке с языковыми моделами для TreeTagger
+TreeTaggerPreferencePage_3 = Опции [разделитель '  ' (2 пробела)]
+
+TxmBrowser_0  = Начало
+TxmBrowser_10 = Не удается запустить встроенные браузер. Вы должны отрегулировать соответствующий параметр в Настройках, с помощью меню Общие / Веб браузер
+TxmBrowser_11 = Нет предыдущего текста
+TxmBrowser_12 = Нет следующего текста
+TxmBrowser_5  = предыдущая страница
+TxmBrowser_6  = следующая страница
+TxmBrowser_7  = В конец
+TxmBrowser_8  = следующий текст
+TxmBrowser_9  = предыдущий текст
+
+TxmCommand_1 = Загрузка расширения
+
+TxtEditor_0 = ТекстовыйРедактор: 
+TxtEditor_1 = Найденная кодировка 
+
+UIParameterException_0 = N/A_Error  
+
+UserPreferencePage_0 = Страница Пользователя
+UserPreferencePage_3 = Не требуется подтверждение для удаления объекта
+
+ViewPropertySelectionDialog_0 = Отображение свойств
+
+ViewPropertySelection_0       = Отображение свойств
+
+WordCloudPreferencePage_0 = N/A_Maximum number of words
+WordCloudPreferencePage_1 = N/A_Minimal frequency
+WordCloudPreferencePage_2 = N/A_Percents of rotated words
+WordCloudPreferencePage_3 = N/A_Random color order

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_ru.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/jface/DoubleFieldEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/jface/DoubleFieldEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/jface/DoubleFieldEditor.java	(revision 324)
@@ -0,0 +1,73 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.jface;
+
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.swt.widgets.Composite;
+
+// TODO: Auto-generated Javadoc
+/**
+ * extends the StringField Editor to manage double values @ author mdecorde.
+ */
+public class DoubleFieldEditor extends StringFieldEditor {
+
+	/**
+	 * Instantiates a new double field editor.
+	 *
+	 * @param minscore the minscore
+	 * @param string the string
+	 * @param fieldEditorParent the field editor parent
+	 */
+	public DoubleFieldEditor(String minscore, String string,
+			Composite fieldEditorParent) {
+		super(minscore, string, fieldEditorParent);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.StringFieldEditor#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		try {
+			Double.parseDouble(this.getStringValue());
+			//System.out.println("isValid"); //$NON-NLS-1$
+		} catch (Exception e) {
+			return false;
+		} 
+		return true;
+	}
+
+	/**
+	 * Gets the double value.
+	 *
+	 * @return the double value
+	 */
+	public double getDoubleValue() {
+		return Double.parseDouble(this.getStringValue());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/jface/DoubleFieldEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/TxmPreferences.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/TxmPreferences.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/TxmPreferences.java	(revision 324)
@@ -0,0 +1,405 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Arrays;
+import java.util.Properties;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Manage TXM configuration prefs: set, remove and get.
+ *
+ * @author mdecorde
+ */
+public class TxmPreferences {
+
+	
+	public static final String SCOPE = "instance"; //$NON-NLS-1$
+	
+	/**
+	 * print TxmPreferences in the console.
+	 */
+	public static void dump() {
+		try {
+			IPreferencesService service = Platform.getPreferencesService();
+			System.out.println("root:"); //$NON-NLS-1$
+			for (String children : service.getRootNode().childrenNames()) {
+				System.out.println(" scope: " + children); //$NON-NLS-1$
+				String[] subchildren = service.getRootNode().node(children).childrenNames();
+				Arrays.sort(subchildren);
+				for (String children2 : subchildren) {
+					System.out.println("  node: "+ children2); //$NON-NLS-1$
+					if (children2.equals(Application.PLUGIN_ID)) {
+						String[] keys = service.getRootNode().node(children).node(children2).keys();
+						Arrays.sort(keys);
+						for (String key2 : keys) {
+							System.out.println(
+									"   " + key2 + " = " + service.getRootNode().node(children).node(children2).get(key2, null)); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			System.err.println(e);
+		}
+	}
+	
+	public static Preferences getPreferences() {
+		IPreferencesService service = Platform.getPreferencesService();
+		return service.getRootNode().node(SCOPE).node(Application.PLUGIN_ID);
+	}
+
+	/**
+	 * read a UTF-8 tabulated file key1=value1 key2=value2.
+	 *
+	 * @param file the file
+	 */
+	public static void importFromFile(File file) {
+		importFromFile(file, "UTF-8", false); //$NON-NLS-1$
+	}
+
+	/**
+	 * read a tabulated file key1=value1 key2=value2.
+	 *
+	 * @param file the file
+	 * @param encoding the encoding
+	 */
+	public static boolean importFromFile(File file, String encoding, boolean javaproperties) {
+		boolean ret = true;
+		BufferedReader input = null;
+		try {
+			//System.out.println("importFromFile: "+file+" encoding: "+encoding);
+			input = new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));
+
+			if (javaproperties) {
+				Properties prop = new Properties();
+				prop.load(input);
+				for (Object key : prop.keySet()) {
+					//System.out.println("prop: "+key.toString()+"="+prop.get(key).toString());
+					TxmPreferences.set(key.toString(), prop.get(key).toString());
+				}
+			} else {
+				String line = input.readLine();
+				while (line != null) {
+					String[] split = line.split("=", 2); //$NON-NLS-1$
+					if (split.length == 2) {
+						//System.out.println("Set preference: "+line);
+						TxmPreferences.set(split[0], split[1]);
+					}
+					line = input.readLine();
+				}
+			}
+		} catch (Exception e) {
+			System.err.println(e);
+			ret = false;
+		} finally {
+			if (input != null)
+				try {
+					input.close();
+				} catch (IOException e) {org.txm.rcp.utils.Logger.printStackTrace(e);}
+		}
+		return ret;
+	}
+
+	/**
+	 * set a property which value is a String.
+	 *
+	 * @param key the key
+	 * @param value the value
+	 */
+	public static void set(String key, String value) {
+		IPreferencesService service = Platform.getPreferencesService();
+		service.getRootNode().node(SCOPE).node(Application.PLUGIN_ID).put(key, value); //$NON-NLS-1$
+		try {
+			service.getRootNode().flush();
+		} catch (BackingStoreException e) {
+			System.err.println(e);
+		}
+	}
+
+	/**
+	 * set a property which value is a boolean.
+	 *
+	 * @param key the key
+	 * @param value the value
+	 */
+	public static void set(String key, boolean value) {
+		IPreferencesService service = Platform.getPreferencesService();
+		service.getRootNode()
+		.node(SCOPE).node(Application.PLUGIN_ID).putBoolean(key, value); //$NON-NLS-1$
+		try {
+			service.getRootNode().flush();
+		} catch (BackingStoreException e) {
+			System.err.println(e);
+		}
+	}
+
+	/**
+	 * set a property which value is a double.
+	 *
+	 * @param key the key
+	 * @param value the value
+	 */
+	public static void set(String key, double value) {
+		IPreferencesService service = Platform.getPreferencesService();
+		service.getRootNode()
+		.node(SCOPE).node(Application.PLUGIN_ID).putDouble(key, value); //$NON-NLS-1$
+		try {
+			service.getRootNode().flush();
+		} catch (BackingStoreException e) {
+			System.err.println(e);
+		}
+	}
+
+	/**
+	 * set a property which value is a float.
+	 *
+	 * @param key the key
+	 * @param value the value
+	 */
+	public static void set(String key, float value) {
+		IPreferencesService service = Platform.getPreferencesService();
+		service.getRootNode()
+		.node(SCOPE).node(Application.PLUGIN_ID).putFloat(key, value); //$NON-NLS-1$
+		try {
+			service.getRootNode().flush();
+		} catch (BackingStoreException e) {
+			System.err.println(e);
+		}
+	}
+
+	/**
+	 * set a property which value is a int.
+	 *
+	 * @param key the key
+	 * @param value the value
+	 */
+	public static void set(String key, int value) {
+		IPreferencesService service = Platform.getPreferencesService();
+		service.getRootNode()
+		.node(SCOPE).node(Application.PLUGIN_ID).putInt(key, value); //$NON-NLS-1$
+		try {
+			service.getRootNode().flush();
+		} catch (BackingStoreException e) {
+			System.err.println(e);
+		}
+	}
+
+	/**
+	 * set a property which value is a long.
+	 *
+	 * @param key the key
+	 * @param value the value
+	 */
+	public static void set(String key, long value) {
+		IPreferencesService service = Platform.getPreferencesService();
+		service.getRootNode()
+		.node(SCOPE).node(Application.PLUGIN_ID).putLong(key, value); //$NON-NLS-1$
+		try {
+			service.getRootNode().flush();
+		} catch (BackingStoreException e) {
+			System.err.println(e);
+		}
+	}
+
+	/**
+	 * set a property which value is a byte array.
+	 *
+	 * @param key the key
+	 * @param value the value
+	 */
+	public static void set(String key, byte[] value) {
+		IPreferencesService service = Platform.getPreferencesService();
+		service.getRootNode()
+		.node(SCOPE).node(Application.PLUGIN_ID).putByteArray(key, value); //$NON-NLS-1$
+		try {
+			service.getRootNode().flush();
+		} catch (BackingStoreException e) {
+			System.err.println(e);
+		}
+	}
+
+	/**
+	 * get a property as a String.
+	 *
+	 * @param key the key
+	 * @return the string
+	 */
+	public static String get(String key) {
+		IPreferencesService service = Platform.getPreferencesService();
+		return service.getRootNode()
+				.node(SCOPE).node(Application.PLUGIN_ID).get(key, null); //$NON-NLS-1$
+	}
+
+	/**
+	 * get a property as a String.
+	 *
+	 * @param key the key
+	 * @return the string
+	 */
+	public static String get(String key, String def) {
+		String rez = get(key);
+		if (rez == null) rez = def;
+		return rez;
+	}
+
+	/**
+	 * get a property as a Boolean.
+	 *
+	 * @param key the key
+	 * @return the boolean
+	 */
+	public static Boolean getBoolean(String key) {
+		IPreferencesService service = Platform.getPreferencesService();
+		return service.getRootNode()
+				.node(SCOPE).node(Application.PLUGIN_ID).getBoolean(key, false); //$NON-NLS-1$
+	}
+
+	/**
+	 * get a property as a Boolean.
+	 *
+	 * @param key the key
+	 * @param defaultvalue the defaultvalue
+	 * @return the boolean
+	 */
+	public static Boolean getBoolean(String key, boolean defaultvalue) {
+		IPreferencesService service = Platform.getPreferencesService();
+		return service.getRootNode()
+				.node(SCOPE).node(Application.PLUGIN_ID).getBoolean(key, defaultvalue); //$NON-NLS-1$
+	}
+
+	/**
+	 * get a property as a Double.
+	 *
+	 * @param key the key
+	 * @return the double
+	 */
+	public static Double getDouble(String key) {
+		IPreferencesService service = Platform.getPreferencesService();
+		return service.getRootNode()
+				.node(SCOPE).node(Application.PLUGIN_ID).getDouble(key, 0.0d); //$NON-NLS-1$
+	}
+
+	/**
+	 * get a property as a Integer.
+	 *
+	 * @param key the key
+	 * @return the int
+	 */
+	public static Integer getInt(String key) {
+		return getInt(key, 0);
+	}
+
+	/**
+	 * Gets the int.
+	 *
+	 * @param key the key
+	 * @param i the i
+	 * @return the int
+	 */
+	public static int getInt(String key, int i) {
+		IPreferencesService service = Platform.getPreferencesService();
+		return service.getRootNode()
+				.node(SCOPE).node(Application.PLUGIN_ID).getInt(key, i); //$NON-NLS-1$
+	}
+
+
+	/**
+	 * Gets the float.
+	 *
+	 * @param key the key
+	 * @param def the def
+	 * @return the float
+	 */
+	public static float getFloat(String key, float def) {
+		IPreferencesService service = Platform.getPreferencesService();
+		return service.getRootNode()
+				.node(SCOPE).node(Application.PLUGIN_ID).getFloat(key, def); //$NON-NLS-1$
+	}
+
+	/**
+	 * remove a property.
+	 *
+	 * @param key the key
+	 */
+	public static void remove(String key) {
+		IPreferencesService service = Platform.getPreferencesService();
+		service.getRootNode()
+		.node(SCOPE).node(Application.PLUGIN_ID).remove(key); //$NON-NLS-1$
+		try {
+			service.getRootNode().flush();
+		} catch (BackingStoreException e) {
+			System.err.println(e);
+		}
+	}
+
+//	/**
+//	 * return all stored properties.
+//	 *
+//	 * @return the properties
+//	 */
+//	public static Properties getProperties() {
+//		return ApplicationWorkbenchAdvisor.getProperties();
+//	}
+
+	/**
+	 * Gets the string.
+	 *
+	 * @param key the key
+	 * @param defaultvalue the defaultvalue
+	 * @return the string
+	 */
+	public static String getString(String key, String defaultvalue) {
+		String ret = get(key);
+		if (ret == null)
+			return defaultvalue;
+		return ret;
+	}
+
+	public static String[] getAllKeys() {
+		IPreferencesService service = Platform.getPreferencesService();
+		Preferences prefs = service.getRootNode().node(SCOPE).node(Application.PLUGIN_ID); //$NON-NLS-1$
+		try {
+			return prefs.keys();
+		} catch (BackingStoreException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+			return new String[0];
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/TxmPreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/splashHandlers/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/splashHandlers/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/splashHandlers/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p></p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/splashHandlers/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/splashHandlers/InteractiveSplashHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/splashHandlers/InteractiveSplashHandler.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/splashHandlers/InteractiveSplashHandler.java	(revision 324)
@@ -0,0 +1,333 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.splashHandlers;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.splash.AbstractSplashHandler;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class InteractiveSplashHandler.
+ *
+ * @since 3.3
+ */
+public class InteractiveSplashHandler extends AbstractSplashHandler {
+
+	/** The Constant F_LABEL_HORIZONTAL_INDENT. */
+	private final static int F_LABEL_HORIZONTAL_INDENT = 175;
+
+	/** The Constant F_BUTTON_WIDTH_HINT. */
+	private final static int F_BUTTON_WIDTH_HINT = 80;
+
+	/** The Constant F_TEXT_WIDTH_HINT. */
+	private final static int F_TEXT_WIDTH_HINT = 175;
+
+	/** The Constant F_COLUMN_COUNT. */
+	private final static int F_COLUMN_COUNT = 3;
+
+	/** The composite login. */
+	private Composite fCompositeLogin;
+
+	/** The text username. */
+	private Text fTextUsername;
+
+	/** The text password. */
+	private Text fTextPassword;
+
+	/** The button ok. */
+	private Button fButtonOK;
+
+	/** The button cancel. */
+	private Button fButtonCancel;
+
+	/** The authenticated. */
+	private boolean fAuthenticated;
+
+	/**
+	 * Instantiates a new interactive splash handler.
+	 */
+	public InteractiveSplashHandler() {
+		fCompositeLogin = null;
+		fTextUsername = null;
+		fTextPassword = null;
+		fButtonOK = null;
+		fButtonCancel = null;
+		fAuthenticated = false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.splash.AbstractSplashHandler#init(org.eclipse.swt.widgets
+	 * .Shell)
+	 */
+	@Override
+	public void init(final Shell splash) {
+		// Store the shell
+		super.init(splash);
+		// Configure the shell layout
+		configureUISplash();
+		// Create UI
+		createUI();
+		// Create UI listeners
+		createUIListeners();
+		// Force the splash screen to layout
+		splash.layout(true);
+		// Keep the splash screen visible and prevent the RCP application from
+		// loading until the close button is clicked.
+		doEventLoop();
+	}
+
+	/**
+	 * Do event loop.
+	 */
+	private void doEventLoop() {
+		Shell splash = getSplash();
+		while (fAuthenticated == false) {
+			if (splash.getDisplay().readAndDispatch() == false) {
+				splash.getDisplay().sleep();
+			}
+		}
+	}
+
+	/**
+	 * Creates the ui listeners.
+	 */
+	private void createUIListeners() {
+		// Create the OK button listeners
+		createUIListenersButtonOK();
+		// Create the cancel button listeners
+		createUIListenersButtonCancel();
+	}
+
+	/**
+	 * Creates the ui listeners button cancel.
+	 */
+	private void createUIListenersButtonCancel() {
+		fButtonCancel.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				handleButtonCancelWidgetSelected();
+			}
+		});
+	}
+
+	/**
+	 * Handle button cancel widget selected.
+	 */
+	private void handleButtonCancelWidgetSelected() {
+		// Abort the loading of the RCP application
+		getSplash().getDisplay().close();
+		System.exit(0);
+	}
+
+	/**
+	 * Creates the ui listeners button ok.
+	 */
+	private void createUIListenersButtonOK() {
+		fButtonOK.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				handleButtonOKWidgetSelected();
+			}
+		});
+	}
+
+	/**
+	 * Handle button ok widget selected.
+	 */
+	private void handleButtonOKWidgetSelected() {
+		String username = fTextUsername.getText();
+		String password = fTextPassword.getText();
+		// Aunthentication is successful if a user provides any username and
+		// any password
+		if ((username.length() > 0) && (password.length() > 0)) {
+			fAuthenticated = true;
+		} else {
+			MessageDialog.openError(getSplash(), "Authentication Failed", //$NON-NLS-1$
+					"A username and password must be specif ied to login."); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Creates the ui.
+	 */
+	private void createUI() {
+		// Create the login panel
+		createUICompositeLogin();
+		// Create the blank spanner
+		createUICompositeBlank();
+		// Create the user name label
+		createUILabelUserName();
+		// Create the user name text widget
+		createUITextUserName();
+		// Create the password label
+		createUILabelPassword();
+		// Create the password text widget
+		createUITextPassword();
+		// Create the blank label
+		createUILabelBlank();
+		// Create the OK button
+		createUIButtonOK();
+		// Create the cancel button
+		createUIButtonCancel();
+	}
+
+	/**
+	 * Creates the ui button cancel.
+	 */
+	private void createUIButtonCancel() {
+		// Create the button
+		fButtonCancel = new Button(fCompositeLogin, SWT.PUSH);
+		fButtonCancel.setText("Cancel"); //$NON-NLS-1$
+		// Configure layout data
+		GridData data = new GridData(SWT.NONE, SWT.NONE, false, false);
+		data.widthHint = F_BUTTON_WIDTH_HINT;
+		data.verticalIndent = 10;
+		fButtonCancel.setLayoutData(data);
+	}
+
+	/**
+	 * Creates the ui button ok.
+	 */
+	private void createUIButtonOK() {
+		// Create the button
+		fButtonOK = new Button(fCompositeLogin, SWT.PUSH);
+		fButtonOK.setText("OK"); //$NON-NLS-1$
+		// Configure layout data
+		GridData data = new GridData(SWT.NONE, SWT.NONE, false, false);
+		data.widthHint = F_BUTTON_WIDTH_HINT;
+		data.verticalIndent = 10;
+		fButtonOK.setLayoutData(data);
+	}
+
+	/**
+	 * Creates the ui label blank.
+	 */
+	private void createUILabelBlank() {
+		Label label = new Label(fCompositeLogin, SWT.NONE);
+		label.setVisible(false);
+	}
+
+	/**
+	 * Creates the ui text password.
+	 */
+	private void createUITextPassword() {
+		// Create the text widget
+		int style = SWT.PASSWORD | SWT.BORDER;
+		fTextPassword = new Text(fCompositeLogin, style);
+		// Configure layout data
+		GridData data = new GridData(SWT.NONE, SWT.NONE, false, false);
+		data.widthHint = F_TEXT_WIDTH_HINT;
+		data.horizontalSpan = 2;
+		fTextPassword.setLayoutData(data);
+	}
+
+	/**
+	 * Creates the ui label password.
+	 */
+	private void createUILabelPassword() {
+		// Create the label
+		Label label = new Label(fCompositeLogin, SWT.NONE);
+		label.setText("&Password:"); //$NON-NLS-1$
+		// Configure layout data
+		GridData data = new GridData();
+		data.horizontalIndent = F_LABEL_HORIZONTAL_INDENT;
+		label.setLayoutData(data);
+	}
+
+	/**
+	 * Creates the ui text user name.
+	 */
+	private void createUITextUserName() {
+		// Create the text widget
+		fTextUsername = new Text(fCompositeLogin, SWT.BORDER);
+		// Configure layout data
+		GridData data = new GridData(SWT.NONE, SWT.NONE, false, false);
+		data.widthHint = F_TEXT_WIDTH_HINT;
+		data.horizontalSpan = 2;
+		fTextUsername.setLayoutData(data);
+	}
+
+	/**
+	 * Creates the ui label user name.
+	 */
+	private void createUILabelUserName() {
+		// Create the label
+		Label label = new Label(fCompositeLogin, SWT.NONE);
+		label.setText("&User Name:"); //$NON-NLS-1$
+		// Configure layout data
+		GridData data = new GridData();
+		data.horizontalIndent = F_LABEL_HORIZONTAL_INDENT;
+		label.setLayoutData(data);
+	}
+
+	/**
+	 * Creates the ui composite blank.
+	 */
+	private void createUICompositeBlank() {
+		Composite spanner = new Composite(fCompositeLogin, SWT.NONE);
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		data.horizontalSpan = F_COLUMN_COUNT;
+		spanner.setLayoutData(data);
+	}
+
+	/**
+	 * Creates the ui composite login.
+	 */
+	private void createUICompositeLogin() {
+		// Create the composite
+		fCompositeLogin = new Composite(getSplash(), SWT.BORDER);
+		GridLayout layout = new GridLayout(F_COLUMN_COUNT, false);
+		fCompositeLogin.setLayout(layout);
+	}
+
+	/**
+	 * Configure ui splash.
+	 */
+	private void configureUISplash() {
+		// Configure layout
+		FillLayout layout = new FillLayout();
+		getSplash().setLayout(layout);
+		// Force shell to inherit the splash background
+		getSplash().setBackgroundMode(SWT.INHERIT_DEFAULT);
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/splashHandlers/InteractiveSplashHandler.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/AbstractSplashHandler2.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/AbstractSplashHandler2.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/AbstractSplashHandler2.java	(revision 324)
@@ -0,0 +1,59 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.splash.BasicSplashHandler;
+
+// TODO: Auto-generated Javadoc
+/**
+ * SplashScreen for TXM: not used yet
+ */
+public class AbstractSplashHandler2 extends BasicSplashHandler {
+
+	/**
+	 * Instantiates a new abstract splash handler2.
+	 */
+	public AbstractSplashHandler2() {
+		Composite c = this.getContent();
+//		new Label(c, SWT.BORDER).setText(Messages.AbstractSplashHandler2_0);
+//		IProgressMonitor bundle = this.getBundleProgressMonitor();
+//		// .subTask("HELLLOOOOO");
+//		this.getBundleProgressMonitor().setTaskName(Messages.AbstractSplashHandler2_1);
+//		System.out.println(Messages.AbstractSplashHandler2_2);
+	}
+
+	/**
+	 * Hurler.
+	 *
+	 * @param message the message
+	 */
+	public static void hurler(String message) {
+
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/AbstractSplashHandler2.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 324)
@@ -0,0 +1,1442 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Locale;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.e4.ui.css.swt.theme.IThemeEngine;
+import org.eclipse.e4.ui.css.swt.theme.IThemeManager;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceNode;
+import org.eclipse.jface.preference.PreferenceManager;
+import org.eclipse.jface.util.Util;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.application.IWorkbenchConfigurer;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchAdvisor;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IOConsole;
+import org.eclipse.ui.console.IOConsoleInputStream;
+import org.eclipse.ui.console.IOConsoleOutputStream;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.internal.dialogs.WorkbenchPreferenceNode;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.importer.Convert5To6;
+import org.txm.objects.Base;
+import org.txm.objects.Workspace;
+import org.txm.rcp.commands.ExecuteGroovyScript;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.commands.OpenWelcomePage;
+import org.txm.rcp.commands.TxmCommand;
+import org.txm.rcp.commands.base.DeleteObject;
+import org.txm.rcp.commands.workspace.LoadBinaryCorpus;
+import org.txm.rcp.p2.plugins.FixUpdateHandler;
+import org.txm.rcp.p2.plugins.TXMUpdateHandler;
+import org.txm.rcp.perspective.TXMPerspective;
+import org.txm.rcp.preferences.AdvancePreferencePage;
+import org.txm.rcp.preferences.LocalePreferencePage;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.rcp.preferences.TreeTaggerPreferencePage;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.BasesView;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.SummaryView;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.rcp.views.fileexplorer.MacroExplorer;
+import org.txm.statsengine.r.rcp.views.RVariablesView;
+import org.txm.utils.DeleteDir;
+import org.txm.utils.io.FileCopy;
+import org.txm.utils.logger.Log;
+import org.txm.utils.zip.Zip;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Manages the opening and closing of TXM
+ */
+public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
+
+	/** The Constant PERSPECTIVE_ID. */
+	private static final String PERSPECTIVE_ID = TXMPerspective.ID;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.application.WorkbenchAdvisor#createWorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer)
+	 */
+	@Override
+	public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
+			IWorkbenchWindowConfigurer configurer) {
+		return new ApplicationWorkbenchWindowAdvisor(configurer);
+	}
+
+	@Override
+	public IAdaptable getDefaultPageInput() {
+		org.eclipse.core.resources.IWorkspace workspace = org.eclipse.core.resources.ResourcesPlugin.getWorkspace();
+		return workspace.getRoot();
+	}
+
+	/**
+	 * initialization code done after the splash screen.
+	 *
+	 * @param configurer the configurer
+	 */
+	@Override
+	public void initialize(IWorkbenchConfigurer configurer) {
+		org.eclipse.ui.ide.IDE.registerAdapters();
+
+		//WorkbenchAdapterBuilder.registerAdapters(); // deprecated
+		PlatformUI.getPreferenceStore().setValue(
+				IWorkbenchPreferenceConstants.SHOW_PROGRESS_ON_STARTUP, true);
+		InitializeLogger();
+
+		configurer.setSaveAndRestore(true);
+	}
+
+	@Override
+	public void preStartup() {
+
+	}
+
+//	/**
+//	 * return all the properties needed by the Toolbox.
+//	 *
+//	 * @return the properties
+//	 */
+//	public static Properties getProperties() {
+//		IPreferencesService service = Platform.getPreferencesService();
+//
+//		String logLevel = service.getString(Application.PLUGIN_ID,
+//				AdvancePreferencePage.LOG_LEVEL, "SEVERE", null); //$NON-NLS-1$
+//		boolean logConsole = service.getBoolean(Application.PLUGIN_ID,
+//				AdvancePreferencePage.ADD_TECH_LOGS, true, null);
+//		boolean logStackTrace = service.getBoolean(Application.PLUGIN_ID,
+//				AdvancePreferencePage.LOG_STACKTRACE, false, null);
+//		boolean logTimings = service.getBoolean(Application.PLUGIN_ID,
+//				AdvancePreferencePage.SHOW_TIMINGS, true, null);
+//		boolean logFile = service.getBoolean(Application.PLUGIN_ID,
+//				AdvancePreferencePage.LOG_IN_FILE, false, null);
+//		String host = service.getString(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_HOST, "", null); //$NON-NLS-1$
+//		int port = service.getInt(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_PORT, 0, null);
+//		String userName = service.getString(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_LOGIN, "", null); //$NON-NLS-1$
+//		String passWord = service.getString(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_PASSWORD, "", null); //$NON-NLS-1$
+//		String pathToExecutable = service.getString(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, "", null); //$NON-NLS-1$
+//		String pathToCQPLib = service.getString(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_PATH_TO_CQPLIB, "", null); //$NON-NLS-1$
+//		//		String pathToRegistry = service.getString(Application.PLUGIN_ID,
+//		//				TBXPreferences.CQI_SERVER_PATH_TO_REGISTRY, "", null); //$NON-NLS-1$
+//		String pathToInitFile = service.getString(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE, "", null); //$NON-NLS-1$
+//		String additionalOptions = service.getString(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, "", null); //$NON-NLS-1$
+//		boolean cqpRemote = service.getBoolean(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_SERVER_IS_REMOTE, false, null);
+//		boolean cqpNetwork = service.getBoolean(Application.PLUGIN_ID,
+//				TBXPreferences.CQI_NETWORK_MODE, false, null);
+//		String defaultEmptyCode = service.getString(Application.PLUGIN_ID,
+//				ImportPreferencePage.CQP_EMPTY_VALUE_CODE, "", null); //$NON-NLS-1$
+////		String pathToRExecutable = service.getString(Application.PLUGIN_ID,
+////				RPreferencePage.R_PATH_TO_EXECUTABLE, "", null); //$NON-NLS-1$
+////		String pathToRremote = service.getString(Application.PLUGIN_ID,
+////				RPreferencePage.R_SERVER_ADRESS, "", null); //$NON-NLS-1$
+////		String rPort = service.getString(Application.PLUGIN_ID,
+////				RPreferencePage.R_PORT, "6311", null); //$NON-NLS-1$
+////		String rUser = service.getString(Application.PLUGIN_ID,
+////				RPreferencePage.R_USER, "", null); //$NON-NLS-1$
+////		String rPassword = service.getString(Application.PLUGIN_ID,
+////				RPreferencePage.R_PASSWORD, "", null); //$NON-NLS-1$
+////		String rArgs = service.getString(Application.PLUGIN_ID,
+////				Toolbox.R_RARGS, "", null); //$NON-NLS-1$
+////		String rServeArgs = service.getString(Application.PLUGIN_ID,
+////				Toolbox.R_RSERVEARGS, "", null); //$NON-NLS-1$
+////		boolean rDebug = service.getBoolean(Application.PLUGIN_ID,
+////				RPreferencePage.R_DEBUG, false, null);
+////		boolean rRemote = service.getBoolean(Application.PLUGIN_ID,
+////				RPreferencePage.R_REMOTE, false, null);
+////		boolean rFileTransfert = service.getBoolean(Application.PLUGIN_ID,
+////				RPreferencePage.R_FILE_TRANSFERT, false, null);
+////		String rSvgDevice = service.getString(Application.PLUGIN_ID,
+////				RPreferencePage.R_SVG_DEVICE, "svg", null); //$NON-NLS-1$
+//		String locale = service.getString(Application.PLUGIN_ID,
+//				LocalePreferencePage.UI_LOCALE, "", null); //$NON-NLS-1$
+//		String installdir = service.getString(Application.PLUGIN_ID,
+//				AdvancePreferencePage.INSTALL_DIR, "", null); //$NON-NLS-1$
+//		String txmhomedir = service.getString(Application.PLUGIN_ID,
+//				AdvancePreferencePage.TXMHOME, "", null); //$NON-NLS-1$
+//		String treetaggerinstalldir = service.getString(Application.PLUGIN_ID,
+//				TreeTaggerPreferencePage.TREETAGGER_INSTALL_PATH, "", null); //$NON-NLS-1$
+//		String treetaggermodelsdir = service.getString(Application.PLUGIN_ID,
+//				TreeTaggerPreferencePage.TREETAGGER_MODELS_PATH, "", null); //$NON-NLS-1$
+//		String treetaggeroptions = service.getString(Application.PLUGIN_ID,
+//				TreeTaggerPreferencePage.TREETAGGER_OPTIONS, "", null); //$NON-NLS-1$
+//		String treetaggerapostrophe = service.getString(Application.PLUGIN_ID,
+//				TreeTaggerPreferencePage.TREETAGGER_APOSTROPHE, "false", null); //$NON-NLS-1$
+//
+//		String importencoding = service.getString(Application.PLUGIN_ID,
+//				ImportPreferencePage.METADATA_ENCODING, "", null); //$NON-NLS-1$
+//		String importcolseparator = service.getString(Application.PLUGIN_ID,
+//				ImportPreferencePage.METADATA_COLSEPARATOR, "", null); //$NON-NLS-1$
+//		String importtxtseparator = service.getString(Application.PLUGIN_ID,
+//				ImportPreferencePage.METADATA_TXTSEPARATOR, "", null); //$NON-NLS-1$
+////		boolean specifLog = service.getBoolean(Application.PLUGIN_ID,
+////				SpecificitiesPreferencePage.PVALUES, true, null);
+//
+//		Properties properties = new Properties();
+//		properties.put(AdvancePreferencePage.LOG_LEVEL, "" + logLevel); //$NON-NLS-1$
+//		properties.put(AdvancePreferencePage.ADD_TECH_LOGS, "" + logConsole); //$NON-NLS-1$
+//		properties.put(AdvancePreferencePage.LOG_STACKTRACE, "" + logStackTrace); //$NON-NLS-1$
+//		properties.put(AdvancePreferencePage.SHOW_TIMINGS, "" + logTimings); //$NON-NLS-1$
+//		properties.put(AdvancePreferencePage.LOG_IN_FILE, ""+logFile); //$NON-NLS-1$
+//		properties.put(TBXPreferences.CQI_SERVER_HOST, host);
+//		properties.put(TBXPreferences.CQI_SERVER_PORT, port);
+//		properties.put(TBXPreferences.CQI_SERVER_LOGIN, userName);
+//		properties.put(ImportPreferencePage.CQP_EMPTY_VALUE_CODE, defaultEmptyCode);
+//		properties.put(TBXPreferences.CQI_SERVER_PASSWORD, passWord);
+//		properties.put(TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE,
+//				pathToExecutable);
+//		properties.put(TBXPreferences.CQI_SERVER_PATH_TO_CQPLIB,
+//				pathToCQPLib);
+//		//		properties.put(TBXPreferences.CQI_SERVER_PATH_TO_REGISTRY,
+//		//				pathToRegistry);
+//		properties.put(TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE,
+//				pathToInitFile);
+//		properties.put(TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS,
+//				additionalOptions);
+//		properties.put(TBXPreferences.CQI_SERVER_IS_REMOTE, "" + cqpRemote); //$NON-NLS-1$
+//		properties.put(TBXPreferences.CQI_NETWORK_MODE, "" + cqpNetwork); //$NON-NLS-1$
+////		properties.put(RPreferencePage.R_PATH_TO_EXECUTABLE, pathToRExecutable);
+////		properties.put(RPreferencePage.R_SERVER_ADRESS, pathToRremote);
+////		properties.put(RPreferencePage.R_PORT, rPort);
+////		properties.put(RPreferencePage.R_USER, rUser);
+////		properties.put(RPreferencePage.R_PASSWORD, rPassword);
+////		properties.put(Toolbox.R_RARGS, rArgs);
+////		properties.put(Toolbox.R_RSERVEARGS, rServeArgs);
+////		properties.put(RPreferencePage.R_REMOTE, "" + rRemote); //$NON-NLS-1$
+////		properties.put(RPreferencePage.R_DEBUG, ""+rDebug); //$NON-NLS-1$
+////		properties.put(RPreferencePage.R_FILE_TRANSFERT, "" + rFileTransfert); //$NON-NLS-1$
+////		properties.put(RPreferencePage.R_SVG_DEVICE, "" + rSvgDevice); //$NON-NLS-1$
+//		properties.put(LocalePreferencePage.UI_LOCALE, locale);
+//		properties.put(AdvancePreferencePage.INSTALL_DIR, installdir);
+//		properties.put(AdvancePreferencePage.TXMHOME, txmhomedir);
+//		properties.put(TreeTaggerPreferencePage.TREETAGGER_INSTALL_PATH,
+//				treetaggerinstalldir);
+//		properties.put(TreeTaggerPreferencePage.TREETAGGER_MODELS_PATH,
+//				treetaggermodelsdir);
+//		properties.put(TreeTaggerPreferencePage.TREETAGGER_OPTIONS,
+//				treetaggeroptions);
+//		properties.put(TreeTaggerPreferencePage.TREETAGGER_APOSTROPHE,
+//				""+treetaggerapostrophe); //$NON-NLS-1$
+//		properties.put(ImportPreferencePage.METADATA_ENCODING, importencoding);
+//		properties.put(ImportPreferencePage.METADATA_COLSEPARATOR, importcolseparator);
+//		properties.put(ImportPreferencePage.METADATA_TXTSEPARATOR, importtxtseparator);
+//		//properties.put(SpecificitiesPreferencePage.PVALUES, specifLog);
+//
+//		return properties;
+//	}
+
+	private static final String ITXMCOMMAND_ID = "org.txm.rcp.extentionpoint.command"; //$NON-NLS-1$
+	/**
+	 * Allow to install a TXM extension AFTER the Toolbox is initialized
+	 */
+	private void loadTxmCommandExtensions() {
+
+		IConfigurationElement[] config = Platform.getExtensionRegistry()
+				.getConfigurationElementsFor(ITXMCOMMAND_ID);
+		Log.warning(Messages.ApplicationWorkbenchAdvisor_15);
+		Log.warning(Arrays.toString(config));
+
+		for (IConfigurationElement e : config) {
+			try {
+				Log.warning(Messages.ApplicationWorkbenchAdvisor_14+e.getName()+" from "+e.getContributor().getName());
+				final Object o = e.createExecutableExtension("class"); //$NON-NLS-1$
+				if (o instanceof TxmCommand) {
+					ISafeRunnable runnable = new ISafeRunnable() {
+						@Override
+						public void handleException(Throwable exception) {
+							System.out.println(Messages.ApplicationWorkbenchAdvisor_6+ exception);
+						}
+
+						@Override
+						public void run() throws Exception {
+							((TxmCommand) o).install();
+						}
+					};
+					SafeRunner.run(runnable);
+				}
+			} catch (Exception ex) {
+				System.out.println("Exception while installing "+e.getName()+": "+ex.getMessage());
+			}
+		}
+	}
+	
+	/**
+	 * Allow to install a TXM extension BEFORE the Toolbox is initialized
+	 */
+	private void preloadTxmCommandExtensions() {
+
+		IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(ITXMCOMMAND_ID);
+		Log.warning(Messages.ApplicationWorkbenchAdvisor_15);
+		Log.warning(Arrays.toString(config));
+
+		for (IConfigurationElement e : config) {
+			try {
+				Log.warning(Messages.ApplicationWorkbenchAdvisor_14+e.getName()+" from "+e.getContributor().getName());
+				final Object o = e.createExecutableExtension("class"); //$NON-NLS-1$
+				if (o instanceof TxmCommand) {
+					ISafeRunnable runnable = new ISafeRunnable() {
+						@Override
+						public void handleException(Throwable exception) {
+							System.out.println(Messages.ApplicationWorkbenchAdvisor_6+ exception);
+						}
+
+						@Override
+						public void run() throws Exception {
+							((TxmCommand) o).preInstall();
+						}
+					};
+					SafeRunner.run(runnable);
+				}
+			} catch (Exception ex) {
+				System.out.println("Exception while installing "+e.getName()+": "+ex.getMessage());
+			}
+		}
+	}
+
+
+	/**
+	 * Set Eclipse Theme depending on the OS
+	 */
+	@SuppressWarnings("rawtypes")
+	private void setDefaultTheme() {
+		Bundle b = FrameworkUtil.getBundle(getClass());
+		BundleContext context = b.getBundleContext();
+
+		ServiceReference serviceRef = context.getServiceReference(IThemeManager.class.getName());
+		@SuppressWarnings("unchecked")
+		IThemeManager themeManager = (IThemeManager) context.getService(serviceRef);
+		IThemeEngine engine = themeManager.getEngineForDisplay(Display.getDefault());
+
+		String OS = System.getProperty("os.name"); //$NON-NLS-1$
+		String theme = "org.txm.rcp.theme.default.linux"; //$NON-NLS-1$
+
+		if (Util.isWindows()) { //$NON-NLS-1$
+			theme = "org.txm.rcp.theme.default.windows"; //$NON-NLS-1$
+		} else if (Util.isMac()) { //$NON-NLS-1$
+			theme = "org.txm.rcp.theme.default.mac"; //$NON-NLS-1$
+		}
+
+		engine.setTheme(theme, true);
+	}
+
+	/**
+	 * initialization code done after the splash screen call a job which does the
+	 * post installation the TXMHOME, checks the TreeTagger and finally
+	 * starts the toolbox.
+	 */
+	@Override
+	public void postStartup() {
+
+		try {			
+			// create the Toolbox initialization job
+			JobHandler jobhandler = new JobHandler(
+					Messages.ApplicationWorkbenchAdvisor_1, true) {
+				@Override
+				protected IStatus run(IProgressMonitor monitor) {
+					JobsTimer.start();
+					this.runInit(monitor);
+					monitor.worked(1);
+					try {
+						monitor.beginTask("Starting TXM", 100);
+						monitor.subTask("Initialize");
+						// init with properties
+						Display.getDefault().syncExec(new Runnable() {
+							@Override
+							public void run() {
+								printTXMVersion(); // print TXM version in the console
+							}
+						});
+						Thread.sleep(1000);// let the startup message be displayed
+						setPreferencesConfiguration(); // remove some preference pages
+
+						//fixUpdateProfile();
+
+						// SET PREFERENCES IF THIS IS THE FIRST RUN
+						monitor.setTaskName(Messages.ApplicationWorkbenchAdvisor_2);
+						Log.warning(Messages.ApplicationWorkbenchAdvisor_72);
+						if (!loadInstallPreferences(this)) {
+							monitor.done();
+							System.err.println(Messages.ApplicationWorkbenchAdvisor_init_failed);
+							return Status.CANCEL_STATUS;
+						}
+						monitor.worked(10);
+
+						// CHECK IF THIS IS THE FIRST RUN
+						monitor.setTaskName(Messages.ApplicationWorkbenchAdvisor_3);
+						Log.warning(Messages.ApplicationWorkbenchAdvisor_73);
+						if (!checkTXMHOME(this, monitor)) {
+							monitor.done();
+							System.err.println(Messages.ApplicationWorkbenchAdvisor_init_failed);
+							return Status.CANCEL_STATUS;
+						}
+						monitor.worked(30);
+
+						//INITIALIZE TBX AND UI
+						monitor.setTaskName(Messages.ApplicationWorkbenchAdvisor_0);
+						Log.warning(Messages.ApplicationWorkbenchAdvisor_74);
+						if (!initializeUI(this)) {
+							monitor.done();
+							return Status.CANCEL_STATUS;
+						}
+						monitor.worked(30);
+
+						// CLOSE Empty editors
+						closeEmptyEditors();
+
+
+						monitor.done();
+					} catch (Exception e) {
+						System.out.println(Messages.ApplicationWorkbenchAdvisor_75+e);
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					} catch(ThreadDeath td) {
+						System.out.println("TXM initialization has been canceled by user. Please restart TXM.");
+					}
+					JobsTimer.stopAndPrint();
+					return Status.OK_STATUS;
+				}
+			};
+			jobhandler.startJob();
+
+			//start update NOT IN A JOB
+			startUpdateLookUpJob();
+
+		} catch (Exception e) {
+			Log.severe(e.getLocalizedMessage());
+			System.err.println(Messages.ApplicationWorkbenchAdvisor_init_failed+" "+e.getLocalizedMessage());
+		}
+	}
+
+	public static  void closeEmptyEditors() {
+		Log.info("Closing empty editors...");
+		String REF = "org.eclipse.ui.internal.emptyEditorTab";
+
+		for (final IWorkbenchPage page : DeleteObject.getPages()) {
+			ArrayList<IEditorReference> editorRefsList = new ArrayList<IEditorReference>();
+			for (IEditorReference editorref : page.getEditorReferences()) {
+				if (editorref.getId().equals(REF)) {
+					Log.info("Closing: "+editorref.getId());
+					editorRefsList.add(editorref);
+				}
+			}
+
+			final IEditorReference[] editorRefs = editorRefsList.toArray(new IEditorReference[editorRefsList.size()]);
+			Display.getDefault().syncExec(new Runnable() {
+
+				@Override
+				public void run() {
+					page.closeEditors(editorRefs, false);
+				}
+			});
+		}
+	}
+
+	public static void printTXMVersion() {
+		// build the properties given to the Toolbox
+		String version =  Activator.getDefault().getBundle().getVersion().toString(); // "0.7.7.201412160925";
+		version = version.replaceAll("(.\\..\\..)\\.(....)(..)(..)(..)(..)", "$1 ($2-$3-$4)"); //$NON-NLS-1$ //$NON-NLS-2$
+		System.out.println(NLS.bind(Messages.ApplicationWorkbenchAdvisor_init, version));
+
+	}
+
+	/**
+	 * Fix the Update p2 profile. No more needed since Eclipse 4.4
+	 */
+	private void fixUpdateProfile() {
+		try {
+			if (firstLaunchAfterInstallation()) {
+				Log.warning(Messages.ApplicationWorkbenchAdvisor_63);
+				/*
+				IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
+				//System.out.println("before set update: "+pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
+				pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, false);
+
+				//				System.out.println("context "+AutomaticUpdatePlugin.getDefault().getContext());
+				//				System.out.println("Location "+AutomaticUpdatePlugin.getDefault().getStateLocation());
+				//				System.out.println("set update: "+pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
+
+				//				ScopedPreferenceStore preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				//						Application.PLUGIN_ID);
+				//				preferences.setValue("org.eclipse.equinox.p2.ui.sdk.scheduler/enabled", true);
+				//				preferences.save();
+
+				IPreferencesService service = Platform.getPreferencesService();
+				service.getRootNode().node("configuration").node("org.eclipse.equinox.p2.ui.sdk.scheduler").put("enabled", "false");
+				service.getRootNode().node("default").node("org.eclipse.equinox.p2.ui.sdk.scheduler").put("enabled", "false");
+
+				AutomaticUpdatePlugin.getDefault().savePreferences();
+				//TODO: is rescheduleUpdate() attempting to update TXM ?
+				AutomaticUpdatePlugin.getDefault().getScheduler().rescheduleUpdate();
+				 */
+				IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(Activator.getDefault().getBundle().getBundleContext(),IProvisioningAgent.SERVICE_NAME);
+				if (agent == null) {
+					System.out.println(Messages.ApplicationWorkbenchAdvisor_64);
+				} else {
+					FixUpdateHandler.run(agent);
+				}
+
+			}
+		} catch(Exception e) {
+			System.out.println(Messages.ApplicationWorkbenchAdvisor_65+e);
+			Log.printStackTrace(e);
+		}
+	}
+
+	private void setPreferencesConfiguration() {
+		PreferenceManager pm = PlatformUI.getWorkbench().getPreferenceManager();
+
+		// Remove RCP Update preference page
+		Log.warning(Messages.ApplicationWorkbenchAdvisor_21);
+		if (!TxmPreferences.getBoolean(TBXPreferences.EXPERT_USER, false)) {
+			pm.remove("org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"); //$NON-NLS-1$
+
+			// Remove the Team menu
+			pm.remove("org.eclipse.team.ui.TeamPreferences"); //$NON-NLS-1$
+
+			// XML
+			//pm.remove("org.eclipse.wst.xml.ui.preferences.xml"); //$NON-NLS-1$
+
+			// Validation
+			//pm.remove("ValidationPreferencePage"); //$NON-NLS-1$
+
+			// Debug
+			//pm.remove("org.eclipse.debug.ui.DebugPreferencePage"); //$NON-NLS-1$
+		}
+		// Remove RCP Web browser preference page
+		IPreferenceNode[] arr = pm.getRootSubNodes();
+		for(IPreferenceNode pn : arr){
+			//			System.out.println("Label:" + pn.getLabelText() + " ID:" + pn.getId()+" Type: "+pn.getClass());
+			//			for (IPreferenceNode subn : pn.getSubNodes()) {
+			//				System.out.println(" SLabel:" + subn.getLabelText() + " ID:" + subn.getId());
+			//			}
+			if ("org.eclipse.ui.preferencePages.Workbench".equals(pn.getId())) { //$NON-NLS-1$
+				WorkbenchPreferenceNode pwn = (WorkbenchPreferenceNode)pn;
+				pwn.remove("org.eclipse.ui.browser.preferencePage"); //$NON-NLS-1$
+			}
+		}
+	}
+
+	public void startUpdateLookUpJob() {
+		if (wasFirstLaunch) return; // don't call for update for the first run of TXM
+
+		//		JobHandler jobhandler = new JobHandler(Messages.ApplicationWorkbenchAdvisor_76, true) {
+		//			@Override
+		//			protected IStatus run(IProgressMonitor monitor) {
+		//				JobsTimer.start();
+		try {
+			boolean doUpdate = TxmPreferences.getBoolean(TBXPreferences.FETCH_UPDATES_AT_STARTUP);
+			if (!doUpdate) return;
+			//
+			//				this.syncExec(new Runnable() {
+			//					@Override
+			//					public void run() {
+
+			try {
+				URL url = new URL("http://txm.textometrie.org/updates/up");
+				url.openStream().read();
+			} catch(Exception e){
+				Log.warning("TXM cannot fetch updates ("+e+")");
+				doUpdate = false;
+			}
+
+			Log.warning(Messages.ApplicationWorkbenchAdvisor_77);
+
+			IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+			if (handlerService != null) {
+				try {
+					Event e = new Event();
+					e.display = Display.getDefault();
+					handlerService.executeCommand(TXMUpdateHandler.ID, e);
+				} catch (Exception e) {
+					System.out.println(Messages.ApplicationWorkbenchAdvisor_78+e);
+					Log.printStackTrace(e);
+				}
+			} else {
+				System.out.println(Messages.ApplicationWorkbenchAdvisor_79);
+			}
+			//					}
+			//				});
+		} catch(Exception e) {
+			System.out.println("Error while fetching updates: "+e);
+		} catch(ThreadDeath td) {
+			System.out.println("Update canceled.");
+		}
+
+		//				JobsTimer.stopAndPrint();
+		//				return Status.OK_STATUS;
+		//			}
+		//		};
+		//		jobhandler.setUser(true);
+		//		jobhandler.startJob(true);
+	}
+
+	public static boolean firstLaunchAfterInstallation() {
+		if (TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME) == null || TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME).trim().equals("")) {
+			System.out.println("TXM Home directory preference not set.");
+			return true;
+		}
+		File dir = new File(TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME).trim());
+		if (!dir.exists()) {
+			System.out.println("TXM Home directory is set but does not exist.");
+			return true;
+		}
+		
+		if (!dir.canWrite()) {
+			System.out.println("TXM Home directory is set and exists but TXM can't write in this directory.");
+			return true;
+		}
+		
+		return false;
+	}
+
+	/**
+	 * shutdown code.
+	 */
+	@Override
+	public void postShutdown() {
+		//callStopScript();
+		Toolbox.shutdown();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.application.WorkbenchAdvisor#getInitialWindowPerspectiveId()
+	 */
+	@Override
+	public String getInitialWindowPerspectiveId() {
+		return PERSPECTIVE_ID;
+	}
+
+	/**
+	 * initialize TXM log in console by redirecting stderr and stdout.
+	 */
+	private void InitializeLogger() {
+		IOConsole console = new IOConsole(
+				Messages.ApplicationWorkbenchAdvisor_5, null);
+		ConsolePlugin.getDefault().getConsoleManager().addConsoles(
+				new IConsole[] { console });
+
+		// Enable or disable the outputs redirection to the RCP console according to the command line argument "-noredirection"
+		boolean outputsRedirection = true;
+		String[] args = Platform.getCommandLineArgs();
+		for (int i = 0; i < args.length; i++) {
+			if (args[i].equals("-noredirection"))	{ //$NON-NLS-1$
+				outputsRedirection = false;
+				break;
+			}
+		}
+		if (outputsRedirection)	{
+			IOConsoleOutputStream stream = console.newOutputStream();
+			IOConsoleInputStream streamInput = console.getInputStream();
+
+			//			PrintStream stdout = System.out;
+			//			PrintStream stderr = System.err;
+
+			System.setOut(new PrintStream(stream));
+			System.setErr(new PrintStream(stream));
+			System.setIn(streamInput);
+		}
+		// System.out.println(Messages.ApplicationWorkbenchAdvisor_3);
+	}
+
+	/**
+	 * if INSTALLDIR preference is not set or empty, read install.prefs and sets the
+	 * Toolbox parameters
+	 *
+	 * First: restore preferences from previous TXM
+	 * Second: set install preferences from new TXM
+	 * Third: restore TreeTagger preferences
+	 *
+	 * Need to define a list of preferences that must be updated by the new install, then exchange step 1 and 2 (and remove step 3)
+	 *
+	 * @param jobHandler : the init job
+	 * @return true, if successful
+	 */
+	private boolean loadInstallPreferences(JobHandler jobHandler) {
+		try {
+			// check if the install preference file has been loaded
+			if ((TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR) == null)
+					|| (TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR).equals("")) //$NON-NLS-1$
+					|| !new File(TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR)).exists()) {
+				Display.getDefault().syncExec(new Runnable() {
+					@Override
+					public void run() { OpenWelcomePage.openWelcomePage(); }
+				});
+
+				File previousPreferenceFile = new File(System.getProperty("java.io.tmpdir"),  //$NON-NLS-1$
+						"org.txm.rcp.prefs"); //$NON-NLS-1$
+
+				if (System.getProperty("os.name").indexOf("Mac") >= 0) { //$NON-NLS-1$ //$NON-NLS-2$
+					previousPreferenceFile = new File("/tmp/org.txm.rcp.prefs"); //$NON-NLS-1$
+				}
+
+				if (previousPreferenceFile.exists()) {
+					//					File renamedPreviousPreferenceFile = new File(previousPreferenceFile.getParent(),  //$NON-NLS-1$
+					//							"org.txm.rcp-backup.prefs");
+					//					if (!previousPreferenceFile.renameTo(renamedPreviousPreferenceFile)) {
+					//						System.out.println("Failed to rename preference page from "+previousPreferenceFile+" to "+renamedPreviousPreferenceFile);
+					//					} else {
+					//						System.out.println(Messages.ApplicationWorkbenchAdvisor_66+previousPreferenceFile);
+					//						// this is a Java properties file (iso + \\)
+					TxmPreferences.importFromFile(previousPreferenceFile, "ISO-8859-1", true); //$NON-NLS-1$
+					//					}
+				} else {
+					System.out.println(Messages.ApplicationWorkbenchAdvisor_67+previousPreferenceFile);
+				}
+
+				//TxmPreferences.remove(TBXPreferences.USER_TXM_HOME);
+				TxmPreferences.remove(TBXPreferences.INSTALL_DIR);
+
+				// set install directory preference
+				String installpath = Platform.getInstallLocation().getURL().getFile();
+				File installDirectory = new File(installpath, "..");  //$NON-NLS-1$
+				installDirectory = installDirectory.getCanonicalFile();
+				TxmPreferences.set(TBXPreferences.INSTALL_DIR, installDirectory.getAbsolutePath());
+				
+				File preferenceFile = new File(installDirectory, "install.prefs"); //$NON-NLS-1$
+				Log.info(NLS.bind(Messages.ApplicationWorkbenchAdvisor_25, preferenceFile));
+				if (Util.isWindows()) //NSIS has generated ISO-8859-1 preference file
+					TxmPreferences.importFromFile(preferenceFile, "ISO-8859-1", false); //$NON-NLS-1$
+				else
+					TxmPreferences.importFromFile(preferenceFile);
+
+				// restore previous TreeTagger preferences
+				String ttpath = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.TREETAGGER_INSTALL_PATH);
+				String ttmodelpath = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.TREETAGGER_MODELS_PATH);
+				if (ttpath != null && ttpath.length() > 0) {
+					TxmPreferences.set(TBXPreferences.TREETAGGER_INSTALL_PATH, ttpath);
+					TxmPreferences.set(TBXPreferences.TREETAGGER_MODELS_PATH, ttmodelpath);
+				}
+
+				//TODO: update Toolbox engines and stuff with new preferences
+				//TBXPreferences.updateProperties(TxmPreferences.getProperties());
+				return true;
+			}
+		} catch (Exception e) {
+			Log.severe(e.getLocalizedMessage());
+			System.err.println(Messages.ApplicationWorkbenchAdvisor_9+ " " +e.getLocalizedMessage());
+			return false;
+		}
+		return true;
+	}
+
+	boolean go = false;
+	File backup;
+	File oldbackup;
+	File errorbackup;
+	File corporaDir;
+	/**
+	 * if TXMHOME path is not set or wrong
+	 *  - set default theme
+	 *  - restore old corpora
+	 *  - creates TXMHOME and copy "scripts", "samples" directories from TXMINSTALLDIR and mkdirs workspaces, registry,
+	 *    clipboard plus an empty Workspace (TXMObject) is created then load the sample corpora.
+	 *
+	 *
+	 * @param job the job
+	 * @param monitor
+	 * @return true, if successful
+	 */
+	private static boolean wasFirstLaunch;
+	public static boolean getWasFirstLaunch() {
+		return wasFirstLaunch;
+	}
+
+	File txmhomedir = null;
+	File installDirectory = null;
+	private Handler severeDialobBoxHandler = new Handler() {
+		@Override
+		public void publish(final LogRecord record) {
+			//System.out.println("severeDialobBoxHandler.publish()");
+			boolean showSevereDialobBox = TxmPreferences.getBoolean(AdvancePreferencePage.SHOW_SEVERE_DIALOG, false);
+			if (showSevereDialobBox) {
+				//System.out.println("SHOW SEVERE DIALOG BOX: "+record.getMessage());
+				TXMWindows.getActiveWindow().getShell().getDisplay().syncExec(new Runnable() {
+					@Override
+					public void run() {
+						MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error", record.getMessage());
+					}
+				});
+			}
+		}
+		
+		@Override
+		public void flush() { }
+		
+		@Override
+		public void close() throws SecurityException { }
+	};
+	{
+		Log.addHandler(severeDialobBoxHandler);
+		severeDialobBoxHandler.setLevel(Level.SEVERE);
+	}
+	private boolean checkTXMHOME(JobHandler jobHandler, IProgressMonitor monitor) {
+		txmhomedir = null;
+		installDirectory = null;
+		
+		// check if TXMHOME of the user is set and exists
+		wasFirstLaunch = firstLaunchAfterInstallation();
+		System.setProperty("org.txm.rcp.wasfirstrun", Boolean.toString(wasFirstLaunch)); //$NON-NLS-1$
+		if (wasFirstLaunch) {
+			
+			System.out.println(Messages.ApplicationWorkbenchAdvisor_7);
+			try  {
+				Log.info(Messages.ApplicationWorkbenchAdvisor_68);
+				Display.getDefault().syncExec(new Runnable() {
+					@Override
+					public void run() {
+						setDefaultTheme();
+					}
+				});
+			} catch(Exception e) {
+				Log.warning(Messages.ApplicationWorkbenchAdvisor_69+e);
+				Log.printStackTrace(e);
+			}
+
+			try {
+				Log.info("Checking TXM install directory.");
+				Toolbox.TXMINSTALL = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR);
+				installDirectory = new File(Toolbox.TXMINSTALL);
+				if (!installDirectory.exists()) { // the TXM user directory could be created !! :o
+					Display.getDefault().syncExec(new Runnable() {
+						@Override
+						public void run() {
+							DirectoryDialog dialog = new DirectoryDialog(Display.getCurrent().getActiveShell(), SWT.OPEN);
+							dialog.setText("TXM install directory is not set, Please select it.");
+							String path = dialog.open();
+							if (path != null) installDirectory = new File(path);
+						}
+					});
+				}
+				if (installDirectory == null || !installDirectory.exists()) {
+					Log.severe("Error: The provided install directory does not exists. Aborting.");
+					return false;
+				}
+				Log.info(NLS.bind(Messages.ApplicationWorkbenchAdvisor_8, Toolbox.TXMINSTALL));
+
+				Log.info("Checking TXM user directory.");
+				if (TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME) == null 
+						|| TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME).trim().equals("")) { //$NON-NLS-1$
+					txmhomedir = new File(System.getProperty("user.home"), "TXM"); //$NON-NLS-1$ //$NON-NLS-2$
+				} else {
+					txmhomedir = new File(TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME).trim());
+				}
+				txmhomedir.mkdirs(); // creates the directory if needed
+				
+				if (!txmhomedir.exists()) { // the TXM user directory could be created !! :o
+					Log.warning(NLS.bind(Messages.ApplicationWorkbenchAdvisor_12, txmhomedir));
+					Display.getDefault().syncExec(new Runnable() {
+						@Override
+						public void run() {
+							DirectoryDialog dialog = new DirectoryDialog(Display.getCurrent().getActiveShell(), SWT.OPEN);
+							dialog.setText("Please choose the TXM user directory to use.");
+							String path = dialog.open();
+							if (path != null) {
+								txmhomedir = new File(path);
+								txmhomedir.mkdirs();
+							}
+							
+						}
+					});
+				}
+				if (txmhomedir == null || !txmhomedir.exists()) {
+					Log.severe("Error: The provided directory does not exists. Aborting");
+					return false;
+				}
+				Log.info("TXM User directory is set to: "+txmhomedir);
+				
+				backup = new File(txmhomedir, "corpus-backup"); //$NON-NLS-1$
+				oldbackup = new File(txmhomedir, "corpus-backup-old"); //$NON-NLS-1$
+				errorbackup = new File(txmhomedir, "corpus-backup-error"); //$NON-NLS-1$
+				corporaDir = new File(txmhomedir, "corpora"); //$NON-NLS-1$
+
+				if (txmhomedir.exists() && txmhomedir.listFiles().length > 0) { // if the txmhomedir is not empty, try to restore its content
+					Display.getDefault().syncExec(new Runnable() {
+						@Override
+						public void run() {
+							Display display = Display.getDefault();
+							Shell shell = display.getActiveShell();
+							go = MessageDialog.openConfirm(shell, Messages.ApplicationWorkbenchAdvisor_28, NLS.bind(Messages.ApplicationWorkbenchAdvisor_27, txmhomedir));
+						}
+					});
+
+					if (go) {
+						monitor.setTaskName(Messages.bind(Messages.ApplicationWorkbenchAdvisor_30, backup.getAbsolutePath()));
+						backup.mkdir();
+
+						if (!backup.exists()) {
+							System.out.println(Messages.ApplicationWorkbenchAdvisor_34 + backup);
+							return false;
+						}
+
+						//$NON-NLS-1$
+						if (oldbackup.exists()) {
+							System.out.println(Messages.bind(Messages.ApplicationWorkbenchAdvisor_16, oldbackup));
+							DeleteDir.deleteDirectory(oldbackup); // ]8)
+						}
+
+						File[] corpDirs = corporaDir.listFiles();
+						ArrayList<String> moved = new ArrayList<String>();
+						ArrayList<String> failed = new ArrayList<String>();
+
+						if (corpDirs != null) {
+							Arrays.sort(corpDirs);
+							System.out.print(Messages.bind(Messages.ApplicationWorkbenchAdvisor_30, backup.getAbsolutePath()));
+							for (File corpusdir : corpDirs) {
+								File backCorpus = new File(backup, corpusdir.getName());
+								if (corpusdir.canRead() && corpusdir.isDirectory()) {
+									System.out.print("."); //$NON-NLS-1$
+									if (backCorpus.exists()) {
+										moved.add(corpusdir.getName());
+										oldbackup.mkdir();
+										backCorpus.renameTo(new File(oldbackup, corpusdir.getName()));
+									}
+
+									if (!corpusdir.renameTo(backCorpus)) {
+										failed.add(corpusdir.getName());
+									}
+								}
+							}
+							System.out.println();
+						}
+						if (moved.size() > 0) {
+							System.out.println(Messages.bind(Messages.ApplicationWorkbenchAdvisor_18,oldbackup,StringUtils.join(moved,", "))); //$NON-NLS-1$
+						}
+						if (failed.size() > 0) {
+							System.out.println(Messages.ApplicationWorkbenchAdvisor_44+failed+Messages.ApplicationWorkbenchAdvisor_37+backup);
+						}
+					}
+				}
+			} catch (Exception e) {
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+				System.out.println(Messages.ApplicationWorkbenchAdvisor_47+" "+e.getLocalizedMessage()); //$NON-NLS-1$
+				Log.severe(Messages.ApplicationWorkbenchAdvisor_47+e.getLocalizedMessage());
+				return false;
+			}
+
+			try {
+				txmhomedir.mkdir();
+				if (!txmhomedir.exists()) {
+					System.out.println(NLS.bind(Messages.ApplicationWorkbenchAdvisor_13, txmhomedir));
+					return false;
+				}
+
+				// create folders
+				String createfolders[] = {
+						"corpora", "clipboard", //$NON-NLS-1$ //$NON-NLS-2$
+						"workspaces", "css", "scripts", "scripts/lib", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+						"scripts/macro", "scripts/user", "xsl", "samples", "schema"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				String deletefolders[] = {"clipboard", "registry", "samples"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+				for (String folder : deletefolders) {
+					DeleteDir.deleteDirectory(new File(txmhomedir, folder));
+				}
+
+				for (String folder : createfolders) {
+					new File(txmhomedir, folder).mkdir();
+				}
+
+				// create TXM default.xml workspace
+				Toolbox.workspace = Workspace.createEmptyWorkspace(new File(
+						txmhomedir, "workspaces/default.xml")); //$NON-NLS-1$
+
+				// test
+				if (Toolbox.workspace == null) {
+					System.out.println(Messages.ApplicationWorkbenchAdvisor_31);
+					return false;
+				}
+
+				// the folders to copy from TXM install dir
+				String copyfolders[] = {"css", "scripts", "xsl", "samples", "scripts", "schema"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+				for (String folder : copyfolders) {
+					File ffile = new File(Toolbox.TXMINSTALL, folder);
+					if (!ffile.exists()) {
+						System.out.println(NLS.bind(Messages.ApplicationWorkbenchAdvisor_39, ffile));
+						continue;
+					}
+
+					FileCopy.copyFiles(ffile, new File(txmhomedir, folder));
+				}
+
+				TxmPreferences.set(ScriptPreferencePage.SCRIPT_ROOT_DIR,new File(txmhomedir, "scripts").getAbsolutePath()); //$NON-NLS-1$
+
+			} catch (Exception e) {
+				Log.severe(NLS.bind(Messages.ApplicationWorkbenchAdvisor_40, e.getLocalizedMessage()));
+				System.err.println(NLS.bind(Messages.ApplicationWorkbenchAdvisor_40, e.getLocalizedMessage()));
+				return false;
+			}
+
+			try {
+				TxmPreferences.set(TBXPreferences.USER_TXM_HOME, txmhomedir.getAbsolutePath());
+				//				TxmPreferences.set(TBXPreferences.CQI_SERVER_PATH_TO_REGISTRY, txmhomedir.getAbsolutePath() + "/registry"); //$NON-NLS-1$
+				TxmPreferences.set(TBXPreferences.WORKSPACE_LOCATION, new File(txmhomedir,
+						"workspaces/default.xml").getAbsolutePath()); //$NON-NLS-1$
+
+				//TODO: update TBX engines and stuff with new preferences
+				//Toolbox.updateProperties(TxmPreferences.getProperties());
+				Toolbox.setParam(TBXPreferences.WORKSPACE_LOCATION, TxmPreferences
+						.get(TBXPreferences.WORKSPACE_LOCATION));
+			} catch (Exception e) {
+				Log.severe(NLS.bind(Messages.ApplicationWorkbenchAdvisor_41, e.getLocalizedMessage()));
+				System.out.println(NLS.bind(Messages.ApplicationWorkbenchAdvisor_41, e.getLocalizedMessage()));
+				return false;
+			}
+
+			try {
+				ArrayList<String> basenames = new ArrayList<String>();
+				ArrayList<String> sampleCorpusLoaded = new ArrayList<String>();
+				if (new File(txmhomedir, "samples").exists()) { //$NON-NLS-1$
+					Log.info(Messages.ApplicationWorkbenchAdvisor_11);
+					monitor.setTaskName(Messages.ApplicationWorkbenchAdvisor_11);
+					//File corporaDir = new File(txmhomedir.getAbsolutePath(), "corpora"); //$NON-NLS-1$
+					corporaDir.mkdir();
+
+					File[] sampleCorpusFiles = new File(txmhomedir, "samples").listFiles(); //$NON-NLS-1$
+
+					for (File zipFile : sampleCorpusFiles) {
+						try {
+							String filename = zipFile.getName();
+							File basedir;
+							String basedirname;
+							if (filename.endsWith(".txm") || filename.endsWith(".zip")) { //$NON-NLS-1$ //$NON-NLS-2$
+								if (!zipFile.canRead()) {
+									System.out.println(NLS.bind(Messages.ApplicationWorkbenchAdvisor_45, zipFile));
+									continue; // go to next binary file
+								}
+
+								//build binary dir path
+								basedirname = Zip.getRoot(zipFile);
+								basedir = new File(corporaDir, basedirname);
+
+								try {
+									Zip.decompress(zipFile.getAbsolutePath(), corporaDir.getAbsolutePath(), false);
+								} catch (IOException e) {
+									System.out.println(NLS.bind(Messages.AddBase_31, e));
+								}
+							} else if (zipFile.isDirectory()) {
+								basedir = zipFile;
+							} else {
+								System.out.println(NLS.bind(Messages.AddBase_22, zipFile));
+								System.out.println(Messages.AddBase_25);
+								continue;
+							}
+
+							Base base = LoadBinaryCorpus.loadBinaryCorpus(basedir);
+							if (base != null) {
+								basenames.add(base.getName());
+								sampleCorpusLoaded.add(base.getName());
+							}
+						} catch (Exception e) {
+							System.out.println(Messages.ApplicationWorkbenchAdvisor_51+zipFile);
+							org.txm.rcp.utils.Logger.printStackTrace(e);
+						}
+					}
+				}
+
+				if (backup.exists()) {
+					System.out.print(NLS.bind(Messages.ApplicationWorkbenchAdvisor_53, backup));
+					monitor.setTaskName(NLS.bind(Messages.ApplicationWorkbenchAdvisor_53, backup));
+
+					File[] corpusDirs = backup.listFiles();
+
+					if (corpusDirs != null) {
+
+						for (File corpusDir : corpusDirs) { // fix corpus name lowercase letters
+							if (!corpusDir.getName().equals(corpusDir.getName().toUpperCase())) {
+								File upperCasedCorpusDir = new File(corpusDir.getParentFile(), corpusDir.getName().toUpperCase());
+								if (!upperCasedCorpusDir.exists()) {
+									corpusDir.renameTo(upperCasedCorpusDir);
+								}
+							}
+						}
+						corpusDirs = backup.listFiles();
+
+						ArrayList<String> notMoved = new ArrayList<String>();
+						ArrayList<File> broken = new ArrayList<File>();
+
+						for (File corpusDir : corpusDirs) {
+							if (!corpusDir.isDirectory()) continue; // ignore
+							System.out.print("."); //$NON-NLS-1$
+							File outdir = new File(corporaDir, corpusDir.getName());
+							if (outdir.exists()) {
+								//System.out.println("This setup provides a new version of the "+corpusDir.getName()+" sample corpus. Skipping the backup of "+corpusDir);
+								notMoved.add(corpusDir.getName());
+								continue;
+							}
+
+							try {
+								Convert5To6 converter = new Convert5To6(corpusDir, outdir);
+								if (converter.is5(true)) {
+									if (!converter.start()) {
+										System.out.println(Messages.ApplicationWorkbenchAdvisor_22+corpusDir+Messages.ApplicationWorkbenchAdvisor_23);
+										System.out.println(Messages.ApplicationWorkbenchAdvisor_54+corpusDir+Messages.ApplicationWorkbenchAdvisor_55);
+										System.out.println(Messages.ApplicationWorkbenchAdvisor_56);
+										broken.add(corpusDir);
+									} else {
+										//System.out.println(Messages.ApplicationWorkbenchAdvisor_57+outdir);
+										Base base = LoadBinaryCorpus.loadBinaryCorpus(outdir);
+										basenames.add(base.getName());
+									}
+								} else {
+									if (Convert5To6.is6(corpusDir)) {
+										if (corpusDir.renameTo(outdir)) {
+											Base base = LoadBinaryCorpus.loadBinaryCorpus(outdir);
+											if (base == null) {
+												System.out.println(Messages.ApplicationWorkbenchAdvisor_58+outdir);
+												System.out.println(Messages.ApplicationWorkbenchAdvisor_59+corpusDir);
+												outdir.renameTo(corpusDir);
+												broken.add(corpusDir);
+											} else {
+												basenames.add(base.getName());
+											}
+										} else {
+											System.out.println(Messages.ApplicationWorkbenchAdvisor_24+corpusDir+Messages.ApplicationWorkbenchAdvisor_26+outdir);
+											broken.add(corpusDir);
+										}
+									} else {
+										System.out.println(Messages.ApplicationWorkbenchAdvisor_60+corpusDir+Messages.ApplicationWorkbenchAdvisor_61);
+										broken.add(corpusDir);
+									}
+								}
+							} catch (Throwable e) {
+								System.out.println(Messages.ApplicationWorkbenchAdvisor_59+corpusDir);
+								System.out.println(Messages.ApplicationWorkbenchAdvisor_29+e);
+								outdir.renameTo(corpusDir);
+							}
+						}
+						System.out.println();
+						if (sampleCorpusLoaded.size() > 0) {
+							if (sampleCorpusLoaded.size() == 1) {
+								System.out.println(Messages.bind(Messages.ApplicationWorkbenchAdvisor_43_single, StringUtils.join(sampleCorpusLoaded, ", "))); //$NON-NLS-1$
+							} else {
+								System.out.println(Messages.bind(Messages.ApplicationWorkbenchAdvisor_43, StringUtils.join(sampleCorpusLoaded, ", "))); //$NON-NLS-1$
+							}
+						}
+
+						if (broken.size() > 0) {
+							errorbackup.mkdir();
+							System.out.println(Messages.bind(Messages.ApplicationWorkbenchAdvisor_48, StringUtils.join(broken, ", "), errorbackup)); //$NON-NLS-1$
+							for(File corpusDir : broken) {
+								if (corpusDir.exists())
+									corpusDir.renameTo(new File(errorbackup, corpusDir.getName()));
+							}
+						}
+					}
+				}
+
+				Toolbox.workspace.save();
+
+				// init with properties
+				monitor.setTaskName(Messages.ApplicationWorkbenchAdvisor_49);
+
+				// TODO: factorize this code with initializeUI() method
+				preloadTxmCommandExtensions();
+				
+				if (Toolbox.initialize(TBXPreferences.class)) {
+					System.out.println(Messages.ApplicationWorkbenchAdvisor_ready);
+				} else {
+					System.err.println(Messages.ApplicationWorkbenchAdvisor_init_failed);
+					return false;
+				}
+
+				if (Toolbox.isInitialized()) {
+					callStartScript();
+					Toolbox.workspace.save();
+
+					loadTxmCommandExtensions();
+				} else {
+					return false;
+				}
+			} catch (Exception e) {
+				Log.severe(NLS.bind(Messages.ApplicationWorkbenchAdvisor_52, e.getLocalizedMessage()));
+				System.err.println(NLS.bind(Messages.ApplicationWorkbenchAdvisor_52, e.getLocalizedMessage()));
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+				return false;
+			}
+		} // end if
+		return true;
+	}
+
+	/**
+	 * Called just after Toolbox is initialized
+	 */
+	private void callStartScript() {
+		File startupScript = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "scripts/user/start.groovy");
+		if (startupScript.exists() && startupScript.canRead()) {
+			try {
+				ExecuteGroovyScript.executeScript(startupScript.getAbsolutePath(), null, null, true);
+			} catch(Exception e) {
+				System.out.println("Fail to execute 'start.groovy' script: "+e);
+				Log.printStackTrace(e);
+			}
+		}
+	}
+
+	/**
+	 * Called just after Toolbox is stop call
+	 */
+	private void callStopScript() {
+		File startupScript = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "scripts/user/stop.groovy");
+		if (startupScript.exists() && startupScript.canRead()) {
+			try {
+				ExecuteGroovyScript.executeScript(startupScript.getAbsolutePath(), null, null, true);
+			} catch(Exception e) {
+				System.out.println("Fail to execute 'stop.groovy' script: "+e);
+				Log.printStackTrace(e);
+			}
+		}
+	}
+
+	/**
+	 * if TT install dir or models dir are not valid show the TT tutorial.
+	 *
+	 * @param job the job
+	 * @return true, if successful
+	 */
+	private boolean checkTreeTagger(JobHandler job) {
+		try {
+			// check TreeTagger installation
+			String ttdir = TxmPreferences
+					.get(TreeTaggerPreferencePage.TREETAGGER_INSTALL_PATH);
+			String ttmodeldir = TxmPreferences
+					.get(TreeTaggerPreferencePage.TREETAGGER_MODELS_PATH);
+			boolean showTTHelp = false;
+			if (ttdir != null || ttmodeldir != null) {
+				if (!(new File(ttdir).exists() && new File(ttmodeldir).exists())) {
+					System.err.println(Messages.ApplicationWorkbenchAdvisor_32);
+					showTTHelp = true;
+				}
+			} else {
+				System.err.println(Messages.ApplicationWorkbenchAdvisor_33);
+				//TxmPreferences.set(TreeTaggerPreferencePage.TREETAGGER_INSTALL_PATH, TxmPreferences.get(AdvancePreferencePage.TXMHOME)+"/treetagger"); //$NON-NLS-1$
+				//TxmPreferences.set(TreeTaggerPreferencePage.TREETAGGER_MODELS_PATH, TxmPreferences.get(AdvancePreferencePage.TXMHOME)+"/treetagger/models"); //$NON-NLS-1$
+				showTTHelp = true;
+			}
+			if (showTTHelp) {
+				job.syncExec(new Runnable() {
+					@Override
+					public void run() {
+						String lang = TxmPreferences.get(LocalePreferencePage.UI_LOCALE);
+						if (lang == null) {
+							lang = Locale.getDefault().getCountry()
+									.toLowerCase();
+							if (lang.equals("fr") || lang.equals("en")) //$NON-NLS-1$ //$NON-NLS-2$
+								TxmPreferences.set(
+										LocalePreferencePage.UI_LOCALE, lang);
+						}
+						if (TxmPreferences.get(LocalePreferencePage.UI_LOCALE) != null
+								&& !TxmPreferences.get(
+										LocalePreferencePage.UI_LOCALE).equals(
+												"")) //$NON-NLS-1$
+							OpenBrowser
+							.openfile("http://txm.sourceforge.net/installtreetagger_" + TxmPreferences.get(LocalePreferencePage.UI_LOCALE) + ".html"); //$NON-NLS-1$ //$NON-NLS-2$
+						else
+							OpenBrowser
+							.openfile("http://txm.sourceforge.net/installtreetagger_en.html"); //$NON-NLS-1$
+					}
+				});
+			}
+		} catch (Exception e) {
+			Log.severe(e.getLocalizedMessage());
+			System.out.println(NLS.bind(Messages.ApplicationWorkbenchAdvisor_19, e));
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * after TXMHOME AND INSTALLDIR are ok, we start launch the Toolbox after
+	 * init, we refresh the views (corpora, bases and query).
+	 *
+	 * @param jobHandler the job
+	 * @return true, if successful
+	 * @throws Exception
+	 */
+	private boolean initializeUI(JobHandler jobHandler) throws Exception {
+
+		// Fix the freeze at splash screen on Mac OS X/Cocoa because of a deadlock between AWT/SWT threads (bug #894)
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				try {
+					new ProgressMonitorDialog(Display.getDefault().getActiveShell()).run(true, true, new IRunnableWithProgress() {
+
+						@Override
+						public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+							monitor.beginTask(Messages.ApplicationWorkbenchAdvisor_PROGRESS_BAR_LOADING_CORPORA, 2);
+
+							if (!Toolbox.isInitialized()) {
+								try {
+									monitor.worked(1);
+
+									preloadTxmCommandExtensions();
+									
+									Toolbox.initialize(TBXPreferences.class);
+
+									callStartScript();
+									
+									loadTxmCommandExtensions();
+								}
+								catch (Exception e) {
+									// TODO Auto-generated catch block
+									e.printStackTrace();
+								}
+							}
+
+							monitor.done(); 
+						}
+					});
+				}
+				catch(Exception e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		}); 
+
+		// Fix the freeze at splash screen on Mac OS X/Cocoa because of a deadlock between AWT/SWT threads (bug #894)
+		//		Display.getDefault().syncExec(new Runnable() {
+		//				@Override
+		//				public void run() {
+		// TODO Auto-generated method stub
+		//					if (!Toolbox.isInitialized()) {
+		//						try {
+		//							Toolbox.initialize(getProperties());
+		//							// Initializes the charts SWT component provider
+		//							Log.info(Messages.ApplicationWorkbenchAdvisor_87);
+		//							Application.swtComponentProvider = SWTChartsComponentProvider.createChartsSWTComponentProvider(Toolbox.getChartsEngine());
+		//						}
+		//						catch (Exception e) {
+		//							// TODO Auto-generated catch block
+		//							e.printStackTrace();
+		//						}
+		//					}
+		//				}
+		//			});
+
+		// FIXME: old version, may lead to freeze at splash screen on Mac OS X because of a deadlock between AWT/SWT threads
+		//		if (!Toolbox.isInitialized()) {
+		//			Properties properties = getProperties();
+		//			if (Toolbox.initialize(properties)) {
+		//				// Initializes the charts SWT component provider
+		//				Log.info(Messages.ApplicationWorkbenchAdvisor_87);
+		//				Application.swtComponentProvider = SWTChartsComponentProvider.createChartsSWTComponentProvider(Toolbox.getChartsEngine());
+		//			} else {
+		//				return false;
+		//			}
+		//		}
+
+		// reload corpora and bases views
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				Log.warning(Messages.ApplicationWorkbenchAdvisor_88);
+				CorporaView.reload();
+				MacroExplorer.refresh();
+				BasesView.reload();
+				QueriesView.reload();
+				RVariablesView.reload();
+				SummaryView.reload();
+				if (Toolbox.isInitialized()) {
+					//initializeMissingPreferences();
+					StatusLine.setMessage(Messages.ApplicationWorkbenchAdvisor_ready);
+				} else {
+					StatusLine.setMessage(Messages.ApplicationWorkbenchAdvisor_init_failed);
+				}
+			}
+		});
+
+		//TxmPreferences.dump();
+		return true;
+	}
+
+//	/**
+//	 * Initializes the missing RCP preferences from the TBX preferences.
+//	 */
+//	private void initializeMissingPreferences()	{
+//		String key, value;
+//		for(int i = 0; i < Toolbox.existingKeys.length; i++) {
+//			key = Toolbox.existingKeys[i];
+//			value = Toolbox.getParam(key);
+//			if(value != null && TxmPreferences.getString(key, null) == null)	{
+//				Log.info(Messages.ApplicationWorkbenchAdvisor_89 + key + "=" + value); //$NON-NLS-1$
+//				TxmPreferences.set(key, value);
+//			}
+//		}
+//	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/JobsTimer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/JobsTimer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/JobsTimer.java	(revision 324)
@@ -0,0 +1,70 @@
+package org.txm.rcp;
+
+import java.util.Date;
+
+import org.eclipse.osgi.util.NLS;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.utils.ExecTimer;
+
+/**
+ * Print formated timer 
+ * 
+ * @author mdecorde
+ *
+ */
+public class JobsTimer {
+	static long startTime = 0, endTime = 0;
+	static float time = 0;
+	static String message = ""; //$NON-NLS-1$
+	
+	public static void start() {
+		startTime = new Date().getTime();
+	}
+
+	public static String stop() {
+		endTime = new Date().getTime();
+		time = endTime - startTime;
+		return setMessage();
+	}
+
+	static float t;
+	private static String setMessage() {
+		t = time;
+		if (t < 1000) {
+			message = ""+((int)t)+Messages.JobsTimer_2; //$NON-NLS-1$
+		} else {
+			t = t/1000;
+			if (t < 3) {
+				message = ""+t; //$NON-NLS-1$
+				message = ""+(message.substring(0, 3))+Messages.JobsTimer_5; //$NON-NLS-1$
+			} else if (t < 60) 
+				message = ""+((int)t)+Messages.JobsTimer_5; //$NON-NLS-1$
+			else if (t < 3600) {
+				message = ""+((int)t/60)+Messages.JobsTimer_9+((int)t%60)+Messages.JobsTimer_5; //$NON-NLS-1$
+			} else { 
+				message = ""+((int)t/3600)+Messages.JobsTimer_12+((int)(t%3600)/60)+Messages.JobsTimer_13+((int)(t%3600)%60)+ Messages.JobsTimer_5; //$NON-NLS-1$
+			}
+		}
+		return message;
+	}
+
+	public static String getMessage() {
+		return message;
+	}
+	
+	public static void stopAndPrint() {
+		if (TxmPreferences.getBoolean(TBXPreferences.SHOW_TIMINGS)) {
+			if (time <= 1000) System.out.println(NLS.bind(Messages.JobsTimer_15, stop(),(int)time));
+			else System.out.println(NLS.bind(Messages.JobsTimer_19, stop()));
+		}
+	}
+
+	public static void main(String[] args) throws InterruptedException {
+		ExecTimer.start();
+		Thread.sleep(1000);
+		JobsTimer.start();
+		Thread.sleep(1000);
+		System.out.println(Messages.JobsTimer_20+JobsTimer.stop());
+		System.out.println(Messages.JobsTimer_21+ExecTimer.stop());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/JobsTimer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/log/GraphicalLogger.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/log/GraphicalLogger.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/log/GraphicalLogger.java	(revision 324)
@@ -0,0 +1,97 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.log;
+
+import org.txm.utils.logger.LocalizedLogger;
+
+/**
+ * The Class GraphicalLogger.
+ *
+ * @deprecated @ author mdecorde
+ */
+@Deprecated
+public class GraphicalLogger extends LocalizedLogger {
+	/*
+	 * public GraphicalLogger(Class<?> clazz) { super(clazz); }
+	 * 
+	 * private void dialog (String message) {
+	 * MessageDialog.openError(PlatformUI.
+	 * getWorkbench().getDisplay().getActiveShell(), Messages.GraphicalLogger_0,
+	 * message); }
+	 * 
+	 * private void dialog (String message, Throwable t) { if (t instanceof
+	 * CqiClientException){ if (t.getCause() instanceof CqiServerError)
+	 * message+=Messages
+	 * .GraphicalLogger_1+t.getCause().getClass().getSimpleName(
+	 * )+')'+Messages.GraphicalLogger_2+t.getCause().getMessage();
+	 * if (t.getCause() instanceof SocketException)
+	 * message+=Messages.GraphicalLogger_3; } if (t instanceof StatException){
+	 * message+=Messages.GraphicalLogger_4; } if (t instanceof
+	 * GroovyExecutionException){
+	 * message+=Messages.GraphicalLogger_5+t.getCause(); }
+	 * MessageDialog.openError
+	 * (PlatformUI.getWorkbench().getDisplay().getActiveShell(),
+	 * Messages.GraphicalLogger_0, message); }
+	 * 
+	 * @Override public void error(String key, Object arg, Throwable t) {
+	 * dialog(super.getLocalizer().message(key),t); super.error(key, arg, t); }
+	 * 
+	 * @Override public void error(String key, Object arg) {
+	 * dialog(super.getLocalizer().message(key)); super.error(key, arg); }
+	 * 
+	 * @Override public void error(String key, Object[] arg, Throwable t) {
+	 * dialog(super.getLocalizer().message(key),t); super.error(key, arg, t); }
+	 * 
+	 * @Override public void error(String key, Object[] arg) {
+	 * dialog(super.getLocalizer().message(key)); super.error(key, arg); }
+	 * 
+	 * @Override public void error(String key, Throwable t) {
+	 * dialog(super.getLocalizer().message(key),t); super.error(key, t); }
+	 * 
+	 * @Override public void error(String key) {
+	 * dialog(super.getLocalizer().message(key)); super.error(key); }
+	 * 
+	 * @Override public void fatal(String key, Object arg, Throwable t) {
+	 * dialog(super.getLocalizer().message(key),t); super.fatal(key, arg, t); }
+	 * 
+	 * @Override public void fatal(String key, Object arg) {
+	 * dialog(super.getLocalizer().message(key)); super.fatal(key, arg); }
+	 * 
+	 * @Override public void fatal(String key, Object[] arg, Throwable t) {
+	 * dialog(super.getLocalizer().message(key),t); super.fatal(key, arg, t); }
+	 * 
+	 * @Override public void fatal(String key, Object[] arg) {
+	 * dialog(super.getLocalizer().message(key)); super.fatal(key, arg); }
+	 * 
+	 * @Override public void fatal(String key, Throwable t) {
+	 * dialog(super.getLocalizer().message(key),t); super.fatal(key, t); }
+	 * 
+	 * @Override public void fatal(String key) {
+	 * dialog(super.getLocalizer().message(key)); super.fatal(key); }
+	 */
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/log/GraphicalLogger.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/log/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/log/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/log/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Popup - old</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/log/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/Application.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/Application.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/Application.java	(revision 324)
@@ -0,0 +1,267 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.GnuParser;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.ParseException;
+import org.apache.commons.cli.Parser;
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.core.net.proxy.IProxyService;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.jface.util.Util;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceReference;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.preferences.AdvancePreferencePage;
+import org.txm.rcp.preferences.CQPPreferencePage;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.statsengine.r.core.preferences.RPreferences;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * This class controls all aspects of the application's execution.
+ */
+public class Application implements IApplication {
+
+	/** The Constant PLUGIN_ID. */
+	public static final String PLUGIN_ID = "org.txm.rcp"; //$NON-NLS-1$
+
+	/** The Constant FIRST_LAUNCH. */
+	public static final String FIRST_LAUNCH = "first_launch"; //$NON-NLS-1$
+
+	
+	//public static OpenDocumentEventProcessor openDocProcessor = new OpenDocumentEventProcessor();	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.IPlatformRunnable#run(java.lang.Object)
+	 */
+	@Override
+	public Object start(IApplicationContext context) throws Exception {
+		Map args = context.getArguments();
+		
+		List<String> argsList = Arrays.asList((String[])(args.get("application.args")));
+		System.out.println(Messages.Application_0+argsList);
+		if (argsList.contains("-log")) { //$NON-NLS-1$
+			System.out.println(Messages.Application_1);
+			Log.setPrintInConsole(true);
+			Log.setLevel(Level.ALL);
+			Log.severe(Messages.Application_2);
+			TxmPreferences.set(TBXPreferences.ADD_TECH_LOGS, true);
+			TxmPreferences.set(TBXPreferences.LOG_LEVEL, "ALL"); //$NON-NLS-1$
+			TxmPreferences.set(TBXPreferences.LOG_STACKTRACE, true);
+		}
+		if (argsList.contains("-run")) { //$NON-NLS-1$
+			//System.out.println("Running TXM");
+		} else {
+			System.out.println("TXM must be launch with the argument '-run' to start."); //$NON-NLS-1$
+			System.out.println(Messages.Application_4);
+
+			javax.swing.JOptionPane.showMessageDialog(null, Messages.Application_4);
+			return IApplication.EXIT_OK;
+		}
+		// test if Java 1.6 is installed
+		String version = System.getProperty("java.version"); //$NON-NLS-1$
+		Log.warning("java.version : " + version); //$NON-NLS-1$
+
+		boolean exit = false;// parseCommandLine();
+		if (exit) {
+			return IApplication.EXIT_OK;
+		}
+
+		Display display = PlatformUI.createDisplay();
+		//display.addListener(SWT.OpenDocument, openDocProcessor);
+		
+		//Lock the RCP workspace, thus there is only one TXM instance running
+		Log.warning(Messages.Application_8);
+		if (!Platform.getInstanceLocation().lock()){
+			//Shell shell = display.getActiveShell();
+			System.out.println("TXM is already running. Exiting...");
+			return IApplication.EXIT_OK;
+		}
+
+		try {
+			Log.warning(Messages.Application_9);
+			activateProxyService();
+		} catch (Exception e) {
+			Log.warning(Messages.Application_10+e);
+		}
+
+		try {
+			// initialization code has been put in ApplicationWorkbenchAdvisor
+			// as it should
+
+			//run the application mainloop
+			int returnCode = PlatformUI.createAndRunWorkbench(display,
+					new ApplicationWorkbenchAdvisor());
+
+			if (returnCode == PlatformUI.RETURN_RESTART) {
+				return IApplication.EXIT_RESTART;
+			}
+
+			return IApplication.EXIT_OK;
+		} finally {
+			// System.out.println(Messages.Application_2);
+			display.dispose();
+		}
+	}
+	
+
+	@Override
+	public void stop() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	/**
+	 * Activates the proxy service and sets the network connection active provider as native.
+	 */
+	private void  activateProxyService() {
+		String sys_proxy_host = System.getProperty("http.proxyHost"); // must be called before IProxyService is used
+		
+		Bundle bundle = Platform.getBundle("org.eclipse.ui.ide"); //$NON-NLS-1$
+		IProxyService  proxyService = null;
+		if (bundle != null) {
+			ServiceReference ref = bundle.getBundleContext().getServiceReference(IProxyService.class.getName());
+			if (ref != null)
+				proxyService = bundle.getBundleContext().getService(ref);
+		}
+		if (proxyService == null) {
+			Log.warning("Proxy service could not be found."); //$NON-NLS-1$
+		} else {
+			//System.out.println("FIRST RUN TEST RESULT: "+ApplicationWorkbenchAdvisor.firstLaunchAfterInstallation());
+			// force active provider as "Manual" on Mac OS X
+            if (Util.isMac() && sys_proxy_host != null && ApplicationWorkbenchAdvisor.firstLaunchAfterInstallation()) { 
+                System.out.println("System proxy detected. Force network provider to manual with proxy_host="+sys_proxy_host);
+                proxyService.setProxiesEnabled(true); 
+            }
+			
+			if (Util.isMac()) { // configure only for Mac OS X
+//				String proxy_conf = "";
+//				ProxyConf conf = new ProxyConf(this);
+//				if (conf.mustSetProxyConfiguration()) { // there is a system proxy configured
+//					System.out.println(Messages.bind(Messages.Application_11, proxy_conf));
+//					proxyService.setProxiesEnabled(true);
+//					//proxyService.setSystemProxiesEnabled(false);
+//					
+//					// prepare a new proxy configuration
+//					boolean requiresAuthentication = conf.proxy_user != null && conf.proxy_user.length() > 0;
+//					IProxyData[] proxies = new IProxyData[1];
+//					proxies[0] = new ProxyData(IProxyData.HTTP_PROXY_TYPE, conf.proxy_host, conf.proxy_port, requiresAuthentication, "");
+//					proxies[0].setPassword(conf.proxy_password);
+//					proxies[0].setUserid(conf.proxy_user);
+//					
+//					try {
+//						proxyService.setProxyData(proxies); // apply the new proxy configuration
+//						System.out.println("TXM proxy configuration set: "+Arrays.toString(proxies));
+//					} catch (Exception e) {
+//						System.out.println("Failed to set TXM proxy configuration: "+Arrays.toString(proxies));
+//						Log.printStackTrace(e);
+//					}
+//				}
+			}
+		}	
+	}
+
+	/**
+	 * Parses the command line.
+	 *
+	 * @return true, if successful
+	 * @deprecated, parse the command line the list optionsForPreferences must
+	 * be edited too add options
+	 */
+	private boolean parseCommandLine() {
+		boolean exit = false;
+		String[] optionsForPreferences = {
+				TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE,
+				TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE,
+//				TBXPreferences.CQI_SERVER_PATH_TO_REGISTRY,
+				RPreferences.PATH_TO_EXECUTABLE,
+				ScriptPreferencePage.SCRIPT_ROOT_DIR,
+				ScriptPreferencePage.SCRIPT_CURRENT_DIR,
+				TBXPreferences.INSTALL_DIR };
+		String setPrefAndExit = "setPrefAndExit"; //$NON-NLS-1$
+
+		Options options = new Options();
+		options.addOption(OptionBuilder.create("product")); //option passed here when run as an eclipse application. Recognized to prevent a UnrecognizedOptionException //$NON-NLS-1$
+		options.addOption(OptionBuilder.create(setPrefAndExit));
+		for (String preference : optionsForPreferences)
+			options.addOption(OptionBuilder.withValueSeparator().hasArgs()
+					.create(preference));
+
+		Parser parser = new GnuParser();
+		CommandLine cl;
+		try {
+			cl = parser.parse(options, Platform.getCommandLineArgs());
+		} catch (ParseException e) {
+
+			System.err.println(NLS.bind(Messages.FAILED_TO_PARSE_OPTIONS,
+					StringUtils.join(Platform.getCommandLineArgs(), " "), e)); //$NON-NLS-1$
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+			exit = true;
+			return exit;
+		}
+
+		ScopedPreferenceStore preferences = new ScopedPreferenceStore(
+				org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE, Application.PLUGIN_ID);
+		for (String preference : optionsForPreferences)
+			if (cl.hasOption(preference)) {
+				preferences.setValue(preference, cl.getOptionValue(preference));
+			}
+
+		try {
+			preferences.save();
+		} catch (IOException e) {
+			System.err.println(NLS.bind(
+					Messages.FAILED_TO_SAVE_PREFERENCES, e));
+			exit = true;
+			return exit;
+		}
+
+		if (cl.hasOption(setPrefAndExit))
+			exit = true;
+		return exit;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/Application.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/AdapterFactory.java	(revision 324)
@@ -0,0 +1,547 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.core.results.ITXMResult;
+import org.txm.functions.concordances.Concordance;
+import org.txm.functions.internal.InternalView;
+import org.txm.functions.intertextualdistance.InterTextDistance;
+//import org.txm.functions.queryindex.QueryIndex;
+import org.txm.functions.referencer.Referencer;
+import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
+import org.txm.rcp.adapters.TXMResultAdapter;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.CorpusManager;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.Subcorpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * A factory for creating Adapter objects.
+ * 
+ * @author jmague
+ */
+public class AdapterFactory implements IAdapterFactory {
+	
+	private static boolean firstCorpusDiag = true;
+	
+	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.getBase() == null)
+							System.out.println(NLS.bind(Messages.AdapterFactory_0, 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() {
+
+		@Override
+		public Object[] getChildren(Object corpus) {
+			//List<Subcorpus> subcorpora = ((Corpus) corpus).getSubcorpora();
+			ArrayList<ITXMResult> results = ((Corpus) corpus).getResults(true);
+			for (int i = 0; i < results.size(); i++) {
+				Object result = results.get(i);
+				
+				// remove "id" Lexicon from displayed results
+				if (result instanceof Lexicon) {
+					Lexicon lex = (Lexicon) result;
+					if (lex.getProperty().getName().equals("id")) { //$NON-NLS-1$
+						results.remove(result);
+						i--;
+					}
+				}
+			}
+			List<Object> children = new ArrayList<Object>();
+			//children.addAll(subcorpora);
+			children.addAll(results);
+			return children.toArray();
+		}
+
+		@Override
+		public ImageDescriptor getImageDescriptor(Object object) {
+			ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(Application.PLUGIN_ID, IImageKeys.CORPUS);
+			return imageDescriptor;
+		}
+
+		@Override
+		public String getLabel(Object corpus) {
+			if (corpus instanceof MainCorpus) {
+				return ((MainCorpus) corpus).getNameForCorporaView();
+			} else {
+				return ((Corpus) corpus).getName();
+			}
+		}
+
+		@Override
+		public Object getParent(Object corpus) {
+			if (corpus instanceof Subcorpus)
+				return ((Subcorpus) corpus).getMotherSubcorpus();
+			else
+				return CorpusManager.getCorpusManager();
+		}
+	};
+
+	/** The partition adapter. */
+	private IWorkbenchAdapter partitionAdapter = new IWorkbenchAdapter() {
+
+		@Override
+		public Object[] getChildren(Object partition) {
+			ArrayList<ITXMResult> children = ((Partition) partition).getResults();
+			// System.out.println("PARTITION RESULTS "+children);
+			return children.toArray();
+		}
+
+		@Override
+		public ImageDescriptor getImageDescriptor(Object object) {
+			return AbstractUIPlugin.imageDescriptorFromPlugin(
+					Application.PLUGIN_ID, IImageKeys.PARTITION);
+		}
+
+		@Override
+		public String getLabel(Object partition) {
+			return ((Partition) partition).getSimpleName(); //$NON-NLS-1$
+		}
+
+		@Override
+		public Object getParent(Object partition) {
+			return ((Partition) partition).getCorpus();
+		}
+	};
+		
+//	/** The partition adapter. */
+//	private IWorkbenchAdapter queryIndexAdapter = new IWorkbenchAdapter() {
+//		@Override
+//		public Object[] getChildren(Object obj) {
+//			return new Object[0];
+//		}
+//
+//		@Override
+//		public ImageDescriptor getImageDescriptor(Object object) {
+//			return AbstractUIPlugin.imageDescriptorFromPlugin(
+//					Application.PLUGIN_ID, IImageKeys.QUERYINDEX);
+//		}
+//
+//		@Override
+//		public String getLabel(Object qindex) {
+//			return "" + ((QueryIndex) qindex).getName(); //$NON-NLS-1$
+//		}
+//
+//		@Override
+//		public Object getParent(Object qindex) {
+//			return ((QueryIndex) qindex).getParent();
+//		}
+//	};
+
+//	/** The lexical table adapter. */
+//	private IWorkbenchAdapter lexicalTableAdapter = new IWorkbenchAdapter() {
+//		@Override
+//		public Object[] getChildren(Object lexicaltable) {
+//			// List<Object> children = ((LexicalTable)
+//			// lexicaltable).getResults();
+//			// System.out.println("PARTITION RESULTS "+children);
+//			return ((LexicalTable)lexicaltable).getResults().toArray();
+//		}
+//
+//		@Override
+//		public ImageDescriptor getImageDescriptor(Object object) {
+//			return AbstractUIPlugin.imageDescriptorFromPlugin(
+//					Application.PLUGIN_ID, IImageKeys.LEXICALTABLE);
+//		}
+//
+//		@Override
+//		public String getLabel(Object lexicaltable) {
+//			return "" + ((LexicalTable) lexicaltable).getProperty(); //$NON-NLS-1$
+//		}
+//
+//		@Override
+//		public Object getParent(Object lexicaltable) {
+//			return ((LexicalTable) lexicaltable).getPartition();
+//		}
+//	};
+
+//	/** The Progression adapter. */
+//	private IWorkbenchAdapter ProgressionAdapter = new IWorkbenchAdapter() {
+//		@Override
+//		public Object[] getChildren(Object progression) {
+//			return new Object[0];
+//		}
+//
+//		@Override
+//		public ImageDescriptor getImageDescriptor(Object object) {
+//			return AbstractUIPlugin.imageDescriptorFromPlugin(
+//					Application.PLUGIN_ID, IImageKeys.ACTION_PROGRESSION);
+//		}
+//
+//		@Override
+//		public String getLabel(Object progression) {
+//			return ((Progression) progression).getDetails(); 
+//		}
+//
+//		@Override
+//		public Object getParent(Object progression) {
+//			return ((Progression) progression).getCorpus();
+//		}
+//	};
+	
+	/** The Progression adapter. */
+	private IWorkbenchAdapter interTextDistAdapter = new IWorkbenchAdapter() {
+		@Override
+		public Object[] getChildren(Object dist) {
+			return new Object[0];
+		}
+
+		@Override
+		public ImageDescriptor getImageDescriptor(Object object) {
+			return AbstractUIPlugin.imageDescriptorFromPlugin(
+					Application.PLUGIN_ID, IImageKeys.ACTION_INTERTEXTDIST);
+		}
+
+		@Override
+		public String getLabel(Object dist) {
+			return ((InterTextDistance) dist).getLabel(); 
+		}
+
+		@Override
+		public Object getParent(Object dist) {
+			return ((InterTextDistance) dist).getTable(); 
+		}
+	};
+	
+	/** The InternalView adapter. */
+	private IWorkbenchAdapter InternalViewAdapter = new IWorkbenchAdapter() {
+		@Override
+		public Object[] getChildren(Object internal) {
+			return new Object[0];
+		}
+
+		@Override
+		public ImageDescriptor getImageDescriptor(Object object) {
+			return AbstractUIPlugin.imageDescriptorFromPlugin(
+					Application.PLUGIN_ID, IImageKeys.ACTION_INTERNALVIEW);
+		}
+
+		@Override
+		public String getLabel(Object internalView) {
+			return ((InternalView) internalView).getDetails(); 
+		}
+
+		@Override
+		public Object getParent(Object internalView) {
+			return ((InternalView) internalView).getCorpus();
+		}
+	};
+
+//	/** The CAH adapter. */
+//	private IWorkbenchAdapter CAHAdapter = new IWorkbenchAdapter() {
+//		@Override
+//		public Object[] getChildren(Object cah) {
+//			return new Object[0];
+//		}
+//
+//		@Override
+//		public ImageDescriptor getImageDescriptor(Object object) {
+//			return AbstractUIPlugin.imageDescriptorFromPlugin(
+//					Application.PLUGIN_ID, IImageKeys.ACTION_CAH);
+//		}
+//
+//		@Override
+//		public String getLabel(Object cah) {
+//			return "" + ((CAH) cah).getName(); //$NON-NLS-1$
+//		}
+//
+//		@Override
+//		public Object getParent(Object cah) {
+//			return ((CAH) cah).getParent();
+//		}
+//	};
+//
+//	/** The Cooccurrence adapter. */
+//	private IWorkbenchAdapter CooccurrenceAdapter = new IWorkbenchAdapter() {
+//
+//		@Override
+//		public Object[] getChildren(Object cooccurrence) {
+//			return new Object[0];
+//		}
+//
+//		@Override
+//		public ImageDescriptor getImageDescriptor(Object object) {
+//			return AbstractUIPlugin.imageDescriptorFromPlugin(
+//					Application.PLUGIN_ID, IImageKeys.ACTION_COOCCURRENCE);
+//		}
+//
+//		@Override
+//		public String getLabel(Object cooccurrence) {
+//			return ((Cooccurrence) cooccurrence).getName(); 
+//		}
+//
+//		@Override
+//		public Object getParent(Object cooccurrence) {
+//			return ((Cooccurrence) cooccurrence).getCorpus();
+//		}
+//	};
+
+//	/** The specificities result adapter. */
+//	private IWorkbenchAdapter specificitiesResultAdapter = new IWorkbenchAdapter() {
+//
+//		@Override
+//		public Object[] getChildren(Object o) {
+//			return new Object[0];
+//		}
+//
+//		@Override
+//		public ImageDescriptor getImageDescriptor(Object object) {
+//			return AbstractUIPlugin.imageDescriptorFromPlugin(
+//					Application.PLUGIN_ID, IImageKeys.ACTION_SPECIFICITIES);
+//		}
+//
+//		@Override
+//		public String getLabel(Object o) {
+//			return ((SpecificitesResult) o).getName();
+//		}
+//
+//		@Override
+//		public Object getParent(Object o) {
+//			return ((SpecificitesResult) o).getParent();
+//		}
+//
+//	};
+
+	/** The referencer adapter. */
+	private IWorkbenchAdapter referencerAdapter = new IWorkbenchAdapter() {
+		@Override
+		public Object[] getChildren(Object o) {
+			return new Object[0];
+		}
+
+		@Override
+		public ImageDescriptor getImageDescriptor(Object object) {
+			return AbstractUIPlugin.imageDescriptorFromPlugin(
+					Application.PLUGIN_ID, IImageKeys.ACTION_REFERENCER);
+		}
+
+		@Override
+		public String getLabel(Object o) {
+			return ((Referencer) o).getName();
+		}
+
+		@Override
+		public Object getParent(Object o) {
+			return ((Referencer) o).getParent();
+		}
+	};
+
+	/** The concordance adapter. */
+	private IWorkbenchAdapter concordanceAdapter = new IWorkbenchAdapter() {
+		@Override
+		public Object[] getChildren(Object o) {
+			return new Object[0];
+		}
+
+		@Override
+		public ImageDescriptor getImageDescriptor(Object object) {
+			return AbstractUIPlugin.imageDescriptorFromPlugin(
+					Application.PLUGIN_ID, IImageKeys.ACTION_CONCORDANCES);
+		}
+
+		@Override
+		public String getLabel(Object o) {
+			return ((Concordance) o).getQuery().getQueryString();
+		}
+
+		@Override
+		public Object getParent(Object o) {
+			return ((Concordance) o).getCorpus();
+		}
+	};
+
+
+
+	/** The Lexicon adapter. */
+	private IWorkbenchAdapter LexiconAdapter = new TXMResultAdapter() {
+		@Override
+		public ImageDescriptor getImageDescriptor(Object object) {
+			return AbstractUIPlugin.imageDescriptorFromPlugin(Application.PLUGIN_ID, IImageKeys.ACTION_FREQUENCY_LIST);
+		}
+	};
+
+//	/** The Index adapter. */
+//	private IWorkbenchAdapter IndexAdapter = new IWorkbenchAdapter() {
+//
+//		@Override
+//		public Object[] getChildren(Object o) {
+//			return ((Index)o).getResults().toArray();
+//		}
+//
+//		@Override
+//		public ImageDescriptor getImageDescriptor(Object object) {
+//			return AbstractUIPlugin.imageDescriptorFromPlugin(
+//					Application.PLUGIN_ID, IImageKeys.ACTION_INDEX);
+//		}
+//
+//		@Override
+//		public String getLabel(Object o) {
+//			return ((Index) o).getName();
+//		}
+//
+//		@Override
+//		public Object getParent(Object o) {
+//			return ((Index) o).getParent();
+//		}
+//	};
+
+	/**
+	 * Gets the adapter.
+	 *
+	 * @param adaptableObject the adaptable object
+	 * @param adapterType the adapter type
+	 * @return the adapter
+	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object,
+	 * java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Object adaptableObject, Class adapterType) {
+		if (adapterType == IWorkbenchAdapter.class
+				&& adaptableObject instanceof CorpusManager)
+			return corpusManagerAdapter;
+		if (adapterType == IWorkbenchAdapter.class
+				&& adaptableObject instanceof Corpus)
+			return corpusAdapter;
+		if (adapterType == IWorkbenchAdapter.class
+				&& adaptableObject instanceof Partition)
+			return partitionAdapter;
+//		if (adapterType == IWorkbenchAdapter.class
+//				&& adaptableObject instanceof SpecificitesResult)
+//			return specificitiesResultAdapter;
+		if (adapterType == IWorkbenchAdapter.class
+				&& adaptableObject instanceof Concordance)
+			return concordanceAdapter;
+		if (adapterType == IWorkbenchAdapter.class
+				&& adaptableObject instanceof Referencer)
+			return referencerAdapter;
+		if (adapterType == IWorkbenchAdapter.class
+				&& adaptableObject instanceof Lexicon)
+			return LexiconAdapter;
+//		if (adapterType == IWorkbenchAdapter.class
+//				&& adaptableObject instanceof Index)
+//			return IndexAdapter;
+//		if (adapterType == IWorkbenchAdapter.class
+//				&& adaptableObject instanceof Progression)
+//			return ProgressionAdapter;
+//		if (adapterType == IWorkbenchAdapter.class
+//				&& adaptableObject instanceof Cooccurrence)
+//			return CooccurrenceAdapter;
+//		if (adapterType == IWorkbenchAdapter.class
+//				&& adaptableObject instanceof LexicalTable)
+//			return lexicalTableAdapter;
+//		if (adapterType == IWorkbenchAdapter.class
+//				&& adaptableObject instanceof CAH)
+//			return CAHAdapter;
+		if (adapterType == IWorkbenchAdapter.class
+				&& adaptableObject instanceof InternalView)
+			return InternalViewAdapter;
+		if (adapterType == IWorkbenchAdapter.class
+				&& adaptableObject instanceof InterTextDistance)
+			return interTextDistAdapter;
+
+		//check adapters from plugins
+		if (externalAdapters.containsKey(adaptableObject.getClass())) {
+			return externalAdapters.get(adaptableObject.getClass());
+		}
+		return null;
+	}
+
+	/**
+	 * Gets the adapter list.
+	 *
+	 * @return the adapter list
+	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+	 */
+	@Override
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
+	public Class[] getAdapterList() {
+		return new Class[] { IWorkbenchAdapter.class };
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/AdapterFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_fr.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_fr.properties	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_fr.properties	(revision 324)
@@ -0,0 +1,1128 @@
+﻿#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
+#Eclipse modern messages class
+#Mon Feb 10 10:26:04 CET 2014
+
+About_Menu_Label = À propos de TXM...
+
+AdapterFactory_0 = ** Avertissement : le corpus {0} est corrompu. Certaines commandes ne fonctionneront pas correctement.
+
+AddBase_1  = Nouveau corpus : {0}.
+AddBase_10 = TXM est prêt.
+AddBase_16 = ** Impossible d''affecter la langue {0} à la propriété ''LANG'' de la structure <txmcorpus>
+AddBase_17 = ** Impossible de lire le fichier {0}
+AddBase_19 = Attention
+AddBase_2  = ** Échec du chargement du corpus à partir du dossier : {0}.\nImpossible de trouver les composants nécessaires.
+AddBase_20 = Le répertoire du corpus {0} existe déjà. Voulez-vous le remplacer ?
+AddBase_22 = Le fichier {0} n''est pas un fichier TXM.
+AddBase_23 = Le corpus {0} n''a pas de propriété ''LANG'' associée à la structure <txmcorpus>
+AddBase_24 = ** Échec du chargement du corpus {0}
+AddBase_25 = Un corpus TXM au format binaire est soit un fichier d'extension .txm ou .zip, soit un dossier composé des sous-dossiers 'html', 'data', 'registry', 'txm'
+AddBase_27 = Chargement du corpus
+AddBase_28 = Extraction du corpus binaire
+AddBase_29 = Extraction de {0} dans {1}
+AddBase_31 = ** Échec de l''extraction du corpus binaire : {0}
+AddBase_32 = Chargement du corpus dans la plateforme
+AddBase_33 = Redémarrage de la plateforme
+AddBase_34 = L'espace de travail de TXM n'est pas initialisé, veuillez redémarrer TXM.
+AddBase_4  = ** Échec de chargement du corpus binaire(null error).
+AddBase_7  = ** Échec de création du corpus binaire.
+
+AddProject_3 = Saisissez le nom du projet
+
+AdvancePreferencePage_0  = Afficher la stacktrace
+AdvancePreferencePage_1  = Dossier d'installation de TXM
+AdvancePreferencePage_12 = Niveau de détails du journal
+AdvancePreferencePage_13 = Ajouter des commentaires techniques
+AdvancePreferencePage_14 = Copier le journal dans un fichier
+AdvancePreferencePage_2  = Dossier utilisateur TXM
+AdvancePreferencePage_3  = Afficher les temps d'exécution dans la console
+AdvancePreferencePage_4  = Mode avancé
+AdvancePreferencePage_6  = Journal et messages
+AdvancePreferencePage_7  = Niveau de mise à jour
+
+AnnotationPreferences_0 = Mode
+AnnotationPreferences_1 = simple (avec catégories)
+AnnotationPreferences_2 = avancé (avec types+valeurs)
+
+ApplicationWorkbenchAdvisor_0                            = Initialisation de la plateforme...
+ApplicationWorkbenchAdvisor_1                            = Initialisation de la plateforme...
+ApplicationWorkbenchAdvisor_11                           = Chargement des corpus d'exemple 
+ApplicationWorkbenchAdvisor_12                           = ** Erreur : la variable d''environnement ''TXMHOME'' est bien définie ({0}) mais le dossier n''existe pas : 
+ApplicationWorkbenchAdvisor_13                           = ** Échec de la création du dossier TXMHOME : {0}
+ApplicationWorkbenchAdvisor_14                           = \ évaluation de l'extension :  
+ApplicationWorkbenchAdvisor_16                           = Nettoyage de l''ancien dossier de sauvegarde des corpus ''{0}''. 
+ApplicationWorkbenchAdvisor_17                           = .
+ApplicationWorkbenchAdvisor_18                           = Corpus déjà sauvegardés dans ''{0}'' : {1}.
+ApplicationWorkbenchAdvisor_19                           = ** Échec de configuration des paramètres du logiciel TreeTagger : {0}
+ApplicationWorkbenchAdvisor_2                            = Chargement des préférences d''installation de TXM à partir de : {0}
+ApplicationWorkbenchAdvisor_20                           = \ in 
+ApplicationWorkbenchAdvisor_22                           = Traitement du dossier : 
+ApplicationWorkbenchAdvisor_23                           = \ ...
+ApplicationWorkbenchAdvisor_24                           = Erreur lors du déplacement du corpus depuis  
+ApplicationWorkbenchAdvisor_25                           = Lecture des préférences depuis le chemin d''installation : {0}
+ApplicationWorkbenchAdvisor_26                           = \ vers  
+ApplicationWorkbenchAdvisor_27                           = Le dossier de travail de TXM existe déjà : {0}. Voulez vous recharger les corpus sauvegardés ?
+ApplicationWorkbenchAdvisor_28                           = Récupération des corpus TXM sauvegardés...
+ApplicationWorkbenchAdvisor_29                           = Erreur: 
+ApplicationWorkbenchAdvisor_3                            = Vérification de la présence du dossier de travail
+ApplicationWorkbenchAdvisor_30                           = Sauvegarde des corpus existants dans ''{0}''.
+ApplicationWorkbenchAdvisor_31                           = ** Échec de la création de l'espace de travail 'default.xml'
+ApplicationWorkbenchAdvisor_32                           = ** TreeTagger n'est pas installé, ou les chemins d'accès sont incorrects.
+ApplicationWorkbenchAdvisor_33                           = Les chemins d'accès à TreeTagger ont été réglés à des valeurs par défaut.
+ApplicationWorkbenchAdvisor_34                           = ** Échec : le dossier de sauvegarde des corpus n'a pas pu être créé
+ApplicationWorkbenchAdvisor_35                           = \nCorpus 
+ApplicationWorkbenchAdvisor_36                           = Déplacement des corpus de 
+ApplicationWorkbenchAdvisor_37                           = \ vers 
+ApplicationWorkbenchAdvisor_38                           = Attention : le corpus a déjà été sauvegardé.
+ApplicationWorkbenchAdvisor_39                           = Dossier manquant dans le dossier d''installation de TXM : {0}
+ApplicationWorkbenchAdvisor_4                            = Vérification de l'installation de TreeTagger
+ApplicationWorkbenchAdvisor_40                           = ** Échec de la copie des fichiers TXM du dossier TXMINSTALL vers TXMHOME : {0}
+ApplicationWorkbenchAdvisor_41                           = ** Échec de réglage des préférences : {0}
+ApplicationWorkbenchAdvisor_42                           = \ déplacement de 
+ApplicationWorkbenchAdvisor_43                           = Les corpus {0} ont été mis à jour avec une version plus récente.
+ApplicationWorkbenchAdvisor_43_single                    = Le corpus {0} a été mis à jour avec une version plus récente.
+ApplicationWorkbenchAdvisor_44                           = ** Impossible de déplacer le corpus 
+ApplicationWorkbenchAdvisor_45                           = ** Impossible de lire le fichier {0}
+ApplicationWorkbenchAdvisor_46                           = \nCorpus 
+ApplicationWorkbenchAdvisor_47                           = ** Impossible de sauvegarder les corpus existants : 
+ApplicationWorkbenchAdvisor_48                           = \nCorpus ''{0}'' non restauré et déplacé vers ''{1}''
+ApplicationWorkbenchAdvisor_49                           = Initialisation de la toolbox...
+ApplicationWorkbenchAdvisor_5                            = Sortie standard
+ApplicationWorkbenchAdvisor_51                           = ** Échec du chargement du corpus depuis le fichier : 
+ApplicationWorkbenchAdvisor_52                           = ** Échec du chargement des corpus d''exemple : {0}
+ApplicationWorkbenchAdvisor_53                           = Rechargement des corpus existants depuis le dossier ''{0}''.
+ApplicationWorkbenchAdvisor_54                           = Conversion du corpus au format TXM 0.5 
+ApplicationWorkbenchAdvisor_55                           = \ au format TXM 0.6.
+ApplicationWorkbenchAdvisor_56                           = ** Échec de la conversion du corpus au format TXM 0.6
+ApplicationWorkbenchAdvisor_57                           = Chargement du corpus 0.5 converti 
+ApplicationWorkbenchAdvisor_58                           = Chargement du corpus 0.6 
+ApplicationWorkbenchAdvisor_59                           = ** Erreur lors du chargement de 
+ApplicationWorkbenchAdvisor_6                            = Exception : 
+ApplicationWorkbenchAdvisor_60                           = ** Erreur : le corpus 
+ApplicationWorkbenchAdvisor_61                           = \ n'est pas un corpus binaire.
+ApplicationWorkbenchAdvisor_66                           = Récupération des préférences de TXM de l'installation précédente depuis le fichier   
+ApplicationWorkbenchAdvisor_67                           = Pas de fichier de préférences de l'installation précédentes trouvé : 
+ApplicationWorkbenchAdvisor_68                           = Mise en place du thème par défaut
+ApplicationWorkbenchAdvisor_69                           = Erreur lors du chargement du thème : 
+ApplicationWorkbenchAdvisor_7                            = Création de l'espace de travail utilisateur de TXM.
+ApplicationWorkbenchAdvisor_71                           = Chargement des corpus d'exemple.
+ApplicationWorkbenchAdvisor_8                            = Chemin d''installation : {0}
+ApplicationWorkbenchAdvisor_9                            = ** Échec de lecture du fichier des préférences d'installation
+ApplicationWorkbenchAdvisor_PROGRESS_BAR_LOADING_CORPORA = Chargement des corpus
+ApplicationWorkbenchAdvisor_init                         = Démarrage de TXM {0}...
+ApplicationWorkbenchAdvisor_init_failed                  = ** Le démarrage de la plateforme a été interrompu, veuillez régler les préférences de TXM (dans le menu 'Fichier>Préférences')
+ApplicationWorkbenchAdvisor_ready                        = Prêt.
+
+Application_4                                            = Ce fichier ne permet pas de lancer TXM. Veuillez consulter les instructions de lancement dans le manuel de TXM. 
+Application_6                                            = ** Vous devez installer la version 1.6 de Java ou supérieur avant de lancer TXM, la version courante de Java sur cette machine est {0}
+
+AssistedQueryWidget_0 = Ouvrir l'assistant de requêtes
+
+BackToText_0 = Afficher en plein texte...
+
+CANT_CREATE_GRAPHIC = ** Impossible de créer le graphique
+
+CQPPreferenceInitializer_0 = localhost
+CQPPreferenceInitializer_1 = anonymous
+
+CQPPreferencePage_0  = Chemin vers CQPlib
+CQPPreferencePage_1  = Utiliser le protocole réseau
+CQPPreferencePage_10 = &Serveur CWB distant
+CQPPreferencePage_11 = Serveur distant : nom de machine
+CQPPreferencePage_12 = Serveur distant : numéro de &port
+CQPPreferencePage_13 = Serveur distant : &login
+CQPPreferencePage_14 = Serveur distant : &mot de passe
+CQPPreferencePage_15 = Chemin vers le fichier &exécutable 'cqpserver'
+CQPPreferencePage_16 = Chemin vers le dossier de &Registre du serveur CWB
+CQPPreferencePage_17 = Chemin vers le fichier d'initialisation du serveur CWB
+CQPPreferencePage_18 = Options additionnelles pour le serveur CWB : 
+
+Cannot_ask_simple_when_advance = Impossible d'afficher l'onglet des options simples quand l'utilisateur a sélectionné l'affichage des options avancées
+
+ColRowInfosLabelProvider_19 = Qual
+ColRowInfosLabelProvider_9  = χ²
+
+ColsRowsInfosEditor_0 = Entrée erronée
+ColsRowsInfosEditor_2 = Infos: {0}
+
+Commands_0 = Erreur : impossible d'initialiser les commandes
+
+ComplexSortSelector_0 = Clés de tri : 
+ComplexSortSelector_1 = Tri multiple : 
+ComplexSortSelector_2 = Tri
+ComplexSortSelector_5 = ** Erreur pendant le tri : {0}
+ComplexSortSelector_6 = par défaut
+
+ComplexSort_0         = Ouverture de la boite de dialogue du tri composé
+ComplexSort_1         = &Tri composé
+ComplexSort_10        = Comparateur invalide
+ComplexSort_11        = Il faut sélectionner au moins deux comparateurs
+ComplexSort_12        = Ajouter à la sélection
+ComplexSort_14        = Retirer de la sélection
+ComplexSort_16        = Monter d'un cran la sélection
+ComplexSort_18        = Descendre d'un cran la sélection
+ComplexSort_2         = Définir et utiliser un tri composé
+ComplexSort_3         = Sélectionnez un tri composé
+ComplexSort_4         = &Nouveau
+ComplexSort_5         = Créer une nouvelle méthode de tri
+ComplexSort_6         = Nom : 
+ComplexSort_9         = Le champ Nom est obligatoire.
+
+ComplexSubcorpusPanel_0  = Sélectionner
+ComplexSubcorpusPanel_1  = Tous les critères
+ComplexSubcorpusPanel_16 = ne contient pas
+ComplexSubcorpusPanel_2  = certains critères
+ComplexSubcorpusPanel_4  = Requête 
+ComplexSubcorpusPanel_5  = Rafraîchir
+
+ComputeConcordance_0 = Ouverture de la fenêtre de concordance
+ComputeConcordance_1 = Erreur lors de l'ouverture de l'éditeur des concordances :
+
+ComputeCoocFromLines_0 = Calcul des cooccurrents en cours
+ComputeCoocFromLines_1 = Ouverture du tableau de cooccurrents
+
+ComputeCoocMatrix_0  = Matrice mot-mot : 
+ComputeCoocMatrix_1  = Nombre de noeuds : 
+ComputeCoocMatrix_10 = Distance en mot
+ComputeCoocMatrix_11 = Co-fréquence minimum
+ComputeCoocMatrix_12 = Fichier de sortie : aucun
+ComputeCoocMatrix_13 = Sélection du fichier de sortie
+ComputeCoocMatrix_2  = Nombre d'arcs : 
+ComputeCoocMatrix_3  = Distance en mot : 
+ComputeCoocMatrix_4  = Ecriture de la matrice mot-mot dans un fichier GRAPHML :
+ComputeCoocMatrix_7  = Paramètres de la matrice mot-mot
+
+ComputeCooccurrences_0 = Chargement du tableau de cooccurrents
+ComputeCooccurrences_1 = ** Impossible de calculer les cooccurrents de la sélection
+
+ComputeFrequencyList_2 = Calcul du lexique de la propriété {0} dans le corpus {1}
+
+ComputeIndexFromLines_0 = Envoyer la sélection vers la commande Index
+
+ComputeLexicalTable_0  = Calcul de la table lexicale avec {0}
+ComputeLexicalTable_1  = Calcul de la table lexicale {0} avec la propriété {1}
+ComputeLexicalTable_10 = Ouverture de la table lexicale
+ComputeLexicalTable_12 = Total  toutes les occurrences recenses par l'index 
+ComputeLexicalTable_13 = Sélectionnez les marges à utiliser
+ComputeLexicalTable_16 = Total  toutes les occurrences du corpus 
+ComputeLexicalTable_2  = Pas de propriété
+ComputeLexicalTable_3  = Ouverture de la boite de dialogue de configuration des marges
+ComputeLexicalTable_5  = ** Impossible de créer une table lexicale à partir d'un Index créé sur un corpus
+ComputeLexicalTable_6  = ** Les vocabulaires doivent être composés de la même combinaison de propriétés : {0}
+ComputeLexicalTable_7  = Les vocabulaires doivent avoir la même partition : {0}
+ComputeLexicalTable_9  = ** Boite de dialogue de la table lexicale : impossible d''obtenir la taille du corpus. Cause {0}
+
+ComputeProgression_0  = La fonctionnalité Progression n'est pas encore disponible pour les sous-corpus discontinus.
+ComputeProgression_1  = Erreur lors de la récupération de la dernière erreur CQP :  
+ComputeProgression_10 = Ouverture du graphique de progression
+ComputeProgression_12 = Terminé : {0} positions affichées
+ComputeProgression_13 = ** Échec du calcul de la progression : {0}
+ComputeProgression_2  = Calcul de la progression de <{0}> dans le corpus {1}
+ComputeProgression_3  = Terminé: pas de match trouvé.
+ComputeProgression_4  = Calcul de la progression de {0} avec la requête : {1}, la structure : {2}, la propriété : {3}, cumulatif: {4}
+ComputeProgression_9  = ** {0} n''est pas accessible en écriture
+
+ComputeReferencer_0 = Ouverture du résultat du Référenceur
+
+ComputeSpecificitiesDialog_0 = ** Boite de dialogue ''Calcul des Spécificités'' - {0}
+ComputeSpecificitiesDialog_1 = ** Erreur de syntaxe dans l''expression régulière : {0}
+ComputeSpecificitiesDialog_3 = Focus :
+ComputeSpecificitiesDialog_4 = Focus de partie :
+ComputeSpecificitiesDialog_9 = Pas de filtrage de partie disponible
+
+ComputeSpecificities_0       = Calcul des spécificités sur
+ComputeSpecificities_2       = Calcul des spécificités de {0}, propriété {1} 
+
+ComputeSpecifities_10 = Ouverture du tableau de résultats des spécificités
+ComputeSpecifities_11 = Calcul des spécificités de la table lexicale {0}
+ComputeSpecifities_2  = Mise à jour de la vue des corpus...
+ComputeSpecifities_3  = Calcul des spécificités du sous-corpus {0} du corpus {1}, propriété {2}
+
+Compute_Specificities        = Calcul des Spécificités
+
+ConcordancerPreferencePage_3 = Paramètres des Concordances 
+ConcordancerPreferencePage_4 = Lignes par &Page : 
+ConcordancerPreferencePage_5 = Contexte &Gauche (en mots)
+ConcordancerPreferencePage_6 = Contexte &Droit (en mots)
+
+ConcordancesEditorContributor_0 = Concordance
+
+ConcordancesEditor_0            = Dernière erreur CQi : 
+ConcordancesEditor_1            = Référence
+ConcordancesEditor_100          = Valeurs disponibles pour {0}
+ConcordancesEditor_108          = \ éléments. Continuez ?
+ConcordancesEditor_11           = |<
+ConcordancesEditor_110          = Nouvelle valeur {0} pour la catégorie {1}  
+ConcordancesEditor_112          = La valeur {0} n''est pas encore associée à la catégorie : {1}. Créer l''association ?
+ConcordancesEditor_115          = Ajouter une nouvelle categorie
+ConcordancesEditor_116          = Effectuer l'annotation
+ConcordancesEditor_12           = <
+ConcordancesEditor_13           = >
+ConcordancesEditor_14           = >|
+ConcordancesEditor_15           = Catégorie
+ConcordancesEditor_16           = &Pivot: 
+ConcordancesEditor_18           = &Editer
+ConcordancesEditor_19           = {0} occurrences
+ConcordancesEditor_2            = Contexte gauche
+ConcordancesEditor_20           = Chargement des informations sur la ligne...
+ConcordancesEditor_22           = Annoter
+ConcordancesEditor_24           = Retirer
+ConcordancesEditor_25           = de
+ConcordancesEditor_26           = id projet {0} id corpus {1} id texte {2}
+ConcordancesEditor_27           = Retour au texte : texte {0} manquant
+ConcordancesEditor_28           = l'annotation
+ConcordancesEditor_29           = Page non trouvée... pour 
+ConcordancesEditor_3            = Pivot
+ConcordancesEditor_30           = Retour au texte : édition par défaut introuvable
+ConcordancesEditor_32           = Entrer une valeur correspondant à un id
+ConcordancesEditor_33           = à
+ConcordancesEditor_34           = Chargement de la concordance
+ConcordancesEditor_35           = lignes sélectionées 
+ConcordancesEditor_37           = Tri des références
+ConcordancesEditor_38           = Cacher paramètres
+ConcordancesEditor_39           = Afficher paramètres
+ConcordancesEditor_4            = Contexte droit
+ConcordancesEditor_41           = Tri du contexte gauche
+ConcordancesEditor_42           = lignes de la page
+ConcordancesEditor_43           = Le corpus {0} n''a pas de références par défaut : {1}
+ConcordancesEditor_45           = Tri du pivot
+ConcordancesEditor_46           = ** Impossible d''afficher en plein texte : {0}
+ConcordancesEditor_48           = Tri du contexte droit
+ConcordancesEditor_49           = toutes les lignes
+ConcordancesEditor_5            = Concordance de <{0}> dans le corpus {1}
+ConcordancesEditor_50           = Ouverture de l'édition
+ConcordancesEditor_52           = Terminé : un résultat
+ConcordancesEditor_55           = Ouverture de la boite de dialogue des propriétés
+ConcordancesEditor_56           = Début du calcul des concordances
+ConcordancesEditor_6            = Tri...
+ConcordancesEditor_61           = Impossible d'annoter avec la valeur '
+ConcordancesEditor_62           = '.\n sur certains segments. \n
+ConcordancesEditor_63           = \	- Le segment 
+ConcordancesEditor_64           = \ est à cheval sur \n
+ConcordancesEditor_65           = \	\	- la fin de la structure 
+ConcordancesEditor_66           = , aux positions [
+ConcordancesEditor_69           = \	\	- le début de la structure 
+ConcordancesEditor_7            = Erreur lors de la récupération de la dernière erreur CQP :  
+ConcordancesEditor_73           = Information à propos des annotations
+ConcordancesEditor_74           = Erreur pendant l'affection des annotations: 
+ConcordancesEditor_75           = Annoter
+ConcordancesEditor_76           = Enregistrer les annotations
+ConcordancesEditor_77           = Ouvrir la liste des catégories
+ConcordancesEditor_79           = Sélectionner une valeur parmi la liste
+ConcordancesEditor_8            = Le corpus n'a pas de propriété "text_id"
+ConcordancesEditor_80           = valeur=
+ConcordancesEditor_81           = Veuillez entrer une nouvelle catégorie
+ConcordancesEditor_82           = Nouvelle catégorie
+ConcordancesEditor_83           = avec la catégorie
+ConcordancesEditor_84           = avec la catégorie
+ConcordancesEditor_85           = OK
+ConcordancesEditor_86           = Confirmer l'enregistrement des annotations
+ConcordancesEditor_87           = Vous vous apprêtez à annoter 
+ConcordancesEditor_88           = Supprimer le(s) ligne(s) sélectionnée(s)
+ConcordancesEditor_99           = Liste des catégories
+
+ConvertCorpus_0 = La conversion du corpus a échoué.
+
+CorporaView_0 = Corpus
+CorporaView_1 = ** Erreur : {0}
+CorporaView_2 = ** Échec de récupération de la dimension du corpus {0}
+CorporaView_3 = ** Une erreur est survenue lors du calcul de la concordance
+CorporaView_4 = Le symbole R de la matrice est : 
+CorporaView_5 = ** Une erreur est survenue lors du calcul des spécificités
+CorporaView_6 = ** Échec de l'ouverture de la fenêtre du Référenceur\	
+CorporaView_7 = ** Une erreur est survenue lors du calcul du tableau lexical
+CorporaView_9 = ** Erreur : impossible d''écrire dans {0}
+
+CorpusPage_0   = Éditions
+CorpusPage_1   = Ajouter une édition
+CorpusPage_10  = Propriétés de mot
+CorpusPage_11  = Ajouter une définition de propriété
+CorpusPage_12  = Ajouter une définition de propriété de structure
+CorpusPage_13  = Supprimer une définition de propriété
+CorpusPage_14  = Sous-corpus et partitions par défaut
+CorpusPage_15  = Ajouter un sous-corpus
+CorpusPage_16  = Ponctuations
+CorpusPage_16a = Caractères séparateurs
+CorpusPage_17  = Supprimer un sous-corpus
+CorpusPage_18  = Ajouter une partition
+CorpusPage_19  = Caractères d'élision
+CorpusPage_2   = Supprimer une édition
+CorpusPage_20  = Supprimer une partition
+CorpusPage_21  = Ajouter une requête
+CorpusPage_22  = Caractères de fin de phrase
+CorpusPage_23  = Supprimer une requête
+CorpusPage_24  = Propriétés de structure
+CorpusPage_25  = Ajouter une définition de propriété de structure
+CorpusPage_26  = Annoter le corpus
+CorpusPage_27  = Supprimer une définition de propriété de structure
+CorpusPage_28  = Utiliser seulement ces tests lors de la tokenization
+CorpusPage_29  = Ajouter un paramètre
+CorpusPage_3   = Police d'affichage
+CorpusPage_30  = Paramètres
+CorpusPage_31  = Supprimer un paramètre
+CorpusPage_32  = Ajouter un test
+CorpusPage_33  = Ajouter un paramètre
+CorpusPage_34  = Supprimer un test
+CorpusPage_35  = 1.\	
+CorpusPage_36  = Nombre de mots par page
+CorpusPage_37  = Sélectionner le répertoire des sources.
+CorpusPage_38  = 2.\	
+CorpusPage_39  = Régler les paramètres d'import dans les sections ci-dessous.
+CorpusPage_4   = Ajouter un paramètre
+CorpusPage_40  = * : champ obligatoire
+CorpusPage_41  = Elément de pagination
+CorpusPage_42  = 3.\	
+CorpusPage_43  = Lancer l'import du corpus.
+CorpusPage_44  = Construire l'édition
+CorpusPage_45  = UIs
+CorpusPage_46  = Le dossier des sources ne contient pas de fichier 'import.xml'. Un nouveau a été créé.
+CorpusPage_47  = Erreur lors de la création du fichier 'import.xml' 
+CorpusPage_48  = Chargement des paramètres d'import depuis le fichier : 
+CorpusPage_49  = Défaut
+CorpusPage_5   = Espaces
+CorpusPage_50  = Paramètres du module : 
+CorpusPage_51  = Seulement ces tests
+CorpusPage_52  = Sauvegarde des paramètres d'importation...
+CorpusPage_53  = Le nom du corpus est obligatoire
+CorpusPage_54  = Le nom du corpus doit contenir au moins une lettre
+CorpusPage_55  = Seulement ces tests
+CorpusPage_6   = Supprimer un paramètre
+CorpusPage_60  = OK
+CorpusPage_61  = Editer la feuille XSL...
+CorpusPage_63  = Commandes
+CorpusPage_64  = Structures de limite des contextes de concordance
+CorpusPage_65  = Impossible de sauvegarder l'import : pas de dossier source sélectionné.
+CorpusPage_66  = Impossible de commencer l'import : pas de dossier source sélectionné.
+CorpusPage_67  = Séparés par des virgules
+CorpusPage_7   = Informations générales
+CorpusPage_8   = Nom du corpus* (majuscules et pas de chiffre en début)
+CorpusPage_9   = Description - HTML (nom complet, auteur, date, license, commentaire...)
+
+CreateFile_1 = Nouveau fichier : {0}
+
+CreateFolder_1 = Nouveau dossier : {0}
+
+CreateFrequencyList_8 = Chargement du tableau des fréquences
+
+CreateMacro_0 = Nom de la macro
+CreateMacro_1 = Nom de la macro
+
+CreatePartitionDialog_0  = Créer une Partition
+CreatePartitionDialog_1  = Simple
+CreatePartitionDialog_16 = Les requêtes ne doivent pas être vides
+CreatePartitionDialog_2  = &Structure : 
+CreatePartitionDialog_3  = Assisté
+CreatePartitionDialog_4  = &Propriété : 
+CreatePartitionDialog_5  = Avancé
+CreatePartitionDialog_6  = &Nom : 
+CreatePartitionDialog_7  = Partie 
+CreatePartitionDialog_8  = Aucune partie définie
+CreatePartitionDialog_9  = Le nom de la partition n''a pas été précisé. Le nom est {0}
+
+CreatePartition_0        = Création d''une partition sur {0}
+CreatePartition_2        = ** Erreur : la partition n'a pas été créé
+CreatePartition_5        = Terminé : {0} items pour {1} occurrences.
+CreatePartition_55       = Terminé : {0} items pour {1} occurrences.
+CreatePartition_6        = Terminé : {0} parties
+
+CreateSubCorpus_0      = ** Erreur : le sous-corpus n'a pas été créé
+CreateSubCorpus_2      = Erreur lors de la récupération de la dernière erreur CQP : 
+CreateSubCorpus_begin  = Nouveau &Sous-corpus
+CreateSubCorpus_create = Créer un nouveau sous-corpus de {0}
+
+CreateSubcorpusDialog_0  = Créer un sous-corpus
+CreateSubcorpusDialog_10 = &Requête : 
+CreateSubcorpusDialog_11 = Nom incorrect
+CreateSubcorpusDialog_13 = Requête invalide
+CreateSubcorpusDialog_14 = Le champ Requête ne doit pas être vide.
+CreateSubcorpusDialog_6  = &Valeur : 
+CreateSubcorpusDialog_8  = Un nom de sous-corpus a été généré.
+
+CreateSubcorpus_7        = Calcul d''un sous-corpus de {0}, structure {1}, propriété {2} : {3}
+CreateSubcorpus_8        = Terminé : {0} a été créé  
+CreateSubcorpus_9        = Calcul d''un sous-corpus de {0} avec la requête <{1}>
+
+DONE = Terminé : {0}
+
+DefineReferencePattern_0 = Options d'affichage des références
+DefineReferencePattern_1 = Options d'&affichage des références
+DefineReferencePattern_2 = Options d'affichage des références
+DefineReferencePattern_3 = Options de &tri des références
+DefineReferencePattern_4 = Options de tri des références
+DefineReferencePattern_5 = Options de tri des références
+
+DeleteFile_0 = Etes vous sûr de vouloir supprimer 
+DeleteFile_2 = ** Échec de la suppression du fichier 
+
+DeleteInCorporaView_1 = ** Erreur lors de la suppression du sous-corpus {0}
+DeleteInCorporaView_2 = ** Erreur lors de la suppression de la partition {0}
+
+DeleteLines_0 = Le tableau doit comporter au moins une ligne
+DeleteLines_1 = Sûr(e) ?
+
+DeleteObject_0  = Voulez-vous vraiment supprimer {0} ?
+DeleteObject_10 = {0} supprimé
+DeleteObject_3  = ** Erreur lors de la suppression
+DeleteObject_4  = Erreur lors de la suppression de {0} : {1}
+DeleteObject_5  = Suppression de {0}
+
+DiagnosticPreferencePage_1 = Description
+DiagnosticPreferencePage_2 = Nombre de valeurs de propriété affiché
+DiagnosticPreferencePage_3 = Ordonner les parties par taille
+
+Diagnostique_0  = Unités de structure de {0}
+Diagnostique_1  = Les informations de {0} ont déjà été calculées. Souhaitez vous les recalculer ?
+Diagnostique_10 = Récupération des informations sur les unités de structure
+Diagnostique_11 = Ouverture de la fenêtre...
+Diagnostique_2  = ** Échec de lecture du fichier *informations* de 
+Diagnostique_7  = Création de la fenêtre d'informations
+Diagnostique_8  = Récupération des informations générales
+Diagnostique_9  = Récupération des données sur les unités lexicales
+
+ERROR_WHILE_LOADING_CONCORDANCE_LINE = ** Une erreur est survenue lors du chargement des lignes de la concordance : {0}
+
+ElementTreeLabelProvider_0 = ** Erreur : élément non enregistré 
+ElementTreeLabelProvider_1 = ** Erreur: l'objet n'est pas un 'org.w3c.Element'
+
+EmpantWidget_0 = Contexte : 
+EmpantWidget_1 = forme
+EmpantWidget_2 = structure
+EmpantWidget_3 = de -
+EmpantWidget_4 = à -
+EmpantWidget_5 = et de
+EmpantWidget_6 = à
+EmpantWidget_7 = inclure la structure contenant le pivot
+EmpantWidget_8 = Contexte gauche actif
+EmpantWidget_9 = Contexte droit actif
+
+Error_computing_specificities = ** Erreur lors du calcul des spécificités : {0}
+Error_creating_partition      = ** Erreur lors de la création de la partition : {0}
+
+ExecuteGroovyScriptFromFile_2 = Le script Groovy doit être dans le dossier {0}
+
+ExecuteGroovyScript_0         = \ ms
+ExecuteGroovyScript_1         = Erreur lors de l'initialisation des paramètres
+ExecuteGroovyScript_2         = L'utilisateur a intérompu l'exécution du script
+
+ExecuteRScript_1 = Exécution de {0}
+ExecuteRScript_2 = Terminé: 
+ExecuteRScript_3 = \ ms
+
+ExecuteRText_0 = Exécution de la sélection de texte... 
+ExecuteRText_1 = ** Erreur lors de l''exécution du script R {0} : {1}
+ExecuteRText_2 = \ ms
+
+ExecuteScriptImport_0 = Début de l'importation
+ExecuteScriptImport_1 = ** Le fichier de script {0} n''existe pas
+ExecuteScriptImport_2 = ** Erreur: le dossier 'corpora' n'existe pas : 
+ExecuteScriptImport_3 = Erreur: le dossier {0} n''a pu être supprimé et existe toujours. L''import est interrompu. Vous pouvez supprimer manuellement le dossier et recommencer l''import
+ExecuteScriptImport_5 = ** Erreur de paramètres du Tokenizer : abandon de l'import.
+ExecuteScriptImport_6 = L'import n'a pas abouti.
+ExecuteScriptImport_7 = Importation terminée : 
+ExecuteScriptImport_8 = ** Erreur lors du chargement du corpus
+
+ExecuteScriptR_0 = ** Le fichier de script R {0} n''existe pas
+ExecuteScriptR_1 = ** Erreur lors de l''exécution du script R {0} : {1}
+
+ExecuteScript_0       = Exécution de {0} ...
+ExecuteScript_1       = Sauver le fichier avant d'exécuter ?
+ExecuteScript_2       = Sauver et lancer
+ExecuteScript_3       = ** Aucun interpréteur trouvé pour l'extension du fichier de script 
+ExecuteScript_4       = Annuler
+ExecuteScript_5       = Ne pas sauver et lancer
+ExecuteScript_6       = Toujours sauvegarder avant de lancer
+ExecuteScript_7       = Exécution annulée.
+
+Exit_Menu_Label = Quitter
+
+Explorer_0 = Le dossier {0} ne devrait pas être supprimé
+Explorer_1 = Aller au dossier parent
+Explorer_2 = Aller au dossier de travail de TXM
+Explorer_3 = TXM
+Explorer_4 = ⇧
+Explorer_5 = ↻
+Explorer_6 = Rafraîchir
+Explorer_7 = ⌂
+Explorer_8 = Aller au dossier de travail de TXM
+
+ExportAnnotation_0 = Exportation des annotations
+
+ExportCorpus_0 = ** Échec de l''exportation du corpus {0}
+ExportCorpus_3 = Exportation de {0}. Cela peut prendre du temps en fonction de la taille du corpus.
+ExportCorpus_4 = Terminé, le fichier binaire créé est {0}
+
+ExportPreferencePage_1  = Configuration de l'export
+ExportPreferencePage_18 = Colonnes séparées par
+ExportPreferencePage_19 = Séparateur de texte
+ExportPreferencePage_21 = Format de fichier d'export des graphiques par défaut
+ExportPreferencePage_3  = Encodage des fichiers d'export
+ExportPreferencePage_4  = Afficher le résultat de l'export dans un éditeur de texte
+
+ExportResult_0  = Exportation des résultats
+ExportResult_1  = Exportation...
+ExportResult_2  = Graphique enregistré au format {1} dans le fichier {0}
+ExportResult_22 = Résultat enregistré dans le fichier {0}
+ExportResult_3  = ** Export : impossible de créer le fichier {0} : {1}
+ExportResult_4  = ** Échec de l''export dans le fichier {0} de format {1}
+ExportResult_5  = ** Impossible de lire {0}
+ExportResult_6  = ** Échec de l''exportation du résultat {0} : {1}
+
+ExportSVG_0 = Export graphique en cours...
+ExportSVG_1 = Graphique enregistré au format {1} dans le fichier {0} 
+ExportSVG_2 = Export avec le device : {0}
+ExportSVG_3 = Échec de l''export dans le fichier {0} au format {1}
+
+FAILED_TO_PARSE_OPTIONS    = ** Échec de l''analyse des options de TXM {0} : {1}
+FAILED_TO_SAVE_PREFERENCES = ** Échec de la sauvegarde des préférences
+
+FactorialMapEditor_0  = Axes:  
+FactorialMapEditor_10 = ** Erreur interne : erreur de sélection du plan de l'AFC
+FactorialMapEditor_11 = Redimensionner
+FactorialMapEditor_13 = Mise à jour du plan factoriel
+FactorialMapEditor_4  = Afficher : 
+FactorialMapEditor_5  = colonnes
+FactorialMapEditor_6  = lignes
+FactorialMapEditor_8  = Rechargement du plan factoriel
+
+FileExplorerPreferencePage_0 = Exp. Rég. des fichiers cachés
+FileExplorerPreferencePage_1 = Afficher les fichiers cachés
+FileExplorerPreferencePage_2 = Afficher les dossiers
+
+FileTreeContentProvider_1 = ** Explorateur de fichiers : expression régulière incorrecte
+FileTreeContentProvider_2 = \ ERREUR 
+FileTreeContentProvider_3 = Element d'erreur : '
+FileTreeContentProvider_4 = '
+
+FrequencyListEditorInput_0 = Lexique
+FrequencyListEditorInput_1 = Pareto
+FrequencyListEditorInput_2 = Le lexique ne peut être vide
+FrequencyListEditorInput_3 = Forme
+FrequencyListEditorInput_4 = Fréquence
+FrequencyListEditorInput_5 = Chaîne de caractères
+FrequencyListEditorInput_6 = Entier
+FrequencyListEditorInput_9 = Type
+
+GenericMultiPageEditor_1 = ** Erreur interne : Impossible d''afficher la donnée {0}.
+GenericMultiPageEditor_3 = ** Erreur interne : le nombre d''éditeurs RCP ({0}) doit correspondre au nombre d''inputs ({1}).
+
+GetConcordancesDialog_0  = ** Fenêtre de dialogue de concordances : {0}
+GetConcordancesDialog_1  = Calcul des spécificités 
+GetConcordancesDialog_13 = Vous devez sélectionner une propriété
+GetConcordancesDialog_14 = Propriété invalide
+GetConcordancesDialog_15 = Vous devez sélectionner une propriété
+GetConcordancesDialog_4  = &Propriété : 
+GetConcordancesDialog_5  = Contexte &Gauche (mots) : 
+GetConcordancesDialog_6  = Contexte &Droit (mots) : 
+GetConcordancesDialog_7  = &Référence : 
+
+GetConcordances_4        = ** Erreur lors du calcul des concordances : {0}
+
+GraphicalLogger_0 = ** Erreur {0}
+
+GroovyConsole_4 = \nErreur Interne.
+GroovyConsole_5 = L'erreur est :  
+
+ImportDialog_0  = Paramètres d''import - {0}
+ImportDialog_1  = Dossier source
+ImportDialog_13 = Ce dossier semble contenir un corpus au format binaire
+ImportDialog_14 = Encodage par défaut de cet ordinateur
+ImportDialog_16 = Deviner
+ImportDialog_19 = Langue par défaut de cet ordinateur
+ImportDialog_22 = Sélectionner
+ImportDialog_23 = Options
+ImportDialog_4  = Encodage des caractères : 
+ImportDialog_5  = Langue principale : 
+ImportDialog_6  = Paramètres du segmenteur lexical : 
+
+ImportFormEditor_0 = ** le script d''import est manquant {0} 
+ImportFormEditor_1 = Import {0}
+
+ImportPreferencePage_0 = Encodage des caractères
+
+ImportSelectedText_0  = Importe le texte du presse-papier
+ImportSelectedText_1  = pressepapier
+ImportSelectedText_10 = Langue identifiée 
+ImportSelectedText_12 = La langue suivante sera utilisée 
+ImportSelectedText_2  = ** Le presse-papier est vide
+ImportSelectedText_3  = Confirmer
+ImportSelectedText_4  = Le corpus {0} va être supprimé
+ImportSelectedText_6  = ** Erreur interne : impossible de trouver le projet 'default' 
+
+IndexToCooccurrence_0 = ** Erreur lors de la liaison entre l'Index et les Cooccurrences
+
+IndexToLexicalTable_0 = Impossible de créer une table lexicale à partir d'un Index créé sur un Corpus
+
+InternalCorpusView_0 = ** Erreur lors du calcul des informations du corpus
+InternalCorpusView_1 = Recharger
+InternalCorpusView_2 = ** Erreur interne : getText {0}
+
+InternalViewEditor_1  = Calcul de la vue interne...
+InternalViewEditor_10 = InternalView: erreur d'initialisation : 
+InternalViewEditor_11 = OK
+InternalViewEditor_16 = Erreur
+InternalViewEditor_2  = Récupération du prochain résultat...
+InternalViewEditor_25 = requête générée : 
+InternalViewEditor_3  = Rechargement de l'interface
+InternalViewEditor_4  = Structure : 
+InternalViewEditor_5  = Propriété de structure : 
+
+Invalid_analysis_property = Propriété invalide
+
+JobHandler_0 = Annulation...
+JobHandler_1 = Annulation
+JobHandler_2 = \ : annulation demandée
+JobHandler_3 = Impossible d'annuler  
+
+JobsTimer_12 = h, 
+JobsTimer_13 = \ min and 
+JobsTimer_15 = Effectué en {0} ({1}).
+JobsTimer_16 = . (
+JobsTimer_17 = \ msec)
+JobsTimer_19 = Effectué en {0}.
+JobsTimer_2  = \ msec
+JobsTimer_20 = Job: 
+JobsTimer_21 = Exec: 
+JobsTimer_5  = \ sec
+JobsTimer_9  = \ min et 
+
+LanguageSwitchHandler_0 = La langue de l'interface (LOCALE) n'a pas été fixée
+LanguageSwitchHandler_1 = Le fichier {0} n''existe pas
+LanguageSwitchHandler_3 = Choisir la langue
+LanguageSwitchHandler_5 = ** Changement de langue : URL {0} mal formée
+LanguageSwitchHandler_7 = TXM.ini : 
+
+LastCQPError = Dernière erreur CQP : 
+
+LineLabelProvider_1 = Ne devrait pas se produire
+
+LocalePreferencePage_1 = Configuration de la langue de l'interface utilisateur
+LocalePreferencePage_2 = Langue de l'interface 
+
+MacrosExplorer_0 = Nouvelle macro
+MacrosExplorer_1 = Créer une template de 
+
+MainPage_0  = Page principale
+MainPage_1  = Principal
+MainPage_10 = \	Pour aller au panneau suivant utiilisez l'onglet du bas.\n
+MainPage_11 = 3-\	Vous pouvez sauver les paramètres d'import à l'aide de l'icone disquette.\n
+MainPage_12 = 4-\	Pour commencer l'import, cliquez sur la fleche verte.
+MainPage_13 = parallelisme
+MainPage_14 = Corpora
+MainPage_15 = Ajouter un corpus aligné
+MainPage_17 = Entrez le nom du corpus
+MainPage_18 = Feuille XSL d'entrée
+MainPage_19 = Segmentation lexicale
+MainPage_2  = Paramètres d''import du module {0}
+MainPage_20 = Langue principale
+MainPage_22 = Supprimer un corpus
+MainPage_23 = Encodage des caractères
+MainPage_25 = Entrez le nom du corpus à supprimer
+MainPage_27 = Liens
+MainPage_28 = ** Erreur lors de la récupération de l'encodage
+MainPage_29 = Ajouter un lien
+MainPage_3  = Dossier des sources : 
+MainPage_30 = Créer un lien à partir du corpus : 
+MainPage_31 = Selectionnez 2 corpus :
+MainPage_33 = seg
+MainPage_34 = Retirer un lien
+MainPage_36 = Entrez un numéro de ligne à supprimer
+MainPage_38 = Retirer le lien n°
+MainPage_39 = Veuillez entrer un nombre valide
+MainPage_4  = Nom du corpus (base)
+MainPage_40 = Premier corpus
+MainPage_42 = Structure d'alignement
+MainPage_44 = * \n(nom de l'archive sans extension qui contiendra le corpus)
+MainPage_45 = Description
+MainPage_46 = Ajouter un 
+MainPage_49 = Le nom de corpus est obligatoire
+MainPage_5  = Ouverture...
+MainPage_50 = Rafraichir les liens
+MainPage_52 = Le dossier des sources ne contient pas de fichier import.xml
+MainPage_53 = Erreur lors de la création du fichier 'the import.xml'
+MainPage_54 = Chargement des paramètres depuis : 
+MainPage_55 = Paramètres :  
+MainPage_6  = Sauvegarde...
+MainPage_7  = Début...
+MainPage_8  = 1- Cliquez sur l'icone "dossier" pour choisir le dossier des sources\n
+MainPage_9  = 2- Si vous souhaitez ajouter des précisions d'import comme les sous-corpus et partition par défaut où les types des propriétés léxicales
+
+MergeCols_1 = Nouveau nom
+MergeCols_2 = Nom de la nouvelle colonne issue de la fusion
+MergeCols_5 = Noms : 
+MergeCols_6 = Fin de la fusion des colonnes.
+
+MergeDeleteDialog_0 = fusionner
+MergeDeleteDialog_1 = Fusionner/Supprimer
+MergeDeleteDialog_4 = nom du résultat de la fusion
+
+MergeLines_2 = Saisissez le nom de la nouvelle ligne issue de la fusion
+
+MetadataPage_1 = Aperçu des métadonnées
+MetadataPage_2 = Paramètres des métadonnées
+MetadataPage_3 = Rafraichir
+MetadataPage_4 = Titre des colonnes du fichier de métadonnées 
+MetadataPage_5 = Identifiant de texte
+MetadataPage_7 = Pas de fichier de métadonnées {0}
+
+MultipleValueTreeDialog_0 = ajout: 
+
+NavigationWidget_0 = Erreur lors de la récupération des données à l'indice : 
+
+NumberOfLines = Nombre de lignes :
+
+ObjectExplorer_0  = Informations : 
+ObjectExplorer_10 = Supprimer une propriété
+ObjectExplorer_12 = Saisir le nom d'une propriété à supprimer
+ObjectExplorer_15 = Ajouter une propriété aux descendants
+ObjectExplorer_2  = Valeur
+ObjectExplorer_21 = Retirer une propriété aux descendants
+ObjectExplorer_26 = Nom
+ObjectExplorer_27 = Clé
+ObjectExplorer_3  = Nouvelle propriété
+ObjectExplorer_4  = Nom de la propriété
+ObjectExplorer_5  = Saisir le nom d'une propriété à ajouter
+ObjectExplorer_7  = nouveau nom
+
+ObjectSelectionDialog_0 = Sélecteur de valeurs
+ObjectSelectionDialog_3 = Trouvé {0} valeur(s)
+ObjectSelectionDialog_5 = Expression régulière incorrecte : {0}
+
+ObjectSelector_0 = Objet : 
+ObjectSelector_1 = Sélection
+
+OpenBiblio_1 = ** Aucun texte {0} dans le corpus
+OpenBiblio_2 = Sélectionner un texte
+OpenBiblio_7 = ** Impossible de trouver le texte {0} dans le corpus {1}
+OpenBiblio_9 = ** Le texte {0} n''a aucune entrée bibliographique
+
+OpenBrowser_0 = ** Erreur lors de l'ouverture de la fiche bibliographique 
+OpenBrowser_1 = . URL
+
+OpenEdition_0 = Sélectionner une partie
+OpenEdition_1 = ** Échec de chargement de l''édition de {0}
+OpenEdition_3 = Ouverture de l''édition de {0}
+OpenEdition_5 = ** Impossible de trouver l''édition du premier texte d''identifiant {0} dans le corpus
+OpenEdition_7 = ** Impossible de trouver l'édition par défaut 
+OpenEdition_8 = ** Impossible de trouver la première page de l'édition 
+
+OpenEmptyEditor_2 = ** Bibliographie : dossier {0} introuvable
+
+OpenGraph_8 = ** Impossible d''ouvrir le graphique {0}
+
+OpenParaBrowser_0 = Ouverture du Navigateur//
+
+OpenSVGGraph_0 = Graphique SVG 
+
+OpenTXMUserPreferences_0 = Paramètres par défaut
+
+OpenURI_0 = ** OpenURL : Bureau non supporté
+OpenURI_1 = ** Erreur lors de l''ouverture du fichier {0}
+
+ParaBrowserEditor_11 = ParaBrowser : get next({0}) struct {1} paraid {2} value {3}
+ParaBrowserEditor_18 = -Aller à 
+ParaBrowserEditor_19 = -Rester sur place !!!!! NEXT est 
+ParaBrowserEditor_21 = _
+ParaBrowserEditor_22 = Ouvrir le Navigateur interne
+ParaBrowserEditor_3  = Réf : 
+ParaBrowserEditor_4  = Références
+ParaBrowserEditor_5  = Structure
+ParaBrowserEditor_9  = Réf : {0} : {1}
+
+ParametersDialog_0  = Saisie des paramètres de {0}
+ParametersDialog_1  = Exécution
+ParametersDialog_10 = Erreur : widget sans nom : '
+ParametersDialog_11 = (* champ obligatoire)
+ParametersDialog_12 = ** Erreur :valeur non fournie : 
+ParametersDialog_13 = ** Erreur : format éronné: 
+ParametersDialog_14 = ** Erreur : déclaration du nom de l'@Option : 
+ParametersDialog_15 = ** Erreur : le bean n'est pas un object groovy.lang.Script
+ParametersDialog_17 = ** Erreur : le binding ''monitor'' (classe JobHandler) n''a pas été fait. Obtenu : {0}.
+
+PartitionComposer_0  = Structure : 
+PartitionComposer_11 = Supprimer
+PartitionComposer_2  = Sélectionner les valeurs à affecter : 
+PartitionComposer_3  = Nouvelle partie
+PartitionComposer_5  = Partie
+PartitionComposer_6  = Supp. toutes les parties
+PartitionComposer_8  = Titre : 
+PartitionComposer_9  = Affecter
+
+PartsSize_0  = Trier par taille
+PartsSize_10 = Dimensions de la partition {0} du corpus {1}
+PartsSize_2  = Nombre de mots par partie
+
+PasteFile_1 = ** Erreur lors de la copie  
+PasteFile_3 = ** Échec de la suppression
+PasteFile_4 = : 
+
+Preferences_Menu_Label = Préférences
+
+ProgressionDialog_0  = Paramètres de la progression 
+ProgressionDialog_1  = Type de graphe : 
+ProgressionDialog_10 = Progression : mauvaise expression régulière : 
+ProgressionDialog_11 = Échelle des bandeaux
+ProgressionDialog_13 = Options d'affichage
+ProgressionDialog_14 = Style de ligne unique
+ProgressionDialog_15 = Répéter les valeurs identiques
+ProgressionDialog_16 = N/B
+ProgressionDialog_17 = Erreur : multiplicateur de bande : 
+ProgressionDialog_2  = cumulatif
+ProgressionDialog_3  = densité
+ProgressionDialog_4  = Unité structurelle : 
+ProgressionDialog_5  = supprimer
+ProgressionDialog_7  = Exp. Rég. : 
+ProgressionDialog_8  = Requêtes : 
+ProgressionDialog_9  = ajouter
+
+ProgressionEditorInput_0 = PROGRESSION NAME
+
+ProgressionForm_0  = Type :
+ProgressionForm_1  = cumulatif
+ProgressionForm_10 = Répété
+ProgressionForm_11 = N&&B
+ProgressionForm_12 = REQUETES :
+ProgressionForm_13 = Ajouter
+ProgressionForm_14 = Supprimer
+ProgressionForm_2  = densité
+ProgressionForm_3  = Echelle
+ProgressionForm_5  = Options d'affichage
+ProgressionForm_6  = Unité structurelle :
+ProgressionForm_7  = Propriété :
+ProgressionForm_8  = Exp. Rég. :
+ProgressionForm_9  = Syles de ligne différents
+
+ProgressionPreferencePage_2 = Progression
+ProgressionPreferencePage_3 = Graphe de progression cumulatif
+ProgressionPreferencePage_4 = Niveaux de gris
+ProgressionPreferencePage_5 = Style de ligne unique
+ProgressionPreferencePage_6 = Répéter les valeurs de propriétés de structures
+ProgressionPreferencePage_7 = Échelle des limites de structures
+
+PropertiesSelector_0 = Impossible de charger les propriétés du corpus {0} ({1})
+PropertiesSelector_1 = Propriétés : 
+PropertiesSelector_2 = Editer
+
+Property = Propriétés :
+
+PropertySelector_0 = Sélectionner une propriété
+
+PurgeCorpora_0  = Attention ! Cette commande va supprimer tous les corpus sélectionnés. Continuer ?
+PurgeCorpora_1  = Corpus à supprimer 
+PurgeCorpora_10 = Création d'un nouvel espace de travail
+PurgeCorpora_12 = Redémarrage de la plateforme
+PurgeCorpora_13 = ** Erreur : espace de travail introuvable : 
+PurgeCorpora_2  = ** Attention : corpus non supprimés : 
+PurgeCorpora_3  = Attention ! Cette commande va supprimer tous les corpus. Continuer ?
+PurgeCorpora_4  = ** Erreur : la variable d'environnement 'TXMHOME' n'est pas configurée (sa valeur standard est '$HOME/TXM'). Abandon.
+PurgeCorpora_5  = Supprime tous les corpus
+PurgeCorpora_7  = ** Échec de la suppression des corpus
+PurgeCorpora_9  = ** Échec de la suppression du registre
+
+QueriesView_1  = Tout exporter
+QueriesView_10 = erreur : 
+QueriesView_5  = Requêtes :\n
+
+QueryAssistDialog_0  = Assistant de Requête
+QueryAssistDialog_1  = Mot supplémentaire
+QueryAssistDialog_10 = correspond à
+QueryAssistDialog_11 = commence par
+QueryAssistDialog_12 = se termine par
+QueryAssistDialog_13 = contient
+QueryAssistDialog_2  = Je recherche : 
+QueryAssistDialog_3  = mot
+QueryAssistDialog_32 = suivi de 
+QueryAssistDialog_33 = séparé d'au moins 0 mot
+QueryAssistDialog_34 = séparé d'au moins 1 mot
+QueryAssistDialog_8  = un mot dont
+
+QueryIndexEditor_0  = Index de requête de : 
+QueryIndexEditor_1  = remplacement des lignes : 
+QueryIndexEditor_10 = requêtes
+QueryIndexEditor_2  = Erreur lors de l'ajout de la requête : 
+QueryIndexEditor_3  = Requête ajoutée
+QueryIndexEditor_4  = Chargement depuis un fichier
+QueryIndexEditor_5  = *.properties
+QueryIndexEditor_6  = Le fichier suivant ne peut être lu : 
+QueryIndexEditor_7  = Vers les concordances
+QueryIndexEditor_8  = Vers la progression
+QueryIndexEditor_9  = Supprimer les lignes
+
+RVariablesView_1 = Rafraîchir les variables
+RVariablesView_2 = Afficher le journal des évaluations
+RVariablesView_9 = nom TXM {0} >> nom R {1}
+
+ReferencerEditor_0  = Calcul des références de <{0}> dans {1} avec la propriété {2} et le patron {3}
+ReferencerEditor_10 = Récupération des index
+ReferencerEditor_11 = Références
+ReferencerEditor_12 = Regroupement des positions par index
+ReferencerEditor_13 = Mise à jour de l'interface
+ReferencerEditor_17 = Affichage de la première page de résultats
+ReferencerEditor_19 = Affichage de la dernière page de résultats
+ReferencerEditor_21 = Affichage de la page de résultats suivante 
+ReferencerEditor_23 = Affichage de la page de résultats précédente 
+ReferencerEditor_25 = Ouverture de la concordance
+ReferencerEditor_5  = Calcul des références de {0}
+ReferencerEditor_6  = Patron des références 
+ReferencerEditor_7  = Aucun résultat
+ReferencerEditor_8  = Récupération des occurrences
+ReferencerEditor_9  = Unités
+
+ReferencerPreferencePage_2 = Références
+ReferencerPreferencePage_3 = Ordonner les références par fréquence
+
+RefreshingCorporaView = Mise à jour de la vue des corpus...
+
+RenameFile_0 = Renommer le fichier
+RenameFile_2 = Renommage par : 
+RenameFile_3 = ** Échec du renommage 
+
+RestartTXM_0 = Rechargement des vues...
+RestartTXM_1 = Redémarrer TXM
+
+RunGroovyScript_0  = Exécution du script
+RunGroovyScript_1  = &Exécuter un script
+RunGroovyScript_10 = Répertoire de sources :
+RunGroovyScript_2  = Exécuter un script
+RunGroovyScript_3  = *.groovy
+RunGroovyScript_4  = Erreur lors de l''ouverture du script groovy : {0}
+RunGroovyScript_8  = ** Erreur lors de l''exécution du script groovy : {0}
+RunGroovyScript_9  = Exécution du script
+
+SEARCH = &Искать
+
+SVGGraphicEditor_1 = Impossible d'afficher un graphique avec les informations fournies.
+
+SaveAs_2 = ** Échec de la sauvegarde 
+
+ScriptPreferencePage_0 = Prochain numéro de session 
+ScriptPreferencePage_3 = Dossier &racine
+
+SetContextSize_1 = Options d'affichage des &contextes
+SetContextSize_2 = Options d'affichage des contextes
+SetContextSize_3 = Taille du contexte gauche
+SetContextSize_4 = Taille du contexte droit
+
+SetEncoding_0 = Changer l'encodage des caractères
+SetEncoding_1 = Changer l'encodage des caractères.\n\n\	Encodage actuel : 
+SetEncoding_2 = \n\	Encodage par défaut :  
+
+SetLineNumber_0 = Options de pagination
+SetLineNumber_1 = Lignes par page : 
+
+SetSortProperty_1 = Options de tri
+SetSortProperty_2 = Options de tri
+SetSortProperty_3 = Options de tri
+
+ShowSelected_4 = Régler la propriété 'LANG'
+
+ShowSvgHelp_0 = Raccourcis clavier graphiques
+ShowSvgHelp_1 = \	Translation :  Clic droit + Glisser\n
+ShowSvgHelp_2 = \	Zoom +/- : Roulette OU Shift + Clic Droit + Glisser\n
+ShowSvgHelp_3 = \	Zoomer sur la sélection : Ctrl + Clic Gauche + Glisser\n
+ShowSvgHelp_4 = \	\n
+ShowSvgHelp_5 = \	État initial : F5
+
+SingularValuesEditor_0 = Entrée erronée
+
+SortPropertySelection_0 = Options de tri
+
+SpecificitiesPreferencePage_0 = Montrer les p-values
+SpecificitiesPreferencePage_1 = Graphique N/B
+SpecificitiesPreferencePage_2 = Spécificités
+SpecificitiesPreferencePage_3 = Format des indices (par défaut : %,.1f)
+SpecificitiesPreferencePage_4 = Regrouper les barres par les lignes de la table
+SpecificitiesPreferencePage_5 = Afficher les lignes
+SpecificitiesPreferencePage_6 = Afficher les barres
+SpecificitiesPreferencePage_7 = Banalité
+SpecificitiesPreferencePage_8 = Indice maximum
+
+SpecificitiesResultEditorInput_0  = Valeurs
+SpecificitiesResultEditorInput_1  = Graphique
+SpecificitiesResultEditorInput_11 = Flottant
+SpecificitiesResultEditorInput_2  = On ne peut pas calculer à la fois les spécificités d'une partie et des formes
+SpecificitiesResultEditorInput_5  = Fréquence totale
+SpecificitiesResultEditorInput_6  = Sous-fréquence
+SpecificitiesResultEditorInput_7  = Index des spécificités
+
+SpecificitiesTableEditor_0  = Le calcul des spécificités a échoué
+SpecificitiesTableEditor_1  = ** Erreur lors du tri des spécificités
+SpecificitiesTableEditor_11 = T
+SpecificitiesTableEditor_16 = Graphique : 
+SpecificitiesTableEditor_17 = Chargement de la table des spécificités
+SpecificitiesTableEditor_5  = Erreur inattendue dans le moteur statistique R
+SpecificitiesTableEditor_8  = Calculer le diagramme en bâtons des lignes sélectionnées
+
+Structure_field_not_empty = Le champ structure ne doit pas être vide.
+
+Submit_0 = Enregistrer
+
+TXMCqpServerWatcher_0 = Le moteur de recherche est arrêté
+TXMCqpServerWatcher_1 = Veuillez attendre que le moteur de recherche ai redémarré...
+
+TXMRServeWatcher_0 = Le moteur statistique est arrêté
+TXMRServeWatcher_1 = Veuillez attendre que le moteur statistique ai redémarré...
+TXMRServeWatcher_2 = Ok
+TXMRServeWatcher_3 = Rechargement de la vue des corpus...
+TXMRServeWatcher_4 = Veuillez patienter...
+
+TablableVector_0 = Les deux tables doivent être de même taille.
+
+TableEditor_0 = Impossible d'afficher un tableau avec les informations fournies
+
+TableKeyListener_1 = Saisissez l'expression régulière de votre recherche
+TableKeyListener_6 = Lignes copiées : \n
+
+TableSorter_0 = Le numéro de colonne est trop grand.
+
+TextometriePreferencePage_0  = Vérifier les mises à jour au démarrage
+TextometriePreferencePage_1  = Sauvegarde générale des préférences
+TextometriePreferencePage_14 = Préférences sauvegardées dans 
+TextometriePreferencePage_15 = Exporter dans un fichier
+TextometriePreferencePage_18 = Préférences importées depuis 
+TextometriePreferencePage_19 = TXM a besoin de fermer la fenêtre des préférences pour les mettre à jour
+TextometriePreferencePage_2  = Mises à jour automatiques
+TextometriePreferencePage_20 = Importer à partir d'un fichier
+
+TextualPlansSection_milestone_label           = Elements milestones
+TextualPlansSection_milestone_tooltip         = Liste des éléments milestones à encoder dans les mots (séparés par une virgule ",")
+TextualPlansSection_outsidetext_label         = Hors texte
+TextualPlansSection_outsidetext_tooltip       = Liste des balises codant le hors-texte
+TextualPlansSection_outsidetexttoedit_label   = Hors texte à éditer
+TextualPlansSection_outsidetexttoedit_tooltip = Liste des balises codant le hors-texte à afficher dans l'édition)
+TextualPlansSection_save_error                = Erreur, les parametres des plans textuels ne sont pas enregistrés.
+TextualPlansSection_title                     = Plans textuels
+TextualPlansSection_update_error              = Erreur, les parametres des plans textuels ne sont pas chargés.
+
+TreeTaggerPreferencePage_0 = Ne pas normaliser les apostrophes à ' 
+TreeTaggerPreferencePage_1 = Chemin du dossier d'installation
+TreeTaggerPreferencePage_2 = Chemin du dossier de modèles linguistiques
+TreeTaggerPreferencePage_3 = Options [séparées par '  ' (2 blancs)]
+
+TxmBrowser_0  = Début
+TxmBrowser_10 = Impossible de lancer le navigateur interne. Vous devez régler ce paramètre dans les préférences, au menu : Général / Navigateur web
+TxmBrowser_11 = Pas de texte précédent
+TxmBrowser_12 = Pas de texte suivant
+TxmBrowser_5  = page précédente
+TxmBrowser_6  = page suivante
+TxmBrowser_7  = Fin
+TxmBrowser_8  = prochain texte
+TxmBrowser_9  = texte précedent
+
+TxmCommand_1 = Chargement de l'extension 
+
+TxtEditor_0 = EditeurdeTexte: 
+TxtEditor_1 = Encodage trouvé 
+
+UIParameterException_0 = Erreur  
+
+UserPreferencePage_0 = Page Utilisateur
+UserPreferencePage_3 = Pas de confirmation pour supprimer un objet
+
+ViewPropertySelectionDialog_0 = Options d'affichage
+
+ViewPropertySelection_0       = Options d'affichage
+
+WordCloudPreferencePage_0 = Nombre maximum de mots
+WordCloudPreferencePage_1 = Fréquence minimale
+WordCloudPreferencePage_2 = Pourcentage de mots inclinés
+WordCloudPreferencePage_3 = Couleurs aléatoires

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/testers/ExpertEnabled.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/testers/ExpertEnabled.java	(revision 323)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/testers/ExpertEnabled.java	(revision 324)
@@ -2,8 +2,8 @@
 
 import org.eclipse.core.expressions.PropertyTester;
 import org.txm.core.preferences.TBXPreferences;
-import org.txm.rcpapplication.TxmPreferences;
-import org.txm.rcpapplication.preferences.AdvancePreferencePage;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.AdvancePreferencePage;
 
 public class ExpertEnabled extends PropertyTester {
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/cmdparameters/ParametersView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/cmdparameters/ParametersView.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/cmdparameters/ParametersView.java	(revision 324)
@@ -0,0 +1,161 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.cmdparameters;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IPartService;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.part.ViewPart;
+import org.txm.cooccurrence.rcp.editors.CooccurrencesEditor;
+import org.txm.index.rcp.editors.IndexEditor;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.editors.referencer.ReferencerEditor;
+// TODO: Auto-generated Javadoc
+/**
+ * Display the internal hierarchie of a MainCorpus
+ * @author mdecorde.
+ */
+public class ParametersView extends ViewPart implements IPartListener {
+
+	CustomizableEditor selectedEditor;
+
+	Label currentEditorLabel;
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.views.cmdparameters.ParametersView"; //$NON-NLS-1$
+
+	/**
+	 * Instantiates a new queries view.
+	 */
+	public ParametersView() {
+		IPartService service = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService();
+		service.addPartListener(this);
+	}
+
+	@Override
+	public void dispose() {
+		IPartService service = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService();
+		service.removePartListener(this);
+	}
+
+	/**
+	 * Refresh.
+	 */
+	public static void refresh() {
+
+	}
+
+	EditorPart desactivated, activated, broughtToTop, closed, opened;
+
+	public void updateEditorParameters() {
+
+		EditorPart editor = activated;
+		if (editor == null) editor = broughtToTop;
+		if (editor == null) editor = opened;
+
+		if (editor == null) currentEditorLabel.setText("No editor selected.");
+		//		StringBuffer buffer = new StringBuffer();
+		//		if (activated != null)
+		//			buffer.append("\neditor activated: "+activated.getTitle());
+		//		if (broughtToTop != null)
+		//			buffer.append("\neditor on top: "+broughtToTop.getTitle());
+		//		if (closed != null)
+		//			buffer.append("\neditor closed: "+closed.getTitle());
+		//		if (desactivated != null)
+		//			buffer.append("\neditor desactivated: "+desactivated.getTitle());
+		//		if (opened != null)
+		//			buffer.append("\neditor opened: "+opened.getTitle());
+		if (editor instanceof ConcordancesEditor) {
+			currentEditorLabel.setText("Concordances "+editor.getTitle()+":\n\tquery\n\tproperty\n\tsort\n\t...");
+		} else if (editor instanceof IndexEditor) {
+			currentEditorLabel.setText("Index "+editor.getTitle()+":\n\tquery\n\tproperty\n\tsort\n\t...");
+		} else if (editor instanceof CooccurrencesEditor) {
+			currentEditorLabel.setText("Cooccurences "+editor.getTitle()+":\n\tquery\n\tproperty\n\tsort\n\t...");
+//		} else if (editor instanceof CAEditor) {
+//			currentEditorLabel.setText("CaEditor "+editor.getTitle()+":\n\tquery\n\tproperty\n\tsort\n\t...");
+		} else if (editor instanceof ReferencerEditor) {
+			currentEditorLabel.setText("References "+editor.getTitle()+":\n\tquery\n\tproperty\n\tsort\n\t...");
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		currentEditorLabel = new Label(parent, SWT.NONE);
+		updateEditorParameters();
+	}
+
+	@Override
+	public void partActivated(IWorkbenchPart part) {
+		if (part instanceof EditorPart)
+			activated = (EditorPart)part;
+		updateEditorParameters();
+	}
+
+	@Override
+	public void partBroughtToTop(IWorkbenchPart part) {
+		if (part instanceof EditorPart)
+			broughtToTop = (EditorPart)part;
+		//updateLabel();
+	}
+
+	@Override
+	public void partClosed(IWorkbenchPart part) {
+		if (part instanceof EditorPart) {
+			closed = (EditorPart)part;
+		}
+		updateEditorParameters();
+	}
+
+	@Override
+	public void partDeactivated(IWorkbenchPart part) {
+		if (part instanceof EditorPart)
+			desactivated = (EditorPart)part;
+		//updateLabel();
+	}
+
+	@Override
+	public void partOpened(IWorkbenchPart part) {
+		if (part instanceof EditorPart)
+			opened = (EditorPart)part;
+		//updateLabel();
+	}
+
+	@Override
+	public void setFocus() {
+		// TODO Auto-generated method stub
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/cmdparameters/ParametersView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/knowledgerepositories/KRView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/knowledgerepositories/KRView.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/knowledgerepositories/KRView.java	(revision 324)
@@ -0,0 +1,380 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.knowledgerepositories;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Arrays;
+
+
+
+
+
+
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.TreeViewerColumn;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.part.ViewPart;
+import org.txm.annotation.repository.SQLKnowledgeRepository;
+import org.txm.annotation.repository.TypedValue;
+import org.txm.annotation.repository.AnnotationType;
+import org.txm.annotation.repository.KnowledgeRepository;
+import org.txm.annotation.repository.KnowledgeRepositoryManager;
+import org.txm.annotation.repository.LocalKnowledgeRepository;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.annotation.InitializeKnowledgeRepository;
+import org.txm.rcp.commands.krview.Copy;
+import org.txm.rcp.commands.krview.Informations;
+import org.txm.rcp.commands.krview.Reload;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.CorpusManager;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.utils.logger.Log;
+
+/**
+ * Display the Knowledge repositories currently loaded
+ * 
+ * author mdecorde.
+ */
+public class KRView extends ViewPart {
+
+	/** The empty list to filled the view at startup. */
+	ArrayList<Object> empty = new ArrayList<Object>();
+
+	/** The composites. */
+	Control[] composites = new Control[3];
+
+	/** The tv. */
+	TreeViewer tv;
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.views.knowledgerepositories.KRView"; //$NON-NLS-1$
+
+	/**
+	 * Instantiates a new queries view.
+	 */
+	public KRView() {
+		// System.out.println(Messages.ObjectExplorer_9);
+	}
+
+	/**
+	 * Refresh.
+	 */
+	public static void refresh() {
+		KRView baseView = (KRView) PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage().findView(
+						KRView.ID);
+		if (baseView != null)
+			baseView.tv.refresh();
+	}
+
+	/**
+	 * Reload.
+	 */
+	public static void reload() {
+		KRView baseView = (KRView) PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage().findView(
+						KRView.ID);
+		if (baseView != null)
+			baseView._reload();
+	}
+
+	/**
+	 * _reload.
+	 */
+	public void _reload() {
+		
+		KnowledgeRepository[] repos = KnowledgeRepositoryManager.getKnowledgeRepositories();
+		if (repos == null) return;
+		if (tv != null) { 
+			tv.setInput(repos);
+			refresh();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		// System.out.println(Messages.ObjectExplorer_9);
+
+		parent.setLayout(new GridLayout(1, true));
+		Button refresh = new Button(parent, SWT.PUSH);
+		refresh.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+				false));
+		refresh.setText("⟲");
+		refresh.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent arg0) {
+				// force loading KR of all corpora
+				try {
+					for (MainCorpus corpus : CorpusManager.getCorpusManager().getCorpora()) {
+						for (KnowledgeRepository kr : InitializeKnowledgeRepository.get(corpus.getMainCorpus())) {
+							kr.checkConnection();
+						}
+					}
+				} catch (CqiClientException e) {
+					e.printStackTrace();
+					return;
+				}
+
+				_reload();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent arg0) { }
+		});
+
+		tv = new TreeViewer(parent);
+		tv.getTree().setLayoutData(
+				new GridData(GridData.FILL, GridData.FILL, true, true));
+		
+		tv.setContentProvider(new KRTreeProvider());
+		tv.setLabelProvider(new KRLabelProvider());
+		
+		_reload();
+
+		tv.addDoubleClickListener(new IDoubleClickListener() {
+			@Override
+			public void doubleClick(DoubleClickEvent event) {
+				TreeSelection selection = (TreeSelection) tv.getSelection();
+				Informations.show(selection);
+			}
+		});
+
+//		TreeViewerColumn name = new TreeViewerColumn(tv, SWT.NONE);
+//		name.getColumn().setText("name");
+//		TreeViewerColumn desc = new TreeViewerColumn(tv, SWT.NONE);
+//		desc.getColumn().setText("desc");
+		
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tv.getTree());
+
+		// Set the MenuManager
+		tv.getTree().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tv);
+		// Make the selection available
+		getSite().setSelectionProvider(tv);
+		
+		IContextService contextService = (IContextService)getSite().getService(IContextService.class);
+		contextService.activateContext("org.txm.rcp.annotation.krview");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		
+	}
+
+	/**
+	 * The Class TxmObjectLabelProvider.
+	 */
+	public class KRLabelProvider extends LabelProvider {
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+		 */
+		@Override
+		public String getText(Object element) {
+			if (element instanceof KnowledgeRepository)
+				return ((KnowledgeRepository) element).getName();
+			else if (element instanceof AnnotationType)
+				return ((AnnotationType) element).getId()+((AnnotationType) element).getEffect().toSuffix();
+			else if (element instanceof TypedValue)
+				return ((TypedValue) element).getStandardName();
+			return NLS.bind(Messages.QueriesView_10, element);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+		 */
+		@Override
+		public final Image getImage(Object element) {
+			if (element instanceof SQLKnowledgeRepository)
+				return IImageKeys.getImage(IImageKeys.WORLD);
+			return null;
+		}
+	}
+
+	/**
+	 * The Class TxmObjectTreeProvider.
+	 */
+	public class KRTreeProvider implements ITreeContentProvider {
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+		 */
+		@Override
+		public Object[] getChildren(Object element) {
+			if (element instanceof KnowledgeRepository) {
+				KnowledgeRepository kr = ((KnowledgeRepository) element);
+				List<AnnotationType> types = kr.getAllAnnotationTypes();
+
+				return types.toArray();
+			} else if (element instanceof AnnotationType) {
+				AnnotationType t = ((AnnotationType) element);
+				KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(t.getKnowledgeRepository());
+				if (kr instanceof LocalKnowledgeRepository) {
+					LocalKnowledgeRepository krl = (LocalKnowledgeRepository) kr;
+					try {
+						return krl.getValues(t).toArray();
+					} catch (Exception e) {
+						System.out.println("Error while reading KR values: "+kr+ " for type="+t);
+						Log.printStackTrace(e);
+					}
+				}
+				return new Object[0];
+			} else {
+				return new Object[0];
+			}
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+		 */
+		@Override
+		public Object getParent(Object element) {
+			if (element instanceof KnowledgeRepository) {
+				return null;
+			} else if (element instanceof AnnotationType) {
+				return ((AnnotationType)element).getKnowledgeRepository();
+			} else {
+				return null;
+			}
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+		 */
+		@Override
+		public boolean hasChildren(Object element) {
+			if (element instanceof KnowledgeRepository) {
+				KnowledgeRepository kr = ((KnowledgeRepository) element);
+				List<AnnotationType> types = kr.getAllAnnotationTypes();
+				return types.size() > 0;
+			} else if (element instanceof KnowledgeRepository[]) {
+				return ((KnowledgeRepository[])element).length > 0;
+			} else if (element instanceof AnnotationType) {
+				AnnotationType t = ((AnnotationType) element);
+				KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(t.getKnowledgeRepository());
+				
+				if (kr instanceof LocalKnowledgeRepository) {
+					LocalKnowledgeRepository krl = (LocalKnowledgeRepository) kr;
+					try {
+						return krl.hasValues(t);
+					} catch (Exception e) {
+						System.out.println("Error while reading KR values: "+krl+ " for type="+t);
+						Log.printStackTrace(e);
+					}
+				}
+				return false;
+			}  else {
+				return false;
+			}
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+		 */
+		@Override
+		public Object[] getElements(Object element) {
+			if (element instanceof KnowledgeRepository) {
+				KnowledgeRepository kr = ((KnowledgeRepository) element);
+				List<AnnotationType> types = kr.getAllAnnotationTypes();
+				return types.toArray();
+			} else if (element instanceof KnowledgeRepository[]) {
+				return ((KnowledgeRepository[])element);
+			} else {
+				return new Object[0];
+			}
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+		 */
+		@Override
+		public void dispose() { }
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+		 */
+		@Override
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {	}
+	}
+
+	public static void showType(AnnotationType type) {
+		
+		TreeViewer tv = getTree();
+		if (tv != null) {
+			StructuredSelection selection = new StructuredSelection(type);
+			tv.expandToLevel(selection, AbstractTreeViewer.ALL_LEVELS);
+			tv.setSelection(selection);
+		} else {
+			// call org.eclipse.ui.handlers.ShowViewHandler
+			// extends the command to select the type ?
+		}
+	}
+
+	public static TreeViewer getTree() {
+		KRView baseView = (KRView) PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage().findView(
+						KRView.ID);
+		if (baseView != null)
+			return baseView.tv;
+		
+		return null;
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/knowledgerepositories/KRView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java	(revision 324)
@@ -0,0 +1,359 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.Toolbox;
+import org.txm.objects.Base;
+import org.txm.objects.Edition;
+import org.txm.objects.Page;
+import org.txm.objects.Project;
+import org.txm.objects.Script;
+import org.txm.objects.Text;
+import org.txm.objects.TxmObject;
+import org.txm.objects.Workspace;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.commands.base.DeleteObject;
+import org.txm.rcp.editors.TXMBrowser;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * display the hierarchy of the workspace Projects, Bases, Texts, Edition and
+ * Pages. @ author mdecorde
+ * 
+ */
+public class BasesView extends ViewPart {
+		
+	/** The tv. */
+	TreeViewer tv;
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.views.BasesView"; //$NON-NLS-1$
+
+	/**
+	 * Instantiates a new bases view.
+	 */
+	public BasesView() {
+		// System.out.println(Messages.ObjectExplorer_9);
+	}
+
+	/**
+	 * Refresh.
+	 */
+	public static void refresh() {
+		BasesView baseView = (BasesView) PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage().findView(
+						BasesView.ID);
+		if (baseView != null)
+			baseView.tv.refresh();
+	}
+
+	/**
+	 * Reload.
+	 */
+	public static void reload() {
+		BasesView baseView = (BasesView) PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage().findView(
+						BasesView.ID);
+		if (baseView != null)
+			baseView._reload();
+	}
+
+	/**
+	 * _reload.
+	 */
+	public void _reload() {
+		tv.setContentProvider(new TxmObjectTreeProvider());
+		tv.setLabelProvider(new TxmObjectLabelProvider());
+		tv.setInput(Toolbox.workspace);
+		refresh();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		// System.out.println(Messages.ObjectExplorer_9);
+		tv = new TreeViewer(parent);
+		tv.setContentProvider(new TxmObjectTreeProvider());
+		tv.setLabelProvider(new TxmObjectLabelProvider());
+		tv.setInput(Toolbox.workspace);
+
+		tv.addDoubleClickListener(new IDoubleClickListener() {
+
+			@Override
+			public void doubleClick(DoubleClickEvent event) {
+				TreeSelection selection = (TreeSelection) tv.getSelection();
+				if (selection.getFirstElement() instanceof Corpus) {
+					File selectedItem = ((Corpus) selection.getFirstElement())
+							.getFirstText().getSource();
+					EditFile.openfile(selectedItem.getAbsolutePath());
+				} else if (selection.getFirstElement() instanceof Text) {
+					File selectedItem = ((Text) selection.getFirstElement())
+							.getSource();
+					EditFile.openfile(selectedItem.getAbsolutePath());
+				} else if (selection.getFirstElement() instanceof Edition) {
+					Edition edition = ((Edition) selection.getFirstElement());
+					Page firstpage = edition.getFirstPage();
+					TXMBrowser editor = OpenBrowser.openEdition(firstpage
+							.getFile().getAbsolutePath(), edition.getName());
+					editor.showPage(firstpage);
+				} else if (selection.getFirstElement() instanceof Page) {
+					Page page = ((Page) selection.getFirstElement());
+					TXMBrowser editor = OpenBrowser.openEdition(page.getFile()
+							.getAbsolutePath());
+					editor.showPage(page);
+				}
+			}
+		});
+
+		tv.getTree().addKeyListener(new KeyListener() {
+
+			@Override
+			public void keyReleased(KeyEvent e) {
+				if (e.keyCode == SWT.DEL) {
+					ISelection sel = tv.getSelection();
+					if (sel instanceof IStructuredSelection) {
+						if (!DeleteObject.askContinueToDelete((IStructuredSelection)sel)) return;
+						DeleteObject.delete(sel);
+					}
+				}
+			}
+
+			@Override
+			public void keyPressed(KeyEvent e) {
+			}
+		});
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tv.getTree());
+
+		// Set the MenuManager
+		tv.getTree().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tv);
+		// Make the selection available
+		getSite().setSelectionProvider(tv);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/**
+	 * The Class TxmObjectLabelProvider.
+	 */
+	public class TxmObjectLabelProvider extends LabelProvider {
+
+		/** The image table. */
+		private Map<ImageDescriptor, Image> imageTable = new HashMap<ImageDescriptor, Image>();
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+		 */
+		@Override
+		public String getText(Object Element) {
+			return ((TxmObject) Element).getName();
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+		 */
+		@Override
+		public final Image getImage(Object element) {
+			ImageDescriptor imageDescriptor = AbstractUIPlugin
+					.imageDescriptorFromPlugin(Application.PLUGIN_ID,
+							IImageKeys.FILE);
+			if (element instanceof Project)
+				imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+						Application.PLUGIN_ID, IImageKeys.PROJECT);
+			else if (element instanceof Base)
+				imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+						Application.PLUGIN_ID, IImageKeys.BASE);
+			else if (element instanceof MainCorpus)
+				imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+						Application.PLUGIN_ID, IImageKeys.CORPUS);
+			else if (element instanceof Text)
+				imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+						Application.PLUGIN_ID, IImageKeys.TEXT);
+			else if (element instanceof Edition)
+				imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+						Application.PLUGIN_ID, IImageKeys.EDITION);
+			else if (element instanceof Page)
+				imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+						Application.PLUGIN_ID, IImageKeys.FILE);
+			else if (element instanceof Script)
+				imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+						Application.PLUGIN_ID, IImageKeys.SCRIPT);
+
+			Image image = imageTable.get(imageDescriptor);
+			if (image == null) {
+				image = imageDescriptor.createImage();
+				imageTable.put(imageDescriptor, image);
+			}
+			return image;
+		}
+	}
+
+	/**
+	 * The Class TxmObjectTreeProvider.
+	 */
+	public class TxmObjectTreeProvider implements ITreeContentProvider {
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+		 */
+		@Override
+		public Object[] getChildren(Object element) {
+			if (element instanceof Workspace) {
+				return ((Workspace) element).getProjects().toArray();
+			} else if (element instanceof Project) {
+				return ((Project) element).getBases().toArray();
+			} else if (element instanceof Base) {
+				return ((Base) element).getCorpora().values().toArray();
+			} else if (element instanceof MainCorpus) {
+				return ((Corpus) element).getTexts().toArray();
+			} else if (element instanceof Text) {
+				return ((Text) element).getEditions().toArray();
+			} else if (element instanceof Edition) {
+				return ((Edition) element).getPages().toArray();
+			} else if (element instanceof Script) {
+				return null;
+			}
+			return null;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+		 */
+		@Override
+		public Object getParent(Object element) {
+			if (element instanceof Workspace) {
+				return null;
+			} else if (element instanceof Project) {
+				return ((Project) element).getWorkspace();
+			} else if (element instanceof Base) {
+				return ((Base) element).getProject();
+			} else if (element instanceof MainCorpus) {
+				return ((MainCorpus) element).getBase();
+			} else if (element instanceof Text) {
+				return ((Text) element).getCorpus();
+			} else if (element instanceof Edition) {
+				return ((Edition) element).getText();
+			} else if (element instanceof Page) {
+				return ((Page) element).getEdition();
+			} else if (element instanceof Script) {
+				return ((Text) element).getCorpus();
+			}
+			return null;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+		 */
+		@Override
+		public boolean hasChildren(Object element) {
+			if (element instanceof Workspace) {
+				return !((Workspace) element).getProjects().isEmpty();
+			} else if (element instanceof Project) {
+				return !((Project) element).getBases().isEmpty();
+			} else if (element instanceof Base) {
+				return !((Base) element).getCorpora().values().isEmpty();
+			} else if (element instanceof Corpus) {
+				return !((Corpus) element).getTexts().isEmpty();
+			} else if (element instanceof Text) {
+				return !((Text) element).getEditions().isEmpty();
+			} else if (element instanceof Edition) {
+				return !((Edition) element).getPages().isEmpty();
+			} else if (element instanceof Page) {
+				return false;
+			} else if (element instanceof Script) {
+				return false;
+			}
+			return false;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+		 */
+		@Override
+		public Object[] getElements(Object element) {
+			return getChildren(element);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+		 */
+		@Override
+		public void dispose() {
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+		 */
+		@Override
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		}
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/BasesView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/GroovyConsole.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/GroovyConsole.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/GroovyConsole.java	(revision 324)
@@ -0,0 +1,217 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views;
+
+import java.io.IOException;
+import java.io.PipedInputStream;
+import java.io.PipedOutputStream;
+import java.io.PrintStream;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.part.ViewPart;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * not used yet, must display the groovy logs only @ author mdecorde.
+ */
+public class GroovyConsole extends ViewPart implements Runnable {
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.views.GroovyConsole"; //$NON-NLS-1$
+	
+	/** The text area. */
+	private static StyledText textArea;
+
+	/** The out. */
+	private static PrintStream out;
+	
+	/** The err. */
+	private static PrintStream err;
+	
+	/** The quit. */
+	private boolean quit;
+
+	/** The reader. */
+	private Thread reader;
+	
+	/** The reader2. */
+	private Thread reader2;
+	
+	/** The pin. */
+	PipedInputStream pin = new PipedInputStream();
+	
+	/** The pin2. */
+	PipedInputStream pin2 = new PipedInputStream();
+
+	/** The output. */
+	static PrintStream output = System.out;
+	
+	/** The errput. */
+	static PrintStream errput = System.err;
+
+	/**
+	 * Instantiates a new groovy console.
+	 */
+	public GroovyConsole() {
+		try {
+			PipedOutputStream pout = new PipedOutputStream(pin);
+			out = new PrintStream(pout, true);
+
+			new PipedOutputStream(pin2);
+			err = new PrintStream(pout, true);
+
+		} catch (IOException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		reader = new Thread(this);
+		reader.setDaemon(true);
+		reader.start();
+		reader2 = new Thread(this);
+		reader2.setDaemon(true);
+		reader2.start();
+	}
+
+	/**
+	 * Redirect.
+	 *
+	 * @param b the b
+	 */
+	public static void redirect(boolean b) {
+		if (b) {
+			System.setOut(out);
+			System.setErr(err);
+		} else {
+			System.setOut(output);
+			System.setErr(errput);
+		}
+	}
+
+	/**
+	 * Lecture de la sortie standard.
+	 *
+	 * @param in the in
+	 * @return the string
+	 * @throws IOException Signals that an I/O exception has occurred.
+	 */
+	protected synchronized String readLine(PipedInputStream in)
+			throws IOException {
+		String input = ""; //$NON-NLS-1$
+		do {
+			int available = in.available();
+			if (available == 0)
+				break;
+			byte b[] = new byte[available];
+			in.read(b);
+			input = input + new String(b, 0, b.length);
+		} while (!input.endsWith("\n") && !input.endsWith("\r\n") && !quit); //$NON-NLS-1$ //$NON-NLS-2$
+		return input;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Runnable#run()
+	 */
+	@Override
+	public synchronized void run() {
+		try {
+			while (Thread.currentThread() == reader) {
+				try {
+					this.wait(100);
+				} catch (InterruptedException ie) {
+				}
+				if (pin.available() != 0) {
+					String input = this.readLine(pin);
+					textArea.append(input);
+				}
+				if (quit)
+					return;
+			}
+
+			while (Thread.currentThread() == reader2) {
+				try {
+					this.wait(100);
+				} catch (InterruptedException ie) {
+				}
+				if (pin2.available() != 0) {
+					String input = this.readLine(pin2);
+					textArea.append(input);
+				}
+
+				if (quit)
+					return;
+			}
+		} catch (Exception e) {
+			textArea.append(Messages.GroovyConsole_4);
+			textArea.append(Messages.GroovyConsole_5 + e);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		textArea = new StyledText(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL
+				| SWT.H_SCROLL);
+		textArea.setEditable(false);
+
+		textArea.setLayoutData(new GridData(GridData.FILL_BOTH
+				| GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
+	}
+
+	/**
+	 * Println.
+	 *
+	 * @param txt the txt
+	 */
+	public static void println(String txt) {
+		textArea.append(txt + "\n"); //$NON-NLS-1$
+	}
+
+	/**
+	 * Prints the.
+	 *
+	 * @param txt the txt
+	 */
+	public static void print(String txt) {
+		textArea.append(txt);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/GroovyConsole.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/QueriesView.java	(revision 324)
@@ -0,0 +1,391 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.objects.Base;
+import org.txm.objects.Corpus;
+import org.txm.objects.Project;
+import org.txm.objects.SavedQuery;
+import org.txm.objects.TxmObject;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.commands.base.DeleteObject;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.CorpusManager;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * Display the query saved in the Base, each time a query works it is saved @
+ * author mdecorde.
+ */
+public class QueriesView extends ViewPart {
+	
+	/** The empty. */
+	ArrayList<Object> empty = new ArrayList<Object>();
+	
+	/** The composites. */
+	Control[] composites = new Control[3];
+	
+	/** The activated project. */
+	Project activatedProject;
+	
+	/** The activated base. */
+	Base activatedBase;
+	
+	/** The tv. */
+	TreeViewer tv;
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.views.QueriesView"; //$NON-NLS-1$
+
+	/**
+	 * Instantiates a new queries view.
+	 */
+	public QueriesView() {
+		// System.out.println(Messages.ObjectExplorer_9);
+	}
+
+	/**
+	 * Refresh.
+	 */
+	public static void refresh() {
+		QueriesView baseView = (QueriesView) PlatformUI.getWorkbench()
+		.getActiveWorkbenchWindow().getActivePage().findView(
+				QueriesView.ID);
+		if (baseView != null)
+			baseView.tv.refresh();
+	}
+
+	/**
+	 * Reload.
+	 */
+	public static void reload() {
+		QueriesView baseView = (QueriesView) PlatformUI.getWorkbench()
+		.getActiveWorkbenchWindow().getActivePage().findView(
+				QueriesView.ID);
+		if (baseView != null)
+			baseView._reload();
+	}
+
+	/**
+	 * _reload.
+	 */
+	public void _reload() {
+		tv.setContentProvider(new TxmObjectTreeProvider());
+		tv.setLabelProvider(new TxmObjectLabelProvider());
+		if (Toolbox.workspace != null) {
+			try {
+				Collection<MainCorpus> input = CorpusManager.getCorpusManager().getCorpora();
+				tv.setInput(input);
+				refresh();
+			} catch (CqiClientException e) {
+				// TODO Auto-generated catch block
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		// System.out.println(Messages.ObjectExplorer_9);
+
+		parent.setLayout(new GridLayout(1, true));
+		Button export = new Button(parent, SWT.PUSH);
+		export.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+				false));
+		export.setText(Messages.QueriesView_1);
+		export.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent arg0) {
+				//Collection<Base> bases = Toolbox.workspace.getProject("default").getBases(); //$NON-NLS-1$
+				File output = new File("queries.txt"); //$NON-NLS-1$
+
+				FileDialog dialog = new FileDialog(arg0.display.getActiveShell(), SWT.SAVE);
+				String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+				if (LastOpened.getFile(ID) != null) {
+					dialog.setFilterPath(LastOpened.getFolder(ID));
+					dialog.setFileName(LastOpened.getFile(ID));
+				} else {
+					dialog.setFilterPath(new File(txmhome, Messages.Explorer_3).getAbsolutePath());
+				}
+				String path = dialog.open();
+				if (path == null) return;
+				if (path.trim().length() > 0)
+					output = new File(path); 
+
+				LastOpened.set(ID, output.getParent(), output.getName());
+				if (!output.getParentFile().exists())
+					return;
+				
+				
+				try {
+					FileWriter writer = new FileWriter(output);
+					writer.write(Messages.QueriesView_5);
+					for (MainCorpus b : CorpusManager.getCorpusManager().getCorpora()) {
+						writer.write(" " + b.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+						for (SavedQuery q : b.getQueriesLog()) {
+							writer.write("  " + q + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+					}
+
+					writer.close();
+					EditFile.openfile(path);
+					refresh();
+				} catch (IOException e) {
+					Log.severe("Error while exporting queries: "+e.getLocalizedMessage());
+				} catch (CqiClientException e) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent arg0) {
+			}
+		});
+		tv = new TreeViewer(parent);
+		tv.getTree().setLayoutData(
+				new GridData(GridData.FILL, GridData.FILL, true, true));
+		_reload();
+
+		tv.addDoubleClickListener(new IDoubleClickListener() {
+			@Override
+			public void doubleClick(DoubleClickEvent event) {
+			}
+		});
+
+		tv.getTree().addKeyListener(new KeyListener() {
+
+			@Override
+			public void keyReleased(KeyEvent e) {				
+			}
+
+			@Override
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.DEL) {
+					ISelection sel = tv.getSelection();
+					if (sel instanceof IStructuredSelection) {
+						if (!DeleteObject.askContinueToDelete((IStructuredSelection)sel)) return;
+						DeleteObject.delete(sel);
+					}
+				}
+				else if (e.keyCode == SWT.F5) {
+					reload();
+				}
+				else if ((char)e.keyCode == 'c' & ((e.stateMask & SWT.CTRL) != 0))
+				{
+					TreeSelection selection = (TreeSelection) tv.getSelection();
+					Object selectedItem = selection.getFirstElement();
+					if (selectedItem instanceof SavedQuery)
+					{
+						String text = ((SavedQuery)selectedItem).toString();
+						org.txm.rcp.utils.IOClipboard.write(text);
+					}
+				}
+			}
+		});
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tv.getTree());
+
+		// Set the MenuManager
+		tv.getTree().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tv);
+		// Make the selection available
+		getSite().setSelectionProvider(tv);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/**
+	 * Gets the activated project.
+	 *
+	 * @return the activated project
+	 */
+	public Project getActivatedProject() {
+		return activatedProject;
+	}
+
+	/**
+	 * Gets the activated base.
+	 *
+	 * @return the activated base
+	 */
+	public Base getActivatedBase() {
+		return activatedBase;
+	}
+
+	/**
+	 * The Class TxmObjectLabelProvider.
+	 */
+	public class TxmObjectLabelProvider extends LabelProvider {
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+		 */
+		@Override
+		public String getText(Object element) {
+			if (element instanceof Corpus)
+				return ((TxmObject) element).getName();
+			else if (element instanceof SavedQuery)
+				return ((SavedQuery) element).toString();
+			return NLS.bind(Messages.QueriesView_10, element);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+		 */
+		@Override
+		public final Image getImage(Object element) {
+			if (element instanceof Corpus)
+				return IImageKeys.getImage(IImageKeys.CORPUS);
+			else if (element instanceof SavedQuery)
+				return IImageKeys.getImage(IImageKeys.QUERY);
+			return null;
+		}
+	}
+
+	/**
+	 * The Class TxmObjectTreeProvider.
+	 */
+	public class TxmObjectTreeProvider implements ITreeContentProvider {
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+		 */
+		@Override
+		public Object[] getChildren(Object element) {
+			if (element instanceof Corpus) {
+				Corpus c = ((Corpus) element);
+				return c.getQueriesLog().toArray();
+			}
+			return new Object[0];
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+		 */
+		@Override
+		public Object getParent(Object element) {
+			if (element instanceof SavedQuery) {
+				return ((SavedQuery) element).getParent();
+			}
+			return new Object[0];
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+		 */
+		@Override
+		public boolean hasChildren(Object element) {
+			if (element instanceof Corpus) {
+				Corpus c = ((Corpus) element);
+				return !c.getQueriesLog().isEmpty();
+			}
+			return false;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+		 */
+		@Override
+		public Object[] getElements(Object element) {
+			Collection<Base> input = (Collection<Base>) element;
+			Object[] objects = new Object[input.size()];
+			Iterator<Base> it = input.iterator();
+			int i = 0;
+			while (it.hasNext()) {
+				objects[i] = it.next();
+				i++;
+			}
+			return objects;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+		 */
+		@Override
+		public void dispose() {
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+		 */
+		@Override
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/QueriesView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/SummaryView.java	(revision 324)
@@ -0,0 +1,525 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.ProgressEvent;
+import org.eclipse.swt.browser.ProgressListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+import org.txm.Toolbox;
+import org.txm.functions.summary.Summary;
+import org.txm.objects.Page;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.editors.TXMBrowser;
+import org.txm.rcp.swt.widget.PropertiesSelector;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.clientExceptions.InvalidCqpIdException;
+import org.txm.searchengine.cqp.corpus.CorpusManager;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+// TODO: Auto-generated Javadoc
+/**
+ * Display the internal hierarchie of a MainCorpus
+ * @author mdecorde.
+ */
+public class SummaryView extends ViewPart {
+
+	MainCorpus selectedCorpus;
+	List<Property> selectedProps;
+	Summary summary;
+
+	/** The tv. */
+	TreeViewer tv;
+	Combo corpusCombo;
+	PropertiesSelector propsArea;
+
+	/** The attached browser editor. */
+	protected TXMBrowser attachedBrowserEditor;
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.views.InternalCorpusView"; //$NON-NLS-1$
+
+	/**
+	 * Instantiates a new queries view.
+	 */
+	public SummaryView() {
+		// System.out.println(Messages.ObjectExplorer_9);
+	}
+
+	/**
+	 * Refresh.
+	 */
+	public static void refresh() {
+		SummaryView baseView = (SummaryView) PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage().findView(
+						SummaryView.ID);
+		if (baseView != null)
+			baseView.tv.refresh();
+	}
+
+	/**
+	 * Reload.
+	 */
+	public static void reload() {
+		SummaryView baseView = (SummaryView) PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage().findView(
+						SummaryView.ID);
+		if (baseView != null)
+			baseView._reload();
+	}
+
+	/**
+	 * _reload.
+	 */
+	public void _reload() {
+
+		initParameters();
+
+		compute();
+
+
+	}
+
+	public void compute()
+	{
+		try {
+			if (selectedCorpus == null || selectedProps == null || selectedProps.size() == 0) {
+				//System.out.println("Error: corpus="+selectedCorpus+", props="+selectedProps);
+				return;
+			}
+			summary = new Summary(selectedCorpus);
+			ArrayList<StructuralUnitProperty> properties = new ArrayList<StructuralUnitProperty>();
+			for (Property p : selectedProps)
+				if (p instanceof StructuralUnitProperty)
+					properties.add((StructuralUnitProperty) p);
+
+			if (summary.init(properties)) {
+				tv.setContentProvider(new TreeNodeTreeProvider());
+				tv.setLabelProvider(new TreeNodeLabelProvider());
+
+				tv.setInput(summary);
+				refresh();
+			}
+		} catch (Exception e) {
+			System.out.println(Messages.InternalCorpusView_0);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} 
+	}
+
+	public void initParameters()
+	{
+		if (!Toolbox.isInitialized())
+			return;
+		//init combo
+		try {
+			corpusCombo.removeAll();
+			for (MainCorpus p : CorpusManager.getCorpusManager().getCorpora()) {
+				corpusCombo.add(p.getName());
+			}
+		} catch (CqiClientException e2) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e2);
+		}
+
+		//init default corpus
+		//		try {
+		//			if (CorpusManager.getCorpusManager().getCorpora().size() > 0) {
+		//				selectedCorpus = CorpusManager.getCorpusManager().getCorpora().get(0);
+		//				corpusCombo.select(0);
+		//			}
+		//		} catch (Exception e) {	org.txm.rcp.utils.Logger.printStackTrace(e);}
+
+		if (selectedCorpus != null) reloadProperties();
+	}
+
+	public void reloadProperties()
+	{
+		if (selectedCorpus == null) return;
+		ArrayList<Property> availables = new ArrayList<Property>();
+		try {
+			availables = new ArrayList<Property>(selectedCorpus.getOrderedStructuralUnitProperties());
+		} catch (CqiClientException e1) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
+			return;
+		}
+
+		//init prop selector
+		ArrayList<Property> selectorSelectedProps = new ArrayList<Property>();
+		//		if (summary != null) {
+		//			for(StructuralUnitProperty prop : summary.getProperties())
+		//			{
+		//				selectorSelectedProps.add(prop);
+		//				availables.remove(prop);
+		//			}
+		//		} else {
+		//System.out.println("AVAILABLES SIZE > 0");
+		if (availables.size()  > 0) {
+			boolean foundp = false;
+			boolean founds = false;
+			for (int i = 0 ; i < availables.size() ; i++) {
+
+				StructuralUnitProperty prop = (StructuralUnitProperty) availables.get(i);
+				//System.out.println("check prop : "+prop.getFullName());
+				String name = prop.getFullName();
+				if ("text_id".equals(name)) { //$NON-NLS-1$
+					selectorSelectedProps.add(availables.get(i));
+					availables.remove(i);
+					i--;
+					continue;
+				}
+				if (!foundp)
+					if ("p_n".equals(name) || "p_id".equals(name)) { //$NON-NLS-1$ //$NON-NLS-2$
+						selectorSelectedProps.add(availables.get(i));
+						availables.remove(i);
+						i--;
+						foundp=true;
+						continue;
+					}
+				if (!founds)
+					if ("s_n".equals(name) || "s_id".equals(name)) { //$NON-NLS-1$ //$NON-NLS-2$
+						selectorSelectedProps.add(availables.get(i));
+						availables.remove(i);
+						i--;
+						founds = true;
+						continue;
+					}
+			}
+
+			Collections.sort(selectorSelectedProps, new Comparator<Property>() {
+				@Override
+				public int compare(Property o1, Property o2) {
+					StructuralUnitProperty s1 = (StructuralUnitProperty) o1;
+					StructuralUnitProperty s2 = (StructuralUnitProperty) o2;
+					char c1 = s1.getFullName().charAt(0);
+					char c2 = s2.getFullName().charAt(0);
+					if (c1 == 't') return -1;
+					if (c2 == 't') return 1;
+					if (c1 == 's') return 1;
+					if (c2 == 's') return -1;
+					return 0;
+				}
+			});
+		}
+		//}
+		propsArea.clear();
+		//System.out.println("Set properties "+availables+", "+selectorSelectedProps);
+		this.propsArea.setProperties(availables, selectorSelectedProps);
+		//init default props
+		selectedProps = propsArea.getProperties();
+
+		if (tv.getContentProvider() != null)
+			tv.setInput(null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		// System.out.println(Messages.ObjectExplorer_9);
+
+		parent.setLayout(new GridLayout(2, false));
+
+		// [[Choose corpus]]
+		corpusCombo = new Combo(parent, SWT.READ_ONLY);
+		corpusCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false, 2, 1));
+
+		corpusCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String corpusName = corpusCombo.getText();
+				try {
+					selectedCorpus = CorpusManager.getCorpusManager().getCorpus(corpusName);
+					reloadProperties();
+				} catch (CqiClientException e1) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
+				} catch (InvalidCqpIdException e1) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {}
+		});
+
+		// [Choose properties]
+		propsArea = new PropertiesSelector(parent, SWT.NONE);
+		propsArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+		propsArea.setLayout(new GridLayout(3, false));
+
+		//Button reload
+		Button openeditdialog = new Button(parent, SWT.PUSH);
+		openeditdialog.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+		openeditdialog.setText(Messages.InternalCorpusView_1);
+		openeditdialog.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				compute();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {	}
+		});
+
+		// show corpus tree
+		tv = new TreeViewer(parent);
+		tv.getTree().setLayoutData(
+				new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
+
+		tv.addDoubleClickListener(new IDoubleClickListener() {
+			private ProgressListener progresslistener;
+
+			@Override
+			public void doubleClick(DoubleClickEvent event) {
+				//System.out.println("open Edition or Text editor");
+				IStructuredSelection sel = (IStructuredSelection) tv.getSelection();
+				Object first = sel.getFirstElement();
+				final Summary.TreeNode node = (Summary.TreeNode) first;
+
+				try {
+					final Page openedPage = summary.getDefaultEditionPage(node);
+					if (openedPage != null) {
+						// System.out.println(page.getFile());
+						if (attachedBrowserEditor == null
+								|| attachedBrowserEditor.isDisposed()) {
+							attachedBrowserEditor = OpenBrowser
+									.openEdition(openedPage.getFile()
+											.getAbsolutePath(), openedPage.getFile().getName());
+							attachedBrowserEditor.setEdition(openedPage.getEdition());
+						}
+						attachedBrowserEditor.showPage(openedPage);
+					} else {
+						System.out.println(Messages.SummaryView_0+node);
+					}
+
+					if (progresslistener != null) {
+						attachedBrowserEditor.getBrowser().removeProgressListener(progresslistener);
+					}
+					progresslistener = new ProgressListener() {
+						@Override
+						public void changed(ProgressEvent event) {
+						}
+
+						@Override
+						public void completed(ProgressEvent event) {
+							Page currentpage = attachedBrowserEditor
+									.getCurrentPage();
+							// System.out.println("Highlight ! "+currentpage.getEdition().getText()+" name ="+openedPage.getEdition().getText());
+							if (currentpage != null)
+								if (!(currentpage.getEdition().getText() == openedPage
+								.getEdition().getText()))
+									return;
+							String wordid = node.getWordId();
+							String highlightscript = "try { var elt = document.getElementById(\"" + wordid + "\");" + //$NON-NLS-1$ //$NON-NLS-2$
+									"elt.style.backgroundColor=\"#F9D0D0\";" //$NON-NLS-1$
+									+ 
+									"elt.style.paddingLeft=\"3px\";" + //$NON-NLS-1$
+									"elt.style.paddingRight=\"3px\";" + //$NON-NLS-1$
+									"elt.style.paddingTop=\"1px\";" + //$NON-NLS-1$
+									"elt.style.paddingBottom=\"1px\";" + //$NON-NLS-1$
+									"} catch (e) { };"; //$NON-NLS-1$
+
+							attachedBrowserEditor.getBrowser().execute(
+									highlightscript);
+
+
+							String script = "try { document.getElementById(\"" + wordid + "\").scrollIntoView(true); } catch (e) { };"; //$NON-NLS-1$ //$NON-NLS-2$
+							attachedBrowserEditor.getBrowser().execute(
+									script);
+						}
+					};
+					attachedBrowserEditor.getBrowser().addProgressListener(
+							progresslistener);
+
+					IWorkbenchPage attachedPage = attachedBrowserEditor.getEditorSite().getPage();
+					attachedPage.activate(attachedBrowserEditor);
+
+				} catch (Exception e) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				}
+			}
+		});
+
+		initParameters();
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tv.getTree());
+
+		// Set the MenuManager
+		tv.getTree().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tv);
+		// Make the selection available
+		getSite().setSelectionProvider(tv);
+
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		// TODO Auto-generated method stub
+
+	}
+
+	public MainCorpus getSelectedCorpus()
+	{
+		return selectedCorpus;
+	}
+
+	public List<Property> getProperties()
+	{
+		return selectedProps;
+	}
+
+	/**
+	 * The Class TxmObjectLabelProvider.
+	 */
+	public class TreeNodeLabelProvider extends LabelProvider {
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+		 */
+		@Override
+		public String getText(Object element) {
+			if (element instanceof Summary.TreeNode)
+				return ((Summary.TreeNode) element).getInfo();
+			return NLS.bind(Messages.InternalCorpusView_2, element);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+		 */
+		@Override
+		public final Image getImage(Object element) {
+			return null;
+		}
+	}
+
+	/**
+	 * The Class TxmObjectTreeProvider.
+	 */
+	public class TreeNodeTreeProvider implements ITreeContentProvider {
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+		 */
+		@Override
+		public Object[] getChildren(Object element) {
+			if (element instanceof Summary.TreeNode) {
+				Summary.TreeNode b = ((Summary.TreeNode) element);
+				return b.toArray();
+			}
+			return new Object[0];
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+		 */
+		@Override
+		public Object getParent(Object element) {
+			if (element instanceof Summary.TreeNode) {
+				return ((Summary.TreeNode) element).getParent();
+			}
+			return new Object[0];
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+		 */
+		@Override
+		public boolean hasChildren(Object element) {
+			if (element instanceof Summary.TreeNode) {
+				Summary.TreeNode b = ((Summary.TreeNode) element);
+				return b.size() > 0;
+			}
+			return false;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+		 */
+		@Override
+		public Object[] getElements(Object element) {
+			if(summary != null)
+			{
+				Object[] objects = {summary.getRoot()};
+				return objects;
+			}
+
+			return new Object[0];
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+		 */
+		@Override
+		public void dispose() {
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+		 */
+		@Override
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/SummaryView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>TXM views</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java	(revision 324)
@@ -0,0 +1,335 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.fileexplorer;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.commands.CopyFile;
+import org.txm.rcp.commands.CreateMacro;
+import org.txm.rcp.commands.CutFile;
+import org.txm.rcp.commands.DeleteFile;
+import org.txm.rcp.commands.ExecuteGroovyMacro;
+import org.txm.rcp.commands.PasteFile;
+import org.txm.rcp.commands.RenameFile;
+// TODO: Auto-generated Javadoc
+/**
+ * Simple file explorer @ author mdecorde.
+ */
+public class MacroExplorer extends ViewPart {
+
+	/** The ID. */
+	static public String ID = "org.txm.rcp.views.fileexplorer.MacroExplorer"; //$NON-NLS-1$
+
+	/** The home. */
+	private static String home = Toolbox.getParam(TBXPreferences.USER_TXM_HOME); 
+
+	/** The tv. */
+	TreeViewer tv;
+
+	/**
+	 * Instantiates a new explorer.
+	 */
+	public MacroExplorer() {
+		initCurrentDirectory();
+	}
+
+	private static void initCurrentDirectory() {
+		home = Toolbox.getParam(TBXPreferences.USER_TXM_HOME); 
+		if (home == null) home = System.getProperty("user.home"); //$NON-NLS-1$
+		File scriptsDir = new File(home, "scripts"); //$NON-NLS-1$
+		File currentRootDir = new File(scriptsDir, "macro/org/txm/macro"); //$NON-NLS-1$
+		home = currentRootDir.getAbsolutePath();
+	}
+
+	/**
+	 * Refresh.
+	 */
+	public static void refresh() {
+		MacroExplorer explorerView = (MacroExplorer) PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage().findView(
+						MacroExplorer.ID);
+		
+		initCurrentDirectory();
+		
+		if (explorerView != null) {
+			explorerView.tv.setInput(new File(home));
+			explorerView.tv.refresh();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+
+		FormLayout formLayout = new FormLayout();
+		formLayout.marginWidth = 0;
+		formLayout.marginHeight = 0;
+		parent.setLayout(formLayout);
+
+		// controles composite
+		Composite controls = new Composite(parent, SWT.NONE);
+
+		FormData controlsData = new FormData();
+		controlsData.top = new FormAttachment(0);
+		controlsData.left = new FormAttachment(0);
+		controlsData.right = new FormAttachment(100);
+		controls.setLayoutData(controlsData);
+
+		GridLayout controlsLayout = new GridLayout(2, false);
+		controlsLayout.marginBottom = controlsLayout.marginHeight=0;
+		controls.setLayout(controlsLayout);
+		
+		Button refresh = new Button(controls, SWT.NONE);
+		refresh.setText(Messages.Explorer_5);
+		refresh.setToolTipText(Messages.Explorer_6);
+		refresh.setLayoutData(new GridData());
+		refresh.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				initCurrentDirectory();
+				tv.setInput(new File(home));
+				tv.refresh();
+			}
+		});
+		
+		Button newMacro = new Button(controls, SWT.NONE);
+		newMacro.setLayoutData(new GridData());
+		newMacro.setText(Messages.MacrosExplorer_0);
+		newMacro.setToolTipText(Messages.MacrosExplorer_1);
+		newMacro.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String scriptRootDir = Toolbox.getParam(TBXPreferences.USER_TXM_HOME) + "/scripts"; //$NON-NLS-1$
+				File currentRootDir = new File(scriptRootDir, "macro/org/txm/macro"); //$NON-NLS-1$
+				currentRootDir.mkdirs();
+				
+				InputDialog dialog = new InputDialog(e.display.getActiveShell(), Messages.CreateMacro_0, Messages.CreateMacro_1, "", null); //$NON-NLS-1$
+				
+				dialog.open();
+				String name = dialog.getValue();
+				
+				if (CreateMacro.createMacro(currentRootDir.getAbsolutePath(), name)) {
+					MacroExplorer.refresh();
+					tv.refresh();
+				}
+			}
+		});
+
+		// set positions & sizes
+		//FormData widgetData = new FormData();
+		//widgetData.right = new FormAttachment(100);
+		//refresh.setLayoutData(widgetData);
+
+		// the explorer
+		tv = new TreeViewer(parent);
+		tv.setContentProvider(new MacroContentProvider(false));
+		tv.setLabelProvider(new MacroTreeLabelProvider());
+		tv.setInput(new File(home));
+
+		FormData tvData = new FormData();
+		tvData.top = new FormAttachment(controls, 0);
+		tvData.bottom = new FormAttachment(100);
+		tvData.left = new FormAttachment(0);
+		tvData.right = new FormAttachment(100);
+		tv.getTree().setLayoutData(tvData);
+
+		tv.addDoubleClickListener(new IDoubleClickListener() {
+			@Override
+			public void doubleClick(DoubleClickEvent event) {
+				TreeSelection selection = (TreeSelection) tv.getSelection();
+				File selectedItem = (File) selection.getFirstElement();
+				if (!selectedItem.isDirectory()) {
+					IWorkbenchWindow acWindow = TXMWindows.getActiveWindow();
+					IWorkbenchPart page = acWindow.getActivePage().getActivePart();
+					ExecuteGroovyMacro.execute(selectedItem.getAbsolutePath(), page, selection);
+				} else {
+					changeState(selection);
+				}
+			}
+		});
+
+		tv.getTree().addKeyListener(new KeyListener() {
+			@Override
+			public void keyReleased(KeyEvent e) {
+				// TODO Auto-generated method stub
+			}
+
+			@Override
+			public void keyPressed(KeyEvent e) {
+				ISelection sel = tv.getSelection();
+				if (sel instanceof IStructuredSelection) {
+					List<?> objects = ((IStructuredSelection)sel).toList();
+					if (e.keyCode == SWT.DEL) {
+						DeleteFile.delete(objects);
+					} else if (e.keyCode == SWT.F5) {
+						MacroExplorer.refresh();
+					} else {
+						for (Object o : objects) {
+							//Object o = ((IStructuredSelection)sel).getFirstElement();
+							if (o instanceof File) {
+								File file = (File) o;
+								if (e.keyCode == SWT.DEL) {
+									DeleteFile.delete(file);
+								} else if ((char)e.keyCode == 'c' & ((e.stateMask & SWT.CTRL) != 0)) {
+									CopyFile.copy(file);
+								} else if ((char)e.keyCode == 'x' & ((e.stateMask & SWT.CTRL) != 0)) {
+									CutFile.cut(file);
+								} else if ((char)e.keyCode == 'v' & ((e.stateMask & SWT.CTRL) != 0)) {
+									if (file.isFile()) file = file.getParentFile();
+									PasteFile.paste(file);
+								} else if (e.keyCode == SWT.F2) {
+									RenameFile.rename(file);
+								}
+							}
+						}
+					}
+					
+					tv.refresh();
+				}
+			}
+		});
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tv.getTree());
+
+		// Set the MenuManager
+		tv.getTree().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tv);
+		getSite().setSelectionProvider(tv);
+	}
+
+	/**
+	 * Can delete.
+	 *
+	 * @param selectedItem the selected item
+	 * @return true, if successful
+	 */
+	protected boolean CanDelete(File selectedItem) {
+		File txmhome = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME));
+		File scripts = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "scripts"); //$NON-NLS-1$
+		File corpora = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "corpora"); //$NON-NLS-1$
+		//File registry = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "registry"); //$NON-NLS-1$
+		File workspaces = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "workspaces"); //$NON-NLS-1$
+		File xsl = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "xsl"); //$NON-NLS-1$
+		File samples = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "samples"); //$NON-NLS-1$
+		if (selectedItem.equals(txmhome) || 
+				selectedItem.equals(txmhome) ||
+				selectedItem.equals(scripts) ||
+				selectedItem.equals(corpora) ||
+				//selectedItem.equals(registry) ||
+				selectedItem.equals(workspaces) ||
+				selectedItem.equals(samples) ||
+				selectedItem.equals(xsl))
+		{
+			System.out.println(NLS.bind(Messages.Explorer_0, selectedItem));
+			return false;
+		}
+		return false;
+	}
+
+	/**
+	 * Change state.
+	 *
+	 * @param selection the selection
+	 */
+	protected void changeState(TreeSelection selection) {
+		TreeItem[] items = tv.getTree().getSelection();
+		for (TreeItem item : items) {
+			if (item.getExpanded()) {
+				item.setExpanded(false);	
+			} else {
+				item.setExpanded(true);
+			}
+			tv.refresh();
+		}	
+	}
+
+	/**
+	 * Sets the root.
+	 *
+	 * @param home the new root
+	 */
+	public void setRoot(String home) {
+		MacroExplorer.home = home;
+		tv.setInput(new File(home));
+		tv.refresh();
+	}
+
+	/**
+	 * Sets the root.
+	 *
+	 * @param f the new root
+	 */
+	public void setRoot(File f) {
+		MacroExplorer.home = f.getAbsolutePath();
+		tv.setInput(new File(home));
+		tv.refresh();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		tv.getTree().setFocus();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/FileTreeContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/FileTreeContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/FileTreeContentProvider.java	(revision 324)
@@ -0,0 +1,122 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.fileexplorer;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.FileExplorerPreferencePage;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class FileTreeContentProvider.
+ */
+public class FileTreeContentProvider implements ITreeContentProvider {
+	
+	protected Pattern p = null;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+	 */
+	@Override
+	public Object[] getChildren(Object element) {
+		String regex = TxmPreferences.getString(FileExplorerPreferencePage.FILES_TO_HIDE, ""); //$NON-NLS-1$
+		final boolean showHidden = TxmPreferences.getBoolean(FileExplorerPreferencePage.SHOW_HIDDEN_FILES, false);
+		final boolean showFolder = TxmPreferences.getBoolean(FileExplorerPreferencePage.SHOW_FOLDERS, false);
+		p = null;
+		try {
+		p = Pattern.compile(regex);
+		} catch(Exception e) { System.out.println(Messages.FileTreeContentProvider_1+regex+Messages.FileTreeContentProvider_2+e);}
+		
+		Object[] kids = ((File) element).listFiles(new FileFilter() {	
+			@Override
+			public boolean accept(File file) {
+				boolean rez = true;
+				if (p != null)
+					rez = !p.matcher(file.getName()).matches();
+				if (!showHidden)
+					rez = rez & !file.isHidden();
+//				if (!showFolder)
+//					rez = rez & !file.isDirectory();
+				return rez;
+			}
+		});
+		
+		if (kids != null) {
+			java.util.Arrays.sort(kids);
+		}
+		
+		return kids == null ? new Object[0] : kids;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+	 */
+	@Override
+	public Object[] getElements(Object element) {
+		return getChildren(element);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+	 */
+	@Override
+	public boolean hasChildren(Object element) {
+		return getChildren(element).length > 0;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+	 */
+	@Override
+	public Object getParent(Object element) {
+		if (element instanceof File)
+			return ((File) element).getParentFile();
+		System.out.println(Messages.FileTreeContentProvider_3+element+Messages.FileTreeContentProvider_4);
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	public void inputChanged(Viewer viewer, Object old_input, Object new_input) {
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/FileTreeContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroContentProvider.java	(revision 324)
@@ -0,0 +1,71 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.fileexplorer;
+
+import java.io.File;
+import java.io.FileFilter;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class FileTreeContentProvider.
+ */
+public class MacroContentProvider extends FileTreeContentProvider {
+
+	boolean showAllGroovyFiles = false;
+	
+	public MacroContentProvider(boolean showAllGroovyFiles) {
+		super();
+		this.showAllGroovyFiles = showAllGroovyFiles;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+	 */
+	@Override
+	public Object[] getChildren(Object element) {
+		
+		Object[] kids = ((File) element).listFiles(new FileFilter() {	
+			@Override
+			public boolean accept(File file) {
+				if (file.isDirectory()) return true;
+				if (file.isHidden()) return false;
+				if (showAllGroovyFiles) return file.getName().endsWith(".groovy"); //$NON-NLS-1$
+				
+				return file.getName().endsWith("Macro.groovy"); //$NON-NLS-1$
+			}
+		});
+		
+		if (kids != null) {
+			java.util.Arrays.sort(kids);
+		}
+		
+		return kids == null ? new Object[0] : kids;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/FileTreeLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/FileTreeLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/FileTreeLabelProvider.java	(revision 324)
@@ -0,0 +1,78 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.fileexplorer;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class FileTreeLabelProvider.
+ */
+public class FileTreeLabelProvider extends LabelProvider {
+	
+	/** The image table. */
+	private Map<ImageDescriptor, Image> imageTable = new HashMap<ImageDescriptor, Image>(
+			7);
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+	 */
+	@Override
+	public String getText(Object element) {
+		return ((File) element).getName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+	 */
+	@Override
+	public final Image getImage(Object element) {
+		File f = ((File) element);
+		ImageDescriptor imageDescriptor = AbstractUIPlugin
+				.imageDescriptorFromPlugin(Application.PLUGIN_ID,
+						IImageKeys.FILE);
+		if (f.isDirectory())
+			imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+					Application.PLUGIN_ID, IImageKeys.FOLDER);
+		Image image = imageTable.get(imageDescriptor);
+		if (image == null) {
+			image = imageDescriptor.createImage();
+			imageTable.put(imageDescriptor, image);
+		}
+		return image;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/FileTreeLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroTreeLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroTreeLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroTreeLabelProvider.java	(revision 324)
@@ -0,0 +1,85 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.fileexplorer;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class FileTreeLabelProvider.
+ */
+public class MacroTreeLabelProvider extends LabelProvider {
+	
+	/** The image table. */
+	private Map<ImageDescriptor, Image> imageTable = new HashMap<ImageDescriptor, Image>(7);
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+	 */
+	@Override
+	public String getText(Object element) {
+		File f = (File) element;
+		String name = f.getName();
+		if (f.isDirectory()) {
+			return name;
+		} else {
+			int idx = name.indexOf("Macro.groovy"); //$NON-NLS-1$
+			if (idx > 0) return name.substring(0, idx);
+			return name;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+	 */
+	@Override
+	public final Image getImage(Object element) {
+		File f = ((File) element);
+		ImageDescriptor imageDescriptor = AbstractUIPlugin
+				.imageDescriptorFromPlugin(Application.PLUGIN_ID,
+						IImageKeys.SCRIPT);
+		if (f.isDirectory())
+			imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+					Application.PLUGIN_ID, IImageKeys.FOLDER);
+		Image image = imageTable.get(imageDescriptor);
+		if (image == null) {
+			image = imageDescriptor.createImage();
+			imageTable.put(imageDescriptor, image);
+		}
+		return image;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroTreeLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Simple file explorer</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/Explorer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/Explorer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/Explorer.java	(revision 324)
@@ -0,0 +1,371 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.fileexplorer;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.CopyFile;
+import org.txm.rcp.commands.CutFile;
+import org.txm.rcp.commands.DeleteFile;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.commands.OpenGraph;
+import org.txm.rcp.commands.PasteFile;
+import org.txm.rcp.commands.RenameFile;
+// TODO: Auto-generated Javadoc
+/**
+ * Simple file explorer @ author mdecorde.
+ */
+public class Explorer extends ViewPart {
+
+	/** The ID. */
+	static public String ID = "org.txm.rcp.views.fileexplorer.Explorer"; //$NON-NLS-1$
+
+	/** Initialize currentPath with user home directory */
+	private String currentPath = System.getProperty("user.home");//Toolbox.getParam(TBXPreferences.USER_TXM_HOME);  //$NON-NLS-1$
+
+	/** The tv. */
+	TreeViewer tv;
+
+	/** The address. */
+	Text address;
+
+	/**
+	 * Instantiates a new explorer.
+	 */
+	public Explorer() {
+
+	}
+
+	/**
+	 * Refresh.
+	 */
+	public static void refresh()
+	{
+		Explorer explorerView = (Explorer) PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage().findView(
+						Explorer.ID);
+
+		explorerView.tv.refresh();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+
+		FormLayout formLayout = new FormLayout();
+		formLayout.marginWidth = 0;
+		formLayout.marginHeight = 0;
+		parent.setLayout(formLayout);
+
+		// controles composite
+		Composite controls = new Composite(parent, SWT.NONE);
+
+		FormData controlsData = new FormData();
+		controlsData.top = new FormAttachment(0);
+		controlsData.left = new FormAttachment(0);
+		controlsData.right = new FormAttachment(100);
+		controls.setLayoutData(controlsData);
+
+		FormLayout controlsLayout = new FormLayout();
+		controlsLayout.marginWidth = 0;
+		controlsLayout.marginHeight = 0;
+		controls.setLayout(controlsLayout);
+
+		// its widgets
+		Button go_up = new Button(controls, SWT.NONE);
+		go_up.setText(Messages.Explorer_4);
+		go_up.setToolTipText(Messages.Explorer_1);
+		go_up.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				File f = new File(address.getText()).getParentFile();
+				if (f.exists() && f.isDirectory()) {
+					setRoot(f);
+				}
+			}
+		});
+
+		address = new Text(controls, SWT.BORDER);
+		if (currentPath == null)
+			currentPath = "/"; //$NON-NLS-1$
+		address.setText(currentPath);
+		address.setToolTipText(Messages.Explorer_2);
+		address.addKeyListener(new KeyAdapter() {
+			@Override
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.CR) {
+					File f = new File(address.getText());
+					if (f.exists() && f.isDirectory()) {
+						setRoot(f);
+					}
+				}
+			}
+		});
+
+		Button go = new Button(controls, SWT.NONE);
+		go.setText(Messages.Explorer_5);
+		go.setToolTipText(Messages.Explorer_6);
+		go.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				File f = new File(address.getText());
+				if (f.exists() && f.isDirectory()) {
+					setRoot(f);
+				}
+			}
+		});
+		
+		Button homeBtn = new Button(controls, SWT.NONE);
+		homeBtn.setText(Messages.Explorer_7);
+		homeBtn.setToolTipText(Messages.Explorer_8);
+		homeBtn.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				currentPath = System.getProperty("user.home"); //$NON-NLS-1$
+				setRoot(currentPath); 
+			}
+		});
+
+		// set positions & sizes
+		FormData widgetData = new FormData();
+		widgetData.left = new FormAttachment(0);
+		go_up.setLayoutData(widgetData);
+		widgetData = new FormData();
+		widgetData.top = new FormAttachment(0);
+		widgetData.bottom = new FormAttachment(100);
+		widgetData.left = new FormAttachment(go_up, 0);
+		widgetData.right = new FormAttachment(go, 0);
+		address.setLayoutData(widgetData);
+		widgetData = new FormData();
+		widgetData.right = new FormAttachment(homeBtn, 0);
+		go.setLayoutData(widgetData);
+		widgetData = new FormData();
+		widgetData.right = new FormAttachment(100);
+		homeBtn.setLayoutData(widgetData);
+
+		// the explorer
+		tv = new TreeViewer(parent);
+		tv.setContentProvider(new FileTreeContentProvider());
+		tv.setLabelProvider(new FileTreeLabelProvider());
+		tv.setInput(new File(currentPath));
+
+		FormData tvData = new FormData();
+		tvData.top = new FormAttachment(controls, 0);
+		tvData.bottom = new FormAttachment(100);
+		tvData.left = new FormAttachment(0);
+		tvData.right = new FormAttachment(100);
+		tv.getTree().setLayoutData(tvData);
+
+		tv.addDoubleClickListener(new IDoubleClickListener() {
+			@Override
+			public void doubleClick(DoubleClickEvent event) {
+				TreeSelection selection = (TreeSelection) tv.getSelection();
+				File selectedItem = (File) selection.getFirstElement();
+				if (!selectedItem.isDirectory()) {
+					if (selectedItem.getName().endsWith("html")) //$NON-NLS-1$
+					{
+						OpenBrowser.openfile(selectedItem.getAbsolutePath());
+					} 
+					else if (selectedItem.getName().endsWith("svg")) //$NON-NLS-1$
+					{
+						OpenGraph.OpenFile(selectedItem.getAbsolutePath());
+					}
+					else
+						EditFile.openfile(selectedItem.getAbsolutePath());
+				} else {
+					changeState(selection);
+				}
+			}
+		});
+
+		tv.getTree().addKeyListener(new KeyListener() {
+
+			@Override
+			public void keyReleased(KeyEvent e) {
+				// TODO Auto-generated method stub
+
+			}
+
+			@Override
+			public void keyPressed(KeyEvent e) {
+				ISelection sel = tv.getSelection();
+				if (sel instanceof IStructuredSelection) {
+					List objects = ((IStructuredSelection)sel).toList();
+					if (e.keyCode == SWT.DEL) {
+						DeleteFile.delete(objects);
+					} else if (e.keyCode == SWT.F5) {
+						Explorer.refresh();
+					} else {
+						for (Object o : objects) {
+							//Object o = ((IStructuredSelection)sel).getFirstElement();
+							if (o instanceof File) {
+								File file = (File) o;
+								if (e.keyCode == SWT.DEL) {
+									DeleteFile.delete(file);
+								} else if ((char)e.keyCode == 'c' & ((e.stateMask & SWT.CTRL) != 0)) {
+									CopyFile.copy(file);
+								} else if ((char)e.keyCode == 'x' & ((e.stateMask & SWT.CTRL) != 0)) {
+									CutFile.cut(file);
+								} else if ((char)e.keyCode == 'v' & ((e.stateMask & SWT.CTRL) != 0)) {
+									if (file.isFile()) file = file.getParentFile();
+									PasteFile.paste(file);
+								} else if (e.keyCode == SWT.F2) {
+									RenameFile.rename(file);
+								}
+							}
+						}
+					}
+					tv.refresh();
+				}
+			}
+		});
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tv.getTree());
+
+		// Set the MenuManager
+		tv.getTree().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tv);
+		// Make the selection available
+		getSite().setSelectionProvider(tv);
+	}
+
+	/**
+	 * Can delete.
+	 *
+	 * @param selectedItem the selected item
+	 * @return true, if successful
+	 */
+	protected boolean CanDelete(File selectedItem) {
+		File txmhome = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME));
+		File scripts = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "scripts"); //$NON-NLS-1$
+		File corpora = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "corpora"); //$NON-NLS-1$
+		//File registry = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "registry"); //$NON-NLS-1$
+		File workspaces = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "workspaces"); //$NON-NLS-1$
+		File xsl = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "xsl"); //$NON-NLS-1$
+		File samples = new File(Toolbox.getParam(TBXPreferences.USER_TXM_HOME), "samples"); //$NON-NLS-1$
+		if (selectedItem.equals(txmhome) || 
+				selectedItem.equals(txmhome) ||
+				selectedItem.equals(scripts) ||
+				selectedItem.equals(corpora) ||
+				//selectedItem.equals(registry) ||
+				selectedItem.equals(workspaces) ||
+				selectedItem.equals(samples) ||
+				selectedItem.equals(xsl))
+		{
+			System.out.println(NLS.bind(Messages.Explorer_0, selectedItem));
+			return false;
+		}
+		return false;
+	}
+
+	/**
+	 * Change state.
+	 *
+	 * @param selection the selection
+	 */
+	protected void changeState(TreeSelection selection) {
+		TreeItem[] items = tv.getTree().getSelection();
+		for (TreeItem item : items) {
+			if (item.getExpanded())
+			{
+				item.setExpanded(false);	
+			}
+			else
+			{
+				item.setExpanded(true);
+			}
+			tv.refresh();
+		}	
+	}
+
+	/**
+	 * Sets the root.
+	 *
+	 * @param home the new root
+	 */
+	public void setRoot(String home) {
+		this.currentPath = home;
+		address.setText(home);
+		tv.setInput(new File(home));
+		tv.refresh();
+	}
+
+	/**
+	 * Sets the root.
+	 *
+	 * @param f the new root
+	 */
+	public void setRoot(File f) {
+		this.currentPath = f.getAbsolutePath();
+		address.setText(currentPath);
+		tv.setInput(new File(currentPath));
+		tv.refresh();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/Explorer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/TXMResultLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/TXMResultLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/TXMResultLabelProvider.java	(revision 324)
@@ -0,0 +1,117 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.corpora;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Label provider of the corpus view
+ *  
+ * @author mdecorde.
+ */
+public class TXMResultLabelProvider extends LabelProvider {
+
+	/** The image table. */
+	private Map<ImageDescriptor, Image> imageTable = 
+			new HashMap<ImageDescriptor, Image>();
+
+	/**
+	 * Gets the adapter.
+	 *
+	 * @param element the element
+	 * @return the adapter
+	 */
+	protected final IWorkbenchAdapter getAdapter(Object element) {
+		IWorkbenchAdapter adapter = null;
+		if (element instanceof IAdaptable)
+			adapter = (IWorkbenchAdapter) ((IAdaptable) element)
+					.getAdapter(IWorkbenchAdapter.class);
+		if (adapter == null)
+			adapter = (IWorkbenchAdapter) Platform.getAdapterManager()
+					.loadAdapter(element, IWorkbenchAdapter.class.getName());
+		return adapter;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+	 */
+	@Override
+	public final Image getImage(Object element) {
+		IWorkbenchAdapter adapter = getAdapter(element);
+		if (adapter == null) {
+			return null;
+		}
+		ImageDescriptor descriptor = adapter.getImageDescriptor(element);
+		if (descriptor == null) {
+			return null;
+		}
+		Image image = imageTable.get(descriptor);
+		if (image == null) {
+			image = descriptor.createImage();
+			imageTable.put(descriptor, image);
+		}
+		
+		return image;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+	 */
+	@Override
+	public final String getText(Object element) {
+		IWorkbenchAdapter adapter = getAdapter(element);
+		if (adapter == null) {
+			return ""; //$NON-NLS-1$
+		}
+		return adapter.getLabel(element);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.BaseLabelProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+		if (imageTable != null) {
+			for (Iterator<Image> i = imageTable.values().iterator(); i
+					.hasNext();) {
+				i.next().dispose();
+			}
+			imageTable = null;
+		}
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/TXMResultLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/TXMResultContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/TXMResultContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/TXMResultContentProvider.java	(revision 324)
@@ -0,0 +1,154 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.corpora;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+import org.txm.objects.Base;
+import org.txm.objects.Project;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+
+/**
+ * Content provider of the Corpus view
+ *  
+ * @author mdecorde.
+ */
+public class TXMResultContentProvider implements ITreeContentProvider {
+	
+	/**
+	 * Gets the adapter.
+	 *
+	 * @param element the element
+	 * @return the adapter
+	 */
+	protected IWorkbenchAdapter getAdapter(Object element) {
+		IWorkbenchAdapter adapter = null;
+		if (element instanceof IAdaptable)
+			adapter = (IWorkbenchAdapter) ((IAdaptable) element)
+					.getAdapter(IWorkbenchAdapter.class);
+		if (element != null && adapter == null)
+			adapter = (IWorkbenchAdapter) Platform.getAdapterManager()
+					.loadAdapter(element, IWorkbenchAdapter.class.getName());
+		return adapter;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+	 */
+	@Override
+	public Object[] getChildren(Object element) {
+
+		IWorkbenchAdapter adapter = getAdapter(element);
+		if (adapter != null) {
+			Object[] children = adapter.getChildren(element);
+			
+			// FIXME: sort here the TXM result according to current sorting preference order, eg. getWeight(), getDate(), getName(), getClass()
+			
+//			Arrays.sort(children, new Comparator<Object>() {
+//				@Override
+//				public int compare(Object o1, Object o2) {
+//					if (o1 == null) return -1;
+//					if (o2 == null) return 1;
+//					return o1.toString().compareTo(o2.toString());
+//				}
+//			});
+			return children;
+		}
+		return new Object[0];
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+	 */
+	@Override
+	public Object[] getElements(Object element) {
+		if (element instanceof Project) {
+			ArrayList<MainCorpus> elements = new ArrayList<MainCorpus>();
+			Project p = (Project) element;
+			
+			for (Base b : p.getBases()) {
+				elements.addAll(b.getCorpora().values());
+			}
+			//System.out.println("get elements: "+elements);
+			Collections.sort(elements, new Comparator<MainCorpus>() {
+				
+				@Override
+				public int compare(MainCorpus o1, MainCorpus o2) {
+					if (o1 == null) return -1;
+					if (o2 == null) return 1;
+					return o1.getName().compareTo(o2.getName());
+				}
+			});
+			return elements.toArray();
+		}
+		return new Object[0];
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+	 */
+	@Override
+	public Object getParent(Object element) {
+		IWorkbenchAdapter adapter = getAdapter(element);
+		if (adapter != null) {
+			return adapter.getParent(element);
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+	 */
+	@Override
+	public boolean hasChildren(Object element) {
+		int n = getChildren(element).length;
+		return n > 0;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/TXMResultContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java	(revision 324)
@@ -0,0 +1,635 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.views.corpora;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.internal.Workbench;
+import org.eclipse.ui.part.ViewPart;
+import org.txm.Toolbox;
+import org.txm.ca.core.functions.CA;
+import org.txm.cah.core.functions.CAH;
+import org.txm.cooccurrence.core.functions.Cooccurrence;
+import org.txm.core.results.ITXMResult;
+import org.txm.core.results.TXMResult;
+import org.txm.functions.Function;
+import org.txm.functions.concordances.Concordance;
+import org.txm.functions.internal.InternalView;
+//import org.txm.functions.queryindex.QueryIndex;
+import org.txm.functions.referencer.Referencer;
+import org.txm.index.core.functions.Index;
+import org.txm.index.rcp.editors.IndexEditorInput;
+import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
+import org.txm.objects.Project;
+import org.txm.objects.Workspace;
+import org.txm.rcp.editors.TXMEditorPart;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.commands.base.DeleteObject;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.rcp.editors.input.InternalViewEditorInput;
+import org.txm.rcp.editors.input.ReferencerEditorInput;
+import org.txm.rcp.editors.internal.InternalViewEditor;
+import org.txm.rcp.utils.JobHandler;
+//import org.txm.rcp.editors.input.QueryIndexEditorInput;
+//import org.txm.rcp.editors.queryindex.QueryIndexEditor;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.specificities.core.functions.SpecificitesResult;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * This sample class demonstrates how to plug-in a new workbench view. The view
+ * shows data obtained from the model. The sample creates a dummy model on the
+ * fly, but a real implementation would connect to the model available either in
+ * this or another plug-in (e.g. the workspace). The view is connected to the
+ * model using a content provider.
+ * <p>
+ * The view uses a label provider to define how model objects should be
+ * presented in the view. Each view can present the same model objects using
+ * different labels and icons, if needed. Alternatively, a single label provider
+ * can be shared between views in order to ensure that objects of the same type
+ * are presented in the same way everywhere.
+ * <p>
+ */
+public class CorporaView extends ViewPart {
+
+	/** The ID. */
+	static public String ID = "org.txm.rcp.views.CorporaView"; //$NON-NLS-1$
+
+	/** The tree viewer. */
+	public TreeViewer treeViewer;
+
+	/** The self. */
+	private static CorporaView self;
+
+	/**
+	 * Gets the single instance of CorporaView.
+	 *
+	 * @return single instance of CorporaView
+	 */
+	public static CorporaView getInstance()
+	{
+		if (self == null) {
+			IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+			if (window == null) return null;
+			IWorkbenchPage page = window.getActivePage();
+			if (page == null) return null;
+			CorporaView corporaView = (CorporaView) page.findView(CorporaView.ID);
+			self = corporaView;
+		}
+		return self;
+	}
+
+	public TreeViewer getTreeViewer() {
+		return treeViewer;
+	}
+
+
+	/**
+	 * Reload.
+	 */
+	public static void reload() {
+		CorporaView corporaView = getInstance();
+		if (corporaView != null)
+			corporaView._reload();
+	}
+
+	/**
+	 * _reload.
+	 */
+	public void _reload() {
+		if (Toolbox.isInitialized()) {
+			treeViewer.setContentProvider(new TXMResultContentProvider());
+			//treeViewer.setLabelProvider(new TextometrieLabelProvider());
+			treeViewer.setLabelProvider(
+					new DecoratingLabelProvider(new TXMResultLabelProvider(),
+							PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
+			Workspace w = Toolbox.workspace;
+			if (w == null) return;
+			Project p = w.getProject("default"); //$NON-NLS-1$
+			if( p == null) return;
+			treeViewer.setInput(p);
+			treeViewer.refresh();
+		}
+	}
+
+	/**
+	 * This is a callback that will allow us to create the viewer and initialize
+	 * it.
+	 *
+	 * @param parent the parent
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		treeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(
+				treeViewer.getControl(), Messages.CorporaView_0);
+		getSite().setSelectionProvider(treeViewer);
+		treeViewer.setContentProvider(new TXMResultContentProvider());
+		//treeViewer.setLabelProvider(new TextometrieLabelProvider());
+		treeViewer.setLabelProvider(
+				new DecoratingLabelProvider(new TXMResultLabelProvider(),
+						PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
+		if (Toolbox.isInitialized()) {
+			Workspace w = null;
+			while (w == null) {
+				try {
+					Thread.sleep(100);
+				} catch (InterruptedException e1) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
+				}
+				w = Toolbox.workspace;
+				if (w == null) continue; else break;//return;
+			}
+			Project p = w.getProject("default"); //$NON-NLS-1$
+			if( p == null) return;
+			treeViewer.setInput(p);
+		}
+		//PlatformUI.getWorkbench().getHelpSystem().setHelp(treeViewer.getTree(), "org.txm.rcp.corporaView" //$NON-NLS-1$);
+
+		treeViewer.getTree().addSelectionListener(new SelectionListener() {
+			
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				TreeItem[] sel = treeViewer.getTree().getSelection();
+				if (sel.length == 0)
+					return;
+
+				ISelection tsel = treeViewer.getSelection();
+				if (!(tsel instanceof TreeSelection)) return;
+
+				TreeSelection selection = (TreeSelection) treeViewer.getSelection();
+				Object selectedItem = selection.getFirstElement();
+				
+				// FIXME: define here what to display
+				if (selectedItem instanceof ITXMResult) {
+					StatusLine.setMessage(((TXMResult)selectedItem).getName());
+
+					// FIXME: Debug:
+					System.err.println("CorporaView.createPartControl(...).new SelectionListener() {...}.widgetSelected(): selected object = " + selectedItem);
+					System.err.println("CorporaView.createPartControl(...).new SelectionListener() {...}.widgetSelected(): selection full path name = " + ((ITXMResult)selectedItem).getFullPathSimpleName() + " - " + ((ITXMResult)selectedItem).getName());
+					System.err.println("CorporaView.createPartControl(...).new SelectionListener() {...}.widgetSelected(): direct children count = " + ((ITXMResult)selectedItem).getResults().size());
+					System.err.println("CorporaView.createPartControl(...).new SelectionListener() {...}.widgetSelected(): direct visible children count = " + ((ITXMResult)selectedItem).getResults(true).size());
+					
+				
+				//TODO : add more status message on clicked objects of corpora view
+				} else if (selectedItem instanceof Corpus) {
+					try {
+						StatusLine.setMessage(((Corpus)selectedItem).getName()+ ", T = "+((Corpus)selectedItem).getSize()); //$NON-NLS-1$
+					} catch (CqiClientException e1) {
+						Log.severe(NLS.bind(Messages.CorporaView_2, ((Corpus)selectedItem).getName()));
+						StatusLine.setMessage(((Corpus)selectedItem).getName()+ " is not ready"); //$NON-NLS-1$
+					}
+				} else if (selectedItem instanceof Partition) {
+					StatusLine.setMessage(((Partition)selectedItem).getName() + ": "+((Partition)selectedItem).getNPart()); //$NON-NLS-1$
+				} else if (selectedItem instanceof Concordance) {
+					StatusLine.setMessage(((Concordance)selectedItem).getName());
+				} else if (selectedItem instanceof Cooccurrence) {
+					StatusLine.setMessage(((Cooccurrence)selectedItem).getName());
+//				} else if (selectedItem instanceof Index) {
+//					StatusLine.setMessage(((Index)selectedItem).getName());
+				} else if (selectedItem instanceof CA) {
+					StatusLine.setMessage(((CA)selectedItem).getName());
+				} else if (selectedItem instanceof CAH) {
+					StatusLine.setMessage(((CAH)selectedItem).getName());
+				} else if (selectedItem instanceof SpecificitesResult) {
+					StatusLine.setMessage(((SpecificitesResult)selectedItem).getName());
+				} else if (selectedItem instanceof InternalView) {
+					StatusLine.setMessage(((InternalView)selectedItem).getDetails());
+					//				} else if (selectedItem instanceof QueryIndex) {
+					//					StatusLine.setMessage(((QueryIndex)selectedItem).getName());
+				
+				
+				} else {
+					StatusLine.setMessage(selectedItem.toString());
+				}
+
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				// TODO Auto-generated method stub
+				
+			}
+		});
+		
+			treeViewer.addDoubleClickListener(new IDoubleClickListener() {
+				@Override
+				public void doubleClick(DoubleClickEvent event) {
+					TreeSelection selection = (TreeSelection) treeViewer.getSelection();
+					Object selectedItem = selection.getFirstElement();
+	
+					if (isAlreadyOpened(selectedItem))
+						return;
+					// System.out.println("Selected item "+selectedItem.getClass());
+					if (selectedItem instanceof Concordance) {
+						Concordance concordance = (Concordance) selectedItem;
+						IEditorInput editorInput = new ConcordancesEditorInput(
+								concordance.getCorpus(), concordance);
+						IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
+						try {
+							page.openEditor(editorInput,
+									"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
+						} catch (PartInitException e) {
+							System.err.println(Messages.CorporaView_3+ e);
+						}
+//				} else if (selectedItem instanceof Lexicon) {
+//					Lexicon lex = (Lexicon) selectedItem;
+//					final Index index = new Index(lex.getCorpus(), lex.getProperty());
+//
+//					IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
+//					IndexEditorInput editorInput = new IndexEditorInput(index);
+//					try {
+//						page.openEditor(editorInput,
+//								"org.txm.rcp.editors.dictionnary.DictionnaryEditor"); //$NON-NLS-1$
+//					} catch (Exception e) {
+//						// TODO Auto-generated catch block
+//						org.txm.rcp.utils.Logger.printStackTrace(e);
+//					} 
+//				} else if (selectedItem instanceof Index) {
+//					Index voc = (Index) selectedItem;
+//					IndexEditorInput editorInput = new IndexEditorInput(voc);
+//					IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
+//					try {
+//						IndexEditor editor = (IndexEditor) page
+//								.openEditor(editorInput,
+//										"org.txm.rcp.editors.index.IndexEditor"); //$NON-NLS-1$
+//						//editor.initializeFields();
+//					} catch (PartInitException e) {
+//						System.err.println(Messages.CorporaView_7+ e);
+//					}
+//					//				} else if (selectedItem instanceof QueryIndex) {
+//					//					QueryIndex qindex = (QueryIndex) selectedItem;
+//					//					QueryIndexEditorInput editorInput = new QueryIndexEditorInput(qindex);
+//					//					IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
+//					//					try {
+//					//						QueryIndexEditor editor = (QueryIndexEditor) page
+//					//								.openEditor(editorInput,QueryIndexEditor.ID);
+//					//						editor.initializeFields();
+//					//					} catch (PartInitException e) {
+//					//						System.err.println(Messages.CorporaView_7+ e);
+//					//					}
+//
+				} else if (selectedItem instanceof Referencer) {
+
+					Referencer ref = (Referencer) selectedItem;
+					ReferencerEditorInput editorInput = new ReferencerEditorInput(ref.getCorpus(), ref);
+
+					try {
+						IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
+						page.openEditor(editorInput,"org.txm.rcp.editors.referencer.ReferencerEditor"); //$NON-NLS-1$
+
+					} catch (PartInitException e) {
+						System.err.println(Messages.CorporaView_6+ e);
+					}
+				} else if (selectedItem instanceof InternalView) {
+
+					InternalView ref = (InternalView) selectedItem;
+					InternalViewEditorInput editorInput = new InternalViewEditorInput(ref.getCorpus(), ref);
+
+					try {
+						IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();
+						page.openEditor(editorInput,InternalViewEditor.ID); 
+
+					} catch (PartInitException e) {
+						System.err.println(Messages.CorporaView_6+ e);
+					}
+				} else if (selectedItem instanceof Function) {
+					((Function)selectedItem).openEditor();
+				}
+			}
+		});
+
+		treeViewer.getTree().addKeyListener(new KeyAdapter() {
+			@Override
+			public void keyPressed(KeyEvent arg0) {
+				if (arg0.keyCode == SWT.DEL) {
+					final ISelection sel = treeViewer.getSelection();
+					if (sel instanceof IStructuredSelection) {
+						if (!DeleteObject.askContinueToDelete((IStructuredSelection)sel)) return;
+						JobHandler job = new JobHandler("Deleting", true) {
+
+							@Override
+							protected IStatus run(IProgressMonitor monitor) {
+								DeleteObject.delete(sel);
+								return Status.OK_STATUS;
+							}
+						};
+						job.schedule();
+						try {
+							job.join();
+						} catch (InterruptedException e) {
+							e.printStackTrace();
+						}
+					}
+
+				}
+			}
+		});
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(treeViewer.getTree());
+
+		// Set the MenuManager
+		treeViewer.getTree().setMenu(menu);
+		getSite().registerContextMenu(menuManager, treeViewer);
+		// Make the selection available
+		getSite().setSelectionProvider(treeViewer);
+	}
+
+	/**
+	 * Show the editor which uses the Object.
+	 *
+	 * @param o the o
+	 * @return true if an editor uses the object
+	 */
+	@Deprecated
+	// FIXME: uses TXMEditor.getResult() in the tests, plus the test is normally done by the UI service so this method should be useless
+	public boolean isAlreadyOpened(Object o) {
+		if (o != null) {
+			for(IWorkbenchPage page : getPages()) {
+				for (IEditorReference editorref : page.getEditorReferences()) {
+					IEditorPart editor = editorref.getEditor(false);
+					if (editor instanceof CustomizableEditor) {	
+						Object source = ((CustomizableEditor)editor).getSource();
+						if (source != null && source.equals(o))
+							return activateEditor(editor);
+					}
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Gets the pages.
+	 *
+	 * @return the pages
+	 */
+	private static IWorkbenchPage[] getPages()
+	{
+		for(IWorkbenchWindow win : Workbench.getInstance().getWorkbenchWindows())
+		{
+			return win.getPages();
+		}
+		return new IWorkbenchPage[0];
+	}
+
+	/**
+	 * Activate editor.
+	 *
+	 * @param editor the editor
+	 * @return true, if successful
+	 */
+	private boolean activateEditor(IEditorPart editor)
+	{
+		IWorkbenchPage attachedPage = editor.getEditorSite().getPage();
+		attachedPage.activate(editor);
+		return true;
+	}
+
+	/**
+	 * Passing the focus request to the viewer's control.
+	 */
+	@Override
+	public void setFocus() {
+		treeViewer.getControl().setFocus();
+	}
+
+	public static Object getSelection() {
+		CorporaView corporaView = getInstance();
+		if (corporaView != null) {
+			ISelection selection = corporaView.treeViewer.getSelection();
+			if (selection != null
+					& selection instanceof IStructuredSelection) {
+				return ((IStructuredSelection)selection).getFirstElement();
+			}
+		}
+		return null;
+	}
+
+	public static List<?> getSelections() {
+		CorporaView corporaView = getInstance();
+		if (corporaView != null) {
+			ISelection selection = corporaView.treeViewer.getSelection();
+			if (selection != null
+					& selection instanceof IStructuredSelection) {
+				return ((IStructuredSelection)selection).toList();
+			}
+		}
+		return null;
+	}
+
+
+	public static void select(List<MainCorpus> values) {
+		CorporaView corporaView = openView();
+		if (corporaView != null) {
+			StructuredSelection selection = new StructuredSelection(values);
+			corporaView.getTreeViewer().setSelection(selection, true);
+			corporaView.getTreeViewer().reveal(values); // to be sure
+		}
+	}
+
+	/**
+	 * Opens the Corpora view if not already opened.
+	 * @return
+	 */
+	public static CorporaView openView() {
+		// open Unit View if not opened
+		try {
+			IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+			CorporaView view = (CorporaView) page.findView(CorporaView.ID);
+			if (view == null) {
+				view = (CorporaView) page.showView(CorporaView.ID);
+			}
+			if (view == null) {
+				System.out.println("Error Unite view not found: "+CorporaView.ID);
+			}
+			return view;
+		} catch (PartInitException e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+		return null;
+	}
+
+	/**
+	 * Stores the result of textometric computation in the specified corpus, refreshes the view and expands the Corpus tree node.
+	 * @param corpus
+	 * @param result
+	 */
+	@Deprecated
+	public static void storeResult(final Corpus corpus, ITXMResult result)	{
+		//corpus.addResult(result);
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				CorporaView.refreshObject(corpus);
+				//CorporaView.expand(corpus);
+			}
+		});
+
+	}
+	
+	/**
+	 * Refresh the tree view.
+	 */
+	public static void refresh() {
+		CorporaView corporaView = getInstance();
+		if (corporaView != null) {
+			corporaView.treeViewer.refresh();
+			//corporaView.treeViewer.expandAll();
+		}
+	}
+
+	/**
+	 * Refresh.
+	 *
+	 * @param corporaView the corpora view
+	 */
+	public static void refresh(CorporaView corporaView) {
+		corporaView.treeViewer.refresh();
+	}
+
+
+
+	/**
+	 * Refreshes the specified result node in the tree view.
+	 * @param result
+	 */
+	public static void refreshObject(final ITXMResult result) {
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+
+				//FIXME: Debug
+				System.err.println("CorporaView.refreshObject(...).new Runnable() {...}.run(): refreshing node " + result);
+				System.err.println("CorporaView.refreshObject(...).new Runnable() {...}.run(): direct parent " + result.getParent());
+				System.err.println("CorporaView.refreshObject(...).new Runnable() {...}.run(): path " + result.getFullPathSimpleName());
+
+				CorporaView corporaView = getInstance();
+				corporaView.treeViewer.refresh(); // FIXME: without that the refresh sometimes doesn't work, need to investigate
+				corporaView.treeViewer.refresh(result);
+
+				try {
+					CorporaView.expand(result.getParent());
+				}
+				catch(NullPointerException e) {
+				}
+			}
+		});
+	}
+	
+	/**
+	 * Refreshes the specified result node in the tree view, also synchronizes the TXMResult and the TXMEditorPart (as the editor part name from the result name, for example).
+	 * @param editor
+	 */
+	public static void refreshObject(TXMEditorPart editor) {
+		refreshObject(editor.getResultData());
+	}
+	
+	/**
+	 * Expands the specified tree node.
+	 * @param obj
+	 */
+	public static void expand(Object obj)	{
+		final CorporaView corporaView = getInstance();
+		if (obj != null)
+			corporaView.treeViewer.expandToLevel(obj, 1);
+	}
+
+	
+	
+	/**
+	 * Adds a double click listener to the tree view for the specified result data type and executing the command specified by its ID which must be equal to its class simple name
+	 * (eg. to do the link, the command ID must be "ComputeCA" for an handler class named "ComputeCA.java").
+	 * @param resultDataClass
+	 * @param commandClass
+	 */
+	public static void addDoubleClickListener(final Class resultDataClass, final Class commandClass)	{
+		
+		final CorporaView view = CorporaView.getInstance();
+		
+		view.treeViewer.addDoubleClickListener(new IDoubleClickListener() {
+			@Override
+			public void doubleClick(DoubleClickEvent event) {
+				TreeSelection selection = (TreeSelection) view.treeViewer.getSelection();
+				Object selectedItem = selection.getFirstElement();
+				
+				if (resultDataClass.isInstance(selectedItem)) {
+					IHandlerService handlerService = (IHandlerService) view.getSite().getService(IHandlerService.class);
+					try {
+						handlerService.executeCommand(commandClass.getSimpleName(), null);
+					}
+					catch (Exception e) {
+						e.printStackTrace();
+					}
+				} 
+			}
+		});
+		
+	}
+	
+	
+	
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java	(revision 323)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java	(revision 324)
@@ -2,7 +2,7 @@
 
 import org.eclipse.core.commands.AbstractHandler;
 import org.txm.Toolbox;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.statsengine.r.core.RStatsEngine;
 import org.txm.statsengine.r.core.messages.RCoreMessages;
 import org.txm.utils.logger.Log;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/CloneTXMResult.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/CloneTXMResult.java	(revision 323)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/CloneTXMResult.java	(revision 324)
@@ -33,7 +33,7 @@
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.core.results.TXMResult;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.views.corpora.CorporaView;
 
 /**
  * Clone the selected TXM result node.
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/SaveBeforeExecutionDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/SaveBeforeExecutionDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/SaveBeforeExecutionDialog.java	(revision 324)
@@ -0,0 +1,86 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.actions;
+
+import java.io.File;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+// TODO: Auto-generated Javadoc
+/**
+ * Allow the user to choose : the type of the graphic the structural units,
+ * property and values to be shown the queries of each curves.
+ *
+ * @author mdecorde
+ */
+public class SaveBeforeExecutionDialog extends Dialog {
+
+	private File script;
+
+	/**
+	 * Instantiates a new progression dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param corpus the corpus
+	 */
+	public SaveBeforeExecutionDialog(Shell parentShell, File script) {
+		super(parentShell);
+		this.script = script;
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(org.txm.rcp.Messages.SaveBeforeExecutionDialog_0);
+		newShell.setMinimumSize(300, 460);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite p) {
+		
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		super.okPressed();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/SaveBeforeExecutionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/___DeleteInCorporaView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/___DeleteInCorporaView.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/___DeleteInCorporaView.java	(revision 324)
@@ -0,0 +1,117 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.Subcorpus;
+// TODO: Auto-generated Javadoc
+/**
+ * This class manage the deletion of nodes in the tree of the corpora view.
+ *
+ * @author jmague
+ */
+//FIXME: this class is not used anymore?
+public class ___DeleteInCorporaView extends Action implements ISelectionListener,
+		IWorkbenchAction {
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.actions.DeleteInCorporaView"; //$NON-NLS-1$
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+
+	/**
+	 * Check classof selection.
+	 *
+	 * @return true, if successful
+	 */
+	private boolean checkClassofSelection() {
+		boolean b = (selection.size() == 1 && (selection.getFirstElement() instanceof Subcorpus || selection
+				.getFirstElement() instanceof Partition));
+		return b;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	@Override
+	public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
+		// Selection containing elements
+		if (incoming instanceof IStructuredSelection) {
+			selection = (IStructuredSelection) incoming;
+			setEnabled(checkClassofSelection());
+		} else {
+			// Other selections, for example containing text or of other kinds.
+			setEnabled(false);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		if (selection.getFirstElement() instanceof Subcorpus) {
+			Subcorpus subcorpus = (Subcorpus) selection.getFirstElement();
+			try {
+				subcorpus.getMotherSubcorpus().dropSubcorpus(subcorpus);
+			} catch (CqiClientException e) {
+				System.err.println(NLS.bind(Messages.DeleteInCorporaView_1, e));
+			}
+		}
+		if (selection.getFirstElement() instanceof Partition) {
+			Partition partition = (Partition) selection.getFirstElement();
+			try {
+				partition.getCorpus().dropPartition(partition);
+			} catch (CqiClientException e) {
+				System.err.println(NLS.bind(
+						Messages.DeleteInCorporaView_2, e));
+			}
+		}
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/___DeleteInCorporaView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateSubcorpusDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateSubcorpusDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateSubcorpusDialog.java	(revision 324)
@@ -0,0 +1,364 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.actions;
+
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.txm.rcp.Messages;
+import org.txm.rcp.swt.widget.ComplexSubcorpusPanel;
+import org.txm.rcp.swt.widget.QueryWidget;
+import org.txm.rcp.swt.widget.SimpleSubcorpusPanel;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+
+/**
+ * Allow the user to create a Sub-corpus 2 mode : Simple : he can choose a
+ * structural unit, a property and a selection of values Advance: he define the
+ * query to build the sub-corpus @ author mdecorde.
+ */
+public class CreateSubcorpusDialog extends Dialog {
+	// For the "simple" tab
+	/** The selected structural unit. */
+	//private StructuralUnit selectedStructuralUnit;
+	//List<StructuralUnitProperty> selectableStructuralUnitProperties = null;
+	/** The selected structural unit property. */
+	//private StructuralUnitProperty selectedStructuralUnitProperty;
+
+	/** The selected values. */
+	//private List<String> selectedValues;
+
+	// For the assisted tab
+	/** The simple and complex panels. */
+	SimpleSubcorpusPanel simplePanel;
+	ComplexSubcorpusPanel complexPanel;
+
+	// For the "advanced" tab
+	/** The query text. */
+	private QueryWidget queryText;
+
+	/** The query string. */
+	private String queryString;
+
+	// for both tab
+	/** The name. */
+	private Text name;
+
+	/** The name string. */
+	private String nameString;
+
+	/** The corpus. */
+	private Corpus corpus;
+
+	/** The is advanced selected. */
+	private boolean isAdvancedSelected = false;
+
+	/** The assisted selected. */
+	private boolean assistedSelected = false;
+
+	/**
+	 * Instantiates a new creates the subcorpus dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param corpus the corpus
+	 */
+	public CreateSubcorpusDialog(Shell parentShell, Corpus corpus) {
+		super(parentShell);
+		this.corpus = corpus;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.CreateSubcorpusDialog_0);
+		newShell.setMinimumSize(300, 300);
+	}
+
+	/** The structural units final. */
+	List<StructuralUnit> structuralUnitsFinal;
+
+	/** The structural units combo. */
+	Combo structuralUnitsCombo;
+
+	/** The property combo. */
+	Combo propertyCombo;
+
+	/** The value combo. */
+	org.eclipse.swt.widgets.List valueCombo;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+
+		Composite inclosing = new Composite(parent, SWT.NONE);
+		// TODO : we just put a composite into another composite. Everything
+		// should be directly put into parent
+		GridLayout layout4inclosing = new GridLayout(1, true);
+		inclosing.setLayout(layout4inclosing);
+		inclosing.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+
+		// name panel
+		Composite nameComposite = new Composite(inclosing, SWT.NONE);
+		nameComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+		GridLayout layout4nameComposite = new GridLayout(2, false);
+		nameComposite.setLayout(layout4nameComposite);
+
+		Label nameLabel = new Label(nameComposite, SWT.NONE);
+		nameLabel.setText(Messages.CreatePartitionDialog_6);
+		nameLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+
+		name = new Text(nameComposite, SWT.BORDER);
+		name.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+
+		// Param panel
+		final TabFolder tabFolder = new TabFolder(inclosing, SWT.NONE);
+		tabFolder.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+		
+		// First tab
+		TabItem simpleTab = new TabItem(tabFolder, SWT.NONE);
+		simpleTab.setText(Messages.CreatePartitionDialog_1);
+		simplePanel = new SimpleSubcorpusPanel(tabFolder, SWT.NONE, this, corpus);
+		simpleTab.setControl(simplePanel);
+		
+		//Second tab: assisted mode
+		TabItem secondTab = new TabItem(tabFolder, SWT.NONE);
+		secondTab.setText(Messages.CreatePartitionDialog_3);
+		this.complexPanel = new ComplexSubcorpusPanel(tabFolder, SWT.NONE, this.corpus);
+		secondTab.setControl(complexPanel);
+
+		// Third tab: advanced mode
+		TabItem advancedTab = new TabItem(tabFolder, SWT.NONE);
+		advancedTab.setText(Messages.CreatePartitionDialog_5);
+
+		Composite compositeForAdvanced = new Composite(tabFolder, SWT.NONE);
+		advancedTab.setControl(compositeForAdvanced);
+
+		GridLayout layoutForAdvanced = new GridLayout(3, false);
+		compositeForAdvanced.setLayout(layoutForAdvanced);
+
+		Label advancedPartLabel = new Label(compositeForAdvanced, SWT.NONE);
+		advancedPartLabel.setText(Messages.CreateSubcorpusDialog_10);
+		advancedPartLabel.setLayoutData(new GridData(GridData.END,
+				GridData.CENTER, false, false));
+
+		queryText = new QueryWidget(compositeForAdvanced, SWT.DROP_DOWN);
+		queryText.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+		GridData gridData = new GridData(GridData.FILL, GridData.FILL, true,
+				false);
+		gridData.widthHint = convertHeightInCharsToPixels(20);
+		queryText.setLayoutData(gridData);
+
+		// check the state of the OK button according to the change of tab
+		// --------------------------------
+
+		tabFolder.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (tabFolder.getSelectionIndex() == 0) {
+					isAdvancedSelected = false;
+					assistedSelected = false;
+				} else if (tabFolder.getSelectionIndex() == 1) {
+					isAdvancedSelected = false;
+					assistedSelected = true;
+				}else {
+					isAdvancedSelected = true;
+					assistedSelected = false;
+				}
+			}
+		});
+
+		return tabFolder;
+	}
+
+
+	
+	public Button getButton(int id) {
+		return this.getButton(id);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		if (name.getText().length() == 0) {
+			String generated = "subcorpus"; //$NON-NLS-1$
+
+			System.out.println(Messages.CreateSubcorpusDialog_8);
+			if (isAdvancedSelected()) {
+				generated += ""+(this.corpus.getSubcorpora().size()+1); //$NON-NLS-1$
+			} else if (assistedSelected) {
+				generated = this.complexPanel.getGeneratedName();
+			} else { // simple
+				generated = this.corpus.getName()+"_"+getStructuralUnitProperty().getFullName(); //$NON-NLS-1$
+			}
+			//return;
+			name.setText(generated);
+		}
+		// test if a query has been set
+		if ((isAdvancedSelected()) && queryText.getText().length() == 0) {
+			MessageDialog.openError(getShell(),
+					Messages.CreateSubcorpusDialog_13,
+					Messages.CreateSubcorpusDialog_14);
+			return;
+		}
+
+		queryString = queryText.getQueryString();
+		//queryText.memorize();
+
+		if (assistedSelected) {
+			//System.out.println("1 "+queryString);
+			queryString = this.complexPanel.getQueryFieldValue();
+			//System.out.println("2 "+queryString);
+			if (queryString == null || queryString.trim().length() == 0) {
+				queryString = this.complexPanel.getQueryString();
+				//System.out.println("3 "+queryString);
+				if (queryString == null || queryString.trim().length() == 0) {
+					MessageDialog.openError(getShell(),
+							Messages.CreateSubcorpusDialog_13,
+							Messages.CreateSubcorpusDialog_14);
+					return;
+				}
+			}
+		}
+
+		nameString = name.getText();
+		super.okPressed();
+	}
+
+	/**
+	 * Tell if the user is using the "advanced" tab.
+	 *
+	 * @return true, if is advanced selected
+	 */
+	public boolean isAdvancedSelected() {
+		return isAdvancedSelected;
+	}
+
+	/**
+	 * Tell if the user is using the "assisted" tab.
+	 *
+	 * @return true, if is assisted selected
+	 */
+	public boolean isAssistedSelected() {
+		return assistedSelected;
+	}
+
+	/**
+	 * Gets the structural unit.
+	 *
+	 * @return the structural unit
+	 */
+	public StructuralUnit getStructuralUnit() {
+		if (isAdvancedSelected())
+			throw new IllegalStateException(
+					Messages.Cannot_ask_simple_when_advance);
+		return simplePanel.selectedStructuralUnit;
+	}
+
+	/**
+	 * Gets the structural unit property.
+	 *
+	 * @return the structural unit property
+	 */
+	public StructuralUnitProperty getStructuralUnitProperty() {
+		if (isAdvancedSelected())
+			throw new IllegalStateException(
+					Messages.Cannot_ask_simple_when_advance);
+		return simplePanel.selectedStructuralUnitProperty;
+	}
+
+	/**
+	 * Gets the values.
+	 *
+	 * @return the values
+	 */
+	public List<String> getValues() {
+		if (isAdvancedSelected())
+			throw new IllegalStateException(
+					Messages.Cannot_ask_simple_when_advance);
+		return simplePanel.selectedValues;
+	}
+
+	/**
+	 * Gets the query.
+	 *
+	 * @return the query
+	 */
+	public String getQuery() {
+		if (isAdvancedSelected() == false && isAssistedSelected() == false)
+			throw new IllegalStateException(
+					Messages.Cannot_ask_simple_when_advance);
+		return queryString;
+	}
+
+	/**
+	 * Gets the name.
+	 *
+	 * @return the name
+	 */
+	public String getName() {
+		return nameString;
+	}
+
+	/**
+	 * Gets the sub corpus name.
+	 *
+	 * @return the sub corpus name
+	 */
+	public String getSubCorpusName() {
+		return name.getText();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateSubcorpusDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/ImportDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/ImportDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/ImportDialog.java	(revision 324)
@@ -0,0 +1,512 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.actions;
+
+import java.io.File;
+import java.util.Locale;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.ExpandBar;
+import org.eclipse.swt.widgets.ExpandItem;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.swt.dialog.TXMMessageBox;
+// TODO: Auto-generated Javadoc
+/**
+ * Allow the user to choose the main language, the main encoding of a an
+ * imported corpus @ author mdecorde.
+ */
+public class ImportDialog extends Dialog {
+	
+	static final String ID = "org.txm.rcp.actions.ImportDialog"; //$NON-NLS-1$
+	/** The self. */
+	ImportDialog self;
+	
+	/** The parent. */
+	Composite parent;
+	
+	/** The main panel. */
+	Composite mainPanel;
+
+	/** The btn default lang. */
+	Button btnDefaultLang;
+	
+	/** The btn guess lang. */
+	Button btnGuessLang;
+	
+	/** The btn guess2 lang. */
+	Button btnGuess2Lang;
+	
+	/** The btn select lang. */
+	Button btnSelectLang;
+	
+	/** The langcombo. */
+	Combo langcombo;
+	//Combo modelCombo;
+	/** The btn default encoding. */
+	Button btnDefaultEncoding;
+	
+	/** The btn guess encoding. */
+	Button btnGuessEncoding;
+	
+	/** The btn guess2 encoding. */
+	Button btnGuess2Encoding;
+	
+	/** The btn select encoding. */
+	Button btnSelectEncoding;
+	
+	/** The encoding combo. */
+	Combo encodingCombo;
+	
+	/** The dir value. */
+	Text dirValue;
+
+	/** The lastopenedbase. */
+	static File lastopenedbase;
+	
+	/** The directory. */
+	File directory;
+	
+	/** The paramtokenizer. */
+	File paramtokenizer;
+	
+	/** The lang. */
+	String lang;
+	
+	/** The encoding. */
+	String encoding;
+	
+	/** The model. */
+	String model;
+	
+	/** The loadername. */
+	String loadername =""; //$NON-NLS-1$
+	
+	/** The expand_state. */
+	boolean expand_state = false;
+
+	/**
+	 * Instantiates a new import dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param loadername the loadername
+	 */
+	public ImportDialog(Shell parentShell, String loadername) {
+		super(parentShell);
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+		this.loadername = loadername;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(NLS.bind(Messages.ImportDialog_0, loadername)); 
+		newShell.setMinimumSize(300, 200);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(final Composite p) {
+		try {
+			this.self = this;
+			this.parent = p;
+			
+			
+			// System.out.println(parent.getLayout());
+			mainPanel = new Composite(parent, SWT.NONE);
+			mainPanel.setLayout(new GridLayout(3, false));
+			GridData gridData = new GridData(GridData.FILL, GridData.FILL,
+					true, false);
+			mainPanel.setLayoutData(gridData);
+
+			// directory
+			Label dirLabel = new Label(mainPanel, SWT.NONE);
+			dirLabel.setText(Messages.ImportDialog_1);
+			dirLabel.setAlignment(SWT.CENTER);
+			dirLabel.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					false, false));
+
+			dirValue = new Text(mainPanel, SWT.SINGLE | SWT.BORDER);
+			dirValue.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, false));
+			if (lastopenedbase != null)
+				dirValue.setText(lastopenedbase.getPath());
+
+			Button dirButton = new Button(mainPanel, SWT.PUSH);
+			dirButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					false, false));
+			dirButton.setText("..."); //$NON-NLS-1$
+			dirButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					DirectoryDialog dialog = new DirectoryDialog(parent
+							.getShell(), SWT.OPEN);
+					if (lastopenedbase != null) {
+						dialog.setFilterPath(dirValue.getText());
+					} else
+						dialog.setFilterPath(new File(TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR), "corpora").getAbsolutePath()); //$NON-NLS-1$
+					if (dialog.open() != null) {
+						String path = dialog.getFilterPath();
+						
+						File srcdir = new File(path);
+						if (new File(srcdir, "html").exists() && new File(srcdir, "data").exists() && new File(srcdir, "registry").exists()) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
+						{	
+							TXMMessageBox.show(parent
+									.getShell(), Messages.AddBase_19, Messages.ImportDialog_13, SWT.ICON_WARNING);
+						}
+						
+						directory = new File(path);
+						lastopenedbase = new File(path);
+						dirValue.setText(path);
+	
+					}
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {
+				}
+			});
+
+			// optionnel
+			final ExpandBar bar = new ExpandBar(mainPanel, SWT.V_SCROLL);
+			bar.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+					false, 3, 1));
+			
+
+			
+			Composite optionsPanel = new Composite(bar, SWT.NONE);
+			optionsPanel.setLayout(new GridLayout(3, false));
+
+			/*
+			 * Label oplabel = new Label(mainPanel, SWT.NONE);
+			 * oplabel.setText(Messages.ImportDialog_3);
+			 * 
+			 * Font f = oplabel.getFont(); FontData defaultFont =
+			 * f.getFontData()[0]; defaultFont.setStyle(SWT.BOLD); Font newf =
+			 * new Font(oplabel.getDisplay(),defaultFont);
+			 * oplabel.setFont(newf);
+			 * 
+			 * oplabel.setAlignment(SWT.CENTER); oplabel.setLayoutData(new
+			 * GridData(GridData.FILL, GridData.FILL, true, false,3,1));
+			 */
+
+			// encoding
+			Group encodingGroup = new Group(optionsPanel, SWT.SHADOW_ETCHED_IN);
+			encodingGroup.setText(Messages.ImportDialog_4);
+			encodingGroup.setLayout(new GridLayout(2, false));
+			encodingGroup.setLayoutData(new GridData(GridData.FILL,
+					GridData.FILL, true, false, 3, 1));
+
+			btnDefaultEncoding = new Button(encodingGroup, SWT.RADIO);
+			btnDefaultEncoding.setText(Messages.ImportDialog_14
+					+ System.getProperty("file.encoding")); //$NON-NLS-1$
+			btnDefaultEncoding.setLayoutData(new GridData(GridData.FILL,
+					GridData.FILL, true, false, 2, 1));
+			btnDefaultEncoding.setSelection(true);
+
+			btnGuessEncoding = new Button(encodingGroup, SWT.RADIO);
+			btnGuessEncoding.setText(Messages.ImportDialog_16);
+
+			btnGuess2Encoding = new Button(encodingGroup, SWT.PUSH);
+			btnGuess2Encoding.setText("??"); //$NON-NLS-1$
+
+			btnSelectEncoding = new Button(encodingGroup, SWT.RADIO);
+			btnSelectEncoding.setText(Messages.ImportDialog_22);
+
+			encodingCombo = new Combo(encodingGroup, SWT.BORDER);
+			encodingCombo.setLayoutData(new GridData(GridData.FILL,
+					GridData.FILL, true, false, 1, 1));
+			
+			//fill combo and select default encoding
+			int index = 0;
+			int i = 0;
+			for (String encoding : java.nio.charset.Charset.availableCharsets().keySet())
+			{
+				encodingCombo.add(encoding);
+				if (encoding.equals(System.getProperty("file.encoding"))) //$NON-NLS-1$
+					index = i;
+				i++;
+			}
+			encodingCombo.select(index);
+			
+			encodingCombo.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					btnSelectEncoding.setSelection(true);
+					btnGuessEncoding.setSelection(false);
+					btnDefaultEncoding.setSelection(false);
+				}
+				
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+
+			// lang
+			Group langGroup = new Group(optionsPanel, SWT.SHADOW_ETCHED_IN);
+			langGroup.setText(Messages.ImportDialog_5);
+			langGroup.setLayout(new GridLayout(2, false));
+			langGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, false, 3, 1));
+
+			btnDefaultLang = new Button(langGroup, SWT.RADIO);
+			btnDefaultLang.setText(Messages.ImportDialog_19
+					+ Locale.getDefault().getLanguage());
+			btnDefaultLang.setLayoutData(new GridData(GridData.FILL,
+					GridData.FILL, true, false, 2, 1));
+			btnDefaultLang.setSelection(true);
+
+			btnGuessLang = new Button(langGroup, SWT.RADIO);
+			btnGuessLang.setText(Messages.ImportDialog_16); 
+
+			btnGuess2Lang = new Button(langGroup, SWT.PUSH);
+			btnGuess2Lang.setText("??"); //$NON-NLS-1$
+
+			btnSelectLang = new Button(langGroup, SWT.RADIO);
+			btnSelectLang.setText(Messages.ImportDialog_22);
+
+			langcombo = new Combo(langGroup, SWT.BORDER);
+			langcombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, false, 1, 1));
+			
+			//fill combo and select default language
+			index = 0;
+			i = 0;
+			for (String lang : Locale.getISOLanguages())
+			{
+				langcombo.add(lang);
+				if (lang.equals(Locale.getDefault().getLanguage()))
+					index = i;
+				i++;
+			}
+			langcombo.select(index);
+			
+			//if widget selected change the radio buttons value
+			langcombo.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					btnSelectLang.setSelection(true);
+					btnGuessLang.setSelection(false);
+					btnDefaultLang.setSelection(false);
+				}
+				
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+
+			// tokenizer options
+			Group selectTokenizerPanel = new Group(optionsPanel,
+					SWT.SHADOW_ETCHED_IN);
+			selectTokenizerPanel.setLayout(new GridLayout(4, false));
+			selectTokenizerPanel.setLayoutData(new GridData(GridData.FILL,
+					GridData.FILL, true, false, 3, 1));
+			selectTokenizerPanel.setText(Messages.ImportDialog_6);
+
+			final Text tokenizerValue = new Text(selectTokenizerPanel,
+					SWT.SINGLE | SWT.BORDER);
+			tokenizerValue.setLayoutData(new GridData(GridData.FILL,
+					GridData.FILL, true, false));
+
+			Button tokenizerButton = new Button(selectTokenizerPanel, SWT.PUSH);
+			// tokenizerButton.setLayoutData(new GridData(GridData.FILL,
+			// GridData.FILL, false, false));
+			tokenizerButton.setText("..."); //$NON-NLS-1$
+			tokenizerButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					FileDialog dialog = new FileDialog(parent.getShell(), SWT.OPEN);
+					if (LastOpened.getFolder(ID) != null)
+						lastopenedbase = new File(LastOpened.getFolder(ID));
+					if (lastopenedbase != null) {
+						dialog.setFilterPath(dirValue.getText());
+					} else
+						dialog.setFilterPath(new File(TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR), "corpora").getAbsolutePath()); //$NON-NLS-1$
+					if (dialog.open() != null) {
+						paramtokenizer = new File(dialog.getFilterPath(),
+								dialog.getFileName());
+						tokenizerValue.setText(paramtokenizer.getAbsolutePath());
+						LastOpened.set(ID, dialog.getFilterPath(), dialog.getFileName());
+					}
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {
+				}
+			});
+
+			tokenizerButton = new Button(selectTokenizerPanel, SWT.PUSH);
+			// tokenizerButton.setLayoutData(new GridData(GridData.FILL,
+			// GridData.FILL, false, false));
+			tokenizerButton.setText(Messages.PropertiesSelector_2);
+			tokenizerButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					if (paramtokenizer != null)
+						if (paramtokenizer.exists())
+							if (paramtokenizer.isFile()) {
+								EditFile.openfile(paramtokenizer
+										.getAbsolutePath());
+							}
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {
+				}
+			});
+
+			final ExpandItem item0 = new ExpandItem(bar, SWT.NONE, 0);
+			item0.setText(Messages.ImportDialog_23);
+			item0.setHeight(optionsPanel.computeSize(SWT.DEFAULT,SWT.DEFAULT).y);
+			item0.setControl(optionsPanel);
+						
+		} catch (Exception e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return p;
+
+	}
+
+	/**
+	 * Gets the directory.
+	 *
+	 * @return the directory
+	 */
+	public File getDirectory() {
+		return directory;
+	}
+
+	/**
+	 * Gets the language.
+	 *
+	 * @return the language
+	 */
+	public String getLanguage() {
+		return lang;
+	}
+
+	/**
+	 * Gets the encoding.
+	 *
+	 * @return the encoding
+	 */
+	public String getEncoding() {
+		return encoding;
+	}
+
+	/**
+	 * Gets the model.
+	 *
+	 * @return the model
+	 */
+	public String getModel() {
+		return model;
+	}
+
+	/**
+	 * Gets the tokenizer param file.
+	 *
+	 * @return the tokenizer param file
+	 */
+	public File getTokenizerParamFile() {
+		return paramtokenizer;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+
+		directory = new File(dirValue.getText());
+
+		//LANGUAGE
+		if (btnDefaultLang.getSelection())// default lang
+			lang = Locale.getDefault().getLanguage();
+		else if (btnGuessLang.getSelection())
+		{
+			if (!btnGuess2Lang.getText().equals("??")) //$NON-NLS-1$
+				lang = btnGuess2Lang.getText();
+			else
+				lang = Locale.getDefault().getLanguage();
+		}
+		else
+			lang = langcombo.getText();
+		
+		//ENCODING
+		
+		if (btnDefaultEncoding.getSelection())// default lang
+			encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
+		else if (btnGuessEncoding.getSelection())
+		{	
+			if (!btnGuess2Encoding.getText().equals("??")) //$NON-NLS-1$
+				encoding = btnGuess2Encoding.getText();
+			else
+				encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
+		}
+		else
+			encoding = encodingCombo.getText();
+		
+		System.out.println("Encoding : "+encoding); //$NON-NLS-1$
+		
+		if (lang.length() == 0)
+			lang = Locale.getDefault().getLanguage();
+
+		if (encoding.length() == 0)
+			encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
+
+		model = lang;
+
+		super.okPressed();
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/ImportDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java	(revision 324)
@@ -0,0 +1,659 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.txm.rcp.Messages;
+import org.txm.rcp.swt.widget.PartitionComposer;
+import org.txm.rcp.swt.widget.QueryWidget;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * Allow the user to choose between 3 mode to create a Partition Simple : choose
+ * a structural unit and a property Assisted : choose a structural unit and a
+ * property, then dispatch them into parts Advanced : user define the queries to
+ * build the parts 
+ * 
+ * @author mdecorde.
+ */
+public class CreatePartitionDialog extends Dialog {
+
+	// For the "simple" tab
+	/** The selected structural unit. */
+	private StructuralUnit selectedStructuralUnit;
+
+	/** The selected structural unit property. */
+	private StructuralUnitProperty selectedStructuralUnitProperty;
+
+	/** The corpus. */
+	private Corpus corpus;
+
+	// for the "advanced" tab
+	/** The queries. */
+	private List<QueryWidget> queries = new ArrayList<QueryWidget>();
+
+	/** The part names. */
+	private List<Text> partNames = new ArrayList<Text>();
+
+	/** The queries string. */
+	List<String> queriesString = new ArrayList<String>();
+
+	/** The is simple selected. */
+	private boolean isSimpleSelected = true;
+
+	/** The is assisted selected. */
+	private boolean isAssistedSelected = false;
+
+	/** The is advanced selected. */
+	private boolean isAdvancedSelected = false;
+
+	/** The name. */
+	private String name;
+
+	/** The name text. */
+	private Text nameText;
+
+	/** The composite for assisted. */
+	private PartitionComposer compositeForAssisted;
+
+	/** The structural units combo. */
+	private Combo structuralUnitsCombo;
+
+	/** The structural units final. */
+	private List<StructuralUnit> structuralUnitsFinal;
+
+	/** The property combo. */
+	private Combo propertyCombo;
+
+	/** The partition. */
+	private Partition partition;
+
+	/** The composite for advanced. */
+	private Composite compositeForAdvanced;
+
+	/** The scroll composite. */
+	private ScrolledComposite scrollComposite;
+
+	/**
+	 * Instantiates a new creates the partition dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param corpus the corpus
+	 */
+	public CreatePartitionDialog(Shell parentShell, Corpus corpus) {
+		super(parentShell);
+		this.corpus = corpus;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.CreatePartitionDialog_0);
+		newShell.setMinimumSize(400, 400);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite c = new Composite(parent, SWT.NONE);
+		c.setLayout(new GridLayout(2, false));
+		GridData maindatalayout = new GridData(GridData.FILL, GridData.FILL, true, false);
+		maindatalayout.minimumHeight = 400;
+		maindatalayout.minimumWidth = 600;
+		c.setLayoutData(maindatalayout);
+		Label nameLabel = new Label(c, SWT.NONE);
+		Font f = nameLabel.getFont();
+		FontData defaultFont = f.getFontData()[0];
+		defaultFont.setStyle(SWT.BOLD);
+		Font newf = new Font(nameLabel.getDisplay(), defaultFont);
+		nameLabel.setText(Messages.CreatePartitionDialog_6);
+		nameLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER,
+				false, false));
+		nameLabel.setFont(newf);
+
+		nameText = new Text(c, SWT.BORDER);
+		GridData data = new GridData(GridData.FILL, GridData.FILL, true, false);
+		data.horizontalSpan = 1;
+		nameText.setLayoutData(data);
+
+		final TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
+		tabFolder.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, true));
+		// First tab
+		// --------------------------------------------------------
+
+		TabItem simpleTab = new TabItem(tabFolder, SWT.NONE);
+
+		simpleTab.setText(Messages.CreatePartitionDialog_1);
+
+		Composite composite = new Composite(tabFolder, SWT.NONE);
+		simpleTab.setControl(composite);
+
+		GridLayout layout = new GridLayout(2, false);
+		composite.setLayout(layout);
+
+		// StructuralUnit
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+		Label structureLabel = new Label(composite, SWT.NONE);
+		structureLabel.setText(Messages.CreatePartitionDialog_2);
+		structureLabel.setLayoutData(new GridData(GridData.END,
+				GridData.CENTER, false, false));
+
+		structuralUnitsCombo = new Combo(composite, SWT.READ_ONLY);
+		structuralUnitsCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER,
+				true, false));
+
+		List<StructuralUnit> structuralUnits = null;
+		try {
+			structuralUnits = corpus.getOrderedStructuralUnits();
+		} catch (CqiClientException e) {
+			Log.severe(Messages.ObjectExplorer_9
+					+ Log.toString(e));
+			return null;
+		}
+		structuralUnitsFinal = new ArrayList<StructuralUnit>();
+		for (StructuralUnit unit : structuralUnits) {
+			if (unit.getName().equals("txmcorpus")) continue; // ignore txmcorpus structure
+			
+			if (unit.getOrderedProperties() != null
+					&& unit.getOrderedProperties().size() != 0) {
+				/*
+				 * if ((unit.getName().equals("text") &&
+				 * unit.getProperties().size() > 3)) //$NON-NLS-1$ {
+				 * structuralUnitsCombo.add(unit.getName());
+				 * structuralUnitsFinal.add(unit); } else
+				 * if (!unit.getName().equals("text")) //$NON-NLS-1$ {
+				 */
+				structuralUnitsCombo.add(unit.getName());
+				structuralUnitsFinal.add(unit);
+				// }
+			}
+		}
+
+		if (structuralUnitsCombo.getItemCount() == 0) {
+			this.getButton(IDialogConstants.OK_ID).setEnabled(false);
+		} else {
+			structuralUnitsCombo.select(0);
+			String[] items = structuralUnitsCombo.getItems();
+			for (int i = 0 ; i < items.length ; i++) {
+				if (items[i].equals("text")) //$NON-NLS-1$
+				{
+					structuralUnitsCombo.select(i);
+					break;
+				}
+			}
+			selectedStructuralUnit = structuralUnitsFinal.get(0);
+		}
+		// combo.setSize (200, 200);
+
+		// StructuralUnitProperty
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+		Label propertyLabel = new Label(composite, SWT.NONE);
+		propertyLabel.setText(Messages.CreatePartitionDialog_4);
+		propertyLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+				false, false));
+
+		propertyCombo = new Combo(composite, SWT.READ_ONLY);
+		propertyCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER,
+				true, false));
+		// combo.setSize (200, 200);
+		structuralUnitsCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				reloadProperties();
+			}
+		});
+
+		for (StructuralUnitProperty property : structuralUnitsFinal.get(0).getOrderedProperties()) {
+			if (!(structuralUnitsFinal.get(0).getName().equals("text") &&  //$NON-NLS-1$
+					(property.getName().equals("project") || property.getName().equals("base")))) //$NON-NLS-1$ //$NON-NLS-2$
+				propertyCombo.add(property.getName());
+		}
+		propertyCombo.select(0);
+		selectedStructuralUnitProperty = selectedStructuralUnit.getOrderedProperties()
+		.get(0);
+
+		propertyCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				selectedStructuralUnitProperty = selectedStructuralUnit
+				.getOrderedProperties().get(propertyCombo.getSelectionIndex());
+			}
+		});
+
+		reloadProperties();
+
+		// Second Tab : assisted mode
+		TabItem assistedTab = new TabItem(tabFolder, SWT.NONE);
+
+		assistedTab.setText(Messages.CreatePartitionDialog_3);
+
+		compositeForAssisted = new PartitionComposer(tabFolder, SWT.NONE,
+				this.corpus);
+		assistedTab.setControl(compositeForAssisted);
+
+		// Third tab: avanced mode
+		// --------------------------------------------------------
+
+		TabItem advancedTab = new TabItem(tabFolder, SWT.NONE);
+		advancedTab.setText(Messages.CreatePartitionDialog_5);
+
+		Composite advanceContainer = new Composite(tabFolder, SWT.NONE);
+		GridLayout advanceLayout = new GridLayout(1, true);
+		advanceContainer.setLayout(advanceLayout);
+		advancedTab.setControl(advanceContainer);
+
+		scrollComposite = new ScrolledComposite(advanceContainer, SWT.V_SCROLL
+				| SWT.BORDER);
+		scrollComposite.setLayoutData(new GridData(GridData.FILL,
+				GridData.FILL, true, true));
+
+		Button plusButton = new Button(advanceContainer, SWT.NONE);
+		plusButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER,
+				GridData.FILL, false, false));
+		plusButton.setText("+"); //$NON-NLS-1$
+		plusButton.addListener(SWT.Selection, new Listener() {
+			@Override
+			public void handleEvent(Event event) {
+				addQueryField(compositeForAdvanced);
+			}
+		});
+
+		compositeForAdvanced = new Composite(scrollComposite, SWT.NONE);
+		GridLayout layoutForAdvanced = new GridLayout(3, false);
+		compositeForAdvanced.setLayout(layoutForAdvanced);
+
+		scrollComposite.setContent(compositeForAdvanced);
+		scrollComposite.setExpandVertical(true);
+		scrollComposite.setExpandHorizontal(true);
+		scrollComposite.addControlListener(new ControlAdapter() {
+			@Override
+			public void controlResized(ControlEvent e) {
+				Rectangle r = scrollComposite.getClientArea();
+				scrollComposite.setMinSize(compositeForAdvanced.computeSize(
+						r.width, SWT.DEFAULT));
+			}
+		});
+
+		createAdvancedQueryField();
+
+		// check the state of the OK button according to the change of tab
+		// --------------------------------
+
+		tabFolder.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				// record the tab currently in use
+				if (tabFolder.getSelectionIndex() == 0) {
+					isSimpleSelected = true;
+					isAssistedSelected = false;
+					isAdvancedSelected = false;
+				} else if (tabFolder.getSelectionIndex() == 1) {
+					isSimpleSelected = false;
+					isAssistedSelected = true;
+					isAdvancedSelected = false;
+				} else {
+					isSimpleSelected = false;
+					isAssistedSelected = false;
+					isAdvancedSelected = true;
+				}
+			}
+		});
+
+		return tabFolder;
+	}
+
+	/**
+	 * Reload properties.
+	 */
+	private void reloadProperties() {
+		List<StructuralUnitProperty> properties = null;
+		selectedStructuralUnit = structuralUnitsFinal.get(structuralUnitsCombo
+				.getSelectionIndex());
+
+		properties = selectedStructuralUnit.getOrderedProperties();
+		propertyCombo.removeAll();
+		for (StructuralUnitProperty property : properties) {
+			/*
+			 * if (!(selectedStructuralUnit.getName().equals("text") &&
+			 * //$NON-NLS-1$ (property.getName().equals("id") || //$NON-NLS-1$
+			 * property.getName().equals("base") || //$NON-NLS-1$
+			 * property.getName().equals("project")))) //$NON-NLS-1$
+			 */
+			if (selectedStructuralUnit.getName().equals("text") && 
+					(property.getName().equals("project") || property.getName().equals("base"))) continue; // ignore technical properties
+			propertyCombo.add(property.getName());
+		}
+		if (propertyCombo.getItemCount() > 0) {
+			propertyCombo.select(0);
+			String[] items = propertyCombo.getItems();
+			for(int i = 0 ; i < items.length ; i++)
+				if (items[i].equals("id")) //$NON-NLS-1$
+				{
+					propertyCombo.select(i);
+					break;
+				}
+			selectedStructuralUnitProperty = selectedStructuralUnit
+			.getOrderedProperties().get(0);
+			// this.getButton(IDialogConstants.OK_ID).setEnabled(true);
+		}
+	}
+
+	/**
+	 * Return true if no query is currently given in the "advanced" tab (ie if
+	 * all Text field opened are empty).
+	 *
+	 * @return true, if successful
+	 */
+	private boolean noquery() {
+		for (QueryWidget query : queries) {
+			if (query.getText().length() == 0)
+				return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Creates the advanced query field.
+	 *
+	 * @param composite the composite
+	 */
+	private void createAdvancedQueryField() {
+		addQueryField(compositeForAdvanced);
+		Rectangle r = scrollComposite.getClientArea();
+		scrollComposite.setMinSize(compositeForAdvanced.computeSize(r.width,
+				SWT.DEFAULT));
+	}
+
+	/**
+	 * Adds the query field.
+	 *
+	 * @param composite the composite
+	 */
+	private void addQueryField(final Composite composite) {
+		final Text advancedPartLabel = new Text(composite, SWT.NONE);
+		advancedPartLabel.setText(Messages.CreatePartitionDialog_7
+				+ (partNames.size() + 1)); 
+		advancedPartLabel.setLayoutData(new GridData(GridData.END,
+				GridData.CENTER, false, false));
+		partNames.add(advancedPartLabel);
+
+		final QueryWidget queryText;
+		queryText = new QueryWidget(composite, SWT.DROP_DOWN);
+		queryText.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+		GridData gridData = new GridData(GridData.FILL, GridData.FILL, true,
+				false);
+		// gridData.widthHint = convertHeightInCharsToPixels(20);
+		queryText.setLayoutData(gridData);
+		queries.add(queryText);
+
+		final Button minusButton = new Button(composite, SWT.NONE);
+		minusButton.setText("-"); //$NON-NLS-1$
+		// minusButton.setData(queryText);
+		minusButton.addListener(SWT.Selection, new Listener() {
+			@Override
+			public void handleEvent(Event event) {
+				queries.remove(queryText);
+				partNames.remove(advancedPartLabel);
+				advancedPartLabel.dispose();
+				queryText.dispose();
+				minusButton.dispose();
+			}
+		});
+		Rectangle r = scrollComposite.getClientArea();
+		scrollComposite.setMinSize(compositeForAdvanced.computeSize(r.width,
+				SWT.DEFAULT));
+		scrollComposite.update();
+		scrollComposite.layout();
+		composite.update();
+		composite.layout();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		if (nameText.getText().length() == 0) {
+			if(isAdvancedSelected())
+			{
+				String name = "partition"+(this.corpus.getPartitions().size()+1); //$NON-NLS-1$
+				nameText.setText(name);
+				System.out.println(Messages.CreatePartitionDialog_9);
+			}
+			else if (isAssistedSelected)
+			{
+				String name = this.corpus.getName()+"_"+compositeForAssisted.getProperty().getFullName(); //$NON-NLS-1$
+				nameText.setText(name);
+				System.out.println(Messages.CreatePartitionDialog_9);
+			}
+			//return;
+		}
+
+		if (isAdvancedSelected() && noquery()) {
+			MessageDialog.openError(getShell(),
+					Messages.CreateSubcorpusDialog_13,
+					Messages.CreatePartitionDialog_16);
+			return;
+		}
+
+		/*if (isAssistedSelected) {
+			if (compositeForAssisted.hasUnassigned()) {
+				System.out.println(Messages.CreatePartitionDialog_11);
+				return;
+			}
+		}*/
+
+		for (QueryWidget query : queries) {
+			queriesString.add(query.getQueryString());
+			query.memorize();
+		}
+		name = nameText.getText();
+		partition = _getPartition();
+		super.okPressed();
+	}
+
+	/**
+	 * Tell if the user is using the "advanced" tab.
+	 *
+	 * @return true, if is advanced selected
+	 */
+	public boolean isAdvancedSelected() {
+		return isAdvancedSelected;
+	}
+
+	/**
+	 * Gets the structural unit.
+	 *
+	 * @return the structural unit
+	 */
+	public StructuralUnit getStructuralUnit() {
+		if (isAdvancedSelected())
+			throw new IllegalStateException(
+					Messages.Cannot_ask_simple_when_advance);
+		return selectedStructuralUnit;
+	}
+
+	/**
+	 * Gets the structural unit property.
+	 *
+	 * @return the structural unit property
+	 */
+	public StructuralUnitProperty getStructuralUnitProperty() {
+		if (isAdvancedSelected())
+			throw new IllegalStateException(
+					Messages.Cannot_ask_simple_when_advance);
+		return selectedStructuralUnitProperty;
+	}
+
+	/**
+	 * Gets the queries.
+	 *
+	 * @return the queries
+	 */
+	public List<String> getQueries() {
+		if (!isAdvancedSelected())
+			throw new IllegalStateException(
+					Messages.Cannot_ask_simple_when_advance);
+		return queriesString;
+	}
+
+	/**
+	 * Gets the name.
+	 *
+	 * @return the name
+	 */
+	public String getName() {
+		// if (!isAdvancedSelected()) throw new
+		// IllegalStateException(Messages.CreatePartitionDialog_20);
+		return name;
+	}
+
+	/**
+	 * _get partition.
+	 *
+	 * @return the partition
+	 */
+	public Partition _getPartition() {
+		Partition p = null;
+		if (isSimpleSelected) {
+			StructuralUnit structuralUnit = this.structuralUnitsFinal.get(this.structuralUnitsCombo.getSelectionIndex());
+			StructuralUnitProperty property = structuralUnit.getProperty(this.propertyCombo.getText());
+			try {
+				p = corpus.createPartition(structuralUnit, property);
+			} catch (CqiClientException e) {
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+				return null;
+			}
+		} else if (isAssistedSelected) {
+			p = this.compositeForAssisted.getPartition();
+		} else if (isAdvancedSelected) {
+			try {
+				p = corpus.createPartition(getName(), getQueries(), getAdvancePartNames());
+			} catch (CqiClientException e) {
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+				return null;
+			}
+		}
+
+		if (p == null) {
+			System.out.println(Messages.CreatePartitionDialog_8);
+			return null;
+		}
+		
+		if (p.getParts().size() == 0) {
+			System.out.println(Messages.CreatePartitionDialog_10);
+			return null;
+		}
+		
+		if (this.getName() != null && !this.getName().trim().equals("")) //$NON-NLS-1$
+			p.setName(this.getName().trim());
+
+		return p;
+	}
+
+	/**
+	 * Gets the advance part names.
+	 *
+	 * @return the advance part names
+	 */
+	private List<String> getAdvancePartNames() {
+		ArrayList<String> values = new ArrayList<String>();
+		int count = 0;
+		for (Text t: partNames) {
+			String name = t.getText().trim();
+			if (name.length() == 0)
+				name = Messages.CreatePartitionDialog_7+count++; 
+			values.add(name);
+		}
+		return values;
+	}
+
+	/**
+	 * Gets the partition.
+	 *
+	 * @return the partition
+	 */
+	public Partition getPartition() {
+		return partition;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Actions (OLD) and their dialogs (still used by the commands)</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/RunGroovyScript.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/RunGroovyScript.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/RunGroovyScript.java	(revision 324)
@@ -0,0 +1,160 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.actions;
+
+import groovy.lang.Binding;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.jface.action.Action;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.importer.scripting.GroovyImportScriptRunner;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.preferences.ScriptPreferenceInitializer;
+import org.txm.rcp.preferences.ScriptPreferencePage;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.utils.JobHandler;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RunGroovyScript.
+ */
+public class RunGroovyScript extends Action implements IWorkbenchAction {
+
+	/** The ID. */
+	private static String ID = "org.txm.rcp.actions.RunGroovyScript"; //$NON-NLS-1$
+
+	/** The window. */
+	private IWorkbenchWindow window;
+
+	/** The gse. */
+	private GroovyImportScriptRunner gse = null;
+
+	/**
+	 * Instantiates a new run groovy script.
+	 * 
+	 * @param window
+	 *            the window
+	 */
+	public RunGroovyScript(IWorkbenchWindow window) {
+		this.window = window;
+		setId(ID);
+		setText(Messages.RunGroovyScript_1);
+		setToolTipText(Messages.RunGroovyScript_2);
+		setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(
+				Application.PLUGIN_ID, IImageKeys.ACTION_RUN_SCRIPT));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+
+		FileDialog dialog = new FileDialog(window.getShell(), SWT.OPEN);
+		dialog.setFilterExtensions(new String[] { Messages.RunGroovyScript_3 });
+		IPreferencesService service = Platform.getPreferencesService();
+		String scriptRootDir = service.getString(Application.PLUGIN_ID,
+				ScriptPreferencePage.SCRIPT_ROOT_DIR,
+				ScriptPreferenceInitializer.SCRIPT_ROOT_DIR_DEFAULT, null);
+		String scriptCurrentDir = service.getString(Application.PLUGIN_ID,
+				ScriptPreferencePage.SCRIPT_CURRENT_DIR,
+				ScriptPreferenceInitializer.SCRIPT_CURRENT_DIR_DEFAULT, null);
+
+		if (LastOpened.getFolder(ID) != null) {
+			scriptCurrentDir = LastOpened.getFolder(ID);
+		}
+		dialog.setFilterPath(scriptCurrentDir);
+		String result = dialog.open();
+		if (result == null)
+			return;
+
+		final File script = new File(result);
+		LastOpened.set(ID, script.getParent(), script.getName());
+		try {
+			List<File> classPath = new ArrayList<File>();
+			classPath.add(new File(scriptRootDir));
+			gse = new GroovyImportScriptRunner(script, classPath);
+		} catch (IOException e) {
+			System.err.println(NLS.bind(Messages.RunGroovyScript_4, e));
+			System.err.println(e);
+		}
+
+		if (gse != null) {
+			JobHandler jobhandler = new JobHandler(Messages.RunGroovyScript_0,
+					null) {
+				@Override
+				protected IStatus run(IProgressMonitor monitor) {
+					this.runInit(monitor);
+					try {
+						monitor.beginTask(Messages.RunGroovyScript_9, 100);
+						new Binding();
+						// gse.run(binding);
+						monitor.worked(100);
+
+					} catch (ThreadDeath td) {
+						return Status.CANCEL_STATUS;
+					} catch (Exception e) {
+						System.out.println(NLS.bind(Messages.RunGroovyScript_8,
+								e));
+					} finally {
+						monitor.done();
+					}
+					return Status.OK_STATUS;
+				}
+			};
+			jobhandler.startJob();
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/RunGroovyScript.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateFrequencyListDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateFrequencyListDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateFrequencyListDialog.java	(revision 324)
@@ -0,0 +1,140 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+// TODO: Auto-generated Javadoc
+/**
+ * Allow user to choose a lexical property.
+ *
+ * @author sloiseau
+ */
+public class CreateFrequencyListDialog extends Dialog {
+
+	/** The property. */
+	private Property property;
+	
+	/** The properties. */
+	private List<Property> properties;
+	
+	/** The ana prop combo. */
+	private Combo anaPropCombo;
+
+	/**
+	 * Instantiates a new creates the frequency list dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param corpus the corpus
+	 */
+	public CreateFrequencyListDialog(Shell parentShell, Corpus corpus) {
+		super(parentShell);
+		try {
+			this.properties = new ArrayList<Property>(corpus.getOrderedProperties());
+		} catch (CqiClientException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.FrequencyListEditorInput_0);
+	}
+
+	/**
+	 * Gets the property.
+	 *
+	 * @return the property
+	 */
+	public Property getProperty() {
+		return property;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout(2, false);
+		composite.setLayout(layout);
+
+		Label anaPropLabel = new Label(composite, SWT.NONE);
+		anaPropLabel.setText(Messages.CreatePartitionDialog_4);
+		anaPropLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+				false, false));
+
+		anaPropCombo = new Combo(composite, SWT.READ_ONLY);
+		anaPropCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+		for (Property property : properties) {
+			anaPropCombo.add(property.getName());
+		}
+		if (anaPropCombo.indexOf("word") >= 0) //$NON-NLS-1$
+			anaPropCombo.select(anaPropCombo.indexOf("word")); //$NON-NLS-1$
+
+		return composite;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		int propIndex = anaPropCombo.getSelectionIndex();
+		if (propIndex == -1) {
+			MessageDialog.openError(getShell(),
+					Messages.Invalid_analysis_property,
+					Messages.Structure_field_not_empty);
+			return;
+		}
+		property = properties.get(propIndex);
+		super.okPressed();
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreateFrequencyListDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/GetConcordancesDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/GetConcordancesDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/GetConcordancesDialog.java	(revision 324)
@@ -0,0 +1,411 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.Text;
+import org.txm.functions.ReferencePattern;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.searchengine.cqp.corpus.query.Query;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class GetConcordancesDialog.
+ *
+ * @deprecated has been moved to concordance editor @ author mdecorde
+ */
+@Deprecated
+public class GetConcordancesDialog extends Dialog {
+
+	/** The properties. */
+	private List<Property> properties;
+	
+	/** The ana prop combo. */
+	private Combo anaPropCombo;
+	
+	/** The view prop combo. */
+	private Combo viewPropCombo;
+	
+	/** The query text. */
+	private Text queryText;
+	
+	/** The available reference items. */
+	private List<Property> availableReferenceItems;
+	
+	/** The selected reference items. */
+	private List<Property> selectedReferenceItems;
+	
+	/** The left context spinner. */
+	private Spinner leftContextSpinner;
+	
+	/** The right context spinner. */
+	private Spinner rightContextSpinner;
+
+	/** The analysis property. */
+	private Property analysisProperty;
+	
+	/** The view property. */
+	private Property viewProperty;
+	
+	/** The query. */
+	private Query query;
+	
+	/** The reference pattern. */
+	private ReferencePattern referencePattern;
+	
+	/** The left context size. */
+	private int leftContextSize;
+	
+	/** The right context size. */
+	private int rightContextSize;
+
+	/**
+	 * Instantiates a new gets the concordances dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param corpus the corpus
+	 */
+	public GetConcordancesDialog(Shell parentShell, Corpus corpus) {
+		super(parentShell);
+		try {
+			this.properties = new ArrayList<Property>(corpus.getOrderedProperties());
+			this.availableReferenceItems = new ArrayList<Property>();
+			this.selectedReferenceItems = new ArrayList<Property>();
+			this.availableReferenceItems.addAll(corpus.getOrderedProperties());
+			List<StructuralUnit> structuralUnits = corpus.getOrderedStructuralUnits();
+			for (StructuralUnit unit : structuralUnits) {
+				availableReferenceItems.addAll(unit.getOrderedProperties());
+			}
+		} catch (CqiClientException e) {
+			System.err.println(NLS.bind(Messages.GetConcordancesDialog_0,
+					e));
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.GetConcordancesDialog_1);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+
+		Composite mainArea = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout(2, false);
+		mainArea.setLayout(layout);
+
+		Label queryLabel = new Label(mainArea, SWT.NONE);
+		queryLabel.setText(Messages.CreateSubcorpusDialog_10);
+		queryLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+				false, false));
+		queryText = new Text(mainArea, SWT.BORDER);
+		GridData gridData = new GridData(GridData.FILL, GridData.FILL, true,
+				false);
+		gridData.widthHint = convertWidthInCharsToPixels(20);
+		queryText.setLayoutData(gridData);
+		// queryText.setText("\"Graal\"");
+
+		Label anaPropLabel = new Label(mainArea, SWT.NONE);
+		anaPropLabel.setText(Messages.CreatePartitionDialog_4);
+		anaPropLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+				false, false));
+
+		anaPropCombo = new Combo(mainArea, SWT.READ_ONLY);
+		anaPropCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+		for (Property property : properties) {
+			anaPropCombo.add(property.getName());
+		}
+		anaPropCombo.select(0);
+
+		Label viewPropLabel = new Label(mainArea, SWT.NONE);
+		viewPropLabel.setText(Messages.GetConcordancesDialog_4);
+		viewPropLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+				false, false));
+
+		viewPropCombo = new Combo(mainArea, SWT.READ_ONLY);
+		viewPropCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+		for (Property property : properties) {
+			viewPropCombo.add(property.getName());
+		}
+		viewPropCombo.select(0);
+
+		Label leftContextLabel = new Label(mainArea, SWT.NONE);
+		leftContextLabel.setText(Messages.GetConcordancesDialog_5);
+		leftContextLabel.setLayoutData(new GridData(GridData.END,
+				GridData.CENTER, false, false));
+		leftContextSpinner = new Spinner(mainArea, SWT.BORDER);
+		leftContextSpinner.setSelection(15);
+
+		Label rightContextLabel = new Label(mainArea, SWT.NONE);
+		rightContextLabel.setText(Messages.GetConcordancesDialog_6);
+		rightContextLabel.setLayoutData(new GridData(GridData.END,
+				GridData.CENTER, false, false));
+		rightContextSpinner = new Spinner(mainArea, SWT.BORDER);
+		rightContextSpinner.setSelection(15);
+
+		Label referenceLabel = new Label(mainArea, SWT.NONE);
+		referenceLabel.setText(Messages.GetConcordancesDialog_7);
+		referenceLabel.setLayoutData(new GridData(GridData.END,
+				GridData.BEGINNING, false, false));
+		Composite referencePatternComposer = new Composite(mainArea, SWT.NONE);
+		referencePatternComposer.setLayout(new GridLayout(4, false));
+
+		final org.eclipse.swt.widgets.List availbleItems = new org.eclipse.swt.widgets.List(
+				referencePatternComposer, SWT.BORDER | SWT.V_SCROLL);
+		for (Property property : availableReferenceItems) {
+			if (property instanceof StructuralUnitProperty) {
+				StructuralUnitProperty sProperty = (StructuralUnitProperty) property;
+				availbleItems.add(sProperty.getStructuralUnit().getName()
+						+ ": " + property.getName()); //$NON-NLS-1$
+			} else {
+				availbleItems.add(property.getName());
+			}
+		}
+		gridData = new GridData(GridData.FILL, GridData.FILL, true, false);
+		Point size = availbleItems.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+		gridData.widthHint = size.x;
+		availbleItems.setLayoutData(gridData);
+
+		Composite selectionButtons = new Composite(referencePatternComposer,
+				SWT.NONE);
+		selectionButtons.setLayout(new GridLayout(1, false));
+		Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+		Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+		final org.eclipse.swt.widgets.List selectedItems = new org.eclipse.swt.widgets.List(
+				referencePatternComposer, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+		selectedItems.setLayoutData(gridData);
+
+		Composite orderButtons = new Composite(referencePatternComposer,
+				SWT.NONE);
+		orderButtons.setLayout(new GridLayout(1, false));
+		Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+		Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+		select.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = availbleItems.getSelectionIndex();
+				selectedItems.add(availbleItems.getItem(ind));
+				availbleItems.remove(ind);
+				selectedReferenceItems.add(availableReferenceItems.get(ind));
+				availableReferenceItems.remove(ind);
+				availbleItems.setSelection(ind);
+			}
+		});
+
+		unselect.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = selectedItems.getSelectionIndex();
+				availbleItems.add(selectedItems.getItem(ind));
+				selectedItems.remove(ind);
+				availableReferenceItems.add(selectedReferenceItems.get(ind));
+				selectedReferenceItems.remove(ind);
+				selectedItems.setSelection(ind);
+			}
+		});
+
+		up.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = selectedItems.getSelectionIndex();
+				if (ind > 0) {
+					selectedItems.add(selectedItems.getItem(ind), ind - 1);
+					selectedItems.remove(ind + 1);
+					selectedReferenceItems.add(selectedReferenceItems
+							.get(ind - 1));
+					selectedReferenceItems.remove(ind + 1);
+					selectedItems.setSelection(ind - 1);
+				}
+			}
+		});
+
+		down.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = selectedItems.getSelectionIndex();
+				if (ind < selectedItems.getItemCount() - 1) {
+					selectedItems.add(selectedItems.getItem(ind), ind + 2);
+					selectedItems.remove(ind);
+					selectedReferenceItems.add(selectedReferenceItems
+							.get(ind + 2));
+					selectedReferenceItems.remove(ind);
+					selectedItems.setSelection(ind + 2);
+				}
+			}
+		});
+
+		return mainArea;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		if (queryText.getText().equals("")) { //$NON-NLS-1$
+			MessageDialog.openError(getShell(),
+					Messages.CreateSubcorpusDialog_13,
+					Messages.CreateSubcorpusDialog_14);
+			return;
+		} else
+			query = new Query(wrap(queryText.getText()));
+
+		if (anaPropCombo.getSelectionIndex() == -1) {
+			MessageDialog.openError(getShell(),
+					Messages.Invalid_analysis_property,
+					Messages.GetConcordancesDialog_13);
+			return;
+		} else
+			analysisProperty = properties.get(anaPropCombo.getSelectionIndex());
+
+		if (viewPropCombo.getSelectionIndex() == -1) {
+			MessageDialog.openError(getShell(),
+					Messages.GetConcordancesDialog_14,
+					Messages.GetConcordancesDialog_15);
+			return;
+		} else
+			viewProperty = properties.get(viewPropCombo.getSelectionIndex());
+
+		referencePattern = new ReferencePattern();
+		for (Property prop : selectedReferenceItems)
+			referencePattern.addProperty(prop);
+
+		leftContextSize = leftContextSpinner.getSelection();
+		rightContextSize = rightContextSpinner.getSelection();
+
+		super.okPressed();
+	}
+
+	/**
+	 * Wrap.
+	 *
+	 * @param text the text
+	 * @return the string
+	 */
+	private String wrap(String text) {
+		Pattern quoted = Pattern.compile("\".*\""); //$NON-NLS-1$
+		if (quoted.matcher(text).matches())
+			return text;
+		Pattern bracketed = Pattern.compile("\\[.*\\]"); //$NON-NLS-1$
+		if (bracketed.matcher(text).matches())
+			return text;
+		Pattern equals = Pattern.compile(".*\".*\""); //$NON-NLS-1$
+		if (equals.matcher(text).matches())
+			return '[' + text + ']';
+		return '"' + text + '"'; //$NON-NLS-1$
+	}
+
+	/**
+	 * Gets the analysis property.
+	 *
+	 * @return the analysis property
+	 */
+	public Property getAnalysisProperty() {
+		return analysisProperty;
+	}
+
+	/**
+	 * Gets the view property.
+	 *
+	 * @return the view property
+	 */
+	public Property getViewProperty() {
+		return viewProperty;
+	}
+
+	/**
+	 * Gets the query.
+	 *
+	 * @return the query
+	 */
+	public Query getQuery() {
+		return query;
+	}
+
+	/**
+	 * Gets the reference pattern.
+	 *
+	 * @return the reference pattern
+	 */
+	public ReferencePattern getReferencePattern() {
+		return referencePattern;
+	}
+
+	/**
+	 * Gets the left context size.
+	 *
+	 * @return the left context size
+	 */
+	public int getLeftContextSize() {
+		return leftContextSize;
+	}
+
+	/**
+	 * Gets the right context size.
+	 *
+	 * @return the right context size
+	 */
+	public int getRightContextSize() {
+		return rightContextSize;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/GetConcordancesDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/OverlayImageIcon.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/OverlayImageIcon.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/OverlayImageIcon.java	(revision 324)
@@ -0,0 +1,150 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.utils;
+
+
+import org.eclipse.jface.resource.CompositeImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.Point;
+import org.txm.rcp.IImageKeys;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class OverlayImageIcon.
+ *
+ * @author balajik
+ * 
+ * This class is used for overlaying image icons
+ */
+public class OverlayImageIcon extends CompositeImageDescriptor
+{
+  
+  /** Base image of the object. */ 
+  private Image baseImage_;
+  
+  /** Size of the base image. */ 
+  private Point sizeOfImage_;
+
+  /** The imagekey. */
+  private String imagekey; 
+
+  /**
+   * Constructor for overlayImageIcon.
+   *
+   * @param baseImage the base image
+   * @param imagekey the imagekey
+   */
+  public OverlayImageIcon(Image baseImage, 
+                          String imagekey)
+  {
+    // Base image of the object
+    baseImage_ = baseImage;
+    // Demo Image Object 
+    //demoImage_ = demoImage;
+    //imageKey_ = imageKey;
+    if(baseImage != null)	{
+    	sizeOfImage_ = new Point(baseImage.getBounds().width, 
+                             baseImage.getBounds().height);
+    }
+    this.imagekey = imagekey;
+  }
+
+  /**
+   * Draw composite image.
+   *
+   * @param arg0 the arg0
+   * @param arg1 the arg1
+   * @see org.eclipse.jface.resource.CompositeImageDescriptor#drawCompositeImage(int, int)
+   * DrawCompositeImage is called to draw the composite image.
+   */
+  @Override
+protected void drawCompositeImage(int arg0, int arg1)
+  {
+	 //System.out.println("draw composite with "+baseImage_);
+    // Draw the base image
+     drawImage(baseImage_.getImageData(), 0, 0); 
+     //System.out.println("draw base ok");
+     //int[] locations = organizeImages();
+     //System.out.println("img key: "+imagekey);
+     Image deco = IImageKeys.getImage(imagekey);
+     //System.out.println("get deco ok");
+     ImageData imageData = deco.getImageData();
+     //System.out.println(imageData);
+     drawImage(imageData, 0, 0);
+      /*  switch(locations[i])
+        {
+          // Draw on the top left corner
+          case TOP_LEFT:
+           
+            break;
+            
+          // Draw on top right corner  
+          case TOP_RIGHT:
+            drawImage(imageData, sizeOfImage_.x - imageData.width, 0);
+            break;
+            
+          // Draw on bottom left  
+          case BOTTOM_LEFT:
+            drawImage(imageData, 0, sizeOfImage_.y - imageData.height);
+            break;
+            
+          // Draw on bottom right corner  
+          case BOTTOM_RIGHT:
+            drawImage(imageData, sizeOfImage_.x - imageData.width,
+                      sizeOfImage_.y - imageData.height);
+            break;
+            
+        }
+     */
+   
+  }
+ 
+  /**
+   * Gets the size.
+   *
+   * @return the size
+   * @see org.eclipse.jface.resource.CompositeImageDescriptor#getSize()
+   * get the size of the object
+   */
+  @Override
+protected Point getSize()
+  {
+    return sizeOfImage_;
+  }
+  
+  /**
+   * Get the image formed by overlaying dif ferent images on the base image.
+   *
+   * @return composite image
+   */ 
+  public Image getImage()
+  {
+    return createImage();
+  }
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/OverlayImageIcon.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Utils : Clipboard, Jobs, Locale ...</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/Logger.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/Logger.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/Logger.java	(revision 324)
@@ -0,0 +1,209 @@
+package org.txm.rcp.utils;
+
+import org.eclipse.swt.widgets.Display;
+import org.txm.rcp.StatusLine;
+import org.txm.utils.logger.Log;
+import org.txm.utils.logger.MessageBox;
+
+public class Logger extends Log {
+	/** The class id. */
+	public static final String id = "org.txm.rcp.utils.Logger"; //$NON-NLS-1$
+	
+	/** The flags. */
+	public static final int STATUSLINE = 2;
+	public static final int MSGBOX = 4;
+	public static final int STATUSLINE_REMAIN = 8;
+	
+	static {
+		frameList.add(id);
+	}
+	
+	/**
+	 * Log a severe message using the default flag
+	 * 
+	 * @param message
+	 */
+	public static void severe(String message) {
+		severe(message, STANDARD);
+	}
+	
+	/**
+	 * Log a severe message
+	 * @param message
+	 * @param flag where to print the message
+	 */
+	public static void severe(String message, int flag) {
+		Log.severe(message, flag);
+		if ((flag & STATUSLINE) == STATUSLINE)
+			printStatusLineError(message);
+		if ((flag & MSGBOX) == MSGBOX)
+			printMsgBoxError(message);
+		if ((flag & STATUSLINE_REMAIN) == STATUSLINE_REMAIN)
+			printStatusLineError(message, true);
+	}
+
+	/**
+	 * Log a warning message using the default flag
+	 * 
+	 * @param message
+	 */
+	public static void warning(String message) {
+		warning(message, STANDARD);
+	}
+	
+	/**
+	 * Log a warning message
+	 * @param message
+	 * @param flag where to print the message
+	 */
+	public static void warning(String message, int flag) {
+		Log.warning(message, flag);	
+		if ((flag & STATUSLINE) == STATUSLINE)
+			printStatusLineWarning(message);
+		if ((flag & MSGBOX) == MSGBOX)
+			printMsgBoxWarning(message);
+		if ((flag & STATUSLINE_REMAIN) == STATUSLINE_REMAIN)
+			printStatusLineWarning(message, true);
+	}
+
+	/**
+	 * Log an info message using the default flag
+	 * 
+	 * @param message
+	 */
+	public static void info(String message) {
+		info(message, STANDARD);
+	}
+	
+	/**
+	 * Log an info message
+	 * @param message
+	 * @param flag where to print the message
+	 */
+	public static void info(String message, int flag) {
+		Log.info(message, flag);
+		if ((flag & STATUSLINE) == STATUSLINE)
+			printStatusLineInfo(message);
+		if ((flag & MSGBOX) == MSGBOX)
+			printMsgBoxInfo(message);
+		if ((flag & STATUSLINE_REMAIN) == STATUSLINE_REMAIN)
+			printStatusLineInfo(message, true);
+	}
+	
+	/**
+	 * Print an error message in the StatusLine
+	 * 
+	 * @param message
+	 */
+	private static void printStatusLineError(final String message) {
+		Runnable r = new Runnable() {
+			@Override
+			public void run() {
+				StatusLine.error(message);
+			}
+		};
+		Display.getDefault().syncExec(r);
+	}
+	
+	/**
+	 * Print a remaining error message in the StatusLine
+	 * 
+	 * @param message
+	 */
+	private static void printStatusLineError(final String message, boolean keep) {
+		Runnable r = new Runnable() {
+			@Override
+			public void run() {
+				StatusLine.error(message, true);
+			}
+		};
+		Display.getDefault().syncExec(r);
+	}
+	
+	/**
+	 * Print a warning message in the StatusLine
+	 * 
+	 * @param message
+	 */
+	private static void printStatusLineWarning(final String message) {
+		Runnable r = new Runnable() {
+			@Override
+			public void run() {
+				StatusLine.setMessage(message);
+			}
+		};
+		Display.getDefault().syncExec(r);
+	}
+	
+	/**
+	 * Print a remaining warning message in the StatusLine
+	 * 
+	 * @param message
+	 */
+	private static void printStatusLineWarning(final String message, boolean keep) {
+		Runnable r = new Runnable() {
+			@Override
+			public void run() {
+				StatusLine.setMessage(message, true);
+			}
+		};
+		Display.getDefault().syncExec(r);
+	}
+
+	/**
+	 * Print an info message in the StatusLine
+	 * 
+	 * @param message
+	 */
+	private static void printStatusLineInfo(final String message) {
+		Runnable r = new Runnable() {
+			@Override
+			public void run() {
+				StatusLine.setMessage(message);
+			}
+		};
+		Display.getDefault().syncExec(r);
+	}
+	
+	/**
+	 * Print a remaining info message in the StatusLine
+	 * 
+	 * @param message
+	 */
+	private static void printStatusLineInfo(final String message, boolean keep) {
+		Runnable r = new Runnable() {
+			@Override
+			public void run() {
+				StatusLine.setMessage(message, true);
+			}
+		};
+		Display.getDefault().syncExec(r);
+	}
+	
+	/**
+	 * Print an error message in a MessageBox
+	 * 
+	 * @param message
+	 */
+	private static void printMsgBoxError(String message) {
+		MessageBox.error(message);
+	}
+	
+	/**
+	 * Print a warning message in a MessageBox
+	 * 
+	 * @param message
+	 */
+	private static void printMsgBoxWarning(String message) {
+		MessageBox.warning(message);
+	}
+
+	/**
+	 * Print an info message in a MessageBox
+	 * 
+	 * @param message
+	 */
+	private static void printMsgBoxInfo(String message) {
+		MessageBox.info(message);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/Logger.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/DownloadJobHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/DownloadJobHandler.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/DownloadJobHandler.java	(revision 324)
@@ -0,0 +1,77 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.utils;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.txm.rcp.Messages;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Simplified RCP Job
+ * 
+ * @author mdecorde, nkredens.
+ */
+public class DownloadJobHandler extends JobHandler {
+
+	private File file;
+	private int contentLength;
+	private Boolean done;
+
+	public DownloadJobHandler(String title, File file, int contentLength, Boolean done) {
+		super(title);
+		this.file = file;
+		this.contentLength = contentLength;
+		this.done = done;
+	}
+	
+	@Override
+	protected IStatus run(final IProgressMonitor monitor) {
+		this.runInit(monitor);
+		//this.setCurrentMonitor(monitor);
+		monitor.beginTask(Messages.DownloadJobHandler_0, contentLength);
+		long size = file.length();
+		while (!done) {
+			try {
+				wait(1000);
+				long current_size = file.length();
+				monitor.worked((int) (current_size - size));
+				size = current_size;
+			} catch (InterruptedException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				return Status.CANCEL_STATUS;
+			}
+		}
+
+		return Status.OK_STATUS;
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/DownloadJobHandler.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/Commands.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/Commands.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/Commands.java	(revision 324)
@@ -0,0 +1,58 @@
+package org.txm.rcp.utils;
+
+import java.util.HashMap;
+
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.part.EditorPart;
+
+//import practicallymacro.commands.EclipseCommand;
+
+import org.txm.rcp.Messages;
+
+public class Commands {
+	
+	protected static Commands cmd;
+	
+//	private HashMap<String, EclipseCommand> commands = new HashMap<String, EclipseCommand>();
+	
+	protected Commands()
+	{
+//		final ICommandService cs = (ICommandService) PlatformUI.getWorkbench().getAdapter(ICommandService.class);
+//		Command[] allCommands = cs.getDefinedCommands();
+//		for (Command c : allCommands)
+//		{
+//			try {
+//				commands.put(c.getName(), new EclipseCommand(c.getId()));
+//			} catch (NotDefinedException e) {
+//				// TODO Auto-generated catch block
+//				org.txm.rcp.utils.Logger.printStackTrace(e);
+//			}
+//		}
+//		cmd = this;
+	}
+	
+	public static boolean execute(EditorPart editor, String cmdName)
+	{
+//		if (editor == null || cmdName == null)
+//			return false;
+//		
+//		if (cmd == null)
+//		{
+//			cmd = new Commands();
+//			if (cmd == null)
+//			{
+//				System.out.println(Messages.Commands_0);
+//				return false;
+//			}
+//		}
+//		
+//		if (cmd.commands.containsKey(cmdName))
+//			return cmd.commands.get(cmdName).execute(editor);
+//		
+//		return false;
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/Commands.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/OpenURI.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/OpenURI.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/OpenURI.java	(revision 324)
@@ -0,0 +1,110 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.utils;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.osgi.util.NLS;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class OpenURI.
+ */
+public class OpenURI {
+
+	/**
+	 * Open.
+	 *
+	 * @param file the file
+	 * @return true, if successful
+	 */
+	public static boolean open(File file) {
+
+		try
+		{
+			if ( !java.awt.Desktop.isDesktopSupported() ) {
+				System.err.println( Messages.OpenURI_0 );
+				return false;
+			}
+
+			java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
+
+			if ( desktop.isSupported( java.awt.Desktop.Action.OPEN ) ) {
+
+				desktop.open( file );
+				return true;
+			}
+			else if ( desktop.isSupported( java.awt.Desktop.Action.EDIT ) )
+			{
+				desktop.edit(file);
+				return true;
+			}
+			else if (desktop.isSupported(java.awt.Desktop.Action.BROWSE))
+			{
+				desktop.browse(file.toURI());
+				return true;
+			}
+		}
+		catch(Exception e)
+		{
+			System.out.println(e.getLocalizedMessage());
+			StatusLine.error(NLS.bind(Messages.OpenURI_1, file));
+		}
+		return false;
+	}
+	
+	/**
+	 * Browse.
+	 *
+	 * @param file the file
+	 * @return true, if successful
+	 */
+	public static boolean browse(File file) {
+		if ( !java.awt.Desktop.isDesktopSupported() ) {
+			System.err.println( Messages.OpenURI_0 );
+			return false;
+		}
+		
+		java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
+		
+		if (desktop.isSupported(java.awt.Desktop.Action.BROWSE))
+		{
+			try {
+				desktop.browse(file.toURI());
+			} catch (IOException e) {
+				System.out.println(e.getLocalizedMessage());
+				return false;
+			}
+			return true;
+		}
+		return false;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/OpenURI.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/LanguageSwitchHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/LanguageSwitchHandler.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/LanguageSwitchHandler.java	(revision 324)
@@ -0,0 +1,296 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.utils;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.service.datalocation.Location;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.preferences.LocalePreferencePage;
+import org.txm.rcp.swt.dialog.ComboDialog;
+import org.txm.utils.logger.Log;
+import org.txm.utils.logger.MessageBox;
+// TODO: Auto-generated Javadoc
+/**
+ * Switches the language in RCP based products. Works only if the product is
+ * deployed to the local file system since the <product>.ini file is altered.
+ * 
+ * @see org.eclipse.core.commands.IHandler
+ * @see org.eclipse.core.commands.AbstractHandler
+ */
+public class LanguageSwitchHandler extends AbstractHandler {
+	/**
+	 * The constructor.
+	 */
+	public LanguageSwitchHandler() {
+	}
+
+	/**
+	 * the command has been executed, so extract extract the needed information
+	 * from the application context.
+	 *
+	 * @param event the event
+	 * @return the object
+	 * @throws ExecutionException the execution exception
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		IPreferencesService service = Platform.getPreferencesService();
+		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+				.getShell();
+		ArrayList<String> values = new ArrayList<String>();
+		values.add("fr"); //$NON-NLS-1$
+		values.add("en"); //$NON-NLS-1$
+		values.add("ru"); //$NON-NLS-1$
+		ComboDialog d = new ComboDialog(shell, Messages.LanguageSwitchHandler_3, values,
+				service.getString(Application.PLUGIN_ID,
+						LocalePreferencePage.UI_LOCALE, "fr", null)); //$NON-NLS-1$
+		if (d.open() == Window.OK) {
+			TxmPreferences.set(LocalePreferencePage.UI_LOCALE, d
+					.getSelectedValue());
+		} else
+			return null;
+
+		String locale = service.getString(Application.PLUGIN_ID,
+				LocalePreferencePage.UI_LOCALE, "fr", null); //$NON-NLS-1$
+		if (locale.length() == 0)
+			Log.warning(Messages.LanguageSwitchHandler_0);
+		// Does not work:
+		//System.getProperties().setProperty("eclipse.exitdata", "-nl " + locale);
+		//changeLocaleTXMIni(locale);
+		changeLocaleConfigIni(locale);
+		PlatformUI.getWorkbench().restart();
+
+		return null;
+	}
+
+	/**
+	 * Change locale of TXM.ini.
+	 *
+	 * @param locale the locale
+	 */
+	public static void changeLocaleTXMIni(String locale) {
+
+//		Location configArea = Platform.getInstallLocation();
+//		//MessageBox.warning(Platform.getInstanceLocation().getURL().toString());
+//		// String product = Platform.getProduct().getName();
+//		if (configArea == null) {
+//			return;
+//		}
+
+		URL location = null;
+		try {
+			String path = System.getProperty("osgi.instance.area"); //$NON-NLS-1$
+			location = new URL(path + "TXM.ini"); //$NON-NLS-1$
+		} catch (MalformedURLException e) {
+			System.err.println(NLS.bind(Messages.LanguageSwitchHandler_5, location));
+			return;
+		}
+		
+		String fileName = location.getFile();
+		File file = new File(fileName);
+		if (!file.exists()) {
+			MessageBox.error(NLS.bind(Messages.LanguageSwitchHandler_1, file.getAbsolutePath()));
+			return;
+		}
+		fileName += ".bak"; //$NON-NLS-1$
+		file.renameTo(new File(fileName));
+		
+		// update TXM.ini
+		System.out.println(Messages.LanguageSwitchHandler_7+location);
+		Log.severe(Messages.LanguageSwitchHandler_7+location);
+		try {
+
+			BufferedReader in = new BufferedReader(new FileReader(fileName));
+			BufferedWriter out = new BufferedWriter(new FileWriter(location.getFile()));
+			try {
+				boolean isNl = false;
+				boolean isNlWiritten = false;
+				String line = in.readLine();
+				while (line != null) {
+
+					// write nl before vmargs
+					if (line.equals("-vmargs") && !isNlWiritten) //$NON-NLS-1$
+					{
+						out.write("-nl"); //$NON-NLS-1$
+						out.newLine();
+						out.write(locale);
+						out.newLine();
+						isNl = true;
+					}
+
+					// write line if -nl was not found in previous line
+					// else locale
+					if (!isNl) {
+						out.write(line);
+					} else {
+						out.write(locale);
+						isNl = false;
+						isNlWiritten = true;
+					}
+					out.newLine();
+
+					// check nl line
+					if (line.equals("-nl")) { //$NON-NLS-1$
+						isNl = true;
+					}
+
+					line = in.readLine();
+				}
+				// create nl if it was not presents
+				if (!isNlWiritten) {
+					out.write("-nl"); //$NON-NLS-1$
+					out.newLine();
+					out.write(locale);
+					out.newLine();
+				}
+				out.flush();
+			} finally {
+				if (in != null) {
+					try {
+						in.close();
+					} catch (IOException e) {
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					}
+				}
+				if (out != null) {
+					try {
+						out.close();
+					} catch (IOException e) {
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					}
+				}
+			}
+		} catch (FileNotFoundException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} catch (IOException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+	
+	/**
+	 * Change locale of config.ini.
+	 *
+	 * @param locale the locale
+	 */
+	public static void changeLocaleConfigIni(String locale) {
+
+		Location configArea = Platform.getConfigurationLocation();
+		
+		if (configArea == null) {
+			return;
+		}
+
+		String fileName = Platform.getConfigurationLocation().getURL().getFile() + 
+				System.getProperty("file.separator") + "config.ini"; //$NON-NLS-1$ //$NON-NLS-2$
+
+		File file = new File(fileName);
+		if (!file.exists()) {
+			MessageBox.error(NLS.bind(Messages.LanguageSwitchHandler_1, file.getAbsolutePath()));
+			return;
+		}
+		String fileNameBackup = fileName + ".bak"; //$NON-NLS-1$
+		file.renameTo(new File(fileNameBackup));
+		
+		// update config.ini
+		System.out.println("config.ini"+fileName); //$NON-NLS-1$
+		Log.severe("config.ini"+fileName); //$NON-NLS-1$
+		try {
+
+			BufferedReader in = new BufferedReader(new FileReader(fileNameBackup));
+			BufferedWriter out = new BufferedWriter(new FileWriter(fileName));
+			try {
+				boolean isNlWritten = false;
+				String line = in.readLine();
+				while (line != null) {
+
+					if (!isNlWritten) {
+						if (line.contains("osgi.nl=")) { //$NON-NLS-1$
+							out.write("osgi.nl=" + locale); //$NON-NLS-1$
+							isNlWritten = true;
+						} else
+							out.write(line);
+					} else
+						out.write(line);
+					
+					out.newLine();
+					line = in.readLine();
+				}
+				// create osgi.nl if it was not presents
+				if (!isNlWritten) {
+					out.write("osgi.nl=" + locale); //$NON-NLS-1$
+					out.newLine();
+				}
+				out.flush();
+			} finally {
+				if (in != null) {
+					try {
+						in.close();
+					} catch (IOException e) {
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					}
+				}
+				if (out != null) {
+					try {
+						out.close();
+					} catch (IOException e) {
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					}
+				}
+			}
+		} catch (FileNotFoundException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		} catch (IOException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/LanguageSwitchHandler.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/FitFontSize.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/FitFontSize.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/FitFontSize.java	(revision 324)
@@ -0,0 +1,14 @@
+package org.txm.rcp.utils;
+
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Composite;
+
+public class FitFontSize {
+	public static int calculate(Composite shell, String txt) {
+		
+		GC gc = new GC(shell);
+
+		//return Math.max(shell.getSize().x, gc.stringExtent(txt).x);
+		return gc.stringExtent(txt).x;
+	}
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/FitFontSize.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/IOClipboard.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/IOClipboard.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/IOClipboard.java	(revision 324)
@@ -0,0 +1,117 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.utils;
+
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Shell;
+
+// TODO: Auto-generated Javadoc
+/*
+ import java.awt.Toolkit;
+ import java.awt.datatransfer.DataFlavor;
+ import java.awt.datatransfer.StringSelection;
+ import java.awt.datatransfer.Transferable;
+ */
+/**
+ * manage the clipboard.
+ */
+public class IOClipboard {
+
+	/**
+	 * Read.
+	 *
+	 * @return the string
+	 */
+	public static String read() {
+		Shell sh = new Shell();
+		Clipboard cb = new Clipboard(sh.getDisplay());
+		String data = (String) cb.getContents(TextTransfer.getInstance());
+		sh.close();
+		return data;
+	}
+
+	/**
+	 * Read.
+	 *
+	 * @return the string
+	 */
+	public static String[] readFiles() {
+		Shell sh = new Shell();
+		Clipboard cb = new Clipboard(sh.getDisplay());
+		String[] data = (String[]) cb.getContents(FileTransfer.getInstance());
+		sh.close();
+		return data;
+	}
+	
+	/**
+	 * Write.
+	 *
+	 * @param text the text
+	 */
+	public static void write(String text) {
+		if (text.length() == 0) return;
+		
+		Shell sh = new Shell();
+		Clipboard cb = new Clipboard(sh.getDisplay());
+		TextTransfer textTransfer = TextTransfer.getInstance();
+		cb.setContents(new Object[] { text }, new Transfer[] { textTransfer });
+		sh.close();
+	}
+
+	/*
+	 * public static String read() { Transferable t =
+	 * Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null); try {
+	 * if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
+	 * String text = (String) t.getTransferData(DataFlavor.stringFlavor);
+	 * 
+	 * return text.trim(); } } catch (Exception e) { } return ""; }
+	 * 
+	 * public static void write(String text) { SecurityManager sm =
+	 * System.getSecurityManager(); if (sm != null) { try {
+	 * sm.checkSystemClipboardAccess(); } catch (Exception e)
+	 * {org.txm.rcp.utils.Logger.printStackTrace(e);} } Toolkit tk = Toolkit.getDefaultToolkit();
+	 * StringSelection st = new StringSelection(text);
+	 * java.awt.datatransfer.Clipboard cp = tk.getSystemClipboard();
+	 * cp.setContents(st, null); }
+	 */
+	/**
+	 * The main method.
+	 *
+	 * @param args the arguments
+	 */
+	public static void main(String[] args) {
+		System.out.println("read : "); //$NON-NLS-1$
+		System.out.println(IOClipboard.read());
+		System.out.println("write : sdfgdsfg"); //$NON-NLS-1$
+		IOClipboard.write("dfsgsdgdsg"); //$NON-NLS-1$
+		System.out.println("read : " + IOClipboard.read()); //$NON-NLS-1$
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/IOClipboard.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/GSERunner.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/GSERunner.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/GSERunner.java	(revision 324)
@@ -0,0 +1,114 @@
+package org.txm.rcp.utils;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import org.eclipse.core.internal.runtime.InternalPlatform;
+import org.eclipse.core.runtime.FileLocator;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.wiring.BundleWiring;
+import org.txm.rcp.TXMClassLoader;
+import org.txm.utils.logger.Log;
+
+import groovy.lang.Binding;
+import groovy.util.GroovyScriptEngine;
+import groovy.util.ResourceException;
+import groovy.util.ScriptException;
+
+/**
+ * gse wrapper for TXM scripts and macros
+ * 
+ * @author mdecorde
+ *
+ */
+public class GSERunner extends GroovyScriptEngine {
+
+	public GSERunner(String[] urls, ClassLoader parentClassLoader) throws IOException {
+		super(urls, parentClassLoader);
+	}
+
+	/**
+	 * 
+	 * Simplify the call a Groovy script within a Groovy script and allow to send named and typed arguments
+	 * 
+	 * @param clazz
+	 * @param args
+	 * @return
+	 * @throws ResourceException
+	 * @throws ScriptException
+	 */
+	@SuppressWarnings("rawtypes")
+	public Object run(Class clazz, Map args) throws ResourceException, ScriptException {
+		return run(clazz.getCanonicalName().replace(".", "/")+".groovy", new Binding(args));
+	}
+	
+	/**
+	 * Convenience method exactly the same as calling
+	 * run(class, ["args":args])
+	 * 
+	 * @param clazz
+	 * @param args
+	 * @return
+	 * @throws ResourceException
+	 * @throws ScriptException
+	 */
+	@SuppressWarnings("rawtypes")
+	public Object runMacro(Class clazz, Map args) throws ResourceException, ScriptException {
+		HashMap<String, Object> arrangedMap = new HashMap<String, Object>();
+		arrangedMap.put("args", args);
+		return run(clazz.getCanonicalName().replace(".", "/")+".groovy", new Binding(arrangedMap));
+	}
+		
+	/**
+	 * Convenience method exactly the same as calling
+	 * run(class, ["args":["var":"val, ...]])
+	 * 
+	 * @param clazz
+	 * @param args
+	 * @return
+	 * @throws ResourceException
+	 * @throws ScriptException
+	 */
+	@SuppressWarnings("rawtypes")
+	public Object runMacro(Class clazz) throws ResourceException, ScriptException {
+		HashMap<String, Object> arrangedMap = new HashMap<String, Object>();
+		arrangedMap.put("args", new HashMap<String, Object>());
+		return run(clazz.getCanonicalName().replace(".", "/")+".groovy", new Binding(arrangedMap));
+	}
+	
+	/**
+	 * Creates a new GSERunner and adds to it the class loaders of all installed bundles of the platform. 
+	 * @return a new GSERunner
+	 */
+	public static GSERunner createGSERunner(String[] urls)	{
+		
+		GSERunner gse = null;
+		
+		HashSet<ClassLoader> loaders = new HashSet<ClassLoader>();
+		BundleContext bundleContext = InternalPlatform.getDefault().getBundleContext();
+		
+		for (Bundle b : bundleContext.getBundles()) {
+			BundleWiring bundleWiring = b.adapt(BundleWiring.class);
+			loaders.add(bundleWiring.getClassLoader());
+			
+			//FIXME: debug
+			System.out.println("GSERunner.createGSERunner(): class loader added: " + bundleWiring.getClassLoader());
+		}
+		
+		Log.info("Initializing TXMClassLoader with " + loaders.size() + " bundles.");
+		TXMClassLoader scl = new TXMClassLoader(loaders);
+
+		try {
+			gse = new GSERunner(urls, scl);
+		}
+		catch (IOException e) {
+			e.printStackTrace();
+		}
+		
+		return gse;
+	}
+	
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/GSERunner.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/JobHandler.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/JobHandler.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/JobHandler.java	(revision 324)
@@ -0,0 +1,276 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.utils;
+
+import java.util.concurrent.Semaphore;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.txm.functions.ProgressWatcher;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Simplified RCP Job that implements the Toolbox ProgressWatcher class to allow TBX functions to manager the Job monitor.
+ * 
+ * the implemented run methods returns a Status.OK_STATUS or Status.CANCEL_STATUS that can be tested with the getResult() after the join method is called.
+ * 
+ * it must also call the runInit method to allow th user to force stop the JobThread
+ * 
+ * @author mdecorde, nkredens
+ */
+public abstract class JobHandler extends Job implements ProgressWatcher {
+
+	/** The parent. */
+	//Composite parent;
+	IProgressMonitor currentMonitor;
+
+	protected Thread myThread = null;
+	protected Semaphore mySemaphore;
+	protected boolean canBeInterrupted = false;
+	
+	protected boolean success = false;
+	/**
+	 * Instantiates a new job handler.
+	 * 
+	 * @param title
+	 *            the title
+	 * @param parent
+	 *            the parent
+	 */
+	public JobHandler(String title, Composite parent) {
+		super(title);
+		//this.parent = parent;
+		this.setUser(true);
+	}
+
+	/**
+	 * You must set the current monitor to be available to manage the process
+	 * progress
+	 * 
+	 * @param monitor
+	 */
+	public void setCurrentMonitor(IProgressMonitor monitor) {
+		currentMonitor = monitor;
+	}
+	
+	@Override
+	public void beginTask(String name, long totalWork) {
+		if (currentMonitor != null) {
+			currentMonitor.beginTask(name, (int) totalWork);
+		}
+	}
+
+	@Override
+	public void worked(int amount) {
+		if (currentMonitor != null) {
+			currentMonitor.worked(amount);
+		}
+	}
+	
+
+	@Override
+	public void worked() {
+		if (currentMonitor != null) {
+			currentMonitor.worked(1);
+		}
+	}
+
+	@Override
+	public void worked(int amount, String message) {
+		if (currentMonitor != null) {
+			currentMonitor.worked(amount);
+			currentMonitor.subTask(message);
+		}
+	}
+
+	@Override
+	public void setMessage(String message) {
+		if (currentMonitor != null)
+			currentMonitor.subTask(message);
+	}
+
+	@Override
+	public boolean isCanceled() {
+		if (currentMonitor != null) {
+			return currentMonitor.isCanceled();
+		}
+		return false;
+	}
+
+	@Override
+	public void done() {
+		if (currentMonitor != null) {
+			currentMonitor.done();
+		}
+	}
+	
+	@Override
+	public void acquireSemaphore() {
+		try {
+			this.mySemaphore.acquire();
+		} catch (InterruptedException e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+
+	@Override
+	public boolean tryAcquireSemaphore() {
+		return this.mySemaphore.tryAcquire();
+	}
+
+	@Override
+	public void releaseSemaphore() {
+		this.mySemaphore.release();
+		if (isCanceled()) {
+			canceling();
+		}
+	}
+
+	/**
+	 * Create a job in RCP scheduler.
+	 * 
+	 * @param title
+	 *            the title
+	 */
+	public JobHandler(String title) {
+		super(title);
+		this.setUser(true);
+	}
+
+	/**
+	 * Instantiates a new job handler.
+	 * 
+	 * @param title
+	 *            the title
+	 * @param parent
+	 *            the parent
+	 * @param show
+	 *            the show
+	 */
+	public JobHandler(String title, Composite parent, boolean show) {
+		super(title);
+		this.setUser(show);
+	}
+
+	/**
+	 * Instantiates a new job handler.
+	 * 
+	 * @param title
+	 *            the title
+	 * @param show
+	 *            the show
+	 */
+	public JobHandler(String title, boolean show) {
+		super(title);
+		this.setUser(show);
+	}
+
+	/*
+	 * use this function to do something with SWT objects
+	 */
+	/**
+	 * Sync exec.
+	 * 
+	 * @param runable
+	 *            the runable
+	 */
+	public void syncExec(Runnable runable) {
+		Display.getDefault().syncExec(runable);
+	}
+
+	public void startJob() {
+		startJob(false);
+	}
+	
+	/**
+	 * Start job.
+	 */
+	public void startJob(boolean modal) {
+		if (modal) {
+			this.setRule(org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot());// set modal job
+		}
+		this.setUser(true);// show popup
+		this.schedule();// start
+	}
+
+	/**
+	 * Allows the job to be interrupted
+	 * 
+	 * @param monitor
+	 */
+	protected void runInit(IProgressMonitor monitor) {
+		this.myThread = Thread.currentThread();
+		this.mySemaphore = new Semaphore(1);
+		this.currentMonitor = monitor;
+		this.canBeInterrupted = true;
+	}
+
+	/**
+	 * Action when user requests for interruption
+	 */
+	@Override
+	protected void canceling() {
+		if (this.myThread == null)
+			return;
+		if (!this.canBeInterrupted) // Prevent thread system interruption (ThreadDeath not handled by the programmer)
+			return;
+		
+		Log.info(this.getName() + Messages.JobHandler_2);
+		
+		try {
+			System.out.println(Messages.JobHandler_1 + " " + this.getName()); //$NON-NLS-1$
+			this.syncExec(new Runnable() {
+				@Override
+				public void run() {
+					StatusLine.setMessage(Messages.JobHandler_0);
+				}
+			});
+			this.currentMonitor.setTaskName(Messages.JobHandler_0);
+			this.mySemaphore.acquire();
+			this.myThread.stop();
+		} catch (Exception e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+			Log.severe(Messages.JobHandler_3 + this.getName());
+		}
+	}
+
+	/**
+	 * can be used to store the job result after join() has been called
+	 * 
+	 * @return
+	 */
+	public Object getResultObject() {
+		return null;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/JobHandler.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/SWTEditorsUtils.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/SWTEditorsUtils.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/SWTEditorsUtils.java	(revision 324)
@@ -0,0 +1,106 @@
+/**
+ * 
+ */
+package org.txm.rcp.utils;
+
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
+import org.eclipse.e4.ui.model.application.ui.basic.MStackElement;
+import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicFactoryImpl;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.EditorPart;
+
+/**
+ * Utility class to manage EditorPart.
+ * Methods that modify the UI are intended to be called in the UI thread.
+ * @author sjacquot
+ *
+ */
+public class SWTEditorsUtils {
+	
+	/**
+	 * Checks if the editor specified by its editor input is already open in the active page.
+	 * @param editorInput
+	 * @return
+	 */
+	public static boolean isOpenEditor(IEditorInput editorInput)	{
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		IWorkbenchPage page = window.getActivePage();
+
+		return (page.findEditor(editorInput) != null);
+	}
+
+	/**
+	 * Checks if the specified editor is already open in the active page.
+	 * @param editor
+	 * @return
+	 */
+	public static boolean isOpenEditor(EditorPart editor)	{
+		return isOpenEditor(editor.getEditorInput());
+	}
+
+	/**
+	 * Splits the parent area of an editor and add another one in this area by splitting it. 
+	 * (Same behavior than the splitting drag and drop event on editor.)
+	 * @param parentEditor
+	 * @param editorToAdd
+	 * @param position
+	 * @param percent
+	 */
+	public static void addEditor(EditorPart parentEditor, EditorPart editorToAdd, int position, float percent) {
+		addPart((MPart) parentEditor.getSite().getService(MPart.class), (MPart) editorToAdd.getSite().getService(MPart.class), position, percent);
+	}
+
+	/**
+	 * Splits the parent area of an editor and add another one in this area by splitting it by the middle. 
+	 * (Same behavior than the splitting drag and drop event on editor.)
+	 * 
+	 * @param parentEditor
+	 * @param editorToAdd
+	 * @param position
+	 * @param percent
+	 */
+	public static void addEditor(EditorPart parentEditor, EditorPart editorToAdd, int position) {
+		addEditor(parentEditor, editorToAdd, position, 0.5f);
+	}
+	
+	/**
+	 * Splits the parent area of a part and add another one in this area by splitting it. 
+	 * (Same behavior than the splitting drag and drop event on editor.)
+	 * 
+	 * @param percent
+	 * @param position
+	 * @param parentPart
+	 * @param partToAdd
+	 */
+	public static void addPart(MPart parentPart, MPart partToAdd, int position, float percent) {
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		EModelService service = (EModelService) window.getService(EModelService.class);
+		MPartStack stackToInsert = createPartStack(partToAdd);
+
+		MUIElement parent = parentPart.getParent();
+		while (!(parent instanceof MPartSashContainerElement))	{
+			parent = parent.getParent();
+		}
+		service.insert(stackToInsert, (MPartSashContainerElement) parent, position, percent);
+	}
+	
+	/**
+	 * Creates a part stack for the specified part.
+	 * @param part
+	 * @return
+	 */
+	private static MPartStack createPartStack(MPart part) {
+		MStackElement stackElement = part;
+		MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
+		stack.getChildren().add(stackElement);
+		stack.setSelectedElement(stackElement);
+		return stack;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/SWTEditorsUtils.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ConcordancerPreferenceInitializer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ConcordancerPreferenceInitializer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ConcordancerPreferenceInitializer.java	(revision 324)
@@ -0,0 +1,64 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.txm.rcp.Activator;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ConcordancerPreferenceInitializer.
+ */
+public class ConcordancerPreferenceInitializer extends
+		AbstractPreferenceInitializer {
+
+	/** The Constant N_LINE_PER_PAGE_DEFAULT. */
+	public static final int N_LINE_PER_PAGE_DEFAULT = 100;
+	
+	/** The Constant LEFT_CONTEXT_SIZE_DEFAULT. */
+	public static final int LEFT_CONTEXT_SIZE_DEFAULT = 15;
+	
+	/** The Constant RIGHT_CONTEXT_SIZE_DEFAULT. */
+	public static final int RIGHT_CONTEXT_SIZE_DEFAULT = 15;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+	 */
+	@Override
+	public void initializeDefaultPreferences() {
+		Activator a = Activator.getDefault();
+		IPreferenceStore store = a.getPreferenceStore();
+		store.setDefault(ConcordancerPreferencePage.N_LINE_PER_PAGE,
+				N_LINE_PER_PAGE_DEFAULT);
+		store.setDefault(ConcordancerPreferencePage.LEFT_CONTEXT_SIZE,
+				LEFT_CONTEXT_SIZE_DEFAULT);
+		store.setDefault(ConcordancerPreferencePage.RIGHT_CONTEXT_SIZE,
+				RIGHT_CONTEXT_SIZE_DEFAULT);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ConcordancerPreferenceInitializer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TXMPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TXMPreferencePage.java	(revision 323)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TXMPreferencePage.java	(revision 324)
@@ -37,6 +37,7 @@
 
 /**
  * TXM base preference page.
+ * 
  * @author mdecorde
  * @author sjacquot
  *
@@ -80,9 +81,9 @@
 			super.performOk();
 			((ScopedPreferenceStore) this.getPreferenceStore()).save();
 			// FIXME: to remove after the plug-ins split
-			//Toolbox.updateProperties(org.txm.rcpapplication.ApplicationWorkbenchAdvisor.getProperties());
+			//Toolbox.updateProperties(org.txm.rcp.ApplicationWorkbenchAdvisor.getProperties());
 		} catch (Exception e) {
-			System.err.println(org.txm.rcpapplication.Messages.FAILED_TO_SAVE_PREFERENCES + e);
+			System.err.println(org.txm.rcp.Messages.FAILED_TO_SAVE_PREFERENCES + e);
 		}
 		return true;
 	}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java	(revision 324)
@@ -0,0 +1,206 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import java.io.IOException;
+import java.util.Set;
+
+import org.eclipse.jface.preference.ComboFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ExportPreferencePage.
+ */
+public class ImportPreferencePage extends FieldEditorPreferencePage implements
+		IWorkbenchPreferencePage {
+
+
+	
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.preferences.ImportPreferencePage"; //$NON-NLS-1$
+
+
+	/** The encoding. */
+	private ComboFieldEditor encoding;
+	
+	/** The colseparators. */
+	private ComboFieldEditor colseparators;
+	
+	/** The txtseparators. */
+	private ComboFieldEditor txtseparators;
+	
+	private StringFieldEditor defaultlang;
+	
+	private StringFieldEditor empty_code;
+
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/**
+	 * Instantiates a new export preference page.
+	 */
+	public ImportPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.ExportPreferencePage_1);
+		setTitle(Messages.ExportPreferencePage_1);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		Set<String> encodings = java.nio.charset.Charset.availableCharsets()
+				.keySet();
+		String[][] values = new String[encodings.size()][2];
+		int i = 0;
+		for (String s : encodings) {
+			values[i][0] = values[i][1] = s;
+			i++;
+		}
+
+		if (TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.METADATA_ENCODING) == null)
+			TxmPreferences.set(TBXPreferences.METADATA_ENCODING, "UTF-8"); //$NON-NLS-1$
+		if (TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.METADATA_COLSEPARATOR) == null)
+			TxmPreferences.set(TBXPreferences.METADATA_COLSEPARATOR, ","); //$NON-NLS-1$
+//		if (TxmPreferences.get(METADATA_TXTSEPARATOR) == null) {
+//			System.out.println("SET DEFAULT VALUE FOR METADATA_TEXTSEPARATOR");
+//			TxmPreferences.set(METADATA_TXTSEPARATOR, "\""); //$NON-NLS-1$
+//		}
+
+		Group csvMetadataGroup = new Group(getFieldEditorParent(), SWT.NONE);
+		csvMetadataGroup.setText(Messages.ImportPreferencePage_2);
+		GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, false);
+		gridData2.horizontalSpan = 3;
+		gridData2.verticalIndent = 10;
+		csvMetadataGroup.setLayoutData(gridData2);
+//		RowLayout rlayout = new RowLayout(SWT.VERTICAL);
+//		rlayout.marginHeight = 150;
+//		rlayout.marginLeft = 150;
+//		rlayout.marginTop = 150;
+//		rlayout.marginRight = 150;
+//		rlayout.marginBottom = 150;
+		GridLayout gridlayout = new GridLayout(3, false);
+		gridlayout.marginWidth = 3;
+		csvMetadataGroup.setLayout(gridlayout);
+		
+		
+		encoding = new ComboFieldEditor(TBXPreferences.METADATA_ENCODING,
+				Messages.ImportPreferencePage_0, values, csvMetadataGroup);
+		addField(encoding);
+		
+		String[][] cols = {{"TAB","\t"}, {",", ","}, {";", ";"}}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+		String txts[][] = {{"none", ""}, {"\"", "\""}, {"'", "'"}}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+		colseparators = new ComboFieldEditor(TBXPreferences.METADATA_COLSEPARATOR,
+				Messages.ExportPreferencePage_18, cols, csvMetadataGroup);
+		addField(colseparators);
+
+		txtseparators = new ComboFieldEditor(TBXPreferences.METADATA_TXTSEPARATOR,
+				Messages.ExportPreferencePage_19, txts, csvMetadataGroup);
+		addField(txtseparators);
+		
+		Group langGroup = new Group(getFieldEditorParent(), SWT.NONE);
+		langGroup.setText(Messages.ImportPreferencePage_3);
+		gridData2 = new GridData(SWT.FILL, SWT.FILL, true, false);
+		gridData2.horizontalSpan = 3;
+		gridData2.verticalIndent = 10;
+		langGroup.setLayoutData(gridData2);
+		RowLayout rlayout = new RowLayout(SWT.VERTICAL);
+		rlayout.marginHeight = 5;
+		langGroup.setLayout(rlayout);
+		
+		defaultlang = new StringFieldEditor(TBXPreferences.IMPORT_DEFAULT_LANG,
+				Messages.ImportPreferencePage_4, langGroup);
+		defaultlang.setEmptyStringAllowed(false);
+		
+		Label l = new Label(langGroup, SWT.NONE);
+		l.setText(Messages.ImportPreferencePage_5);
+		GridData ldata = new GridData(SWT.FILL, SWT.FILL, true, false);
+		ldata.horizontalSpan = 3;
+		l.setLayoutData(ldata);
+		addField(defaultlang);
+		
+		empty_code = new StringFieldEditor(TBXPreferences.CQP_EMPTY_VALUE_CODE,
+				"Empty property value code", getFieldEditorParent());
+		addField(empty_code);
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			
+//			org.txm.Toolbox
+//					.updateProperties(org.txm.rcp.ApplicationWorkbenchAdvisor
+//							.getProperties());			
+		} catch (IOException e) {
+			System.err.println(NLS.bind(
+					Messages.FAILED_TO_SAVE_PREFERENCES, e));
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/AnnotationPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/AnnotationPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/AnnotationPreferencePage.java	(revision 324)
@@ -0,0 +1,131 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+/**
+ * This class represents a preference page that is contributed to the
+ * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>, we
+ * can use the field support built into JFace that allows us to create a page
+ * that is small and knows how to save, restore and apply itself.
+ * <p>
+ * This page is used to modif y preferences only. They are stored in the
+ * preference store that belongs to the main plug-in class. That way,
+ * preferences can be accessed directly via the preference store.
+ */
+
+public class AnnotationPreferencePage extends FieldEditorPreferencePage implements
+		IWorkbenchPreferencePage {
+
+	/** The Constant DISPLAY. */
+	public static final String MODE = "annotation_mode"; //$NON-NLS-1$
+	
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.preferences.AnnotationPreferencePage"; //$NON-NLS-1$
+
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	//private BooleanFieldEditor mode_expert;
+	private RadioGroupFieldEditor mode_annotation;
+
+	/**
+	 * Instantiates a new cAH preference page.
+	 */
+	public AnnotationPreferencePage() {
+		super(GRID);
+		
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		setTitle("Annotation");
+	}
+
+	/**
+	 * Creates the field editors. Field editors are abstractions of the common
+	 * GUI blocks needed to manipulate various types of preferences. Each field
+	 * editor knows how to save and restore itself.
+	 */
+	@Override
+	public void createFieldEditors() {
+
+		/*BooleanFieldEditor mode_expert = new BooleanFieldEditor(MODE,
+				Messages.AnnotationPreferences_0, getFieldEditorParent());	
+		addField(mode_expert);*/
+		
+		String[][] labelAndValues = {
+				{Messages.AnnotationPreferences_1, "simple"},
+				{Messages.AnnotationPreferences_2, "advanced"}}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		
+		mode_annotation = new RadioGroupFieldEditor(MODE, Messages.AnnotationPreferences_0, 2, labelAndValues, getFieldEditorParent());
+		addField(mode_annotation);
+		//mode_annotation.setPreferenceStore(store);
+		
+	}
+
+	
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true; // Otherwise the behaviour is so strange ....
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+		} catch (Exception e) {
+			System.err.println(Messages.FAILED_TO_SAVE_PREFERENCES + e);
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/AnnotationPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ScriptPreferenceInitializer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ScriptPreferenceInitializer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ScriptPreferenceInitializer.java	(revision 324)
@@ -0,0 +1,61 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Activator;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ScriptPreferenceInitializer.
+ */
+public class ScriptPreferenceInitializer extends AbstractPreferenceInitializer {
+	
+	/** The txmhome. */
+	static String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+	
+	/** The Constant SCRIPT_ROOT_DIR_DEFAULT. */
+	public static final String SCRIPT_ROOT_DIR_DEFAULT = txmhome + File.separator + File.separator + "scripts"; //$NON-NLS-1$ 
+
+	/** The Constant SCRIPT_CURRENT_DIR_DEFAULT. */
+	public static final String SCRIPT_CURRENT_DIR_DEFAULT = txmhome + File.separator + "scripts"; //$NON-NLS-1$ 
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+	 */
+	@Override
+	public void initializeDefaultPreferences() {
+		Activator a = Activator.getDefault();
+		a.getPreferenceStore();
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ScriptPreferenceInitializer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TXMMainPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TXMMainPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TXMMainPreferencePage.java	(revision 324)
@@ -0,0 +1,230 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatePlugin;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.StringButtonFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.osgi.service.prefs.Preferences;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.swt.dialog.LastOpened;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TextometriePreferencePage.
+ */
+public class TXMMainPreferencePage extends TXMPreferencePage {
+
+	/** The preferences. */
+//	StringButtonFieldEditor buttonExport, buttonImport;
+	private BooleanFieldEditor update;
+	
+	/**
+	 * Instantiates a new Wordcloud preference page.
+	 */
+	public TXMMainPreferencePage() {
+		super();
+	}
+	
+	@Override
+	public void init(IWorkbench workbench) {
+		this.setPreferenceStore(new TXMPreferenceStore(TBXPreferences.PREFERENCES_NODE));
+		this.setImageDescriptor(IImageKeys.getImageDescriptor(IImageKeys.WORLD));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		Group generalGroup = new Group(getFieldEditorParent(), SWT.NONE);
+		generalGroup.setText(Messages.TextometriePreferencePage_1);
+		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
+		gridData.horizontalSpan = 2;
+		generalGroup.setLayoutData(gridData);
+		generalGroup.setLayout(new RowLayout(SWT.VERTICAL));
+
+
+//		buttonExport = new StringButtonFieldEditor("export_prefs", "", generalGroup) { //$NON-NLS-1$ //$NON-NLS-2$
+//			@Override
+//			protected String changePressed() {
+//				FileDialog dialog = new FileDialog(new Shell(), SWT.SAVE);
+//				if (LastOpened.getFile(TXMMainPreferencePage.class.getName()) != null) {
+//					dialog.setFilterPath(LastOpened.getFolder(TXMMainPreferencePage.class.getName()));
+//					dialog.setFileName(LastOpened.getFile(TXMMainPreferencePage.class.getName()));
+//				}
+//				String path = dialog.open();
+//				if (path != null) {
+//					File export = new File(path);
+//					LastOpened.set(TXMMainPreferencePage.class.getName(), export.getParent(), export.getName());
+//					FileWriter writer;
+//					try {
+//						//Preferences prefs = Platform.getPreferencesService().getRootNode().node(TxmPreferences.SCOPE); //$NON-NLS-1$
+//						Preferences prefs = TXMPreferences.getPreferences();
+////						writer = new FileWriter(export);
+////						Properties txmprops = org.txm.rcp.ApplicationWorkbenchAdvisor
+////								.getProperties();
+////						Set<Object> tbxKeys = txmprops.keySet();
+////
+////						TxmPreferences.set("software", "TXM"); //$NON-NLS-1$ //$NON-NLS-2$
+////						org.osgi.framework.Version v = Activator.getDefault().getBundle().getVersion();
+////						TxmPreferences.set("version", v.toString()); //$NON-NLS-1$
+////
+////						// write props for the TBX
+////						for(Object prop : txmprops.keySet()) {
+////							writer.write(""+prop+"="+txmprops.get(prop)+"\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+////						}
+////						writer.write("\n"); //$NON-NLS-1$
+////						// write RCP props
+////						
+////						for (String child : prefs.childrenNames()) {
+////							Preferences childNode = prefs.node(child);
+////							for (String key : childNode.keys()) {
+////								if (!tbxKeys.contains(key)) {
+////									Object value = childNode.get(key, null);
+////									if (value != null)
+////										writer.write(""+key+"="+value+"\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+////								}
+////							}
+////						}
+////						writer.close();
+//
+//						IPreferencesService service = Platform.getPreferencesService();
+//						service.exportPreferences((IEclipsePreferences) prefs,new BufferedOutputStream(new FileOutputStream(export)), null);
+//						System.out.println(Messages.TextometriePreferencePage_14+export);
+//					} catch (IOException e) {
+//						// TODO Auto-generated catch block
+//						org.txm.rcp.utils.Logger.printStackTrace(e);
+////					} catch (BackingStoreException e) {
+////						// TODO Auto-generated catch block
+////						org.txm.rcp.utils.Logger.printStackTrace(e);
+//					} catch (CoreException e) {
+//						// TODO Auto-generated catch block
+//						org.txm.rcp.utils.Logger.printStackTrace(e);
+//					}
+//				}
+//				return path;
+//			}
+//		};
+//		buttonExport.setChangeButtonText(Messages.TextometriePreferencePage_15);
+//		addField(buttonExport);
+//
+//		buttonImport = new StringButtonFieldEditor("import_prefs", "", generalGroup) { //$NON-NLS-1$ //$NON-NLS-2$
+//			@Override
+//			protected String changePressed() {
+//				FileDialog dialog = new FileDialog(new Shell(), SWT.OPEN);
+//				if (LastOpened.getFile(TXMMainPreferencePage.class.getName()) != null) {
+//					dialog.setFilterPath(LastOpened.getFolder(TXMMainPreferencePage.class.getName()));
+//					dialog.setFileName(LastOpened.getFile(TXMMainPreferencePage.class.getName()));
+//				}
+//				String path = dialog.open();
+//				if (path != null) {
+//					File export = new File(path);
+//					LastOpened.set(TXMMainPreferencePage.class.getName(), export);
+//					IPreferencesService service = Platform.getPreferencesService();
+//					
+//					//Preferences prefs = service.getRootNode().node("configuration");
+//					try {
+//						service.importPreferences(new FileInputStream(export));
+//						System.out.println(Messages.TextometriePreferencePage_18+export);
+//						System.out.println(Messages.TextometriePreferencePage_19);
+//						performOk();
+//
+//						Composite composite = TXMMainPreferencePage.this.getControl().getParent();
+//						composite.getShell().close();
+//					} catch (FileNotFoundException e) {
+//						org.txm.rcp.utils.Logger.printStackTrace(e);
+//					} catch (CoreException e) {
+//						org.txm.rcp.utils.Logger.printStackTrace(e);
+//					} catch (IOException e) {
+//						org.txm.rcp.utils.Logger.printStackTrace(e);
+//					}
+//				}
+//				return path;
+//			}
+//		};
+//		buttonImport.setChangeButtonText(Messages.TextometriePreferencePage_20);
+//		addField(buttonImport);
+
+		// disable if expert user
+		if (!TXMPreferences.getBoolean(TBXPreferences.PREFERENCES_NODE, TBXPreferences.EXPERT_USER)) {
+			Group updateGroup = new Group(getFieldEditorParent(), SWT.NONE);
+			updateGroup.setText(Messages.TextometriePreferencePage_2);
+			GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, false);
+			gridData2.horizontalSpan = 2;
+			gridData2.verticalIndent = 10;
+			updateGroup.setLayoutData(gridData2);
+			updateGroup.setLayout(new RowLayout(SWT.VERTICAL));
+			
+			//System.out.println(AutomaticUpdatePlugin.getDefault().getStateLocation());
+			final IPreferenceStore updatePrefStore = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
+			update = new BooleanFieldEditor(TBXPreferences.FETCH_UPDATES_AT_STARTUP,
+					Messages.TextometriePreferencePage_0, updateGroup);
+			
+			//update.setPreferenceStore(updatePrefStore);
+			//boolean enabled = updatePrefStore.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED);
+//			System.out.println("before load: "+updatePrefStore.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
+			//update.load();
+//			System.out.println("after 1st load: "+updatePrefStore.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
+			addField(update);
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TXMMainPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/UserPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/UserPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/UserPreferencePage.java	(revision 324)
@@ -0,0 +1,129 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class UserPreferencePage.
+ */
+public class UserPreferencePage extends FieldEditorPreferencePage implements
+		IWorkbenchPreferencePage {
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.preferences.UserPreferencePage"; //$NON-NLS-1$
+	
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/** The Constant USER_ALERT_DELETE. */
+	public static final String USER_ALERT_DELETE = "user_alert_delete"; //$NON-NLS-1$
+	
+	public static final String AUTO_UPDATE_EDITOR = "auto_update_editor"; //$NON-NLS-1$
+	
+	/** The Constant PROPERTY_SEPARATOR. */
+	public static final String PROPERTY_SEPARATOR = "property_separator"; //$NON-NLS-1$
+
+	/** The alert_delete. */
+	private BooleanFieldEditor alert_delete;
+	private BooleanFieldEditor auto_update_editor;
+
+	/**
+	 * Instantiates a new user preference page.
+	 */
+	public UserPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		setTitle(Messages.UserPreferencePage_0);
+		//setDescription(Messages.UserPreferencePage_0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true; // Otherwise the bahaviour is so strange ....
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			// System.out.println("User ok");
+			// System.out.println(org.txm.rcp.ApplicationWorkbenchAdvisor.getProperties());
+			//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+		} catch (IOException e) {
+			System.err.println(NLS.bind(
+					Messages.FAILED_TO_SAVE_PREFERENCES, e));
+		}
+		return super.performOk();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		alert_delete = new BooleanFieldEditor(USER_ALERT_DELETE,
+				Messages.UserPreferencePage_3,
+				BooleanFieldEditor.SEPARATE_LABEL, getFieldEditorParent());
+		addField(alert_delete);
+		
+		auto_update_editor = new BooleanFieldEditor(AUTO_UPDATE_EDITOR,
+				Messages.UserPreferencePage_1,
+				BooleanFieldEditor.SEPARATE_LABEL, getFieldEditorParent());
+		addField(auto_update_editor);
+		
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/UserPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ReferencerPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ReferencerPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ReferencerPreferencePage.java	(revision 324)
@@ -0,0 +1,123 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+
+/**
+ * This class represents a preference page that is contributed to the
+ * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>, we
+ * can use the field support built into JFace that allows us to create a page
+ * that is small and knows how to save, restore and apply itself.
+ * <p>
+ * This page is used to modif y preferences only. They are stored in the
+ * preference store that belongs to the main plug-in class. That way,
+ * preferences can be accessed directly via the preference store.
+ */
+
+public class ReferencerPreferencePage extends FieldEditorPreferencePage
+		implements IWorkbenchPreferencePage {
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.preferences.ReferencerPreferencePage"; //$NON-NLS-1$
+	
+	/** The Constant SORTBYFREQ. */
+	public static final String SORTBYFREQ = "referencer_sorttype"; //$NON-NLS-1$
+
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/** The referencer_sorttype. */
+	private BooleanFieldEditor referencer_sorttype;
+
+	/**
+	 * Instantiates a new referencer preference page.
+	 */
+	public ReferencerPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.DiagnosticPreferencePage_1);
+		setTitle(Messages.ReferencerPreferencePage_2);
+	}
+
+	/**
+	 * Creates the field editors. Field editors are abstractions of the common
+	 * GUI blocks needed to manipulate various types of preferences. Each field
+	 * editor knows how to save and restore itself.
+	 */
+	@Override
+	public void createFieldEditors() {
+
+		referencer_sorttype = new BooleanFieldEditor(SORTBYFREQ,
+				Messages.ReferencerPreferencePage_3, getFieldEditorParent());
+		
+		addField(referencer_sorttype);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true; // Otherwise the bahaviour is so strange ....
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+		} catch (Exception e) {
+			System.err.println(Messages.FAILED_TO_SAVE_PREFERENCES + e);
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ReferencerPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/OpenPathFromPreferenceFieldEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/OpenPathFromPreferenceFieldEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/OpenPathFromPreferenceFieldEditor.java	(revision 324)
@@ -0,0 +1,73 @@
+package org.txm.rcp.preferences;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.txm.rcp.TxmPreferences;
+
+public class OpenPathFromPreferenceFieldEditor extends BooleanFieldEditor {
+	private Button theCheckBox;
+	String preferenceName;
+	public OpenPathFromPreferenceFieldEditor(String name, String title, Composite parent, String preferencename) {
+		super(name, title, parent);
+		this.preferenceName = preferencename;
+	}
+
+	/**
+	 * Returns the change button for this field editor.
+	 * 
+	 * @param parent
+	 *            The Composite to create the receiver in.
+	 * 
+	 * @return the change button
+	 */
+	@Override
+	protected Button getChangeControl(Composite parent) {
+		
+		if (theCheckBox == null) {
+			theCheckBox = super.getChangeControl(parent);
+			theCheckBox.dispose();
+			theCheckBox = new Button(parent, SWT.PUSH | SWT.LEFT);
+			theCheckBox.setFont(parent.getFont());
+			theCheckBox.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
+					try {
+						String path = TxmPreferences.get(preferenceName);
+						if (path == null | path.length() == 0) {
+							System.out.println(preferenceName+" preference is not set.");
+							return;
+						}
+						File dir = new File(path);
+						if (dir.exists()) {
+							desktop.open(dir);
+						} else {
+							System.out.println("Cannot open: "+dir);
+						}
+					} catch (IOException e1) {
+						// TODO Auto-generated catch block
+						e1.printStackTrace();
+					}
+				}
+			});
+			theCheckBox.addDisposeListener(new DisposeListener() {
+				@Override
+				public void widgetDisposed(DisposeEvent event) {
+					theCheckBox = null;
+				}
+			});
+		} else {
+			checkParent(theCheckBox, parent);
+		}
+		return theCheckBox;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/OpenPathFromPreferenceFieldEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ExportPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ExportPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ExportPreferencePage.java	(revision 324)
@@ -0,0 +1,196 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import java.io.IOException;
+import java.util.Set;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.ComboFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ExportPreferencePage.
+ */
+public class ExportPreferencePage extends FieldEditorPreferencePage implements
+		IWorkbenchPreferencePage {
+	
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.preferences.ExportPreferencePage"; //$NON-NLS-1$
+	
+	
+
+	/** The show_export. */
+	private BooleanFieldEditor show_export;
+	
+	/** The encoding. */
+	private ComboFieldEditor encoding;
+	
+	/** The colseparators. */
+	private ComboFieldEditor colseparators;
+	
+	/** The txtseparators. */
+	private ComboFieldEditor txtseparators;
+	
+	/** The devices. */
+	private ComboFieldEditor devices;
+
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/**
+	 * Instantiates a new export preference page.
+	 */
+	public ExportPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.ExportPreferencePage_1);
+		setTitle(Messages.ExportPreferencePage_1);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		Set<String> encodings = java.nio.charset.Charset.availableCharsets()
+				.keySet();
+		String[][] values = new String[encodings.size()][2];
+		int i = 0;
+		for (String s : encodings) {
+			values[i][0] = values[i][1] = s;
+			i++;
+		}
+
+		if (TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.EXPORT_ENCODING) == null)
+			TxmPreferences.set(TBXPreferences.EXPORT_ENCODING, System
+					.getProperty("file.encoding")); //$NON-NLS-1$
+		if (TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.EXPORT_COLSEPARATOR) == null)
+			TxmPreferences.set(TBXPreferences.EXPORT_COLSEPARATOR, ","); //$NON-NLS-1$
+		if (TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.EXPORT_TXTSEPARATOR) == null)
+			TxmPreferences.set(TBXPreferences.EXPORT_TXTSEPARATOR, "\""); //$NON-NLS-1$
+		
+
+		encoding = new ComboFieldEditor(TBXPreferences.EXPORT_ENCODING,
+				Messages.ExportPreferencePage_3, values, getFieldEditorParent());
+		addField(encoding);
+		
+		String[][] cols = {{"\t","\t"}, {",", ","}, {";", ";"}}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+		String txts[][] = {{"", ""}, {"\"", "\""}, {"'", "'"}}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+		colseparators = new ComboFieldEditor(TBXPreferences.EXPORT_COLSEPARATOR,
+				Messages.ExportPreferencePage_18, cols, getFieldEditorParent());
+		addField(colseparators);
+		
+		
+		txtseparators = new ComboFieldEditor(TBXPreferences.EXPORT_TXTSEPARATOR,
+				Messages.ExportPreferencePage_19, txts, getFieldEditorParent());
+		addField(txtseparators);
+
+		show_export = new BooleanFieldEditor(TBXPreferences.EXPORT_SHOW,
+				Messages.ExportPreferencePage_4,
+				BooleanFieldEditor.SEPARATE_LABEL, getFieldEditorParent());
+		
+		
+		//FIXME: move this code to org.txm.jfreechart.rcp and other SWT components provider implementations
+		// Default charts export format
+//		String[][] devicesvalues = new String[SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().size()][2];
+//		for(int j = 0; j < SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().size(); j++) {
+//			devicesvalues[j][0] = devicesvalues[j][1] = SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().get(j);
+//		}
+//		// FIXME : rename the preference "RDEVICE" and store it at charts engine level
+//		// FIXME : change the Messages.ExportPreferencePage_21 message to "Default chart export file format", "Format de fichier d'export des graphiques par défaut", todo : russian
+//		if(SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().size() > 0)	{
+//			String defaultdevice = TxmPreferences.get(RDEVICE);
+//			if (defaultdevice == null)	{
+//				TxmPreferences.set(RDEVICE, SWTChartsComponentsProvider.getCurrent().getEditorSupportedExportFileFormats().get(0));
+//			}
+//		}
+//		devices = new ComboFieldEditor(RDEVICE, Messages.ExportPreferencePage_21, devicesvalues, getFieldEditorParent());
+		//addField(devices);
+		
+		addField(show_export);
+	
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			
+			// System.out.println("Locale ok");
+			// System.out.println(org.txm.rcp.ApplicationWorkbenchAdvisor.getProperties());
+
+			//Toolbox.updateProperties(org.txm.rcp.ApplicationWorkbenchAdvisor.getProperties());
+			
+			// FIXME : to remove when  charts engine will be validated
+			// FIXME : became useless since we use the chart editors export capabilities
+//			RWorkspace rw = RWorkspace.getRWorkspaceInstance();
+//			if (rw != null)
+//				rw.setDefaultGraphicDevice(RDevice.valueOf(TxmPreferences.get(RDEVICE)));
+			
+		} catch (IOException e) {
+			System.err.println(NLS.bind(
+					Messages.FAILED_TO_SAVE_PREFERENCES, e));
+			// FIXME : to remove when  charts engine will be validated
+//		} catch (RWorkspaceException e) {
+//			// TODO Auto-generated catch block
+//			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ExportPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Preferences page used by TXM</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferencePage.java	(revision 324)
@@ -0,0 +1,278 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.FileFieldEditor;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.osgi.service.prefs.Preferences;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * This class represents a preference page that is contributed to the
+ * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>, we
+ * can use the field support built into JFace that allows us to create a page
+ * that is small and knows how to save, restore and apply itself.
+ * <p>
+ * This page is used to modif y preferences only. They are stored in the
+ * preference store that belongs to the main plug-in class. That way,
+ * preferences can be accessed directly via the preference store.
+ */
+
+public class CQPPreferencePage extends FieldEditorPreferencePage implements
+IWorkbenchPreferencePage {
+
+	/** The preferences. */
+	public ScopedPreferenceStore preferences;
+
+	/** The cqi_server_is_remote. */
+	private BooleanFieldEditor cqi_use_network;
+
+	/** The cqi_server_is_remote. */
+	private BooleanFieldEditor cqi_server_is_remote;
+
+	/** The cqi_server_host. */
+	private StringFieldEditor cqi_server_host;
+
+	/** The cqi_server_path_to_executable. */
+	private StringFieldEditor cqi_server_path_to_executable;
+	private StringFieldEditor cqi_server_path_to_cqplib;
+
+//	/** The cqi_server_path_to_registry. */
+//	private StringFieldEditor cqi_server_path_to_registry;
+
+	/** The cqi_server_path_to_init_file. */
+	private StringFieldEditor cqi_server_path_to_init_file;
+
+	/** The cqi_server_additional_options. */
+	private StringFieldEditor cqi_server_additional_options;
+
+	/** The cqi_server_path_to_registry. */
+	private StringFieldEditor cqi_server_port;
+
+	/** The cqi_server_path_to_init_file. */
+	private StringFieldEditor cqi_server_user;
+
+	/** The cqi_server_additional_options. */
+	private StringFieldEditor cqi_server_password;
+
+	/**
+	 * Instantiates a new cQP preference page.
+	 */
+	public CQPPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.CQPPreferencePage_0);
+	}
+
+	/**
+	 * Creates the field editors. Field editors are abstractions of the common
+	 * GUI blocks needed to manipulate various types of preferences. Each field
+	 * editor knows how to save and restore itself.
+	 */
+	@Override
+	public void createFieldEditors() {
+
+		cqi_use_network = new BooleanFieldEditor(TBXPreferences.CQI_NETWORK_MODE,
+				Messages.CQPPreferencePage_1,
+				BooleanFieldEditor.DEFAULT, getFieldEditorParent());
+		cqi_server_path_to_cqplib = new DirectoryFieldEditor(
+				TBXPreferences.CQI_SERVER_PATH_TO_CQPLIB, Messages.CQPPreferencePage_0,
+				getFieldEditorParent());
+		cqi_server_is_remote = new BooleanFieldEditor(TBXPreferences.CQI_SERVER_IS_REMOTE,
+				Messages.CQPPreferencePage_10,
+				BooleanFieldEditor.DEFAULT, getFieldEditorParent());
+		cqi_server_host = new StringFieldEditor(TBXPreferences.CQI_SERVER_HOST,
+				Messages.CQPPreferencePage_11, getFieldEditorParent());
+
+		cqi_server_port = new IntegerFieldEditor(TBXPreferences.CQI_SERVER_PORT,
+				Messages.CQPPreferencePage_12, getFieldEditorParent());
+
+		cqi_server_user = new StringFieldEditor(TBXPreferences.CQI_SERVER_LOGIN,
+				Messages.CQPPreferencePage_13, getFieldEditorParent());
+
+		cqi_server_password = new StringFieldEditor(TBXPreferences.CQI_SERVER_PASSWORD,
+				Messages.CQPPreferencePage_14, getFieldEditorParent());
+
+		cqi_server_path_to_executable = new FileFieldEditor(
+				TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, Messages.CQPPreferencePage_15,
+				getFieldEditorParent());
+
+//		cqi_server_path_to_registry = new DirectoryFieldEditor(
+//				CQI_SERVER_PATH_TO_REGISTRY, Messages.CQPPreferencePage_16,
+//				getFieldEditorParent());
+		cqi_server_path_to_init_file = new FileFieldEditor(
+				TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE, Messages.CQPPreferencePage_17,
+				getFieldEditorParent());
+		cqi_server_additional_options = new StringFieldEditor(
+				TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, Messages.CQPPreferencePage_18,
+				getFieldEditorParent());
+
+		addField(cqi_use_network);
+		addField(cqi_server_path_to_cqplib);
+		addField(cqi_server_is_remote);
+		addField(cqi_server_host);
+		addField(cqi_server_port);
+		addField(cqi_server_user);
+		addField(cqi_server_password);
+		addField(cqi_server_path_to_executable);
+//		addField(cqi_server_path_to_registry);
+		addField(cqi_server_path_to_init_file);
+		addField(cqi_server_additional_options);
+
+		Preferences preferences = org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE.getNode(Application.PLUGIN_ID);
+		boolean useNetwork = preferences.getBoolean(
+				TBXPreferences.CQI_NETWORK_MODE,
+				false);
+		boolean serverIsRemote = preferences.getBoolean(
+				TBXPreferences.CQI_SERVER_IS_REMOTE,
+				CQPPreferenceInitializer.CQI_DEFAULT_SERVER_IS_REMOTE);
+		updateFieldsState(useNetwork, serverIsRemote);
+
+	}
+
+	public void updateFieldsState(boolean useNetwork, boolean serverIsRemote) {
+
+		//System.out.println("update field state : "+useNetwork+" "+serverIsRemote);
+
+		if (useNetwork) {
+			if (serverIsRemote) {
+				(cqi_server_path_to_cqplib).setEnabled(false, getFieldEditorParent());
+				(cqi_server_is_remote).setEnabled(true, getFieldEditorParent());
+				(cqi_server_host).setEnabled(true, getFieldEditorParent());
+				(cqi_server_port).setEnabled(true, getFieldEditorParent());
+				(cqi_server_user).setEnabled(true, getFieldEditorParent());
+				(cqi_server_password).setEnabled(true, getFieldEditorParent());
+				(cqi_server_path_to_executable).setEnabled(false, getFieldEditorParent());
+//				(cqi_server_path_to_registry).setEnabled(false, getFieldEditorParent());
+				(cqi_server_path_to_init_file).setEnabled(false, getFieldEditorParent());
+				(cqi_server_additional_options).setEnabled(true, getFieldEditorParent());
+			} else {
+				//cqi_server_host.loadDefault();
+				(cqi_server_path_to_cqplib).setEnabled(false, getFieldEditorParent());
+				(cqi_server_is_remote).setEnabled(true, getFieldEditorParent());
+				(cqi_server_host).setEnabled(false, getFieldEditorParent());
+				(cqi_server_port).setEnabled(true, getFieldEditorParent());
+				(cqi_server_user).setEnabled(true, getFieldEditorParent());
+				(cqi_server_password).setEnabled(true, getFieldEditorParent());
+				(cqi_server_path_to_executable).setEnabled(true, getFieldEditorParent());
+//				(cqi_server_path_to_registry).setEnabled(true, getFieldEditorParent());
+				(cqi_server_path_to_init_file).setEnabled(true, getFieldEditorParent());
+				(cqi_server_additional_options).setEnabled(true, getFieldEditorParent());
+			}
+		} else {
+			(cqi_server_path_to_cqplib).setEnabled(true, getFieldEditorParent());
+			(cqi_server_is_remote).setEnabled(false, getFieldEditorParent());
+			(cqi_server_host).setEnabled(false, getFieldEditorParent());
+			(cqi_server_port).setEnabled(false, getFieldEditorParent());
+			(cqi_server_user).setEnabled(false, getFieldEditorParent());
+			(cqi_server_password).setEnabled(false, getFieldEditorParent());
+			(cqi_server_path_to_executable).setEnabled(false, getFieldEditorParent());
+//			(cqi_server_path_to_registry).setEnabled(true, getFieldEditorParent());
+			(cqi_server_path_to_init_file).setEnabled(true, getFieldEditorParent());
+			(cqi_server_additional_options).setEnabled(true, getFieldEditorParent());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+	 */
+	@Override
+	public void propertyChange(PropertyChangeEvent event) {
+		boolean useNetwork = false;
+		boolean serverIsRemote = false;
+		boolean update = false;
+		if (((FieldEditor) event.getSource()).getPreferenceName().equals(
+				TBXPreferences.CQI_SERVER_IS_REMOTE)) {
+			useNetwork = cqi_use_network.getBooleanValue();
+			serverIsRemote = (Boolean) event.getNewValue();
+			update = true;
+		} else if (((FieldEditor) event.getSource()).getPreferenceName().equals(
+				TBXPreferences.CQI_NETWORK_MODE)) {
+			useNetwork = (Boolean) event.getNewValue();
+			serverIsRemote = cqi_server_is_remote.getBooleanValue();
+			update = true;
+		}
+		if (update)
+			updateFieldsState(useNetwork, serverIsRemote);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			// System.out.println("CQP ok");
+			// System.out.println(org.txm.rcp.ApplicationWorkbenchAdvisor.getProperties());
+			//TODO: update TBX
+		//	org.txm.//Toolbox.updateProperties(org.txm.rcp.ApplicationWorkbenchAdvisor.getProperties());
+		} catch (IOException e) {
+			System.err.println(NLS.bind(
+					Messages.FAILED_TO_SAVE_PREFERENCES, e));
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/DiagnosticPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/DiagnosticPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/DiagnosticPreferencePage.java	(revision 324)
@@ -0,0 +1,130 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.Toolbox;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * This class represents a preference page that is contributed to the
+ * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>, we
+ * can use the field support built into JFace that allows us to create a page
+ * that is small and knows how to save, restore and apply itself.
+ * <p>
+ * This page is used to modify preferences only. They are stored in the
+ * preference store that belongs to the main plug-in class. That way,
+ * preferences can be accessed directly via the preference store.
+ */
+
+public class DiagnosticPreferencePage extends FieldEditorPreferencePage
+		implements IWorkbenchPreferencePage {
+
+	/** The Constant MAXVALUE. */
+	public static final String MAXVALUE = "diag_max_value"; //$NON-NLS-1$
+	
+	/** The Constant PARTSSORT. */
+	public static final String PARTSSORT = "diag_partssort"; //$NON-NLS-1$
+	
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.preferences.DiagnosticPreferencePage"; //$NON-NLS-1$
+
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/** The diag_maxvalue. */
+	private IntegerFieldEditor diag_maxvalue;
+		
+	/**
+	 * Instantiates a new diagnostic preference page.
+	 */
+	public DiagnosticPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.DiagnosticPreferencePage_1);
+		setTitle(Messages.DiagnosticPreferencePage_1);
+	}
+
+	/**
+	 * Creates the field editors. Field editors are abstractions of the common
+	 * GUI blocks needed to manipulate various types of preferences. Each field
+	 * editor knows how to save and restore itself.
+	 */
+	@Override
+	public void createFieldEditors() {
+		
+		diag_maxvalue = new IntegerFieldEditor(MAXVALUE, Messages.DiagnosticPreferencePage_2, getFieldEditorParent());
+		diag_maxvalue.setValidRange(20, 9999);
+		addField(diag_maxvalue);
+		
+		
+		// Charts rendering
+		//
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true; // Otherwise the behavior is so strange ....
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			//Toolbox.updateProperties(org.txm.rcp.ApplicationWorkbenchAdvisor.getProperties());
+			
+		} catch (Exception e) {
+			System.err.println(Messages.FAILED_TO_SAVE_PREFERENCES + e);
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/DiagnosticPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/DirectoryAndOpenFieldEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/DirectoryAndOpenFieldEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/DirectoryAndOpenFieldEditor.java	(revision 324)
@@ -0,0 +1,112 @@
+package org.txm.rcp.preferences;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.jface.preference.StringButtonFieldEditor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.txm.rcp.TxmPreferences;
+
+public class DirectoryAndOpenFieldEditor extends DirectoryFieldEditor {
+    /**
+     * Initial path for the Browse dialog.
+     */
+    private File filterPath = null;
+
+    Button openButton;
+    
+    /**
+     * Creates a new directory field editor 
+     */
+    protected DirectoryAndOpenFieldEditor() {
+    }
+
+    /**
+     * Creates a directory field editor.
+     * 
+     * @param name the name of the preference this field editor works on
+     * @param labelText the label text of the field editor
+     * @param parent the parent of the field editor's control
+     */
+    public DirectoryAndOpenFieldEditor(String name, String labelText, Composite parent) {
+        super(name, labelText, parent);
+    }    
+    
+    /* (non-Javadoc)
+     * Method declared on FieldEditor.
+     */
+    @Override
+	public int getNumberOfControls() {
+        return 4;
+    }
+    
+    /* (non-Javadoc)
+     * Method declared on StringFieldEditor (and FieldEditor).
+     */
+    @Override
+	protected void doFillIntoGrid(Composite parent, int numColumns) {
+        super.doFillIntoGrid(parent, numColumns - 1);
+        openButton = getOpenButton(parent);
+        GridData gd = new GridData();
+        gd.horizontalAlignment = GridData.FILL;
+        int widthHint = convertHorizontalDLUsToPixels(openButton, IDialogConstants.BUTTON_WIDTH);
+        gd.widthHint = Math.max(widthHint, openButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
+        openButton.setLayoutData(gd);
+    }
+	
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.preference.FieldEditor#setEnabled(boolean, org.eclipse.swt.widgets.Composite)
+     */
+    @Override
+	public void setEnabled(boolean enabled, Composite parent) {
+        super.setEnabled(enabled, parent);
+        if (openButton != null) {
+        	openButton.setEnabled(enabled);
+        }
+    }
+    
+	 /**
+     * Get the change control. Create it in parent if required.
+     * @param parent
+     * @return Button
+     */
+    protected Button getOpenButton(Composite parent) {
+        if (openButton == null) {
+            openButton = new Button(parent, SWT.PUSH);
+            openButton.setText("Open");
+            openButton.setFont(parent.getFont());
+            openButton.addSelectionListener(new SelectionAdapter() {
+                @Override
+				public void widgetSelected(SelectionEvent evt) {
+                    String newValue = changePressed();
+                    if (newValue != null) {
+                        setStringValue(newValue);
+                    }
+                }
+            });
+            openButton.addDisposeListener(new DisposeListener() {
+                @Override
+				public void widgetDisposed(DisposeEvent event) {
+                    openButton = null;
+                }
+            });
+        } else {
+            checkParent(openButton, parent);
+        }
+        return openButton;
+    }
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/DirectoryAndOpenFieldEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TreeTaggerPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TreeTaggerPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TreeTaggerPreferencePage.java	(revision 324)
@@ -0,0 +1,164 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * This class represents a preference page that is contributed to the
+ * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>, we
+ * can use the field support built into JFace that allows us to create a page
+ * that is small and knows how to save, restore and apply itself.
+ * <p>
+ * This page is used to modif y preferences only. They are stored in the
+ * preference store that belongs to the main plug-in class. That way,
+ * preferences can be accessed directly via the preference store.
+ */
+
+public class TreeTaggerPreferencePage extends FieldEditorPreferencePage
+		implements IWorkbenchPreferencePage {
+
+	/** The Constant TREETAGGER_INSTALL_PATH. */
+	public static final String TREETAGGER_INSTALL_PATH = TBXPreferences.TREETAGGER_INSTALL_PATH;
+	
+	/** The Constant TREETAGGER_MODELS_PATH. */
+	public static final String TREETAGGER_MODELS_PATH = TBXPreferences.TREETAGGER_MODELS_PATH;
+
+	public static final String TREETAGGER_OPTIONS = TBXPreferences.TREETAGGER_OPTIONS;
+	
+	public static final String TREETAGGER_APOSTROPHE = TBXPreferences.TREETAGGER_APOSTROPHE;
+	
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/** The treetagger_install_path. */
+	private DirectoryFieldEditor treetagger_install_path;
+	
+	/** The treetagger_models_path. */
+	private DirectoryFieldEditor treetagger_models_path;
+	
+	/** The treetagger_models_path. */
+	private StringFieldEditor treetagger_options;
+	
+	/** The treetagger_models_path. */
+	private BooleanFieldEditor treetagger_apostrophe;
+
+	//private BooleanFieldEditor treetagger_opendir;
+
+	/**
+	 * Instantiates a new tree tagger preference page.
+	 */
+	public TreeTaggerPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.TreeTaggerPreferencePage_0);
+	}
+
+	/**
+	 * Creates the field editors. Field editors are abstractions of the common
+	 * GUI blocks needed to manipulate various types of preferences. Each field
+	 * editor knows how to save and restore itself.
+	 */
+	@Override
+	public void createFieldEditors() {
+		treetagger_install_path = new DirectoryFieldEditor(
+				TREETAGGER_INSTALL_PATH, Messages.TreeTaggerPreferencePage_1,
+				getFieldEditorParent());
+		addField(treetagger_install_path);
+
+		treetagger_models_path = new DirectoryFieldEditor(
+				TREETAGGER_MODELS_PATH, Messages.TreeTaggerPreferencePage_2,
+				getFieldEditorParent());
+		addField(treetagger_models_path);
+		
+//		treetagger_opendir = new OpenPathFromPreferenceFieldEditor("treetagger_open_button", "Open TreeTagger directory", getFieldEditorParent(), TREETAGGER_INSTALL_PATH);
+//		addField(treetagger_opendir);
+//		
+//		treetagger_opendir = new OpenPathFromPreferenceFieldEditor("treetagger_open_button2", "Open models directory", getFieldEditorParent(), TREETAGGER_MODELS_PATH);
+//		addField(treetagger_opendir);
+		
+		treetagger_options = new StringFieldEditor(
+				TREETAGGER_OPTIONS, Messages.TreeTaggerPreferencePage_3,
+				getFieldEditorParent());
+		addField(treetagger_options);
+		
+		
+		
+		treetagger_apostrophe = new BooleanFieldEditor(
+				TREETAGGER_APOSTROPHE, Messages.TreeTaggerPreferencePage_0,
+				getFieldEditorParent());
+		addField(treetagger_apostrophe);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true; // Otherwise the bahaviour is so strange ....
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			//System.out.println("PROPS : "+(org.txm.rcp.ApplicationWorkbenchAdvisor.getProperties()));
+			//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+		} catch (Exception e) {
+			System.err.println(Messages.FAILED_TO_SAVE_PREFERENCES + e);
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/TreeTaggerPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/NLPPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/NLPPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/NLPPreferencePage.java	(revision 324)
@@ -0,0 +1,97 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class NLPPreferencePage.
+ */
+public class NLPPreferencePage extends FieldEditorPreferencePage implements
+		IWorkbenchPreferencePage {
+
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/**
+	 * Instantiates a new nLP preference page.
+	 */
+	public NLPPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription("..."); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+		// TODO Auto-generated method stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+		} catch (Exception e) {
+			System.err.println(Messages.FAILED_TO_SAVE_PREFERENCES + e);
+		}
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		// TODO Auto-generated method stub
+
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/NLPPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferenceInitializer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferenceInitializer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferenceInitializer.java	(revision 324)
@@ -0,0 +1,104 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Activator;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * Class used to initialize default preference values.
+ */
+public class CQPPreferenceInitializer extends AbstractPreferenceInitializer {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
+	 * initializeDefaultPreferences()
+	 */
+
+	/** The Constant CQI_DEFAULT_SERVER_IS_REMOTE. */
+	public static final boolean CQI_DEFAULT_SERVER_IS_REMOTE = false;
+	
+	/** The Constant CQI_DEFAULT_SERVER_HOST. */
+	public static final String CQI_DEFAULT_SERVER_HOST = Messages.CQPPreferenceInitializer_0;
+	
+	/** The Constant CQI_DEFAULT_SERVER_PORT. */
+	public static final int CQI_DEFAULT_SERVER_PORT = 4877;
+	
+	/** The Constant CQI_DEFAULT_SERVER_LOGIN. */
+	public static final String CQI_DEFAULT_SERVER_LOGIN = Messages.CQPPreferenceInitializer_1;
+	
+	/** The Constant CQI_DEFAULT_SERVER_PASSWORD. */
+	public static final String CQI_DEFAULT_SERVER_PASSWORD = ""; //$NON-NLS-1$
+	
+	/** The Constant CQI_DEFAULT_SERVER_PATH_TO_EXECUTABLE. */
+	public static final String CQI_DEFAULT_SERVER_PATH_TO_EXECUTABLE = ""; //default value expected to be set by te command line option; see Application.java  //$NON-NLS-1$
+	
+	/** The Constant CQI_DEFAULT_SERVER_PATH_TO_REGISTRY. */
+	public static final String CQI_DEFAULT_SERVER_PATH_TO_REGISTRY = ""; //default value expected to be set by te command line option;  see Application.java //$NON-NLS-1$
+	
+	/** The Constant CQI_DEFAULT_SERVER_PATH_TO_INIT_FILE. */
+	public static final String CQI_DEFAULT_SERVER_PATH_TO_INIT_FILE = ""; //default value expected to be set by te command line option; see Application.java  //$NON-NLS-1$
+	
+	/** The Constant CQI_DEFAULT_SERVER_ADDITIONAL_OPTIONS. */
+	public static final String CQI_DEFAULT_SERVER_ADDITIONAL_OPTIONS = " -b 1000000 -d OFF"; //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+	 */
+	@Override
+	public void initializeDefaultPreferences() {
+		// new
+		// DefaultScope().getNode(ReprioritizerPlugin.getId());
+		Activator a = Activator.getDefault();
+		IPreferenceStore store = a.getPreferenceStore();
+
+		store.setDefault(TBXPreferences.CQI_SERVER_IS_REMOTE,
+				CQI_DEFAULT_SERVER_IS_REMOTE);
+		store.setDefault(TBXPreferences.CQI_SERVER_HOST,
+				CQI_DEFAULT_SERVER_HOST);
+		store.setDefault(TBXPreferences.CQI_SERVER_PORT,
+				CQI_DEFAULT_SERVER_PORT);
+		store.setDefault(TBXPreferences.CQI_SERVER_LOGIN,
+				CQI_DEFAULT_SERVER_LOGIN);
+		store.setDefault(TBXPreferences.CQI_SERVER_PASSWORD,
+				CQI_DEFAULT_SERVER_PASSWORD);
+		// store.setDefault(TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE,CQI_DEFAULT_SERVER_PATH_TO_EXECUTABLE);
+		// store.setDefault(TBXPreferences.CQI_SERVER_PATH_TO_REGISTRY,
+		// CQI_DEFAULT_SERVER_PATH_TO_REGISTRY);
+		// store.setDefault(TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE,
+		// CQI_DEFAULT_SERVER_PATH_TO_INIT_FILE);
+		store.setDefault(TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS,
+				CQI_DEFAULT_SERVER_ADDITIONAL_OPTIONS);
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferenceInitializer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/LocalePreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/LocalePreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/LocalePreferencePage.java	(revision 324)
@@ -0,0 +1,116 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class LocalePreferencePage.
+ */
+public class LocalePreferencePage extends FieldEditorPreferencePage implements
+		IWorkbenchPreferencePage {
+
+	/** The Constant UI_LOCALE. */
+	public static final String UI_LOCALE = "ui_locale"; //$NON-NLS-1$
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.preferences.LocalePreferencePage"; //$NON-NLS-1$
+
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/** The locale. */
+	private RadioGroupFieldEditor locale;
+
+	/**
+	 * Instantiates a new locale preference page.
+	 */
+	public LocalePreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.LocalePreferencePage_1);
+		setTitle(Messages.LocalePreferencePage_1);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		String[][] values = { { "français", "fr" }, { "english", "en" } }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		locale = new RadioGroupFieldEditor(UI_LOCALE,
+				Messages.LocalePreferencePage_2, 1, values,
+				getFieldEditorParent());
+		addField(locale);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			// System.out.println("Locale ok");
+			// System.out.println(org.txm.rcp.ApplicationWorkbenchAdvisor.getProperties());
+			//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+		} catch (IOException e) {
+			System.err.println(NLS.bind(
+					Messages.FAILED_TO_SAVE_PREFERENCES, e));
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/LocalePreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ConcordancerPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ConcordancerPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ConcordancerPreferencePage.java	(revision 324)
@@ -0,0 +1,128 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ConcordancerPreferencePage.
+ */
+public class ConcordancerPreferencePage extends FieldEditorPreferencePage
+		implements IWorkbenchPreferencePage {
+	
+	/** The Constant N_LINE_PER_PAGE. */
+	public static final String N_LINE_PER_PAGE = "conc_n_lines_per_page"; //$NON-NLS-1$
+	
+	/** The Constant LEFT_CONTEXT_SIZE. */
+	public static final String LEFT_CONTEXT_SIZE = "conc_left_context_size"; //$NON-NLS-1$
+	
+	/** The Constant RIGHT_CONTEXT_SIZE. */
+	public static final String RIGHT_CONTEXT_SIZE = "conc_right_context_size"; //$NON-NLS-1$
+	
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.preferences.ConcordancerPreferencePage"; //$NON-NLS-1$
+
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/** The n_line_per_page. */
+	private IntegerFieldEditor n_line_per_page;
+	
+	/** The left context size. */
+	private IntegerFieldEditor leftContextSize;
+	
+	/** The right context size. */
+	private IntegerFieldEditor rightContextSize;
+
+	/**
+	 * Instantiates a new concordancer preference page.
+	 */
+	public ConcordancerPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.ConcordancerPreferencePage_3);
+		setTitle(Messages.ConcordancerPreferencePage_3);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		n_line_per_page = new IntegerFieldEditor(N_LINE_PER_PAGE,
+				Messages.ConcordancerPreferencePage_4, getFieldEditorParent());
+		addField(n_line_per_page);
+		leftContextSize = new IntegerFieldEditor(LEFT_CONTEXT_SIZE,
+				Messages.ConcordancerPreferencePage_5, getFieldEditorParent());
+		addField(leftContextSize);
+		rightContextSize = new IntegerFieldEditor(RIGHT_CONTEXT_SIZE,
+				Messages.ConcordancerPreferencePage_6, getFieldEditorParent());
+		addField(rightContextSize);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+		// return n_line_per_page.getIntValue()>0;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+		} catch (Exception e) {
+			System.err.println(Messages.FAILED_TO_SAVE_PREFERENCES + e);
+		}
+		return true;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ConcordancerPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/FileExplorerPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/FileExplorerPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/FileExplorerPreferencePage.java	(revision 324)
@@ -0,0 +1,131 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.views.fileexplorer.Explorer;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ExportPreferencePage.
+ */
+public class FileExplorerPreferencePage extends FieldEditorPreferencePage implements
+		IWorkbenchPreferencePage {
+
+	/** The Constant FILES_TO_HIDE. */
+	public static final String FILES_TO_HIDE = "files_to_hide"; //$NON-NLS-1$
+	
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.preferences.FileExplorerPreferencePage"; //$NON-NLS-1$
+
+	public static final String SHOW_HIDDEN_FILES = "show_hidden_files"; //$NON-NLS-1$
+	
+	public static final String SHOW_FOLDERS = "show_folders"; //$NON-NLS-1$
+	
+	/** The show_export. */
+	private StringFieldEditor files_to_hide;
+	private BooleanFieldEditor show_hidden_files;
+	//private BooleanFieldEditor show_folders;
+	
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/**
+	 * Instantiates a new export preference page.
+	 */
+	public FileExplorerPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.ExportPreferencePage_1);
+		setTitle(Messages.ExportPreferencePage_1);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		
+		files_to_hide = new StringFieldEditor(FILES_TO_HIDE,
+				Messages.FileExplorerPreferencePage_0, getFieldEditorParent());
+		addField(files_to_hide);
+		
+		show_hidden_files = new BooleanFieldEditor(SHOW_HIDDEN_FILES,
+				Messages.FileExplorerPreferencePage_1, getFieldEditorParent());
+		addField(show_hidden_files);
+		
+		//show_folders = new BooleanFieldEditor(SHOW_FOLDERS, Messages.FileExplorerPreferencePage_2, getFieldEditorParent());
+		//addField(show_folders);
+		TxmPreferences.set(SHOW_FOLDERS, true);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+			Explorer.refresh();
+		} catch (IOException e) {
+			System.err.println(NLS.bind(
+					Messages.FAILED_TO_SAVE_PREFERENCES, e));
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/FileExplorerPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/AdvancePreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/AdvancePreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/AdvancePreferencePage.java	(revision 324)
@@ -0,0 +1,250 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.ComboFieldEditor;
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.views.fileexplorer.MacroExplorer;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class AdvancePreferencePage.
+ */
+public class AdvancePreferencePage extends FieldEditorPreferencePage implements
+		IWorkbenchPreferencePage {
+	
+	/**
+	 * The constant ID. 
+	 */
+	public static final String ID = "org.txm.rcp.preferences.AdvancePreferencePage"; //$NON-NLS-1$
+
+	/** The Constant INSTALL_DIR. */
+	
+	/** The Constant TXMHOME. */
+	
+	/** The Constant LOG_LEVEL. */
+	
+	/** The Constant ADD_TECH_LOGS. */
+	
+	/** The Constant SHOW_SEVERE_DIALOG. */
+	public static final String SHOW_SEVERE_DIALOG = "show_severe_dialog"; 
+
+	/** The Constant LOG_CONSOLE. */
+	/** The Constant LOG_FILE. */
+
+	/** The Constant EXPERT_USER. */
+	/** The Constant UPDATE_LEVEL. */
+	public static final String UPDATE_LEVEL = "update_level"; //$NON-NLS-1$
+	
+	/** The Constant LOG_STACKTRACE */
+	
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/** The install dir. */
+	private DirectoryFieldEditor installDirField;
+	
+	/** The txmhome dir. */
+	private DirectoryFieldEditor txmhomeDirField;
+	
+	/** The log level. */
+	private ComboFieldEditor logLevelField;
+	
+	/** The log console. */
+	private BooleanFieldEditor logTimingsField;
+	
+	/** The log console. */
+	private BooleanFieldEditor logConsoleField;
+	
+	/** The log file. */
+	private BooleanFieldEditor logFileField;
+	
+	/** The log console. */
+	private BooleanFieldEditor expertField;
+	
+	/** The log stacktrace. */
+	private BooleanFieldEditor logStackTraceField;
+	
+	/** The severeDialog Field. */
+	private BooleanFieldEditor severeDialogField;
+
+	private ComboFieldEditor updateLevelField;
+
+	/**
+	 * Instantiates a new advance preference page.
+	 */
+	public AdvancePreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE, Application.PLUGIN_ID);
+		//System.out.println("prefs store: "+preferences);
+		
+		setPreferenceStore(preferences);
+		//setDescription(Messages.AdvancePreferencePage_0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		installDirField = new DirectoryFieldEditor(TBXPreferences.INSTALL_DIR,
+				Messages.AdvancePreferencePage_1, getFieldEditorParent());
+		addField(installDirField);
+		
+		txmhomeDirField = new DirectoryFieldEditor(TBXPreferences.USER_TXM_HOME,
+				Messages.AdvancePreferencePage_2, getFieldEditorParent());
+		addField(txmhomeDirField);
+		
+		Group updateGroup = new Group(getFieldEditorParent(), SWT.NONE);
+		updateGroup.setText(Messages.AdvancePreferencePage_6);
+		GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, false);
+		gridData2.horizontalSpan = 3;
+		gridData2.verticalIndent = 10;
+		updateGroup.setLayoutData(gridData2);
+		RowLayout rlayout = new RowLayout(SWT.VERTICAL);
+		rlayout.marginHeight = 5;
+		updateGroup.setLayout(rlayout);
+		
+		String[][] choices = new String[9][2];
+		choices[0][0] = choices[0][1] = "OFF"; //$NON-NLS-1$
+		choices[1][0] = choices[1][1] = "SEVERE"; //$NON-NLS-1$
+		choices[2][0] = choices[2][1] = "WARNING"; //$NON-NLS-1$
+		choices[3][0] = choices[3][1] = "INFO"; //$NON-NLS-1$
+		choices[4][0] = choices[4][1] = "CONFIG"; //$NON-NLS-1$
+		choices[5][0] = choices[5][1] = "FINE"; //$NON-NLS-1$
+		choices[6][0] = choices[6][1] = "FINER"; //$NON-NLS-1$
+		choices[7][0] = choices[7][1] = "FINEST"; //$NON-NLS-1$
+		choices[8][0] = choices[8][1] = "ALL"; //$NON-NLS-1$
+		logLevelField = new ComboFieldEditor(TBXPreferences.LOG_LEVEL,
+				Messages.AdvancePreferencePage_12, choices,
+				updateGroup);
+		addField(logLevelField);
+
+		logTimingsField = new BooleanFieldEditor(TBXPreferences.SHOW_TIMINGS,
+				Messages.AdvancePreferencePage_3, updateGroup);
+		addField(logTimingsField);
+		
+		logStackTraceField = new BooleanFieldEditor(TBXPreferences.LOG_STACKTRACE, 
+				Messages.AdvancePreferencePage_0, updateGroup);
+		addField(logStackTraceField);
+		
+		logConsoleField = new BooleanFieldEditor(TBXPreferences.ADD_TECH_LOGS,
+				Messages.AdvancePreferencePage_13, updateGroup);
+		addField(logConsoleField);
+		
+		severeDialogField = new BooleanFieldEditor(SHOW_SEVERE_DIALOG,
+				"Show a dialog when a severe error occurs", updateGroup);
+		addField(severeDialogField);
+
+		logFileField = new BooleanFieldEditor(TBXPreferences.LOG_IN_FILE,
+				Messages.AdvancePreferencePage_14, updateGroup);
+		addField(logFileField);
+		
+		String[][] choices2 = new String[4][2];
+		choices2[0][0] = choices2[0][1]= "STABLE"; //$NON-NLS-1$
+		choices2[1][0] = choices2[1][1] = "BETA"; //$NON-NLS-1$
+		choices2[2][0] = choices2[2][1] = "ALPHA"; //$NON-NLS-1$
+		choices2[3][0] = choices2[3][1] = "DEV"; //$NON-NLS-1$
+		updateLevelField = new ComboFieldEditor(UPDATE_LEVEL,
+				Messages.AdvancePreferencePage_7,choices2, getFieldEditorParent());
+		addField(updateLevelField);
+		
+		expertField = new BooleanFieldEditor(TBXPreferences.EXPERT_USER,
+				Messages.AdvancePreferencePage_4, getFieldEditorParent());
+		addField(expertField);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			String oldHome = preferences.getString(TBXPreferences.USER_TXM_HOME);
+			super.performOk();
+			preferences.save();
+			String newHome = preferences.getString(TBXPreferences.USER_TXM_HOME);
+			
+//			org.txm.Toolbox
+//					.updateProperties(org.txm.rcp.ApplicationWorkbenchAdvisor
+//							.getProperties());
+			Toolbox.preferencesUpdated();
+			
+			// the macro directory changed
+			// System.out.println("old="+oldHome+" new="+newHome);
+			if (oldHome != null && !oldHome.equals(newHome)) {
+				MacroExplorer.refresh();
+			}
+			
+			// update repositories
+			IHandlerService service = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+			service.executeCommand("org.txm.rcp.p2.plugins.FixUpdateHandler", null); //$NON-NLS-1$
+			
+			// FIXME: Refresh the Advanced\Charts Engine preference page to show/hide the "Display format" combo box according to expert mode value
+			// This code make the current engine switch bugged when the user displays this page before switching of current engine.
+			// It's because this method is called before the performOK() method of the chart engine preference page
+//			PlatformUI.getWorkbench().getPreferenceManager().
+//				find("org.txm.rcp.preferences.TextometriePreferencePage/" + AdvancePreferencePage.ID + "/" + ChartsEnginePreferencePage.ID).createPage();
+		} catch (Exception e) {
+			System.err.println(Messages.FAILED_TO_SAVE_PREFERENCES + e);
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/AdvancePreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ScriptPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ScriptPreferencePage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ScriptPreferencePage.java	(revision 324)
@@ -0,0 +1,138 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.preferences;
+
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+import org.txm.rcp.Application;
+import org.txm.rcp.Messages;
+import org.txm.rcp.TxmPreferences;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ScriptPreferencePage.
+ */
+public class ScriptPreferencePage extends FieldEditorPreferencePage implements
+		IWorkbenchPreferencePage {
+
+	/** The Constant SCRIPT_ROOT_DIR. */
+	public static final String SCRIPT_ROOT_DIR = "script_root_dir"; //$NON-NLS-1$
+	
+	/** The Constant SCRIPT_CURRENT_DIR. */
+	public static final String SCRIPT_CURRENT_DIR = "script_current_dir"; //$NON-NLS-1$
+	
+	/** The Constant NO_SESSION. */
+	public static final String NO_SESSION = "script_nosession"; //$NON-NLS-1$
+	
+	public static final String SAVE_BEFORE_EXECUTION = "script_save_before_execution"; //$NON-NLS-1$
+
+	/** The preferences. */
+	private ScopedPreferenceStore preferences;
+
+	/** The script root dir. */
+	private DirectoryFieldEditor scriptRootDir;
+	
+	/** The script current dir. */
+	private DirectoryFieldEditor scriptCurrentDir;
+	
+	/** The nosession. */
+	private IntegerFieldEditor nosession;
+	
+	private BooleanFieldEditor save_before_execution;
+
+	/**
+	 * Instantiates a new script preference page.
+	 */
+	public ScriptPreferencePage() {
+		super(GRID);
+		preferences = new ScopedPreferenceStore(org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE,
+				Application.PLUGIN_ID);
+		setPreferenceStore(preferences);
+		//setDescription(Messages.ScriptPreferencePage_2);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+	 */
+	@Override
+	protected void createFieldEditors() {
+		
+		TxmPreferences.set(NO_SESSION, TxmPreferences.getInt(NO_SESSION, 1));
+		
+		save_before_execution = new BooleanFieldEditor(SAVE_BEFORE_EXECUTION,
+				Messages.ScriptPreferencePage_1, getFieldEditorParent());
+		addField(save_before_execution);
+		
+		nosession = new IntegerFieldEditor(NO_SESSION,
+				Messages.ScriptPreferencePage_0, getFieldEditorParent());
+		addField(nosession);
+		
+		scriptRootDir = new DirectoryFieldEditor(SCRIPT_ROOT_DIR,
+				Messages.ScriptPreferencePage_3, getFieldEditorParent());
+		addField(scriptRootDir);
+		/*
+		scriptCurrentDir = new DirectoryFieldEditor(SCRIPT_CURRENT_DIR,
+				Messages.ScriptPreferencePage_4, getFieldEditorParent());
+		addField(scriptCurrentDir);*/
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#isValid()
+	 */
+	@Override
+	public boolean isValid() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+	 */
+	@Override
+	public boolean performOk() {
+		try {
+			super.performOk();
+			preferences.save();
+			//Toolbox.updateProperties(ApplicationWorkbenchAdvisor.getProperties());
+		} catch (Exception e) {
+			System.err.println(Messages.FAILED_TO_SAVE_PREFERENCES + e);
+		}
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ScriptPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMCqpServerWatcher.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMCqpServerWatcher.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMCqpServerWatcher.java	(revision 324)
@@ -0,0 +1,91 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.txm.CqpServerWatcher;
+import org.txm.rcp.views.corpora.CorporaView;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Watch if CQP is running
+ */
+@Deprecated
+public class TXMCqpServerWatcher extends CqpServerWatcher{
+	
+	/** The parent. */
+	private Display parent;
+
+	/**
+	 * Instantiates a new tXM cqp server watcher.
+	 *
+	 * @param parent the parent
+	 */
+	TXMCqpServerWatcher(Display parent)
+	{
+		this.parent = parent;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.txm.CqpServerWatcher#restart()
+	 */
+	@Override
+	public boolean restart()
+	{
+		parent.syncExec(new Runnable(){
+		      @Override
+			public void run(){
+		    	  MessageDialog d =
+					    new MessageDialog(
+					      parent.getActiveShell(),
+					      Messages.TXMCqpServerWatcher_0,
+					      null,
+					      Messages.TXMCqpServerWatcher_1,
+					      MessageDialog.ERROR,
+					      new String[] { Messages.TXMRServeWatcher_2 },
+					      0);
+					    d.open();
+		      }
+		    });
+		
+		boolean ret = super.restart();
+		
+		if (ret)
+		{
+			parent.syncExec(new Runnable(){
+			      @Override
+				public void run(){
+			    	  CorporaView.reload();
+			      }
+			    });
+		}
+		
+		return ret;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/TXMCqpServerWatcher.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages.properties	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages.properties	(revision 324)
@@ -0,0 +1,1211 @@
+#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
+#Eclipse modern messages class
+#Mon Feb 10 11:04:14 CET 2014
+
+About_Menu_Label = About TXM...
+
+AdapterFactory_0 = ** Warning: the corpus {0} is corrupted. Some commands won''t work correctly.
+
+AddBase_1  = New corpus: {0}.
+AddBase_10 = TXM is ready.
+AddBase_16 = ** Cannot set the 'LANG' property from the 'txmcorpus' structure:
+AddBase_17 = ** Cannot read the file {0}
+AddBase_19 = Warning
+AddBase_2  = ** Failed to load corpus  from directory: {0}.\nWe cannot find the necessary components
+AddBase_20 = The {0} corpus directory already exists. Do you want to replace it ?
+AddBase_22 = This file is not a TXM file: {0}
+AddBase_23 = The corpus {0} has no ''LANG'' set in ''txmcorpus''
+AddBase_24 = ** Failed to load corpus  {0}
+AddBase_25 = A binary corpus is a TXM file (extension .txm or .zip)
+AddBase_27 = Loading binary corpus
+AddBase_28 = Extracting binary corpus
+AddBase_29 = Extracting {0} in {1}
+AddBase_31 = ** Could not unzip binary corpus:
+AddBase_32 = Loading the corpus in the platform
+AddBase_33 = Restarting the platform
+AddBase_34 = TXM workspace is not initialized, please restart TXM.
+AddBase_4  = ** Failed to load binary corpus (null error).
+AddBase_7  = ** Failed to create binary corpus.
+
+AddProject_3 = Enter project name
+
+AdvancePreferencePage_0  = Print the stacktrace
+AdvancePreferencePage_1  = TXM Install directory
+AdvancePreferencePage_12 = Log level
+AdvancePreferencePage_13 = Log in the console
+AdvancePreferencePage_14 = Log in a file
+AdvancePreferencePage_2  = TXM user directory
+AdvancePreferencePage_3  = Display runtimes in console
+AdvancePreferencePage_4  = Advanced user mode
+AdvancePreferencePage_6  = Logs
+AdvancePreferencePage_7  = Update level
+
+AnnotationPreferences_0 = Mode
+AnnotationPreferences_1 = simple (with categories)
+AnnotationPreferences_2 = advanced (with types+values)
+
+ApplicationWorkbenchAdvisor_0                            = Initializing platform...
+ApplicationWorkbenchAdvisor_1                            = Initialization of the platform
+ApplicationWorkbenchAdvisor_11                           = Loading sample corpora
+ApplicationWorkbenchAdvisor_12                           = ** Error: ''TXMHOME'' environment variable is set ({0}), but the directory doesn''t exist:
+ApplicationWorkbenchAdvisor_13                           = ** Could not create TXMHOME directory: {0}
+ApplicationWorkbenchAdvisor_14                           = \ evaluating extension:
+ApplicationWorkbenchAdvisor_15                           = Loading extensions...
+ApplicationWorkbenchAdvisor_16                           = Removing old corpus backup directory {0}.
+ApplicationWorkbenchAdvisor_17                           = .
+ApplicationWorkbenchAdvisor_18                           = Corpora already backuped in ''{0}'' : {1}
+ApplicationWorkbenchAdvisor_19                           = ** Could not configure TreeTagger parameters: {0}
+ApplicationWorkbenchAdvisor_2                            = Loading TXM install preferences
+ApplicationWorkbenchAdvisor_20                           = \ in
+ApplicationWorkbenchAdvisor_21                           = Remove unused Eclipse RCP preference page
+ApplicationWorkbenchAdvisor_22                           = Processing folder:
+ApplicationWorkbenchAdvisor_23                           = \ ...
+ApplicationWorkbenchAdvisor_24                           = Failed moving old corpus from
+ApplicationWorkbenchAdvisor_25                           = Reading TXM install preferences from: {0}
+ApplicationWorkbenchAdvisor_26                           = \ to
+ApplicationWorkbenchAdvisor_27                           = TXM workspace directory already exists ({0}). Would you like to reload its corpora in your new TXM?"
+ApplicationWorkbenchAdvisor_28                           = Workspace directory backup
+ApplicationWorkbenchAdvisor_29                           = Error:
+ApplicationWorkbenchAdvisor_3                            = Checking for existing workspace directory
+ApplicationWorkbenchAdvisor_30                           = Moving corpora to {0}.
+ApplicationWorkbenchAdvisor_31                           = ** Failed to create TXM default.xml workspace
+ApplicationWorkbenchAdvisor_32                           = ** TreeTagger is not installed or paths are incorrect.
+ApplicationWorkbenchAdvisor_33                           = TreeTagger paths have been set to default values
+ApplicationWorkbenchAdvisor_34                           = ** Could not create backup directory :
+ApplicationWorkbenchAdvisor_35                           = \nCorpus
+ApplicationWorkbenchAdvisor_36                           = Moving corpora
+ApplicationWorkbenchAdvisor_37                           = \ to
+ApplicationWorkbenchAdvisor_38                           = Warning: the corpus has already been backuped.
+ApplicationWorkbenchAdvisor_39                           = Missing folder in TXM install dir: {0}
+ApplicationWorkbenchAdvisor_4                            = Checking TreeTagger installation
+ApplicationWorkbenchAdvisor_40                           = Failed to copy TXM files from TXMINSTALL DIR to TXMHOME: {0}
+ApplicationWorkbenchAdvisor_41                           = Failed to set preferences: {0}
+ApplicationWorkbenchAdvisor_42                           = \ moving
+ApplicationWorkbenchAdvisor_43                           = Corpora {0} not restored, since this setup provides more recent ones.
+ApplicationWorkbenchAdvisor_43_single                    = Corpus {0} not restored, since this setup provides more recent ones.
+ApplicationWorkbenchAdvisor_44                           = ** Failed to move corpus
+ApplicationWorkbenchAdvisor_45                           = ** Failed to read file {0}
+ApplicationWorkbenchAdvisor_46                           = \nCorpus
+ApplicationWorkbenchAdvisor_47                           = ** Failed to backup existing corpora:
+ApplicationWorkbenchAdvisor_48                           = \nCorpus ''{0}'' could not be restored and are moved to ''{1}''.
+ApplicationWorkbenchAdvisor_49                           = Initializing the toolbox...
+ApplicationWorkbenchAdvisor_5                            = System Output
+ApplicationWorkbenchAdvisor_51                           = ** Failed to load corpus from file:
+ApplicationWorkbenchAdvisor_52                           = ** Failed to load sample corpora: {0}
+ApplicationWorkbenchAdvisor_53                           = Restoring corpora from folder ''{0}''
+ApplicationWorkbenchAdvisor_54                           = Converting TXM 0.5 format corpus
+ApplicationWorkbenchAdvisor_55                           = \ to TXM 0.6 format.
+ApplicationWorkbenchAdvisor_56                           = ** Failed to convert corpus to TXM 0.6 format
+ApplicationWorkbenchAdvisor_57                           = Loading converted 0.5 corpus
+ApplicationWorkbenchAdvisor_58                           = Loading 0.6 corpus
+ApplicationWorkbenchAdvisor_59                           = ** Error while loading
+ApplicationWorkbenchAdvisor_6                            = Exception:
+ApplicationWorkbenchAdvisor_60                           = ** Error: corpus
+ApplicationWorkbenchAdvisor_61                           = \ is not a TXM 0.5 or 0.6 binary corpus
+ApplicationWorkbenchAdvisor_63                           = Disable automatic update
+ApplicationWorkbenchAdvisor_64                           = ERROR: no IProvisioningAgent found
+ApplicationWorkbenchAdvisor_65                           = Failed to set auto update preference: 
+ApplicationWorkbenchAdvisor_66                           = Restoring previous preferences from
+ApplicationWorkbenchAdvisor_67                           = No previous preference file found at
+ApplicationWorkbenchAdvisor_68                           = Setting default TXM theme
+ApplicationWorkbenchAdvisor_69                           = Failed to set default CSS theme:
+ApplicationWorkbenchAdvisor_7                            = Creating TXM user working directory.
+ApplicationWorkbenchAdvisor_71                           = Loading sample corpora.
+ApplicationWorkbenchAdvisor_72                           = Start job: load install preferences
+ApplicationWorkbenchAdvisor_73                           = Start job: check TXMHOME
+ApplicationWorkbenchAdvisor_74                           = Start job: initialize UI
+ApplicationWorkbenchAdvisor_75                           = Error while loading TXM: 
+ApplicationWorkbenchAdvisor_76                           = Automatic update
+ApplicationWorkbenchAdvisor_77                           = Starting update fetch
+ApplicationWorkbenchAdvisor_78                           = Error while updating TXM: 
+ApplicationWorkbenchAdvisor_79                           = Error while updating TXM: no handler service found
+ApplicationWorkbenchAdvisor_8                            = Install path: {0}
+ApplicationWorkbenchAdvisor_86                           = Initializing Toolbox
+ApplicationWorkbenchAdvisor_87                           = Initializing the SWT Charts Components provider
+ApplicationWorkbenchAdvisor_88                           = Loading views
+ApplicationWorkbenchAdvisor_89                           = Missing RCP preference has been set from TBX preference: 
+ApplicationWorkbenchAdvisor_9                            = ** Could not read install preferences file
+ApplicationWorkbenchAdvisor_PROGRESS_BAR_LOADING_CORPORA = Loading corpora
+ApplicationWorkbenchAdvisor_init                         = Starting up {0}...
+ApplicationWorkbenchAdvisor_init_failed                  = ** Startup failed, please check TXM preferences (in the 'File>Preferences' menu) or contact txm-users mailing list (menu: Help>
+ApplicationWorkbenchAdvisor_ready                        = Ready.
+
+ApplicationWorkbenchWindowAdvisor_0 = Remove unnecessary e4 elements
+ApplicationWorkbenchWindowAdvisor_9 = Setting status line and configuring action sets
+
+Application_0                                            = Args: 
+Application_1                                            = '-log' option detected
+Application_10                                           = Could not start proxy configuration: 
+Application_11                                           = Setting proxy for Mac OS X: {0}
+Application_2                                            = Force loggin...
+Application_4                                            = This file is not meant to run TXM. Please consult TXM user manual.
+Application_6                                            = ** You need to install Java version 1.6 at least before launching TXM, your actual Java version is {0}
+Application_8                                            = Lock RCP workspace
+Application_9                                            = Activate Proxy Service
+
+AssistedQueryWidget_0 = Open the query assistant
+
+BackToText_0 = Display in full text...
+
+CANT_CREATE_GRAPHIC = ** Cannot create the graphic
+
+CQPPreferenceInitializer_0 = localhost
+CQPPreferenceInitializer_1 = anonymous
+
+CQPPreferencePage_0  = CQPlib path
+CQPPreferencePage_1  = Use network protocol
+CQPPreferencePage_10 = &Remote CWB server address:
+CQPPreferencePage_11 = CWB server: &host:
+CQPPreferencePage_12 = CWB server: &port:
+CQPPreferencePage_13 = CWB server: &login:
+CQPPreferencePage_14 = CWB server: &password:
+CQPPreferencePage_15 = Path to CWB server binary
+CQPPreferencePage_16 = Path to CWB server registry
+CQPPreferencePage_17 = Path to CWB server initialisation file
+CQPPreferencePage_18 = Additionnal &options for the CWB server:
+
+CaEditor_0 = Error while opening CAEditor: 
+
+Cannot_ask_simple_when_advance = Cannot ask for the simple tab when the user has selected the advanced tab
+
+CleanPerspective_1 = Error while calling 'org.eclipse.ui.window.resetPerspective': 
+CleanPerspective_2 = Error while cleaning perspective: no handler service found
+
+ColRowInfosLabelProvider_19 = Q
+ColRowInfosLabelProvider_9  = Chi²
+
+ColsRowsInfosEditor_0 = Wrong input
+ColsRowsInfosEditor_2 = Infos: {0}
+
+Commands_0 = Error: failed to initialize Commands
+
+ComplexSortSelector_0 = sort keys:
+ComplexSortSelector_1 = Complex sort:
+ComplexSortSelector_2 = Sort
+ComplexSortSelector_5 = ** Error during sort: {0}
+ComplexSortSelector_6 = default
+
+ComplexSort_0         = Opening complex sort dialog
+ComplexSort_1         = &Multiple Sort
+ComplexSort_10        = Invalid comparator
+ComplexSort_11        = you must select at least 2 comparators
+ComplexSort_12        = Adding to selection
+ComplexSort_14        = Remove from selection
+ComplexSort_16        = Moving up the selection
+ComplexSort_18        = Moving down the selection
+ComplexSort_2         = Define and use a composite sorter
+ComplexSort_3         = Select a composite sorter
+ComplexSort_4         = &New
+ComplexSort_5         = Create a new sorter
+ComplexSort_6         = Name:
+ComplexSort_9         = Name is mandatory.
+
+ComplexSubcorpusPanel_0  = Match
+ComplexSubcorpusPanel_1  = All criteria
+ComplexSubcorpusPanel_16 = does not contain
+ComplexSubcorpusPanel_2  = Some criteria
+ComplexSubcorpusPanel_4  = Query
+ComplexSubcorpusPanel_5  = Refresh
+
+ComputeConcordance_0 = Opening the Concordance result
+ComputeConcordance_1 = Failed to open concordance editor.
+
+ComputeCoocFromLines_0 = Computing Cooccurrents
+ComputeCoocFromLines_1 = Opening the Cooccurrents table
+
+ComputeCoocMatrix_0  = Cooc matrix:
+ComputeCoocMatrix_1  = Number of nodes:
+ComputeCoocMatrix_10 = Distance
+ComputeCoocMatrix_11 = Minimal co frequence
+ComputeCoocMatrix_12 = Outfile: none
+ComputeCoocMatrix_13 = Choose outfile
+ComputeCoocMatrix_2  = Number of edges:
+ComputeCoocMatrix_3  = Distance:
+ComputeCoocMatrix_4  = Writing cooc matrix in GRAPHML file:
+ComputeCoocMatrix_7  = CoocMatrix parameters
+
+ComputeCooccurrences_0 = Opening cooccurrents table
+ComputeCooccurrences_1 = cannot compute cooccurrences with the selection
+ComputeCooccurrences_2 = StatEngine is not ready. Canceling command.
+
+ComputeDiagnostic_0 = Selection is not structured
+ComputeDiagnostic_1 = Error: selection is not a corpus:
+
+ComputeFrequencyList_2 = Processing word lexicon of {0} in the corpus {1}
+
+ComputeIndexFromLines_0 = Send selection to Index
+
+ComputeInternalView_0 = Selection is not structured
+ComputeInternalView_1 = Error: selection is not a Corpus
+
+ComputeLexicalTable_0  = Computing the Lexical Table with {0}
+ComputeLexicalTable_1  = Computing the Lexical Table {0} with the property {1}
+ComputeLexicalTable_10 = Opening the lexical table
+ComputeLexicalTable_12 = User index occurrences
+ComputeLexicalTable_13 = Select which margins you want to use
+ComputeLexicalTable_16 = Use all occurrences
+ComputeLexicalTable_2  = no property
+ComputeLexicalTable_3  = Opening marge configuration dialog
+ComputeLexicalTable_4  = StatEngine is not ready. Canceling command.
+ComputeLexicalTable_5  = Can not create a lexical table with an Index created on a Corpus
+ComputeLexicalTable_6  = Vocabularies must share the same properties: {0}
+ComputeLexicalTable_7  = Vocabularies must share the same partition: {0}
+ComputeLexicalTable_9  = LexicalTable dialog, failed to get corpus size: {0}
+
+ComputeReferencer_0 = Open references editor
+
+ComputeSpecificitiesDialog_0 = ERROR_ComputeSpecificitiesDialog {0}
+ComputeSpecificitiesDialog_1 = ** Regexp syntax error: {0}
+ComputeSpecificitiesDialog_3 = Focus:
+ComputeSpecificitiesDialog_4 = Part focus:
+ComputeSpecificitiesDialog_9 = No filtering of part available
+
+ComputeSpecificities_0       = Computing Specificites
+ComputeSpecificities_2       = Computing Specificites on {0} and property {1}
+
+ComputeSpecifities_0  = StatEngine is not ready. Canceling command.
+ComputeSpecifities_1  = No selection
+ComputeSpecifities_10 = Compute Specificities
+ComputeSpecifities_11 = Compute Specificities on with lexical table {0}
+ComputeSpecifities_2  = Refreshing corpora view...
+ComputeSpecifities_3  = Computing Specificities on subcorpus {0} with corpus {1}. Properties: {2}
+ComputeSpecifities_4  = Error while computing specificities: 
+
+Compute_Specificities        = Computing specificities.
+
+ConcordancerPreferencePage_3 = Concordance Parameters
+ConcordancerPreferencePage_4 = Lines per &Page:
+ConcordancerPreferencePage_5 = &Left context length in words
+ConcordancerPreferencePage_6 = &Right context length in words
+
+ConcordancesEditorContributor_0 = Concordance
+
+ConcordancesEditor_0                          = Last CQI error:
+ConcordancesEditor_1                          = Reference
+ConcordancesEditor_10                         = . Aborting back to text.
+ConcordancesEditor_100                        = Available values for {0}
+ConcordancesEditor_101                        = Cancel
+ConcordancesEditor_108                        = \ elements. Continue ?
+ConcordancesEditor_11                         = |<
+ConcordancesEditor_110                        = New value {0} for category {1}  
+ConcordancesEditor_112                        = The value {0} is not associated with the category {1}. Associate it ?   
+ConcordancesEditor_115                        = Add a new category
+ConcordancesEditor_116                        = Proceed to annotation
+ConcordancesEditor_12                         = <
+ConcordancesEditor_13                         = >
+ConcordancesEditor_14                         = >|
+ConcordancesEditor_15                         = Category
+ConcordancesEditor_16                         = &Keyword:
+ConcordancesEditor_17                         = Keywords annotation
+ConcordancesEditor_18                         = &Edit
+ConcordancesEditor_19                         = Found {0} occurrences
+ConcordancesEditor_2                          = Left context
+ConcordancesEditor_20                         = Loading line informations...
+ConcordancesEditor_21                         = Could not instanciate one of the corpus Knowledge repository: 
+ConcordancesEditor_22                         = Affect
+ConcordancesEditor_23                         = to
+ConcordancesEditor_24                         = Delete
+ConcordancesEditor_25                         = of
+ConcordancesEditor_26                         = Project id {0} Corpus id {1} Text id {2}
+ConcordancesEditor_27                         = BackToText: Text {0} is missing
+ConcordancesEditor_28                         = the annotation
+ConcordancesEditor_29                         = No page found... for
+ConcordancesEditor_3                          = Keyword
+ConcordancesEditor_30                         = BackToText: default edition is missing
+ConcordancesEditor_31                         = =
+ConcordancesEditor_32                         = Enter a value for an id
+ConcordancesEditor_33                         = to
+ConcordancesEditor_34                         = Opening the Concordance
+ConcordancesEditor_35                         = selected lines
+ConcordancesEditor_36                         = Annotating concordance selection...
+ConcordancesEditor_37                         = Sorting reference column
+ConcordancesEditor_38                         = Hide settings
+ConcordancesEditor_39                         = Show settings
+ConcordancesEditor_4                          = Right context
+ConcordancesEditor_40                         = Error while annotating concordance selection: 
+ConcordancesEditor_41                         = Sorting left context column
+ConcordancesEditor_42                         = page lines
+ConcordancesEditor_43                         = The {0} corpus has no default references: {1}
+ConcordancesEditor_44                         = Annotating concordance page...
+ConcordancesEditor_45                         = Sorting keyword column
+ConcordancesEditor_46                         = Full text display failed: {0}
+ConcordancesEditor_47                         = Error while annotating concordance page: 
+ConcordancesEditor_48                         = Sorting right context column
+ConcordancesEditor_49                         = all lines
+ConcordancesEditor_5                          = Concordance of <{0}> in corpus {1}
+ConcordancesEditor_50                         = Opening corpus edition
+ConcordancesEditor_51                         = Annotating concordance...
+ConcordancesEditor_52                         = Done: one result
+ConcordancesEditor_53                         = Error while annotating concordance: 
+ConcordancesEditor_54                         = Error while deleting annotation: 
+ConcordancesEditor_55                         = Opening property dialog
+ConcordancesEditor_56                         = Start computing concordance
+ConcordancesEditor_57                         = Looking for TypedValue with id=
+ConcordancesEditor_58                         = No value found with the {0} id.
+ConcordancesEditor_59                         = AFFECT 
+ConcordancesEditor_6                          = Sorting
+ConcordancesEditor_60                         = \ to SELECTION=
+ConcordancesEditor_61                         = Could not annotate the value '
+ConcordancesEditor_62                         = '.\n on certain sequences. \n
+ConcordancesEditor_63                         = \	- The sequence 
+ConcordancesEditor_64                         = \ is overlapping with \n
+ConcordancesEditor_65                         = \	\	- the end of a structure 
+ConcordancesEditor_66                         = , at [
+ConcordancesEditor_67                         = \ - 
+ConcordancesEditor_68                         = ]\n
+ConcordancesEditor_69                         = \	\	- the start of a structure 
+ConcordancesEditor_7                          = CQP error:
+ConcordancesEditor_70                         = , at [
+ConcordancesEditor_71                         = \ - 
+ConcordancesEditor_72                         = ]\n
+ConcordancesEditor_73                         = About annotations
+ConcordancesEditor_74                         = Error while affection annotation: 
+ConcordancesEditor_75                         = Annotate
+ConcordancesEditor_76                         = Save the annotations
+ConcordancesEditor_77                         = Open the list of categories
+ConcordancesEditor_78                         = class
+ConcordancesEditor_79                         = Select a value among the list
+ConcordancesEditor_8                          = The corpus has no text_id property
+ConcordancesEditor_80                         = value=
+ConcordancesEditor_81                         = Please enter the new type name
+ConcordancesEditor_82                         = New category
+ConcordancesEditor_83                         = with the category
+ConcordancesEditor_84                         = with the category
+ConcordancesEditor_85                         = OK
+ConcordancesEditor_86                         = Confirm annotation affectation
+ConcordancesEditor_87                         = You are about to annotate  
+ConcordancesEditor_88                         = Delete selected line(s)
+ConcordancesEditor_9                          = Error: could not retrieve line word id for edition 
+ConcordancesEditor_99                         = List of categories
+ConcordancesEditor_referenceColumn_text       = Reference
+ConcordancesEditor_xpndtmNewExpanditem_text   = New ExpandItem
+ConcordancesEditor_xpndtmNewExpanditem_text_1 = New ExpandItem
+ConcordancesEditor_xpndtmNewExpanditem_text_2 = New ExpandItem
+ConcordancesEditor_xpndtmNewParameters_text   = New Parameters
+
+ConvertCorpus_0 = Corpus conversion failed.
+
+CorporaView_0 = Corpus
+CorporaView_1 = Error: {0}
+CorporaView_2 = Can''t retrieve {0} corpus size
+CorporaView_3 = Error while computing the concordance:
+CorporaView_4 = CoocMatrix symbol is:
+CorporaView_5 = Error while computing specificities:
+CorporaView_6 = Failed to open referencer editor:
+CorporaView_7 = Error while computing the lexical table:
+CorporaView_9 = Error: {0} is not writeable
+
+CorpusPage_0   = Editions
+CorpusPage_1   = Add an edition
+CorpusPage_10  = Word properties
+CorpusPage_11  = Add a property definition
+CorpusPage_12  = Add a structural unit definition
+CorpusPage_13  = Remove a property definition
+CorpusPage_14  = Pre build subcorpora and partitions
+CorpusPage_15  = Add a default sub-corpus
+CorpusPage_16  = Punctuations
+CorpusPage_16a = Separator characters
+CorpusPage_17  = Remove a subcorpus
+CorpusPage_18  = Add a default partition
+CorpusPage_19  = Elision characters
+CorpusPage_2   = Remove an edition
+CorpusPage_20  = Remove a partition
+CorpusPage_21  = Add a query
+CorpusPage_22  = End of sentence characters
+CorpusPage_23  = Remove selected query
+CorpusPage_24  = Structures properties
+CorpusPage_25  = Add a property
+CorpusPage_26  = Annotate the corpus
+CorpusPage_27  = Remove a structural unit definition
+CorpusPage_28  = Use only those tokenizer tests
+CorpusPage_29  = Add a parameter
+CorpusPage_3   = Display font
+CorpusPage_30  = Parameters
+CorpusPage_31  = Remove a parameter
+CorpusPage_32  = Add a tokenizer test
+CorpusPage_33  = Add a tokenizer parameter
+CorpusPage_34  = Remove a test
+CorpusPage_35  = 1.\	
+CorpusPage_36  = Words per page
+CorpusPage_37  = Select the source directory.
+CorpusPage_38  = 2.\	
+CorpusPage_39  = Set import parameters in the sections below.
+CorpusPage_4   = Add a xslt parameter
+CorpusPage_40  = *: mandatory field
+CorpusPage_41  = Page break tag
+CorpusPage_42  = 3.\	
+CorpusPage_43  = Start corpus import.
+CorpusPage_44  = Build edition
+CorpusPage_45  = UIs
+CorpusPage_46  = The source directory does not contain import.xml. Creating a new one.
+CorpusPage_47  = Error while creating 'import.xml' file
+CorpusPage_48  = Load import parameters from file:
+CorpusPage_49  = Default
+CorpusPage_5   = Spaces
+CorpusPage_50  = module UI parameters:
+CorpusPage_51  = Only these tests
+CorpusPage_52  = Saving import parameters...
+CorpusPage_53  = Corpus name is mandatory
+CorpusPage_54  = Corpus name must contains at least one letter
+CorpusPage_55  = onlyThoseTests
+CorpusPage_57  = Font name
+CorpusPage_6   = Delete parameter
+CorpusPage_60  = OK
+CorpusPage_61  = Edit XSL stylesheet...
+CorpusPage_63  = Commands
+CorpusPage_64  = Concordance context structure limits
+CorpusPage_65  = Cannot save import configuration. No source folder selected.
+CorpusPage_66  = Cannot start import configuration. No source folder selected.
+CorpusPage_67  = comma separated
+CorpusPage_7   = General informations
+CorpusPage_8   = Corpus name* (only caps and no digit at beginning)
+CorpusPage_80  = Struct limits: 
+CorpusPage_9   = Description - HTML (complete name, author, date, license, comment...)
+CorpusPage_90  = Error: the selected file is not a directory: 
+CorpusPage_91  = Error: can not read the selected file: 
+CorpusPage_92  = Error: corpus name is invalid (remove special characters and punctuation ; must not with a number): 
+CorpusPage_93  = Import stopped: corpus name does not matches the '[A-Z][-A-Z0-9]{1,20}' pattern: 
+
+CreateFile_1 = New file: {0}
+
+CreateFolder_1 = New folder: {0}
+
+CreateFrequencyList_8 = Loading frequencies results...
+
+CreateMacro_0 = Macro name
+CreateMacro_1 = Please write the macro name
+
+CreatePartitionDialog_0  = Create Partition
+CreatePartitionDialog_1  = Simple
+CreatePartitionDialog_10 = Error: the partition created has no part
+CreatePartitionDialog_16 = Queries cannot be left empty.
+CreatePartitionDialog_2  = &Structure:
+CreatePartitionDialog_3  = Assisted
+CreatePartitionDialog_4  = &Property:
+CreatePartitionDialog_5  = Advanced
+CreatePartitionDialog_6  = &Name:
+CreatePartitionDialog_7  = Part
+CreatePartitionDialog_8  = No part was defined
+CreatePartitionDialog_9  = No partition name was specified. The name is {0}
+
+CreatePartition_0        = Creating a new partition with {0}
+CreatePartition_2        = ** Error: the partition was not created
+CreatePartition_5        = Done: {0} items
+CreatePartition_55       = Done: {0} items for {1} occurrences
+CreatePartition_6        = Done: {0} parts
+
+CreateSubCorpus_0      = ** Error: subcorpus was not created
+CreateSubCorpus_1      = No selection for: 
+CreateSubCorpus_2      = Failed to get last CQP error:
+CreateSubCorpus_3      = Selection is not a corpus: 
+CreateSubCorpus_begin  = Creating a sub-corpus in the Search Engine
+CreateSubCorpus_create = Creating a sub-corpus on {0}
+
+CreateSubcorpusDialog_0  = Create subcorpus
+CreateSubcorpusDialog_10 = &Query:
+CreateSubcorpusDialog_11 = Invalid name
+CreateSubcorpusDialog_13 = Invalid query
+CreateSubcorpusDialog_14 = Query cannot be left empty.
+CreateSubcorpusDialog_6  = &Value:
+CreateSubcorpusDialog_8  = No subcorpus name was specified. We've generated one.
+
+CreateSubcorpus_7        = Compute SubCorpus on {0}. Structs: {1} & props {2}: {3}
+CreateSubcorpus_8        = Done: {0} created
+CreateSubcorpus_9        = Compute SubCorpus on {0}. Query: {1}
+
+DONE = Done: {0}
+
+DefineReferencePattern_0 = References display options
+DefineReferencePattern_1 = References &display options
+DefineReferencePattern_2 = References display options
+DefineReferencePattern_3 = References &sort options
+DefineReferencePattern_4 = References sort options
+DefineReferencePattern_5 = References sort options
+
+DeleteFile_0 = Are you sure you want to delete to sort
+DeleteFile_2 = ** Failed to delete file
+
+DeleteInCorporaView_1 = ** Failed to delete subcorpus {0}
+DeleteInCorporaView_2 = ** Failed to delete partition {0}
+
+DeleteLines_0 = The table must contain at least one line
+DeleteLines_1 = Are you sure ?
+
+DeleteObject_0  = Deleting {0}, continue ?
+DeleteObject_1  = Failed to remove 
+DeleteObject_10 = Deleted: {0}
+DeleteObject_3  = Error: delete() returned 'false'
+DeleteObject_4  = Error while deleting {0}: {1}
+DeleteObject_5  = Deleting {0}
+
+DiagnosticPreferencePage_1 = Description
+DiagnosticPreferencePage_2 = Maximum values to display
+DiagnosticPreferencePage_3 = Order partition parts by size
+
+Diagnostique_0  = Structural Units of {0}
+Diagnostique_1  = Informations of {0} already exists. Do you want to compute a new one ?
+Diagnostique_10 = get structural units data
+Diagnostique_11 = Open editor...
+Diagnostique_2  = ** Failed to read *informations* file of
+Diagnostique_7  = Create Informations
+Diagnostique_8  = Getting general informations
+Diagnostique_9  = Getting lexical properties data
+
+DownloadJobHandler_0 = Downloading...
+
+ERROR_WHILE_LOADING_CONCORDANCE_LINE = An error occurred while retrieving the concordance lines: {0}
+
+ElementTreeLabelProvider_0 = ** Error: element not registered
+ElementTreeLabelProvider_1 = ** Error: object is not an 'org.w3c.Element'
+
+EmpantWidget_0 = Context:
+EmpantWidget_1 = word
+EmpantWidget_2 = structure
+EmpantWidget_3 = from -
+EmpantWidget_4 = to -
+EmpantWidget_5 = and from
+EmpantWidget_6 = to
+EmpantWidget_7 = include the keyword structure in the count
+EmpantWidget_8 = use left Window
+EmpantWidget_9 = use right Window
+
+Error_computing_specificities = Error while computing specificities: {0}
+Error_creating_partition      = Error while creating a partition: {0}
+
+ExecuteGroovyScriptFromFile_2 = The groovy script must be in the folder: {0}
+
+ExecuteGroovyScript_0         = \ ms
+ExecuteGroovyScript_1         = Error during parameters initialisation
+ExecuteGroovyScript_2         = The user canceled the script execution
+ExecuteGroovyScript_9         = Error during script execution: 
+
+ExecuteLastGroovyScript_0 = Executing last macro: 
+ExecuteLastGroovyScript_1 = Executing last script: 
+ExecuteLastGroovyScript_3 = Error: Current Groovy script directory does not exist: 
+
+ExecuteRScript_1 = Running {0}
+ExecuteRScript_2 = Done:
+ExecuteRScript_3 = \ ms
+
+ExecuteRText_0 = Running text selection...
+ExecuteRText_1 = ** Error while running R script {0}: {1}
+ExecuteRText_2 = \ ms
+
+ExecuteScriptImport_0 = Import started
+ExecuteScriptImport_1 = ** {0} script file doesn''t exist
+ExecuteScriptImport_2 = ** Error: 'corpora' directory doesn't exist:
+ExecuteScriptImport_3 = Error: the folder {0} still exists. Cannot continue import. You can delete it manually and restart the import.
+ExecuteScriptImport_5 = ** Tokenizer parameters error: import aborted.
+ExecuteScriptImport_6 = The import process failed.
+ExecuteScriptImport_7 = Import done:
+ExecuteScriptImport_8 = ** Error while loading corpus
+
+ExecuteScriptR_0 = ** {0} R script doesn''t exist
+ExecuteScriptR_1 = ** Error while Running R script {0}: {1}
+
+ExecuteScript_0       = Execution of {0}
+ExecuteScript_1       = Save file before execution ?
+ExecuteScript_2       = Save and run
+ExecuteScript_3       = ** No interpreter found for script file extension
+ExecuteScript_4       = Abort
+ExecuteScript_5       = Don't save and run
+ExecuteScript_6       = Always save before launching
+ExecuteScript_7       = Execution canceled.
+
+Exit_Menu_Label = Exit
+
+Explorer_0 = Folder {0} should not be deleted
+Explorer_1 = Go to parent folder
+Explorer_2 = Go to TXM home
+Explorer_3 = TXM
+Explorer_4 = ⇧
+Explorer_5 = ↻
+Explorer_6 = Refresh
+Explorer_7 = ⌂
+Explorer_8 = Go to TXM Home
+
+ExportAnnotation_0 = Exporting annotations.
+
+ExportCorpus_0 = ** Failed to export corpus {0}
+ExportCorpus_3 = Exporting {0}. This may take a while.
+ExportCorpus_4 = Done, the created binary file is {0}
+
+ExportPreferencePage_1  = Export settings
+ExportPreferencePage_18 = Columns separated by
+ExportPreferencePage_19 = Text separator
+ExportPreferencePage_21 = Default charts export file format
+ExportPreferencePage_3  = Export file encoding
+ExportPreferencePage_4  = Show export result in the text editor
+
+ExportResult_0 = Exporting results.
+ExportResult_1 = Exporting...
+ExportResult_2 = {1} export saved in file: {0}
+ExportResult_3 = ** Export: Can''t create file {0}: {1}
+ExportResult_4 = ** Failed to export in file {0} with format {1}
+ExportResult_5 = ** Impossible to read {0}
+ExportResult_6 = ** Failed to export result {0}: {1}
+
+ExportSVG_0 = Exporting...
+ExportSVG_1 = {1} file saved in {0}
+ExportSVG_2 = Exporting with device: {0}
+ExportSVG_3 = Failed to export file {0} with device {1}
+
+FAILED_TO_PARSE_OPTIONS    = Failed to parse TXM options {0}: {1}
+FAILED_TO_SAVE_PREFERENCES = Failed to save preferences:
+
+FactorialMapEditor_0  = Axes:
+FactorialMapEditor_10 = ** Internal error: CA plan selection error
+FactorialMapEditor_11 = Resize
+FactorialMapEditor_13 = Reseting factorial map
+FactorialMapEditor_4  = Show:
+FactorialMapEditor_5  = columns
+FactorialMapEditor_6  = lines
+FactorialMapEditor_8  = Reloading factorial map
+
+FileExplorerPreferencePage_0 = Regexp pattern to hide files
+FileExplorerPreferencePage_1 = Show hidden files
+FileExplorerPreferencePage_2 = Show folders
+
+FileTreeContentProvider_1 = ** File Explorer: Incorrect pattern
+FileTreeContentProvider_2 = \ ERROR
+FileTreeContentProvider_3 = Error element: '
+FileTreeContentProvider_4 = '
+
+FixUpdateHandler_0 = Ready to show Update UI
+
+FrequencyListEditorInput_0 = Lexicon
+FrequencyListEditorInput_1 = Pareto
+FrequencyListEditorInput_2 = Lexicon cannot be null
+FrequencyListEditorInput_3 = Form
+FrequencyListEditorInput_4 = Frequency
+FrequencyListEditorInput_5 = String
+FrequencyListEditorInput_6 = Integer
+FrequencyListEditorInput_9 = Type
+
+GenericMultiPageEditor_1 = The input {0} cannot be displayed.
+GenericMultiPageEditor_3 = The number of editors ({0}) and number of inputs ({1}) must be equal.
+
+GetConcordancesDialog_0  = ERROR_GetConcordancesDialog: {0}
+GetConcordancesDialog_1  = Compute specificities
+GetConcordancesDialog_13 = you must select a property.
+GetConcordancesDialog_14 = Invalid property
+GetConcordancesDialog_15 = you must select an property.
+GetConcordancesDialog_4  = &Property:
+GetConcordancesDialog_5  = &Left context size:
+GetConcordancesDialog_6  = &Right context size:
+GetConcordancesDialog_7  = &Reference:
+
+GetConcordances_4        = Error while computing concordances: {0}
+
+GraphicalLogger_0 = Error {0}
+
+GroovyConsole_4 = \nConsole reports an Internal error.
+GroovyConsole_5 = The error is:
+
+ImportDialog_0  = Import setup - {0}
+ImportDialog_1  = Source directory:
+ImportDialog_13 = This directory seems to contain a binary corpus
+ImportDialog_14 = This computer encoding:
+ImportDialog_16 = Guess:
+ImportDialog_19 = This computer language:
+ImportDialog_22 = Select:
+ImportDialog_23 = Options
+ImportDialog_4  = Sources characters encoding:
+ImportDialog_5  = Main language:
+ImportDialog_6  = Tokenizer parameter file:
+
+ImportFormEditor_0 = Warning: the import script is missing: {0}
+ImportFormEditor_1 = {0} Import
+
+ImportPreferencePage_0 = Character encoding
+ImportPreferencePage_2 = metadata.csv file format
+ImportPreferencePage_3 = Clipboard
+ImportPreferencePage_4 = Default language
+ImportPreferencePage_5 = Note: Use '??' value to guess.
+
+ImportSelectedText_0  = Import clipboard text
+ImportSelectedText_1  = clipboard
+ImportSelectedText_10 = Identified Language
+ImportSelectedText_12 = Using language
+ImportSelectedText_2  = ** Clipboard is empty
+ImportSelectedText_3  = Confirm
+ImportSelectedText_4  = The corpus  and the corpus {0} will be deleted
+ImportSelectedText_6  = ** Internal error: ImportSelectedText failed to get default project
+
+IndexToCooccurrence_0 = Error while linking Index to Cooccurences
+
+IndexToLexicalTable_0 = Cannot create a Lexical Table from an Index created with a Corpus (more than one column is needed)
+
+InternalCorpusView_0 = Error while computing corpus summary
+InternalCorpusView_1 = Reload
+InternalCorpusView_2 = Error: getText: {0}
+
+InternalViewEditor_1  = Computing Internal view
+InternalViewEditor_10 = InternalView: failed to initialize form
+InternalViewEditor_11 = OK
+InternalViewEditor_16 = error
+InternalViewEditor_2  = Getting next result
+InternalViewEditor_25 = QUERY:
+InternalViewEditor_3  = Refreshing interface
+InternalViewEditor_4  = Structure:
+InternalViewEditor_5  = Structural properties:
+
+Invalid_analysis_property = Invalid property
+
+JobHandler_0 = Canceling...
+JobHandler_1 = Canceling
+JobHandler_2 = \ canceling requested
+JobHandler_3 = Failed to cancel
+
+JobsTimer_12 = h,
+JobsTimer_13 = \ min and
+JobsTimer_15 = Done in {0} ({1}).
+JobsTimer_16 = . (
+JobsTimer_17 = \ msec)
+JobsTimer_19 = Done in {0}.
+JobsTimer_2  = \ msec
+JobsTimer_20 = Job:
+JobsTimer_21 = Exec:
+JobsTimer_5  = \ sec
+JobsTimer_9  = \ min and
+
+LanguageSwitchHandler_0 = Interface language (LOCALE) was not set
+LanguageSwitchHandler_1 = The file {0} does not exist
+LanguageSwitchHandler_3 = Choose the language
+LanguageSwitchHandler_5 = SwitchLanguage: Malformed url: {0}
+LanguageSwitchHandler_7 = TXM.ini:
+
+LastCQPError = Last CQP error:
+
+LineLabelProvider_1 = Should not happen
+
+LoadBinaryCorpus_0  = : OK
+LoadBinaryCorpus_1  = Failed to remove old backup of corpus: 
+LoadBinaryCorpus_10 = The new binary corpus '
+LoadBinaryCorpus_11 = ' could not be loaded.
+LoadBinaryCorpus_12 = Restoring previous corpus...
+LoadBinaryCorpus_13 = Failed to delete corrupted corpus: 
+LoadBinaryCorpus_14 = . Could not restore 
+LoadBinaryCorpus_15 = Failed to restore backup corpus: 
+LoadBinaryCorpus_2  = Failed to backup the corpus to: 
+LoadBinaryCorpus_3  = : FAIL (reason=
+LoadBinaryCorpus_4  = Failed to get the new binary corpus
+LoadBinaryCorpus_5  = No corpus found in the binary corpus.
+LoadBinaryCorpus_6  = Testing the new CQP corpus: 
+LoadBinaryCorpus_7  = )
+
+LocalePreferencePage_1 = Configuration of the user interface language
+LocalePreferencePage_2 = User interface language
+
+MacroExplorer_2 = REFRESH the Tree
+
+MacrosExplorer_0 = New macro
+MacrosExplorer_1 = Create a new macro from a template
+
+MainPage_0  = MainPage
+MainPage_1  = Main
+MainPage_10 = \	go to the next panel, using the tabs below\n
+MainPage_11 = 3-\	You can save the import parameters with the 'floppy' icon\n
+MainPage_12 = 4-\	To start the import click on the 'green arrow' icon.
+MainPage_13 = parallel
+MainPage_14 = Corpora
+MainPage_15 = Add an aligned corpus
+MainPage_17 = Enter the corpus name
+MainPage_18 = Front XSL
+MainPage_19 = Lexical Segmentation
+MainPage_2  = Import parameters of {0}
+MainPage_20 = Main language
+MainPage_22 = Remove a corpus
+MainPage_23 = Source characters encoding
+MainPage_25 = Enter the corpus name to remove
+MainPage_27 = Links
+MainPage_28 = Error while getting encoding
+MainPage_29 = Add a link
+MainPage_3  = Corpus  infos
+MainPage_30 = create new link from corpora:
+MainPage_31 = Select 2 corpus:
+MainPage_33 = seg
+MainPage_34 = Remove a link
+MainPage_36 = Enter the line number to remove
+MainPage_38 = remove link nÂ°
+MainPage_39 = Please enter a valid linenumber
+MainPage_4  = Corpus  name
+MainPage_40 = First corpus
+MainPage_42 = Aligned structure
+MainPage_44 = * \n(archive name without extension)
+MainPage_45 = Description
+MainPage_46 = AddCorpus: NEW CORPUS
+MainPage_49 = base name is mandatory
+MainPage_5  = Opening...
+MainPage_50 = refresh links table
+MainPage_52 = The source directory does not contain import.xml
+MainPage_53 = Sorry, 'the import.xml' file could not been created
+MainPage_54 = Load params from:
+MainPage_55 = Params:
+MainPage_6  = Saving...
+MainPage_7  = Starting...
+MainPage_8  = 1-\	Click on the 'folder' icon to choose the source directory\n
+MainPage_9  = 2-\	If you want to add details such as default subcorpus, exemple queries or types of word properties,\n
+
+MergeCols_1 = New name
+MergeCols_2 = Edit the name of the new column created by the merged columns
+MergeCols_5 = Names:
+MergeCols_6 = End of column merge.
+
+MergeDeleteDialog_0 = merge
+MergeDeleteDialog_1 = Merge/Delete
+MergeDeleteDialog_4 = merge result name
+
+MergeLines_2 = Edit the name of the new line created by the merged lines
+
+MetadataPage_1 = Metadata preview
+MetadataPage_2 = Metadatas parameters
+MetadataPage_3 = Refresh
+MetadataPage_4 = Metadata column titles
+MetadataPage_5 = Text ID
+MetadataPage_7 = No metadata file {0}
+
+MultipleValueTreeDialog_0 = add:
+
+NavigationWidget_0 = Error while getting current position value:
+
+NumberOfLines = Number of lines:
+
+ObjectExplorer_0  = Informations:
+ObjectExplorer_10 = Remove property
+ObjectExplorer_12 = Enter a property name to remove
+ObjectExplorer_15 = add a new property to all children
+ObjectExplorer_2  = Value
+ObjectExplorer_21 = remove a property from the children
+ObjectExplorer_26 = Name
+ObjectExplorer_27 = Key
+ObjectExplorer_3  = New property
+ObjectExplorer_4  = Property name
+ObjectExplorer_5  = Enter a property name to add
+ObjectExplorer_7  = new name
+
+ObjectSelectionDialog_0 = Value selector
+ObjectSelectionDialog_3 = Found {0} value(s)
+ObjectSelectionDialog_5 = Wrong regular expression: {0}
+
+ObjectSelector_0 = Obj:
+ObjectSelector_1 = Select
+
+OpenBiblio_1 = No text in corpus : {0}
+OpenBiblio_2 = Select text id
+OpenBiblio_7 = Could not find text {0} in corpus  {1}
+OpenBiblio_9 = Text {0} has no bibliographic record
+
+OpenBrowser_0 = ** Error while opening bibliographic record
+OpenBrowser_1 = . URL
+
+OpenEdition_0 = Select a part
+OpenEdition_1 = Failed to load edition of {0}
+OpenEdition_2 = No main corpus for corpus: 
+OpenEdition_3 = Opening edition of {0}
+OpenEdition_5 = ** Could not find first text with {0} ID in the corpus
+OpenEdition_7 = ** Failed to find default edition of text
+OpenEdition_8 = ** Failed to find first page of edition
+
+OpenEmptyEditor_2 = Could not find directory: {0}
+
+OpenGraph_8 = Can''t open graphic {0}
+
+OpenParaBrowser_0 = Opening the parabrowser
+
+OpenSVGGraph_0 = SVG Graphic
+
+OpenTXMUserPreferences_0 = Default settings
+
+OpenURI_0 = ** Desktop is not supported (fatal)
+OpenURI_1 = ** Error while opening file {0}
+
+ParaBrowserEditor_11 = ParaBrowser: get next({0}) struct {1} paraid {2} value {3}
+ParaBrowserEditor_18 = -MOVE to
+ParaBrowserEditor_19 = -Don't MOVE !!!!! NEXT is
+ParaBrowserEditor_21 = _
+ParaBrowserEditor_22 = Open Parabrowser
+ParaBrowserEditor_3  = Ref:
+ParaBrowserEditor_4  = Références
+ParaBrowserEditor_5  = Structure
+ParaBrowserEditor_9  = Ref: {0}: {1}
+
+ParametersDialog_0  = {0} parameters input
+ParametersDialog_1  = Run
+ParametersDialog_10 = Unknowed widget name: '
+ParametersDialog_11 = (* mandatory fields)
+ParametersDialog_12 = ** Error: missing value:
+ParametersDialog_13 = ** Error: format error:
+ParametersDialog_14 = Error in @Option name declaration:
+ParametersDialog_15 = Error: the bean is not a groovy.lang.Script object
+ParametersDialog_17 = Error: the ''monitor'' (JobHandler class) binding is missing. Got: {0}.
+
+PartitionComposer_0  = Structure:
+PartitionComposer_1  = Error: this partition has no part.
+PartitionComposer_11 = Remove
+PartitionComposer_2  = Select values to assign:
+PartitionComposer_3  = New part
+PartitionComposer_5  = Part
+PartitionComposer_6  = Rmv all the parts
+PartitionComposer_8  = Title:
+PartitionComposer_9  = Assign
+
+PartsSize_0  = StatEngine is not ready. Canceling command.
+PartsSize_10 = Dimensions of partition {0} of corpus {1}
+PartsSize_2  = Number of words per part
+
+PasteFile_1 = ** Failed to copy
+PasteFile_3 = ** Failed to delete
+PasteFile_4 = :
+
+Preferences_Menu_Label = Preferences
+
+ProgressionDialog_0  = Progression Parameters
+ProgressionDialog_1  = Graph type:
+ProgressionDialog_10 = Progression dialog: wrong regular expression:
+ProgressionDialog_11 = Bandewidth multiplier:
+ProgressionDialog_13 = Display options
+ProgressionDialog_14 = Single line style
+ProgressionDialog_15 = Repeat same values
+ProgressionDialog_16 = Monochrome
+ProgressionDialog_17 = Strip multiplier error:
+ProgressionDialog_2  = cumulative
+ProgressionDialog_3  = density
+ProgressionDialog_4  = Structural Unit:
+ProgressionDialog_5  = delete
+ProgressionDialog_7  = Regex:
+ProgressionDialog_8  = Queries:
+ProgressionDialog_9  = add
+
+ProgressionEditorInput_0 = PROGRESSION NAME
+
+ProgressionForm_0  = Type:
+ProgressionForm_1  = cumulatif
+ProgressionForm_10 = Repeated
+ProgressionForm_11 = B&&W
+ProgressionForm_12 = QUERIES:
+ProgressionForm_13 = Add
+ProgressionForm_14 = Delete
+ProgressionForm_2  = density
+ProgressionForm_3  = Scale
+ProgressionForm_5  = Display options
+ProgressionForm_6  = Structural unit:
+ProgressionForm_7  = Property:
+ProgressionForm_8  = Reg. Exp.:
+ProgressionForm_9  = Differents line styles
+
+PropertiesSelector_0 = Can''t load properties from corpus {0}: {1}
+PropertiesSelector_1 = Properties:
+PropertiesSelector_2 = Edit
+
+Property = Property:
+
+PropertySelector_0 = Select a property
+
+PurgeCorpora_0  = Warning! this command will delete the selected corpora, Continue ?
+PurgeCorpora_1  = Corpora to delete
+PurgeCorpora_10 = Creating new workspace
+PurgeCorpora_12 = Restarting platform
+PurgeCorpora_13 = ** Error: could not find workspace:
+PurgeCorpora_2  = ** Warning: Failed to delete corpora:
+PurgeCorpora_3  = Warning! this command will delete all your corpora, Continue ?
+PurgeCorpora_4  = ** Error: 'TXMHOME' environment variable is not set (its standard value is '$HOME/TXM'). Aborting
+PurgeCorpora_5  = Delete all corpora
+PurgeCorpora_7  = ** Failed to delete corpora
+PurgeCorpora_9  = ** Failed to delete registry
+
+QueriesView_1  = Export all
+QueriesView_10 = Error with element {0}
+QueriesView_5  = Queries:\n
+
+QueryAssistDialog_0  = Query Assistant
+QueryAssistDialog_1  = Add a word
+QueryAssistDialog_10 = equals to
+QueryAssistDialog_11 = starts with
+QueryAssistDialog_12 = ends with
+QueryAssistDialog_13 = contains
+QueryAssistDialog_2  = I'm looking for:
+QueryAssistDialog_3  = I''m looking for {0} words
+QueryAssistDialog_32 = followed by
+QueryAssistDialog_33 = separated by at least 0 word
+QueryAssistDialog_34 = separated by at least 1 word
+QueryAssistDialog_8  = a word with its property
+
+QueryIndexEditor_0  = Query Index of
+QueryIndexEditor_1  = replacing line:
+QueryIndexEditor_10 = queries
+QueryIndexEditor_2  = Failed to add line with query:
+QueryIndexEditor_3  = Line added.
+QueryIndexEditor_4  = Load from a file
+QueryIndexEditor_5  = *.properties
+QueryIndexEditor_6  = Cannot read from file:
+QueryIndexEditor_7  = Link to concordance
+QueryIndexEditor_8  = Link to progression
+QueryIndexEditor_9  = delete lines
+
+RConsole_0 = Connecting RConsole to RWorkspace stdout and stderr.
+RConsole_1 = Error while initializing RConsole: 
+
+RVariablesView_1 = Refresh variables
+RVariablesView_2 = Show eval logs
+RVariablesView_9 = "TXM name {0} >> R name {1}
+
+ReferencerEditor_0  = Compute references of <{0}> in {1} with property {2} and pattern {3}
+ReferencerEditor_10 = Get indexes
+ReferencerEditor_11 = References
+ReferencerEditor_12 = Group positions by indexes
+ReferencerEditor_13 = Refresh ui
+ReferencerEditor_17 = Showing first result page
+ReferencerEditor_19 = Showing last result page
+ReferencerEditor_21 = Showing next result page
+ReferencerEditor_23 = Showing previous result page
+ReferencerEditor_25 = Opening concordances
+ReferencerEditor_5  = Computing references of {0}
+ReferencerEditor_6  = Reference pattern
+ReferencerEditor_7  = No results
+ReferencerEditor_8  = Get matches
+ReferencerEditor_9  = Units
+
+ReferencerPreferencePage_2 = Referencer
+ReferencerPreferencePage_3 = Order references by frequency
+
+RefreshingCorporaView = Refreshing corpora...
+
+RenameFile_0 = Rename file
+RenameFile_2 = renaming by:
+RenameFile_3 = ** Failed to rename
+
+RestartTXM_0 = Reloading views...
+RestartTXM_1 = Restart TXM
+
+RunGroovyScript_0  = Script execution
+RunGroovyScript_1  = &Run script
+RunGroovyScript_10 = Sources folder:
+RunGroovyScript_2  = Run script
+RunGroovyScript_3  = *.groovy
+RunGroovyScript_4  = Error while opening groovy script: {0}
+RunGroovyScript_8  = Error while running script: {0}
+RunGroovyScript_9  = Execute script
+
+SEARCH = &Search
+
+SVGGraphicEditor_1 = Cannot draw a graphic with the information provided.
+
+SaveAs_2 = ** Failed to save as
+
+SaveBeforeExecutionDialog_0 = Save before execution ?
+
+ScriptPreferencePage_0 = Next session number
+ScriptPreferencePage_1 = Save script before execution
+ScriptPreferencePage_3 = &Root folder
+
+SetContextSize_1 = &Contexts display options
+SetContextSize_2 = Contexts display options
+SetContextSize_3 = Left context size
+SetContextSize_4 = Right context size
+
+SetEncoding_0 = Change characters encoding
+SetEncoding_1 = Change characters encoding.\n\n\	Current encoding:
+SetEncoding_2 = \n\	Default encoding:
+
+SetLineNumber_0 = Pagination options
+SetLineNumber_1 = Line per page:
+
+SetSortProperty_1 = &Sort options
+SetSortProperty_2 = Sort options
+SetSortProperty_3 = Sort options
+
+ShowSelected_0 = File: 
+ShowSelected_4 = Set the 'LANG' property
+
+ShowSvgHelp_0 = Graphics keyboard shortcuts
+ShowSvgHelp_1 = \	Pan: Right Mouse + Drag\n
+ShowSvgHelp_2 = \	Zoom in&out: Mouse wheel OR Shift + Right Mouse + Drag\n
+ShowSvgHelp_3 = \	Zoom to selection: Ctrl+Left Mouse+drag\n
+ShowSvgHelp_4 = \	\n
+ShowSvgHelp_5 = \	Reset the view: F5
+
+SimpleSubcorpusPanel_0 = Structural unit combo selected
+
+SingularValuesEditor_0 = wrong input
+
+SortPropertySelection_0 = Sort options
+
+Structure_field_not_empty = structure field is mandatory.
+
+Submit_0 = Save script
+
+SummaryView_0 = No default edition page found for element: 
+
+TXMCqpServerWatcher_0 = CQP server is down
+TXMCqpServerWatcher_1 = Please wait for searchengine to restart...
+
+TXMRServeWatcher_0 = StatEngine server is down
+TXMRServeWatcher_1 = Please wait for StatEngine to restart...
+TXMRServeWatcher_2 = Ok
+TXMRServeWatcher_3 = Reloading corpora view...
+TXMRServeWatcher_4 = Please wait...
+
+TablableVector_0 = The two arrays must have the same size.
+
+TableEditor_0 = Cannot draw a table with the information provided: {0}
+
+TableKeyListener_0 = Found lines: 
+TableKeyListener_1 = Enter the regular expression of your search
+TableKeyListener_6 = Copied line(s): \n
+
+TableSorter_0 = Column index is too big.
+
+TextometriePreferencePage_0  = Check for updates at startup
+TextometriePreferencePage_1  = General preferences backup
+TextometriePreferencePage_14 = Preferences saved in
+TextometriePreferencePage_15 = Export to file
+TextometriePreferencePage_18 = Preferences imported from
+TextometriePreferencePage_19 = TXM needs to close the preferences window to update them
+TextometriePreferencePage_2  = Automatic updates
+TextometriePreferencePage_20 = Import from a file
+
+TextualPlansSection_milestone_label           = Milestone elements
+TextualPlansSection_milestone_tooltip         = List of milestone elements, separated by ',' (comma).
+TextualPlansSection_outsidetext_label         = Outside-text
+TextualPlansSection_outsidetext_tooltip       = List of tags encoding the outside-text \n(no structure or word content indexed, no structure or word content edited in TXM)
+TextualPlansSection_outsidetexttoedit_label   = Outside-text to-edit
+TextualPlansSection_outsidetexttoedit_tooltip = List of tags encoding the outside-text to edit \n(no structure or word content indexed, structure and word content edited in TXM)
+TextualPlansSection_save_error                = Textual plan parameters not saved.
+TextualPlansSection_title                     = Textual planes
+TextualPlansSection_update_error              = Textual plan section parameters not updated.
+
+TreeTaggerPreferencePage_0 = Don't normalize apostrophes to '
+TreeTaggerPreferencePage_1 = Path to install directory
+TreeTaggerPreferencePage_2 = Path to models directory
+TreeTaggerPreferencePage_3 = Options [separated by '  ' (2 spaces)]
+
+TxmBrowser_0  = Beginning
+TxmBrowser_10 = Could not launch the internal web browser. You must set that parameter in the preferences, menu: General>WebNavigator
+TxmBrowser_11 = No previous text
+TxmBrowser_12 = No text next
+TxmBrowser_5  = Previous page
+TxmBrowser_6  = Next page
+TxmBrowser_7  = End
+TxmBrowser_8  = Next text
+TxmBrowser_9  = Previous text
+
+TxmCommand_1 = Loading extension
+
+TxtEditor_0 = TextEditor:
+TxtEditor_1 = Encoding found
+
+UIParameterException_0 = Error
+
+UserPreferencePage_0 = User page
+UserPreferencePage_1 = Recompute automatically
+UserPreferencePage_3 = Do not confirm to delete an object
+
+ViewPropertySelectionDialog_0 = Display options
+
+ViewPropertySelection_0       = Display options
+
+WordCloudPreferencePage_0 = Maximum number of words
+WordCloudPreferencePage_1 = Minimal frequency
+WordCloudPreferencePage_2 = Percents of rotated words
+WordCloudPreferencePage_3 = Random color order

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/decorators/RDecorator.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/decorators/RDecorator.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/decorators/RDecorator.java	(revision 324)
@@ -0,0 +1,91 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.decorators;
+
+import java.lang.reflect.Method;
+
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.utils.OverlayImageIcon;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RDecorator.
+ */
+public class RDecorator extends LabelProvider implements ILabelDecorator
+{
+	
+	/**
+	 * Instantiates a new r decorator.
+	 */
+	public RDecorator()
+	{
+		super();
+	}
+	// Method to decorate Image 
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
+	 */
+	@Override
+	public Image decorateImage(Image image, Object object)
+	{
+		String symbol= null;
+		try {
+			Method getname = object.getClass().getMethod("getSymbol"); //$NON-NLS-1$
+			symbol = (String)getname.invoke(object);
+		} catch (Exception e) {return null;}
+		
+		if (symbol == null) {
+			return null;
+		}
+		//System.out.println("decorate "+symbol);
+		// Overlay custom image over base image 
+		try {
+			Image image2;
+			OverlayImageIcon overlayIcon = new OverlayImageIcon(image, IImageKeys.RDECORATION);
+			image2 = overlayIcon.getImage();
+			return image2;
+		}
+		catch(NullPointerException e) {
+		}
+		return null;
+		// The image should be disposed when the plug-in is 
+		// disabled or on shutdown 
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String, java.lang.Object)
+	 */
+	@Override
+	public String decorateText(String text, Object element) {
+		// TODO Auto-generated method stub
+		return null;
+	}	
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/decorators/RDecorator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/IImageKeys.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/IImageKeys.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/IImageKeys.java	(revision 324)
@@ -0,0 +1,277 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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;
+
+import java.util.HashMap;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * Stores image keys and also Image objects. 
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ */
+// FIXME: this class creates some image but never free them.
+public abstract class IImageKeys {
+
+	/** The images. */
+	private static HashMap<String, Image> images = new HashMap<String, Image>();
+	
+	/** The Constant ACTION_REFERENCER. */
+	public static final String ACTION_REFERENCER = "icons/functions/Referencer.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_CONCORDANCES. */
+	public static final String ACTION_CONCORDANCES = "icons/functions/Concordances.png"; //$NON-NLS-1$
+	public static final String CONCORDANCE_DELETE = "icons/functions/Concordances_delete_line.png"; //$NON-NLS-1$
+	/** The Constant ACTION_COOCCURRENCE. */
+	public static final String ACTION_COOCCURRENCE = "icons/functions/Cooccurrences.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_CORRESPONDANCE_ANALYSIS. */
+	public static final String ACTION_CORRESPONDANCE_ANALYSIS = "icons/functions/CorrespondanceAnalysis.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_PARTITION. */
+	public static final String ACTION_PARTITION = "icons/functions/Partition.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_SPECIFICITIES. */
+	public static final String ACTION_SPECIFICITIES = "icons/functions/Specificities.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_SUBCORPUS. */
+	public static final String ACTION_SUBCORPUS = "icons/functions/SubCorpus.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_RUN_SCRIPT. */
+	public static final String ACTION_RUN_SCRIPT = "icons/functions/RunScript.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_FREQUENCY_LIST. */
+	public static final String ACTION_FREQUENCY_LIST = "icons/functions/lexicon.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_INDEX. */
+	public static final String ACTION_INDEX = "icons/functions/Index.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_PROGRESSION. */
+	public static final String ACTION_PROGRESSION = "icons/functions/Progression.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_ASSISTQUERY. */
+	public static final String ACTION_ASSISTQUERY = "icons/functions/Queryassist.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_DELETE. */
+	public static final String ACTION_DELETE = "icons/functions/Delete.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_SEARCH. */
+	public static final String ACTION_SEARCH = "icons/functions/Search.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_CAH. */
+	public static final String ACTION_CAH = "icons/functions/CAH.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_INFO. */
+	public static final String ACTION_INFO = "icons/functions/diagnostique.png"; //$NON-NLS-1$
+		
+	/** The Constant TEXT. */
+	public static final String TEXT = "icons/objects/book.png"; //$NON-NLS-1$
+	
+	/** The Constant BASE. */
+	public static final String BASE = "icons/objects/books.png"; //$NON-NLS-1$
+	
+	/** The Constant QUERY. */
+	public static final String QUERY = "icons/objects/query.png"; //$NON-NLS-1$
+	
+	/** The Constant CORPUS. */
+	public static final String CORPUS = "icons/objects/corpus.png"; //$NON-NLS-1$
+	
+	/** The Constant EDITION. */
+	public static final String EDITION = "icons/objects/edition.png"; //$NON-NLS-1$
+	
+	/** The Constant FILE. */
+	public static final String FILE = "icons/objects/file.png"; //$NON-NLS-1$
+	
+	/** The Constant FOLDER. */
+	public static final String FOLDER = "icons/objects/folder.png"; //$NON-NLS-1$
+	
+	/** The Constant FOLDER. */
+	public static final String SAVE = "icons/functions/save.png"; //$NON-NLS-1$
+	
+	/** The Constant FOLDER. */
+	public static final String START = "icons/functions/run.png"; //$NON-NLS-1$
+	
+	/** The Constant PARTITION. */
+	public static final String PARTITION = "icons/objects/partition.png"; //$NON-NLS-1$
+	
+	/** The Constant LEXICALTABLE. */
+	public static final String LEXICALTABLE = "icons/objects/lexicaltable.png"; //$NON-NLS-1$
+	
+	/** The Constant PROJECT. */
+	public static final String PROJECT = "icons/objects/project.png"; //$NON-NLS-1$
+	
+	/** The Constant SCRIPT. */
+	public static final String SCRIPT = "icons/objects/script.png"; //$NON-NLS-1$
+	
+	/** The Constant SUBCORPUS. */
+	public static final String SUBCORPUS = "icons/objects/subcorpus.png"; //$NON-NLS-1$
+	
+	/** The Constant ACTION_TEXT. */
+	public static final String ACTION_TEXT = "icons/objects/text.png"; //$NON-NLS-1$
+	
+	/** The Constant RDECORATION. */
+	public static final String RDECORATION = "icons/decorators/R.png"; //$NON-NLS-1$
+
+	public static final String GRAPH_SPECIFICITIES = "icons/functions/SpecificitiesGraph.png"; //$NON-NLS-1$
+	
+	/** The Constant CHECKED. */
+	public static final String CHECKED = "icons/tick.png"; //$NON-NLS-1$
+	
+	/** The Constant UNCHECKED. */
+	public static final String UNCHECKED = "icons/cross.png"; //$NON-NLS-1$
+
+
+	public static final String ACTION_INTERNALVIEW = "icons/functions/InternalView.png"; //$NON-NLS-1$
+
+
+	public static final String ACTION_INTERTEXTDIST = "icons/functions/dist.png"; //$NON-NLS-1$
+
+
+	public static final String QUERYINDEX = "icons/functions/QueryIndex.png"; //$NON-NLS-1$
+
+
+	public static final String COOCMATRIX = "icons/functions/graph.png"; //$NON-NLS-1$
+
+
+	public static final String ACTION_WORDCLOUD = "icons/functions/WordCloud.png"; //$NON-NLS-1$
+
+
+	public static final String CTRLSTART = "icons/control_start_blue.png"; //$NON-NLS-1$
+
+
+	public static final String CTRLREVERSE = "icons/control_reverse_blue.png"; //$NON-NLS-1$
+
+
+	public static final String CTRLPLAY = "icons/control_play_blue.png"; //$NON-NLS-1$
+
+
+	public static final String CTRLEND = "icons/control_end_blue.png"; //$NON-NLS-1$
+
+
+	public static final String CTRLFASTFORWARD = "icons/control_fastforward_blue.png"; //$NON-NLS-1$
+	
+	public static final String CTRLFASTFORWARDEND = "icons/control_fastforwardend_blue.png"; //$NON-NLS-1$
+
+
+	public static final String CTRLREWINDSTART = "icons/control_rewindstart_blue.png"; //$NON-NLS-1$
+	public static final String CTRLREWIND = "icons/control_rewind_blue.png"; //$NON-NLS-1$
+
+	/**
+	 * Chart editor export view command icon.
+	 */
+	public static final String CHARTS_EXPORT_VIEW = "icons/functions/charts_export_view.png"; //$NON-NLS-1$
+	
+	/**
+	 * Chart editor reset view command icon.
+	 */
+	public static final String CHARTS_RESET_VIEW = "icons/functions/charts_reset_view.png"; //$NON-NLS-1$
+
+	/**
+	 * CA Chart editor show/hide columns command icon.
+	 */
+	public static final String CHARTS_CA_SHOW_COLUMNS = "icons/functions/charts_CA_show_colums.png"; //$NON-NLS-1$
+	
+	/**
+	 * CA Chart editor show/hide rows command icon.
+	 */
+	public static final String CHARTS_CA_SHOW_ROWS = "icons/functions/charts_CA_show_rows.png"; //$NON-NLS-1$
+
+	/**
+	 * CAH Chart editor compute columns command icon.
+	 */
+	public static final String CHARTS_CAH_COMPUTE_COLUMNS = "icons/functions/charts_CAH_compute_columns.png"; //$NON-NLS-1$
+	
+	/**
+	 * CAH Chart editor compute rows command icon.
+	 */
+	public static final String CHARTS_CAH_COMPUTE_ROWS = "icons/functions/charts_CAH_compute_rows.png"; //$NON-NLS-1$
+	
+	/**
+	 * Global export chart command icon.
+	 */
+	public static final String CHARTS_EXPORT_CHART = "icons/functions/export_chart.png"; //$NON-NLS-1$
+
+	/**
+	 * Global export result data command icon.
+	 */
+	public static final String CHARTS_EXPORT_DATA = "icons/functions/export_data.png"; //$NON-NLS-1$
+
+	public static final String PENCIL_ADD = "icons/functions/pencil_add.png"; //$NON-NLS-1$
+	public static final String PENCIL = "icons/functions/pencil.png"; //$NON-NLS-1$
+	public static final String PENCIL_SAVE = "icons/functions/pencil_save.png"; //$NON-NLS-1$
+
+	public static final String ACTION_ADD = "icons/add.png";//$NON-NLS-1$
+	public static final String WORLD = "icons/world.png";
+
+	/**
+	 * Gets the image.
+	 *
+	 * @param imagekey the imagekey
+	 * @return the image
+	 */
+	public static Image getImage(String imagekey) {
+		return getImage(Application.PLUGIN_ID, imagekey);
+	}
+	
+	/**
+	 * 
+	 * @param imageFilePath
+	 * @return
+	 */
+	public static ImageDescriptor getImageDescriptor(String imageFilePath) {
+		return AbstractUIPlugin.imageDescriptorFromPlugin(Application.PLUGIN_ID, imageFilePath);
+	}
+	
+	/**
+	 * @param objectOfPlugin
+	 * @param imageFilePath
+	 * @return
+	 */
+	public static Image getImage(Class classOfPlugin, String imageFilePath) {
+		return getImage(FrameworkUtil.getBundle(classOfPlugin).getSymbolicName(), imageFilePath);
+	}
+	
+	/**
+	 * 
+	 * @param pluginId
+	 * @param imagekey
+	 * @return
+	 */
+	public static Image getImage(String pluginId, String imagekey) {
+		if (!images.containsKey(imagekey))
+			images.put(imagekey, new Image(null, AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, imagekey).getImageData()));
+		return images.get(imagekey);
+	}
+	
+	
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/IImageKeys.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicEditorActionBarContributor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicEditorActionBarContributor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicEditorActionBarContributor.java	(revision 324)
@@ -0,0 +1,48 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors;
+
+import org.eclipse.ui.part.EditorActionBarContributor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class SVGGraphicEditorActionBarContributor.
+ */
+//FIXME: not used?
+@Deprecated
+public class SVGGraphicEditorActionBarContributor extends
+		EditorActionBarContributor {
+
+	/**
+	 * Instantiates a new sVG graphic editor action bar contributor.
+	 */
+	public SVGGraphicEditorActionBarContributor() {
+		// TODO Auto-generated constructor stub
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicEditorActionBarContributor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TestEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TestEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TestEditor.java	(revision 324)
@@ -0,0 +1,91 @@
+package org.txm.rcp.editors;
+
+
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.CoolBar;
+import org.eclipse.swt.widgets.CoolItem;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.wb.swt.SWTResourceManager;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.graphics.Rectangle;
+
+
+public class TestEditor extends EditorPart {
+
+	public static final String ID = "TestEMEditor"; //$NON-NLS-1$
+	private Button btnParameters;
+
+	public TestEditor() {
+	}
+
+	/**
+	 * Create contents of the editor part.
+	 * @param parent
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		parent.setLayout(null);
+		
+		btnParameters = new Button(parent, SWT.NONE);
+		btnParameters.setBounds(0, 0, 22, 22);
+		//btnParameters.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
+		btnParameters.setImage(SWTResourceManager.getImage(TestEditor.class, "/org/eclipse/jface/dialogs/images/popup_menu.gif")); //$NON-NLS-1$
+		
+		Composite composite = new Composite(parent, SWT.BORDER);
+		Rectangle rect = parent.getBounds();
+		composite.setBounds(0,0,rect.width,rect.height);
+	}
+
+	@Override
+	public void setFocus() {
+		// Set the focus
+	}
+
+	@Override
+	public void doSave(IProgressMonitor monitor) {
+		// Do the Save operation
+	}
+
+	@Override
+	public void doSaveAs() {
+		// Do the Save As operation
+	}
+
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		setSite(site);
+		setInput(input);
+	}
+
+	@Override
+	public boolean isDirty() {
+		return false;
+	}
+
+	@Override
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TestEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableSorter.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableSorter.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableSorter.java	(revision 324)
@@ -0,0 +1,140 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors;
+
+import java.text.Collator;
+import java.util.Locale;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * copied from
+ * http://www.vogella.de/articles/EclipseJFaceTable/article.html#sortcolumns
+ * 
+ * @author sloiseau
+ * 
+ */
+public class TableSorter extends ViewerSorter {
+	
+	/** The locale. */
+	private Locale locale = new Locale("en", "US"); //$NON-NLS-1$ //$NON-NLS-2$
+
+	/** The property index. */
+	private int propertyIndex;
+	
+	/** The Constant DESCENDING. */
+	private static final int DESCENDING = 1;
+
+	/** The direction. */
+	private int direction = DESCENDING;
+	
+	/** The column types. */
+	private String[] columnTypes;
+	
+	/** The collator. */
+	private Collator collator;
+
+	/**
+	 * Instantiates a new table sorter.
+	 */
+	public TableSorter() {
+		this.propertyIndex = 0;
+		direction = DESCENDING;
+		this.collator = Collator.getInstance(locale);
+		this.collator.setStrength(Collator.TERTIARY);
+	}
+
+	/**
+	 * Sets the column types.
+	 *
+	 * @param types the new column types
+	 */
+	public void setColumnTypes(String[] types) {
+		columnTypes = types;
+	}
+
+	/**
+	 * Sets the column.
+	 *
+	 * @param column the new column
+	 */
+	public void setColumn(int column) {
+		if (column == this.propertyIndex) {
+			// Same column as last sort; toggle the direction
+			direction = 1 - direction;
+		} else {
+			// New column; do an ascending sort
+			this.propertyIndex = column;
+			direction = DESCENDING;
+		}
+		if (columnTypes != null && column >= columnTypes.length) {
+			throw new IllegalArgumentException(Messages.TableSorter_0);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
+	@Override
+	public int compare(Viewer viewer, Object e1, Object e2) {
+		int rc = 0;
+		if (propertyIndex == -1) {
+			return rc;
+		}
+
+		java.util.ArrayList<Object> a1 = (java.util.ArrayList<Object>) e1;
+		java.util.ArrayList<Object> a2 = (java.util.ArrayList<Object>) e2;
+
+		Object o1 = a1.get(this.propertyIndex);
+		Object o2 = a2.get(this.propertyIndex);
+
+		if (o1 instanceof String && o2 instanceof String) {
+			rc = collator.compare(o1, o2);
+		} else if (o1 instanceof Comparable){
+			rc = ((Comparable) o1).compareTo(o2);
+		}
+		if (direction == DESCENDING) {
+			rc = -rc;
+		}
+		return rc;
+	}
+
+	/**
+	 * Sets the locale.
+	 *
+	 * @param locale the new locale
+	 */
+	public void setLocale(Locale locale) {
+		this.locale = locale;
+		this.collator = Collator.getInstance(locale);
+		this.collator.setStrength(Collator.TERTIARY);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableSorter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TxtEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TxtEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TxtEditor.java	(revision 324)
@@ -0,0 +1,180 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors;
+
+import java.io.File;
+
+import org.eclipse.jface.text.TextViewer;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.contexts.IContextActivation;
+import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.editors.text.IEncodingSupport;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.utils.CharsetDetector;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TxtEditor.
+ *
+ * @ author mdecorde
+ */
+public class TxtEditor extends TextEditor implements CustomizableEditor{
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.editors.TxtEditor"; //$NON-NLS-1$
+
+	/** The source. */
+	private Object source;
+
+	/**
+	 * Instantiates a new txt editor.
+	 */
+	public TxtEditor() {
+		super();
+	}
+
+	/**
+	 * Inits the.
+	 *
+	 * @param site the site
+	 * @param input the input
+	 * @throws PartInitException the part init exception
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite,
+	 * org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		super.init(site, input);
+
+		setInput(input);
+		
+//		IContextService contextService = (IContextService)PlatformUI.getWorkbench()
+//				.getService(IContextService.class);
+//		IContextActivation activation = contextService.activateContext("org.eclipse.ui.textEditorScope");
+	}
+
+	@Override
+	public void createPartControl(final Composite parent) {
+		super.createPartControl(parent);
+		//guessEditedFileEncoding();
+	}
+
+	/**
+	 * Gets the edited file.
+	 *
+	 * @return the edited file
+	 */
+	public File getEditedFile() {
+		FileStoreEditorInput input = (FileStoreEditorInput) this.getEditorInput();
+		return new File(input.getURI().getPath());
+	}
+
+	public void guessEditedFileEncoding() {
+		File f = getEditedFile();
+		if (f != null && f.length() > CharsetDetector.MINIMALSIZE) {
+			IEncodingSupport encodingSupport = (IEncodingSupport) this.getAdapter(IEncodingSupport.class);
+			String encoding = new CharsetDetector(f).getEncoding();
+			if (encoding != null && encodingSupport != null) {
+				try {
+					encodingSupport.setEncoding(encoding);
+					System.out.println(Messages.TxtEditor_0+f+Messages.TxtEditor_1+encoding);
+				} catch(Throwable e) { }
+
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 */
+	@Override
+	public void setName(String name) {
+		this.setPartName(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 */
+	@Override
+	public void setIcon(Image image) {
+		this.setTitleImage(image);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 */
+	@Override
+	public void setSource(Object source)
+	{
+		this.source = source;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
+	 */
+	@Override
+	public Object getSource() {
+		StyledText fTextWidget = this.getSourceViewer().getTextWidget();
+		return source;
+	}
+
+	/* (non-Javadoc)
+	 */
+	public TextViewer getTextViewer() {
+		return ((TextViewer) this.getSourceViewer());
+	}
+	
+	@Override
+	public Object toConcordance() { return null;}
+	@Override
+	public Object toIndex() { return null;}
+	@Override
+	public Object toProgression() { return null;}
+	
+	@Override
+	public boolean usingCorpus(Corpus corpus) {
+		return false;
+	}
+
+	@Override
+	public boolean updateCorpus(Corpus corpus) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TxtEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/GenericMultiPageEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/GenericMultiPageEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/GenericMultiPageEditor.java	(revision 324)
@@ -0,0 +1,172 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.input.IProvidingMultiPageEditorInput;
+// TODO: Auto-generated Javadoc
+/**
+ * A GenericMultiPageEditor is a MultiPageEditor whose content and behavior is
+ * determined on the fly by an EditorInput implementing the {@link IProvidingMultiPageEditorInput} interface.
+ * @author Sylvain Loiseau
+ */
+//FIXME: the editors should not be retrieve from the editor input that should not itself store or create some UI components
+@Deprecated
+public class GenericMultiPageEditor extends MultiPageEditorPart {
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.editors.GenericMultiPageEditor"; //$NON-NLS-1$
+
+	/** The last editor used. */
+	protected static int LAST_EDITOR_USED = 0;
+	
+	/** The editors. */
+	protected List<EditorPart> editors;
+	
+	/** The inputs. */
+	protected List<IEditorInput> inputs;
+	
+	/** The names. */
+	protected List<String> names;
+
+	/**
+	 * Instantiates a new generic multi page editor.
+	 */
+	public GenericMultiPageEditor() {
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.MultiPageEditorPart#createPages()
+	 */
+	@Override
+	protected void createPages() {
+
+		IEditorInput input = getEditorInput();
+		if (!(input instanceof IProvidingMultiPageEditorInput)) {
+			throw new IllegalArgumentException(NLS.bind(
+					Messages.GenericMultiPageEditor_1, input.getName()));
+		}
+
+		editors = ((IProvidingMultiPageEditorInput) input).getEditors();
+		inputs = ((IProvidingMultiPageEditorInput) input).getEditorInputs();
+		names = ((IProvidingMultiPageEditorInput) input).getNames();
+
+		if (editors.size() != inputs.size()) {
+			throw new IllegalArgumentException(NLS.bind(
+					Messages.GenericMultiPageEditor_3, editors.size(), inputs.size()));
+		}
+
+		for (int i = 0; i < editors.size(); i++) {
+
+			int editorIndex = 0;
+			try {
+				
+				editorIndex = addPage(editors.get(i), inputs.get(i));
+			} catch (PartInitException e) {
+				// TODO Auto-generated catch block
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+			}
+			setPageText(editorIndex, names.get(i));
+		}
+		setPartName(getEditorInput().getName());
+
+		setActivePage(LAST_EDITOR_USED);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor monitor) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.MultiPageEditorPart#pageChange(int)
+	 */
+	@Override
+	public void pageChange(int index) {
+		super.pageChange(index);
+		LAST_EDITOR_USED = index;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.MultiPageEditorPart#dispose()
+	 */
+	@Override
+	public void dispose() {
+		for (int i = 0; i < editors.size(); i++) {
+			editors.get(i).dispose();
+		}
+		super.dispose();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.MultiPageEditorPart#getAdapter(java.lang.Class)
+	 */
+	@Override
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
+	public Object getAdapter(Class type) {
+		return null;
+	}
+
+	/**
+	 * @return the editors
+	 */
+	public List<EditorPart> getEditors() {
+		return editors;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/GenericMultiPageEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/internal/InternalViewEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/internal/InternalViewEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/internal/InternalViewEditor.java	(revision 324)
@@ -0,0 +1,773 @@
+package org.txm.rcp.editors.internal;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.Toolbox;
+import org.txm.functions.concordances.Line;
+import org.txm.functions.internal.InternalView;
+import org.txm.index.rcp.editors.IndexEditor;
+import org.txm.index.rcp.editors.IndexEditorInput;
+import org.txm.progression.rcp.dialogs.ProgressionDialog;
+import org.txm.progression.rcp.handlers.ComputeProgression;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.rcp.editors.input.InternalViewEditorInput;
+import org.txm.rcp.swt.widget.NavigationWidget;
+import org.txm.rcp.swt.widget.PropertiesSelector;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.searchengine.cqp.corpus.query.Match;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.utils.logger.Log;
+
+public class InternalViewEditor extends EditorPart implements CustomizableEditor {
+
+	public static final String ID = "org.txm.rcp.editors.internal.InternalViewEditor"; //$NON-NLS-1$
+	Corpus corpus;
+	//StructuralUnit struct;
+	//ArrayList<String> properties;
+	InternalView internalView;
+
+	Combo structCombo;
+	List<StructuralUnit> availableStructs;
+	PropertiesSelector propSelector;
+	PropertiesSelector structSelector;
+	List<Property> availables;
+	List<Property> selected;
+	TableViewer viewer;
+	Table table;
+	NavigationWidget navigation;
+	HashMap<Property, List<String>> line;
+
+	Label structInfos;
+	private Composite formPanel;
+	private Composite navigationPanel;
+	private Composite resultPanel;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor arg0) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		setSite(site);
+		setInput(input);
+
+		InternalViewEditorInput vinput = (InternalViewEditorInput) input;
+		this.corpus = vinput.getCorpus();
+		this.internalView = vinput.getInternalView();
+		if (this.corpus == null) 
+			this.corpus = this.internalView.getCorpus();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isDirty()
+	 */
+	@Override
+	public boolean isDirty() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean compute() {
+		final StructuralUnit s = this.availableStructs.get(this.structCombo.getSelectionIndex());
+		final  List<Property> p = propSelector.getProperties();
+		final List<Property> sup = structSelector.getProperties();
+
+		JobHandler jobhandler = new JobHandler(Messages.InternalViewEditor_1) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				JobsTimer.start();
+				monitor.beginTask(Messages.InternalViewEditor_2, 100);
+				try {
+					// remove previous InternalView
+					//InternalView previous = internalView;
+					internalView = new InternalView(corpus,p , s, sup);
+					if (internalView != null) { // TEMP
+//						int idx = corpus.getResults().indexOf(previous);
+//						if (idx >= 0) {
+//							corpus.storeResult(idx, internalView);
+//							corpus.removeResult(idx+1);
+//						} else {
+//							corpus.storeResult(internalView);
+//						}
+						line = internalView.getFirst();
+						monitor.beginTask(Messages.InternalViewEditor_3, 100);
+						this.syncExec(new Runnable() {
+							@Override
+							public void run() {
+								try {
+									fillDisplayArea();
+									CorporaView.refresh();
+								} catch (CqiClientException e) {
+									// TODO Auto-generated catch block
+									org.txm.rcp.utils.Logger.printStackTrace(e);
+								}
+							}
+						});
+					}
+				} catch (ThreadDeath td) {
+					return Status.CANCEL_STATUS;
+				} catch(Exception e) {
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				} finally {
+					monitor.done();
+					JobsTimer.stopAndPrint();
+				}
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.schedule();
+		return true;
+	}
+
+	public void fillDisplayArea() throws CqiClientException
+	{
+		initColumns();
+		viewer.setInput(line);
+		viewer.refresh();
+
+		navigation.setInfoLineText(""+(internalView.getCurrentSegmentNo()+1), internalView.getLocationTail()); //$NON-NLS-1$
+		structInfos.setText(internalView.getStructInfos());
+
+		int current = internalView.getCurrentSegmentNo();
+		int total = internalView.getNSegment();
+		navigation.setFirstEnabled(current > 0);
+		navigation.setPreviousEnabled(current > 0);
+		navigation.setNextEnabled(total > 1 && current < total);
+		navigation.setLastEnabled(total > 1 && current < total);
+
+		navigationPanel.layout();
+		this.setPartName(internalView.getDetails());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		this.setIcon(IImageKeys.getImage(IImageKeys.ACTION_INTERNALVIEW));
+		parent.setLayout(new GridLayout(1,true));
+
+		formPanel = new Composite(parent, SWT.NONE);
+		formPanel.setLayout(new GridLayout(5,false));
+		formPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+		navigationPanel = new Composite(parent, SWT.NONE);
+		navigationPanel.setLayout(new GridLayout(4,false));
+		navigationPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+		resultPanel = new Composite(parent, SWT.NONE);
+		resultPanel.setLayout(new GridLayout(1,true));
+		resultPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+
+		Label structComboLabel = new Label(formPanel, SWT.NONE);
+		structComboLabel.setText(Messages.InternalViewEditor_4);
+		structComboLabel.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, true));
+		structCombo = new Combo(formPanel, SWT.NONE);
+		structCombo.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, true));
+		propSelector = new PropertiesSelector(formPanel, SWT.NONE);
+		propSelector.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, true));
+		propSelector.setLayout(new GridLayout(3, false));
+		propSelector.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				internalView.setProperties(propSelector.getProperties());
+				try {
+					line = internalView.getSegment(internalView.getCurrentSegmentNo());
+					fillDisplayArea();
+				} catch (CqiClientException e1) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {}
+		});
+
+		structSelector = new PropertiesSelector(formPanel, SWT.NONE);
+		structSelector.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, true));
+		structSelector.setLayout(new GridLayout(3, false));
+		structSelector.setText(Messages.InternalViewEditor_5);
+		structSelector.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				internalView.setStructProperties(structSelector.getProperties());
+				try {
+					line = internalView.getSegment(internalView.getCurrentSegmentNo());
+					fillDisplayArea();
+				} catch (CqiClientException e1) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {}
+		});
+
+		try { // init combos
+			availables = new ArrayList<Property>(corpus.getOrderedProperties());
+			selected = new ArrayList<Property>();
+			availableStructs = corpus.getStructuralUnits();
+
+			if (internalView != null) {
+				selected = internalView.getProperties();
+				availables.removeAll(selected);
+				propSelector.setProperties(availables, selected);
+			} else {
+				availables.remove(corpus.getProperty("word")); //$NON-NLS-1$
+				selected.add(corpus.getProperty("word")); //$NON-NLS-1$
+				propSelector.setCorpus(corpus);
+			}
+
+			for(StructuralUnit struct : availableStructs)
+				structCombo.add(struct.toString());
+			if (availableStructs.size() > 0) {
+				int hasS = -1;
+				int hasP = -1;
+				for (int i = 0 ; i < availableStructs.size() ; i++) {
+					if (availableStructs.get(i).getName().equals("s")) hasS = i; //$NON-NLS-1$
+					else if (availableStructs.get(i).getName().equals("p")) hasP = i; //$NON-NLS-1$
+				}
+				
+				if (hasS > 0) { 
+					structCombo.select(hasS);
+				} else if (hasP > 0) {
+					structCombo.select(hasP);
+				} else {
+					structCombo.select(0);
+				}	
+
+				structCombo.addSelectionListener(new SelectionListener() {
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						reloadStructuralUnitProperties();
+					}
+
+					@Override
+					public void widgetDefaultSelected(SelectionEvent e) { }
+				});
+				reloadStructuralUnitProperties();
+			}
+		} catch (CqiClientException e) {
+			System.out.println(Messages.InternalViewEditor_10);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		Button ok = new Button(formPanel, SWT.PUSH);
+		ok.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, false));
+		ok.setText(Messages.Explorer_6);
+		ok.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				compute();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				// TODO Auto-generated method stub
+			}
+		});
+
+		navigation = new NavigationWidget(navigationPanel, SWT.NONE);
+		navigation.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, true));
+		navigation.addGoToKeyListener(new KeyListener() {
+			@Override
+			public void keyReleased(KeyEvent e) { }
+			
+			@Override
+			public void keyPressed(KeyEvent e) {
+				// TODO Auto-generated method stub
+				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
+					int next = navigation.getCurrent();
+					if (next >= 0 && next < internalView.getNSegment())
+						try {
+							goToSegment(next);
+						} catch (CqiClientException e1) {
+							// TODO Auto-generated catch block
+							org.txm.rcp.utils.Logger.printStackTrace(e1);
+						}
+				}
+			}
+		});
+		navigation.addFirstListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (internalView != null) {
+					try {
+						line = internalView.getFirst();
+						fillDisplayArea(); // one segment at time
+
+						navigation.setFirstEnabled(false);
+						navigation.setPreviousEnabled(false);
+						navigation.setNextEnabled(true);
+						navigation.setLastEnabled(true);
+					} catch (CqiClientException e1) {
+						// TODO Auto-generated catch block
+						org.txm.rcp.utils.Logger.printStackTrace(e1);
+					}
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		navigation.addPreviousListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (internalView != null) {
+					try {
+						line = internalView.getPrevious();
+						fillDisplayArea(); // one segment at time
+
+						navigation.setFirstEnabled(true);
+						navigation.setPreviousEnabled(!internalView.isFirst());
+						navigation.setNextEnabled(true);
+						navigation.setLastEnabled(true);
+					} catch (CqiClientException e1) {
+						// TODO Auto-generated catch block
+						org.txm.rcp.utils.Logger.printStackTrace(e1);
+					}
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		navigation.addNextListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (internalView != null) {
+					try {
+						line = internalView.getNext();
+						fillDisplayArea(); // one segment at time
+
+						navigation.setFirstEnabled(true);
+						navigation.setPreviousEnabled(true);
+						navigation.setNextEnabled(!internalView.isLast());
+						navigation.setLastEnabled(true);
+					} catch (CqiClientException e1) {
+						// TODO Auto-generated catch block
+						org.txm.rcp.utils.Logger.printStackTrace(e1);
+					}
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		navigation.addLastListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (internalView != null) {
+					try {
+						line = internalView.getLast();
+						fillDisplayArea(); // one segment at time
+
+						navigation.setFirstEnabled(true);
+						navigation.setPreviousEnabled(true);
+						navigation.setNextEnabled(false);
+						navigation.setLastEnabled(false);
+					} catch (CqiClientException e1) {
+						// TODO Auto-generated catch block
+						org.txm.rcp.utils.Logger.printStackTrace(e1);
+					}
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+
+		structInfos = new Label(navigationPanel, SWT.NONE);
+		structInfos.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, true));
+		structInfos.setText(""); //$NON-NLS-1$
+
+		//		Button style = new Button(navigationPanel, SWT.RADIO);
+		//		style.setText("table");
+
+		viewer = new TableViewer(resultPanel);
+		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
+		viewer.getTable().setLinesVisible(true);
+		viewer.getTable().setHeaderVisible(true);
+		table = viewer.getTable();
+		table.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+		viewer.setContentProvider(new IStructuredContentProvider() {
+
+			@Override
+			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }
+
+			@Override
+			public void dispose() { }
+
+			@Override
+			public Object[] getElements(Object inputElement) {
+				int nlines = internalView.getSegmentLength();
+				List<Property> props = internalView.getProperties();
+
+				ArrayList<Object[]> lines = new ArrayList<Object[]>();
+				for (int i = 0 ; i < nlines ; i++) {
+					lines.add(new String[props.size()]);
+				}
+				if (inputElement instanceof HashMap<?,?>) {
+					HashMap<Property, List<String>> l = (HashMap<Property, List<String>>) inputElement;
+					for(int i = 0 ; i < props.size() ; i++) {
+						Property prop = props.get(i);
+						List<String> data = l.get(prop);
+						for (int j = 0 ; j < nlines ; j++) {
+							lines.get(j)[i] = data.get(j);
+						}
+					}
+				}
+				return lines.toArray();
+			}
+		});
+		initColumns();
+		firstDisplay();
+		createContextMenu();
+	}
+
+	protected boolean goToSegment(int next) throws CqiClientException {
+		line = internalView.getSegment(next);
+		fillDisplayArea(); // one segment at time
+
+		if (next == 0) {
+			navigation.setFirstEnabled(false);
+			navigation.setPreviousEnabled(false);
+		} else {
+			navigation.setFirstEnabled(true);
+			navigation.setFirstEnabled(true);
+		}
+		
+		if (next == internalView.getNSegment() -1) {
+			navigation.setNextEnabled(false);
+			navigation.setLastEnabled(false);
+		} else { 
+			navigation.setNextEnabled(true);
+			navigation.setLastEnabled(true);
+		}
+		return true;
+	}
+
+	private boolean firstDisplay() {
+		if (internalView != null) {
+			try {
+				line = internalView.getFirst();
+				fillDisplayArea();
+				return true;
+			} catch (CqiClientException e1) {
+				// TODO Auto-generated catch block
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
+			}
+		} else {
+			compute();
+		}
+		return false;
+	}
+
+	private void reloadStructuralUnitProperties() {
+		StructuralUnit struct = availableStructs.get(structCombo.getSelectionIndex());
+		ArrayList<Property> availables = new ArrayList<Property>(struct.getOrderedProperties());
+		for (int i = 0 ; i < availables.size() ; i++) {
+			String name = availables.get(i).getName();
+			if (name.equals("base") || name.equals("project")) //$NON-NLS-1$ //$NON-NLS-2$
+				availables.remove(i--);
+		}
+		ArrayList<Property> selected = new ArrayList<Property>();
+		if (availables.size() > 0) {
+			selected.add(availables.remove(0));
+		}
+		structSelector.setProperties(availables, selected);
+	}
+
+	HashMap<Property, TableViewerColumn> columns = new HashMap<Property, TableViewerColumn>();
+	HashMap<TableViewerColumn, Integer> columnsOrder = new HashMap<TableViewerColumn, Integer>();
+	private void initColumns() {
+
+		for( TableViewerColumn col : columns.values()) {
+			col.getColumn().dispose();
+		}
+		columnsOrder = new HashMap<TableViewerColumn, Integer>();
+		columns = new HashMap<Property, TableViewerColumn>();
+
+		if (internalView == null) {
+			//System.out.println("REMOVE NON USED COLUMNS");
+		} else {
+			int c = 0;
+
+			for (final Property prop : internalView.getProperties()) {
+				if (!columns.containsKey(prop)) {
+					final TableViewerColumn col = new TableViewerColumn(viewer, SWT.NONE);
+					col.getColumn().setWidth(100);
+					col.getColumn().setText(prop.toString());
+					col.setLabelProvider(new ColumnLabelProvider() {
+						@Override
+						public String getText(Object element) {
+							if (element instanceof Object[]) {
+								Integer idx = columnsOrder.get(col);
+								return ""+((Object[])element)[idx]; //$NON-NLS-1$
+							}
+							return Messages.InternalViewEditor_16;
+						}
+					});
+					columns.put(prop, col);
+
+				}
+				TableViewerColumn col = columns.get(prop);
+				columnsOrder.put(col, c++);
+			}
+		}
+	}
+
+	/**
+	 * Creates the context menu.
+	 *
+	 * @param tableViewer the table viewer
+	 */
+	private void createContextMenu() {
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(viewer.getTable());
+
+		// Set the MenuManager
+		viewer.getTable().setMenu(menu);
+		getSite().registerContextMenu(menuManager, viewer);
+		// Make the selection available
+		getSite().setSelectionProvider(viewer);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 */
+	@Override
+	public void setName(String name) {
+		this.setPartName(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 */
+	@Override
+	public void setIcon(Image image) {
+		this.setTitleImage(image);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 */
+	@Override
+	public void setSource(Object source)
+	{
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
+	 */
+	@Override
+	public Object getSource() {
+		return internalView;
+	}
+
+	public String buildQuery() {
+		TableColumn[] cols = viewer.getTable().getColumns();
+		TableItem[] items = viewer.getTable().getItems();
+		int[] indexes = viewer.getTable().getSelectionIndices();
+		if (indexes.length == 0 ) return ""; //$NON-NLS-1$
+
+		StringBuffer query = new StringBuffer("["); //$NON-NLS-1$
+		for (int icol = 0 ; icol < cols.length ; icol++) {
+			TableColumn col = cols[icol];
+			if (icol > 0)
+				query.append(" & " +col.getText()+"=\""); //$NON-NLS-1$ //$NON-NLS-2$
+			else
+				query.append(col.getText()+"=\""); //$NON-NLS-1$
+			HashSet<String> values = new HashSet<String>();
+			for (int i = 0 ; i < indexes.length ; i++) {
+				int idx = indexes[i];
+				values.add(Query.addBackSlash(items[idx].getText(icol)));
+			}
+			boolean firstValue = true;
+			for (String value : values) {
+				if (firstValue) {
+					query.append(value);
+					firstValue = false;
+				} else {
+					query.append("|"+value); //$NON-NLS-1$
+				}
+			}
+			query.append("\""); //$NON-NLS-1$
+		}
+		query.append("]"); //$NON-NLS-1$
+		System.out.println(Messages.InternalViewEditor_25+query);
+		return query.toString();
+	}
+
+	@Override
+	public Object toConcordance(){
+		String query = buildQuery();
+		if (query == null) return null;
+
+		ConcordancesEditorInput editorInput = new ConcordancesEditorInput(corpus, null);
+		IWorkbenchPage page = this.getSite().getPage();
+		try {
+			ConcordancesEditor conceditor = (ConcordancesEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
+			conceditor.setQuery(query);
+			conceditor.compute();
+			return conceditor;
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+		return null;
+	}
+
+	@Override
+	public Object toIndex() {
+		String query = buildQuery();
+		if (query == null) return null;
+
+		IndexEditorInput editorInput = new IndexEditorInput(corpus);
+		IWorkbenchPage page = this.getSite().getPage();
+		try {
+			IndexEditor voceditor = (IndexEditor) page
+					.openEditor(editorInput,
+							"org.txm.rcp.editors.index.IndexEditor"); //$NON-NLS-1$
+			voceditor.setFocus(query);
+			voceditor.compute();
+			return voceditor;
+		} catch (PartInitException e) {
+			System.err.println(NLS.bind(Messages.GetConcordances_4, e));
+		}
+		return null;
+	}
+
+	@Override
+	public Object toProgression() {
+//		String query = buildQuery();
+//		List<Query> queries = Arrays.asList(new Query(query));
+//		if (query == null) return null;
+//
+//		final ProgressionDialog d = new ProgressionDialog(this.formPanel.getShell(), corpus,
+//				queries);
+//		int code = d.open();
+//		if (code == Window.OK) {
+//			return ComputeProgression.computeProgression(d);
+//		}
+		return null;
+	}
+
+	public boolean backToText(Line line) {
+		Match m = line.getMatch();
+		internalView.getCurrentSegmentNo();
+		int[] cpos= {m.getStart()};
+		int[] n;
+		try {
+			StructuralUnitProperty sup = null;
+			for (StructuralUnitProperty s : internalView.getStructuralUnit().getProperties()) {
+				sup = s;
+				break;
+			}
+			n = Toolbox.getCqiClient().cpos2Struc(sup.getQualifiedName(), cpos);
+			return goToSegment(n[0]);
+		} catch (Exception e) {
+			System.out.println("Error while internal view go back to "+line);
+			Log.printStackTrace(e);
+		} 
+		return false;
+	}
+	
+	@Override
+	public boolean usingCorpus(Corpus corpus) {
+		return this.corpus.getName().equals(corpus.getName());
+	}
+
+	@Override
+	public boolean updateCorpus(Corpus corpus) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/internal/InternalViewEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableEditor.java	(revision 324)
@@ -0,0 +1,229 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.lexicaltable.rcp.editors.LexicalTableEditorInput;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.input.FrequencyListEditorInput;
+// TODO: Auto-generated Javadoc
+/**
+ * Generic editor of tableable objects.
+ *
+ * @author sloiseau
+ */
+public class TableEditor extends EditorPart {
+
+	/** The ID. */
+	static public String ID = "org.txm.rcp.editors.TableEditor"; //$NON-NLS-1$
+	
+	/** The viewer. */
+	private TableViewer viewer;
+	
+	/** The i editor input. */
+	private IEditorInput iEditorInput;
+
+	/** The table sorter. */
+	private TableSorter tableSorter;
+
+	/**
+	 * Linking with the OutlineView.
+	 *
+	 * @param monitor the monitor
+	 */
+	// private OverviewOutlinePage overviewOutlinePage;
+
+	@Override
+	public void doSave(IProgressMonitor monitor) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		setSite(site);
+		setInput(input);
+		this.iEditorInput = input;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isDirty()
+	 */
+	@Override
+	public boolean isDirty() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		parent.setLayout(new FillLayout());
+
+		viewer = new TableViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL
+				| SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL);
+		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
+		Table table = viewer.getTable();
+		table.setHeaderVisible(true);
+		table.setLinesVisible(true);
+
+		if (!(iEditorInput instanceof Tablable)) {
+			throw new IllegalArgumentException(Messages.TableEditor_0);
+		}
+
+		Tablable tableInput = (Tablable) iEditorInput;
+
+		String[] titles = tableInput.getColumnTitles();
+
+		for (int i = 0; i < titles.length; i++) {
+			final int index = i;
+			final TableViewerColumn column = new TableViewerColumn(viewer,
+					SWT.NONE);
+
+			column.getColumn().setText(titles[i]);
+			column.getColumn().setWidth(100);
+			column.getColumn().setResizable(true);
+			column.getColumn().setMoveable(true);
+
+			column.getColumn().addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					tableSorter.setColumn(index);
+					int dir = viewer.getTable().getSortDirection();
+					if (viewer.getTable().getSortColumn() == column.getColumn()) {
+						dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;
+					} else {
+						dir = SWT.DOWN;
+					}
+					viewer.getTable().setSortDirection(dir);
+					viewer.getTable().setSortColumn(column.getColumn());
+					viewer.refresh();
+				}
+			});
+		}
+
+		viewer.setContentProvider(tableInput.getContentProvider());
+		viewer.setLabelProvider(tableInput.getLabelProvider());
+		viewer.setInput(tableInput.getInput());
+
+		tableSorter = new TableSorter();
+		tableSorter.setColumnTypes(tableInput.getColumnTypes());
+		if (this.iEditorInput instanceof FrequencyListEditorInput) {
+			FrequencyListEditorInput ed = (FrequencyListEditorInput) this.iEditorInput;
+			tableSorter.setLocale(ed.getLexicon().getCorpus().getLocale());
+		}
+		else if (this.iEditorInput instanceof LexicalTableEditorInput) {
+			LexicalTableEditorInput ed = (LexicalTableEditorInput) this.iEditorInput;
+			tableSorter.setLocale(ed.getLexicalTable().getPartition().getCorpus().getLocale());
+		}
+		viewer.setSorter(tableSorter);
+
+		createContextMenu(viewer);
+	}
+
+	/**
+	 * Creates the context menu.
+	 *
+	 * @param tableViewer the table viewer
+	 */
+	private void createContextMenu(TableViewer tableViewer) {
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tableViewer.getTable());
+
+		// Set the MenuManager
+		tableViewer.getTable().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tableViewer);
+		// Make the selection available
+		getSite().setSelectionProvider(tableViewer);
+	}
+
+	/**
+	 * Gets the table sorter.
+	 *
+	 * @return the table sorter
+	 */
+	public TableSorter getTableSorter() {
+		return tableSorter;
+	}
+
+	/**
+	 * Gets the table viewer.
+	 *
+	 * @return the table viewer
+	 */
+	public TableViewer getTableViewer() {
+		return viewer;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		viewer.getControl().setFocus();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/ReferencerEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/ReferencerEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/ReferencerEditor.java	(revision 324)
@@ -0,0 +1,756 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.referencer;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.functions.referencer.Referencer;
+import org.txm.functions.referencer.Referencer.Line;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.commands.link.ReferencerToConc;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.editors.input.ReferencerEditorInput;
+import org.txm.rcp.preferences.ReferencerPreferencePage;
+import org.txm.rcp.swt.widget.NavigationWidget;
+import org.txm.rcp.swt.widget.PropertiesSelector;
+import org.txm.rcp.swt.widget.QueryWidget;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.statsengine.r.rcp.views.RVariablesView;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ReferencerEditor.
+ */
+public class ReferencerEditor extends EditorPart implements CustomizableEditor{
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.editors.referencer.ReferencerEditor"; //$NON-NLS-1$
+	
+	/** The corpus. */
+	Corpus corpus;
+	
+	/** The referencer. */
+	Referencer referencer;
+
+	/** The querywidget. */
+	QueryWidget querywidget;
+	
+	/** The props area. */
+	protected PropertiesSelector propsArea;
+	
+	/** The pattern area. */
+	protected PropertiesSelector patternArea;
+	
+	/** The navigation area. */
+	NavigationWidget navigationArea;
+
+	/** The line table viewer. */
+	protected TableViewer viewer;
+	
+	/** The n column. */
+	protected TableColumn nColumn;
+	
+	/** The unit column. */
+	protected TableColumn unitColumn;
+	
+	/** The freq column. */
+	protected TableColumn freqColumn;
+	
+	/** The separator column. */
+	protected TableColumn separatorColumn;
+
+	/** The lineperpage. */
+	int lineperpage = 100;
+	
+	/** The top line. */
+	int topLine=0;
+	
+	/** The bottom line. */
+	int bottomLine;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor arg0) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+	throws PartInitException {
+		setSite(site);
+		setInput(input);
+
+		this.corpus = ((ReferencerEditorInput) input).getCorpus();
+		this.referencer = ((ReferencerEditorInput) input).getReferencer();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isDirty()
+	 */
+	@Override
+	public boolean isDirty() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+	
+	/** The mess. */
+	String mess;
+	
+	/** The source. */
+	private Object source;
+	
+	/**
+	 * Compute.
+	 *
+	 * @return true, if successful
+	 */
+	public boolean compute()
+	{
+		mess = NLS.bind(Messages.ReferencerEditor_0, 
+			new Object[]{querywidget.getQuery(), corpus, propsArea.getProperties().get(0), 
+				patternArea.getProperties()})+ "\n"; //$NON-NLS-1$
+		
+		final Query query = querywidget.getQuery();
+		final List<Property> queryprops = propsArea.getProperties();
+		final List<Property> refs = patternArea.getProperties();
+		
+		System.out.println(NLS.bind(Messages.ReferencerEditor_5, query));
+		JobHandler jobhandler = new JobHandler(mess) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					JobsTimer.start();
+					monitor.beginTask(mess, 100);
+					boolean docompute = false;
+					if (referencer != null) {
+						if (referencer.getQuery().equals(query)) 
+						{	
+							boolean clean = false;
+							if (!referencer.getProperty().toString().equals(queryprops.get(0).toString()))
+							{
+								referencer.setProperty(propsArea.getProperties().get(0));
+								clean = true;
+							}
+
+							if (!referencer.getPattern().toString().equals(refs.toString()))
+							{
+								ArrayList<Property> pattern = new ArrayList<Property>(refs);
+								referencer.setPattern(pattern);
+								clean = true;
+							}
+
+							if (clean)
+							{
+								referencer.clearAllLines();
+								docompute = true;
+							}
+							
+						}
+						else
+							docompute = true;
+					}
+					else
+						docompute = true;
+
+					if (docompute) {
+						Property p = queryprops.get(0);
+						ArrayList<Property> pattern = new ArrayList<Property>(refs);
+						boolean hierarchicSort = TxmPreferences.getBoolean(ReferencerPreferencePage.SORTBYFREQ);
+						referencer = new Referencer(corpus, query, p, pattern, hierarchicSort);
+						this.acquireSemaphore();
+						corpus.addResult(referencer);
+						this.releaseSemaphore();
+					}
+
+					try  {
+						if (query.getQueryString().equals("")) //$NON-NLS-1$
+							return Status.CANCEL_STATUS;
+
+						monitor.subTask(Messages.ReferencerEditor_8);
+						if (!referencer.getQueryMatches())
+						{
+							System.out.println(Messages.ReferencerEditor_7);
+							return Status.CANCEL_STATUS;
+						}
+						
+						if (monitor.isCanceled())
+							return Status.CANCEL_STATUS;
+						
+						monitor.subTask(Messages.ReferencerEditor_10);
+						if (!referencer.getQueryindexes())
+							return Status.CANCEL_STATUS;
+						
+						if (monitor.isCanceled())
+							return Status.CANCEL_STATUS;
+						
+						monitor.subTask(Messages.ReferencerEditor_12);
+						if (!referencer.groupPositionsbyId())
+							return Status.CANCEL_STATUS;
+						
+						if (monitor.isCanceled())
+							return Status.CANCEL_STATUS;
+						
+					} catch (Exception e) {
+						// TODO Auto-generated catch block
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					}
+					
+					if (monitor.isCanceled())
+						return Status.CANCEL_STATUS;
+					
+					monitor.worked(50);
+
+					monitor.subTask(Messages.ReferencerEditor_13);
+					syncExec(new Runnable() {
+						@Override
+						public void run() {
+							fillDisplayArea(0, lineperpage);
+							CorporaView.refresh();
+							CorporaView.expand(corpus);
+							QueriesView.refresh();
+							RVariablesView.refresh();
+							setPartName(corpus.getName()+":"+referencer.getName()); //$NON-NLS-1$
+							
+							viewer.getTable().setFocus();
+							System.out.println(NLS.bind(Messages.CreatePartition_5, referencer.getNLines(), referencer.getV()));
+						}
+					});
+
+					monitor.worked(100);
+				} catch (ThreadDeath td) {
+					return Status.CANCEL_STATUS;
+				} catch (Exception e) {
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				} finally {
+					monitor.done();
+					JobsTimer.stopAndPrint();
+				}
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob();
+
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite arg0) {
+		arg0.setLayout(new GridLayout(1,true));
+		Composite paramArea = new Composite(arg0, SWT.NONE);
+		paramArea.setLayout(new GridLayout(3, false));
+		paramArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+
+		Composite resultArea = new Composite(arg0, SWT.NONE);
+		resultArea.setLayout(new GridLayout(1, false));
+		resultArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, true));
+		// [Query
+		querywidget = new QueryWidget(paramArea, SWT.None);
+		querywidget.setLayoutData(new GridData(GridData.FILL, GridData.CENTER,
+				true, false));
+		querywidget.addKeyListener(new KeyListener() {
+			@Override
+			public void keyReleased(KeyEvent e) {}
+
+			@Override
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR)
+				{
+					compute();
+				}
+			}
+		});
+
+		// [Edit]
+		propsArea = new PropertiesSelector(paramArea, SWT.NONE);
+		propsArea.setMaxPropertyNumber(1);
+		propsArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				false, false));
+		propsArea.setLayout(new GridLayout(3, false));
+		ArrayList<Property> availables = new ArrayList<Property>();
+		try {
+			availables = new ArrayList<Property>(corpus.getOrderedProperties());
+		} catch (CqiClientException e1) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
+		}
+
+		ArrayList<Property> selectedProps = new ArrayList<Property>();
+		if (referencer != null) {
+			selectedProps.add(referencer.getProperty());
+			availables.remove(referencer.getProperty());
+			this.propsArea.setProperties(availables, selectedProps);
+		} else {
+			this.propsArea.setCorpus(corpus);
+		}
+
+		// [Search]
+		Button go = new Button(paramArea, SWT.PUSH);
+		go.setText(Messages.SEARCH);
+		go.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				false, false));
+		Font f = go.getFont();
+		FontData defaultFont = f.getFontData()[0];
+		defaultFont.setStyle(SWT.BOLD);
+		Font newf = new Font(go.getDisplay(), defaultFont);
+		go.setFont(newf);
+
+		go.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+		go.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				compute();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// [pattern : ... ]
+		patternArea = new PropertiesSelector(paramArea, SWT.NONE);
+		patternArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,3,1));
+		patternArea.setLayout(new GridLayout(3, false));
+		patternArea.setText(Messages.ReferencerEditor_6);
+		availables = new ArrayList<Property>();
+		try {
+			availables = new ArrayList<Property>(corpus.getStructuralUnitProperties());
+			Collections.sort(availables);
+		} catch (CqiClientException e1) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
+			return;
+		}
+
+		selectedProps = new ArrayList<Property>();
+		if (referencer != null) {
+			for(Property p : referencer.getPattern()) {
+				selectedProps.add(p);
+				availables.remove(p);
+			}
+		}
+		
+		if (selectedProps.size() == 0) { // no referencer result was selected
+			for (int i = 0 ; i < availables.size() ; i++) {
+				Property p = availables.get(i);
+				if (p.getQualifiedName().endsWith("text_id")) {
+					selectedProps.add(availables.get(i));
+					availables.remove(i);
+				}
+			}
+		}
+
+		this.patternArea.setProperties(availables, selectedProps);
+
+		//pagination
+		navigationArea = new NavigationWidget(paramArea, SWT.None);
+		navigationArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,	true, false,3 ,1));
+
+		navigationArea.addFirstListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(Messages.ReferencerEditor_17);
+				fillDisplayArea(0, lineperpage);
+				viewer.getTable().select(0);
+				viewer.getTable().showSelection();
+				StatusLine.setMessage(""); //$NON-NLS-1$
+			}
+		});
+		navigationArea.addLastListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(Messages.ReferencerEditor_19);
+				fillDisplayArea(referencer.getNLines()
+						- lineperpage, referencer.getNLines());
+				viewer.getTable().select(0);
+				viewer.getTable().showSelection();
+				StatusLine.setMessage(""); //$NON-NLS-1$
+			}
+		});
+		navigationArea.addNextListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(Messages.ReferencerEditor_21);
+				fillDisplayArea(topLine + lineperpage,
+						bottomLine + lineperpage);
+				viewer.getTable().select(0);
+				viewer.getTable().showSelection();
+				StatusLine.setMessage(""); //$NON-NLS-1$
+			}
+		});
+		navigationArea.addPreviousListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(Messages.ReferencerEditor_23);
+				fillDisplayArea(topLine - lineperpage,
+						bottomLine - lineperpage);
+				viewer.getTable().select(0);
+				viewer.getTable().showSelection();
+				StatusLine.setMessage(""); //$NON-NLS-1$
+			}
+		});
+		//result
+
+		viewer = new TableViewer(resultArea, SWT.MULTI
+				| SWT.FULL_SELECTION | SWT.BORDER);
+		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
+		if (corpus != null && corpus.getFont() != null && corpus.getFont().length() > 0) {
+			Font old = viewer.getTable().getFont();
+			FontData fD = old.getFontData()[0];
+			//Font f = new Font(old.getDevice(), corpus.getFont(), fD.getHeight(), fD.getStyle());
+			Font font = new Font(Display.getCurrent(), corpus.getFont(), fD.getHeight(), fD.getStyle()); 
+			viewer.getTable().setFont(font);
+		}
+		
+		createContextMenu(viewer);
+		viewer.getTable().setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, true));
+		viewer.getTable().setLinesVisible(true);
+		viewer.getTable().setHeaderVisible(true);
+
+		viewer.setLabelProvider(new LineLabelProvider());
+		viewer.setContentProvider(new LineContentProvider());
+		viewer.setInput(new ArrayList<Property>());
+
+		viewer.getTable().addMouseListener(new MouseAdapter() {
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+				
+				Point mouseposition = new Point(e.x
+						+ viewer.getTable().getHorizontalBar()
+						.getSelection(), e.y);
+				int col = getPointedColumn(mouseposition);
+				if (col == 1) {
+					StatusLine.setMessage(Messages.ReferencerEditor_25);
+					sendSelectionToConc();
+				} else if (col == 2) {
+					//System.out.println("Send to edition ?"); //$NON-NLS-1$
+				}
+			}
+		});
+
+		nColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		nColumn.setText(" "); //$NON-NLS-1$
+		nColumn.pack();
+
+		unitColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		unitColumn.setText(Messages.ReferencerEditor_9);
+		unitColumn.setToolTipText(Messages.ReferencerEditor_9);
+		unitColumn.setWidth(200);
+		unitColumn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		freqColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		freqColumn.setText(Messages.ReferencerEditor_11);
+		freqColumn.setToolTipText(Messages.ReferencerEditor_11);
+		freqColumn.setWidth(100);
+		freqColumn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+		
+		if (referencer != null)
+		{
+			this.fillDisplayArea(0, referencer.getNLines());
+			this.setPartName(referencer.getCorpus()+ ": "+referencer.getName()); //$NON-NLS-1$
+			this.querywidget.setText(referencer.getQuery().getQueryString());
+		}
+		
+		
+	}
+	
+	/**
+	 * Creates the context menu.
+	 *
+	 * @param tableViewer the table viewer
+	 */
+	private void createContextMenu(TableViewer tableViewer) {
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tableViewer.getTable());
+
+		// Set the MenuManager
+		tableViewer.getTable().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tableViewer);
+		// Make the selection available
+		getSite().setSelectionProvider(tableViewer);
+	}
+
+	/**
+	 * Send selection to conc.
+	 */
+	protected void sendSelectionToConc() {
+		ReferencerToConc.link(this, this.viewer.getSelection());
+	}
+
+	/**
+	 * Fill display area.
+	 *
+	 * @param from the from
+	 * @param to the to
+	 */
+	public void fillDisplayArea(int from, int to)
+	{
+		from = Math.max(from, 0);
+		to = Math.min(to, referencer.getNLines());
+		List<Line> lines = null;
+		if (referencer.getNLines() > 0) {
+			try {
+				lines = referencer.getLines(from, to);
+			} catch (Exception e) {
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+				lines = new ArrayList<Line>();
+			}
+		} else
+			lines = new ArrayList<Line>();
+
+		navigationArea.setInfoLineText(""+(from + 1), //$NON-NLS-1$
+				"-" + (to) + " / " + referencer.getNLines()); //$NON-NLS-1$ //$NON-NLS-2$
+		navigationArea.setPreviousEnabled(from > 0);
+		navigationArea.setFirstEnabled(from > 0);
+		navigationArea.setNextEnabled(to < referencer.getNLines() - 1);
+		navigationArea.setLastEnabled(to < referencer.getNLines() - 1);
+
+		unitColumn.setText(referencer.getProperty().toString());
+
+		String unitColumnHeader = ""; //$NON-NLS-1$
+		for (Property p : referencer.getPattern())
+			unitColumnHeader += p.toString() + ", "; //$NON-NLS-1$
+		if (unitColumnHeader.length() > 0)
+			unitColumnHeader = unitColumnHeader.substring(0, unitColumnHeader
+					.length() - 2);
+		freqColumn.setText(unitColumnHeader);
+
+		viewer.setInput(lines);
+		viewer.refresh();
+		// System.out.println("table refreshed from "+from+" to "+to+" with : "+lines);
+		topLine = from;
+		bottomLine = to;
+		for (TableColumn col : viewer.getTable().getColumns())
+			col.pack();
+	}
+
+	/**
+	 * Gets the pointed column.
+	 *
+	 * @param mouseposition the mouseposition
+	 * @return the pointed column
+	 */
+	public int getPointedColumn(Point mouseposition) {
+		int x = mouseposition.x; // + lineTableViewer.getTable().get;
+		int sumWidthColumn = this.nColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 0;
+
+		sumWidthColumn += this.unitColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 1;
+
+		sumWidthColumn += this.freqColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 2;
+
+		return 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		querywidget.setFocus();
+	}
+
+	/**
+	 * Gets the referencer.
+	 *
+	 * @return the referencer
+	 */
+	public Referencer getReferencer() {
+		return this.referencer;
+	}
+
+	/**
+	 * Gets the corpus.
+	 *
+	 * @return the corpus
+	 */
+	public Corpus getCorpus() {
+		return this.corpus;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 */
+	@Override
+	public void setName(String name) {
+		this.setPartName(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 */
+	@Override
+	public void setIcon(Image image) {
+		this.setTitleImage(image);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 */
+	@Override
+	public void setSource(Object source)
+	{
+		this.source = source;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
+	 */
+	@Override
+	public Object getSource() {
+		return referencer;
+	}
+	
+	@Override
+	public Object toConcordance() { return null;}
+	@Override
+	public Object toIndex() { return null;}
+	@Override
+	public Object toProgression() { return null;}
+	
+	@Override
+	public boolean usingCorpus(Corpus corpus) {
+		return this.corpus.getName().equals(corpus.getName());
+	}
+
+	@Override
+	public boolean updateCorpus(Corpus corpus) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/ReferencerEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/LineContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/LineContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/LineContentProvider.java	(revision 324)
@@ -0,0 +1,82 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.referencer;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.txm.functions.referencer.Referencer;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The IStructuredContentProvider used by the reference and line tables.
+ *
+ * @author mdecorde
+ */
+public class LineContentProvider implements IStructuredContentProvider {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
+	 * .lang.Object)
+	 */
+	@Override
+	public Object[] getElements(Object inputElement) {
+		@SuppressWarnings("unchecked")
+		List<Referencer.Line> lines = (List<Referencer.Line>) inputElement;
+		return lines.toArray();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
+	 * .viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		// TODO Auto-generated method stub
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/LineContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/LineLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/LineLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/LineLabelProvider.java	(revision 324)
@@ -0,0 +1,105 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.referencer;
+
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.txm.functions.referencer.Referencer;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class LineLabelProvider.
+ */
+public class LineLabelProvider implements ITableLabelProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+	 */
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		Referencer.Line line = (Referencer.Line) element;
+		switch (columnIndex) {
+		case 0:
+			return ""; //$NON-NLS-1$
+		case 1:
+			return line.getPropValue();
+		case 2:
+			StringBuffer str = new StringBuffer();
+			for(String ref : line.getReferences())
+			{
+				str.append(", "+ref+"("+line.getCount(ref)+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+			return str.substring(2); 
+		default:
+			return ""; //$NON-NLS-1$
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+	 */
+	@Override
+	public void addListener(ILabelProviderListener listener) {
+		// TODO Auto-generated method stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
+	 */
+	@Override
+	public boolean isLabelProperty(Object element, String property) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+	 */
+	@Override
+	public void removeListener(ILabelProviderListener listener) {
+		// TODO Auto-generated method stub
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/referencer/LineLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicEditor.java	(revision 324)
@@ -0,0 +1,299 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors;
+
+import java.io.File;
+import java.net.MalformedURLException;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.svg.SVGComposite;
+import org.txm.searchengine.cqp.corpus.Corpus;
+// TODO: Auto-generated Javadoc
+/**
+ * Test the use of the SVGComposite view from Batik_UI_Plugin Show a SVG file in
+ * a single panel.
+ *
+ * @author Sylvain Loiseau
+ */
+public class SVGGraphicEditor extends EditorPart implements CustomizableEditor{
+
+	/** Linking with the OutlineView. */
+	// private OverviewOutlinePage overviewOutlinePage;
+
+	private SVGComposite svgComp;
+	
+	/** The svg path. */
+	private IPath svgPath;
+	
+	/** The input. */
+	private IEditorInput input;
+	
+	/** The svgfile. */
+	private File svgfile;
+	
+	/** The parent. */
+	private Composite parent;
+	
+	/** The source. */
+	private Object source;
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.editors.SVGGraphicEditor"; //$NON-NLS-1$
+
+	/**
+	 * Gets the sVG composite.
+	 *
+	 * @return the sVG composite
+	 */
+	public SVGComposite getSVGComposite() {
+		return svgComp;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 */
+	@Override
+	public void setSource(Object source) {
+		this.source = source;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
+	 */
+	@Override
+	public Object getSource() {
+		return source;
+	}
+
+	/**
+	 * Do save.
+	 *
+	 * @param arg0 the arg0
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor arg0) {
+		// TODO Auto-generated method stub
+	}
+
+	/**
+	 * Do save as.
+	 *
+	 * @see org.eclipse.lyon gournd zeroui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+		// TODO Auto-generated method stub
+	}
+
+	/**
+	 * Inits the.
+	 *
+	 * @param site the site
+	 * @param input the input
+	 * @throws PartInitException the part init exception
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite,
+	 * org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		this.input = input;
+		setSite(site);
+		setInput(input);
+		setPartName(input.getName());
+	}
+
+	/**
+	 * Checks if is dirty.
+	 *
+	 * @return true, if is dirty
+	 * @see org.eclipse.ui.part.EditorPart#isDirty()
+	 */
+	@Override
+	public boolean isDirty() {
+		return false;
+	}
+
+	/**
+	 * Checks if is save as allowed.
+	 *
+	 * @return true, if is save as allowed
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+
+	/**
+	 * Creates the part control.
+	 *
+	 * @param parent the parent
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		this.parent = parent;
+
+		svgComp = new SVGComposite(parent, SWT.EMBEDDED | SWT.NO_BACKGROUND);
+		if (svgPath == null) {
+			if (input instanceof SVGGraphicable) {
+				//svgPath = ((SVGGraphicable) input).getIPath().toFile().toURI().toURL().toString();
+				try {
+					svgComp.setSVGFile(((SVGGraphicable) input).getIPath().toFile().toURI().toURL());
+					svgfile = ((SVGGraphicable) input).getIPath().toFile();
+				} catch (MalformedURLException e) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e);
+				}
+				
+			} else {
+				throw new IllegalArgumentException(Messages.SVGGraphicEditor_1);
+			}
+		}
+		svgComp.resetZoom();
+		createContextMenu();
+	}
+
+	/**
+	 * Sets the focus.
+	 *
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		svgComp.setFocus();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#dispose()
+	 */
+	@Override
+	public void dispose() {
+		svgComp.dispose();
+		super.dispose();
+	}
+
+	/**
+	 * Gets the sVG file.
+	 *
+	 * @return the sVG file
+	 */
+	public File getSVGFile() {
+		return svgfile;
+	}
+
+	/**
+	 * Creates the context menu.
+	 */
+	private void createContextMenu() {
+		/*
+		 * Menu menu = new Menu(parent.getShell()); MenuItem item = new MenuItem
+		 * (menu, SWT.PUSH); item.setText ("Popup"); svgComp.setMenu (menu);
+		 */
+
+		/*
+		 * // Set the MenuManager getSite().registerContextMenu(menuManager,
+		 * svgComp); // Make the selection available
+		 * getSite().setSelectionProvider(svgComp);
+		 */
+	}
+
+	// TODO : check the good one.
+	// public Object getAdapter(Class type) {
+	// if (type == IContentOutlinePage.class) {
+	// return getOverviewOutlinePage();
+	// } else if (type.getClass().getName().equals("IContentOutlinePage")) {
+	// return getOverviewOutlinePage();
+	// } else if (type.getClass().equals(IContentOutlinePage.class.getClass()))
+	// {
+	// return getOverviewOutlinePage();
+	// }
+	// return super.getAdapter(type);
+	// }
+	//
+	// private OverviewOutlinePage getOverviewOutlinePage() {
+	// if (null == overviewOutlinePage) {
+	// overviewOutlinePage = new OverviewOutlinePage();
+	// }
+	// return overviewOutlinePage;
+	// }
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 */
+	@Override
+	public void setName(String name) {
+		this.setPartName(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 */
+	@Override
+	public void setIcon(Image titleImage) {
+		this.setTitleImage(titleImage);
+	}
+
+	/**
+	 * Reset view.
+	 */
+	public void resetView() {
+		svgComp.resetZoom();
+	}
+	
+	@Override
+	public Object toConcordance() { return null;}
+	@Override
+	public Object toIndex() { return null;}
+	@Override
+	public Object toProgression() { return null;}
+	
+	@Override
+	public boolean usingCorpus(Corpus corpus) {
+		return false;
+	}
+
+	@Override
+	public boolean updateCorpus(Corpus corpus) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorPart.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorPart.java	(revision 323)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorPart.java	(revision 324)
@@ -20,8 +20,8 @@
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.part.EditorPart;
 import org.txm.core.results.ITXMResult;
-import org.txm.rcpapplication.IImageKeys;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.views.corpora.CorporaView;
 
 /**
  * Base TXM result <code>EditorPart</code>.
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/Tablable.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/Tablable.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/Tablable.java	(revision 324)
@@ -0,0 +1,79 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.ui.IEditorInput;
+
+// TODO: Auto-generated Javadoc
+/**
+ * An {@link IEditorInput} implementing this interface may be displayed as a
+ * table by the {@link TableEditor}.
+ * 
+ * @author sloiseau
+ * 
+ */
+public interface Tablable extends IEditorInput {
+
+	/**
+	 * Gets the content provider.
+	 *
+	 * @return the content provider
+	 */
+	public IStructuredContentProvider getContentProvider();
+
+	/**
+	 * Gets the label provider.
+	 *
+	 * @return the label provider
+	 */
+	public LabelProvider getLabelProvider();
+
+	/**
+	 * Gets the input.
+	 *
+	 * @return the input
+	 */
+	public Object getInput();
+
+	/**
+	 * Gets the column titles.
+	 *
+	 * @return the column titles
+	 */
+	public String[] getColumnTitles();
+
+	/**
+	 * Gets the column types.
+	 *
+	 * @return the column types
+	 */
+	public String[] getColumnTypes();
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/Tablable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableKeyListener.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableKeyListener.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableKeyListener.java	(revision 324)
@@ -0,0 +1,116 @@
+package org.txm.rcp.editors;
+
+import java.util.ArrayList;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.txm.cooccurrence.rcp.messages.CooccurrenceUIMessages;
+import org.txm.rcp.Messages;
+import org.txm.utils.logger.Log;
+
+public class TableKeyListener implements KeyListener {
+	TableViewer viewer;
+
+	public TableKeyListener(TableViewer viewer) {
+		this.viewer = viewer;
+	}
+
+	@Override
+	public void keyReleased(KeyEvent e) {
+
+	}
+
+	@Override
+	public void keyPressed(KeyEvent e) {
+		//System.out.println("key code: "+e.keyCode);
+		if ((e.stateMask & SWT.CTRL) != 0 && e.keyCode == 99 ) { // CTRL + C
+			copyLines();
+		} else if ((e.stateMask & SWT.CTRL) != 0 && e.keyCode == 102 ) { // CTRL + F
+			searchInLines();
+		} else if ((e.stateMask & SWT.COMMAND) != 0 && e.keyCode == 99 ) { // CMD + C
+			copyLines();
+		} else if ((e.stateMask & SWT.COMMAND) != 0 && e.keyCode == 102 ) { // CMD + F
+			searchInLines();
+		}
+	}
+
+	public void searchInLines() {
+		TableItem[] items = viewer.getTable().getItems();
+		//System.out.println("search in tablein items: "+Arrays.toString(items));
+
+		TableColumn[] cols = viewer.getTable().getColumns();
+		InputDialog dialog = new InputDialog(viewer.getTable().getShell(), CooccurrenceUIMessages.CooccurrencesEditor_2, Messages.TableKeyListener_1, "", null);  //$NON-NLS-1$
+		if (dialog.open() == Window.OK) {
+			String reg = dialog.getValue();
+			Pattern p = Pattern.compile(reg);
+			// TODO: useless ?
+			//ArrayList<TableItem> matchingItem = new ArrayList<TableItem>();
+			ArrayList<Integer> matchingIndexes = new ArrayList<Integer>();
+			for (int l = 0 ; l < items.length ; l++) {
+				TableItem item = items[l];
+				for (int i = 0 ; i < cols.length ; i++) {
+					if (p.matcher(item.getText(i)).matches()) {
+						// TODO: useless
+						//matchingItem.add(item);
+						matchingIndexes.add(l);
+						break; // next line
+					}
+				}
+			}
+			Log.info(Messages.TableKeyListener_0 + matchingIndexes);
+
+			// TODO: useless ?
+//			int[] indexes = new int[matchingIndexes.size()];
+//			TableItem[] mitems = new TableItem[matchingItem.size()];
+//			int i = 0;
+//			for(int index : matchingIndexes) {
+//				indexes[i++] = index;
+//			}
+//			i = 0;
+//			for(TableItem item : matchingItem) {
+//				mitems[i++] = item;
+//			}
+
+			// TODO: old version which doesn't trigger selection event
+//			if (mitems.length > 0) {
+//				viewer.getTable().showItem(mitems[0]); // useless: viewer.getTable().setSelection(indexes) can replace these 3 lines of code
+//				viewer.getTable().deselectAll(); // useless: viewer.getTable().setSelection(indexes) can replace these 3 lines of code
+//				viewer.getTable().select(indexes); // useless: viewer.getTable().setSelection(indexes) can replace these 3 lines of code
+			
+			// trigger selection event on viewer
+			if (matchingIndexes.size() > 0) {
+				ArrayList elements = new ArrayList(matchingIndexes.size());
+				for(int j = 0; j < matchingIndexes.size(); j++) {
+					elements.add(viewer.getElementAt(matchingIndexes.get(j)));
+				}
+				viewer.setSelection(new StructuredSelection(elements), true);
+			}
+		}
+	}
+
+	public void copyLines() {
+		TableItem[] items = viewer.getTable().getSelection();
+		String str = ""; //$NON-NLS-1$
+		TableColumn[] cols = viewer.getTable().getColumns();
+		for (int l = 0 ; l < items.length ; l++) {
+			TableItem item = items[l];
+			if (l > 0) str += "\n"; //$NON-NLS-1$
+			for (int i = 0 ; i < cols.length ; i++) {
+				if (cols[i].getText().trim().length() >0) {
+					if (i > 0) str += "\t"; //$NON-NLS-1$
+					str += item.getText(i);
+				}
+			}
+		}
+		org.txm.rcp.utils.IOClipboard.write(str);
+		System.out.println(Messages.TableKeyListener_6+str);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TableKeyListener.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/CorpusReferenceDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/CorpusReferenceDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/CorpusReferenceDialog.java	(revision 324)
@@ -0,0 +1,177 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.parabrowser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class CorpusReferenceDialog.
+ */
+public class CorpusReferenceDialog extends Dialog {
+
+	/** The available reference items. */
+	private List<Property> availableReferenceItems;
+	
+	/** The selected reference items. */
+	private List<Property> selectedReferenceItems;
+
+	/**
+	 * Instantiates a new corpus reference dialog.
+	 *
+	 * @param iWorkbenchPartSite the i workbench part site
+	 * @param availableReferenceItems the available reference items
+	 */
+	public CorpusReferenceDialog(IWorkbenchPartSite iWorkbenchPartSite,
+			List<Property> availableReferenceItems) {
+		super(iWorkbenchPartSite);
+		this.availableReferenceItems = availableReferenceItems;
+		this.selectedReferenceItems = new ArrayList<Property>();
+	}
+
+	/**
+	 * Gets the selectesd reference items.
+	 *
+	 * @return the selectesd reference items
+	 */
+	public List<Property> getSelectesdReferenceItems() {
+		return selectedReferenceItems;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+
+		Composite mainArea = new Composite(parent, SWT.NONE);
+		mainArea.setLayout(new GridLayout(4, false));
+
+		final org.eclipse.swt.widgets.List availbleItems = new org.eclipse.swt.widgets.List(
+				mainArea, SWT.BORDER | SWT.V_SCROLL);
+		for (Property property : availableReferenceItems) {
+			if (property instanceof StructuralUnitProperty) {
+				StructuralUnitProperty sProperty = (StructuralUnitProperty) property;
+				availbleItems.add(sProperty.getStructuralUnit().getName()
+						+ ": " + property.getName()); //$NON-NLS-1$
+			} else {
+				availbleItems.add(property.getName());
+			}
+		}
+		GridData gridData = new GridData(GridData.FILL, GridData.FILL, true,
+				false);
+		Point size = availbleItems.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+		gridData.widthHint = size.x;
+		availbleItems.setLayoutData(gridData);
+
+		Composite selectionButtons = new Composite(mainArea, SWT.NONE);
+		selectionButtons.setLayout(new GridLayout(1, false));
+		Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+		Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+		final org.eclipse.swt.widgets.List selectedItems = new org.eclipse.swt.widgets.List(
+				mainArea, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+		selectedItems.setLayoutData(gridData);
+
+		Composite orderButtons = new Composite(mainArea, SWT.NONE);
+		orderButtons.setLayout(new GridLayout(1, false));
+		Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+		Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+		select.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = availbleItems.getSelectionIndex();
+				selectedItems.add(availbleItems.getItem(ind));
+				availbleItems.remove(ind);
+				selectedReferenceItems.add(availableReferenceItems.get(ind));
+				availableReferenceItems.remove(ind);
+				availbleItems.setSelection(ind);
+			}
+		});
+
+		unselect.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = selectedItems.getSelectionIndex();
+				availbleItems.add(selectedItems.getItem(ind));
+				selectedItems.remove(ind);
+				availableReferenceItems.add(selectedReferenceItems.get(ind));
+				selectedReferenceItems.remove(ind);
+				selectedItems.setSelection(ind);
+			}
+		});
+
+		up.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = selectedItems.getSelectionIndex();
+				if (ind > 0) {
+					selectedItems.add(selectedItems.getItem(ind), ind - 1);
+					selectedItems.remove(ind + 1);
+					selectedReferenceItems.add(selectedReferenceItems
+							.get(ind - 1));
+					selectedReferenceItems.remove(ind + 1);
+					selectedItems.setSelection(ind - 1);
+				}
+			}
+		});
+
+		down.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = selectedItems.getSelectionIndex();
+				if (ind < selectedItems.getItemCount() - 1) {
+					selectedItems.add(selectedItems.getItem(ind), ind + 2);
+					selectedItems.remove(ind);
+					selectedReferenceItems.add(selectedReferenceItems
+							.get(ind + 2));
+					selectedReferenceItems.remove(ind);
+					selectedItems.setSelection(ind + 2);
+				}
+			}
+		});
+
+		return mainArea;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/CorpusReferenceDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/ParaBrowserEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/ParaBrowserEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/ParaBrowserEditor.java	(revision 324)
@@ -0,0 +1,808 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.parabrowser;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.functions.parabrowser.ParaBrowser;
+import org.txm.functions.ReferencePattern;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.editors.concordances.DefineViewReferencePattern;
+import org.txm.rcp.editors.input.ParaBrowserEditorInput;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.QueryResult;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.utils.Pair;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ParaBrowserEditor.
+ */
+public class ParaBrowserEditor extends EditorPart {
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.editors.parabrowser.ParaBrowserEditor"; //$NON-NLS-1$
+
+	/** The display area. */
+	private Composite displayArea;
+	
+	/** The define reference pattern action. */
+	protected Action defineReferencePatternAction;
+	
+	/** The define order corpus action. */
+	protected Action defineOrderCorpusAction;
+
+	/** The corpus text areas. */
+	private Map<MainCorpus, StyledText> corpusTextAreas;
+	
+	/** The corpus ref areas. */
+	private Map<MainCorpus, Label> corpusRefAreas;
+	
+	/** The corpus query result areas. */
+	private Map<MainCorpus, QueryResult> corpusQueryResultAreas;
+
+	/** The selected structural unit. */
+	private StructuralUnit selectedStructuralUnit;
+	
+	/** The selected structural unit para id. */
+	private StructuralUnitProperty selectedStructuralUnitParaId;
+	
+	/** The selected value. */
+	private String selectedValue;
+
+	/** The structural units combo. */
+	private Combo structuralUnitsCombo;
+	
+	/** The structural units final. */
+	private List<StructuralUnit> structuralUnitsFinal;
+	
+	/** The para id combo. */
+	private Combo paraIdCombo;
+
+	/** The reference pattern. */
+	private ReferencePattern referencePattern = new ReferencePattern();
+	
+	/** The selected reference. */
+	private String selectedReference = ""; //$NON-NLS-1$
+
+	/** The selected view corpus. */
+	private List<MainCorpus> selectedViewCorpus;
+	
+	/** The available view corpus. */
+	private List<MainCorpus> availableViewCorpus;
+
+	/** The available view properties. */
+	private List<StructuralUnit> availableViewProperties;
+	
+	/** The selected view properties. */
+	private List<StructuralUnit> selectedViewProperties;
+	
+	private ParaBrowser paraBrowser = new ParaBrowser();
+	
+	/** The next. */
+	private Button next;
+	
+	/** The prev. */
+	private Button prev;
+
+	/**
+	 * Instantiates a new para browser editor.
+	 */
+	public ParaBrowserEditor() {
+	}
+
+	/**
+	 * Do save.
+	 *
+	 * @param arg0 the arg0
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor arg0) {
+		// TODO Auto-generated method stub
+	}
+
+	/**
+	 * Do save as.
+	 *
+	 * @see org.eclipse.lyon gournd zeroui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+		// TODO Auto-generated method stub
+	}
+
+	/**
+	 * Inits the.
+	 *
+	 * @param site the site
+	 * @param input the input
+	 * @throws PartInitException the part init exception
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite,
+	 * org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		setSite(site);
+		setInput(input);
+
+		this.selectedViewCorpus = ((ParaBrowserEditorInput) input)
+				.getCorpusList();
+		List<MainCorpus> tempView = new ArrayList<MainCorpus>();
+		availableViewCorpus = new ArrayList<MainCorpus>();
+		if (selectedViewCorpus.size() > 3) {
+			int i = 0;
+			for (MainCorpus corpus : selectedViewCorpus) {
+				if (i < 4) {
+					tempView.add(corpus);
+				} else {
+					availableViewCorpus.add(corpus);
+				}
+				++i;
+			}
+			selectedViewCorpus = tempView;
+		}
+	}
+
+	/**
+	 * Checks if is dirty.
+	 *
+	 * @return true, if is dirty
+	 * @see org.eclipse.ui.part.EditorPart#isDirty()
+	 */
+	@Override
+	public boolean isDirty() {
+		return false;
+	}
+
+	/**
+	 * Checks if is save as allowed.
+	 *
+	 * @return true, if is save as allowed
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+
+	/**
+	 * Creates the part control.
+	 *
+	 * @param parent the parent
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(final Composite parent) {
+		corpusTextAreas = new HashMap<MainCorpus, StyledText>();
+		corpusRefAreas = new HashMap<MainCorpus, Label>();
+		corpusQueryResultAreas = new HashMap<MainCorpus, QueryResult>();
+
+		parent.setLayout(new GridLayout(1, false));
+
+		Composite controlArea = new Composite(parent, SWT.BORDER);
+		controlArea
+				.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));// FILL,
+		composeControlArea(controlArea);
+
+		displayArea = new Composite(parent, SWT.NONE);
+		displayArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));// 2ème
+																				// arg
+																				// :
+																				// true
+		composeDisplayArea(displayArea);
+		reloadTexts();
+	}
+
+	/**
+	 * Compose display area.
+	 *
+	 * @param displayArea the display area
+	 */
+	private void composeDisplayArea(Composite displayArea) {
+
+		if (selectedViewCorpus != null) {
+			displayArea.setLayout(new GridLayout(selectedViewCorpus.size(),
+					true));
+
+			for (int i = 0; i < selectedViewCorpus.size(); ++i) {
+				composeSingleTextDisplayArea(displayArea, selectedViewCorpus
+						.get(i), selectedViewCorpus.size());
+			}
+		} else {
+			displayArea.setLayout(new GridLayout(1, false));
+
+			selectedViewCorpus = new ArrayList<MainCorpus>();
+			selectedViewCorpus.add(selectedViewCorpus.get(0));
+			composeSingleTextDisplayArea(displayArea,
+					selectedViewCorpus.get(0), 1);
+		}
+
+	}
+
+	/**
+	 * Compose single text display area.
+	 *
+	 * @param displayArea the display area
+	 * @param displayedCorpus the displayed corpus
+	 * @param nbtextDisplayAreas the nbtext display areas
+	 */
+	private void composeSingleTextDisplayArea(Composite displayArea,
+			MainCorpus displayedCorpus, int nbtextDisplayAreas) {
+		Composite singleCorpusArea = new Composite(displayArea, SWT.NONE);
+		singleCorpusArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+				true));
+		GridLayout layout = new GridLayout(1, false);
+		singleCorpusArea.setLayout(layout);
+
+		// Corpus name Label
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+		Label nameCorpusLabel = new Label(singleCorpusArea, SWT.NONE);
+		nameCorpusLabel.setText(displayedCorpus.getName());
+		nameCorpusLabel.setLayoutData(new GridData(GridData.FILL,
+				GridData.FILL, true, false));
+
+		// Text
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+		StyledText corpusTextArea = new StyledText(singleCorpusArea, SWT.WRAP
+				| SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); // SWT.BORDER
+		corpusTextArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, true));
+		// String text = displayedCorpus.getTextRegion(selectedStructuralUnit,
+		// selectedStructuralUnitParaId, selectedValue);
+		corpusTextArea.setText(""); //$NON-NLS-1$
+		corpusTextAreas.put(displayedCorpus, corpusTextArea);
+
+		// Reference Label
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+		Label referenceLabel = new Label(singleCorpusArea, SWT.NONE);
+		referenceLabel.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+				true, false));
+		if (referencePattern != null) {
+			// selectedStructuralUnit.getName()
+			List<Property> references = referencePattern.getProperties();
+			for (Property property : references) {
+				selectedReference += property.getName() + "/"; //$NON-NLS-1$
+			}
+		}
+		referenceLabel.setText(Messages.ParaBrowserEditor_3 + selectedReference);
+		corpusRefAreas.put(displayedCorpus, referenceLabel);
+	}
+
+	/**
+	 * Compose control area.
+	 *
+	 * @param controlArea the control area
+	 */
+	private void composeControlArea(Composite controlArea) {
+		controlArea.setLayout(new GridLayout(6, false));
+		// composeCorpusDisplay(controlArea);
+		composeStructuralNavigation(controlArea);
+		composeNavigation(controlArea);
+
+		createActions();
+
+		MenuManager menuManager = new MenuManager("#PopupMenu"); //$NON-NLS-1$
+		menuManager.setRemoveAllWhenShown(true);
+		menuManager.addMenuListener(new IMenuListener() {
+			@Override
+			public void menuAboutToShow(IMenuManager manager) {
+				manager.add(defineReferencePatternAction);
+				manager.add(defineOrderCorpusAction);
+			}
+		});
+		controlArea.setMenu(menuManager.createContextMenu(controlArea));
+		getSite().registerContextMenu(menuManager,
+				this.getSite().getSelectionProvider());
+	}
+
+	/*
+	 * private void composeCorpusDisplay(Composite controlArea){ //Manager for
+	 * corpus display Button buttonManager = new Button(controlArea, SWT.PUSH);
+	 * buttonManager.setText("manage view"); buttonManager.addMouseListener(new
+	 * MouseListener() {
+	 * 
+	 * @Override public void mouseUp(MouseEvent e) {
+	 * launchCorpusSelectionManager(); }
+	 * 
+	 * @Override public void mouseDown(MouseEvent e) {
+	 * launchCorpusSelectionManager(); }
+	 * 
+	 * @Override public void mouseDoubleClick(MouseEvent e) { // TODO
+	 * Auto-generated method stub
+	 * 
+	 * } });
+	 * 
+	 * //Manager to build reference Button buttonReference = new
+	 * Button(controlArea, SWT.PUSH); buttonReference.setText("reference");
+	 * buttonReference.addMouseListener(new MouseListener() {
+	 * 
+	 * @Override public void mouseUp(MouseEvent e) {
+	 * launchCorpusReferenceManager(); }
+	 * 
+	 * @Override public void mouseDown(MouseEvent e) {
+	 * launchCorpusReferenceManager(); }
+	 * 
+	 * @Override public void mouseDoubleClick(MouseEvent e) { // TODO
+	 * Auto-generated method stub
+	 * 
+	 * } }); }
+	 */
+
+	/**
+	 * Compose navigation.
+	 *
+	 * @param controlArea the control area
+	 */
+	private void composeNavigation(Composite controlArea) {
+		Composite navigationArea = new Composite(controlArea, SWT.NONE);
+		navigationArea.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false,
+				false));// false, false
+		navigationArea.setLayout(new GridLayout(2, false));
+		// [<] [>]
+
+		// [<]
+		prev = new Button(navigationArea, SWT.PUSH);
+		prev.setText(Messages.ConcordancesEditor_12);
+		prev.addListener(SWT.Selection, new Listener() {
+			@Override
+			public void handleEvent(Event event) {
+				nextorpreviousText(false);
+			}
+		});
+		prev.setEnabled(true);
+
+		// [>]
+		next = new Button(navigationArea, SWT.PUSH);
+		next.setText(Messages.ConcordancesEditor_13);
+		next.addListener(SWT.Selection, new Listener() {
+			@Override
+			public void handleEvent(Event event) {
+				nextorpreviousText(true);
+			}
+		});
+		next.setEnabled(true);
+
+	}
+
+	/**
+	 * Compose structural navigation.
+	 *
+	 * @param controlArea the control area
+	 */
+	private void composeStructuralNavigation(Composite controlArea) {
+		// StructuralUnit
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+		Button refButton = new Button(controlArea, SWT.PUSH);
+		refButton.setText(Messages.ParaBrowserEditor_4);
+		refButton
+				.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true));
+		refButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				defineReferencePatternAction.run();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		Label structureLabel = new Label(controlArea, SWT.NONE);
+		structureLabel.setText(Messages.ParaBrowserEditor_5); // LEFT
+		structureLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+				true));
+
+		structuralUnitsCombo = new Combo(controlArea, SWT.READ_ONLY);
+
+		List<StructuralUnit> structuralUnits = null;
+		if (selectedViewCorpus.size() > 0) {
+			try {
+				// same structure in all corpus, therefore use the first in the
+				// list
+				structuralUnits = selectedViewCorpus.get(0)
+						.getOrderedStructuralUnits();
+			} catch (CqiClientException e) {
+				System.err
+						.println(Messages.ObjectExplorer_9);
+				return;
+			}
+		}
+		structuralUnitsFinal = new ArrayList<StructuralUnit>();
+		if (structuralUnits != null) {
+			for (StructuralUnit unit : structuralUnits) {
+				if (unit.getOrderedProperties() != null
+						&& unit.getOrderedProperties().size() != 0) {
+					structuralUnitsCombo.add(unit.getName());
+					structuralUnitsFinal.add(unit);
+				}
+			}
+		}
+
+		if (structuralUnitsCombo.getItemCount() == 0) {
+			// this.getButton(IDialogConstants.OK_ID).setEnabled(false);
+		} else {
+			structuralUnitsCombo.select(0);
+			selectedStructuralUnit = structuralUnitsFinal.get(0);
+		}
+
+		// StructuralUnitParaId
+		// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+		Label paraIdLabel = new Label(controlArea, SWT.NONE);
+		paraIdLabel.setText("paraid"); //$NON-NLS-1$
+		paraIdLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+				true));
+
+		paraIdCombo = new Combo(controlArea, SWT.READ_ONLY);
+		paraIdCombo
+				.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
+
+		structuralUnitsCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				reloadIds();
+			}
+		});
+
+		for (StructuralUnitProperty property : structuralUnitsFinal.get(0)
+				.getOrderedProperties()) {
+			if (property.getName().equals("id")) { //$NON-NLS-1$
+				selectedStructuralUnitParaId = property;
+				try {
+					for (String value : property.getValues()) {
+						paraIdCombo.add(value);
+					}
+				} catch (CqiClientException e1) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
+				}
+			}
+		}
+		paraIdCombo.select(0);
+		try {
+			if (selectedStructuralUnitParaId != null)
+				selectedValue = selectedStructuralUnitParaId.getValues().get(0);
+		} catch (CqiClientException e1) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e1);
+		}
+
+		paraIdCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				// selectedStructuralUnitParaId =
+				// selectedStructuralUnit.getProperties().get(paraIdCombo.getSelectionIndex());
+				if (selectedStructuralUnitParaId != null) {
+					try {
+						List<String> values = selectedStructuralUnitParaId
+								.getValues();
+						Collections.sort(values);
+						selectedValue = values.get(paraIdCombo
+								.getSelectionIndex());
+						// System.out.println("Selection of id = "+selectedValue);
+					} catch (CqiClientException e) {
+						// TODO Auto-generated catch block
+						org.txm.rcp.utils.Logger.printStackTrace(e);
+					}
+				}
+				reloadTexts();
+				reloadReferences();
+			}
+		});
+	}
+
+	/**
+	 * Creates the actions.
+	 */
+	private void createActions() {
+		defineReferencePatternAction = new DefineViewReferencePattern(getSite()
+				.getWorkbenchWindow(), this);
+		defineOrderCorpusAction = new CorpusSelection(getSite()
+				.getWorkbenchWindow(), this);
+	}
+
+	/**
+	 * Reload display.
+	 */
+	private void reloadDisplay() {
+		if (selectedViewCorpus != null) {
+			displayArea.setLayout(new GridLayout(selectedViewCorpus.size(),
+					true));
+
+			for (int i = 0; i < selectedViewCorpus.size(); ++i) {
+				composeSingleTextDisplayArea(displayArea, selectedViewCorpus
+						.get(i), selectedViewCorpus.size());
+			}
+		} else {
+			displayArea.setLayout(new GridLayout(1, false));
+
+			selectedViewCorpus = new ArrayList<MainCorpus>();
+			selectedViewCorpus.add(selectedViewCorpus.get(0));
+			composeSingleTextDisplayArea(displayArea,
+					selectedViewCorpus.get(0), 1);
+		}
+		displayArea.layout();
+		displayArea.pack(true);
+	}
+
+	/**
+	 * Reload texts.
+	 */
+	private void reloadTexts() {
+		Set keys = corpusTextAreas.keySet();
+		Iterator<MainCorpus> it = keys.iterator();
+		while (it.hasNext()) {
+			MainCorpus corpus = it.next();
+			StyledText textArea = corpusTextAreas.get(corpus);
+			Pair<String, QueryResult> pair = paraBrowser.getTextRegion(corpus,
+					selectedStructuralUnit, selectedStructuralUnitParaId,
+					selectedValue);
+			// corpusQueryResultAreas.put(corpus, pair.getSecond());
+			textArea.setText(pair.getFirst());
+			// Label ref = corpusRefAreas.get(corpus);
+			// ref.setText("Ref: ...");
+		}
+	}
+
+	/**
+	 * Reload ids.
+	 */
+	private void reloadIds() {
+		selectedStructuralUnit = structuralUnitsFinal.get(structuralUnitsCombo
+				.getSelectionIndex());
+		paraIdCombo.removeAll();
+
+		for (StructuralUnitProperty property : structuralUnitsFinal.get(
+				structuralUnitsCombo.getSelectionIndex()).getOrderedProperties()) {
+			if (property.getName().equals("id")) { //$NON-NLS-1$
+				selectedStructuralUnitParaId = property;
+				try {
+					List<String> values = property.getValues();
+					Collections.sort(values);
+					for (String value : values) {
+						paraIdCombo.add(value);
+					}
+				} catch (CqiClientException e1) {
+					// TODO Auto-generated catch block
+					org.txm.rcp.utils.Logger.printStackTrace(e1);
+				}
+			}
+		}
+
+		if (paraIdCombo.getItemCount() > 0) {
+			paraIdCombo.select(0);
+			try {
+				if (selectedStructuralUnitParaId != null) {
+					List<String> values = selectedStructuralUnitParaId
+							.getValues();
+					Collections.sort(values);
+					selectedValue = values.get(0);
+					reloadTexts();
+					reloadReferences();
+				}
+			} catch (CqiClientException e1) {
+				// TODO Auto-generated catch block
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
+			}
+			// selectedStructuralUnitParaId =
+			// selectedStructuralUnit.getProperties().get(0);
+		}
+	}
+
+	/**
+	 * Reload references.
+	 */
+	private void reloadReferences() {
+		Set<MainCorpus> keys = corpusRefAreas.keySet();
+		Iterator<MainCorpus> it = keys.iterator();
+		while (it.hasNext()) {
+			MainCorpus corpus = it.next();
+
+			// get all reference values of all lines
+			/*
+			 * List<Integer> beginingOfKeywordsPositions = new
+			 * ArrayList<Integer>(j-i); Map<Property, List<List<String>>>
+			 * refValues = new HashMap<Property, List<List<String>>>(); for
+			 * (Property property : referencePattern){
+			 * refValues.put(property,cache
+			 * .get(property).getData(beginingOfKeywordsPositions,
+			 * Collections.nCopies(beginingOfKeywordsPositions.size(), 1))); }
+			 */
+
+			Label refArea = corpusRefAreas.get(corpus);
+			refArea.setText(NLS.bind(Messages.ParaBrowserEditor_9, corpus.getName(), selectedReference));
+		}
+
+	}
+
+	/**
+	 * Nextorprevious text.
+	 *
+	 * @param findNext the find next
+	 */
+	public void nextorpreviousText(boolean findNext) {
+		// get Property
+		System.out.println(NLS.bind(Messages.ParaBrowserEditor_11, 
+			new Object[]{findNext, selectedStructuralUnit, selectedStructuralUnitParaId, selectedValue}));
+		if (selectedStructuralUnit != null) {
+			// Multiple Query, as many as there are corpuses displayed
+			Set keys = corpusTextAreas.keySet();
+			Iterator<MainCorpus> it = keys.iterator();
+			String newValue = ""; //$NON-NLS-1$
+			for (int i = 0; it.hasNext(); ++i) {
+				// if (i==0){
+				MainCorpus corpus = it.next();
+				System.out.println("CORPUS ################### " //$NON-NLS-1$
+						+ corpus.getName());
+				newValue = paraBrowser.getNextOrPrevious(corpus, selectedStructuralUnit,
+						selectedStructuralUnitParaId, selectedValue, findNext);
+				// }
+			}
+			if (!newValue.equals("")) { //$NON-NLS-1$
+				System.out.println(Messages.ParaBrowserEditor_18 + newValue);
+				int index = paraIdCombo.indexOf(newValue);
+				if (index != -1) {
+					selectedValue = newValue;
+					paraIdCombo.select(index);
+				}
+			} else {
+				System.out.println(Messages.ParaBrowserEditor_19 + newValue);
+			}
+			reloadTexts();
+			reloadReferences();
+		}
+	}
+
+	/**
+	 * Sets the reference pattern.
+	 *
+	 * @param referencePattern the new reference pattern
+	 */
+	public void setReferencePattern(ReferencePattern referencePattern) {
+		this.referencePattern = referencePattern;
+		selectedReference = Messages.ObjectExplorer_9;
+		if (referencePattern != null) {
+			// selectedStructuralUnit.getName()
+			List<Property> references = referencePattern.getProperties();
+			for (Property property : references) {
+				selectedReference += property.getName() + Messages.ParaBrowserEditor_21;
+			}
+		}
+		reloadReferences();
+	}
+
+	/**
+	 * Sets the focus.
+	 *
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		StatusLine.setMessage(Messages.ParaBrowserEditor_22);
+	}
+
+	/**
+	 * Gets the corpus.
+	 *
+	 * @return the corpus
+	 */
+	public MainCorpus getCorpus() {
+		if (selectedViewCorpus.size() > 0) {
+			return selectedViewCorpus.get(0);
+		} else
+			return null;
+	}
+
+	/**
+	 * Gets the selected corpus.
+	 *
+	 * @return the selected corpus
+	 */
+	public List<MainCorpus> getSelectedCorpus() {
+		return selectedViewCorpus;
+	}
+
+	/**
+	 * Sets the selected corpus.
+	 *
+	 * @param corpus the corpus
+	 * @param corpusAvailable the corpus available
+	 */
+	public void setSelectedCorpus(List<MainCorpus> corpus,
+			List<MainCorpus> corpusAvailable) {
+		selectedViewCorpus = corpus;
+		availableViewCorpus = corpusAvailable;
+		reloadDisplay();
+	}
+
+	/**
+	 * Gets the available corpus.
+	 *
+	 * @return the available corpus
+	 */
+	public List<MainCorpus> getAvailableCorpus() {
+		if (availableViewCorpus == null) {
+			availableViewCorpus = new ArrayList<MainCorpus>();
+		}
+		return availableViewCorpus;
+	}
+
+	/**
+	 * Gets the selected references.
+	 *
+	 * @return the selected references
+	 */
+	public List<Property> getSelectedReferences() {
+		return referencePattern.getProperties();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/ParaBrowserEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/CorpusSelection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/CorpusSelection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/CorpusSelection.java	(revision 324)
@@ -0,0 +1,320 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.parabrowser;
+
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class CorpusSelection.
+ */
+public class CorpusSelection extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.parabrowser.corpusselection"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The para browser editor. */
+	private ParaBrowserEditor paraBrowserEditor;
+
+	/**
+	 * Instantiates a new corpus selection.
+	 *
+	 * @param window the window
+	 * @param paraBrowserEditor the para browser editor
+	 */
+	public CorpusSelection(IWorkbenchWindow window,
+			ParaBrowserEditor paraBrowserEditor) {
+		this.window = window;
+		this.paraBrowserEditor = paraBrowserEditor;
+		setId(ID);
+		setText("Définir les corpus à l'affichage"); //$NON-NLS-1$
+		setToolTipText("Corpus à l'affichage"); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		if (paraBrowserEditor != null) {
+			List<MainCorpus> selectedCorpus = paraBrowserEditor
+					.getSelectedCorpus();
+			List<MainCorpus> availableCorpus = paraBrowserEditor
+					.getAvailableCorpus();
+
+			CorpusSelectionDialog d = new CorpusSelectionDialog(window
+					.getShell(), availableCorpus, selectedCorpus);
+			if (d.open() == Window.OK) {
+				if (paraBrowserEditor == null) {
+					paraBrowserEditor.setSelectedCorpus(d.getSelectedCorpus(),
+							d.getAvailableCorpus());
+				}
+			}
+		}
+	}
+
+	/**
+	 * The Class CorpusSelectionDialog.
+	 */
+	private class CorpusSelectionDialog extends Dialog {
+
+		/** The available corpus. */
+		final private List<MainCorpus> availableCorpus;
+		
+		/** The selected corpus. */
+		final private List<MainCorpus> selectedCorpus;
+
+		/** The available corpus view. */
+		org.eclipse.swt.widgets.List availableCorpusView;
+		
+		/** The selected corpus view. */
+		org.eclipse.swt.widgets.List selectedCorpusView;
+
+		/**
+		 * Instantiates a new corpus selection dialog.
+		 *
+		 * @param parentShell the parent shell
+		 * @param availableCorpus the available corpus
+		 * @param selectedCorpus the selected corpus
+		 */
+		protected CorpusSelectionDialog(Shell parentShell,
+				List<MainCorpus> availableCorpus,
+				List<MainCorpus> selectedCorpus) {
+			super(parentShell);
+			this.availableCorpus = availableCorpus;
+			this.selectedCorpus = selectedCorpus;
+			// TODO Auto-generated constructor stub
+		}
+
+		/**
+		 * Gets the selected corpus.
+		 *
+		 * @return the selected corpus
+		 */
+		public List<MainCorpus> getSelectedCorpus() {
+			return selectedCorpus;
+		}
+
+		/**
+		 * Gets the available corpus.
+		 *
+		 * @return the available corpus
+		 */
+		public List<MainCorpus> getAvailableCorpus() {
+			return availableCorpus;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			// parent.setLayout(new FormLayout());
+			Composite mainArea = new Composite(parent, SWT.NONE);
+			mainArea
+					.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+			// 4 columns
+			GridLayout layout = new GridLayout(4, false);
+			mainArea.setLayout(layout);
+
+			availableCorpusView = new org.eclipse.swt.widgets.List(mainArea,
+					SWT.BORDER | SWT.V_SCROLL);
+			GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+			availableCorpusView.setLayoutData(gridData);
+
+			Composite selectionButtons = new Composite(mainArea, SWT.NONE);
+			selectionButtons.setLayout(new GridLayout(1, false));
+			Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+			Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+			selectedCorpusView = new org.eclipse.swt.widgets.List(mainArea,
+					SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+			gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+			selectedCorpusView.setLayoutData(gridData);
+
+			Composite orderButtons = new Composite(mainArea, SWT.NONE);
+			orderButtons.setLayout(new GridLayout(1, false));
+			Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+			Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+			select.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int index = availableCorpusView.getSelectionIndex();
+
+					selectedCorpus.add(availableCorpus.get(index));
+					availableCorpus.remove(index);
+
+					reload();
+					availableCorpusView.setSelection(index);
+				}
+			});
+
+			unselect.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					if (selectedCorpus.size() > 1) {
+						int index = selectedCorpusView.getSelectionIndex();
+
+						availableCorpus.add(selectedCorpus.get(index));
+						selectedCorpus.remove(index);
+
+						reload();
+						selectedCorpusView.setSelection(index);
+					}
+				}
+			});
+
+			up.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int index = selectedCorpusView.getSelectionIndex();
+					if (index > 0) {
+						MainCorpus selectedC = selectedCorpus.get(index);
+						MainCorpus upperC = selectedCorpus.get(index - 1);
+
+						selectedCorpus.set(index, upperC);
+						selectedCorpus.set(index - 1, selectedC);
+
+						reload();
+						selectedCorpusView.setSelection(index - 1);
+					}
+				}
+			});
+
+			down.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int index = selectedCorpusView.getSelectionIndex();
+					if (index < selectedCorpus.size() - 1) {
+						MainCorpus selectedC = selectedCorpus.get(index);
+						MainCorpus bellowC = selectedCorpus.get(index + 1);
+
+						selectedCorpus.set(index, bellowC);
+						selectedCorpus.set(index + 1, selectedC);
+
+						reload();
+						selectedCorpusView.setSelection(index + 1);
+					}
+				}
+			});
+
+			availableCorpusView.addMouseListener(new MouseAdapter() {
+				@Override
+				public void mouseDoubleClick(MouseEvent e) {
+					int index = selectedCorpusView.getSelectionIndex();
+
+					selectedCorpus.add(availableCorpus.get(index));
+					availableCorpus.remove(index);
+
+					reload();
+					availableCorpusView.setSelection(index);
+				}
+			});
+
+			selectedCorpusView.addMouseListener(new MouseAdapter() {
+				@Override
+				public void mouseDoubleClick(MouseEvent e) {
+					if (selectedCorpus.size() > 1) {
+						int index = selectedCorpusView.getSelectionIndex();
+
+						availableCorpus.add(selectedCorpus.get(index));
+						selectedCorpus.remove(index);
+
+						reload();
+						selectedCorpusView.setSelection(index);
+					}
+				}
+			});
+
+			reload();
+			return mainArea;
+		}
+
+		/**
+		 * Reload.
+		 */
+		public void reload() {
+			System.out
+					.println("CorpusSelectionDialog.reload() => availableCorpus[" //$NON-NLS-1$
+							+ availableCorpus.size()
+							+ "] / selectedCorpus[" //$NON-NLS-1$
+							+ selectedCorpus.size() + "]"); //$NON-NLS-1$
+			availableCorpusView.removeAll();
+			for (MainCorpus corpus : availableCorpus) {
+				if (!corpus.getName().equals("id")) //$NON-NLS-1$
+					availableCorpusView.add(corpus.getName());
+			}
+			selectedCorpusView.removeAll();
+			for (MainCorpus corpus : selectedCorpus) {
+				if (!corpus.getName().equals("id")) //$NON-NLS-1$
+					selectedCorpusView.add(corpus.getName());
+			}
+
+			availableCorpusView.getParent().layout();
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		@Override
+		protected void okPressed() {
+			if (selectedCorpus.size() != 0)
+				super.okPressed();
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/parabrowser/CorpusSelection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/ObjectExplorer.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/ObjectExplorer.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/ObjectExplorer.java	(revision 324)
@@ -0,0 +1,445 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.objectexplorer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.core.results.ITXMResult;
+import org.txm.objects.TxmObject;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.editors.input.ObjectExplorerEditorInput;
+import org.txm.searchengine.cqp.corpus.Corpus;
+// TODO: Auto-generated Javadoc
+/**
+ * Editor to set/delete TXMObject attributes @ author mdecorde.
+ */
+public class ObjectExplorer extends EditorPart implements CustomizableEditor{
+
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.editors.ObjectExplorer"; //$NON-NLS-1$
+	
+	/** The txm object. */
+	TxmObject txmObject;
+
+	/** The parent. */
+	Composite parent;
+	
+	/** The objectviewer. */
+	TableViewer objectviewer;
+	
+	/** The viewer. */
+	TableViewer viewer;
+	
+	/** The columns name. */
+	List<String> columnsName;
+	
+	/** The source. */
+	private Object source;
+
+	/**
+	 * Instantiates a new object explorer.
+	 */
+	public ObjectExplorer() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor monitor) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		if (input instanceof ObjectExplorerEditorInput) {
+			setSite(site);
+			setInput(input);
+			ObjectExplorerEditorInput iinput = (ObjectExplorerEditorInput) input;
+			txmObject = iinput.getTxmObject();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isDirty()
+	 */
+	@Override
+	public boolean isDirty() {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+
+		this.parent = parent;
+		parent.setLayout(new GridLayout(2, true));
+		this.setPartName(NLS.bind(Messages.ObjectExplorer_0, txmObject.getName())); 
+
+		// headers
+		Button addcolumnObject = new Button(parent, SWT.PUSH);
+		addcolumnObject.setText(Messages.ObjectExplorer_3);
+		addcolumnObject.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				InputDialog dlg = new InputDialog(Display.getCurrent()
+						.getActiveShell(), Messages.ObjectExplorer_4,
+						Messages.ObjectExplorer_5, Messages.ObjectExplorer_7,
+						null);
+				if (dlg.open() == Window.OK) {
+					if (!dlg.getValue().matches("")) //$NON-NLS-1$
+					{
+						// System.out.println("add ok");
+						txmObject.setAttribute(dlg.getValue(),
+								Messages.ObjectExplorer_9);
+						/*
+						 * objectviewer.getTable().dispose(); objectviewer =
+						 * null; createObjectTableViewer();
+						 */
+						objectviewer.refresh();
+					}
+				}
+
+			}
+		});
+
+		Button rmvcolumnObject = new Button(parent, SWT.PUSH);
+		rmvcolumnObject.setText(Messages.ObjectExplorer_10);
+		rmvcolumnObject.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				InputDialog dlg = new InputDialog(Display.getCurrent()
+						.getActiveShell(), Messages.ObjectExplorer_10,
+						Messages.ObjectExplorer_12, "", null); //$NON-NLS-1$ 
+				if (dlg.open() == Window.OK) {
+					if (!dlg.getValue().matches("")) //$NON-NLS-1$
+					{
+						// System.out.println("rmv ok");
+						txmObject.removeProperty(dlg.getValue());
+						objectviewer.refresh();
+					}
+				}
+			}
+		});
+
+		// table of metadata of the TxmObject
+		createObjectTableViewer();
+
+		Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
+		GridData griddata = new GridData(GridData.FILL, GridData.FILL, true,
+				false);
+		griddata.horizontalSpan = 2;
+		separator.setLayoutData(griddata);
+
+		Button addcolumn = new Button(parent, SWT.PUSH);
+		addcolumn.setText(Messages.ObjectExplorer_15);
+		addcolumn.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				InputDialog dlg = new InputDialog(Display.getCurrent()
+						.getActiveShell(), Messages.ObjectExplorer_4,
+						Messages.ObjectExplorer_5, Messages.ObjectExplorer_7,
+						null);
+				if (dlg.open() == Window.OK) {
+					if (!dlg.getValue().matches("")) //$NON-NLS-1$
+					{
+						// System.out.println("add ok");
+						for (ITXMResult o : txmObject.getResults()) {
+							if (!((TxmObject) o).getMetadatas().keySet().contains(dlg.getValue()))
+								((TxmObject) o).setAttribute(dlg.getValue(),
+										Messages.ObjectExplorer_9);
+						}
+
+						viewer.getTable().dispose();
+						viewer = null;
+						createChildTableViewer();
+					}
+				}
+
+			}
+		});
+
+		Button rmvcolumn = new Button(parent, SWT.PUSH);
+		rmvcolumn.setText(Messages.ObjectExplorer_21);
+		rmvcolumn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				InputDialog dlg = new InputDialog(Display.getCurrent()
+						.getActiveShell(), Messages.ObjectExplorer_10,
+						Messages.ObjectExplorer_12, "", null); //$NON-NLS-1$ 
+				if (dlg.open() == Window.OK) {
+					if (!dlg.getValue().matches("")) //$NON-NLS-1$
+					{
+						// System.out.println("rmv ok");
+						for (ITXMResult o : txmObject.getResults()) {
+							((TxmObject) o).removeProperty(dlg.getValue());
+						}
+						int columnindex = columnsName.indexOf(dlg.getValue());
+						columnsName.remove(columnindex);
+						viewer.getTable().getColumns()[columnindex].dispose();
+						viewer.refresh();
+					}
+				}
+			}
+		});
+
+		createChildTableViewer();
+	}
+
+	/**
+	 * Creates the child table viewer.
+	 */
+	private void createChildTableViewer() {
+		// create editable table with shared props of its childs
+		viewer = new TableViewer(this.parent, SWT.MULTI | SWT.H_SCROLL
+				| SWT.V_SCROLL | SWT.FULL_SELECTION);
+		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
+		GridData griddata = new GridData(GridData.FILL, GridData.FILL, true,
+				true);
+		griddata.horizontalSpan = 2;
+		viewer.getTable().setLayoutData(griddata);
+
+		createChildColumns(viewer);
+		viewer.setContentProvider(new TxmObjectChildContentProvider());
+		viewer.setLabelProvider(new TxmObjectChildLabelProvider(columnsName));
+		viewer.setInput(txmObject.getResults());
+		parent.layout();
+	}
+
+	// This will create the columns for the table
+	/**
+	 * Creates the child columns.
+	 *
+	 * @param viewer the viewer
+	 */
+	private void createChildColumns(TableViewer viewer) {
+
+		if (txmObject.getResults().size() == 0)
+			return;
+
+		columnsName = new ArrayList<String>();
+		columnsName.add(Messages.ObjectExplorer_26);
+
+		TxmObject o = (TxmObject) txmObject.getResults().get(0);
+		for (String key : o.getMetadatas().keySet()) {
+			columnsName.add(key);
+			for (ITXMResult o2 : txmObject.getResults()) {
+				if (!((TxmObject) o2).getMetadatas().containsKey(key)) {
+					columnsName.remove(key);
+					break;
+				}
+			}
+		}
+
+		for (int i = 0; i < columnsName.size(); i++) {
+			TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
+			column.getColumn().setText(columnsName.get(i));
+			column.getColumn().setWidth(100);
+			column.getColumn().setResizable(true);
+			column.getColumn().setMoveable(true);
+			if (i > 0)
+				column.setEditingSupport(new TxmObjectChildrenCellEditor(
+						viewer, columnsName.get(i)));
+
+		}
+		Table table = viewer.getTable();
+		table.setHeaderVisible(true);
+		table.setLinesVisible(true);
+	}
+
+	/**
+	 * Creates the object table viewer.
+	 */
+	private void createObjectTableViewer() {
+		// create editable table with shared props of its childs
+		objectviewer = new TableViewer(this.parent, SWT.MULTI | SWT.H_SCROLL
+				| SWT.V_SCROLL | SWT.FULL_SELECTION);
+		objectviewer.getTable().addKeyListener(new TableKeyListener(objectviewer));
+		GridData griddata = new GridData(GridData.FILL, GridData.FILL, true,
+				true);
+		griddata.minimumHeight = 200;
+		griddata.horizontalSpan = 2;
+		objectviewer.getTable().setLayoutData(griddata);
+
+		createObjectColumns(objectviewer);
+		objectviewer
+				.setContentProvider(new TxmObjectPropertiesContentProvider());
+		objectviewer.setLabelProvider(new TxmObjectPropertiesLabelProvider());
+		objectviewer.setInput(txmObject);
+		parent.layout();
+	}
+
+	// This will create the columns for the table
+	/**
+	 * Creates the object columns.
+	 *
+	 * @param objectviewer the objectviewer
+	 */
+	private void createObjectColumns(TableViewer objectviewer) {
+
+		columnsName = new ArrayList<String>();
+		columnsName.add(Messages.ObjectExplorer_27);
+		columnsName.add(Messages.ObjectExplorer_2);
+
+		for (int i = 0; i < columnsName.size(); i++) {
+			TableViewerColumn column = new TableViewerColumn(objectviewer,
+					SWT.NONE);
+			column.getColumn().setText(columnsName.get(i));
+			column.getColumn().setWidth(100);
+			column.getColumn().setResizable(true);
+			column.getColumn().setMoveable(true);
+			if (i > 0)
+				column.setEditingSupport(new TxmObjectPropertiesCellEditor(
+						objectviewer, i));
+		}
+		Table table = objectviewer.getTable();
+		table.setHeaderVisible(true);
+		table.setLinesVisible(true);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 */
+	@Override
+	public void setName(String name) {
+		this.setPartName(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 */
+	@Override
+	public void setIcon(Image image) {
+		this.setTitleImage(image);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 */
+	@Override
+	public void setSource(Object source)
+	{
+		this.source = source;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
+	 */
+	@Override
+	public Object getSource() {
+		return source;
+	}
+	
+	@Override
+	public Object toConcordance() { return null;}
+	@Override
+	public Object toIndex() { return null;}
+	@Override
+	public Object toProgression() { return null;}
+	
+	@Override
+	public boolean usingCorpus(Corpus corpus) {
+		return false;
+	}
+
+	@Override
+	public boolean updateCorpus(Corpus corpus) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/ObjectExplorer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesLabelProvider.java	(revision 324)
@@ -0,0 +1,71 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.objectexplorer;
+
+import java.util.Map.Entry;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.txm.objects.Property;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TxmObjectPropertiesLabelProvider.
+ */
+public class TxmObjectPropertiesLabelProvider extends LabelProvider implements
+		ITableLabelProvider {
+
+	/**
+	 * Instantiates a new txm object properties label provider.
+	 */
+	TxmObjectPropertiesLabelProvider() {
+		super();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		Entry<String, Property> object = (Entry<String, Property>) element;
+		if (columnIndex == 0)// key
+			return object.getKey().toString();
+		else
+			return object.getValue().getValue().toString();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildContentProvider.java	(revision 324)
@@ -0,0 +1,68 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.objectexplorer;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.txm.objects.*;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TxmObjectChildContentProvider.
+ */
+public class TxmObjectChildContentProvider implements
+		IStructuredContentProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+	 */
+	@Override
+	public Object[] getElements(Object inputElement) {
+		@SuppressWarnings("unchecked")
+		List<TxmObject> objects = (List<TxmObject>) inputElement;
+		return objects.toArray();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildLabelProvider.java	(revision 324)
@@ -0,0 +1,76 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.objectexplorer;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.txm.objects.TxmObject;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TxmObjectChildLabelProvider.
+ */
+public class TxmObjectChildLabelProvider extends LabelProvider implements
+		ITableLabelProvider {
+
+	/** The titles. */
+	List<String> titles;
+
+	/**
+	 * Instantiates a new txm object child label provider.
+	 *
+	 * @param titles the titles
+	 */
+	TxmObjectChildLabelProvider(List<String> titles) {
+		super();
+		this.titles = titles;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+	 */
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		TxmObject object = (TxmObject) element;
+		if (columnIndex > 0)
+			return object.getAttribute(titles.get(columnIndex)).toString();
+		else
+			return object.getName();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>TXMObject properties viewer (for now)</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildrenCellEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildrenCellEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildrenCellEditor.java	(revision 324)
@@ -0,0 +1,98 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.objectexplorer;
+
+import java.io.Serializable;
+
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.txm.objects.TxmObject;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TxmObjectChildrenCellEditor.
+ */
+public class TxmObjectChildrenCellEditor extends EditingSupport {
+	
+	/** The editor. */
+	private CellEditor editor;
+	
+	/** The column name. */
+	private String columnName;
+
+	/**
+	 * Instantiates a new txm object children cell editor.
+	 *
+	 * @param viewer the viewer
+	 * @param columnName the column name
+	 */
+	public TxmObjectChildrenCellEditor(ColumnViewer viewer, String columnName) {
+		super(viewer);
+		this.columnName = columnName;
+		editor = new TextCellEditor(((TableViewer) viewer).getTable());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#canEdit(java.lang.Object)
+	 */
+	@Override
+	protected boolean canEdit(Object element) {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#getCellEditor(java.lang.Object)
+	 */
+	@Override
+	protected CellEditor getCellEditor(Object element) {
+		return editor;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#getValue(java.lang.Object)
+	 */
+	@Override
+	protected Object getValue(Object element) {
+		TxmObject object = (TxmObject) element;
+		return object.getAttribute(columnName);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#setValue(java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	protected void setValue(Object element, Object value) {
+		TxmObject object = (TxmObject) element;
+		object.setAttribute(columnName, (Serializable) value);
+		getViewer().update(element, null);
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectChildrenCellEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesContentProvider.java	(revision 324)
@@ -0,0 +1,66 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.objectexplorer;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.txm.objects.*;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TxmObjectPropertiesContentProvider.
+ */
+public class TxmObjectPropertiesContentProvider implements
+		IStructuredContentProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+	 */
+	@Override
+	public Object[] getElements(Object inputElement) {
+		@SuppressWarnings("unchecked")
+		TxmObject object = (TxmObject) inputElement;
+		return object.getMetadatas().entrySet().toArray();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesCellEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesCellEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesCellEditor.java	(revision 324)
@@ -0,0 +1,101 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.objectexplorer;
+
+import java.io.Serializable;
+import java.util.Map.Entry;
+
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.txm.objects.Property;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TxmObjectPropertiesCellEditor.
+ */
+public class TxmObjectPropertiesCellEditor extends EditingSupport {
+	
+	/** The editor. */
+	private CellEditor editor;
+	
+	/** The column index. */
+	private int columnIndex;
+
+	/**
+	 * Instantiates a new txm object properties cell editor.
+	 *
+	 * @param viewer the viewer
+	 * @param columnIndex the column index
+	 */
+	public TxmObjectPropertiesCellEditor(ColumnViewer viewer, int columnIndex) {
+		super(viewer);
+		this.columnIndex = columnIndex;
+		editor = new TextCellEditor(((TableViewer) viewer).getTable());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#canEdit(java.lang.Object)
+	 */
+	@Override
+	protected boolean canEdit(Object element) {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#getCellEditor(java.lang.Object)
+	 */
+	@Override
+	protected CellEditor getCellEditor(Object element) {
+		return editor;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#getValue(java.lang.Object)
+	 */
+	@Override
+	protected Object getValue(Object element) {
+		Entry<String, Serializable> object = (Entry<String, Serializable>) element;
+		if (columnIndex == 0)
+			return object.getKey();
+		else
+			return ((Property) object.getValue()).getValue();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#setValue(java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	protected void setValue(Object element, Object value) {
+		Entry<String, Serializable> object = (Entry<String, Serializable>) element;
+		((Property) object.getValue()).setValue((Serializable) value);
+		getViewer().update(element, null);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/objectexplorer/TxmObjectPropertiesCellEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/adaptableDataStructure/TablableVector.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/adaptableDataStructure/TablableVector.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/adaptableDataStructure/TablableVector.java	(revision 324)
@@ -0,0 +1,161 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.adaptableDataStructure;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.ui.IPersistableElement;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.Tablable;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TablableVector.
+ */
+public class TablableVector implements Tablable {
+
+	/** The column titles. */
+	String[] columnTitles;
+	
+	/** The column types. */
+	String[] columnTypes;
+
+	/**
+	 * Instantiates a new tablable vector.
+	 *
+	 * @param freq the freq
+	 * @param forms the forms
+	 * @param columnTitles the column titles
+	 * @param columnTypes the column types
+	 */
+	public TablableVector(int[] freq, String[] forms, String[] columnTitles,
+			String[] columnTypes) {
+		this.columnTitles = columnTitles;
+		this.columnTypes = columnTypes;
+		if (columnTitles.length != columnTypes.length)
+			throw new IllegalArgumentException(Messages.TablableVector_0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getColumnTitles()
+	 */
+	@Override
+	public String[] getColumnTitles() {
+		return columnTitles;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getContentProvider()
+	 */
+	@Override
+	public IStructuredContentProvider getContentProvider() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getInput()
+	 */
+	@Override
+	public Object getInput() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getLabelProvider()
+	 */
+	@Override
+	public LabelProvider getLabelProvider() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class adapter) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getColumnTypes()
+	 */
+	@Override
+	public String[] getColumnTypes() {
+		return columnTypes;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/adaptableDataStructure/TablableVector.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/adaptableDataStructure/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/adaptableDataStructure/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/adaptableDataStructure/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Generic editor for tables</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/adaptableDataStructure/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/IEditionEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/IEditionEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/IEditionEditor.java	(revision 324)
@@ -0,0 +1,9 @@
+package org.txm.rcp.editors;
+
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+public interface IEditionEditor {
+	public String getTextSelection();
+
+	public Corpus getCorpus();
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/IEditionEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMBrowser.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMBrowser.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMBrowser.java	(revision 324)
@@ -0,0 +1,721 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors;
+
+import java.util.List;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.browser.ProgressEvent;
+import org.eclipse.swt.browser.ProgressListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.internal.browser.BrowserViewer;
+import org.eclipse.ui.internal.browser.WebBrowserEditor;
+import org.txm.objects.Edition;
+import org.txm.objects.Page;
+import org.txm.objects.Text;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+/**
+ * Call the internal browser of RCP specialized for TXM editions. 
+ * 
+ * A Text can be set then the user can browse pages and others texts of the same corpus 
+ * 
+ * @author mdecorde.
+ */
+@SuppressWarnings("restriction") //$NON-NLS-1$
+public class TXMBrowser extends WebBrowserEditor implements CustomizableEditor {
+	
+	/** The Constant ID. */
+	public final static String ID = "org.txm.rcp.editors.TXMBrowser"; //$NON-NLS-1$
+	private ProgressListener progresslistener;
+	private List<String> wordids;
+	private List<String> lineids;
+	
+	/** The edition. */
+	Edition edition;
+	
+	/** The current page. */
+	Page currentPage;
+	
+	/** The page_label. */
+	Label page_label;
+	
+	/** The source. */
+	private Object source;
+	private Corpus corpus;
+
+	/**
+	 * Instantiates a new txm browser.
+	 */
+	public TXMBrowser() {
+
+	}
+
+	/**
+	 * Gets the browser.
+	 *
+	 * @return the browser
+	 */
+	public Browser getBrowser() {
+		BrowserViewer webbrowser = this.webBrowser;
+		return webbrowser.getBrowser();
+	}
+	
+	/**
+	 * 
+	 * @param wordids2 all the words to highlight
+	 * @param lineids2 the words to highlight better and to scroll to
+	 */
+	public void setWordsIds(List<String> wordids2, List<String> lineids2) {
+		this.wordids = wordids2;
+		this.lineids = lineids2;
+		if (progresslistener != null)
+			this.getBrowser().removeProgressListener(progresslistener);
+		progresslistener = new ProgressListener() {
+			@Override
+			public void changed(ProgressEvent event) {
+			}
+
+			@Override
+			public void completed(ProgressEvent event) {
+				Page currentpage = getCurrentPage();
+				//System.out.println("Highlight ! "+currentpage.getEdition().getText()+" wordids ="+wordids);
+			
+				for (String wordid : wordids) {
+					String highlightscript = "try { var elt = document.getElementById(\"" + wordid + "\");" + //$NON-NLS-1$ //$NON-NLS-2$
+					"elt.style.backgroundColor=\"#F9D0D0\";" //$NON-NLS-1$
+					+ 
+					"elt.style.paddingLeft=\"3px\";" + //$NON-NLS-1$
+					"elt.style.paddingRight=\"3px\";" + //$NON-NLS-1$
+					"elt.style.paddingTop=\"1px\";" + //$NON-NLS-1$
+					"elt.style.paddingBottom=\"1px\";" + //$NON-NLS-1$
+					"} catch (e) { };"; //$NON-NLS-1$
+
+					getBrowser().execute(highlightscript);
+				}
+
+				for (String wordid : lineids) {
+					String highlightscript = "try { var elt = document.getElementById(\"" + wordid + "\");" + //$NON-NLS-1$ //$NON-NLS-2$
+					"elt.style.backgroundColor=\"#F9A0A0\";" + //$NON-NLS-1$
+					"elt.style.paddingLeft=\"3px\";" + //$NON-NLS-1$
+					"elt.style.paddingRight=\"3px\";" + //$NON-NLS-1$
+					"elt.style.paddingTop=\"1px\";" + //$NON-NLS-1$
+					"elt.style.paddingBottom=\"1px\";" + //$NON-NLS-1$
+					"} catch (e) { };"; //$NON-NLS-1$
+
+					getBrowser().execute(highlightscript);
+				}
+				if(lineids.size() > 0)
+				{
+					String script = "try { document.getElementById(\"" + lineids.get(0) + "\").scrollIntoView(true); } catch (e) { };"; //$NON-NLS-1$ //$NON-NLS-2$
+					getBrowser().execute(script);
+				}
+			}
+		};
+		getBrowser().addProgressListener(progresslistener);
+	}
+
+	/**
+	 * Sets the edition.
+	 *
+	 * @param edition the new edition
+	 */
+	public void setEdition(Edition edition) {
+		this.edition = edition;
+	}
+
+	/**
+	 * Make page label.
+	 *
+	 * @return the string
+	 */
+	public String makePageLabel() {
+		return currentPage.getName()
+				+ " / " + currentPage.getEdition().getNumPages(); //$NON-NLS-1$
+	}
+
+	/**
+	 * Show page.
+	 *
+	 * @param page the page
+	 */
+	public void showPage(Page page) {
+		edition = page.getEdition();
+		currentPage = page;
+		this.webBrowser.setURL(currentPage.toURL());
+		page_label.setText(makePageLabel());
+	}
+
+	/**
+	 * First text.
+	 */
+	public void firstText() {
+		Text current = this.currentPage.getEdition().getText();
+		org.txm.objects.Corpus corpus = current.getCorpus();
+		Text firstText = corpus.getFirstText();
+
+		if (firstText != null) {
+			String editionName = corpus.getDefaultEdition();
+			currentPage = firstText.getEdition(editionName).getFirstPage(); 
+			if (currentPage == null) {
+				StatusLine.setMessage(Messages.TxmBrowser_11);
+				return;
+			}
+			this.setEdition(firstText.getEdition(editionName)); 
+			this.webBrowser.setURL(currentPage.toURL());
+			page_label.setText(makePageLabel());
+		}
+	}
+
+	/**
+	 * Last text.
+	 */
+	public void lastText() {
+		Text current = this.currentPage.getEdition().getText();
+		org.txm.objects.Corpus b = current.getCorpus();
+		Text lastText = b.getLastText();
+
+		if (lastText != null) {
+			currentPage = lastText.getEdition(b.getDefaultEdition()).getFirstPage(); 
+			if (currentPage == null) {
+				StatusLine.setMessage(Messages.TxmBrowser_12);
+				return;
+			}
+			this.setEdition(lastText.getEdition(b.getDefaultEdition())); 
+			this.webBrowser.setURL(currentPage.toURL());
+			page_label.setText(makePageLabel());
+		}
+	}
+	
+	/**
+	 * First page.
+	 */
+	public void firstPage() {
+		// System.out.println(Messages.TxmBrowser_1+currentPage);
+		currentPage = edition.getFirstPage();
+		this.webBrowser.setURL(currentPage.toURL());
+		page_label.setText(makePageLabel());
+	}
+
+	/**
+	 * Last page.
+	 */
+	public void lastPage() {
+		// System.out.println(Messages.TxmBrowser_2+currentPage);
+
+		if (currentPage != null && currentPage.getFile().equals(edition.getLastPage()))
+			return;
+		currentPage = edition.getLastPage();
+		this.webBrowser.setURL(currentPage.toURL());
+		page_label.setText(makePageLabel());
+	}
+
+	/**
+	 * Previous page.
+	 */
+	public void previousPage() {
+		// System.out.println(Messages.TxmBrowser_3+currentPage);
+		if (currentPage != null) {
+			Page previous = edition.getPreviousPage(currentPage);
+			if (previous == currentPage) {
+				previousText(true);
+			} else {
+				currentPage = previous; 
+				this.webBrowser.setURL(currentPage.toURL());
+			}
+		} else
+			firstPage();
+		page_label.setText(makePageLabel());
+	}
+
+	/**
+	 * Next page.
+	 */
+	public void nextPage() {
+		// System.out.println(Messages.TxmBrowser_4+currentPage);
+		if (currentPage != null) {
+			Page next = edition.getNextPage(currentPage);
+			if (currentPage == next) {
+				nextText();
+			} else {
+				currentPage = next;
+				this.webBrowser.setURL(currentPage.toURL());
+			}
+
+		} else
+			firstPage();
+		page_label.setText(makePageLabel());
+	}
+
+	/**
+	 * Previous text.
+	 * @param fromNextText 
+	 */
+	public void previousText(boolean fromNextText) {
+
+		Text current = this.currentPage.getEdition().getText();
+		org.txm.objects.Corpus corpus = current.getCorpus();
+		Text previousText = corpus.getPreviousText(current);
+
+		if (previousText != null) {
+			String editionName = corpus.getDefaultEdition();
+			if (fromNextText) {
+				currentPage = previousText.getEdition(editionName).getLastPage();	
+			} else {
+				currentPage = previousText.getEdition(editionName).getFirstPage();
+			}
+			if (currentPage == null) {
+				StatusLine.setMessage(Messages.TxmBrowser_11);
+				return;
+			}
+			this.setEdition(previousText.getEdition(editionName)); 
+			this.webBrowser.setURL(currentPage.toURL());
+			page_label.setText(makePageLabel());
+		}
+		// System.out.println("Previous texts "+previousText);
+	}
+
+	/**
+	 * Next text.
+	 */
+	public void nextText() {
+		Text current = this.currentPage.getEdition().getText();
+		org.txm.objects.Corpus b = current.getCorpus();
+		Text nextText = b.getNextText(current);
+
+		if (nextText != null) {
+			currentPage = nextText.getEdition(b.getDefaultEdition()).getFirstPage(); 
+			if (currentPage == null) {
+				StatusLine.setMessage(Messages.TxmBrowser_12);
+				return;
+			}
+			this.setEdition(nextText.getEdition(b.getDefaultEdition())); 
+			this.webBrowser.setURL(currentPage.toURL());
+			page_label.setText(makePageLabel());
+		}
+		// System.out.println("Next texts "+nextText);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.browser.WebBrowserEditor#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		try {
+			super.createPartControl(parent);
+		} catch (Exception e) {
+			System.err.println(Messages.TxmBrowser_10);
+			return;
+		}
+		
+		RowLayout navigLayout = new RowLayout(SWT.HORIZONTAL);
+		navigLayout.justify = true;
+		Composite panneau = new Composite(parent, SWT.NONE);
+		panneau.setLayout(navigLayout);
+
+		RowLayout subLayout = new RowLayout(SWT.HORIZONTAL);
+		subLayout.pack = true;
+		subLayout.center = true;
+		subLayout.marginBottom = subLayout.marginHeight = 0;
+		subLayout.marginTop = subLayout.marginWidth = 0;
+		Composite subPanneau = new Composite(panneau, SWT.NONE);
+		subPanneau.setLayout(subLayout);
+		subPanneau.setLayoutData(new RowData(450, 22));
+
+		Button firstText = new Button(subPanneau, SWT.FLAT);
+		Button previousText = new Button(subPanneau, SWT.FLAT);
+		Button first = new Button(subPanneau, SWT.FLAT|SWT.PUSH);
+		Button previous = new Button(subPanneau, SWT.FLAT|SWT.PUSH);
+		page_label = new Label(subPanneau, SWT.NONE);
+		Button next = new Button(subPanneau, SWT.FLAT|SWT.PUSH);
+		Button last = new Button(subPanneau, SWT.FLAT|SWT.PUSH);
+		Button nextText = new Button(subPanneau, SWT.FLAT|SWT.PUSH);
+		Button lastText = new Button(subPanneau, SWT.FLAT|SWT.PUSH);
+
+		// set sizes
+		page_label.setLayoutData(new RowData(50, 20));
+		firstText.setLayoutData(new RowData(30, 20));
+		first.setLayoutData(new RowData(30, 20));
+		previous.setLayoutData(new RowData(30, 20));
+		next.setLayoutData(new RowData(30, 20));
+		last.setLayoutData(new RowData(30, 20));
+		nextText.setLayoutData(new RowData(30, 20));
+		previousText.setLayoutData(new RowData(30, 20));
+		lastText.setLayoutData(new RowData(30, 20));
+
+		
+		// set labels
+		page_label.setText(""); //$NON-NLS-1$
+		firstText.setImage(IImageKeys.getImage(IImageKeys.CTRLREWINDSTART));
+		firstText.setToolTipText("|<<");
+		previousText.setImage(IImageKeys.getImage(IImageKeys.CTRLREWIND));
+		previousText.setToolTipText(Messages.TxmBrowser_9);
+		first.setImage(IImageKeys.getImage(IImageKeys.CTRLSTART)); 
+		first.setToolTipText(Messages.TxmBrowser_0);
+		previous.setImage(IImageKeys.getImage(IImageKeys.CTRLREVERSE));
+		previous.setToolTipText(Messages.TxmBrowser_5);
+		next.setImage(IImageKeys.getImage(IImageKeys.CTRLPLAY));
+		next.setToolTipText(Messages.TxmBrowser_6);
+		last.setImage(IImageKeys.getImage(IImageKeys.CTRLEND));
+		last.setToolTipText(Messages.TxmBrowser_7);
+		nextText.setImage(IImageKeys.getImage(IImageKeys.CTRLFASTFORWARD));
+		nextText.setToolTipText(Messages.TxmBrowser_8);
+		lastText.setImage(IImageKeys.getImage(IImageKeys.CTRLFASTFORWARDEND));
+		lastText.setToolTipText(">>|");
+		
+
+		// set listeners
+		first.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				firstPage();
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				firstPage();
+			}
+		});
+		previous.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				previousPage();
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				previousPage();
+			}
+		});
+		next.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				nextPage();
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				nextPage();
+			}
+		});
+		last.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				lastPage();
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				lastPage();
+			}
+		});
+		nextText.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				nextText();
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				nextText();
+			}
+		});
+		// set listeners
+		previousText.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				previousText(false);
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				previousText(false);
+			}
+		});
+		lastText.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				lastText();
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				lastText();
+			}
+		});
+		// set listeners
+		firstText.addSelectionListener(new SelectionListener() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				firstText();
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				firstText();
+			}
+		});
+
+		subPanneau.pack();
+		panneau.pack();
+
+		FormLayout parentLayout = new FormLayout();
+
+		FormData datatop = new FormData();
+		datatop.top = new FormAttachment(0, 0);
+		datatop.left = new FormAttachment(0, 0);
+		datatop.right = new FormAttachment(100, 0);
+		datatop.bottom = new FormAttachment(panneau, 0);
+		webBrowser.setLayoutData(datatop);
+
+		FormData databottom = new FormData(200, 30);
+		databottom.bottom = new FormAttachment(100, 0);
+		databottom.left = new FormAttachment(30, -100);
+		databottom.right = new FormAttachment(80, 100);
+		panneau.setLayoutData(databottom);
+
+		parent.setLayout(parentLayout);
+		parent.pack();
+		
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(getBrowser());
+
+		// Set the MenuManager
+		getBrowser().setMenu(menu);
+		ISelectionProvider selProvider = new ISelectionProvider() {
+			
+			@Override
+			public void setSelection(ISelection selection) { }
+			
+			@Override
+			public void removeSelectionChangedListener(ISelectionChangedListener listener) { }
+			
+			@Override
+			public ISelection getSelection() {
+				ITextSelection sel = new ITextSelection() {
+					
+					@Override
+					public boolean isEmpty() {
+						return false;
+					}
+					
+					@Override
+					public String getText() {
+						return getTextSelection();
+					}
+					
+					@Override
+					public int getStartLine() {
+						return 0;
+					}
+					
+					@Override
+					public int getOffset() {
+						return 0;
+					}
+					
+					@Override
+					public int getLength() {
+						return 0;
+					}
+					
+					@Override
+					public int getEndLine() {
+						return 0;
+					}
+				};
+				return sel;
+			}
+			
+			@Override
+			public void addSelectionChangedListener(ISelectionChangedListener listener) { }
+		};
+		getSite().registerContextMenu(menuManager, selProvider);
+		getSite().setSelectionProvider(selProvider);
+		
+		//System.out.println("Browser menu: "+getBrowser().getMenu());
+	}
+	
+	static String SCRIPT01 = "var html = \"\";"+
+			"if (typeof window.getSelection != \"undefined\") {"+ // modern Web browsers
+			    "var sel = window.getSelection();"+
+			    "if (sel.rangeCount) {"+
+			        "var container = document.createElement(\"div\");"+
+			        "for (var i = 0, len = sel.rangeCount; i < len; ++i) {"+
+			            "container.appendChild(sel.getRangeAt(i).cloneContents());"+
+			        "}"+
+			        "html = container.innerHTML;"+
+			    "}"+
+			"} else if (typeof document.selection != \"undefined\") {"+ // for IE < 11
+			    "if (document.selection.type == \"Text\") {"+
+			        "html = document.selection.createRange().htmlText;"+
+			    "}" +
+			"}" +
+			"return html";
+	
+	// return the span@id of the current selection
+	static String SCRIPT02 = "function getChildren(node) {\n"
+			+ "if (node.children != \"undefined\")\n"
+			+ "	return node.children;\n"
+			+ "else \n"
+			+ "return node.ChildNodes;\n"
+			+ "}\n"
+			+ "function findSpans(c, a) {\n"+
+			"    for (var i = 0 ; i < c.length ; i++) {\n"+
+			"        if (c.item(i).tagName == \"SPAN\") {\n"+
+			"            var id = c.item(i).getAttribute(\"id\")\n"+
+			"            if (id.indexOf(\"w_\") == 0)\n"+
+			"                a.push(id);\n"+
+			"        } else if (c.item(i).nodeType == 1) {\n"+
+			"            findSpans(c.item(i).children, a);\n"+
+			"        }\n"+
+			"    }\n"+
+			"}\n"+
+			"    var all = [];"+
+			"    var sel = window.getSelection();"+
+			"    if (sel.rangeCount == 0){"+
+			"        return all;"+
+			"    }"+
+			"\n"+
+			"    var range = sel.getRangeAt(0);"+
+			"    var frag = range.cloneContents();alert(frag);alert(frag.children);"+
+			"    findSpans(frag.children, all);"+
+			"    return all;";
+	
+	public String getTextSelectionDOM() {
+		return ((String) getBrowser().evaluate(SCRIPT01));
+	}
+	
+	public Object getWordIDsSelection() {
+		System.out.println("WORDS IDS "+getBrowser().evaluate(SCRIPT02));
+		return getBrowser().evaluate(SCRIPT02);
+	}
+	
+	public String getTextSelection() {
+		System.out.println("DOM="+getTextSelectionDOM());
+		String rez =  getTextSelectionDOM().replaceAll("<[^>]+>", "");
+		System.out.println("STR="+rez);
+		return rez;
+	} 
+
+	/**
+	 * Gets the current page.
+	 *
+	 * @return the current page
+	 */
+	public Page getCurrentPage() {
+		return currentPage;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 */
+	@Override
+	public void setSource(Object source) {
+		this.source = source;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
+	 */
+	@Override
+	public Object getSource() {
+		return source;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 */
+	@Override
+	public void setName(String name) {
+		this.setPartName(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 */
+	@Override
+	public void setIcon(Image image) {
+		this.setTitleImage(image);
+	}
+	
+	@Override
+	public Object toConcordance() { return null;}
+	@Override
+	public Object toIndex() { return null;}
+	@Override
+	public Object toProgression() { return null;}
+
+	public Corpus getCorpus() {
+		return corpus;
+	}
+	
+	public void setCorpus(Corpus corpus) {
+		this.corpus = corpus;
+	}
+	
+	@Override
+	public boolean usingCorpus(Corpus corpus) {
+		return false;
+	}
+
+	@Override
+	public boolean updateCorpus(Corpus corpus) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMBrowser.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportFormEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportFormEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportFormEditor.java	(revision 324)
@@ -0,0 +1,295 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.imports;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.ExecuteImportScript;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.editors.input.ImportFormEditorInput;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * display&edit the import parameters 
+ * @author mdecorde.
+ */
+public class ImportFormEditor extends FormEditor implements CustomizableEditor{
+	
+	/** The Constant ID. */
+	public static final String ID = "org.txm.rcp.editors.imports.ImportFormEditor"; //$NON-NLS-1$
+
+	/** The groovyscript. */
+	private File groovyscript;
+
+	/** The toolkit. */
+	private FormToolkit toolkit;
+
+	/** The form. */
+	private ScrolledForm form;
+
+	/** The main. */
+	private CorpusPage main;
+
+	/** The meta. */
+	MetadataPage meta;
+	
+	/**
+	 * Instantiates a new import form editor.
+	 */
+	public ImportFormEditor() {
+		super();
+	}
+
+	/**
+	 * Do save.
+	 *
+	 * @param arg0 the arg0
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor arg0) {
+
+	}
+	
+	/**
+	 * Remove a page
+	 * @param page
+	 */
+	public void removePage(FormPage page)
+	{
+		int idx = pages.indexOf(page);
+		this.removePage(idx);
+	}
+
+	/**
+	 * Do save as.
+	 *
+	 * @see org.eclipse.lyon gournd zeroui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+
+	}
+
+	/**
+	 * Inits the.
+	 *
+	 * @param site the site
+	 * @param input the input
+	 * @throws PartInitException the part init exception
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite,
+	 * org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+	throws PartInitException {
+		setSite(site);
+		setInput(input);
+		
+		String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+		String filepath = "scripts/import/" + ((ImportFormEditorInput) input).getGroovyFile().getName(); //$NON-NLS-1$ 
+		this.setGroovyscript(new File(txmhome, filepath));
+		
+		ExecuteImportScript.getImportScriptFromToolboxPlugin(getGroovyscript()); // always update if script from Toolbox is more recent
+		
+		if (!getGroovyscript().exists()) // just a warning message
+			System.out.println(NLS.bind(Messages.ImportFormEditor_0, getGroovyscript()));
+	}
+
+	/**
+	 * Checks if is dirty.
+	 *
+	 * @return true, if is dirty
+	 * @see org.eclipse.ui.part.EditorPart#isDirty()
+	 */
+	@Override
+	public boolean isDirty() {
+		return false;
+	}
+
+	/**
+	 * Checks if is save as allowed.
+	 *
+	 * @return true, if is save as allowed
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+
+	/**
+	 * Creates the context menu.
+	 *
+	 * @param tableViewer the table viewer
+	 */
+	private void createContextMenu(TableViewer tableViewer) {
+
+		MenuManager menuManager = new MenuManager();
+		Menu menu = menuManager.createContextMenu(tableViewer.getTable());
+
+		// Set the MenuManager
+		tableViewer.getTable().setMenu(menu);
+		getSite().registerContextMenu(menuManager, tableViewer);
+		// Make the selection available
+		getSite().setSelectionProvider(tableViewer);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.MultiPageEditorPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getPartName() {
+		String name = Messages.bind(Messages.ImportFormEditor_1,ImportModuleCustomization.getName(groovyscript.getName()));
+		return name;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 */
+	@Override
+	public void setName(String name) {
+		this.setPartName(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 */
+	@Override
+	public void setIcon(Image image) {
+		this.setTitleImage(image);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 */
+	@Override
+	public void setSource(Object source)
+	{
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
+	 */
+	@Override
+	public Object getSource() {
+		return getGroovyscript();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
+	 */
+	@Override
+	protected void addPages() {
+		main = new CorpusPage(this);
+		meta = new MetadataPage(this, main);
+		
+		try {
+			this.addPage(main);
+			this.addPage(meta);
+		} catch (PartInitException e) {
+			// TODO Auto-generated catch block
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+	}
+
+	public CorpusPage getMainPage() {
+		return main;
+	}
+	
+	public MetadataPage getMetaPage() {
+		return meta;
+	}
+	
+	/**
+	 * Gets the groovy script.
+	 *
+	 * @return the groovy script
+	 */
+	public File getGroovyScript() {
+		return getGroovyscript();
+	}
+
+	/**
+	 * @return the groovyscript
+	 */
+	public File getGroovyscript() {
+		return groovyscript;
+	}
+
+	/**
+	 * @param groovyscript the groovyscript to set
+	 */
+	public void setGroovyscript(File groovyscript) {
+		this.groovyscript = groovyscript;
+	}
+	
+	@Override
+	public Object toConcordance() { return null;}
+	@Override
+	public Object toIndex() { return null;}
+	@Override
+	public Object toProgression() { return null;}
+	
+	@Override
+	public boolean usingCorpus(Corpus corpus) {
+		return false;
+	}
+
+	@Override
+	public boolean updateCorpus(Corpus corpus) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportFormEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataCellEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataCellEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataCellEditor.java	(revision 324)
@@ -0,0 +1,115 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.imports;
+
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.txm.metadatas.Metadata;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class MetadataCellEditor.
+ */
+public class MetadataCellEditor extends EditingSupport {
+	
+	/** The editor. */
+	private CellEditor editor;
+	
+	/** The column index. */
+	private int columnIndex;
+
+	/**
+	 * Instantiates a new metadata cell editor.
+	 *
+	 * @param viewer the viewer
+	 * @param columnIndex the column index
+	 */
+	public MetadataCellEditor(ColumnViewer viewer, int columnIndex) {
+		super(viewer);
+		this.columnIndex = columnIndex;
+		editor = new TextCellEditor(((TableViewer) viewer).getTable());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#canEdit(java.lang.Object)
+	 */
+	@Override
+	protected boolean canEdit(Object element) {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#getCellEditor(java.lang.Object)
+	 */
+	@Override
+	protected CellEditor getCellEditor(Object element) {
+		return editor;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#getValue(java.lang.Object)
+	 */
+	@Override
+	protected Object getValue(Object element) {
+		Metadata object = (Metadata) element;
+		switch(columnIndex)
+		{
+		case 0:
+			return object.id;
+		case 1:
+			return object.longname;
+		case 2:
+			return object.type;
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.EditingSupport#setValue(java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	protected void setValue(Object element, Object value) {
+		Metadata object = (Metadata) element;
+		switch(columnIndex)
+		{
+		case 0:
+			object.id = value.toString();
+			break;
+		case 1:
+			object.longname = value.toString();
+			break;
+		case 2:
+			object.type = value.toString();
+			break;
+		}
+		getViewer().update(element, null);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataCellEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EncodingSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EncodingSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EncodingSection.java	(revision 324)
@@ -0,0 +1,143 @@
+package org.txm.rcp.editors.imports.sections;
+
+import java.nio.charset.Charset;
+import java.util.SortedMap;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Messages;
+
+public class EncodingSection extends ImportEditorSection {
+	
+	private static final int SECTION_SIZE = 1;
+	Composite sectionClient;
+	Button btnGuessEncoding;
+	Button btnSelectEncoding;
+	Combo encodingCombo;
+	
+	public EncodingSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
+		super(toolkit2, form2, parent, style);
+		
+		this.section.setText(Messages.MainPage_23);
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		layout.numColumns = 1;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		//filesection.setDescription("Select how to find source files");
+		sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.numColumns = 2;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+
+		btnGuessEncoding = toolkit.createButton(sectionClient, "", SWT.RADIO); //$NON-NLS-1$
+		TableWrapData td = getButtonLayoutData();
+		btnGuessEncoding.setLayoutData(td);
+		btnGuessEncoding.setText(Messages.ImportDialog_16);
+		toolkit.createLabel(sectionClient, ""); //$NON-NLS-1$
+
+		btnSelectEncoding = toolkit.createButton(sectionClient, "", SWT.RADIO); //$NON-NLS-1$
+		btnSelectEncoding.setLayoutData(getButtonLayoutData());
+		btnSelectEncoding.setText(Messages.ImportDialog_22);
+
+		encodingCombo = new Combo(sectionClient, SWT.BORDER);
+		TableWrapData gdata = getTextGridData();
+		encodingCombo.setLayoutData(gdata);
+		encodingCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				btnSelectEncoding.setSelection(true);
+				btnGuessEncoding.setSelection(false);
+			}
+		});
+		encodingCombo.removeAll();
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		if (this.section.isDisposed()) return;
+		if (params == null) return;
+		//fill combo and select default encoding
+
+		String dencoding = params.getCorpusElement().getAttribute("encoding"); //$NON-NLS-1$
+		String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
+		if ("??".equals(dencoding)) { //$NON-NLS-1$
+			btnSelectEncoding.setSelection(false);
+			btnGuessEncoding.setSelection(true);
+		} else if (dencoding == null) {
+			btnSelectEncoding.setSelection(true);
+		} else {
+			btnSelectEncoding.setSelection(true);
+			defaultEncoding = dencoding;
+		}
+
+		SortedMap<String, Charset> charsets = Charset.availableCharsets();
+		String[] items = new String[charsets.size()];
+		int icharset = 0;
+		for (String k : charsets.keySet()) items[icharset++] = k;
+		encodingCombo.setItems(items);
+		
+		String[] data = encodingCombo.getItems();
+		for (int i = 0 ; i < data.length ; i++) {
+			String encoding = data[i];
+			if (encoding.equals(defaultEncoding)) { 
+				encodingCombo.select(i);
+				break;
+			}
+		}
+		encodingCombo.setText(defaultEncoding);
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (this.section == null) return true;
+		
+		String encoding = params.getCorpusElement().getAttribute("encoding"); //$NON-NLS-1$
+		if (!this.section.isDisposed()) {
+			//ENCODING
+			if (btnGuessEncoding != null && btnGuessEncoding.getSelection()) {	
+				encoding = "??"; //$NON-NLS-1$
+			} else if (encodingCombo != null) {
+				encoding = encodingCombo.getText();
+			}
+
+			if (encoding == null || encoding.length() == 0)
+				encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
+
+			params.getCorpusElement().setAttribute("encoding", encoding); //$NON-NLS-1$
+		}
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EncodingSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FontSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FontSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FontSection.java	(revision 324)
@@ -0,0 +1,103 @@
+package org.txm.rcp.editors.imports.sections;
+
+import java.awt.GraphicsEnvironment;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Messages;
+
+public class FontSection extends ImportEditorSection {
+	
+	private static final int SECTION_SIZE = 1;
+	public static final String DEFAULTFONT = "<default>";
+	
+	Combo fontCombo;
+	
+	public FontSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
+		super(toolkit2, form2, parent, style);
+
+		this.section.setText(Messages.CorpusPage_3);
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		//filesection.setDescription("Select how to find source files");
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.makeColumnsEqualWidth = false;
+		slayout.numColumns = 2;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+
+		Label l = toolkit.createLabel(sectionClient, Messages.CorpusPage_57, SWT.WRAP);
+		l.setLayoutData(new TableWrapData(TableWrapData.LEFT, TableWrapData.MIDDLE));
+
+		fontCombo = new Combo(sectionClient, SWT.BORDER);
+		TableWrapData gdata = getTextGridData();
+		fontCombo.setLayoutData(gdata);
+
+		fontCombo.removeAll();
+		GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
+		java.awt.Font[] fonts = e.getAllFonts(); // Get the fonts
+
+		fontCombo.add(DEFAULTFONT);
+		for (java.awt.Font font : fonts) {
+			fontCombo.add(font.getFontName());
+		}
+
+		//updateFontSection();
+		
+		
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		if (this.section.isDisposed()) return;
+		if (params == null) return;
+		String value = params.getCorpusElement().getAttribute("font"); //$NON-NLS-1$
+		
+		if (value == null || value.length() == 0) value = DEFAULTFONT;
+		
+		if (value != null && value.length() > 0)
+			fontCombo.setText(value);
+		
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (!this.section.isDisposed()) {
+			String value = fontCombo.getText();
+			if (DEFAULTFONT.equals(value)) value = "";
+			
+			params.getCorpusElement().setAttribute("font", value); //$NON-NLS-1$
+			return true;
+		}
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FontSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/AnnotationSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/AnnotationSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/AnnotationSection.java	(revision 324)
@@ -0,0 +1,85 @@
+package org.txm.rcp.editors.imports.sections;
+
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.objects.BaseParameters;
+
+public class AnnotationSection extends ImportEditorSection {
+	
+	private static final int SECTION_SIZE = 1;
+	public static final String DEFAULTNAMESUFFIX = "KR";
+	
+	Text nameText;
+	
+	public AnnotationSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
+		super(toolkit2, form2, parent, style);
+
+		this.section.setText("Annotation");
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		//filesection.setDescription("Select how to find source files");
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.makeColumnsEqualWidth = false;
+		slayout.numColumns = 2;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+
+		Label l = toolkit.createLabel(sectionClient, "Knowledge repository name", SWT.WRAP);
+		l.setLayoutData(new TableWrapData(TableWrapData.LEFT, TableWrapData.MIDDLE));
+
+		nameText = new Text(sectionClient, SWT.BORDER);
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		if (this.section.isDisposed()) return;
+		if (params == null) return;
+		List<String> values = params.getKnowledgeRepositoryNames();
+		
+		String value = params.getCorpusName()+DEFAULTNAMESUFFIX;
+		if (values.size() > 0) {
+			value = values.get(0);
+		}
+		nameText.setText(value);
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (!this.section.isDisposed()) {
+			String value = nameText.getText();
+						
+			return true;
+		}
+		return false;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/AnnotationSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 324)
@@ -0,0 +1,368 @@
+package org.txm.rcp.editors.imports.sections;
+
+import java.util.HashMap;
+
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.imports.ImportModuleCustomization;
+import org.txm.tokenizer.TokenizerClasses;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+public class TokenizerSection extends ImportEditorSection {
+
+	static final int SECTION_SIZE = 1;
+	Text wordElementText;
+	Button doTokenizeStepButton;
+	Text textElisions;
+	Text textPuncts;
+	Text textPunctsStrong;
+	Text textWhiteSpaces;
+	Label titleLabel;
+	TableViewer tokenizerParamsViewer;
+	TableViewer tokenizerParamsViewer2;
+	private HashMap<String, Boolean> moduleParams;
+
+	public TokenizerSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style, HashMap<String, Boolean> moduleParams) {
+		super(toolkit2, form2, parent, style);
+		this.moduleParams = moduleParams;
+		this.section.setText(Messages.MainPage_19);
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.makeColumnsEqualWidth = false;
+		slayout.numColumns = 3;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+		
+		Label tmpLabel3 = toolkit.createLabel(sectionClient, "Word tag");
+		TableWrapData gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.colspan = 2;
+		tmpLabel3.setLayoutData(gdata);
+		tmpLabel3.setToolTipText("XML tag name that encodes words");
+		tmpLabel3.setVisible(moduleParams.get(ImportModuleCustomization.ADVANCEDTOKENIZER));
+		
+		wordElementText = toolkit.createText(sectionClient, "w", SWT.BORDER); //$NON-NLS-1$
+		gdata = getTextGridData();
+		wordElementText.setLayoutData(gdata);
+		wordElementText.setVisible(moduleParams.get(ImportModuleCustomization.ADVANCEDTOKENIZER));
+		doTokenizeStepButton = toolkit.createButton(sectionClient, "Tokenization", SWT.CHECK);
+		doTokenizeStepButton.setSelection(true);
+		doTokenizeStepButton.setVisible(moduleParams.get(ImportModuleCustomization.ADVANCEDTOKENIZER));
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.colspan = 3;
+		doTokenizeStepButton.setLayoutData(gdata);
+		doTokenizeStepButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				updateFieldsEnableState();
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		
+		Label l0 = toolkit.createLabel(sectionClient, Messages.CorpusPage_16a, SWT.WRAP);
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.colspan = 3;
+		gdata.indent = 10;
+		l0.setLayoutData(gdata);
+		
+		Label l1 = toolkit.createLabel(sectionClient, Messages.CorpusPage_5, SWT.WRAP);
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.colspan = 2;
+		gdata.indent = 20;
+		l1.setLayoutData(gdata);
+
+		textWhiteSpaces = toolkit.createText(sectionClient, TokenizerClasses.whitespaces, SWT.BORDER);
+		gdata = getLongTextGridData();
+		textWhiteSpaces.setLayoutData(gdata);
+		
+		Label l2 = toolkit.createLabel(sectionClient, Messages.CorpusPage_16, SWT.WRAP);
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.colspan = 2;
+		gdata.indent = 20;
+		l2.setLayoutData(gdata);
+
+		textPuncts = toolkit.createText(sectionClient, TokenizerClasses.regPunct, SWT.BORDER);
+		gdata = getLongTextGridData();
+		textPuncts.setLayoutData(gdata);
+
+		Label l4 = toolkit.createLabel(sectionClient, Messages.CorpusPage_19, SWT.WRAP);
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.colspan = 2;
+		gdata.indent = 10;
+		l4.setLayoutData(gdata);
+
+		textElisions = toolkit.createText(sectionClient, TokenizerClasses.regElision, SWT.BORDER);
+		gdata = getLongTextGridData();
+		textElisions.setLayoutData(gdata);
+
+		Label l3 = toolkit.createLabel(sectionClient, Messages.CorpusPage_22, SWT.WRAP);
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.colspan = 2;
+		gdata.indent = 10;
+		l3.setLayoutData(gdata);
+
+		textPunctsStrong = toolkit.createText(sectionClient, TokenizerClasses.punct_strong, SWT.BORDER);
+		gdata = getLongTextGridData();
+		textPunctsStrong.setLayoutData(gdata);
+
+		Button defaultBtn = toolkit.createButton(sectionClient, Messages.CorpusPage_49, SWT.PUSH);
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gdata.colspan = 2;
+		gdata.indent = 10;
+		defaultBtn.setLayoutData(gdata);
+		defaultBtn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				TokenizerClasses.reset();
+				textWhiteSpaces.setText(TokenizerClasses.whitespaces);
+				textPuncts.setText(TokenizerClasses.regPunct);
+				textPunctsStrong.setText(TokenizerClasses.punct_strong);
+				textElisions.setText(TokenizerClasses.regElision);
+			}
+		});
+
+		/*setAddSetTestsButton = toolkit.createButton(sectionClient, Messages.CorpusPage_28, SWT.CHECK);
+		setAddSetTestsButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,4,1));
+		//		setAddSetTestsButton.setSelection(params.getTokenizerElement(params.getCorpusElement()))
+
+		Button addButton = toolkit.createButton(sectionClient, Messages.CorpusPage_29, SWT.PUSH);
+		addButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,1,1));
+		addButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
+				values.put("name", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("value", "");			 //$NON-NLS-1$ //$NON-NLS-2$
+				MultipleValueDialog dlg = new MultipleValueDialog(form.getShell(), Messages.CorpusPage_29, values);
+				if (dlg.open() == Window.OK) {
+					params.addTokenizerParameter(params.getCorpusElement(), values.get("name"), values.get("value")); //$NON-NLS-1$ //$NON-NLS-2$
+					updateTokenizerSection();
+				}
+			}
+		});
+
+		Button removeButton = toolkit.createButton(sectionClient, Messages.CorpusPage_31, SWT.PUSH);
+		removeButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,1,1));
+		removeButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				ISelection sel = tokenizerParamsViewer.getSelection();
+				IStructuredSelection ssel = (IStructuredSelection) sel;
+				Object obj = ssel.getFirstElement();
+				if (obj instanceof Element) {
+					Element query = (Element) obj;
+					params.getTokenizerElement(params.getCorpusElement()).removeChild(query);
+					updateTokenizerSection();
+				}
+			}
+		});
+
+		Button addButton2 = toolkit.createButton(sectionClient, Messages.CorpusPage_32, SWT.PUSH);
+		addButton2.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,1,1));
+		addButton2.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
+				values.put("value", "\\A(.+)(.+)(.+)\\Z"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("type", "w"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("before", "1"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("hit", "2"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("after", "3"); //$NON-NLS-1$ //$NON-NLS-2$
+				MultipleValueDialog dlg = new MultipleValueDialog(form.getShell(), Messages.CorpusPage_33, values);
+				if (dlg.open() == Window.OK) {
+					params.addTokenizerTest(params.getCorpusElement(), values.get("value"), values.get("type"), values.get("before"), values.get("hit"), values.get("after")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+					updateTokenizerSection();
+				}
+			}
+		});
+
+		Button removeButton2 = toolkit.createButton(sectionClient, Messages.CorpusPage_34, SWT.PUSH);
+		removeButton2.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,1,1));
+		removeButton2.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				ISelection sel = tokenizerParamsViewer2.getSelection();
+				IStructuredSelection ssel = (IStructuredSelection) sel;
+				Object obj = ssel.getFirstElement();
+				if (obj instanceof Element) {
+					Element test = (Element) obj;
+					params.getTokenizerElement(params.getCorpusElement()).removeChild(test);
+					updateTokenizerSection();
+				}
+			}
+		});
+
+		Table table = toolkit.createTable(sectionClient, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.VIRTUAL);
+		tokenizerParamsViewer = new TableViewer(table);
+		tokenizerParamsViewer.getTable().addKeyListener(new TableKeyListener(tokenizerParamsViewer));
+		GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false,2,1);
+		gd.heightHint = 150;
+		tokenizerParamsViewer.getTable().setLayoutData(gd);
+		tokenizerParamsViewer.setContentProvider(new NodeListContentProvider());
+		tokenizerParamsViewer.getTable().setHeaderVisible(true);
+		tokenizerParamsViewer.getTable().setLinesVisible(true);
+
+		String[] cols = {"name", "value"}; //$NON-NLS-1$ //$NON-NLS-2$
+		for (String col : cols) {
+			TableViewerColumn columnViewer = new TableViewerColumn(tokenizerParamsViewer, SWT.NONE);
+			TableColumn column = columnViewer.getColumn();
+			column.setText(col);
+			column.setWidth(100);
+			columnViewer.setLabelProvider(new ElementColumnLabelProvider(col));
+		}
+
+		Table table2 = toolkit.createTable(sectionClient, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.VIRTUAL);
+		tokenizerParamsViewer2 = new TableViewer(table2);
+		tokenizerParamsViewer2.getTable().addKeyListener(new TableKeyListener(tokenizerParamsViewer2));
+		GridData gd2 = new GridData(GridData.FILL, GridData.FILL, false, false,2,1);
+		gd.heightHint = 150;
+		tokenizerParamsViewer2.getTable().setLayoutData(gd2);
+		tokenizerParamsViewer2.setContentProvider(new NodeListContentProvider());
+		tokenizerParamsViewer2.getTable().setHeaderVisible(true);
+		tokenizerParamsViewer2.getTable().setLinesVisible(true);
+
+		String[] cols2 = {"value", "type", "before", "hit", "after"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+		for (String col : cols2) {
+			TableViewerColumn columnViewer = new TableViewerColumn(tokenizerParamsViewer2, SWT.NONE);
+			TableColumn column = columnViewer.getColumn();
+			column.setText(col);
+			column.setWidth(100);
+			columnViewer.setLabelProvider(new ElementColumnLabelProvider(col));
+		}
+		 */
+
+	}
+
+	protected void updateFieldsEnableState() {
+		boolean enabled = doTokenizeStepButton.getSelection();
+		textWhiteSpaces.setEnabled(enabled);
+		textPuncts.setEnabled(enabled);
+		textElisions.setEnabled(enabled);
+		textPunctsStrong.setEnabled(enabled);
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		if (this.section.isDisposed()) return;
+		if (params == null) return;
+
+		textWhiteSpaces.setText(TokenizerClasses.whitespaces);
+		textPuncts.setText(TokenizerClasses.regPunct);
+		textPunctsStrong.setText(TokenizerClasses.punct_strong);
+		textElisions.setText(TokenizerClasses.regElision);
+
+		Element tokenizerElem = params.getTokenizerElement(params.getCorpusElement());
+		NodeList paramList = tokenizerElem.getElementsByTagName("param"); //$NON-NLS-1$
+		for (int i = 0 ; i < paramList.getLength() ; i++) {
+			Element paramElem = (Element) paramList.item(i);
+			String name = paramElem.getAttribute("name"); //$NON-NLS-1$
+			String value = paramElem.getTextContent();
+			if ("whitepaces".equals(name)) { //$NON-NLS-1$
+				textWhiteSpaces.setText(value);
+			} else if ("regPunct".equals(name)) { //$NON-NLS-1$
+				textPuncts.setText(value);
+			} else if ("punct_strong".equals(name)) { //$NON-NLS-1$
+				textPunctsStrong.setText(value);
+			} else if ("regElision".equals(name)) { //$NON-NLS-1$
+				textElisions.setText(value);
+			}
+		}
+		
+		Element wtagElement = params.getWordElement();
+		if (wtagElement != null)
+			wordElementText.setText(wtagElement.getTextContent());
+		
+		boolean skip = params.getSkipTokenization();
+		//System.out.println("set do tokenizer button value to "+!skip);
+		doTokenizeStepButton.setSelection(!skip);
+		updateFieldsEnableState();
+		
+//		Object value = tokenizerElem.getAttribute(Messages.CorpusPage_51);
+//		try {
+//			setAddSetTestsButton.setSelection(Boolean.parseBoolean(value.toString()));
+//		} catch (Exception e) { };
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		
+		if (textWhiteSpaces.getText().length() == 0 && textPuncts.getText().length() == 0) {
+			System.out.println("Error while saving tokenizer parameters: whitespace and punctuation regular expressions are both empty.");
+			return false;
+		}
+		params.addTokenizerParameter(params.getCorpusElement(), "whitespaces", textWhiteSpaces.getText()); //$NON-NLS-1$
+		params.addTokenizerParameter(params.getCorpusElement(), "regPunct", textPuncts.getText()); //$NON-NLS-1$
+		params.addTokenizerParameter(params.getCorpusElement(), "punct_strong", textPunctsStrong.getText()); //$NON-NLS-1$
+		params.addTokenizerParameter(params.getCorpusElement(), "regElision", textElisions.getText()); //$NON-NLS-1$
+
+		Element tokenizerElement = params.getTokenizerElement(params.getCorpusElement());
+		tokenizerElement.setAttribute("onlyThoseTests", "false");//+setAddSetTestsButton.getSelection()); //$NON-NLS-2$ //$NON-NLS-1$
+
+		Element wordElement = params.getWordElement();
+		wordElement.setTextContent(wordElementText.getText());
+		
+		params.setSkipTokenization(!doTokenizeStepButton.getSelection());
+		
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java	(revision 324)
@@ -0,0 +1,298 @@
+package org.txm.rcp.editors.imports.sections;
+
+import java.io.File;
+import java.util.HashMap;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.imports.ImportModuleCustomization;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.w3c.dom.Element;
+
+public class EditionSection extends ImportEditorSection {
+
+	String ID = "org.txm.rcp.editors.imports.sections.EditionSection";
+
+	private static final int SECTION_SIZE = 1;
+	Button buildEditionCheckButton;
+	Text wordsPerPageText;
+	Text pageBreakText;
+	Button buildFacsEditionCheckButton;
+	Text imageDirectoryText;
+
+	/**
+	 * 
+	 * @param toolkit2
+	 * @param form2
+	 * @param parent
+	 * @param style
+	 * @param moduleParams
+	 * @param scriptName temporary parameter to detect if import module is xtzLoader.groovy
+	 */
+	public EditionSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style, HashMap<String, Boolean> moduleParams, String scriptName) {
+		super(toolkit2, form2, parent, style);
+
+		this.section.setText(Messages.CorpusPage_0);
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		layout.numColumns = 1;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		//filesection.setDescription("Select how to find source files");
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.numColumns = 4;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+
+
+		// build text edition or not button
+		buildEditionCheckButton = toolkit.createButton(sectionClient, Messages.CorpusPage_44, SWT.CHECK);
+		buildEditionCheckButton.setSelection(true);
+		TableWrapData gdata2 = getButtonLayoutData();
+		gdata2.colspan = 4; // one line
+		buildEditionCheckButton.setLayoutData(gdata2);
+
+		// words per page -> pageSize
+		Label tmpLabel = null;
+		if (moduleParams.get(ImportModuleCustomization.EDITIONS_WORDSPERPAGE)) {
+			tmpLabel = toolkit.createLabel(sectionClient, Messages.CorpusPage_36);
+			tmpLabel.setLayoutData(getLabelGridData());
+
+			wordsPerPageText = toolkit.createText(sectionClient, "500", SWT.BORDER); //$NON-NLS-1$
+			TableWrapData gdata = getTextGridData();
+			wordsPerPageText.setLayoutData(gdata);
+		}
+
+		if (moduleParams.get(ImportModuleCustomization.EDITIONS_PAGEELEMENT)) {
+			// page break tag
+			tmpLabel = toolkit.createLabel(sectionClient, Messages.CorpusPage_41);
+			tmpLabel.setLayoutData(getLabelGridData());
+			pageBreakText = toolkit.createText(sectionClient, "pb", SWT.BORDER); //$NON-NLS-1$
+			TableWrapData gdata = getTextGridData();
+			pageBreakText.setLayoutData(gdata);
+
+			if ("xtzLoader.groovy".equals(scriptName)) {
+
+				// build text edition or not button
+				buildFacsEditionCheckButton = toolkit.createButton(sectionClient, "Build 'facs' edition", SWT.CHECK);
+				buildFacsEditionCheckButton.setSelection(false);
+				TableWrapData gdata22 = getButtonLayoutData();
+				gdata22.colspan = 4; // one line
+				buildFacsEditionCheckButton.setLayoutData(gdata22);
+				buildFacsEditionCheckButton.addSelectionListener(new SelectionListener() {
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						imageDirectoryText.setEnabled(buildFacsEditionCheckButton.getSelection());
+					}
+
+					@Override
+					public void widgetDefaultSelected(SelectionEvent e) {}
+				});
+				// image directory
+				tmpLabel = toolkit.createLabel(sectionClient, "Images directory: ");
+				tmpLabel.setLayoutData(getLabelGridData());
+				imageDirectoryText = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
+				gdata = getTextGridData();
+				gdata.colspan = 2;
+				imageDirectoryText.setLayoutData(gdata);
+				imageDirectoryText.setEnabled(false);
+
+				Button selectImageDirectoryButton = toolkit.createButton(sectionClient, "...", SWT.PUSH);
+				gdata = getButtonLayoutData();
+				selectImageDirectoryButton.setLayoutData(gdata);
+				selectImageDirectoryButton.addSelectionListener(new SelectionListener() {
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						DirectoryDialog dialog = new DirectoryDialog(form.getShell(), SWT.OPEN);
+						if (LastOpened.getFile(ID) != null) {
+							dialog.setFilterPath(LastOpened.getFolder(ID));
+						} else {
+							dialog.setFilterPath(Toolbox.getParam(TBXPreferences.USER_TXM_HOME));
+						}
+						if (dialog.open() != null) {
+							File imgDirectory = new File(dialog.getFilterPath());
+							LastOpened.set(ID, imgDirectory.getParent(), "");
+							imageDirectoryText.setText(imgDirectory.getAbsolutePath());
+						}
+					}
+
+					@Override
+					public void widgetDefaultSelected(SelectionEvent e) { }
+				});
+			}
+		}
+
+		//// First draft of interface to add editions to a corpus
+		//		Button addButton = toolkit.createButton(sectionClient, Messages.CorpusPage_1, SWT.PUSH);
+		//		addButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		//		addButton.addSelectionListener(new SelectionListener() {
+		//			@Override
+		//			public void widgetDefaultSelected(SelectionEvent e) {
+		//			}
+		//
+		//			@Override
+		//			public void widgetSelected(SelectionEvent e) {
+		//				if (params == null) return;
+		//				LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
+		//				values.put("name", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		//				values.put("mode", "groovy"); //$NON-NLS-1$ //$NON-NLS-2$
+		//				values.put("script", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		//
+		//				MultipleValueDialog dlg = new MultipleValueDialog(form.getShell(), Messages.CorpusPage_1, values);
+		//				if (dlg.open() == Window.OK) {
+		//					params.addEditionDefinition(params.getCorpusElement(), values.get("name"), values.get("mode"), values.get("script")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		//					updateEditionsSection();
+		//				}
+		//			}
+		//		});
+		//
+		//		Button removeButton = toolkit.createButton(sectionClient, Messages.CorpusPage_2, SWT.PUSH);
+		//		removeButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		//		removeButton.addSelectionListener(new SelectionListener() {
+		//			@Override
+		//			public void widgetDefaultSelected(SelectionEvent e) {
+		//			}
+		//
+		//			@Override
+		//			public void widgetSelected(SelectionEvent e) {
+		//				if (params == null) return;
+		//				ISelection sel = editionsViewer.getSelection();
+		//				IStructuredSelection ssel = (IStructuredSelection) sel;
+		//				Object obj = ssel.getFirstElement();
+		//				if (obj instanceof Element) {
+		//					Element query = (Element) obj;
+		//					params.getEditionsElement(params.getCorpusElement()).removeChild(query);
+		//					updateEditionsSection();
+		//				}
+		//			}
+		//		});
+		//
+		//		Table table = toolkit.createTable(sectionClient, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.VIRTUAL);
+		//		editionsViewer = new TableViewer(table);
+		//		editionsViewer.getTable().addKeyListener(new TableKeyListener(editionsViewer));
+		//		GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false,2,1);
+		//		gd.heightHint = 150;
+		//		editionsViewer.getTable().setLayoutData(gd);
+		//		editionsViewer.setContentProvider(new NodeListContentProvider());
+		//		editionsViewer.getTable().setHeaderVisible(true);
+		//		editionsViewer.getTable().setLinesVisible(true);
+		//
+		//		String[] cols = {"name", "mode", "script"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		//		for (String col : cols) {
+		//			TableViewerColumn columnViewer = new TableViewerColumn(editionsViewer, SWT.NONE);
+		//			TableColumn column = columnViewer.getColumn();
+		//			column.setText(col);
+		//			column.setWidth(100);
+		//			columnViewer.setLabelProvider(new ElementColumnLabelProvider(col));
+		//		}		
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		if (this.section.isDisposed()) return;
+		if (params == null) return;
+
+		Element editionsElement = params.getEditionsElement(params.getCorpusElement());
+		if (editionsElement == null) return;
+		Element editionElement = params.getEditionDefinitionElement(editionsElement, "default"); //$NON-NLS-1$
+		if (editionElement == null) return;
+
+		boolean be = params.getDoEdition("default"); //$NON-NLS-1$
+		buildEditionCheckButton.setSelection(be);
+
+		int wppt = params.getWordsPerPage("default"); //$NON-NLS-1$
+		wordsPerPageText.setText(""+wppt); //$NON-NLS-1$
+
+		String pbt = params.getPageElement("default"); //$NON-NLS-1$
+		if (pageBreakText != null)
+			pageBreakText.setText(pbt);
+
+		boolean bfe = params.getDoFacsEdition();//$NON-NLS-1$
+		if (buildFacsEditionCheckButton != null) {
+			buildFacsEditionCheckButton.setSelection(bfe);
+			imageDirectoryText.setEnabled(buildFacsEditionCheckButton.getSelection());
+
+			String imageDirectory = params.getFacsEditionImageDirectory(); //$NON-NLS-1$
+			if (imageDirectoryText != null)
+				imageDirectoryText.setText(imageDirectory);
+
+		}
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (this.section != null && !this.section.isDisposed()) {
+			Element editionsElement = params.getEditionsElement(params.getCorpusElement());
+
+			Element defaultEditionElement = params.getEditionDefinitionElement(editionsElement, "default"); //$NON-NLS-1$
+			if (defaultEditionElement == null) {
+				defaultEditionElement = params.addEditionDefinition(params.getCorpusElement(), "default", "groovy", "*.groovy");
+			}
+			if (defaultEditionElement != null) {
+
+				if (pageBreakText != null)
+					defaultEditionElement.setAttribute("page_break_tag", pageBreakText.getText()); //$NON-NLS-1$
+				else
+					defaultEditionElement.setAttribute("page_break_tag", "pb"); //$NON-NLS-1$ //$NON-NLS-2$
+
+				if (wordsPerPageText != null)
+					defaultEditionElement.setAttribute("words_per_page", wordsPerPageText.getText()); //$NON-NLS-1$
+				else
+					defaultEditionElement.setAttribute("words_per_page", "500"); //$NON-NLS-1$ //$NON-NLS-2$
+
+				defaultEditionElement.setAttribute("build_edition", ""+buildEditionCheckButton.getSelection()); //$NON-NLS-1$ //$NON-NLS-2$
+			} 
+
+			if (buildFacsEditionCheckButton != null) {
+				Element defaultFacsEditionElement = params.getEditionDefinitionElement(editionsElement, "facs"); //$NON-NLS-1$
+				if (defaultFacsEditionElement == null) {
+					defaultFacsEditionElement = params.addEditionDefinition(params.getCorpusElement(), "facs", "groovy", "*.groovy");
+				}
+				if (defaultFacsEditionElement != null) {
+
+					if (imageDirectoryText != null)
+						defaultFacsEditionElement.setAttribute("images_directory", imageDirectoryText.getText()); //$NON-NLS-1$
+					else
+						defaultFacsEditionElement.setAttribute("images_directory", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+					defaultFacsEditionElement.setAttribute("build_edition", ""+buildFacsEditionCheckButton.getSelection()); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+		}
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/OptionsSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/OptionsSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/OptionsSection.java	(revision 324)
@@ -0,0 +1,90 @@
+package org.txm.rcp.editors.imports.sections;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.importer.ImportKeys;
+import org.txm.objects.BaseParameters;
+
+public class OptionsSection extends ImportEditorSection {
+
+	private static final int SECTION_SIZE = 1;
+	private Button cleanButton;
+//	private Button multithreadButton;
+
+	public OptionsSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
+		super(toolkit2, form2, parent, style);
+
+		this.section.setText("Options");
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.makeColumnsEqualWidth = false;
+		slayout.numColumns = 2;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+
+		cleanButton = toolkit.createButton(sectionClient, "Remove temporary directories", SWT.CHECK);
+		TableWrapData gdata = getTextGridData();
+		gdata.grabHorizontal = true;
+		gdata.colspan = 2;
+		cleanButton.setLayoutData(gdata);
+		
+//		multithreadButton = toolkit.createButton(sectionClient, "Experimental multi-threading import", SWT.CHECK);
+//		gdata = getTextGridData();
+//		gdata.colspan = 2;
+//		gdata.grabHorizontal = true;
+//		multithreadButton.setLayoutData(gdata);
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		String value = (String) params.getKeyValueParameters().get(ImportKeys.CLEAN);
+		if (value == null) value = "true";
+		cleanButton.setSelection(Boolean.parseBoolean(value));
+		
+//		value = (String) params.getKeyValueParameters().get(ImportKeys.MULTITHREAD);
+//		if (value == null) value = "false";
+//		multithreadButton.setSelection(Boolean.parseBoolean(value));
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (this.section != null && !section.isDisposed()) {
+			
+			String value = Boolean.toString(cleanButton.getSelection());
+			params.getKeyValueParameters().put(ImportKeys.CLEAN, value);
+			
+//			value = Boolean.toString(multithreadButton.getSelection());
+//			params.getKeyValueParameters().put(ImportKeys.MULTITHREAD, value);
+			return true;
+		}
+
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/OptionsSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/UISection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/UISection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/UISection.java	(revision 324)
@@ -0,0 +1,87 @@
+package org.txm.rcp.editors.imports.sections;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Messages;
+import org.w3c.dom.Element;
+
+public class UISection extends ImportEditorSection {
+	
+	private static final int SECTION_SIZE = 1;
+	private Text structLimitsText;
+	
+	public UISection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
+		super(toolkit2, form2, parent, style);
+
+		this.section.setText(Messages.CorpusPage_63);
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.makeColumnsEqualWidth = false;
+		slayout.numColumns = 2;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+
+		Label tmpLabel = toolkit.createLabel(sectionClient, Messages.CorpusPage_64);
+		tmpLabel.setToolTipText(Messages.CorpusPage_65);
+		tmpLabel.setLayoutData(getLabelGridData());
+
+		structLimitsText = toolkit.createText(sectionClient, "text", SWT.BORDER); //$NON-NLS-1$
+		TableWrapData gdata = getTextGridData();
+		structLimitsText.setLayoutData(gdata);
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		Element concordanceElement = params.getUIElement(params.getCorpusElement(), "concordance"); //$NON-NLS-1$
+		if (concordanceElement != null) {
+			Element context_limitsElement = params.getCQLLimitElement(concordanceElement);
+			if (context_limitsElement != null)
+				structLimitsText.setText(context_limitsElement.getTextContent());
+		}
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (this.section != null && !section.isDisposed()) {
+			Element concordanceElement = params.getUIElement(params.getCorpusElement(), "concordance");//.setAttribute("xsl", xsltfileValue.getText()); //$NON-NLS-1$
+			if (concordanceElement != null) {
+				Element context_limitsElement = params.getCQLLimitElement(concordanceElement);
+				context_limitsElement.setAttribute("type", "list"); //$NON-NLS-1$ //$NON-NLS-2$
+				context_limitsElement.setTextContent(structLimitsText.getText());
+				//System.out.println(Messages.CorpusPage_80+structLimitsText.getText());
+			}
+			return true;
+		}
+
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/UISection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java	(revision 324)
@@ -0,0 +1,133 @@
+package org.txm.rcp.editors.imports.sections;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Device;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Messages;
+import org.txm.utils.logger.Log;
+import org.w3c.dom.Element;
+
+public class InfosSection extends ImportEditorSection {
+	
+	private static final int SECTION_SIZE = 2;
+	Label corpusNameLabel; // color change if the corpus name is malformed
+	Text corpusText;
+	private Text descText;
+	
+	public InfosSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
+		super(toolkit2, form2, parent, style);
+		
+		//this = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		this.section.setText(Messages.CorpusPage_7);
+		section.setExpanded(true);
+		
+		TableWrapLayout layout = new TableWrapLayout();
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.numColumns = 2;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+
+		corpusNameLabel = toolkit.createLabel(sectionClient, Messages.CorpusPage_8, SWT.WRAP);
+		TableWrapData gdata = new TableWrapData();
+		corpusNameLabel.setLayoutData(gdata);
+
+		Label label = toolkit.createLabel(sectionClient, Messages.CorpusPage_9, SWT.WRAP);
+		gdata = new TableWrapData();
+		label.setLayoutData(gdata);
+
+		corpusText = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
+		gdata = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
+		corpusText.setLayoutData(gdata);
+
+		descText = toolkit.createText(sectionClient, "", SWT.BORDER | SWT.MULTI | SWT.V_SCROLL); //$NON-NLS-1$
+		gdata = new TableWrapData(TableWrapData.FILL, TableWrapData.FILL);
+		gdata.heightHint = 50;
+
+		descText.setLayoutData(gdata);
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		section.setText(Messages.MainPage_3+" "+params.rootDir); //$NON-NLS-1$
+		
+		corpusText.setText(params.getCorpusName());
+		
+		String descContent = params.getCorpusElement().getAttribute("desc"); //$NON-NLS-1$
+		descContent = descContent.replace("<pre><br/>", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		descContent = descContent.replace("</pre>", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		descContent = descContent.replace("<br/>", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		//System.out.println("LOAD DESC WITH: '"+descContent+"'");
+		descText.setText(descContent); //$NON-NLS-1$
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (corpusText.getText().trim().length() == 0) {
+			System.out.println(Messages.CorpusPage_53);
+			return false;
+		}
+		params.description = "<pre><br/>"+descText.getText().replace("\n", "<br/>")+"</pre>"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		//System.out.println("SAVE DESC WITH: '"+params.description+"'");
+		if (!corpusText.getText().matches("[A-Z][-A-Z0-9]{1,20}")) { //$NON-NLS-1$
+			System.out.println(Messages.CorpusPage_93+corpusText.getText());
+			return false;
+		}
+		
+		Element corpusElem = params.getCorpusElement();
+		
+		// THIS IS UGLY, BUT THIS EDITOR CAN MANAGE ONLY ONE CORPUS
+		if (params.corpora.containsKey(params.name)) { // remove the previous corpus if the new name is different
+			params.corpora.remove(params.name);
+		}
+		
+		params.name = corpusText.getText();
+		params.corpora.put(params.name, corpusElem); // reuse the old "corpus" element 
+		corpusElem.setAttribute("name", params.name);
+		corpusElem.setAttribute("desc", params.description);
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		String corpusname = corpusText.getText();
+		Log.warning("Checking corpus name validity with '[A-Z][-A-Z0-9]+': "+corpusname);
+		if (!corpusname.matches("[A-Z][-A-Z0-9]+")) { //$NON-NLS-1$
+			System.out.println(Messages.CorpusPage_93+corpusname);
+
+			Device device = Display.getCurrent ();
+			Color red = new Color (device, 255, 0, 0);
+			corpusNameLabel.setBackground(red);
+
+			return false;
+		}
+		corpusNameLabel.setBackground(corpusNameLabel.getParent().getBackground());
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/InfosSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FrontXSLSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FrontXSLSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FrontXSLSection.java	(revision 324)
@@ -0,0 +1,227 @@
+package org.txm.rcp.editors.imports.sections;
+
+import java.io.File;
+import java.util.LinkedHashMap;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.EditFile;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.swt.dialog.LastOpened;
+import org.txm.rcp.swt.dialog.MultipleValueDialog;
+import org.txm.rcp.swt.provider.ElementColumnLabelProvider;
+import org.txm.rcp.swt.provider.NodeListContentProvider;
+import org.w3c.dom.Element;
+
+public class FrontXSLSection extends ImportEditorSection {
+	
+	private static final String ID = "org.txm.rcp.editors.imports.CorpusPage.xslt"; //$NON-NLS-1$
+	
+	private static final int SECTION_SIZE = 2;
+	File xsltfile;
+	Text xsltfileValue;
+
+	String[] xsltparams;//{"val1",1,"val2",2}
+	TableViewer xsltParamsViewer;
+	
+	BaseParameters params;
+	
+	public FrontXSLSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style, BaseParameters params2) {
+		super(toolkit2, form2, parent, style);
+		this.params = params2;
+
+		this.section.setText(Messages.MainPage_18);
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		//filesection.setDescription("Select how to find source files");
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.makeColumnsEqualWidth = false;
+		slayout.numColumns = 4;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+
+
+		xsltfileValue = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
+		TableWrapData gdata = getTextGridData();
+		xsltfileValue.setLayoutData(gdata);
+
+		Button browseXSLTButton = toolkit.createButton(sectionClient, "...", SWT.PUSH); //$NON-NLS-1$
+		browseXSLTButton.setLayoutData(getButtonLayoutData());
+		browseXSLTButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				FileDialog dialog = new FileDialog(form.getShell(), SWT.OPEN);
+				String[] extensions = {"*.xsl"}; //$NON-NLS-1$
+				dialog.setFilterExtensions(extensions);
+				if (LastOpened.getFile(ID) != null) {
+					dialog.setFilterPath(LastOpened.getFolder(ID));
+					dialog.setFileName(LastOpened.getFile(ID));
+				} else {
+					dialog.setFilterPath(Toolbox.getParam(TBXPreferences.USER_TXM_HOME));
+				}
+				if (dialog.open() != null) {
+					xsltfile = new File(dialog.getFilterPath(), dialog.getFileName());
+					LastOpened.set(ID, xsltfile.getParent(), xsltfile.getName());
+					xsltfileValue.setText(xsltfile.getAbsolutePath());
+				}
+			}
+		});
+
+		Button editXSLTButton = toolkit.createButton(sectionClient, Messages.CorpusPage_61, SWT.PUSH);
+		editXSLTButton.setLayoutData(getButtonLayoutData());
+		editXSLTButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (xsltfile != null && xsltfile.exists() && xsltfile.isFile()) {
+					EditFile.openfile(xsltfile.getAbsolutePath());
+				}
+			}
+		});	
+
+		Label l = toolkit.createLabel(sectionClient, ""); // empty cell //$NON-NLS-1$
+		l.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.MIDDLE));
+
+		Button addButton = toolkit.createButton(sectionClient, Messages.CorpusPage_4, SWT.PUSH);
+		addButton.setLayoutData(getButtonLayoutData());
+		addButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
+				values.put("name", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("value", "");			 //$NON-NLS-1$ //$NON-NLS-2$
+				MultipleValueDialog dlg = new MultipleValueDialog(form.getShell(), Messages.CorpusPage_4, values);
+				if (dlg.open() == Window.OK) {
+					params.addXsltParameter(params.getCorpusElement(), values.get("name"), values.get("value")); //$NON-NLS-1$ //$NON-NLS-2$
+					update(params);
+				}
+			}
+		});
+
+		Button removeButton = toolkit.createButton(sectionClient, Messages.CorpusPage_6, SWT.PUSH);
+		TableWrapData td = getButtonLayoutData();
+		td.colspan = 3;
+		removeButton.setLayoutData(td);
+		removeButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				ISelection sel = xsltParamsViewer.getSelection();
+				IStructuredSelection ssel = (IStructuredSelection) sel;
+				Object obj = ssel.getFirstElement();
+				if (obj instanceof Element) {
+					Element query = (Element) obj;
+					params.getXsltElement(params.getCorpusElement()).removeChild(query);
+					update(params);
+				}
+			}
+		});
+
+		//		l = toolkit.createLabel(sectionClient, ""); // empty cell
+		//		l.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.MIDDLE));
+		//		l = toolkit.createLabel(sectionClient, ""); // empty cell
+		//		l.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.MIDDLE));
+
+		Table table = toolkit.createTable(sectionClient, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.VIRTUAL);
+		xsltParamsViewer = new TableViewer(table);
+		xsltParamsViewer.getTable().addKeyListener(new TableKeyListener(xsltParamsViewer));
+		TableWrapData gd = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL);
+		gd.colspan = 4;
+		gd.heightHint = 100;
+		xsltParamsViewer.getTable().setLayoutData(gd);
+		xsltParamsViewer.setContentProvider(new NodeListContentProvider());
+		xsltParamsViewer.getTable().setHeaderVisible(true);
+		xsltParamsViewer.getTable().setLinesVisible(true);
+
+		String[] cols = {"name", "value"}; //$NON-NLS-1$ //$NON-NLS-2$
+		for (String col : cols) {
+			TableViewerColumn columnViewer = new TableViewerColumn(xsltParamsViewer, SWT.NONE);
+			TableColumn column = columnViewer.getColumn();
+			column.setText(col);
+			column.setWidth(100);
+			columnViewer.setLabelProvider(new ElementColumnLabelProvider(col));
+		}
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		if (this.section.isDisposed()) return;
+		if (params == null) return;
+		Element xslElement = params.getXsltElement(params.getCorpusElement());
+		String filepath = xslElement.getAttribute("xsl"); //$NON-NLS-1$
+		if (filepath != null) {
+			xsltfileValue.setText(filepath);
+			xsltfile = new File(filepath);
+		}
+
+		xsltParamsViewer.getTable().getParent().layout();
+		xsltParamsViewer.setInput(xslElement.getElementsByTagName("param")); //$NON-NLS-1$
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (xsltfileValue != null && !xsltfileValue.isDisposed())
+			params.getXsltElement(params.getCorpusElement()).setAttribute("xsl", xsltfileValue.getText()); //$NON-NLS-1$
+
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/FrontXSLSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportEditorSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportEditorSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportEditorSection.java	(revision 324)
@@ -0,0 +1,67 @@
+package org.txm.rcp.editors.imports.sections;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.txm.objects.BaseParameters;
+
+public abstract class ImportEditorSection {
+	
+	protected Section section;
+	protected FormToolkit toolkit;
+	protected ScrolledForm form;
+	
+	public ImportEditorSection(FormToolkit toolkit, ScrolledForm form, Composite parent, int style) {
+		section = toolkit.createSection(parent, style);
+		this.toolkit = toolkit;
+		this.form = form;
+	}
+	
+	public abstract void update(BaseParameters params);
+	
+	public abstract boolean checkFields();
+	
+	public abstract boolean save(BaseParameters params);
+	
+	public abstract int getSectionSize(); // 1 2 3, it depends the number of element inserted in the form
+	
+	public static TableWrapData getLongTextGridData() {
+		TableWrapData gdata = new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE);
+		gdata.maxWidth = 200;
+		return gdata;
+	}
+
+	public static TableWrapData getSectionGridData(int size) {
+		TableWrapData td = new TableWrapData(TableWrapData.FILL);
+		td.colspan = size;
+		return td;
+	}
+
+	public static TableWrapData getTextGridData() {
+		TableWrapData gdata = new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE);
+		gdata.maxWidth = 150;
+		return gdata;
+	}
+	
+	public static TableWrapData getButtonLayoutData() {
+		TableWrapData td = new TableWrapData(TableWrapData.LEFT, TableWrapData.MIDDLE);
+		return td;
+	}
+	
+	public static TableWrapData getLabelGridData() {
+		TableWrapData gdata = new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE);
+		return gdata;
+	}
+	
+	public boolean isDisposed() {
+		if (section != null) return section.isDisposed();
+		return true;
+	}
+	
+	public void setEnabled(boolean b) {
+		if (section != null) section.setEnabled(b);
+	}
+}
+

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/ImportEditorSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 324)
@@ -0,0 +1,155 @@
+package org.txm.rcp.editors.imports.sections;
+
+import java.util.Locale;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Messages;
+
+public class LangSection extends ImportEditorSection {
+	
+	private static final int SECTION_SIZE = 1;
+
+	Button btnDefaultLang;
+	Button btnGuessLang;
+	Button btnSelectAnnotate;
+	Button btnSelectLang;
+	Combo langcombo;
+	
+	public LangSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
+		super(toolkit2, form2, parent, style);
+
+		this.section.setText(Messages.MainPage_20);
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		//filesection.setDescription("Select how to find source files");
+		final Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.numColumns = 2;
+		slayout.makeColumnsEqualWidth = false;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+
+		btnSelectAnnotate = toolkit.createButton(sectionClient, Messages.CorpusPage_26, SWT.CHECK); 
+		toolkit.createLabel(sectionClient, ""); //$NON-NLS-1$
+
+		btnGuessLang = toolkit.createButton(sectionClient, Messages.ImportDialog_16, SWT.RADIO);
+		toolkit.createLabel(sectionClient, ""); //$NON-NLS-1$
+
+		btnSelectLang = toolkit.createButton(sectionClient, Messages.ImportDialog_22, SWT.RADIO);
+
+		langcombo = new Combo(sectionClient, SWT.BORDER);
+		TableWrapData gdata = getTextGridData();
+		langcombo.setLayoutData(gdata);
+
+		//if widget selected change the radio buttons value
+		langcombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				btnSelectLang.setSelection(true);
+				btnGuessLang.setSelection(false);
+				//btnDefaultLang.setSelection(false);
+			}
+		});
+
+		for (String lang : Locale.getISOLanguages()) {
+			langcombo.add(lang);
+		}
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		if (this.section.isDisposed()) return;
+		if (params == null) return;
+		
+		String lang = params.getCorpusElement().getAttribute("lang"); //$NON-NLS-1$;
+		String annotate = params.getCorpusElement().getAttribute("annotate"); //$NON-NLS-1$
+		
+		//fill combo and select default language
+		String defaultLang = Locale.getDefault().getLanguage();
+		if ("??".equals(lang)) { //$NON-NLS-1$
+			btnSelectLang.setSelection(false);
+			btnGuessLang.setSelection(true);
+		} else if (lang == null) {
+			btnSelectLang.setSelection(true);
+			btnGuessLang.setSelection(false);
+		} else {
+			btnSelectLang.setSelection(true);
+			btnGuessLang.setSelection(false);
+			defaultLang = lang;
+		}
+
+		String[] data = langcombo.getItems();
+		for (int i = 0 ; i < langcombo.getItemCount() ; i++) {
+			String l = data[i];
+			if (l.equals(defaultLang)) {
+				langcombo.select(i);
+				break;
+			}
+		}
+
+		langcombo.setText(defaultLang);
+		btnSelectAnnotate.setSelection("true".equals(annotate)); //$NON-NLS-1$
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (!this.section.isDisposed()) {
+			//LANGUAGE
+			String lang = null, annotate = null;
+			
+			if (btnGuessLang != null && btnGuessLang.getSelection()) {
+				lang = "??"; //$NON-NLS-1$
+			} else if (langcombo != null)
+				lang = langcombo.getText();
+
+			if (lang == null || lang.length() == 0)
+				lang = Locale.getDefault().getLanguage();
+
+			//ANNOTATE
+			if (btnSelectAnnotate != null)
+				annotate = ""+btnSelectAnnotate.getSelection(); //$NON-NLS-1$
+
+			if (annotate == null || annotate.length() == 0)
+				annotate = "true"; //$NON-NLS-1$
+
+			params.getCorpusElement().setAttribute("annotate", annotate); //$NON-NLS-1$
+			params.getCorpusElement().setAttribute("lang", lang); //$NON-NLS-1$
+			return true;
+		}
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TextualPlansSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TextualPlansSection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TextualPlansSection.java	(revision 324)
@@ -0,0 +1,141 @@
+package org.txm.rcp.editors.imports.sections;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.Messages;
+import org.w3c.dom.Element;
+
+public class TextualPlansSection extends ImportEditorSection {
+	
+	private static final int SECTION_SIZE = 1;
+	private Text outsideTextElementsText;
+	private Text outsideTextElementsToEditText;
+	private Text noteElementsText;
+	private Text milestoneElementsText;
+	
+	public TextualPlansSection(FormToolkit toolkit2, ScrolledForm form2, Composite parent, int style) {
+		super(toolkit2, form2, parent, style);
+
+		this.section.setText(Messages.TextualPlansSection_title);
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.makeColumnsEqualWidth = true;
+		this.section.setLayout(layout);
+		this.section.setLayoutData(getSectionGridData(SECTION_SIZE));
+		this.section.setEnabled(false);
+		this.section.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+		
+		Composite sectionClient = toolkit.createComposite(this.section);
+		TableWrapLayout slayout = new TableWrapLayout();
+		slayout.makeColumnsEqualWidth = false;
+		slayout.numColumns = 2;
+		sectionClient.setLayout(slayout);
+		this.section.setClient(sectionClient);
+		
+		Label tmpLabel = toolkit.createLabel(sectionClient, Messages.TextualPlansSection_outsidetext_label);
+		tmpLabel.setToolTipText(Messages.TextualPlansSection_outsidetext_tooltip);
+		tmpLabel.setLayoutData(getLabelGridData());
+		
+		outsideTextElementsText = toolkit.createText(sectionClient, "teiHeader", SWT.BORDER); //$NON-NLS-1$
+		TableWrapData gdata = getTextGridData();
+		outsideTextElementsText.setLayoutData(gdata);
+		
+		Label tmpLabel2 = toolkit.createLabel(sectionClient, Messages.TextualPlansSection_outsidetexttoedit_label);
+		tmpLabel2.setToolTipText(Messages.TextualPlansSection_outsidetexttoedit_tooltip);
+		tmpLabel2.setLayoutData(getLabelGridData());
+
+		outsideTextElementsToEditText = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
+		gdata = getTextGridData();
+		outsideTextElementsToEditText.setLayoutData(gdata);
+
+		Label tmpLabel3 = toolkit.createLabel(sectionClient, "Note elements");
+		tmpLabel3.setToolTipText("Note elements that encodes ponctual notes");
+		tmpLabel3.setLayoutData(getLabelGridData());
+
+		noteElementsText = toolkit.createText(sectionClient, "note", SWT.BORDER); //$NON-NLS-1$
+		gdata = getTextGridData();
+		noteElementsText.setLayoutData(gdata);
+		
+		Label tmpLabel4 = toolkit.createLabel(sectionClient, Messages.TextualPlansSection_milestone_label);
+		tmpLabel4.setToolTipText(Messages.TextualPlansSection_milestone_tooltip);
+		tmpLabel4.setLayoutData(getLabelGridData());
+
+		milestoneElementsText = toolkit.createText(sectionClient, "", SWT.BORDER); //$NON-NLS-1$
+		gdata = getTextGridData();
+		milestoneElementsText.setLayoutData(gdata);
+	}
+
+	@Override
+	public void update(BaseParameters params) {
+		Element textualplansElement = params.getTextualPlans(); //$NON-NLS-1$
+		if (textualplansElement != null) {
+			Element outsideTextElement = params.getOutSideTextTagsElement();
+			if (outsideTextElement != null)
+				outsideTextElementsText.setText(outsideTextElement.getTextContent());
+			
+			Element outsideTextToEditElement = params.getOutSideTextTagsAndKeepContentElement();
+			if (outsideTextToEditElement != null)
+				outsideTextElementsToEditText.setText(outsideTextToEditElement.getTextContent());
+
+			Element noteElement = params.getNoteElement();
+			if (noteElement != null)
+				noteElementsText.setText(noteElement.getTextContent());
+
+			Element milestonesElement = params.getMilestonesElement();
+			if (milestonesElement != null)
+				milestoneElementsText.setText(milestonesElement.getTextContent());
+		} else {
+			System.out.println(Messages.TextualPlansSection_update_error);
+		}
+	}
+
+	@Override
+	public boolean save(BaseParameters params) {
+		if (this.section != null && !section.isDisposed()) {
+			Element textualplansElement = params.getTextualPlans();
+			if (textualplansElement != null) {
+				Element outsideTextElement = params.getOutSideTextTagsElement();
+				outsideTextElement.setAttribute("type", "list"); //$NON-NLS-1$ //$NON-NLS-2$
+				outsideTextElement.setTextContent(outsideTextElementsText.getText());
+				
+				Element outsideTextToEditElement = params.getOutSideTextTagsAndKeepContentElement();
+				outsideTextToEditElement.setAttribute("type", "list"); //$NON-NLS-1$ //$NON-NLS-2$
+				outsideTextToEditElement.setTextContent(outsideTextElementsToEditText.getText());
+			
+				Element noteElement = params.getNoteElement();
+				noteElement.setAttribute("type", "list"); //$NON-NLS-1$ //$NON-NLS-2$
+				noteElement.setTextContent(noteElementsText.getText());
+							
+				Element milestonesElement = params.getMilestonesElement();
+				milestonesElement.setTextContent(milestoneElementsText.getText().trim());
+			} else {
+				System.out.println(Messages.TextualPlansSection_save_error);
+				return false;
+			}
+			return true;
+		}
+
+		return true;
+	}
+
+	@Override
+	public boolean checkFields() {
+		return true;
+	}
+
+	@Override
+	public int getSectionSize() {
+		return SECTION_SIZE;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TextualPlansSection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 324)
@@ -0,0 +1,1115 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.imports;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashMap;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.events.HyperlinkAdapter;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Hyperlink;
+import org.eclipse.ui.forms.widgets.ImageHyperlink;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.objects.BaseParameters;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.ExecuteImportScript;
+import org.txm.rcp.editors.imports.sections.EditionSection;
+import org.txm.rcp.editors.imports.sections.EncodingSection;
+import org.txm.rcp.editors.imports.sections.FontSection;
+import org.txm.rcp.editors.imports.sections.FrontXSLSection;
+import org.txm.rcp.editors.imports.sections.ImportEditorSection;
+import org.txm.rcp.editors.imports.sections.InfosSection;
+import org.txm.rcp.editors.imports.sections.LangSection;
+import org.txm.rcp.editors.imports.sections.OptionsSection;
+import org.txm.rcp.editors.imports.sections.TextualPlansSection;
+import org.txm.rcp.editors.imports.sections.TokenizerSection;
+import org.txm.rcp.editors.imports.sections.UISection;
+import org.txm.utils.AsciiUtils;
+import org.txm.utils.logger.Log;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * The Class CorpusPage.
+ * set corpus parameters
+ */
+public class CorpusPage extends FormPage {
+
+	private static String lastOpenedSrcDir;
+
+	ImportFormEditor editor;
+	ScrolledForm form;
+	FormToolkit toolkit;
+
+	HashMap<String, Boolean> moduleParams; // the import sections configuration depends on the import module selected
+
+	// All the sections that populate the import parameter file
+	Section pattrSection;
+	Section preBuildSection;
+	Section querySection;
+	Section sattrSection;
+	ImportEditorSection uiSection;
+	ImportEditorSection xsltSection;
+	ImportEditorSection tokenizerSection;
+	ImportEditorSection editionSection;
+	ImportEditorSection encodingSection;
+	ImportEditorSection fontSection;
+	ImportEditorSection infosSection;
+	ImportEditorSection langSection;
+	ImportEditorSection textualPlansSection;
+	ImportEditorSection optionsSection;
+	
+	// old widgets to be moved/deleted
+	TableViewer preBuildViewer;
+	TreeViewer preBuildViewer2;
+	TableViewer queriesViewer;
+	TableViewer sattributesViewer;
+	TableViewer editionsViewer;
+	TableViewer viewer;
+	TableViewer pattributesViewer;
+	
+	/** The srcdir: directory selected that contains the source files. */
+	private File srcDir;
+	private File paramFile;
+	private BaseParameters params;
+	
+	/**
+	 * Instantiates a new main page.
+	 *
+	 * @param editor the editor
+	 * @param corpusname 
+	 */
+	public CorpusPage(ImportFormEditor editor) {
+		super(editor, Messages.CorpusPage_30, Messages.CorpusPage_30); 
+		this.editor = editor;
+	}
+	
+	private int createEditionsSection() {
+		editionSection = new EditionSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE, moduleParams, editor.getGroovyScript().getName());
+		return editionSection.getSectionSize();
+	}
+
+	private int createEmptyCell() {
+		Label l = toolkit.createLabel(form.getBody(), "", SWT.NONE); //$NON-NLS-1$
+		TableWrapData td = new TableWrapData();
+		td.colspan = 1;
+		l.setLayoutData(td);
+		
+		return 1;
+	}
+	
+	private int createEncodingSection() {
+		encodingSection = new EncodingSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		return encodingSection.getSectionSize();
+	}
+
+	private int createFontSection() {
+		fontSection = new FontSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		return fontSection.getSectionSize();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+	 */
+	@Override
+	protected void createFormContent(final IManagedForm managedForm) {
+		form = managedForm.getForm();
+		toolkit = managedForm.getToolkit();
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.numColumns = 2;
+		layout.makeColumnsEqualWidth = false;
+
+		form.getBody().setLayout(layout);
+
+		createToolbar();
+		
+		String importName = editor.getGroovyscript().getName();
+		moduleParams = ImportModuleCustomization.getParameters(importName);
+		
+		// CREATE THE SECTIONS
+		int N_SECTIONS = 0;
+		N_SECTIONS += createInfosSection(); // mandatory
+
+		if (moduleParams.get(ImportModuleCustomization.ENCODING)) {
+			N_SECTIONS += createEncodingSection();
+		}
+
+		if (moduleParams.get(ImportModuleCustomization.LANG)) {
+			N_SECTIONS += createLangSection();
+		}
+
+		if (moduleParams.get(ImportModuleCustomization.TOKENIZER)) {
+			N_SECTIONS += createTokenizerSection();
+		}
+		
+		if (moduleParams.get(ImportModuleCustomization.XSLT)) {
+			if (N_SECTIONS%2 != 0) { // needs 2 cells to draw
+				N_SECTIONS += createEmptyCell();
+			}
+			N_SECTIONS += createFrontXSLTSection();
+		}
+
+		if (moduleParams.get(ImportModuleCustomization.EDITIONS_PAGEELEMENT) || moduleParams.get(ImportModuleCustomization.EDITIONS_WORDSPERPAGE) ) {
+			N_SECTIONS += createEditionsSection();
+		}
+		
+		N_SECTIONS += createFontSection();
+
+		if (moduleParams.get(ImportModuleCustomization.UI)) {
+			N_SECTIONS += createUIsSection();
+		}
+		
+		if (moduleParams.get(ImportModuleCustomization.TEXTUALPLANS)) {
+			N_SECTIONS += createTextualPlansSection();
+		}
+		if (moduleParams.get(ImportModuleCustomization.OPTIONS)) {
+			N_SECTIONS += createOptionsSection();
+		}
+
+		// END OF SECTIONS CREATION, ENSURE THAT THE NUMBER OF CELL is %2
+		if (N_SECTIONS%2 != 0) N_SECTIONS += createEmptyCell();
+		
+		// create notes messages
+		Label separatorLabel = toolkit.createLabel(form.getBody(), "",SWT.SEPARATOR | SWT.HORIZONTAL); //$NON-NLS-1$
+		TableWrapData gdata = new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.MIDDLE, 2,1);
+		gdata.colspan = 2;
+		separatorLabel.setLayoutData(gdata);
+
+		Label mandatoryLabel = toolkit.createLabel(form.getBody(), Messages.CorpusPage_40, SWT.WRAP);
+		gdata = new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE, 2,1);
+		gdata.colspan = 2;
+		mandatoryLabel.setLayoutData(gdata);
+
+		form.layout(true);
+		managedForm.reflow(true);
+	}
+
+	private int createTextualPlansSection() {
+		textualPlansSection = new TextualPlansSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		return textualPlansSection.getSectionSize();
+	}
+	
+	private int createOptionsSection() {
+		optionsSection = new OptionsSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		return optionsSection.getSectionSize();
+	}
+
+	private int createInfosSection() {
+		infosSection = new InfosSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		return infosSection.getSectionSize();
+	}
+
+	/**
+	 * Creates the front xslt section.
+	 */
+	private int createFrontXSLTSection() {
+		xsltSection = new FrontXSLSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE, params);
+		return xsltSection.getSectionSize();
+	}
+
+	/**
+	 * Creates the lang section.
+	 */
+	private int createLangSection() {
+		langSection = new LangSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		return langSection.getSectionSize();
+	}
+
+	private void createPAttributesSection() {
+	/*	pattrSection = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		pattrSection.setText(Messages.CorpusPage_10);
+		GridLayout layout = new GridLayout(1, true);
+		pattrSection.setLayout(layout);
+		pattrSection.setLayoutData(getSectionGridData(2));
+		pattrSection.setEnabled(false);
+
+		pattrSection.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		Composite sectionClient = toolkit.createComposite(pattrSection);
+		sectionClient.setLayout(new GridLayout(2, false));
+		pattrSection.setClient(sectionClient);
+
+		Button addButton = toolkit.createButton(sectionClient, Messages.CorpusPage_11, SWT.PUSH);
+		addButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		addButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
+				values.put("id", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("shortname", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("longname", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("pattern", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("renderer", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("tooltip", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("type", "String"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("import", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("mandatory", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("inputFormat", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("outputFormat", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+				MultipleValueDialog dlg = new MultipleValueDialog(form.getShell(), Messages.CorpusPage_12, values);
+				if (dlg.open() == Window.OK) {
+					params.addPAttribute(params.getCorpusElement(), values.get("id"), values.get("shortname"), values.get("longname"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							values.get("type"), values.get("renderer"), values.get("tooltip"),  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							values.get("pattern"), values.get("import"), values.get("mandatory"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							values.get("inputFormat"), values.get("outputFormat")); //$NON-NLS-1$ //$NON-NLS-2$
+					updatePAttributeSection();
+				}
+			}
+		});
+
+		Button removeButton = toolkit.createButton(sectionClient, Messages.CorpusPage_13, SWT.PUSH);
+		removeButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		removeButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				ISelection sel = pattributesViewer.getSelection();
+				IStructuredSelection ssel = (IStructuredSelection) sel;
+				Object obj = ssel.getFirstElement();
+				if (obj instanceof Element) {
+					Element query = (Element) obj;
+					params.getPAttributesElement(params.getCorpusElement()).removeChild(query);
+					updatePAttributeSection();
+				}
+			}
+		});
+
+		Table table = toolkit.createTable(sectionClient, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.VIRTUAL);
+		pattributesViewer = new TableViewer(table);
+		pattributesViewer.getTable().addKeyListener(new TableKeyListener(pattributesViewer));
+		GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false,2,1);
+		gd.heightHint = 150;
+		pattributesViewer.getTable().setLayoutData(gd);
+		pattributesViewer.setContentProvider(new NodeListContentProvider());
+		pattributesViewer.getTable().setHeaderVisible(true);
+		pattributesViewer.getTable().setLinesVisible(true);
+
+		String[] cols = {"id", "shortname", "longname", "import", "mandatory", "pattern", "renderer", "tooltip", "type"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+		for (String col : cols) {
+			TableViewerColumn columnViewer = new TableViewerColumn(pattributesViewer, SWT.NONE);
+			TableColumn column = columnViewer.getColumn();
+			column.setText(col);
+			column.setWidth(100);
+			columnViewer.setLabelProvider(new ElementColumnLabelProvider(col));
+		}
+	*/
+	}
+	private void createPreBuildSection() {
+	/*	preBuildSection = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		preBuildSection.setText(Messages.CorpusPage_14);
+		GridLayout layout = new GridLayout(1, true);
+		preBuildSection.setLayout(layout);
+		preBuildSection.setLayoutData(getSectionGridData(2));
+		preBuildSection.setEnabled(false);
+
+		preBuildSection.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		Composite sectionClient = toolkit.createComposite(preBuildSection);
+		sectionClient.setLayout(new GridLayout(4, false));
+		preBuildSection.setClient(sectionClient);
+
+		Button addButton = toolkit.createButton(sectionClient, Messages.CorpusPage_15, SWT.PUSH);
+		addButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		addButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
+				values.put("subcorpus", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("query", "[]"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("desc", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				MultipleValueDialog dlg = new MultipleValueDialog(form.getShell(), Messages.CorpusPage_15, values);
+				if (dlg.open() == Window.OK) {
+					params.addSubcorpus(params.getCorpusElement(), values.get("subcorpus"), values.get("query"), values.get("desc")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					updatePreBuildSection();
+				}
+			}
+		});
+
+		Button removeButton = toolkit.createButton(sectionClient, Messages.CorpusPage_17, SWT.PUSH);
+		removeButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		removeButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				ISelection sel = preBuildViewer.getSelection();
+				IStructuredSelection ssel = (IStructuredSelection) sel;
+				Object obj = ssel.getFirstElement();
+				if (obj instanceof Element) {
+					Element subcorpus = (Element) obj;
+					System.out.println("SELECTED: "+subcorpus); //$NON-NLS-1$
+					params.getPreBuildElement(params.getCorpusElement()).removeChild(subcorpus);
+					updatePreBuildSection();
+				}
+			}
+		});
+
+		Button add2Button = toolkit.createButton(sectionClient, Messages.CorpusPage_18, SWT.PUSH);
+		add2Button.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		add2Button.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
+				values.put("partition", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				ArrayList<LinkedHashMap<String, String>> subvaluesArray = new ArrayList<LinkedHashMap<String, String>>();
+				LinkedHashMap<String, String> subvalues = new LinkedHashMap<String, String>();
+				subvaluesArray.add(subvalues);
+				subvalues.put("part", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				subvalues.put("query", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				MultipleValueTreeDialog dlg = new MultipleValueTreeDialog(form.getShell(), Messages.CorpusPage_18, values, subvaluesArray, "part"); //$NON-NLS-1$
+				if (dlg.open() == Window.OK) {
+					String[] names = new String[subvaluesArray.size()];
+					String[] queries = new String[subvaluesArray.size()];
+					for (int i = 0 ; i < subvaluesArray.size() ; i++) {
+						LinkedHashMap<String, String> it = subvaluesArray.get(i);
+						names[i] = it.get("part"); //$NON-NLS-1$
+						queries[i] = it.get("query"); //$NON-NLS-1$
+					}
+					params.addPartition(params.getCorpusElement(), values.get("partition"), queries, names); //$NON-NLS-1$
+					updatePreBuildSection();
+				}
+			}
+		});
+
+		Button remove2Button = toolkit.createButton(sectionClient, Messages.CorpusPage_20, SWT.PUSH);
+		remove2Button.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		remove2Button.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				ISelection sel = preBuildViewer2.getSelection();
+				IStructuredSelection ssel = (IStructuredSelection) sel;
+				Object obj = ssel.getFirstElement();
+				System.out.println("SELECTED: "+obj); //$NON-NLS-1$
+				if (obj instanceof Element) {
+					Element partitionElem = (Element) obj;
+					if (partitionElem.getParentNode().equals(params.getPreBuildElement(params.getCorpusElement())))
+					{	params.getPreBuildElement(params.getCorpusElement()).removeChild(partitionElem);
+					updatePreBuildSection();
+					}
+				}
+			}
+		});
+
+		Table table = toolkit.createTable(sectionClient, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.VIRTUAL);
+		preBuildViewer = new TableViewer(table);
+		preBuildViewer.getTable().addKeyListener(new TableKeyListener(preBuildViewer));
+		GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false,1,1);
+		gd.heightHint = 150;
+		preBuildViewer.getTable().setLayoutData(gd);
+		preBuildViewer.setContentProvider(new NodeListContentProvider());
+		preBuildViewer.getTable().setHeaderVisible(true);
+		preBuildViewer.getTable().setLinesVisible(true);
+
+		String[] cols = {"name", "query", "desc"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		for (String col : cols) {
+			TableViewerColumn columnViewer = new TableViewerColumn(preBuildViewer, SWT.NONE);
+			TableColumn column = columnViewer.getColumn();
+			column.setText(col);
+			column.setWidth(100);
+			columnViewer.setLabelProvider(new ElementColumnLabelProvider(col));
+		}
+
+		Tree table2 = toolkit.createTree(sectionClient, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.VIRTUAL);
+		preBuildViewer2 = new TreeViewer(table2);
+		GridData gd2 = new GridData(GridData.FILL, GridData.FILL, false, false, 3, 1);
+		gd2.heightHint = 150;
+		preBuildViewer2.getTree().setLayoutData(gd2);
+		preBuildViewer2.getTree().setHeaderVisible(true);
+		preBuildViewer2.getTree().setLinesVisible(true);
+
+		String[] cols1 = {"name"}; //$NON-NLS-1$
+		String[] cols2 = {"name", "query"}; //$NON-NLS-1$ //$NON-NLS-2$
+		preBuildViewer2.setContentProvider(new ElementTreeContentProvider("partition", "part", cols1, cols2)); //$NON-NLS-1$ //$NON-NLS-2$
+		//preBuildViewer2.setLabelProvider(new ElementTreeLabelProvider("partition", "part", cols1, cols2));
+
+		int c = 0;
+		for (String col : cols2) {
+			TreeViewerColumn columnViewer = new TreeViewerColumn(preBuildViewer2, SWT.NONE);
+			TreeColumn column = columnViewer.getColumn();
+			column.setText(col);
+			column.setWidth(100);
+			columnViewer.setLabelProvider(new ElementTreeLabelProvider(c++, "partition", "part", cols1, cols2)); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		*/
+	}
+	private void createQueriesSection() {
+	/*	querySection = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		querySection.setText("Queries"); //$NON-NLS-1$
+		GridLayout layout = new GridLayout(1, true);
+		querySection.setLayout(layout);
+		querySection.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false, 2, 1));
+		querySection.setEnabled(false);
+
+		querySection.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		//filesection.setDescription("Select how to find source files");
+		Composite sectionClient = toolkit.createComposite(querySection);
+		sectionClient.setLayout(new GridLayout(2, false));
+		querySection.setClient(sectionClient);
+
+		Button addButton = toolkit.createButton(sectionClient, Messages.CorpusPage_21, SWT.PUSH);
+		addButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		addButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {				
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
+				values.put("name", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("query", "[]"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("desc", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				MultipleValueDialog dlg = new MultipleValueDialog(form.getShell(), Messages.CorpusPage_21, values);
+				if (dlg.open() == Window.OK) {
+					params.addQuery(params.getCorpusElement(), values.get("name"), values.get("query"), values.get("desc")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					updateQuerySection();
+				}
+			}
+		});
+
+		Button removeButton = toolkit.createButton(sectionClient, Messages.CorpusPage_23, SWT.PUSH);
+		removeButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
+		removeButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				ISelection sel = queriesViewer.getSelection();
+				IStructuredSelection ssel = (IStructuredSelection) sel;
+				Object obj = ssel.getFirstElement();
+				if (obj instanceof Element) {
+					Element query = (Element) obj;
+					params.getQueriesElement(params.getCorpusElement()).removeChild(query);
+					updateQuerySection();
+				}
+			}
+		});
+
+		Table table = toolkit.createTable(sectionClient, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.VIRTUAL);
+		queriesViewer = new TableViewer(table);
+		queriesViewer.getTable().addKeyListener(new TableKeyListener(queriesViewer));
+		GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false,2,1);
+		gd.heightHint = 150;
+		queriesViewer.getTable().setLayoutData(gd);
+		queriesViewer.setContentProvider(new NodeListContentProvider());
+		queriesViewer.getTable().setHeaderVisible(true);
+		queriesViewer.getTable().setLinesVisible(true);
+
+		String[] cols = {"name", "value", "desc"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		for (String col : cols) {
+			TableViewerColumn columnViewer = new TableViewerColumn(queriesViewer, SWT.NONE);
+			TableColumn column = columnViewer.getColumn();
+			column.setText(col);
+			column.setWidth(100);
+			columnViewer.setLabelProvider(new ElementColumnLabelProvider(col));
+		}
+		*/
+	}
+	private void createSAttributesSection() {
+	/*	sattrSection = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		sattrSection.setText(Messages.CorpusPage_24);
+		GridLayout layout = new GridLayout(1, true);
+		sattrSection.setLayout(layout);
+		sattrSection.setLayoutData(getSectionGridData(2));
+		sattrSection.setEnabled(false);
+
+		sattrSection.addExpansionListener(new ExpansionAdapter() {
+			@Override
+			public void expansionStateChanged(ExpansionEvent e) {form.layout(true);}
+		});
+
+		Composite sectionClient = toolkit.createComposite(sattrSection);
+		sectionClient.setLayout(new GridLayout(2, false));
+		sattrSection.setClient(sectionClient);
+
+		Button addButton = toolkit.createButton(sectionClient, Messages.CorpusPage_25, SWT.PUSH);
+		addButton.setLayoutData(new GridData(GridData.BEGINNING, GridData.FILL, false, false));
+		addButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (params == null) return;
+				LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
+				values.put("id", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("shortname", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("longname", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("pattern", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("renderer", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("tooltip", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("type", "String"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("import", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("mandatory", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("inputFormat", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				values.put("outputFormat", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+				MultipleValueDialog dlg = new MultipleValueDialog(form.getShell(), Messages.CorpusPage_25, values);
+				if (dlg.open() == Window.OK) {
+					params.addSAttribute(params.getCorpusElement(), values.get("id"), values.get("shortname"), values.get("longname"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							values.get("type"), values.get("renderer"), values.get("tooltip"),  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							values.get("pattern"), values.get("import"), values.get("mandatory"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							values.get("inputFormat"), values.get("outputFormat")); //$NON-NLS-1$ //$NON-NLS-2$
+					updateSAttributeSection();
+				}
+			}
+		});
+
+		Button removeButton = toolkit.createButton(sectionClient, Messages.CorpusPage_27, SWT.PUSH);
+		removeButton.setLayoutData(new GridData(GridData.BEGINNING, GridData.FILL, false, false));
+		removeButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if ( params == null) return;
+				ISelection sel = sattributesViewer.getSelection();
+				IStructuredSelection ssel = (IStructuredSelection) sel;
+				Object obj = ssel.getFirstElement();
+				if (obj instanceof Element) {
+					Element query = (Element) obj;
+					params.getSAttributesElement(params.getCorpusElement()).removeChild(query);
+					updateSAttributeSection();
+				}
+			}
+		});
+
+		Table table = toolkit.createTable(sectionClient, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.VIRTUAL);
+		sattributesViewer = new TableViewer(table);
+		sattributesViewer.getTable().addKeyListener(new TableKeyListener(sattributesViewer));
+		GridData gdata = new GridData(GridData.FILL, GridData.FILL, false, false,2,1);
+		gdata.heightHint = 150;
+		sattributesViewer.getTable().setLayoutData(gdata);
+		sattributesViewer.setContentProvider(new NodeListContentProvider());
+		sattributesViewer.getTable().setHeaderVisible(true);
+		sattributesViewer.getTable().setLinesVisible(true);
+
+		String[] cols = {"id", "shortname", "longname", "import", "mandatory", "pattern", "renderer", "tooltip", "type"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+		for (String col : cols) {
+			TableViewerColumn columnViewer = new TableViewerColumn(sattributesViewer, SWT.NONE);
+			TableColumn column = columnViewer.getColumn();
+			column.setText(col);
+			//column.setWidth(10*col.length());
+			columnViewer.setLabelProvider(new ElementColumnLabelProvider(col));
+			column.pack();
+		}
+		*/
+	}
+	
+	/**
+	 * Creates the tokenizer section.
+	 */
+	private int createTokenizerSection() {
+		tokenizerSection = new TokenizerSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE, moduleParams);
+		return tokenizerSection.getSectionSize();
+	}
+	
+	private void createToolbar() {
+		Composite hyperlinks = toolkit.createComposite(form.getBody());
+		TableWrapData gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL, 2, 1);
+		gdata.colspan = 2;
+		hyperlinks.setLayoutData(gdata);
+
+		TableWrapLayout layout = new TableWrapLayout();
+		layout.numColumns = 3;
+		layout.makeColumnsEqualWidth = false;
+		hyperlinks.setLayout(layout);
+
+		Label titleLabel = toolkit.createLabel(hyperlinks,"", SWT.WRAP); //$NON-NLS-1$
+		titleLabel.setLayoutData(new TableWrapData(TableWrapData.FILL, TableWrapData.TOP));
+		titleLabel.setText(NLS.bind(Messages.MainPage_2, 
+				ImportModuleCustomization.getName(editor.getGroovyScript().getName())));
+		FontData[] fD = titleLabel.getFont().getFontData();
+		fD[0].setHeight(16);
+		titleLabel.setFont( new Font(titleLabel.getDisplay(),fD[0]));
+
+		HyperlinkAdapter selectDirHListener = new HyperlinkAdapter() {
+			@Override
+			public void linkActivated(HyperlinkEvent e) {
+				//System.out.println("Opening...");
+				selectSourceDir();
+			}
+		};
+
+		HyperlinkAdapter startImportListener = new HyperlinkAdapter() {
+			@Override
+			public void linkActivated(HyperlinkEvent e) {
+				//System.out.println("Starting...");
+				if (params != null) {
+					if (saveConfig()) {
+						startImport();
+					}
+				} else 
+					System.out.println(Messages.CorpusPage_66);
+			}
+		};
+
+		ImageHyperlink openImportLink = toolkit.createImageHyperlink(hyperlinks, SWT.NULL);
+		openImportLink.setLayoutData(new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE));
+		openImportLink.setImage(IImageKeys.getImage(IImageKeys.FOLDER));
+		openImportLink.addHyperlinkListener(selectDirHListener);
+
+		ImageHyperlink startImportLink = toolkit.createImageHyperlink(hyperlinks, SWT.NULL);
+		startImportLink.setLayoutData(new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE));
+		startImportLink.setImage(IImageKeys.getImage(IImageKeys.START));
+		startImportLink.addHyperlinkListener(startImportListener);	
+
+
+		Composite line1 = toolkit.createComposite(form.getBody());
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL, 2, 1);
+		gdata.colspan = 2;
+		line1.setLayoutData(gdata);
+		RowLayout hLayout = new RowLayout();
+		hLayout.center = true;
+		line1.setLayout(hLayout);
+		toolkit.createLabel(line1, Messages.CorpusPage_35, SWT.WRAP);
+
+		Hyperlink hyperlink1 = toolkit.createHyperlink(line1, Messages.CorpusPage_37, SWT.WRAP);
+		hyperlink1.addHyperlinkListener(selectDirHListener);
+
+		ImageHyperlink openImportLink2 = toolkit.createImageHyperlink(line1, SWT.WRAP);
+		openImportLink2.setImage(IImageKeys.getImage(IImageKeys.FOLDER));
+		openImportLink2.addHyperlinkListener(selectDirHListener);
+
+		Composite line2 = toolkit.createComposite(form.getBody());
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL, 2, 1);
+		gdata.colspan = 2;
+		line2.setLayoutData(gdata);
+		hLayout = new RowLayout();
+		hLayout.center = true;
+		line2.setLayout(hLayout);
+		toolkit.createLabel(line2, Messages.CorpusPage_38, SWT.WRAP);
+		toolkit.createLabel(line2, Messages.CorpusPage_39, SWT.WRAP);
+
+		Composite line4 = toolkit.createComposite(form.getBody());
+		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL, 2, 1);
+		gdata.colspan = 2;
+		line4.setLayoutData(gdata);
+		hLayout = new RowLayout();
+		hLayout.center = true;
+		line4.setLayout(hLayout);
+		toolkit.createLabel(line4, Messages.CorpusPage_42);
+		Hyperlink hyperlink3 = toolkit.createHyperlink(line4, Messages.CorpusPage_43, SWT.WRAP);
+		hyperlink3.addHyperlinkListener(startImportListener);
+		ImageHyperlink startImportLink2 = toolkit.createImageHyperlink(line4, SWT.NULL);
+		startImportLink2.setImage(IImageKeys.getImage(IImageKeys.START));
+		startImportLink2.addHyperlinkListener(startImportListener);
+	}
+
+	private int createUIsSection() {
+		uiSection = new UISection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		return uiSection.getSectionSize();
+	}
+
+	/**
+	 * Called by "selectSourceDir". 
+	 * Theparameter file is read to fill the section fields.
+	 * 
+	 * @throws ParserConfigurationException
+	 * @throws SAXException
+	 * @throws IOException
+	 */
+	public void loadParams() throws ParserConfigurationException, SAXException, IOException {
+		paramFile = new File(srcDir, "import.xml"); //$NON-NLS-1$
+		if (!paramFile.exists()) {
+			
+			String basename = srcDir.getName();
+			basename = AsciiUtils.buildId(basename).toUpperCase(); // force binary corpus name to uppercase
+			if (basename.length() == 0) {
+				System.out.println(Messages.CorpusPage_92+basename);
+				return;
+			}
+			
+			Log.warning(Messages.CorpusPage_46);
+			BaseParameters.createEmptyParams(paramFile, basename);
+		}
+		if (!paramFile.exists()) {
+			System.out.println(Messages.CorpusPage_47);
+			return;
+		}
+		params = new BaseParameters(paramFile);
+		params.scriptFile = editor.getGroovyscript().getName();
+		params.load();
+		
+		// force root directory to the selected source directory, see the #1263 ticket
+		params.rootDir = srcDir.getAbsolutePath(); 
+		
+		System.out.println(Messages.CorpusPage_48 + paramFile);
+		Log.info("Params: "+params); //$NON-NLS-1$
+
+		File metadataFile = new File(params.rootDir, "metadata.csv"); //$NON-NLS-1$
+		if (metadataFile.exists())
+			this.editor.getMetaPage().setMetadataFile(metadataFile);
+
+		Log.info(Messages.CorpusPage_50+moduleParams);
+		this.setPartName(params.getCorpusName());
+
+		if (infosSection != null && !infosSection.isDisposed()) {
+			infosSection.setEnabled(true);
+			infosSection.update(params);
+		}
+		if (langSection != null && !langSection.isDisposed()) {
+			langSection.setEnabled(true);
+			langSection.update(params);
+		}
+		if (xsltSection != null && !xsltSection.isDisposed()) {
+			xsltSection.setEnabled(true);
+			xsltSection.update(params);
+		}
+		if (tokenizerSection != null && !tokenizerSection.isDisposed()) {
+			tokenizerSection.setEnabled(true);
+			tokenizerSection.update(params);
+		}
+		if (uiSection != null && !uiSection.isDisposed()) {
+			uiSection.setEnabled(true);
+			uiSection.update(params);
+		}
+		if (encodingSection != null && !encodingSection.isDisposed()) {
+			encodingSection.setEnabled(true);
+			encodingSection.update(params);
+		}
+		if (editionSection != null && !editionSection.isDisposed()) {
+			editionSection.setEnabled(true);
+			editionSection.update(params);
+		}
+		if (fontSection != null && !fontSection.isDisposed()) {
+			fontSection.setEnabled(true);
+			fontSection.update(params);
+		}
+		if (textualPlansSection != null && !textualPlansSection.isDisposed()) {
+			textualPlansSection.setEnabled(true);
+			textualPlansSection.update(params);
+		}
+		
+		if (optionsSection != null && !optionsSection.isDisposed()) {
+			optionsSection.setEnabled(true);
+			optionsSection.update(params);
+		}
+		
+		/*
+		if (sattrSection != null && !sattrSection.isDisposed()) {
+			sattrSection.setEnabled(true);
+		}
+		
+		if (querySection != null && !querySection.isDisposed()) {
+			querySection.setEnabled(true);
+			updateQuerySection();
+		}
+		if (preBuildSection != null && !preBuildSection.isDisposed()) {
+			preBuildSection.setEnabled(true);
+			updatePreBuildSection();
+		}
+		if (pattrSection != null && !pattrSection.isDisposed()) {
+			pattrSection.setEnabled(true);
+			updatePAttributeSection();
+		}
+		*/
+	}
+
+	/**
+	 * Called by "startImport". Save the field values in the Parameter file
+	 * @return
+	 */
+	public boolean saveConfig() {
+		System.out.println(Messages.CorpusPage_52);
+		
+		params.rootDir = srcDir.getAbsolutePath();
+		params.scriptFile = editor.getGroovyScript().getName();
+
+		params.getCorpusElement().setAttribute("name", params.name); //$NON-NLS-1$
+		params.getCorpusElement().setAttribute("desc", params.description); //$NON-NLS-1$
+		params.getCorpusElement().setAttribute("cqpid", params.name.toUpperCase()+new Date().getTime()); //$NON-NLS-1$
+
+		// TEST ALL SECTIONS
+		boolean doSave = true;
+		if (infosSection != null && !infosSection.isDisposed()) {
+			doSave = doSave & infosSection.checkFields();
+		}
+		if (langSection != null && !langSection.isDisposed()) {
+			doSave = doSave & langSection.checkFields();
+		}
+		if (xsltSection != null && !xsltSection.isDisposed()) {
+			doSave = doSave & xsltSection.checkFields();
+		}
+		if (tokenizerSection != null && !tokenizerSection.isDisposed()) {
+			doSave = doSave & tokenizerSection.checkFields();
+		}
+		if (uiSection != null && !uiSection.isDisposed()) {
+			doSave = doSave & uiSection.checkFields();
+		}
+		if (encodingSection != null && !encodingSection.isDisposed()) {
+			doSave = doSave & encodingSection.checkFields();
+		}
+		if (editionSection != null && !editionSection.isDisposed()) {
+			doSave = doSave & editionSection.checkFields();
+		}
+		if (fontSection != null && !fontSection.isDisposed()) {
+			doSave = doSave & fontSection.checkFields();
+		}
+		if (textualPlansSection != null && !textualPlansSection.isDisposed()) {
+			doSave = doSave & textualPlansSection.checkFields();
+		}
+		if (optionsSection != null && !optionsSection.isDisposed()) {
+			doSave = doSave & optionsSection.checkFields();
+		}
+		if (!doSave) {
+			System.out.println("Some fields are not correctly filled.");
+			return false;
+		}
+		
+		// SAVE ALL SECTIONS
+		boolean successfulSave = true;
+		if (infosSection != null && !infosSection.isDisposed()) {
+			successfulSave = successfulSave & infosSection.save(params);
+		}
+		if (langSection != null && !langSection.isDisposed()) {
+			successfulSave = successfulSave & langSection.save(params);
+		}
+		if (xsltSection != null && !xsltSection.isDisposed()) {
+			successfulSave = successfulSave & xsltSection.save(params);
+		}
+		if (tokenizerSection != null && !tokenizerSection.isDisposed()) {
+			successfulSave = successfulSave & tokenizerSection.save(params);
+		}
+		if (uiSection != null && !uiSection.isDisposed()) {
+			successfulSave = successfulSave & uiSection.save(params);
+		}
+		if (encodingSection != null && !encodingSection.isDisposed()) {
+			successfulSave = successfulSave & encodingSection.save(params);
+		}
+		if (editionSection != null && !editionSection.isDisposed()) {
+			successfulSave = successfulSave & editionSection.save(params);
+		}
+		if (fontSection != null && !fontSection.isDisposed()) {
+			successfulSave = successfulSave & fontSection.save(params);
+		}
+		if (textualPlansSection != null && !textualPlansSection.isDisposed()) {
+			successfulSave = successfulSave & textualPlansSection.save(params);
+		}
+		if (optionsSection != null && !optionsSection.isDisposed()) {
+			successfulSave = successfulSave & optionsSection.save(params);
+		}
+		
+		if (successfulSave) {
+			try {
+				params.save(paramFile);
+//				DomUtils.save(params.root.getOwnerDocument(), paramFile);
+			} catch (Exception e1) {
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
+			}
+
+			return true;
+		}
+		System.out.println("Error while saving parameters.");
+		return false;
+		
+	}
+
+	/**
+	 * Called by the "folder" button 
+	 */
+	public void selectSourceDir() {
+		DirectoryDialog dialog = new DirectoryDialog(form.getShell(), SWT.OPEN);
+
+		if (lastOpenedSrcDir != null) {
+			dialog.setFilterPath(lastOpenedSrcDir);
+		} else if (lastOpenedSrcDir != null) {
+			dialog.setFilterPath(Toolbox.getParam(TBXPreferences.USER_TXM_HOME));
+		} else
+			dialog.setFilterPath(new File(TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR), "corpora").getAbsolutePath()); //$NON-NLS-1$
+
+		if (dialog.open() != null) {
+			String path = dialog.getFilterPath();
+			lastOpenedSrcDir = path;
+			srcDir = new File(path);
+
+			if (!srcDir.isDirectory()) {
+				System.out.println(Messages.CorpusPage_90+srcDir);
+				return;
+			}
+
+			if (!(srcDir.canRead() && srcDir.canExecute())) {
+				System.out.println(Messages.CorpusPage_91+srcDir);
+				return;
+			}
+			
+			try {
+				loadParams();
+				
+				this.editor.getMetaPage().reload();
+			} catch (Exception e1) {
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
+			}
+		}
+	}
+
+	public void startImport() {
+		//TODO: test all sections here
+		ExecuteImportScript.executeScript(editor.getGroovyScript().getAbsolutePath(), params.paramFile);
+
+	}
+
+	private void updateEditionsSection() {
+		
+	}
+
+	private void updateEncodingSection() {
+		
+	}
+
+	private void updateFontSection() {
+		
+	}
+
+	private void updateFrontXsltSection()  {
+		
+	}
+
+	private void updateLangSection() {
+		
+	}
+
+	protected void updatePAttributeSection() {
+		if (pattrSection.isDisposed()) return;
+		if (params == null) return;
+		pattributesViewer.getTable().getParent().layout();
+		Element queriesElem = params.getPAttributesElement(params.getCorpusElement());
+		pattributesViewer.setInput(queriesElem.getElementsByTagName("pattribute")); //$NON-NLS-1$
+	}
+
+	private void updatePreBuildSection() {
+		if (preBuildSection.isDisposed()) return;
+		if (params == null) return;
+		preBuildViewer.getTable().getParent().layout();
+		Element queriesElem = params.getPreBuildElement(params.getCorpusElement());
+		preBuildViewer.setInput(queriesElem.getElementsByTagName("subcorpus")); //$NON-NLS-1$
+
+		preBuildViewer2.getTree().getParent().layout();
+		queriesElem = params.getPreBuildElement(params.getCorpusElement());
+		NodeList partitions = queriesElem.getElementsByTagName("partition"); //$NON-NLS-1$
+		preBuildViewer2.setInput(partitions);
+	}
+
+	private void updateQuerySection() {
+		if (querySection.isDisposed()) return;
+		if (params == null) return;
+		queriesViewer.getTable().getParent().layout();
+		Element queriesElem = params.getQueriesElement(params.getCorpusElement());
+		queriesViewer.setInput(queriesElem.getElementsByTagName("query")); //$NON-NLS-1$
+	}
+
+	private void updateSAttributeSection() {
+		if (sattrSection.isDisposed()) return;
+		if (params == null) return;
+		sattributesViewer.getTable().getParent().layout();
+		Element queriesElem = params.getSAttributesElement(params.getCorpusElement());
+		sattributesViewer.setInput(queriesElem.getElementsByTagName("sattribute")); //$NON-NLS-1$
+	}
+
+	private void updateTokenizerSection() {
+
+	}
+
+	private void updateUisSection() {
+
+	}
+
+	public String getRootDir() {
+		return srcDir.getAbsolutePath();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java	(revision 324)
@@ -0,0 +1,338 @@
+package org.txm.rcp.editors.imports;
+
+import java.util.HashMap;
+
+/**
+ * static class that defines what parameters are used by import modules
+ * @author mdecorde
+ *
+ */
+public class ImportModuleCustomization {
+	
+	public static final String PARALLEL = "parallel"; //$NON-NLS-1$
+	public static final String ENCODING = "encoding"; //$NON-NLS-1$
+	public static final String LANG = "lang"; //$NON-NLS-1$
+	public static final String XSLT = "xslt"; //$NON-NLS-1$
+	public static final String TOKENIZER = "tokenizer"; //$NON-NLS-1$
+	public static final String ADVANCEDTOKENIZER = "tokenizer-advanced"; //$NON-NLS-1$
+	public static final String EDITIONS_WORDSPERPAGE = "editions-wordsperpage"; //$NON-NLS-1$
+	public static final String EDITIONS_PAGEELEMENT = "editions-pageelement"; //$NON-NLS-1$
+	public static final String PATTRIBUTES = "pAttributes"; //$NON-NLS-1$
+	public static final String SATTRIBUTES = "sAttributes"; //$NON-NLS-1$
+	public static final String PREBUILD = "preBuild"; //$NON-NLS-1$
+	public static final String QUERIES = "queries"; //$NON-NLS-1$
+	public static final String UI = "uis"; //$NON-NLS-1$
+	public static final String OPTIONS = "options"; //$NON-NLS-1$
+	public static final String TEXTUALPLANS = "textualplans";
+	public static final String IMPORT_NAME = "import_name";
+	
+	static HashMap<String, HashMap<String, Boolean>> allParams = new HashMap<String, HashMap<String, Boolean>>();
+	static HashMap<String, String> names = new HashMap<String, String>();
+	
+	static { //init import module
+		HashMap<String,Boolean> params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, true);
+		params.put(LANG, false);
+		params.put(XSLT, false);
+		params.put(TOKENIZER, false);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, false);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, false);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("discoursLoader.groovy", params); //$NON-NLS-1$
+		names.put("discoursLoader.groovy", "CNR + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, true);
+		params.put(LANG, true);
+		params.put(XSLT, false);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, false);
+		params.put(EDITIONS_PAGEELEMENT, false);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, true);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("wtcLoader.groovy", params); //$NON-NLS-1$
+		names.put("wtcLoader.groovy", "WTC"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, true);
+		params.put(LANG, true);
+		params.put(XSLT, false);
+		params.put(TOKENIZER, false);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, false);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, false);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, false);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("hyperbaseLoader.groovy", params); //$NON-NLS-1$
+		names.put("hyperbaseLoader.groovy", "Hyperbase"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, true);
+		params.put(LANG, true);
+		params.put(XSLT, false);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, false);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, false);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, false);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("alcesteLoader.groovy", params); //$NON-NLS-1$
+		names.put("alcesteLoader.groovy", "Alceste"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, true);
+		params.put(LANG, true);
+		params.put(XSLT, false);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, false);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, false);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, false);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("quickLoader.groovy", params); //$NON-NLS-1$
+		names.put("quickLoader.groovy", "TXT + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, false);
+		params.put(LANG, true);
+		params.put(XSLT, true);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, true);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, true);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("transcriberLoader.groovy", params); //$NON-NLS-1$
+		names.put("transcriberLoader.groovy", "XML-TRS + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, false);
+		params.put(LANG, true);
+		params.put(XSLT, true);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, true);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, true);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("tmxLoader.groovy", params); //$NON-NLS-1$
+		names.put("tmxLoader.groovy", "XML-TMX"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, false);
+		params.put(LANG, true);
+		params.put(XSLT, true);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, true);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, true);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, true);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("xmlLoader.groovy", params); //$NON-NLS-1$
+		names.put("xmlLoader.groovy", "XML/w + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, false);
+		params.put(LANG, true);
+		params.put(XSLT, true);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, true);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, true);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("xmltxmLoader.groovy", params); //$NON-NLS-1$
+		names.put("xmltxmLoader.groovy", "XML-TEI TXM"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, false);
+		params.put(LANG, true);
+		params.put(XSLT, true);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, true);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, true);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("factivaLoader.groovy", params); //$NON-NLS-1$
+		names.put("factivaLoader.groovy", "XML-PPS"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, false);
+		params.put(LANG, true);
+		params.put(XSLT, false);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, false);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, true);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("factivamailLoader.groovy", params); //$NON-NLS-1$
+		names.put("factivamailLoader.groovy", "Factiva TXT"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, false);
+		params.put(LANG, true);
+		params.put(XSLT, true);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, false);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, true);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("bfmLoader.groovy", params); //$NON-NLS-1$
+		names.put("bfmLoader.groovy", "XML-TEI BFM"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, false);
+		params.put(LANG, true);
+		params.put(XSLT, true);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, false);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, false);
+		params.put(PATTRIBUTES, true);
+		params.put(SATTRIBUTES, true);
+		params.put(PREBUILD, true);
+		params.put(QUERIES, true);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, false);
+		params.put(OPTIONS, false);
+		allParams.put("frantextLoader.groovy", params); //$NON-NLS-1$
+		names.put("frantextLoader.groovy", "XML-TEI Frantext"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		params = new HashMap<String, Boolean>();
+		params.put(PARALLEL, false);
+		params.put(ENCODING, false);
+		params.put(LANG, true);
+		params.put(XSLT, false);
+		params.put(TOKENIZER, true);
+		params.put(ADVANCEDTOKENIZER, true);
+		params.put(EDITIONS_WORDSPERPAGE, true);
+		params.put(EDITIONS_PAGEELEMENT, true);
+		params.put(PATTRIBUTES, false);
+		params.put(SATTRIBUTES, false);
+		params.put(PREBUILD, false);
+		params.put(QUERIES, false);
+		params.put(UI, true);
+		params.put(TEXTUALPLANS, true);
+		params.put(OPTIONS, true);
+		allParams.put("xtzLoader.groovy", params); //$NON-NLS-1$
+		names.put("xtzLoader.groovy", "XML-XTZ + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	/**
+	 * 
+	 * @param importscript
+	 * @return the import parameter section configuration depending on the <code>importscript</code>. If their is no setting for <code>importscript</code> return a default configuration
+	 */
+	public static HashMap<String,Boolean> getParameters(String importscript)
+	{
+		if (allParams.containsKey(importscript)) {
+			return allParams.get(importscript);
+		} else {
+			HashMap<String, Boolean> params = new HashMap<String, Boolean>();
+			params.put(PARALLEL, true);
+			params.put(ENCODING, true);
+			params.put(LANG, true);
+			params.put(XSLT, true);
+			params.put(TOKENIZER, true);
+			params.put(ADVANCEDTOKENIZER, false);
+			params.put(EDITIONS_WORDSPERPAGE, true);
+			params.put(EDITIONS_PAGEELEMENT, true);
+			params.put(PATTRIBUTES, true);
+			params.put(SATTRIBUTES, true);
+			params.put(PREBUILD, true);
+			params.put(QUERIES, true);
+			params.put(UI, true);
+			params.put(TEXTUALPLANS, false);
+			params.put(OPTIONS, false);
+			return params;
+		}
+	}
+	
+	public static String getName(String importscript)
+	{
+		if (allParams.containsKey(importscript)) {
+			return names.get(importscript);
+		} else {
+			return importscript;
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataPage.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataPage.java	(revision 324)
@@ -0,0 +1,594 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.imports;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.metadatas.Metadata;
+import org.txm.metadatas.Metadatas;
+import org.txm.metadatas.TextInjection;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.TableKeyListener;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class MetadataPage.
+ */
+public class MetadataPage extends FormPage {
+
+	private static final String ID = "org.txm.rcp.editors.imports.MetadataPage"; //$NON-NLS-1$
+	/** The metadatas. */
+	protected ArrayList<Metadata> metadatas = new ArrayList<Metadata>();
+
+	/** The srcdir. */
+	File srcdir;
+
+	/** The paramtokenizer. */
+	File paramtokenizer;
+
+	/** The xsltfile. */
+	File xsltfile;
+
+	/** The xsltparams. */
+	String[] xsltparams;//{"val1",1,"val2",2}
+
+	/** The form. */
+	ScrolledForm form;
+
+	/** The toolkit. */
+	FormToolkit toolkit;
+
+	/** The basename text. */
+	Text basenameText;
+
+	/** The btn guess lang. */
+	Button btnGuessLang;
+
+	/** The btn guess2 lang. */
+	Button btnGuess2Lang;
+
+	/** The btn select lang. */
+	Button btnSelectLang;
+
+	/** The langcombo. */
+	Combo langcombo;
+
+	/** The btn default encoding. */
+	Button btnDefaultEncoding;
+
+	/** The btn guess encoding. */
+	Button btnGuessEncoding;
+
+	/** The btn guess2 encoding. */
+	Button btnGuess2Encoding;
+
+	/** The btn select encoding. */
+	Button btnSelectEncoding;
+
+	/** The encoding combo. */
+	Combo encodingCombo;
+
+	/** The metadata table. */
+	Table metadataTable;
+
+	/** The viewer. */
+	//TableViewer viewer;
+
+	/** The rmvmetadata. */
+	//private Button rmvmetadata;
+
+	/** The clearmetadata. */
+	//private Button clearmetadata;
+
+	/** The scanmetadatafile. */
+	Button scanmetadatafile;
+
+	/** The addmetadata. */
+	//Button addmetadata;
+
+	/** The partition column. */
+	TableViewerColumn partitionColumn;
+
+	/** The selection column. */
+	TableViewerColumn selectionColumn;
+
+	/** The display column. */
+	TableViewerColumn displayColumn;
+
+	/** The longname column. */
+	TableViewerColumn longnameColumn;
+
+	/** The name column. */
+	TableViewerColumn nameColumn;
+
+	/** The type column. */
+	private TableViewerColumn typeColumn;
+
+	private TableViewer viewer2;
+
+	private TableViewerColumn displayColumn2;
+	File metadataFile;
+	private ArrayList<TableViewerColumn> columns = new ArrayList<TableViewerColumn>();
+	private CorpusPage main;
+
+	/**
+	 * Instantiates a new metadata page.
+	 *
+	 * @param editor the editor
+	 * @param main 
+	 */
+	public MetadataPage(FormEditor editor, CorpusPage main) {
+		super(editor, Messages.MainPage_0, Messages.MetadataPage_1);
+		this.main = main;
+	}
+	int index = 0;
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+	 */
+	@Override
+	protected void createFormContent(final IManagedForm managedForm) {
+		form = managedForm.getForm();
+		toolkit = managedForm.getToolkit();
+		form.setText(Messages.MetadataPage_2);
+		GridLayout layout = new GridLayout(2, false);
+		form.getBody().setLayout(layout);
+
+		scanmetadatafile = toolkit.createButton(form.getBody(), Messages.MetadataPage_3, SWT.PUSH);
+		scanmetadatafile.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 1,1));
+		scanmetadatafile.addSelectionListener(new SelectionListener() {
+			
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				
+//				File metafile = new File(srcdir, "metadata.csv");
+//				if (metafile.exists())
+					reloadViewers();
+//				else {
+//					System.out.println("no metadata file found: "+metafile.getAbsolutePath());
+//				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+//		clearmetadata = toolkit.createButton(form.getBody(), Messages.MetadataPage_8, SWT.PUSH);
+//		clearmetadata.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 1,1));
+//		clearmetadata.addSelectionListener(new SelectionListener() {
+//			@Override
+//			public void widgetSelected(SelectionEvent e) {
+//				metadatas.clear();
+//  			viewer.refresh();
+//				viewer2.refresh();
+//			}
+//
+//			@Override
+//			public void widgetDefaultSelected(SelectionEvent e) { }
+//		});
+//		addmetadata = toolkit.createButton(form.getBody(), Messages.MetadataPage_9, SWT.PUSH);
+//		addmetadata.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 1,1));
+//		addmetadata.addSelectionListener(new SelectionListener() {
+//			@Override
+//			public void widgetSelected(SelectionEvent e) {
+//				metadatas.add(new Metadata(Messages.MetadataPage_10, Messages.MetadataPage_11, Messages.MetadataPage_12, "String", null, false, false, false, false, 100)); //$NON-NLS-4$
+//				viewer.setInput(metadatas);
+//				viewer.refresh();
+//				viewer2.setInput(metadatas);
+//				viewer2.refresh();
+//			}
+//
+//			@Override
+//			public void widgetDefaultSelected(SelectionEvent e) { }
+//		});
+//		rmvmetadata = toolkit.createButton(form.getBody(), Messages.MetadataPage_14, SWT.PUSH);
+//		rmvmetadata.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 1,1));
+//		rmvmetadata.addSelectionListener(new SelectionListener() {
+//			@Override
+//			public void widgetSelected(SelectionEvent e) {
+//				IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+//				for(Object obj : selection.toArray()) {
+//					metadatas.remove(obj);
+//				}
+////				viewer.setInput(metadatas);
+////				viewer.refresh();
+//				viewer2.setInput(metadatas);
+//				viewer2.refresh();
+//			}
+//
+//			@Override
+//			public void widgetDefaultSelected(SelectionEvent e) { }
+//		});
+
+//		metadataTable = toolkit.createTable(form.getBody(), SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL);
+//		GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false,2,1);
+//		gd.heightHint = 100;
+//		metadataTable.setLayoutData(gd);
+//		metadataTable.setHeaderVisible(true);
+//		metadataTable.setLinesVisible(true);
+//
+//		metadataTable.addKeyListener(new KeyListener() {
+//			@Override
+//			public void keyReleased(KeyEvent e) {
+//				if (e.keyCode == SWT.DEL)
+//				{
+//					IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+//					for(Object obj : selection.toArray()) {
+//						metadatas.remove(obj);
+//					}
+//					viewer.setInput(metadatas);
+//					viewer.refresh();
+//					viewer2.setInput(metadatas);
+//					viewer2.refresh();
+//				}
+//			}
+//
+//			@Override
+//			public void keyPressed(KeyEvent e) {}
+//		});
+
+//		viewer = new TableViewer(metadataTable);
+//		viewer.setContentProvider(new IStructuredContentProvider(){
+//
+//			@Override
+//			public Object[] getElements(Object inputElement) {
+//				return metadatas.toArray(new Metadata[metadatas.size()]);
+//			}
+//
+//			@Override
+//			public void dispose() {	}
+//
+//			@Override
+//			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }
+//
+//		});
+//		viewer.setInput(metadatas);
+//
+//		nameColumn = new TableViewerColumn(viewer, SWT.NONE);
+//		nameColumn.getColumn().setWidth(100);
+//		nameColumn.getColumn().setText(Messages.ObjectExplorer_26);
+//		nameColumn.setLabelProvider(new ColumnLabelProvider() {
+//			@Override
+//			public String getText(Object element) {
+//				Metadata data = (Metadata) element;
+//				return data.id;
+//			};
+//
+//			public Image getImage(Object element) {return null;};
+//		});
+//		nameColumn.setEditingSupport(new MetadataCellEditor(viewer, 0));
+
+//		longnameColumn = new TableViewerColumn(viewer, SWT.NONE);
+//		longnameColumn.getColumn().setWidth(150);
+//		longnameColumn.getColumn().setText(Messages.MetadataPage_16);
+//		longnameColumn.setLabelProvider(new ColumnLabelProvider() {
+//			@Override
+//			public String getText(Object element) {
+//				Metadata data = (Metadata) element;
+//				return data.longname;
+//			};
+//
+//			public Image getImage(Object element) {return null;};
+//		});
+//		longnameColumn.setEditingSupport(new MetadataCellEditor(viewer, 1));
+//
+//		typeColumn = new TableViewerColumn(viewer, SWT.NONE);
+//		typeColumn.getColumn().setWidth(100);
+//		typeColumn.getColumn().setText(Messages.FrequencyListEditorInput_9);
+//		typeColumn.setLabelProvider(new ColumnLabelProvider() {
+//			@Override
+//			public String getText(Object element) {
+//				Metadata data = (Metadata) element;
+//				return data.type;
+//			};
+//
+//			public Image getImage(Object element) {return null;};
+//		});
+//		typeColumn.setEditingSupport(new MetadataCellEditor(viewer, 2));
+//
+//		selectionColumn = new TableViewerColumn(viewer, SWT.NONE);
+//		selectionColumn.getColumn().setWidth(100);
+//		selectionColumn.getColumn().setText(Messages.MetadataPage_18);
+//		selectionColumn.setLabelProvider(new ColumnLabelProvider() {
+//			@Override
+//			public String getText(Object element) {
+//				return null;
+//			};
+//			public Image getImage(Object element) {
+//				Metadata data = (Metadata) element;
+//				if (data.selection)
+//					return IImageKeys.getImage(IImageKeys.CHECKED);
+//				else
+//					return IImageKeys.getImage(IImageKeys.UNCHECKED);
+//			};
+//		});
+//
+//		partitionColumn = new TableViewerColumn(viewer, SWT.NONE);
+//		partitionColumn.getColumn().setWidth(100);
+//		partitionColumn.getColumn().setText(Messages.MetadataPage_19);
+//		partitionColumn.setLabelProvider(new ColumnLabelProvider() {
+//			@Override
+//			public String getText(Object element) {
+//
+//				return null;
+//			};
+//
+//			public Image getImage(Object element) 
+//			{
+//				Metadata data = (Metadata) element;
+//				if (data.partition)
+//					return IImageKeys.getImage(IImageKeys.CHECKED);
+//				else
+//					return IImageKeys.getImage(IImageKeys.UNCHECKED);
+//			};
+//		});
+//
+//		displayColumn = new TableViewerColumn(viewer, SWT.NONE);
+//		displayColumn.getColumn().setWidth(100);
+//		displayColumn.getColumn().setText(Messages.MetadataPage_20);
+//		displayColumn.setLabelProvider(new ColumnLabelProvider() {
+//			@Override
+//			public String getText(Object element) {
+//
+//				return null;
+//			};
+//
+//			public Image getImage(Object element) 
+//			{
+//				Metadata data = (Metadata) element;
+//				if (data.display)
+//					return IImageKeys.getImage(IImageKeys.CHECKED);
+//				else
+//					return IImageKeys.getImage(IImageKeys.UNCHECKED);
+//			};
+//		});
+//
+//		viewer.getTable().addMouseListener(new MouseListener() {
+//			@Override
+//			public void mouseUp(MouseEvent e) { }
+//			@Override
+//			public void mouseDown(MouseEvent e) { }
+//
+//			@Override
+//			public void mouseDoubleClick(MouseEvent e) {int colid = getPointedColumn(e);
+//			IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+//			for (Object obj : selection.toArray()) {
+//				Metadata data = (Metadata) obj;
+//				switch (colid) {
+//				case 3:
+//					data.selection = !data.selection;
+//					break;
+//				case 4:
+//					data.partition = !data.partition;
+//					break;
+//				case 5:
+//					data.display = !data.display;
+//					break;
+//				}
+//			}
+//			viewer.setInput(metadatas);
+//			viewer.refresh(); 
+//			}
+//		});
+
+		metadataTable = toolkit.createTable(form.getBody(), SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL);
+		GridData gd = new GridData(GridData.FILL, GridData.FILL, true, true,2,1);
+		metadataTable.setLayoutData(gd);
+		metadataTable.setHeaderVisible(true);
+		metadataTable.setLinesVisible(true);
+		viewer2 = new TableViewer(metadataTable);
+		viewer2.getTable().addKeyListener(new TableKeyListener(viewer2));
+		viewer2.setContentProvider(new IStructuredContentProvider(){
+			@Override
+			public Object[] getElements(Object inputElement) {
+				if (inputElement instanceof Metadatas) {
+					Metadatas m = (Metadatas) inputElement;
+					ArrayList<String> header = m.getHeadersList();
+					System.out.println(Messages.MetadataPage_4+header);
+
+					Object[] elems = new Object[m.keySet().size()];
+					int i = 0;
+					for(String key : m.keySet()) {
+						elems[i++] = m.get(key);
+					}
+					return elems;
+
+				} else {
+					return new Object[0];
+				}
+			}
+
+			@Override
+			public void dispose() {	}
+
+			@Override
+			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }
+
+		});
+
+		displayColumn2 = new TableViewerColumn(viewer2, SWT.NONE);
+		displayColumn2.getColumn().setWidth(120);
+		displayColumn2.getColumn().setText(Messages.MetadataPage_5);
+		displayColumn2.setLabelProvider(new ColumnLabelProvider() {
+			@Override
+			public String getText(Object element) {
+				if (element instanceof TextInjection) {
+					TextInjection ti = (TextInjection) element;
+					return ti.id;
+				} else
+					return ""; //$NON-NLS-1$
+			};
+
+			@Override
+			public Image getImage(Object element) 
+			{
+				return null;
+			};
+		});
+		
+		//if (metadataFile != null) {
+			reloadViewers();
+		//}
+	}
+
+	protected void reloadViewers() {
+		if (viewer2 == null) return;
+		//viewer2.setInput(null);
+		//viewer2.refresh();
+		if (main.getRootDir() == null) return;
+		metadataFile = new File(main.getRootDir(), "metadata.csv"); //$NON-NLS-1$
+		Metadatas temp = null;
+		if (metadataFile.exists()) {//if their is a metadata file OK
+			if (metadataFile.getName().endsWith(".csv")) { //$NON-NLS-1$
+				String encoding = Toolbox.getParam(TBXPreferences.METADATA_ENCODING);
+				String colsep = Toolbox.getParam(TBXPreferences.METADATA_COLSEPARATOR);
+				String txtsep = Toolbox.getParam(TBXPreferences.METADATA_TXTSEPARATOR);
+				temp = new Metadatas(metadataFile, encoding, colsep, txtsep, 1);
+			} else {
+				temp = new Metadatas(metadataFile);
+			}
+		} else {
+			System.out.println(NLS.bind(Messages.MetadataPage_7, metadataFile));
+			return;
+		}
+				
+		File xmlfile = temp.getXMLFile();
+		if (xmlfile.exists()) {
+			xmlfile.delete();
+		}
+		metadatas.clear();
+		for(Metadata m : temp.getMetadatas()) {
+			if (!metadatas.contains(m))
+				metadatas.add(m);
+		}
+		
+		for (TableViewerColumn col : columns) {
+			col.getColumn().dispose();
+		}
+		columns = new ArrayList<TableViewerColumn>();
+		
+		index = 0;
+		for (String key : temp.getHeadersList()) {
+			TableViewerColumn col = new TableViewerColumn(viewer2, SWT.NONE);
+			columns.add(col);
+			col.getColumn().setWidth(100);
+			col.getColumn().setText(key);
+			col.setLabelProvider(new ColumnLabelProvider() {
+				int myindex = index++;
+				@Override
+				public String getText(Object element) {
+					if (element instanceof TextInjection) {
+						TextInjection ti = (TextInjection) element;
+						return ti.get(myindex).getSecond();
+					} else
+						return ""; //$NON-NLS-1$
+				};
+
+				@Override
+				public Image getImage(Object element) 
+				{
+					return null;
+				};
+			});
+		}
+
+//		viewer.setInput(metadatas);
+//		viewer.refresh();
+		viewer2.setInput(temp);
+		//viewer2.refresh();
+	}
+
+	/**
+	 * Creates the list section.
+	 */
+	protected void createListSection()
+	{
+
+	}
+
+	/**
+	 * return the column under the mouse pointer.
+	 *
+	 * @param e the e
+	 * @return the pointed column
+	 */
+	public int getPointedColumn(MouseEvent e) {
+		int x = e.x; // + lineTableViewer.getTable().get;
+		int sumWidthColumn = this.nameColumn.getColumn().getWidth();
+		if (x < sumWidthColumn)
+			return 0;
+
+		sumWidthColumn += this.longnameColumn.getColumn().getWidth();
+		if (x < sumWidthColumn)
+			return 1;
+
+		sumWidthColumn += this.typeColumn.getColumn().getWidth();
+		if (x < sumWidthColumn)
+			return 2;
+
+		sumWidthColumn += this.selectionColumn.getColumn().getWidth();
+		if (x < sumWidthColumn)
+			return 3;
+
+		sumWidthColumn += this.partitionColumn.getColumn().getWidth();
+		if (x < sumWidthColumn)
+			return 4;
+
+		return 0;
+	}
+
+	public void setMetadataFile(File metadataFile2) {
+		this.metadataFile = metadataFile2;
+	}
+
+	public void reload() {
+		reloadViewers();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/MetadataPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>TXM's editors</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractEditorInput.java	(revision 324)
@@ -0,0 +1,98 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+// TODO: Auto-generated Javadoc
+/**
+ * This is a root implementation for other abstract implementation of tab type (.
+ *
+ * {@link AbstractSVGGraphicable}, {@link AbstractTablable}, etc.).
+ * @author sloiseau
+ */
+@SuppressWarnings("rawtypes") //$NON-NLS-1$
+public abstract class AbstractEditorInput implements IEditorInput {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class adapter) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractTablable.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractTablable.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractTablable.java	(revision 324)
@@ -0,0 +1,74 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.txm.rcp.editors.Tablable;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Define a tab displaying a graphics in a multi-tab editor.
+ * 
+ * @author sloiseau
+ * 
+ */
+public abstract class AbstractTablable extends AbstractEditorInput implements
+		Tablable {
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getColumnTitles()
+	 */
+	@Override
+	abstract public String[] getColumnTitles();
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getColumnTypes()
+	 */
+	@Override
+	abstract public String[] getColumnTypes();
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getContentProvider()
+	 */
+	@Override
+	abstract public IStructuredContentProvider getContentProvider();
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getInput()
+	 */
+	@Override
+	abstract public Object getInput();
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.Tablable#getLabelProvider()
+	 */
+	@Override
+	abstract public LabelProvider getLabelProvider();
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractTablable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/InternalViewEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/InternalViewEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/InternalViewEditorInput.java	(revision 324)
@@ -0,0 +1,131 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.functions.internal.InternalView;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ReferencerEditorInput.
+ */
+public class InternalViewEditorInput implements IEditorInput {
+
+	/** The corpus. */
+	private Corpus corpus;
+	
+	/** The referencer. */
+	private InternalView internalView;
+
+	/**
+	 * Instantiates a new referencer editor input.
+	 *
+	 * @param corpus the corpus
+	 * @param referencer the referencer
+	 */
+	public InternalViewEditorInput(Corpus corpus, InternalView internalView) {
+		if (internalView != null)
+			this.corpus = internalView.getCorpus();
+		else
+			this.corpus = corpus;
+		this.internalView = internalView;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return AbstractUIPlugin.imageDescriptorFromPlugin(
+				Application.PLUGIN_ID, IImageKeys.ACTION_INTERNALVIEW);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		return corpus.getName(); 
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	/**
+	 * Gets the corpus.
+	 *
+	 * @return the corpus
+	 */
+	public Corpus getCorpus() {
+		return corpus;
+	}
+
+	/**
+	 * Gets the referencer.
+	 *
+	 * @return the referencer
+	 */
+	public InternalView getInternalView() {
+		return internalView;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/InternalViewEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListContentProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListContentProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListContentProvider.java	(revision 324)
@@ -0,0 +1,82 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class FrequencyListContentProvider.
+ */
+public class FrequencyListContentProvider implements IStructuredContentProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+	 */
+	@Override
+	public Object[] getElements(Object inputElement) {
+		Lexicon res = (Lexicon) inputElement;
+
+		List<List<Object>> lexicon = new ArrayList<List<Object>>();
+
+		String[] forms = res.getForms();
+		int[] frequencies = res.getFreq();
+
+		for (int i = 0; i < frequencies.length; i++) {
+			List<Object> entry = new ArrayList<Object>(2);
+			entry.add(forms[i]);
+			entry.add(new Integer(frequencies[i]));
+			lexicon.add(entry);
+		}
+		return lexicon.toArray();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListContentProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractSVGGraphicable.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractSVGGraphicable.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractSVGGraphicable.java	(revision 324)
@@ -0,0 +1,87 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.txm.Toolbox;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.SVGGraphicable;
+import org.txm.utils.logger.Log;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Define a tab displaying a graphics in a multi-tab editor.
+ * 
+ * @author sloiseau
+ * 
+ */
+public abstract class AbstractSVGGraphicable extends AbstractEditorInput
+		implements SVGGraphicable {
+
+	/** The path. */
+	protected IPath path;
+
+	/**
+	 * Create and write the desired SVG Graphic in the given file object.
+	 *
+	 * @param file the file
+	 */
+	abstract public void doSVGGraphic(File file);
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.SVGGraphicable#getIPath()
+	 */
+	@Override
+	public IPath getIPath() {
+		if (this.path == null) {
+			File tmp = null;
+			try {
+				String txmhome = Toolbox.getParam(TBXPreferences.USER_TXM_HOME);
+				File resultDir = new File(txmhome, "results"); //$NON-NLS-1$
+				resultDir.mkdirs();
+				tmp = File.createTempFile("txm", ".svg", resultDir); //$NON-NLS-1$ //$NON-NLS-2$
+			} catch (IOException e) {
+				Log.severe(Messages.CANT_CREATE_GRAPHIC + e);
+			}
+			// System.out.println(tmp.getAbsolutePath());
+			doSVGGraphic(tmp);
+			try {
+				this.path = Path.fromOSString(tmp.getCanonicalPath());
+			} catch (IOException e) {
+				Log.severe(Messages.CANT_CREATE_GRAPHIC + e);
+			}
+		}
+		return this.path;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/AbstractSVGGraphicable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/TestEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/TestEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/TestEditorInput.java	(revision 324)
@@ -0,0 +1,70 @@
+package org.txm.rcp.editors.input;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+public class TestEditorInput implements IEditorInput {
+
+	Object selection;
+	/**
+	 * Instantiates a new referencer editor input.
+	 * @param s 
+	 *
+	 */
+	public TestEditorInput(Object s) {
+		this.selection = s;
+	}
+
+	public Object getSelection() {
+		return selection;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		return "Test editor input getName()"; //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/TestEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ReferencerEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ReferencerEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ReferencerEditorInput.java	(revision 324)
@@ -0,0 +1,131 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.functions.referencer.Referencer;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ReferencerEditorInput.
+ */
+public class ReferencerEditorInput implements IEditorInput {
+
+	/** The corpus. */
+	private Corpus corpus;
+	
+	/** The referencer. */
+	private Referencer referencer;
+
+	/**
+	 * Instantiates a new referencer editor input.
+	 *
+	 * @param corpus the corpus
+	 * @param referencer the referencer
+	 */
+	public ReferencerEditorInput(Corpus corpus, Referencer referencer) {
+		if (referencer != null)
+			this.corpus = referencer.getCorpus();
+		else
+			this.corpus = corpus;
+		this.referencer = referencer;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return AbstractUIPlugin.imageDescriptorFromPlugin(
+				Application.PLUGIN_ID, IImageKeys.ACTION_REFERENCER);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		return corpus.getName(); 
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	/**
+	 * Gets the corpus.
+	 *
+	 * @return the corpus
+	 */
+	public Corpus getCorpus() {
+		return corpus;
+	}
+
+	/**
+	 * Gets the referencer.
+	 *
+	 * @return the referencer
+	 */
+	public Referencer getReferencer() {
+		return referencer;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ReferencerEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListLabelProvider.java	(revision 324)
@@ -0,0 +1,74 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import java.text.DecimalFormat;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class FrequencyListLabelProvider.
+ */
+public class FrequencyListLabelProvider extends LabelProvider implements
+		ITableLabelProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+	 */
+	@Override
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
+	public String getColumnText(Object element, int columnIndex) {
+		Object o = ((List<Object>) element).get(columnIndex);
+		if (o instanceof Double || o instanceof Float) {
+			DecimalFormat f;
+			if ((Double) o < 1) {
+				if ((Double) o < 0.0001)
+					f = new DecimalFormat("0.0000E00"); //$NON-NLS-1$
+				else
+					f = new DecimalFormat("0.0000"); //$NON-NLS-1$
+			} else {
+				f = new DecimalFormat("##########0.0000"); //$NON-NLS-1$
+			}
+			return f.format(o);
+		} else
+			return o.toString();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/IProvidingMultiPageEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/IProvidingMultiPageEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/IProvidingMultiPageEditorInput.java	(revision 324)
@@ -0,0 +1,69 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import java.util.List;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.part.MultiPageEditorPart;
+
+// TODO: Auto-generated Javadoc
+/**
+ * This interface is implemented by {@link IEditorInput} whose content should be
+ * displayed in a GenericMultiPageEditor}.
+ * 
+ * @author Sylvain Loiseau
+ */
+//FIXME: an editor input should not be responsible of storing or creating some EditorPart or any UI components.
+@Deprecated
+public interface IProvidingMultiPageEditorInput {
+
+	/**
+	 * Get the instances of editor to be displayed in the.
+	 *
+	 * @return a list of EditorPart instances.
+	 * {@link MultiPageEditorPart}.
+	 */
+	public List<EditorPart> getEditors();
+
+	/**
+	 * Get the data source ({@link IEditorInput} for each editor given by.
+	 *
+	 * @return a list of IEditorInput instances.
+	 * {@link #getEditor()}.
+	 */
+	public List<IEditorInput> getEditorInputs();
+
+	/**
+	 * Get the name of each page of the MultiPageEditor.
+	 * 
+	 * @return a list of IEditorInput instances.
+	 */
+	public List<String> getNames();
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/IProvidingMultiPageEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ObjectExplorerEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ObjectExplorerEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ObjectExplorerEditorInput.java	(revision 324)
@@ -0,0 +1,113 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.objects.TxmObject;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ObjectExplorerEditorInput.
+ */
+public class ObjectExplorerEditorInput implements IEditorInput {
+
+	/** The txmobject. */
+	private TxmObject txmobject;
+
+	/**
+	 * Instantiates a new object explorer editor input.
+	 *
+	 * @param txmobject the txmobject
+	 */
+	public ObjectExplorerEditorInput(TxmObject txmobject) {
+		this.txmobject = txmobject;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return AbstractUIPlugin.imageDescriptorFromPlugin(
+				Application.PLUGIN_ID, IImageKeys.ACTION_CONCORDANCES);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		return this.txmobject.getName(); 
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	/**
+	 * Gets the txm object.
+	 *
+	 * @return the txm object
+	 */
+	public TxmObject getTxmObject() {
+		return txmobject;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ObjectExplorerEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ParaBrowserEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ParaBrowserEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ParaBrowserEditorInput.java	(revision 324)
@@ -0,0 +1,144 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ParaBrowserEditorInput.
+ */
+public class ParaBrowserEditorInput implements IEditorInput {
+
+	/** The corpus. */
+	private List<MainCorpus> corpus;
+
+	/**
+	 * Instantiates a new para browser editor input.
+	 *
+	 * @param corpus the corpus
+	 */
+	public ParaBrowserEditorInput(List<MainCorpus> corpus) {
+		this.corpus = corpus;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return AbstractUIPlugin.imageDescriptorFromPlugin(
+				Application.PLUGIN_ID, IImageKeys.ACTION_CONCORDANCES);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		if (corpus.size() > 0) {
+			return corpus.get(0).getName();
+		} else
+			return ""; //$NON-NLS-1$
+	}
+
+	/**
+	 * Gets the names.
+	 *
+	 * @return the names
+	 */
+	public List<String> getNames() {
+		List<String> names = new ArrayList<String>();
+		for (MainCorpus corp : corpus) {
+			names.add(corp.getName());
+		}
+		return names; // corpus.getName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	/**
+	 * Gets the corpus.
+	 *
+	 * @return the corpus
+	 */
+	public MainCorpus getCorpus() {
+		if (corpus.size() > 0) {
+			return corpus.get(0);
+		} else
+			return null;
+	}
+
+	/**
+	 * Gets the corpus list.
+	 *
+	 * @return the corpus list
+	 */
+	public List<MainCorpus> getCorpusList() {
+		return corpus;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ParaBrowserEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>All the inputs used to show the editors</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListEditorInput.java	(revision 324)
@@ -0,0 +1,293 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.Tablable;
+import org.txm.rcp.editors.TableEditor;
+import org.txm.searchengine.cqp.corpus.Property;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class FrequencyListEditorInput.
+ *
+ * @author sloiseau
+ */
+public class FrequencyListEditorInput implements IEditorInput,
+		IProvidingMultiPageEditorInput {
+
+	/** The lexicon. */
+	private Lexicon lexicon;
+	
+	/** The property. */
+	private Property property;
+
+	/** The editors. */
+	private List<EditorPart> editors;
+	
+	/** The inputs. */
+	private List<IEditorInput> inputs;
+	
+	/** The names. */
+	private List<String> names = Arrays.asList(new String[] {
+			Messages.FrequencyListEditorInput_0,
+			Messages.FrequencyListEditorInput_1 });
+
+	/**
+	 * Instantiates a new frequency list editor input.
+	 *
+	 * @param lexicon the lexicon
+	 * @param property the property
+	 */
+	public FrequencyListEditorInput(final Lexicon lexicon, Property property) {
+		super();
+		this.lexicon = lexicon;
+		this.property = property;
+
+		editors = new ArrayList<EditorPart>();
+		editors.add(new TableEditor());
+		// editors.add(new SVGGraphicEditor());
+
+		if (lexicon == null)
+			throw new IllegalArgumentException(
+					Messages.FrequencyListEditorInput_2);
+
+		inputs = new ArrayList<IEditorInput>();
+
+		Tablable table = new AbstractTablable() {
+
+			@Override
+			public String[] getColumnTitles() {
+				return new String[] { lexicon.getProperty().toString(),
+						Messages.FrequencyListEditorInput_4 };
+			}
+
+			@Override
+			public String[] getColumnTypes() {
+				return new String[] { Messages.FrequencyListEditorInput_5,
+						Messages.FrequencyListEditorInput_6 };
+			}
+
+			@Override
+			public IStructuredContentProvider getContentProvider() {
+				return new FrequencyListContentProvider();
+			}
+
+			@Override
+			public String getName() {
+				return lexicon.getName(); 
+			}
+
+			@Override
+			public Object getInput() {
+				return lexicon;
+			}
+
+			@Override
+			public LabelProvider getLabelProvider() {
+				return new FrequencyListLabelProvider();
+			}
+		};
+		inputs.add(table);
+
+		/*
+		 * SVGGraphicable pareto = new AbstractSVGGraphicable() {
+		 * 
+		 * @Override public void doSVGGraphic(File file) { try {
+		 * System.out.println(Messages.FrequencyListEditorInput_7);
+		 * lexicon.getParetoGraphic(file); } catch (StatException e) {
+		 * log.error(Messages.CANT_CREATE_GRAPHIC, e); } } };
+		 * System.out.println(
+		 * Messages.FrequencyListEditorInput_11+pareto.getClass());
+		 */
+		// inputs.add(pareto);
+	}
+
+	/**
+	 * Exists.
+	 *
+	 * @return true, if successful
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+
+	/**
+	 * Gets the image descriptor.
+	 *
+	 * @return the image descriptor
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return null;
+	}
+
+	/**
+	 * Gets the name.
+	 *
+	 * @return the name
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		return lexicon.getName();
+	}
+
+	/**
+	 * Gets the persistable.
+	 *
+	 * @return the persistable
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/**
+	 * Gets the tool tip text.
+	 *
+	 * @return the tool tip text
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/**
+	 * Gets the adapter.
+	 *
+	 * @param arg0 the arg0
+	 * @return the adapter
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
+	public Object getAdapter(Class arg0) {
+		return null;
+	}
+
+	/**
+	 * Gets the lexicon.
+	 *
+	 * @return the lexicon
+	 */
+	public Lexicon getLexicon() {
+		return lexicon;
+	}
+
+	/**
+	 * Gets the property.
+	 *
+	 * @return the property
+	 */
+	public Property getProperty() {
+		return property;
+	}
+
+	/**
+	 * Gets the content provider.
+	 *
+	 * @return the content provider
+	 */
+	public IStructuredContentProvider getContentProvider() {
+		return new FrequencyListContentProvider();
+	}
+
+	/**
+	 * Gets the input.
+	 *
+	 * @return the input
+	 */
+	public Object getInput() {
+		return lexicon;
+	}
+
+	/**
+	 * Gets the label provider.
+	 *
+	 * @return the label provider
+	 */
+	public LabelProvider getLabelProvider() {
+		return new FrequencyListLabelProvider();
+	}
+
+	/**
+	 * Gets the column titles.
+	 *
+	 * @return the column titles
+	 */
+	public String[] getColumnTitles() {
+		return new String[] { Messages.FrequencyListEditorInput_9,
+				Messages.FrequencyListEditorInput_4 };
+	}
+
+	// Implementing IProvidingMultiPageEditorInput
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.input.IProvidingMultiPageEditorInput#getEditorInputs()
+	 */
+	@Override
+	public List<IEditorInput> getEditorInputs() {
+		// TODO Auto-generated method stub
+		return inputs;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.input.IProvidingMultiPageEditorInput#getEditors()
+	 */
+	@Override
+	public List<EditorPart> getEditors() {
+		// TODO Auto-generated method stub
+		return editors;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.input.IProvidingMultiPageEditorInput#getNames()
+	 */
+	@Override
+	public List<String> getNames() {
+		// TODO Auto-generated method stub
+		return names;
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/FrequencyListEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/SVGGraphicEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/SVGGraphicEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/SVGGraphicEditorInput.java	(revision 324)
@@ -0,0 +1,146 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.txm.rcp.editors.SVGGraphicable;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class SpecificitiesResultEditorInput.
+ * 
+ * @author Sylvain Loiseau
+ */
+public class SVGGraphicEditorInput implements IEditorInput, SVGGraphicable {
+
+	/** The filename. */
+	private String filename;
+	
+	/** The name. */
+	private String name;
+
+	/**
+	 * Instantiates a new sVG graphic editor input.
+	 *
+	 * @param filename the filename
+	 * @param name the name
+	 */
+	public SVGGraphicEditorInput(String filename, String name) {
+		super();
+		this.filename = filename;
+		this.name = name;
+	}
+
+	/**
+	 * Exists.
+	 *
+	 * @return true, if successful
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+
+	/**
+	 * Gets the image descriptor.
+	 *
+	 * @return the image descriptor
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return null;
+	}
+
+	/**
+	 * Gets the name.
+	 *
+	 * @return the name
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * Gets the persistable.
+	 *
+	 * @return the persistable
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/**
+	 * Gets the tool tip text.
+	 *
+	 * @return the tool tip text
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/**
+	 * Gets the adapter.
+	 *
+	 * @param arg0 the arg0
+	 * @return the adapter
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class arg0) {
+		return null;
+	}
+
+	/**
+	 * Gets the file name.
+	 *
+	 * @return the specificitiesResult
+	 */
+	public String getFileName() {
+		return filename;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.editors.SVGGraphicable#getIPath()
+	 */
+	@Override
+	public IPath getIPath() {
+		return Path.fromOSString(filename);
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/SVGGraphicEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ImportFormEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ImportFormEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ImportFormEditorInput.java	(revision 324)
@@ -0,0 +1,117 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import java.io.File;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.editors.imports.ImportModuleCustomization;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ImportFormEditorInput.
+ */
+public class ImportFormEditorInput implements IEditorInput {
+	
+	/** The xmlfile. */
+	File xmlfile;
+	
+	/**
+	 * Instantiates a new import form editor input.
+	 *
+	 * @param xmlfile the xmlfile
+	 */
+	public ImportFormEditorInput(File xmlfile) {
+		this.xmlfile = xmlfile;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return AbstractUIPlugin.imageDescriptorFromPlugin(
+				Application.PLUGIN_ID, IImageKeys.ACTION_REFERENCER);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		String name = ImportModuleCustomization.getName(xmlfile.getName());
+		return name;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+	
+	/**
+	 * Gets the groovy file.
+	 *
+	 * @return the groovy file
+	 */
+	public File getGroovyFile()
+	{
+		return xmlfile;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ImportFormEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ConcordancesEditorInput.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ConcordancesEditorInput.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ConcordancesEditorInput.java	(revision 324)
@@ -0,0 +1,149 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.input;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.functions.concordances.Concordance;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.searchengine.cqp.corpus.Corpus;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ConcordancesEditorInput.
+ */
+@SuppressWarnings("rawtypes") //$NON-NLS-1$
+public class ConcordancesEditorInput implements IEditorInput {
+
+	/** The corpus. */
+	private Corpus corpus;
+	
+	/** The concordance. */
+	private Concordance concordance;
+
+	/**
+	 * Instantiates a new concordances editor input.
+	 *
+	 * @param corpus the corpus
+	 * @param concordance the concordance
+	 */
+	public ConcordancesEditorInput(Corpus corpus, Concordance concordance) {
+		if (concordance != null)
+			this.corpus = concordance.getCorpus();
+		else
+			this.corpus = corpus;
+		this.concordance = concordance;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return AbstractUIPlugin.imageDescriptorFromPlugin(
+				Application.PLUGIN_ID, IImageKeys.ACTION_CONCORDANCES);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		return corpus.getName(); 
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	/**
+	 * Gets the corpus.
+	 *
+	 * @return the corpus
+	 */
+	public Corpus getCorpus() {
+		return corpus;
+	}
+
+	/**
+	 * Gets the concordance.
+	 *
+	 * @return the concordance
+	 */
+	public Concordance getConcordance() {
+		return concordance;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+
+	public void setCorpus(Corpus newCorpus) {
+		this.corpus = newCorpus;
+	}
+
+	public void setConcordance(Concordance conc) {
+		this.concordance = conc;
+	}
+	
+	@Override
+	public boolean equals(Object obj)	{
+		if(obj instanceof ConcordancesEditorInput)	{
+			return this.concordance == ((ConcordancesEditorInput) obj).getConcordance()
+					&& (this.concordance != null && ((ConcordancesEditorInput) obj).getConcordance() != null && this.concordance.getQuery() == ((ConcordancesEditorInput) obj).getConcordance().getQuery());
+		}
+		return false;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/input/ConcordancesEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMWebBrowserEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMWebBrowserEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMWebBrowserEditor.java	(revision 324)
@@ -0,0 +1,31 @@
+package org.txm.rcp.editors;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.internal.browser.BrowserViewer;
+import org.eclipse.ui.internal.browser.WebBrowserEditor;
+
+@SuppressWarnings("restriction") //$NON-NLS-1$
+public class TXMWebBrowserEditor extends WebBrowserEditor {
+	
+	public static final String WEB_BROWSER_EDITOR_ID = "org.txm.rcp.editors.TXMWebBrowserEditor"; //$NON-NLS-1$
+	
+	public void setTitleImage(Image img) {
+		super.setTitleImage(img);
+	}
+	
+	public void setTitle(String title) {
+		super.setTitle(title);
+	}
+	
+	public void setTitleTooltip(String tooltip) {
+		super.setTitleToolTip(tooltip);
+	}
+
+	public void focus() {
+		webBrowser.getBrowser().forceFocus();
+	}
+	
+	public BrowserViewer getWebBrowserViewer() {
+		return webBrowser;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMWebBrowserEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicable.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicable.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicable.java	(revision 324)
@@ -0,0 +1,49 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.ui.IEditorInput;
+
+// TODO: Auto-generated Javadoc
+/**
+ * An {@link IEditorInput} implementing this interface may be displayed as a
+ * table by the {@link TableEditor}.
+ * 
+ * @author sloiseau
+ */
+public interface SVGGraphicable extends IEditorInput {
+
+	/**
+	 * Gets the i path.
+	 *
+	 * @return the i path
+	 */
+	public IPath getIPath();
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/SVGGraphicable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewAnnotationSelectionDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewAnnotationSelectionDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewAnnotationSelectionDialog.java	(revision 324)
@@ -0,0 +1,109 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+// TODO: Auto-generated Javadoc
+/**
+ * the dialog box called to select the view properties @ author mdecorde.
+ */
+public class ViewAnnotationSelectionDialog extends Dialog {
+
+	
+	/**
+	 * Instantiates a new view property selection dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param availableProperties the available properties
+	 * @param selectedProperties the selected properties
+	 */
+	public ViewAnnotationSelectionDialog(IShellProvider parentShell) {
+		super(parentShell);
+
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+	}
+
+	/**
+	 * Instantiates a new view property selection dialog.
+	 *
+	 * @param shell the shell
+	 * @param availableProperties the available properties
+	 * @param selectedProperties the selected properties
+	 */
+	public ViewAnnotationSelectionDialog(Shell shell) {
+		super(shell);
+
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+	}
+
+	
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		//newShell.setText(Messages.ViewPropertySelectionDialog_0);
+		newShell.setText("A VOIR");
+		newShell.setMinimumSize(200, 100);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		// parent.setLayout(new FormLayout());
+		Composite mainArea = new Composite(parent, SWT.NONE);
+		mainArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+		return mainArea;
+	}
+
+
+	
+	
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewAnnotationSelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetContextSize.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetContextSize.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetContextSize.java	(revision 324)
@@ -0,0 +1,174 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+// TODO: Auto-generated Javadoc
+/**
+ * Action to set the contexts size @ author mdecorde.
+ */
+public class SetContextSize extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.setcontextsize"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+
+	/**
+	 * Instantiates a new sets the context size.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 */
+	public SetContextSize(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.window = window;
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.SetContextSize_1);
+		setToolTipText(Messages.SetContextSize_2);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		SetContextSizeDialog d = new SetContextSizeDialog(window.getShell());
+		if (d.open() == Window.OK) {
+			concordanceEditor.setContextSize(d.getLeftContextSize(), d
+					.getRightContextSize());
+			// concordanceEditor.getConcordance().setLeftContextSize(d.getLeftContextSize());
+			// concordanceEditor.getConcordance().setRightContextSize(d.getRightContextSize());
+			// concordanceEditor.sort();
+			// concordanceEditor.fillDisplayArea(concordanceEditor.getTopLine(),
+			// concordanceEditor.getBottomLine());
+		}
+	}
+
+	/**
+	 * The Class SetContextSizeDialog.
+	 */
+	private class SetContextSizeDialog extends Dialog {
+
+		/** The right context size. */
+		private int rightContextSize;
+		
+		/** The left context size. */
+		private int leftContextSize;
+		
+		/** The left spinner. */
+		private Spinner leftSpinner;
+		
+		/** The right spinner. */
+		private Spinner rightSpinner;
+
+		/**
+		 * Instantiates a new sets the context size dialog.
+		 *
+		 * @param parentShell the parent shell
+		 */
+		protected SetContextSizeDialog(Shell parentShell) {
+			super(parentShell);
+			//parentShell.setText(Messages.SetContextSize_1);
+		}
+
+		/**
+		 * Gets the right context size.
+		 *
+		 * @return the right context size
+		 */
+		public int getRightContextSize() {
+			return rightContextSize;
+		}
+
+		/**
+		 * Gets the left context size.
+		 *
+		 * @return the left context size
+		 */
+		public int getLeftContextSize() {
+			return leftContextSize;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			Composite mainArea = new Composite(parent, SWT.NONE);
+			mainArea.setLayout(new GridLayout(2, false));
+			new Label(mainArea, SWT.None).setText(Messages.SetContextSize_3);
+			leftSpinner = new Spinner(mainArea, SWT.NONE);
+			leftSpinner.setMinimum(0);
+			leftSpinner.setMaximum(100);
+			leftSpinner.setSelection(concordanceEditor.getLeftContextSize());
+			new Label(mainArea, SWT.None).setText(Messages.SetContextSize_4);
+			rightSpinner = new Spinner(mainArea, SWT.NONE);
+			rightSpinner.setMinimum(0);
+			rightSpinner.setMaximum(100);
+			rightSpinner.setSelection(concordanceEditor.getRightContextSize());
+			return mainArea;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		@Override
+		protected void okPressed() {
+			leftContextSize = leftSpinner.getSelection();
+			rightContextSize = rightSpinner.getSelection();
+			super.okPressed();
+		}
+
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetContextSize.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComputeCoocFromLines.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComputeCoocFromLines.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComputeCoocFromLines.java	(revision 324)
@@ -0,0 +1,107 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.cooccurrence.core.functions.Cooccurrence;
+import org.txm.cooccurrence.rcp.editors.CooccurrenceEditorInput;
+import org.txm.cooccurrence.rcp.editors.CooccurrencesEditor;
+import org.txm.cooccurrence.rcp.handlers.ComputeCooccurrences;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ComputeCoocFromLines.
+ *
+ * @deprecated use the line selection to compute a cooc
+ */
+@Deprecated
+public class ComputeCoocFromLines extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.computecoocfromconclines"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+
+	/**
+	 * Instantiates a new compute cooc from lines.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 */
+	public ComputeCoocFromLines(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.window = window;
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.ComputeCoocFromLines_0);
+		setToolTipText(Messages.ComputeCoocFromLines_0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		TableViewer table = concordanceEditor.getLineTableViewer();
+		Cooccurrence cooc = ComputeCooccurrences
+				.computeCooc((IStructuredSelection) table.getSelection());
+		if (cooc != null) {
+			IWorkbenchPage page = window.getActivePage();
+			try {
+				StatusLine.setMessage(Messages.ComputeCoocFromLines_1);
+				CooccurrenceEditorInput editorInput = new CooccurrenceEditorInput(
+						cooc);
+				CooccurrencesEditor conceditor = (CooccurrencesEditor) page
+						.openEditor(editorInput, CooccurrencesEditor.ID); 
+			} catch (PartInitException e) {
+				System.err
+						.println(NLS.bind(Messages.GetConcordances_4, e));
+			}
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComputeCoocFromLines.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SortPropertySelection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SortPropertySelection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SortPropertySelection.java	(revision 324)
@@ -0,0 +1,129 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * Action to define the view properties of each column @ author mdecorde.
+ */
+public class SortPropertySelection extends Action implements IWorkbenchAction {
+	
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.SortPropertySelection"; //$NON-NLS-1$
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+
+	/** The available view properties. */
+	List<Property> availableSortProperties;
+	
+	/** The selected view properties. */
+	List<Property> selectedSortProperties;
+
+	/**
+	 * Instantiates a new view property selection.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 * @param tableViewer the table viewer
+	 */
+	public SortPropertySelection(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor, TableViewer tableViewer) {
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.SortPropertySelection_0);
+		setToolTipText(Messages.SortPropertySelection_0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		int columnid = concordanceEditor.getPointedColumn(); // get the column id
+		IWorkbenchPartSite site = concordanceEditor.getSite();
+
+		List<Property> selectedSortProperties = new ArrayList<Property>();
+		switch (columnid) // the selected properties depends on the columns
+		{
+		case 1:
+			availableSortProperties = concordanceEditor.getAvailableLeftSortProperties();
+			selectedSortProperties = concordanceEditor.getSelectedLeftSortProperties();
+			break;
+		case 2:
+			availableSortProperties = concordanceEditor.getAvailableKeywordSortProperties();
+			selectedSortProperties = concordanceEditor.getSelectedKeywordSortProperties();
+			break;
+		case 3:
+			availableSortProperties = concordanceEditor.getAvailableRightSortProperties();
+			selectedSortProperties = concordanceEditor.getSelectedRightSortProperties();
+			break;
+		}
+
+//		System.out.println("Column: "+columnid);
+//		System.out.println("available: "+availableSortProperties);
+//		System.out.println("selected: "+selectedSortProperties);
+		
+		int ret = new SortPropertySelectionDialog(site, availableSortProperties,
+				selectedSortProperties).open();
+		if (ret == SWT.CANCEL)
+			return;
+
+		switch (columnid) {
+		case 1:
+			concordanceEditor.setLeftSortProperties(selectedSortProperties);
+			break;
+		case 2:
+			concordanceEditor.setKeywordSortProperties(selectedSortProperties);
+			break;
+		case 3:
+			concordanceEditor.setRightSortProperties(selectedSortProperties);
+			break;
+		}
+
+		// concordanceEditor.updateSortPropertiesLabel();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SortPropertySelection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/DefineViewReferencePattern.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/DefineViewReferencePattern.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/DefineViewReferencePattern.java	(revision 324)
@@ -0,0 +1,383 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.functions.ReferencePattern;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.rcp.editors.parabrowser.ParaBrowserEditor;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+// TODO: Auto-generated Javadoc
+/**
+ * Action to build the reference pattern.
+ *
+ * @ author mdecorde
+ */
+public class DefineViewReferencePattern extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.definereferencepattern"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+	
+	/** The para browser editor. */
+	private ParaBrowserEditor paraBrowserEditor;
+
+	/**
+	 * Instantiates a new define reference pattern.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 */
+	public DefineViewReferencePattern(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.window = window;
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.DefineReferencePattern_1);
+		setToolTipText(Messages.DefineReferencePattern_2);
+	}
+
+	/**
+	 * Instantiates a new define reference pattern.
+	 *
+	 * @param window the window
+	 * @param paraBrowserEditor the para browser editor
+	 */
+	public DefineViewReferencePattern(IWorkbenchWindow window,
+			ParaBrowserEditor paraBrowserEditor) {
+		this.window = window;
+		this.paraBrowserEditor = paraBrowserEditor;
+		setId(ID);
+		setText(Messages.DefineReferencePattern_1);
+		setToolTipText(Messages.DefineReferencePattern_2);
+	}
+
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		List<StructuralUnit> structuralUnits = null;
+		List<Property> availableReferenceItems = new ArrayList<Property>();
+		try {
+			if (paraBrowserEditor != null) {
+				structuralUnits = paraBrowserEditor.getCorpus()
+						.getOrderedStructuralUnits();
+				availableReferenceItems.addAll(paraBrowserEditor.getCorpus()
+						.getOrderedProperties());
+
+			} else if (concordanceEditor != null) {
+				structuralUnits = concordanceEditor.getCorpus()
+						.getOrderedStructuralUnits();
+				availableReferenceItems.addAll(concordanceEditor.getCorpus()
+						.getOrderedProperties());
+
+			}
+
+		} catch (Exception e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		for (StructuralUnit unit : structuralUnits) {
+			availableReferenceItems.addAll(unit.getProperties());
+		}
+
+		// System.out.println("selected "+concordanceEditor.getSelectedReferences());
+		// System.out.println("before avail"+availableReferenceItems);
+		if (paraBrowserEditor != null) {
+			availableReferenceItems.remove(paraBrowserEditor
+					.getSelectedReferences());
+		} else {
+			availableReferenceItems.remove(concordanceEditor
+					.getSelectedViewReferences());
+		}
+
+		// System.out.println("after avail"+availableReferenceItems);
+		DefineReferencePatternDialog d = null;
+		if (paraBrowserEditor != null) {
+			d = new DefineReferencePatternDialog(window.getShell(),
+					availableReferenceItems, paraBrowserEditor
+							.getSelectedReferences());
+		} else if (concordanceEditor != null) {
+			d = new DefineReferencePatternDialog(window.getShell(),
+					availableReferenceItems, concordanceEditor
+							.getSelectedViewReferences());
+		}
+
+		if (d.open() == Window.OK) {
+			if (paraBrowserEditor != null) {
+				paraBrowserEditor.setReferencePattern(new ReferencePattern(d
+						.getSelectesdReferenceItems()));
+			} else if (concordanceEditor != null) {
+				concordanceEditor.setRefViewPattern(new ReferencePattern(d
+						.getSelectesdReferenceItems()));
+			}
+			//System.out.println(concordanceEditor.getViewReferencePattern());
+		}
+	}
+
+	/**
+	 * The Class DefineReferencePatternDialog.
+	 */
+	private class DefineReferencePatternDialog extends Dialog {
+
+		/** The available reference items. */
+		private List<Property> availableReferenceItems;
+		
+		/** The selected reference items. */
+		private List<Property> selectedReferenceItems;
+
+		/**
+		 * Instantiates a new define reference pattern dialog.
+		 *
+		 * @param parentShell the parent shell
+		 * @param availableReferenceItems the available reference items
+		 * @param selectedReferences the selected references
+		 */
+		protected DefineReferencePatternDialog(Shell parentShell,
+				List<Property> availableReferenceItems,
+				List<Property> selectedReferences) {
+			super(parentShell);
+			
+			this.availableReferenceItems = availableReferenceItems;
+			this.selectedReferenceItems = selectedReferences;
+			this.availableReferenceItems.removeAll(selectedReferences);
+			this.setShellStyle(this.getShellStyle() | SWT.RESIZE);	
+		}
+
+		/**
+		 * Gets the selectesd reference items.
+		 *
+		 * @return the selectesd reference items
+		 */
+		public List<Property> getSelectesdReferenceItems() {
+			return selectedReferenceItems;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+		 */
+		@Override
+		protected void configureShell(Shell shell) {
+		      super.configureShell(shell);
+		      shell.setText(Messages.DefineReferencePattern_0);
+		      
+		      shell.setSize(400, 500);
+		      shell.setLocation(shell.getParent().getLocation());
+		   }
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+
+			Composite mainArea = new Composite(parent, SWT.NONE);
+			mainArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, true));
+			mainArea.setLayout(new GridLayout(4, false));
+
+			final org.eclipse.swt.widgets.List availbleItems = new org.eclipse.swt.widgets.List(
+					mainArea, SWT.BORDER | SWT.V_SCROLL);
+			for (Property property : availableReferenceItems) {
+				if (property instanceof StructuralUnitProperty) {
+					StructuralUnitProperty sProperty = (StructuralUnitProperty) property;
+					availbleItems.add(sProperty.getStructuralUnit().getName()
+							+ ": " + property.getName()); //$NON-NLS-1$
+				} else {
+					availbleItems.add(property.getName());
+				}
+			}
+						
+			GridData gridData = new GridData(GridData.FILL, GridData.FILL,
+					true, true);
+			//Point size = availbleItems.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+			//gridData.widthHint = size.x;
+			availbleItems.setLayoutData(gridData);
+
+			Composite selectionButtons = new Composite(mainArea, SWT.NONE);
+			selectionButtons.setLayout(new GridLayout(1, false));
+			Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+			Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+			final org.eclipse.swt.widgets.List selectedItems = new org.eclipse.swt.widgets.List(
+					mainArea, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+			selectedItems.setLayoutData(gridData);
+			for (Property property : selectedReferenceItems) {
+				if (property instanceof StructuralUnitProperty) {
+					StructuralUnitProperty sProperty = (StructuralUnitProperty) property;
+					selectedItems.add(sProperty.getStructuralUnit().getName()
+							+ ": " + property.getName()); //$NON-NLS-1$
+				} else {
+					selectedItems.add(property.getName());
+				}
+			}
+			
+			//DBL CLICK Listeners
+			selectedItems.addMouseListener(new MouseListener() {
+				@Override
+				public void mouseUp(MouseEvent e) { }
+				
+				@Override
+				public void mouseDown(MouseEvent e) { }
+				
+				@Override
+				public void mouseDoubleClick(MouseEvent e) {
+					int ind = selectedItems.getSelectionIndex();
+					availbleItems.add(selectedItems.getItem(ind));
+					selectedItems.remove(ind);
+					availableReferenceItems
+							.add(selectedReferenceItems.get(ind));
+					selectedReferenceItems.remove(ind);
+					selectedItems.setSelection(ind);	
+				}
+			});
+			availbleItems.addMouseListener(new MouseListener() {
+				@Override
+				public void mouseUp(MouseEvent e) { }
+				
+				@Override
+				public void mouseDown(MouseEvent e) { }
+				
+				@Override
+				public void mouseDoubleClick(MouseEvent e) {
+					int ind = availbleItems.getSelectionIndex();
+					selectedItems.add(availbleItems.getItem(ind));
+					availbleItems.remove(ind);
+					selectedReferenceItems
+							.add(availableReferenceItems.get(ind));
+					availableReferenceItems.remove(ind);
+					availbleItems.setSelection(ind);
+				}
+			});
+
+			Composite orderButtons = new Composite(mainArea, SWT.NONE);
+			orderButtons.setLayout(new GridLayout(1, false));
+			Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+			Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+			select.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int ind = availbleItems.getSelectionIndex();
+					selectedItems.add(availbleItems.getItem(ind));
+					availbleItems.remove(ind);
+					selectedReferenceItems
+							.add(availableReferenceItems.get(ind));
+					availableReferenceItems.remove(ind);
+					availbleItems.setSelection(ind);
+				}
+			});
+
+			unselect.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int ind = selectedItems.getSelectionIndex();
+					availbleItems.add(selectedItems.getItem(ind));
+					selectedItems.remove(ind);
+					availableReferenceItems
+							.add(selectedReferenceItems.get(ind));
+					selectedReferenceItems.remove(ind);
+					selectedItems.setSelection(ind);					
+				}
+			});
+
+			up.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int ind = selectedItems.getSelectionIndex();
+					if (ind > 0) {
+						String value = selectedItems.getItem(ind);
+						selectedItems.remove(ind);
+						selectedItems.add(value, ind -1);
+						
+						Property prop = selectedReferenceItems.get(ind);
+						selectedReferenceItems.remove(ind);
+						selectedReferenceItems.add(ind-1,prop);
+						
+						selectedItems.setSelection(ind -1);
+					}
+				}
+			});
+
+			down.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int ind = selectedItems.getSelectionIndex();
+					if (ind < selectedItems.getItemCount() - 1) {
+						String value = selectedItems.getItem(ind);
+						selectedItems.remove(ind);
+						selectedItems.add(value, ind + 1);
+						
+						Property prop = selectedReferenceItems.get(ind);
+						selectedReferenceItems.remove(ind);
+						selectedReferenceItems.add(ind+1, prop);
+						
+						selectedItems.setSelection(ind + 1);
+					}
+				}
+			});
+
+			return mainArea;
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/DefineViewReferencePattern.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/LineLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/LineLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/LineLabelProvider.java	(revision 324)
@@ -0,0 +1,137 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.txm.annotation.Annotation;
+import org.txm.functions.concordances.Line;
+import org.txm.rcp.Messages;
+
+// TODO: Auto-generated Javadoc
+/**
+ * provides the labels of the columns of the concordance table 
+ * 
+ * @author mdecorde.
+ */
+public class LineLabelProvider implements ITableLabelProvider {
+
+	private ConcordancesEditor editor;
+
+	public LineLabelProvider(ConcordancesEditor editor) {
+		this.editor = editor;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+	 */
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		Line line = (Line) element;
+
+		switch (columnIndex) {
+		case 0:
+		case 6:
+			return ""; //this is the fake column used to work around the fact that MS windows refuses to right align the 1st column  //$NON-NLS-1$
+		case 1:
+			return line.getViewRef().toString();
+		case 2:
+			return line.leftContextToString();
+		case 3:
+			return line.keywordToString();
+		case 4:
+			if (line.getAnnotation()!=null) {
+				String value = line.getAnnotationValue().getStandardName();
+				Annotation a = line.getAnnotation();
+				if (value == null) value = a.getValue();
+								
+				if (a.getStart() < line.matchGetStart() - line.getLeftContextSize()) {
+					value = "… "+value;
+				}
+				
+				if (a.getEnd() > line.matchGetEnd() + line.getRightContextSize()) {
+					value = value+" …";
+				} 
+				return value;
+			} else {
+				return "";
+			}
+		case 5:
+			return line.rightContextToString();
+		default:
+			throw new RuntimeException(Messages.LineLabelProvider_1);
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+	 */
+	@Override
+	public void addListener(ILabelProviderListener listener) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
+	 */
+	@Override
+	public boolean isLabelProperty(Object element, String property) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+	 */
+	@Override
+	public void removeListener(ILabelProviderListener listener) {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/LineLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesEditorContributor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesEditorContributor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesEditorContributor.java	(revision 324)
@@ -0,0 +1,64 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.ui.part.EditorActionBarContributor;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ConcordancesEditorContributor.
+ */
+public class ConcordancesEditorContributor extends EditorActionBarContributor {
+
+	/**
+	 * Instantiates a new concordances editor contributor.
+	 */
+	public ConcordancesEditorContributor() {
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToMenu(org.eclipse.jface.action.IMenuManager)
+	 */
+	@Override
+	public void contributeToMenu(IMenuManager menuManager) {
+		super.contributeToMenu(menuManager);
+		// IMenuManager fileMenu = (IMenuManager)
+		// menubar.find(IWorkbenchActionConstants.M_FILE);
+		MenuManager viewMenu = new MenuManager(
+				Messages.ConcordancesEditorContributor_0);
+
+		viewMenu.add(new Separator());
+
+		menuManager.add(viewMenu);
+
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesEditorContributor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ErrorAnnotationDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ErrorAnnotationDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ErrorAnnotationDialog.java	(revision 324)
@@ -0,0 +1,54 @@
+package org.txm.rcp.editors.concordances;
+
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPartSite;
+
+public class ErrorAnnotationDialog extends Dialog {
+
+	
+  public ErrorAnnotationDialog(IWorkbenchPartSite iWorkbenchPartSite, List<int[]> matchesNotAnnotated) {
+    super(iWorkbenchPartSite);
+  }
+
+  @Override
+  protected Control createDialogArea(Composite parent) {
+    Composite container = (Composite) super.createDialogArea(parent);
+    Button button = new Button(container, SWT.PUSH);
+    button.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false,
+        false));
+    button.setText("Press me");
+    button.addSelectionListener(new SelectionAdapter() {
+      @Override
+      public void widgetSelected(SelectionEvent e) {
+        System.out.println("Pressed");
+      }
+    });
+
+    return container;
+  }
+
+  // overriding this methods allows you to set the
+  // title of the custom dialog
+  @Override
+  protected void configureShell(Shell newShell) {
+    super.configureShell(newShell);
+    newShell.setText("Selection dialog");
+  }
+
+  @Override
+  protected Point getInitialSize() {
+    return new Point(450, 300);
+  }
+
+} 

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ErrorAnnotationDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewPropertySelectionDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewPropertySelectionDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewPropertySelectionDialog.java	(revision 324)
@@ -0,0 +1,329 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+
+// TODO: Auto-generated Javadoc
+/**
+ * the dialog box called to select the view properties @ author mdecorde.
+ */
+public class ViewPropertySelectionDialog extends Dialog {
+
+	/** The available properties. */
+	final private List<Property> availableProperties;
+
+	/** The selected properties. */
+	final private List<Property> selectedProperties;
+
+	/** The maxprops. */
+	int maxprops = -1;
+
+	/** The available properties view. */
+	org.eclipse.swt.widgets.List availablePropertiesView;
+
+	/** The selected properties view. */
+	org.eclipse.swt.widgets.List selectedPropertiesView;
+
+	/**
+	 * Instantiates a new view property selection dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param availableProperties the available properties
+	 * @param selectedProperties the selected properties
+	 */
+	public ViewPropertySelectionDialog(IShellProvider parentShell,
+			List<Property> availableProperties,
+			List<Property> selectedProperties) {
+		super(parentShell);
+
+		this.availableProperties = availableProperties;
+		this.selectedProperties = selectedProperties;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+	}
+
+	/**
+	 * Instantiates a new view property selection dialog.
+	 *
+	 * @param shell the shell
+	 * @param availableProperties the available properties
+	 * @param selectedProperties the selected properties
+	 */
+	public ViewPropertySelectionDialog(Shell shell,
+			List<Property> availableProperties,
+			List<Property> selectedProperties) {
+		super(shell);
+
+		this.availableProperties = availableProperties;
+		this.selectedProperties = selectedProperties;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+	}
+
+	/**
+	 * Instantiates a new view property selection dialog.
+	 *
+	 * @param shell the shell
+	 * @param availableProperties the available properties
+	 * @param selectedProperties the selected properties
+	 * @param maxprops the maxprops
+	 */
+	public ViewPropertySelectionDialog(Shell shell,
+			List<Property> availableProperties,
+			List<Property> selectedProperties, int maxprops) {
+		super(shell);
+
+		this.availableProperties = availableProperties;
+		this.selectedProperties = selectedProperties;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+		this.maxprops = maxprops;
+	}
+
+	/**
+	 * Gets the selected properties.
+	 *
+	 * @return the selected properties
+	 */
+	public List<Property> getSelectedProperties() {
+		return selectedProperties;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.ViewPropertySelectionDialog_0);
+		newShell.setMinimumSize(300, 200);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		// parent.setLayout(new FormLayout());
+		Composite mainArea = new Composite(parent, SWT.NONE);
+		mainArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+		// 4 columns
+		GridLayout layout = new GridLayout(4, false);
+		mainArea.setLayout(layout);
+
+		availablePropertiesView = new org.eclipse.swt.widgets.List(mainArea,
+				SWT.BORDER | SWT.V_SCROLL);
+		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		availablePropertiesView.setLayoutData(gridData);
+
+		Composite selectionButtons = new Composite(mainArea, SWT.NONE);
+		selectionButtons.setLayout(new GridLayout(1, false));
+		Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+		Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+		selectedPropertiesView = new org.eclipse.swt.widgets.List(mainArea,
+				SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+		gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		selectedPropertiesView.setLayoutData(gridData);
+
+		Composite orderButtons = new Composite(mainArea, SWT.NONE);
+		orderButtons.setLayout(new GridLayout(1, false));
+		Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+		Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+		select.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int index = availablePropertiesView.getSelectionIndex();
+				if (maxprops == 1) {
+					selectedProperties.add(availableProperties.get(index));
+					availableProperties.remove(index);
+
+					availableProperties.add(selectedProperties.get(0));
+					selectedProperties.remove(0);
+				} else {
+					if (maxprops > 0) {
+						if (selectedProperties.size() >= maxprops)
+							return;
+					}
+					if (index >= 0) {
+						selectedProperties.add(availableProperties.get(index));
+						availableProperties.remove(index);
+					}
+				}
+				reload();
+				availablePropertiesView.setSelection(index);
+			}
+		});
+
+		unselect.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				deselectProperties();
+			}
+		});
+
+		up.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int index = selectedPropertiesView.getSelectionIndex();
+				if (index > 0) {
+					Property selectedP = selectedProperties.get(index);
+					Property upperP = selectedProperties.get(index - 1);
+
+					selectedProperties.set(index, upperP);
+					selectedProperties.set(index - 1, selectedP);
+
+					reload();
+					selectedPropertiesView.setSelection(index - 1);
+				}
+			}
+		});
+
+		down.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int index = selectedPropertiesView.getSelectionIndex();
+				if (index < selectedProperties.size() - 1 && index >= 0) {
+					Property selectedP = selectedProperties.get(index);
+					Property bellowP = selectedProperties.get(index + 1);
+
+					selectedProperties.set(index, bellowP);
+					selectedProperties.set(index + 1, selectedP);
+
+					reload();
+					selectedPropertiesView.setSelection(index + 1);
+				}
+			}
+		});
+
+		availablePropertiesView.addMouseListener(new MouseAdapter() {
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+
+				if ( maxprops == 1) {
+					int index = availablePropertiesView.getSelectionIndex();
+					//System.out.println("dl click, maxprops="+maxprops+" idx="+index);
+					selectedProperties.add(availableProperties.get(index));
+					availableProperties.remove(index);
+
+					availableProperties.add(selectedProperties.get(0));
+					selectedProperties.remove(0);
+
+					reload();
+
+				} else {
+					int index = availablePropertiesView.getSelectionIndex();
+					if (index >= 0) {
+						selectedProperties.add(availableProperties.get(index));
+						availableProperties.remove(index);
+
+						reload();
+						availablePropertiesView.setSelection(index);
+					}
+				}
+			}
+		});
+
+		selectedPropertiesView.addMouseListener(new MouseAdapter() {
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+				deselectProperties();
+			}
+		});
+
+		reload();
+		return mainArea;
+	}
+
+	private void deselectProperties() {
+		if (selectedProperties.size() > 1) {
+			int index = selectedPropertiesView.getSelectionIndex();
+
+			availableProperties.add(selectedProperties.get(index));
+			selectedProperties.remove(index);
+
+			reload();
+			selectedPropertiesView.setSelection(index);
+		}
+	}
+	
+	/**
+	 * Reload.
+	 */
+	public void reload() {
+		if (availableProperties == null) {
+			System.out.println("Error: the available properties list is NULL.");
+			return;
+		}
+		availablePropertiesView.removeAll();
+		for (Property property : availableProperties) {
+			//if (!property.getName().equals("id")) //$NON-NLS-1$
+			if (property instanceof StructuralUnitProperty)
+				availablePropertiesView.add(((StructuralUnitProperty)property).getFullName());
+			else
+				availablePropertiesView.add(property.getName());
+		}
+		selectedPropertiesView.removeAll();
+		for (Property property : selectedProperties) {
+			//if (!property.getName().equals("id")) //$NON-NLS-1$
+			if (property instanceof StructuralUnitProperty)
+				selectedPropertiesView.add(((StructuralUnitProperty)property).getFullName());
+			else
+				selectedPropertiesView.add(property.getName());
+		}
+
+		availablePropertiesView.getParent().layout();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		if (selectedProperties.size() != 0)
+			super.okPressed();
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewPropertySelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/CompositeSorterCreationDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/CompositeSorterCreationDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/CompositeSorterCreationDialog.java	(revision 324)
@@ -0,0 +1,225 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.txm.functions.concordances.comparators.LineComparator;
+import org.txm.rcp.Messages;
+
+// TODO: Auto-generated Javadoc
+/**
+ * dialog box used to define the complex sort @ author mdecorde.
+ */
+public class CompositeSorterCreationDialog extends Dialog {
+
+	/** The available comparators. */
+	final private List<LineComparator> availableComparators;
+	
+	/** The selected comparators. */
+	final private List<LineComparator> selectedComparators;
+	
+	/** The name text. */
+	private Text nameText;
+	
+	/** The name. */
+	private String name;
+
+	/**
+	 * Instantiates a new composite sorter creation dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param availableComparators the available comparators
+	 */
+	protected CompositeSorterCreationDialog(IShellProvider parentShell,
+			List<LineComparator> availableComparators) {
+		super(parentShell);
+		this.availableComparators = new ArrayList<LineComparator>(
+				availableComparators);
+		this.selectedComparators = new ArrayList<LineComparator>();
+	}
+
+	/**
+	 * Gets the name.
+	 *
+	 * @return the name
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * Gets the comparators.
+	 *
+	 * @return the comparators
+	 */
+	public List<LineComparator> getComparators() {
+		return selectedComparators;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.ComplexSort_5);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite mainArea = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout(4, false);
+		mainArea.setLayout(layout);
+
+		Label nameLabel = new Label(mainArea, SWT.NONE);
+		nameLabel.setText(Messages.ComplexSort_6);
+
+		nameText = new Text(mainArea, SWT.NONE);
+		GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false);
+		gridData.horizontalSpan = 3;
+		nameText.setLayoutData(gridData);
+
+		final org.eclipse.swt.widgets.List availbleItems = new org.eclipse.swt.widgets.List(
+				mainArea, SWT.BORDER | SWT.V_SCROLL);
+		for (LineComparator comparator : availableComparators) {
+			availbleItems.add(comparator.getName());
+		}
+		gridData = new GridData(GridData.FILL, GridData.FILL, true, false);
+		Point size = availbleItems.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+		gridData.widthHint = size.x;
+		availbleItems.setLayoutData(gridData);
+
+		Composite selectionButtons = new Composite(mainArea, SWT.NONE);
+		selectionButtons.setLayout(new GridLayout(1, false));
+		Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+		Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+		final org.eclipse.swt.widgets.List selectedItems = new org.eclipse.swt.widgets.List(
+				mainArea, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+		selectedItems.setLayoutData(gridData);
+
+		Composite orderButtons = new Composite(mainArea, SWT.NONE);
+		orderButtons.setLayout(new GridLayout(1, false));
+		Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+		Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+		select.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = availbleItems.getSelectionIndex();
+				selectedItems.add(availbleItems.getItem(ind));
+				availbleItems.remove(ind);
+				selectedComparators.add(availableComparators.get(ind));
+				availableComparators.remove(ind);
+				availbleItems.setSelection(ind);
+			}
+		});
+
+		unselect.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = selectedItems.getSelectionIndex();
+				availbleItems.add(selectedItems.getItem(ind));
+				selectedItems.remove(ind);
+				availableComparators.add(selectedComparators.get(ind));
+				selectedComparators.remove(ind);
+				selectedItems.setSelection(ind);
+			}
+		});
+
+		up.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = selectedItems.getSelectionIndex();
+				if (ind > 0) {
+					selectedItems.add(selectedItems.getItem(ind), ind - 1);
+					selectedItems.remove(ind + 1);
+					selectedComparators.add(selectedComparators.get(ind - 1));
+					selectedComparators.remove(ind + 1);
+					selectedItems.setSelection(ind - 1);
+				}
+			}
+		});
+
+		down.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int ind = selectedItems.getSelectionIndex();
+				if (ind < selectedItems.getItemCount() - 1) {
+					selectedItems.add(selectedItems.getItem(ind), ind + 2);
+					selectedItems.remove(ind);
+					selectedComparators.add(selectedComparators.get(ind + 2));
+					selectedComparators.remove(ind);
+					selectedItems.setSelection(ind + 2);
+				}
+			}
+		});
+		return mainArea;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		if (nameText.getText().equals("")) { //$NON-NLS-1$
+			MessageDialog.openError(getShell(),
+					Messages.CreateSubcorpusDialog_11,
+					Messages.ComplexSort_9);
+			return;
+		}
+		name = nameText.getText();
+		if (selectedComparators.size() < 2) {
+			MessageDialog.openError(getShell(),
+					Messages.ComplexSort_10,
+					Messages.ComplexSort_11);
+			return;
+		}
+		super.okPressed();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/CompositeSorterCreationDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetSortProperty.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetSortProperty.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetSortProperty.java	(revision 324)
@@ -0,0 +1,210 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+import org.txm.searchengine.cqp.corpus.Property;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Action to define the sort property to use @ author mdecorde.
+ */
+public class SetSortProperty extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.setsortproperty"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+
+	/**
+	 * Instantiates a new sets the sort property.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 */
+	public SetSortProperty(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.window = window;
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.SetSortProperty_1);
+		setToolTipText(Messages.SetSortProperty_2);
+	}
+
+	/**
+	 * Instantiates a new sets the sort property.
+	 */
+	public SetSortProperty() {
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		List<Property> selectedProperty;
+		int columnid = concordanceEditor.getPointedColumn();
+		switch (columnid) // the selected properties depends on the columns
+		{
+		case 1:
+			selectedProperty = concordanceEditor
+					.getSelectedLeftSortProperties();
+			break;
+		case 2:
+			selectedProperty = concordanceEditor
+					.getSelectedKeywordSortProperties();
+			break;
+		default:
+			selectedProperty = concordanceEditor
+					.getSelectedRightSortProperties();
+			break;
+		}
+
+		SetSortPropertyDialog d = new SetSortPropertyDialog(window.getShell(),
+				concordanceEditor.getAvailableSortProperties(),
+				selectedProperty);
+
+		if (d.open() == Window.OK) {
+
+			switch (columnid) // the selected properties depends on the columns
+			{
+			case 1:
+				concordanceEditor.setLeftSortProperties(d.getSelectedProperty());
+				break;
+			case 2:
+				concordanceEditor.setKeywordSortProperties(d.getSelectedProperty());
+				break;
+			case 3:
+				concordanceEditor.setRightSortProperties(d.getSelectedProperty());
+				break;
+			}
+		}
+	}
+
+	/**
+	 * The Class SetSortPropertyDialog.
+	 */
+	private class SetSortPropertyDialog extends Dialog {
+
+		/** The properties. */
+		private final List<Property> properties;
+		
+		/** The buttons. */
+		private List<Button> buttons;
+		
+		/** The selected property. */
+		private List<Property> selectedProperty;
+
+		/**
+		 * Instantiates a new sets the sort property dialog.
+		 *
+		 * @param shell the shell
+		 * @param properties the properties
+		 * @param selectedProperty2 the selected property
+		 */
+		public SetSortPropertyDialog(Shell shell, List<Property> properties,
+				List<Property> selectedProperty2) {
+			super(shell);
+			this.properties = properties;
+			this.selectedProperty = selectedProperty2;
+			buttons = new ArrayList<Button>();
+
+			this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			Composite mainArea = new Composite(parent, SWT.NONE);
+			mainArea.setLayout(new RowLayout(SWT.VERTICAL));
+			mainArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, true));
+			Group group = new Group(mainArea, SWT.SHADOW_IN);
+			group.setText(Messages.SetSortProperty_3);
+			group.setLayout(new RowLayout(SWT.VERTICAL));
+			for (Property property : properties) {
+				Button button = new Button(group, SWT.RADIO);
+				button.setText(property.getName());
+				buttons.add(button);
+			}
+			return mainArea;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		@Override
+		protected void okPressed() {
+			selectedProperty.clear();
+			for (int i = 0; i < buttons.size(); i++)
+				if (buttons.get(i).getSelection())
+					selectedProperty.add(properties.get(i));
+			super.okPressed();
+		}
+
+		/**
+		 * Gets the selected property.
+		 *
+		 * @return the selected property
+		 */
+		public List<Property> getSelectedProperty() {
+			return selectedProperty;
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetSortProperty.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/BackToText.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/BackToText.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/BackToText.java	(revision 324)
@@ -0,0 +1,79 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * action called to set the complex sort of the concordance @ author mdecorde.
+ */
+public class BackToText extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.backtotext"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+
+	/**
+	 * Instantiates a new back to text.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 */
+	public BackToText(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.window = window;
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.BackToText_0);
+		setToolTipText(Messages.BackToText_0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		concordanceEditor.backToText();
+
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/BackToText.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesEditor.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesEditor.java	(revision 324)
@@ -0,0 +1,2965 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+import java.util.logging.Level;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.ProgressListener;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.ScrollBar;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.dialogs.ListDialog;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.Toolbox;
+import org.txm.annotation.Annotation;
+import org.txm.annotation.AnnotationManager;
+import org.txm.annotation.repository.AnnotationType;
+import org.txm.annotation.repository.KnowledgeRepository;
+import org.txm.annotation.repository.KnowledgeRepositoryManager;
+import org.txm.annotation.repository.LocalKnowledgeRepository;
+import org.txm.annotation.repository.SQLKnowledgeRepository;
+import org.txm.annotation.repository.TypedValue;
+import org.txm.cooccurrence.rcp.messages.CooccurrenceUIMessages;
+import org.txm.core.messages.TXMCoreMessages;
+import org.txm.functions.ReferencePattern;
+import org.txm.functions.concordances.Concordance;
+import org.txm.functions.concordances.Line;
+import org.txm.functions.concordances.comparators.CompositeComparator;
+import org.txm.functions.concordances.comparators.LexicographicKeywordComparator;
+import org.txm.functions.concordances.comparators.LexicographicLeftContextComparator;
+import org.txm.functions.concordances.comparators.LexicographicRightContextComparator;
+import org.txm.functions.concordances.comparators.LineComparator;
+import org.txm.functions.concordances.comparators.NullComparator;
+import org.txm.functions.concordances.comparators.PropertiesReferenceComparator;
+import org.txm.functions.concordances.comparators.ReverseComparator;
+import org.txm.objects.Page;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.JobsTimer;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.TxmPreferences;
+import org.txm.rcp.commands.BackToTextCommand;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.commands.annotation.InitializeKnowledgeRepository;
+import org.txm.rcp.commands.annotation.SaveAnnotations;
+import org.txm.rcp.commands.editor.CustomizableEditor;
+import org.txm.rcp.commands.editor.DeleteLines;
+import org.txm.rcp.commands.krview.OpenKRView;
+import org.txm.rcp.editors.TXMBrowser;
+import org.txm.rcp.editors.TableKeyListener;
+import org.txm.rcp.editors.input.ConcordancesEditorInput;
+import org.txm.rcp.editors.input.InternalViewEditorInput;
+import org.txm.rcp.editors.internal.InternalViewEditor;
+import org.txm.rcp.preferences.AnnotationPreferencePage;
+import org.txm.rcp.preferences.ConcordancerPreferenceInitializer;
+import org.txm.rcp.preferences.ConcordancerPreferencePage;
+import org.txm.rcp.preferences.LocalePreferencePage;
+import org.txm.rcp.swt.dialog.ConfirmDialog;
+import org.txm.rcp.swt.provider.SimpleLabelProvider;
+import org.txm.rcp.swt.widget.AssistedQueryWidget;
+import org.txm.rcp.swt.widget.ComplexSortSelector;
+import org.txm.rcp.swt.widget.NavigationWidget;
+import org.txm.rcp.utils.JobHandler;
+import org.txm.rcp.utils.SWTEditorsUtils;
+import org.txm.rcp.views.QueriesView;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.rcp.views.knowledgerepositories.KRView;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Match;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.statsengine.r.rcp.views.RVariablesView;
+import org.txm.utils.AsciiUtils;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * display the concordances parameters and results in the same editor
+ * 
+ * @author mdecorde.
+ */
+public class ConcordancesEditor extends EditorPart implements CustomizableEditor {
+
+	/**
+	 * the limit number of annotation when a confirm dialog box is shown
+	 */
+	private static final int NALERTAFFECTANNOTATIONS = 100;
+
+	String locale = TxmPreferences.getString(LocalePreferencePage.UI_LOCALE, "en");
+	
+	/** The lineids. */
+	List<String> lineids;
+
+	/** The standard comparators. */
+	private List<LineComparator> standardComparators;
+
+	/** The user defined comparators. */
+	private List<LineComparator> userDefinedComparators;
+
+	/** The complexsorter. */
+	ComplexSortSelector complexsorter;
+	org.eclipse.swt.widgets.Text cqlSeparator;
+
+	/** The available view keyword properties. */
+	private List<Property> availableKeywordViewProperties;
+	/** The available view left properties. */
+	private List<Property> availableLeftViewProperties;
+	/** The available view right properties. */
+	private List<Property> availableRightViewProperties;
+
+	/** The selected left view properties. */
+	private List<Property> selectedLeftViewProperties;
+	/** The selected right view properties. */
+	private List<Property> selectedRightViewProperties;
+	/** The selected keyword view properties. */
+	private List<Property> selectedKeywordViewProperties;
+
+	/** The available sort properties. */
+	private List<Property> availableKeywordSortProperties;
+
+	/** The selected keyword sort property. */
+	private List<Property> selectedKeywordSortProperties;
+	/** The selected left sort property. */
+	private List<Property> selectedLeftSortProperties;
+	/** The selected right sort property. */
+	private List<Property> selectedRightSortProperties;
+
+	/** The reference pattern. */
+	private ReferencePattern refViewPattern;
+	private ReferencePattern refSortPattern;
+
+	/** The concordance. */
+	private Concordance concordance;
+
+	/** The annotation service */
+	private AnnotationManager  annotManager;
+	
+	//boolean annotation_expert_mode = TxmPreferences.getBoolean(AnnotationPreferencePage.MODE, false);
+
+	/** The standard comparator class name. */
+	private LineComparator[] standardComparatorClassName = {
+			new NullComparator(), new LexicographicKeywordComparator(),
+			new LexicographicLeftContextComparator(),
+			new LexicographicRightContextComparator(),
+			new PropertiesReferenceComparator() };
+
+	/** The corpus. */
+	private Corpus corpus;
+
+	/** The n line per page. */
+	private int nLinePerPage;
+
+	/** The top line. */
+	private int topLine;
+
+	/** The bottom line. */
+	private int bottomLine;
+
+	/** The current comparator. */
+	protected LineComparator currentComparator;
+
+	/** The left context size. */
+	private int leftContextSize;
+
+	/** The right context size. */
+	private int rightContextSize;
+
+	/** The mouseposition. */
+	private Point mouseposition;
+
+	/** The query widget. */
+	private AssistedQueryWidget queryWidget;
+
+	/** The line table viewer. */
+	private TableViewer viewer;
+
+	/** The reference column. */
+	private TableColumn referenceColumn;
+
+	/** The first column. */
+	private TableColumn firstColumn; // due to a restriction on some platforms
+	// (actually, MS Windows), the first
+	// column is always left aligned. The
+	// work around is to have a 0 width
+	// first column
+	/** The left context column. */
+	private TableColumn leftContextColumn;
+	/** The keyword column. */
+	private TableColumn keywordColumn;
+	/** The right context column. */
+	private TableColumn rightContextColumn;
+
+	/** The view properties label. */
+	private Label viewPropertiesLabel;
+
+	/** The set sort property action. */
+	private Action setSortPropertyAction;
+
+	/** The set context size action. */
+	private Action setContextSizeAction;
+
+	/** The set line number action. */
+	private Action setLineNumberAction;
+
+	/** The define view reference pattern action. */
+	protected Action defineViewReferencePatternAction;
+
+	/** The define sort reference pattern action. */
+	protected Action defineSortReferencePatternAction;	
+
+	/** The set view property action. */
+	protected Action setViewPropertyAction;
+
+	/** The attached browser editor. */
+	protected TXMBrowser attachedBrowserEditor;
+
+	/** The progresslistener. */
+	protected ProgressListener progresslistener;
+
+	/** The textid. */
+	protected String textid;
+
+	/** The opened page. */
+	Page openedPage;
+
+	/** The query area. */
+	private Composite queryArea;
+
+	/** The annotation area. */
+	private Composite annotationArea;
+
+	/** The navigation area. */
+	private NavigationWidget navigationArea;
+
+	/** The is setup shown. */
+	private boolean isSetupShown = true;
+	
+
+	/** The hide btn. */
+	private Button hideBtn;
+	private Button deleteLineButton;
+
+	/** The query size. */
+	protected Point querySize;
+	
+	protected Point annotationSize;
+	
+	/** The annot btn. */
+	private Button annotationButton;
+
+	//	/** The selected typed value for new annotations **/
+	//	private TypedValue annotSelectedTypedValue;
+	//	private AnnotationType annotSelectedType;
+
+	private Text annotationValuesText;
+	private ComboViewer annotationTypesCombo;
+
+	/** The parent. */
+	private Composite parent;
+
+	private ArrayList<Property> availableLeftSortProperties;
+
+	private ArrayList<Property> availableRightSortProperties;
+
+	private List<TypedValue> typeValuesList;
+
+	protected Point annotSize;
+
+	private TableColumn annotationColumn;
+
+	//	private Button addAnnotationButton;
+	//	private Button deleteAnnotationButton;
+	private Combo addRemoveCombo;
+	private Combo affectCombo;
+	private Button affectAnnotationButton;
+	//	private Button affectAnnotationToSelectionButton;
+	//	private Button affectAnnotationToConcordanceButton;
+	//	private Button affectAnnotationToPageButton;
+
+	private Label aLabel;
+
+	private Button infosAnnotTypeSelectedLink;
+
+	//	private TableColumnLayout tableLayout;
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor monitor) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isDirty()
+	 */
+	@Override
+	public boolean isDirty() {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+
+	/**
+	 * Sets the standard comparators.
+	 */
+	private void setStandardComparators() {
+		for (int i = 0; i < standardComparatorClassName.length; i++)
+			standardComparators.add(standardComparatorClassName[i]);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		setSite(site);
+		setInput(input);
+
+		initializeEditor();
+	}
+
+	private void initializeEditor() {
+		this.corpus = ((ConcordancesEditorInput) getEditorInput()).getCorpus();
+		this.annotManager = corpus.getAnnotationManager();
+
+		this.standardComparators = new ArrayList<LineComparator>();
+		this.userDefinedComparators = new ArrayList<LineComparator>();
+		new ArrayList<LineComparator>();
+		setStandardComparators();
+		IPreferencesService service = Platform.getPreferencesService();
+		this.nLinePerPage = service.getInt(
+				Application.PLUGIN_ID,
+				ConcordancerPreferencePage.N_LINE_PER_PAGE,
+				ConcordancerPreferenceInitializer.N_LINE_PER_PAGE_DEFAULT,
+				null);
+		try {
+			this.availableKeywordViewProperties = new ArrayList<Property>(
+					corpus.getOrderedProperties());
+			this.availableLeftViewProperties = new ArrayList<Property>(corpus
+					.getOrderedProperties());
+			this.availableRightViewProperties = new ArrayList<Property>(corpus
+					.getOrderedProperties());
+			this.availableLeftSortProperties = new ArrayList<Property>(corpus
+					.getOrderedProperties());
+			this.availableKeywordSortProperties = new ArrayList<Property>(corpus
+					.getOrderedProperties());
+			this.availableRightSortProperties = new ArrayList<Property>(corpus
+					.getOrderedProperties());
+		} catch (CqiClientException e) {
+			//System.err.println(Messages.CorporaView_3+" : "+Log.toString(e)); //$NON-NLS-1$
+			try {
+				System.out.println(Messages.ConcordancesEditor_0+Toolbox.getCqiClient().getLastCQPError());
+				Log.severe(Messages.ConcordancesEditor_0+Toolbox.getCqiClient().getLastCQPError());
+			} catch (Exception e1) {
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
+				Log.severe("Error while computing concordance: "+e.getLocalizedMessage());
+			} 
+			
+			return;
+		}
+
+		this.concordance = ((ConcordancesEditorInput) getEditorInput()).getConcordance();
+
+		if (this.concordance == null) {
+			leftContextSize = service.getInt(
+					Application.PLUGIN_ID,
+					ConcordancerPreferencePage.LEFT_CONTEXT_SIZE,
+					ConcordancerPreferenceInitializer.LEFT_CONTEXT_SIZE_DEFAULT,
+					null);
+			rightContextSize = service.getInt(
+					Application.PLUGIN_ID,
+					ConcordancerPreferencePage.RIGHT_CONTEXT_SIZE,
+					ConcordancerPreferenceInitializer.RIGHT_CONTEXT_SIZE_DEFAULT,
+					null);
+
+			selectedLeftViewProperties = new ArrayList<Property>();
+			selectedRightViewProperties = new ArrayList<Property>();
+			selectedKeywordViewProperties = new ArrayList<Property>();
+
+			//set default view property
+			Property defaultViewProperty = availableKeywordViewProperties.get(0);
+			if(!defaultViewProperty.getName().equals("word")) //$NON-NLS-1$
+				for(int i = 0 ; i < availableKeywordViewProperties.size() ; i++ )
+					if (availableKeywordViewProperties.get(i).getName().equals("word")) //$NON-NLS-1$
+					{
+						defaultViewProperty = availableKeywordViewProperties.get(i);
+						break;
+					}
+
+			availableKeywordViewProperties.remove(defaultViewProperty);
+			availableLeftViewProperties.remove(defaultViewProperty);
+			availableRightViewProperties.remove(defaultViewProperty);
+			selectedLeftViewProperties.add(defaultViewProperty);
+			selectedRightViewProperties.add(defaultViewProperty);
+			selectedKeywordViewProperties.add(defaultViewProperty);
+
+			//set default sort property
+			selectedLeftSortProperties = new ArrayList<Property>();
+			selectedRightSortProperties = new ArrayList<Property>();
+			selectedKeywordSortProperties = new ArrayList<Property>();
+
+			Property defaultSortProperty = availableKeywordSortProperties.get(0);
+			if(!defaultSortProperty.getName().equals("word")) //$NON-NLS-1$
+				for(int i = 0 ; i < availableKeywordSortProperties.size() ; i++ )
+					if (availableKeywordSortProperties.get(i).getName().equals("word")) //$NON-NLS-1$
+					{
+						defaultSortProperty = availableKeywordSortProperties.get(i);
+						break;
+					}
+
+			availableKeywordSortProperties.remove(defaultSortProperty);
+			availableLeftSortProperties.remove(defaultSortProperty);
+			availableRightSortProperties.remove(defaultSortProperty);
+			selectedLeftSortProperties.add(defaultSortProperty);
+			selectedRightSortProperties.add(defaultSortProperty);
+			selectedKeywordSortProperties.add(defaultSortProperty);
+
+			this.refViewPattern = new ReferencePattern();
+			this.refSortPattern = new ReferencePattern();
+			try { // set the default reference is there is one
+				if (corpus.getProperty("ref") != null) //$NON-NLS-1$
+				{
+					refViewPattern.addProperty(corpus.getProperty("ref")); //$NON-NLS-1$
+					refSortPattern.addProperty(corpus.getProperty("ref")); //$NON-NLS-1$
+				} else {
+					if (corpus.getStructuralUnit("text") != null) //$NON-NLS-1$
+						if (corpus.getStructuralUnit("text").getProperty("id") != null) //$NON-NLS-1$ //$NON-NLS-2$
+						{
+							refViewPattern.addProperty(corpus.getStructuralUnit("text").getProperty("id")); //$NON-NLS-1$ //$NON-NLS-2$
+							refSortPattern.addProperty(corpus.getStructuralUnit("text").getProperty("id")); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+				}
+			} catch (CqiClientException e) {
+				System.out.println(NLS.bind(Messages.ConcordancesEditor_43, corpus.getName(), e));
+			}
+		} else {
+			leftContextSize = concordance.getLeftContextSize();
+			rightContextSize = concordance.getRightContextSize();
+
+			selectedLeftViewProperties = concordance.getLeftViewProperties();
+			selectedRightViewProperties = concordance.getRightViewProperties();
+			selectedKeywordViewProperties = concordance.getKeywordViewProperties();
+			availableKeywordViewProperties.remove(selectedKeywordViewProperties);
+			availableLeftViewProperties.remove(selectedLeftViewProperties);
+			availableRightViewProperties.remove(selectedRightViewProperties);
+
+			selectedLeftSortProperties = concordance.getLeftAnalysisProperties();
+			selectedRightSortProperties = concordance.getRightAnalysisProperties();
+			selectedKeywordSortProperties = concordance.getKeywordAnalysisProperties();
+			availableKeywordSortProperties.remove(selectedKeywordSortProperties);
+			availableLeftSortProperties.remove(selectedLeftSortProperties);
+			availableRightSortProperties.remove(selectedRightSortProperties);
+
+			this.refViewPattern = concordance.getRefViewPattern();
+			this.refSortPattern = concordance.getRefAnalysePattern();
+		}
+
+
+
+		if (concordance != null)
+			setPartName(concordance.getName());
+		else
+			setPartName(corpus.getName());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		this.parent = parent;
+		//		GridLayout layout = new GridLayout(1, false);
+		//		layout.horizontalSpacing = 0;
+		//		layout.verticalSpacing = 0;
+		//		parent.setLayout(layout);
+
+		parent.setLayout(new FormLayout());
+
+		Composite controlArea = new Composite(parent, SWT.NONE); // the form
+		FormData formdata1 = new FormData();
+		formdata1.top = new FormAttachment(0);
+		//formdata1.bottom = new FormAttachment(100);
+		formdata1.left = new FormAttachment(0);
+		formdata1.right = new FormAttachment(100);
+		controlArea.setLayoutData(formdata1);
+
+
+		Composite displayArea = new Composite(parent, SWT.NONE); // the lines
+		FormData formdata2 = new FormData();
+		formdata2.top = new FormAttachment(controlArea);
+		formdata2.bottom = new FormAttachment(100);
+		formdata2.left = new FormAttachment(0);
+		formdata2.right = new FormAttachment(100);
+		displayArea.setLayoutData(formdata2);
+
+		composeControlArea(controlArea);
+		composeDisplayArea(displayArea);
+
+		//if (concordance != null)
+		//	fillDisplayArea(0, nLinePerPage);
+	}
+
+	/**
+	 * Compose display area.
+	 *
+	 * @param displayArea the display area
+	 */
+	private void composeDisplayArea(final Composite displayArea) {
+		//		tableLayout = new TableColumnLayout();
+		displayArea.setLayout(new GridLayout(1, true));
+
+		viewer = new TableViewer(displayArea, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
+		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
+		viewer.setLabelProvider(new LineLabelProvider(this));
+		viewer.setContentProvider(new ConcordancesProvider());
+		viewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+		if (corpus != null && corpus.getFont() != null && corpus.getFont().length() > 0) {
+			Font old = viewer.getTable().getFont();
+			FontData fD = old.getFontData()[0];
+			Font font = new Font(Display.getCurrent(), corpus.getFont(), fD.getHeight(), fD.getStyle()); 
+			viewer.getTable().setFont(font);
+		}
+
+		viewer.getTable().addListener(SWT.Resize, new Listener() {
+			@Override
+			public void handleEvent(Event event) {
+				ScrollBar bar = viewer.getTable().getHorizontalBar();
+				float l=leftContextColumn.getWidth();
+				float k=keywordColumn.getWidth();
+				float r=rightContextColumn.getWidth();
+				float t=viewer.getTable().getClientArea().width;//the width of the visible part of the table; l+k+r>=t
+				float x=l+k/2-t/2; //the abcisse the visible rectangle must have for the keyword column to be centered
+				float M=bar.getMaximum();
+				float T=bar.getThumb();
+				bar.setSelection(Math.round(x*(M-T)/(l+k+r-t)));//this is how x translate in terms of bar selection
+			}
+		});
+
+		//TODO: to enable line deletion, Concordance code must updated 
+		viewer.getTable().addKeyListener(new KeyListener() {
+
+			@Override
+			public void keyReleased(KeyEvent e) {	}
+
+			@Override
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode != SWT.DEL ) { // CTRL + C
+					return;
+				}
+
+				DeleteLines.deleteConcordanceLines(ConcordancesEditor.this);
+			}
+		});
+
+
+		firstColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		firstColumn.setWidth(0);
+
+		referenceColumn = new TableColumn(viewer.getTable(), SWT.V_SCROLL | SWT.H_SCROLL);
+		refreshReferenceColumnTitle();
+		referenceColumn.setToolTipText(Messages.ConcordancesEditor_1);
+		referenceColumn.setAlignment(SWT.LEFT);
+		referenceColumn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(Messages.ConcordancesEditor_37);
+				LineComparator comparator = new PropertiesReferenceComparator();
+				if (viewer.getTable().getSortColumn() != referenceColumn) {
+					viewer.getTable().setSortColumn(null);
+					viewer.getTable().setSortColumn(referenceColumn);
+					viewer.getTable().setSortDirection(SWT.UP);
+				} else if (viewer.getTable().getSortDirection() == SWT.UP) {
+					viewer.getTable().setSortDirection(SWT.DOWN);
+					comparator = new ReverseComparator(comparator);
+				} else {
+					viewer.getTable().setSortDirection(SWT.UP);
+				}
+				comparator.initialize(corpus);
+				currentComparator = comparator;
+				complexsorter.setKey(4);//set ref key
+				sort();
+				StatusLine.setMessage(""); //$NON-NLS-1$
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		leftContextColumn = new TableColumn(viewer.getTable(), SWT.RIGHT);
+		leftContextColumn.setText(Messages.ConcordancesEditor_2);
+		leftContextColumn.setToolTipText(Messages.ConcordancesEditor_2);
+		leftContextColumn.setAlignment(SWT.RIGHT);
+		leftContextColumn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(Messages.ConcordancesEditor_41);
+				LineComparator comparator = new LexicographicLeftContextComparator();
+				if (viewer.getTable().getSortColumn() != leftContextColumn) {
+					viewer.getTable().setSortColumn(leftContextColumn);
+					viewer.getTable().setSortDirection(SWT.UP);
+				} else if (viewer.getTable().getSortDirection() == SWT.UP) {
+					viewer.getTable().setSortDirection(SWT.DOWN);
+					comparator = new ReverseComparator(comparator);
+				} else
+					viewer.getTable().setSortDirection(SWT.UP);
+				comparator.initialize(corpus);
+				currentComparator = comparator;
+				complexsorter.setKey(2);//set ref key
+				sort();
+				StatusLine.setMessage(""); //$NON-NLS-1$
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		keywordColumn = new TableColumn(viewer.getTable(), SWT.CENTER);
+		keywordColumn.setText(Messages.ConcordancesEditor_3);
+		keywordColumn.setToolTipText(Messages.ConcordancesEditor_3);
+		keywordColumn.setAlignment(SWT.CENTER);
+		keywordColumn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(Messages.ConcordancesEditor_45);
+				LineComparator comparator = new LexicographicKeywordComparator();
+				if (viewer.getTable().getSortColumn() != keywordColumn) {
+					viewer.getTable().setSortColumn(keywordColumn);
+					viewer.getTable().setSortDirection(SWT.UP);
+				} else if (viewer.getTable().getSortDirection() == SWT.UP) {
+					viewer.getTable().setSortDirection(SWT.DOWN);
+					comparator = new ReverseComparator(comparator);
+				} else
+					viewer.getTable().setSortDirection(SWT.UP);
+				comparator.initialize(corpus);
+				currentComparator = comparator;
+				complexsorter.setKey(1);//set ref key
+				sort();
+				StatusLine.setMessage(""); //$NON-NLS-1$
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		annotationColumn = new TableColumn(viewer.getTable(), SWT.CENTER);
+		annotationColumn.setText(Messages.ConcordancesEditor_15);
+		annotationColumn.setToolTipText(Messages.ConcordancesEditor_17);
+		annotationColumn.setAlignment(SWT.CENTER);
+
+		rightContextColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
+		rightContextColumn.setText(Messages.ConcordancesEditor_4);
+		rightContextColumn.setToolTipText(Messages.ConcordancesEditor_4);
+		rightContextColumn.setAlignment(SWT.LEFT);
+		rightContextColumn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(Messages.ConcordancesEditor_48);
+				LineComparator comparator = new LexicographicRightContextComparator();
+
+				if (viewer.getTable().getSortColumn() != rightContextColumn) {
+					viewer.getTable().setSortColumn(rightContextColumn);
+				} else if (viewer.getTable().getSortDirection() == SWT.UP) {
+					viewer.getTable().setSortDirection(SWT.DOWN);
+					comparator = new ReverseComparator(comparator);
+				} else {
+					viewer.getTable().setSortDirection(SWT.UP);
+				}
+				comparator.initialize(corpus);
+				currentComparator = comparator;
+				complexsorter.setKey(3); //set ref key
+				sort();
+				StatusLine.setMessage(""); //$NON-NLS-1$
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		resetColumnWidths(); // set column widths
+
+		viewer.getTable().setLinesVisible(true);
+		viewer.getTable().setHeaderVisible(true);
+
+		createContextMenu();
+
+		// And now, a sweet piece of code :)
+		// When the window is resized, the scrollbar is adjusted so that the
+		// keywords remain centered
+		viewer.getTable().addListener(SWT.Resize, new Listener() {
+			@Override
+			public void handleEvent(Event event) {
+				ScrollBar bar = viewer.getTable().getHorizontalBar();
+				//float l = leftContextColumn.getWidth();
+				//float k = keywordColumn.getWidth();
+				rightContextColumn.getWidth();
+				//float t = lineTableViewer.getTable().getClientArea().width;
+				bar.getMaximum();
+				bar.getThumb();
+			}
+		});
+
+		// back to text mouse listener
+		viewer.getTable().addMouseListener(new MouseListener() {
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+				StatusLine.setMessage(Messages.ConcordancesEditor_50);
+				backToText();
+				StatusLine.setMessage(""); //$NON-NLS-1$
+			}
+
+			@Override
+			public void mouseDown(MouseEvent e) { }
+			@Override
+			public void mouseUp(MouseEvent e) {	}
+		});
+
+		// On Windows, the selection is gray if the table does not have focus.
+		// To make both tables appear in focus, draw the selection background
+		// here.
+		// This part only works on version 3.2 or later.
+		Listener eraseListener = new Listener() {
+			@Override
+			public void handleEvent(Event event) {
+				event.detail &= ~SWT.HOT;
+				if ((event.detail & SWT.SELECTED) != 0) {
+					GC gc = event.gc;
+					Rectangle rect = event.getBounds();
+					gc.setForeground(displayArea.getDisplay().getSystemColor(
+							SWT.COLOR_LIST_SELECTION_TEXT));
+					gc.setBackground(displayArea.getDisplay().getSystemColor(
+							SWT.COLOR_LIST_SELECTION));
+					gc.fillRectangle(rect);
+					event.detail &= ~SWT.SELECTED;
+				}
+			}
+		};
+
+		// Listeners to avoid 0 width clumns
+		referenceColumn.addControlListener(new ControlListener() {
+			@Override
+			public void controlMoved(ControlEvent e) { }
+			@Override
+			public void controlResized(ControlEvent e) {
+				if (referenceColumn.getWidth() < 5) referenceColumn.setWidth(5);
+
+			}
+		});
+		leftContextColumn.addControlListener(new ControlListener() {
+			@Override
+			public void controlMoved(ControlEvent e) { }
+			@Override
+			public void controlResized(ControlEvent e) {
+				if (leftContextColumn.getWidth() < 5) leftContextColumn.setWidth(5);
+
+			}
+		});
+		keywordColumn.addControlListener(new ControlListener() {
+			@Override
+			public void controlMoved(ControlEvent e) { }
+			@Override
+			public void controlResized(ControlEvent e) {
+				if (keywordColumn.getWidth() < 5) keywordColumn.setWidth(5);
+
+			}
+		});
+		annotationColumn.addControlListener(new ControlListener() {
+			@Override
+			public void controlMoved(ControlEvent e) { }
+			@Override
+			public void controlResized(ControlEvent e) {
+				if (annotationArea != null && annotationColumn.getWidth() < 5) annotationColumn.setWidth(5);
+
+			}
+		});
+		rightContextColumn.addControlListener(new ControlListener() {
+			@Override
+			public void controlMoved(ControlEvent e) { }
+			@Override
+			public void controlResized(ControlEvent e) {
+				if (rightContextColumn.getWidth() < 5) rightContextColumn.setWidth(5);
+
+			}
+		});
+
+		viewer.getTable().addListener(SWT.EraseItem, eraseListener);
+
+		//		tableLayout.setColumnData(firstColumn, new ColumnWeightData(0, false));
+		//		tableLayout.setColumnData(referenceColumn, new ColumnWeightData(1, true)); 
+		//		tableLayout.setColumnData(keywordColumn, new ColumnWeightData(1, true));
+		//		tableLayout.setColumnData(leftContextColumn, new ColumnWeightData(1, true));
+		//		tableLayout.setColumnData(annotationColumn, new ColumnWeightData(0, true));
+		//		tableLayout.setColumnData(rightContextColumn, new ColumnWeightData(1, true));
+	}
+
+	/**
+	 * Sort.
+	 */
+	public void sort() {
+		if (concordance != null && currentComparator != null) {
+
+			//System.out.println("concordance sort props: "+concordance.getLeftCAnalysisProperty()+", "+concordance.getKeywordAnalysisProperty()+", "+concordance.getRightCAnalysisProperty());
+			concordance.setLeftAnalysisProperties(selectedLeftSortProperties);
+			concordance.setKeywordAnalysisProperties(selectedKeywordSortProperties);
+			concordance.setRightAnalysisProperties(selectedRightSortProperties);
+			
+			try {
+				Log.info(NLS.bind(CooccurrenceUIMessages.CooccurrencesEditor_0, currentComparator.getName()));
+				if (currentComparator instanceof CompositeComparator)
+					Log.info(((CompositeComparator) currentComparator).getComparators().toString());
+				JobHandler jobhandler = new JobHandler("Sorting...") { //$NON-NLS-1$
+					@Override
+					protected IStatus run(IProgressMonitor monitor) {
+						this.runInit(monitor);
+						JobsTimer.start();
+						try {
+							monitor.beginTask(Messages.ConcordancesEditor_6, concordance.getNLines());
+							concordance.setCurrentMonitor(this);
+							concordance.sort(currentComparator);
+							concordance.setCurrentMonitor(null);
+							syncExec(new Runnable() {
+								@Override
+								public void run() {
+									StatusLine.setMessage(Messages.SORT_DONE);
+									fillDisplayArea(topLine, topLine + nLinePerPage - 1);
+								}
+							});
+
+						} catch (ThreadDeath td) {
+							return Status.CANCEL_STATUS;
+						} catch (Exception e) {
+							System.err.println(NLS.bind(Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
+							org.txm.rcp.utils.Logger.printStackTrace(e);
+						} finally {
+							monitor.done();
+							JobsTimer.stopAndPrint();
+						}
+						return Status.OK_STATUS;
+					}
+				};
+
+				jobhandler.startJob();
+			} catch (Exception e) {
+				System.err.println(NLS.bind(Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+			}
+		}
+	}
+
+	/**
+	 * Lazy loads the concordance lines range and fills the display area.
+	 *
+	 * @param from the from
+	 * @param to the to
+	 */
+	public void fillDisplayArea(int from, int to) {
+		if (viewer == null)
+			return;
+		
+		viewer.getControl().setRedraw(false);
+		
+		from = Math.max(from, 0);
+		to = Math.min(to, concordance.getNLines() - 1);
+		List<Line> lines = null;
+		if (concordance.getNLines() > 0) {
+			try {
+				lines = concordance.getLines(from, to);
+			} catch (Exception e) {
+				System.err.println(Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE+ e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
+			}
+		} else
+			lines = new ArrayList<Line>();
+
+		viewer.setInput(lines);
+		referenceColumn.pack();
+		leftContextColumn.pack();
+		keywordColumn.pack();
+		rightContextColumn.pack();
+		viewer.getTable().pack(true);
+		viewer.getTable().getParent().layout();
+
+		topLine = from;
+		bottomLine = to;
+
+		navigationArea.setInfoLineText(""+(from + 1), //$NON-NLS-1$
+				" - "+(to + 1) + " / " + concordance.getNLines()); //$NON-NLS-1$ //$NON-NLS-2$
+
+		navigationArea.setPreviousEnabled(topLine > 0);
+		navigationArea.setFirstEnabled(topLine > 0);
+		navigationArea.setNextEnabled(bottomLine < concordance.getNLines() - 1);
+		navigationArea.setLastEnabled(bottomLine < concordance.getNLines() - 1);
+		navigationArea.layout();
+		navigationArea.getParent().layout();
+
+		refreshReferenceColumnTitle();
+		
+		viewer.getControl().setRedraw(true);
+	}
+
+	HashMap<AnnotationType, ArrayList<TypedValue>> history = new HashMap<AnnotationType, ArrayList<TypedValue>>();
+
+	private Button addAnnotationTypeLink;
+
+	private KnowledgeRepository currentKnowledgeRepository = null;
+	Vector<AnnotationType> typesList = new Vector<AnnotationType>(); 
+
+	private Button addTypedValueLink;
+
+	private Label withLabel;
+
+	private AnnotationType tagAnnotationType; // the tag annotation type if annotation mode is simple
+
+	private Label equalLabel;
+	Boolean advanced_annotation_mode = false;
+	
+	private void composeAnnotationArea(final Composite parent){ 
+		advanced_annotation_mode = "advanced".equals(TxmPreferences.getString(AnnotationPreferencePage.MODE, "simple"));
+		
+		List<KnowledgeRepository> krs = InitializeKnowledgeRepository.get(corpus.getMainCorpus());
+		typesList.clear();
+		Log.warning("Corpus KRs: "+krs); //$NON-NLS-1$
+
+		for (KnowledgeRepository kr : krs) {
+			currentKnowledgeRepository = kr;
+			Log.warning(" KR: "+kr); //$NON-NLS-1$
+			List<AnnotationType> krtypes = kr.getAllAnnotationTypes();
+			Log.warning("Advanced annotation mode ? "+advanced_annotation_mode);
+			if (!advanced_annotation_mode) { // creates the "span" annotation type
+				boolean createTagAnnotationType = true;
+				for (AnnotationType type : krtypes) {
+					if (type.getName().equals("span")) { //$NON-NLS-1$
+						createTagAnnotationType = false;
+					}
+				}
+				if (createTagAnnotationType) {
+					tagAnnotationType = kr.addType("span", "span");//corresponds to an "undef" type //$NON-NLS-1$ //$NON-NLS-2$
+					typesList.add(tagAnnotationType);
+				} else {
+					tagAnnotationType = kr.getType("span"); //$NON-NLS-1$
+				}
+			} else {
+				typesList.addAll(krtypes);
+			}
+			Log.warning("Available annotation types: "+typesList);
+			break;
+		}
+
+		annotationArea = new Composite(parent, SWT.NONE);
+		annotationArea.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, false, false));
+
+		GridLayout annotLayout = new GridLayout(12, false);
+		annotLayout.verticalSpacing = 0;
+		annotLayout.marginWidth = 0;
+		annotLayout.marginHeight = 0;
+		annotationArea.setLayout(annotLayout);
+
+		//init values history
+		for (AnnotationType type : typesList) {
+			history.put(type, new ArrayList<TypedValue>());
+		}
+
+		addRemoveCombo = new Combo(annotationArea, SWT.READ_ONLY);
+		String affectLabel = currentKnowledgeRepository.getString(locale, "ConcordancesEditor_22");
+		if (affectLabel == null) affectLabel= Messages.ConcordancesEditor_22;
+		String removeLabel = currentKnowledgeRepository.getString(locale, "ConcordancesEditor_24");
+		if (removeLabel == null) removeLabel= Messages.ConcordancesEditor_24;
+		String items[] = {affectLabel, removeLabel};
+		addRemoveCombo.setItems(items);
+		addRemoveCombo.select(0);
+		addRemoveCombo.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (addRemoveCombo.getSelectionIndex() == 0) { // add
+					annotationValuesText.setEnabled(true);
+					String withLabelText = currentKnowledgeRepository.getString(locale, "ConcordancesEditor_83");
+					if (withLabelText == null) withLabelText= Messages.ConcordancesEditor_83;
+					withLabel.setText(withLabelText);
+					if (equalLabel != null) equalLabel.setText("=");
+				} else { // remove
+					annotationValuesText.setEnabled(false);
+					withLabel.setText(""); //$NON-NLS-1$
+					if (equalLabel != null) equalLabel.setText("");
+				}
+				withLabel.redraw();
+				annotationArea.layout();
+				updateAnnotationWidgetStates();
+			}
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		GridData gdata = new GridData(SWT.CENTER, SWT.CENTER, false, true);
+		gdata.widthHint = 90;
+		addRemoveCombo.setLayoutData(gdata);
+	
+		withLabel = new Label(annotationArea, SWT.NONE);
+		String withLabelText = currentKnowledgeRepository.getString(locale, "ConcordancesEditor_83");
+		if (withLabelText == null) withLabelText= Messages.ConcordancesEditor_83;
+		withLabel.setText(withLabelText);
+		withLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+
+		if (advanced_annotation_mode) {
+			equalLabel = new Label(annotationArea, SWT.NONE);
+			equalLabel.setText("="); //$NON-NLS-1$
+			equalLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+		}
+
+		//Display combo with list of Annotation Type 
+		if (advanced_annotation_mode) {
+			annotationTypesCombo = new ComboViewer(annotationArea, SWT.READ_ONLY);
+			annotationTypesCombo.setContentProvider(new ArrayContentProvider());
+			annotationTypesCombo.setLabelProvider(new SimpleLabelProvider() {
+				@Override
+				public String getColumnText(Object element, int columnIndex) {
+					return ((AnnotationType)element).getName(); //$NON-NLS-1$
+				}
+				@Override
+				public String getText(Object element) {
+					return ((AnnotationType)element).getName(); //$NON-NLS-1$
+				}
+			});
+			gdata = new GridData(SWT.CENTER, SWT.CENTER, false, true);
+			gdata.widthHint = 200;
+
+			annotationTypesCombo.getCombo().setLayoutData(gdata);
+			annotationTypesCombo.setInput(typesList);
+			if (advanced_annotation_mode.equals(Messages.AnnotationPreferences_2)) {
+				annotationTypesCombo.getCombo().select(0);
+			}
+
+			annotationTypesCombo.addSelectionChangedListener(new ISelectionChangedListener() {
+				@Override
+				public void selectionChanged(SelectionChangedEvent event) {
+					AnnotationType type = getSelectedAnnotationType();
+					if (type == null) return;
+					if (type.getSize() != AnnotationType.ValuesSize.LARGE) {
+						try {
+							KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository());
+							typeValuesList = kr.getValues(type);
+						} catch (Exception e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+					} else { // set history values
+						typeValuesList = history.get(type);
+					}
+
+					annotationColumn.setText(type.getName());
+					if (concordance != null) {
+						concordance.setViewAnnotation(type);
+						concordance.setAnnotationOverlap(true);
+						fillDisplayArea(topLine, bottomLine);
+					}
+
+					updateAnnotationWidgetStates();
+				}
+			});
+		}
+
+		if (advanced_annotation_mode) {
+			if (currentKnowledgeRepository instanceof SQLKnowledgeRepository) {
+				infosAnnotTypeSelectedLink = new Button(annotationArea, SWT.PUSH);
+				infosAnnotTypeSelectedLink.setImage(IImageKeys.getImage(IImageKeys.ACTION_INFO));
+				infosAnnotTypeSelectedLink.setEnabled(true);
+				infosAnnotTypeSelectedLink.setLayoutData(new GridData(SWT.FILL,	SWT.CENTER, false, true));
+				infosAnnotTypeSelectedLink.addSelectionListener(new SelectionListener() {
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						AnnotationType type = getSelectedAnnotationType();
+						if (type == null) return;
+
+						String typedValueURL = type.getURL(); // may be null/empty
+						if (typedValueURL != null && typedValueURL.length() > 0) {
+							KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository());
+							kr.getTypeURL(type);
+						}
+						if (typedValueURL != null && typedValueURL.length() > 0) {
+							OpenBrowser.openfile(typedValueURL, new File(typedValueURL).getName());
+						} else {
+							IWorkbenchWindow window = getSite().getWorkbenchWindow();
+							try {
+								OpenKRView.openView(window, type);
+							} catch (PartInitException e1) {
+								e1.printStackTrace();
+							}
+						}
+					}
+
+					@Override
+					public void widgetDefaultSelected(SelectionEvent e) { }
+				});
+			}
+
+			if (currentKnowledgeRepository instanceof LocalKnowledgeRepository) {
+				addAnnotationTypeLink = new Button(annotationArea, SWT.PUSH);
+				addAnnotationTypeLink.setToolTipText(Messages.ConcordancesEditor_115);
+				addAnnotationTypeLink.setImage(IImageKeys.getImage(IImageKeys.ACTION_ADD));
+				addAnnotationTypeLink.setEnabled(true);
+				addAnnotationTypeLink.setLayoutData(new GridData(SWT.FILL,	SWT.CENTER, false, true));
+				addAnnotationTypeLink.addSelectionListener(new SelectionListener() {
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						if (currentKnowledgeRepository == null) return;
+						if (!(currentKnowledgeRepository instanceof LocalKnowledgeRepository)) return;
+
+						LocalKnowledgeRepository kr = (LocalKnowledgeRepository)currentKnowledgeRepository;
+
+						InputDialog dialog = new InputDialog(e.widget.getDisplay().getActiveShell(), Messages.ConcordancesEditor_82, Messages.ConcordancesEditor_81, "", null); //$NON-NLS-3$
+						if (dialog.open() == InputDialog.OK) {
+							String name = dialog.getValue();
+							if (name.trim().length() == 0) return;
+							String baseid = AsciiUtils.buildId(name);
+							String id = AsciiUtils.buildId(name);
+							int c = 1;
+							while (kr.getType(id) != null) {
+								id = baseid+"_"+(c++); //$NON-NLS-1$
+							}
+							AnnotationType type = kr.addType(name, id, ""); //$NON-NLS-1$
+							typesList.add(type);
+							history.put(type, new ArrayList<TypedValue>());
+
+							if (annotationTypesCombo != null) annotationTypesCombo.refresh();
+							if (typesList.size() == 1) {
+								if (annotationTypesCombo != null) annotationTypesCombo.getCombo().select(0);
+								if (concordance != null) {
+									concordance.setViewAnnotation(type);
+									concordance.setAnnotationOverlap(true);
+									fillDisplayArea(topLine, bottomLine);
+								}
+								annotationArea.layout(true);
+							}else {
+								if (typesList.size() > 1){
+									if (annotationTypesCombo != null) annotationTypesCombo.getCombo().select(typesList.size()-1);
+								
+								}
+								
+							}
+							KRView.refresh();
+							updateAnnotationWidgetStates();
+						} else {
+							System.out.println("Creation aborted."); //$NON-NLS-1$
+						}
+					}
+
+					@Override
+					public void widgetDefaultSelected(SelectionEvent e) { }
+				});
+			}
+		}
+		if (advanced_annotation_mode) {
+			Label valueLabel = new Label(annotationArea, SWT.NONE);
+			String valueLabelText = currentKnowledgeRepository.getString(locale, "ConcordancesEditor_80");
+			if (valueLabelText == null) valueLabelText= Messages.ConcordancesEditor_80;
+			valueLabel.setText(valueLabelText);
+			valueLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+		}
+
+		annotationValuesText = new Text(annotationArea, SWT.BORDER);
+		annotationValuesText.setToolTipText(Messages.ConcordancesEditor_32);
+		GridData gdata2 = new GridData(SWT.FILL, SWT.CENTER, false, true);
+		gdata2.widthHint = 200;
+		annotationValuesText.setLayoutData(gdata2);
+		annotationValuesText.addKeyListener(new KeyListener() {
+			@Override
+			public void keyReleased(KeyEvent e) {
+				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
+					affectAnnotationToSelection(viewer.getSelection());
+				}
+			}
+
+			@Override
+			public void keyPressed(KeyEvent e) { }
+		});
+
+		if (currentKnowledgeRepository instanceof LocalKnowledgeRepository) {
+			addTypedValueLink = new Button(annotationArea, SWT.PUSH);
+			addTypedValueLink.setText("..."); //$NON-NLS-1$
+			if (advanced_annotation_mode.equals(Messages.AnnotationPreferences_2)) {
+				addTypedValueLink.setToolTipText(Messages.ConcordancesEditor_79);
+			}else {
+				addTypedValueLink.setToolTipText(Messages.ConcordancesEditor_77);
+			}
+			addTypedValueLink.setEnabled(true);
+			addTypedValueLink.setLayoutData(new GridData(SWT.FILL,	SWT.CENTER, false, true));
+			addTypedValueLink.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					if (currentKnowledgeRepository == null) return;
+					if (!(currentKnowledgeRepository instanceof LocalKnowledgeRepository)) return;
+
+					AnnotationType type = getSelectedAnnotationType();
+					if (type == null) return;
+
+					LocalKnowledgeRepository kr = (LocalKnowledgeRepository)currentKnowledgeRepository;
+
+					ListDialog dialog = new ListDialog(e.widget.getDisplay().getActiveShell());
+					if (advanced_annotation_mode.equals(Messages.AnnotationPreferences_2)) {
+						String title = currentKnowledgeRepository.getString(locale, "ConcordancesEditor_100");
+						if (title == null) title = Messages.ConcordancesEditor_100;
+						dialog.setTitle(Messages.bind(title, type.getName()));//+"valeurs de "+type.getName());
+					}else {
+						dialog.setTitle(Messages.ConcordancesEditor_99);//+"valeurs de "+type.getName());
+					}
+					dialog.setContentProvider(new ArrayContentProvider());
+					dialog.setLabelProvider(new SimpleLabelProvider() {
+						public String getColumnText(Object element, int columnIndex) {
+							if (element instanceof TypedValue)
+								return ((TypedValue)element).getId();
+							return element.toString();
+						}
+					});
+					List<TypedValue> values;
+					try {
+						values = kr.getValues(type);
+					} catch (Exception e1) {
+						e1.printStackTrace();
+						return;
+					}
+					dialog.setInput(values);
+					if (dialog.open() == InputDialog.OK) {
+						TypedValue value = (TypedValue) dialog.getResult()[0];
+						String name = value.getId();
+						if (name.trim().length() == 0) return;
+
+						annotationValuesText.setText(name);
+					} else {
+
+					}
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) { }
+			});
+		}
+
+		affectCombo = new Combo(annotationArea, SWT.READ_ONLY);
+		affectCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true));
+		String items2[] = {Messages.ConcordancesEditor_35, Messages.ConcordancesEditor_42, Messages.ConcordancesEditor_49};
+		affectCombo.setItems(items2);
+		affectCombo.select(0);
+		gdata = new GridData(SWT.CENTER, SWT.CENTER, false, true);
+		gdata.widthHint = 140;
+		affectCombo.setLayoutData(gdata);
+
+		affectAnnotationButton = new Button(annotationArea, SWT.PUSH);
+		affectAnnotationButton.setText(Messages.ConcordancesEditor_85);
+		affectAnnotationButton.setToolTipText(Messages.ConcordancesEditor_116);
+		affectAnnotationButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true));
+		affectAnnotationButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int isel = affectCombo.getSelectionIndex();
+				if (isel == 0) { // selected line
+					affectAnnotationToSelection(viewer.getSelection());
+				} else if (isel == 1) { // page
+					try {
+						List<Match> matches = concordance.getMatches().subList(topLine, bottomLine+1);
+						affectMatchesToSelection(matches);
+					} catch (CqiClientException e1) {
+						Log.severe(Messages.ConcordancesEditor_53+e1);
+						Log.printStackTrace(e1);
+						return;
+					}
+				} else { // all
+					try {
+						List<Match> matches = concordance.getMatches();
+						affectMatchesToSelection(matches);
+					} catch (CqiClientException e1) {
+						Log.severe(Messages.ConcordancesEditor_53+e1);
+						Log.printStackTrace(e1);
+						return;
+					}
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		Button cancelAnnotateButton = new Button(annotationArea, SWT.PUSH);
+		cancelAnnotateButton.setText(Messages.ConcordancesEditor_101);
+		cancelAnnotateButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				//@TODO Closing the annotation tool bar 
+					//System.out.println("must hide");
+					annotationSize = annotationArea.getSize();
+					annotationArea.dispose();
+					annotationArea = null;
+					parent.layout(true);
+					parent.layout();
+					annotationButton.setToolTipText(Messages.ConcordancesEditor_75);
+					annotationButton.setImage(IImageKeys.getImage(IImageKeys.PENCIL));
+					annotationColumn.setWidth(0);
+					annotationColumn.setResizable(false);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		
+		
+		updateAnnotationWidgetStates();
+
+		parent.layout();
+	}
+
+	protected void affectAnnotationToSelection(ISelection selection) {
+
+		final IStructuredSelection lineSelection = (IStructuredSelection) selection;
+		List<Line> lines = lineSelection.toList();
+		ArrayList<Match> matches = new ArrayList<Match>();
+		for (Line l : lines) matches.add(l.getMatch());
+
+		affectMatchesToSelection(matches);
+	}
+
+	protected AnnotationType getSelectedAnnotationType() {
+		if (annotationTypesCombo != null) {
+			IStructuredSelection isel = (IStructuredSelection)annotationTypesCombo.getSelection();
+			if (isel.isEmpty()) return null;
+			return (AnnotationType) isel.getFirstElement();
+		} else { // simple mode
+			return tagAnnotationType;
+		}
+	}
+
+	protected void affectMatchesToSelection(final List<Match> matches) {
+		final AnnotationType type = getSelectedAnnotationType();
+		final String svalue = annotationValuesText.getText();
+		final boolean doAffect = addRemoveCombo.getSelectionIndex() == 0; // add is default
+
+		JobHandler job = new JobHandler(Messages.ConcordancesEditor_36, true) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+					if (doAffect) {
+						affectAnnotationValues(matches, type, svalue, this);
+					} else {
+						deleteAnnotationValues(matches, type, this);
+					}
+				} catch(Exception e) {
+					Log.severe(Messages.ConcordancesEditor_40+e);
+					Log.printStackTrace(e);
+					return Status.CANCEL_STATUS;
+				} catch(ThreadDeath td) {
+					System.out.println("Annotation canceled by user.");
+					return Status.CANCEL_STATUS;
+				}
+				
+				return Status.OK_STATUS;
+			}
+		};
+		job.startJob(true);
+	}
+
+	public void updateAnnotationWidgetStates() {
+		if (annotationArea == null) return; // :)
+
+		if (addRemoveCombo.getSelectionIndex() == 0) { // add is default
+
+			if (getSelectedAnnotationType() != null) {
+				annotationValuesText.setEnabled(true);
+
+				affectAnnotationButton.setEnabled(true);
+				affectCombo.setEnabled(true);
+			} else {
+				annotationValuesText.setEnabled(false);
+
+				affectAnnotationButton.setEnabled(false);
+				affectCombo.setEnabled(false);
+			}
+		} else {
+			annotationValuesText.setEnabled(false);
+
+			if (getSelectedAnnotationType() != null) {
+				affectAnnotationButton.setEnabled(true);
+				affectCombo.setEnabled(true);
+			} else {
+				affectAnnotationButton.setEnabled(false);
+				affectCombo.setEnabled(false);
+			}
+		}
+
+		if (advanced_annotation_mode.equals(Messages.AnnotationPreferences_2)) {
+			if (infosAnnotTypeSelectedLink != null) infosAnnotTypeSelectedLink.setEnabled(getSelectedAnnotationType() != null);
+		}
+		if (addTypedValueLink != null) addTypedValueLink.setEnabled(getSelectedAnnotationType() != null);
+
+		if (concordance == null) {
+			affectAnnotationButton.setEnabled(false);
+			affectCombo.setEnabled(false);
+		}
+	}
+
+	protected void deleteAnnotationValues(List<Match> matches, AnnotationType type, JobHandler job) {
+		if (concordance == null) return;
+		if (matches.size() == 0) {
+			System.out.println("No lines selected. Aborting."); //$NON-NLS-1$
+			return;
+		}
+		if (type == null) return;
+
+		if (concordance != null) {
+			try {
+				if (annotManager != null && annotManager.deleteAnnotations(type, matches, job)) {
+					if (Log.getLevel().intValue() < Level.WARNING.intValue()) annotManager.checkData();
+					concordance.reloadLines(topLine, bottomLine);
+				} else {
+					return;
+				}
+			} catch (Exception e1) {
+				System.out.println(Messages.ConcordancesEditor_54+e1);
+				Log.printStackTrace(e1);
+				return;
+			}
+
+			job.syncExec(new Runnable() {
+				@Override
+				public void run() {
+					fillDisplayArea(topLine, bottomLine+1);
+					CorporaView.refreshObject(corpus);
+				}
+			});
+		}
+	}
+
+	TypedValue value_to_add;
+	protected void affectAnnotationValues(final List<Match> matches,  final AnnotationType type, final String svalue, JobHandler job) {
+		value_to_add = null; // reset
+		if (concordance == null) {
+			System.out.println("No concordance done. Aborting."); //$NON-NLS-1$
+			return;
+		}
+		if (matches.size() == 0) {
+			System.out.println("No line selected. Aborting."); //$NON-NLS-1$
+			return;
+		}
+		if (type == null) return; // no type, no annotation
+
+		job.syncExec(new Runnable() {
+			@Override
+			public void run() {
+				if (matches.size() > NALERTAFFECTANNOTATIONS) {
+					ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), 
+							"confirm_annotate",  //$NON-NLS-1$
+							Messages.ConcordancesEditor_86, 
+							Messages.ConcordancesEditor_87+matches.size()+Messages.ConcordancesEditor_108);
+
+					if (dialog.open() == ConfirmDialog.CANCEL) {
+						System.out.println("Annotation aborted by user."); //$NON-NLS-1$
+						matches.clear();
+					}
+				}
+			}
+		});
+
+		// get value from combo text value
+		Log.warning(Messages.ConcordancesEditor_57+svalue);
+		final KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(type.getKnowledgeRepository());
+		value_to_add = kr.getValue(type, svalue);
+
+
+		if (value_to_add == null && kr instanceof LocalKnowledgeRepository) { // create or not the annotation is simple mode
+			job.syncExec(new Runnable() {
+				@Override
+				public void run() {
+					String title = kr.getString(locale, "ConcordancesEditor_110");
+					String content = kr.getString(locale, "ConcordancesEditor_112");
+					if (title == null ) title = Messages.ConcordancesEditor_110;
+					if (content == null ) content = Messages.ConcordancesEditor_112;
+					ConfirmDialog dialog = new ConfirmDialog(Display.getCurrent().getActiveShell(), 
+							"create_value", //$NON-NLS-1$
+							Messages.bind(title, svalue, type.getName()),  
+							Messages.bind(content, svalue, type.getName()));
+					if (dialog.open() == ConfirmDialog.CANCEL) {
+						System.out.println("Annotation aborted by user."); //$NON-NLS-1$
+						return;
+					} else {
+						value_to_add = kr.addValue(svalue, svalue, type.getId());
+						KRView.refresh();
+					}
+				}
+			});
+		}
+
+		if (value_to_add == null && kr instanceof LocalKnowledgeRepository) return; // canceled
+
+		if (value_to_add == null) {	
+			job.syncExec(new Runnable() {
+				@Override
+				public void run() {
+					String mess = Messages.bind(Messages.ConcordancesEditor_58, svalue);
+					System.out.println(mess);
+					MessageDialog.openError(Display.getCurrent().getActiveShell(), "Annotation canceled", mess); //$NON-NLS-1$
+				}
+			});
+			return;
+		}
+
+		Log.info(Messages.ConcordancesEditor_59+value_to_add+Messages.ConcordancesEditor_60+matches);
+
+		// finally we can 'try' to create the annotations \o/
+		try {
+			HashMap<Match, List<Annotation>> existingAnnots = annotManager.createAnnotations(type, value_to_add, matches, job);
+			
+			// did we had problems ?
+			if (existingAnnots!=null && existingAnnots.size() > 0) {
+				String message = Messages.ConcordancesEditor_61+value_to_add.getStandardName()+
+						Messages.ConcordancesEditor_62;
+				for (Match m : existingAnnots.keySet()) {
+					message += Messages.ConcordancesEditor_63+m+Messages.ConcordancesEditor_64;
+
+					for (Annotation existingAnnot : existingAnnots.get(m)) {
+						if (existingAnnot.getStart() < m.getStart()){
+							message += Messages.ConcordancesEditor_65+existingAnnot.getType()+Messages.ConcordancesEditor_66+existingAnnot.getStart()+Messages.ConcordancesEditor_67+existingAnnot.getEnd()+Messages.ConcordancesEditor_68;
+						} else {
+							message += Messages.ConcordancesEditor_69+existingAnnot.getType()+Messages.ConcordancesEditor_70+existingAnnot.getStart()+Messages.ConcordancesEditor_71+existingAnnot.getEnd()+Messages.ConcordancesEditor_72;
+						}
+					}
+				}
+				final String final_message = message;
+				job.syncExec(new Runnable() {
+					@Override
+					public void run() {
+						MessageDialog.openInformation(getSite().getShell(), Messages.ConcordancesEditor_73, final_message);
+					}
+				});
+			}
+			//				if (history != null && !history.get(type).contains(value_to_add))
+			//					history.get(type).add(value_to_add);
+
+			if (Log.getLevel().intValue() < Level.WARNING.intValue() && annotManager != null) annotManager.checkData();
+			concordance.reloadLines(topLine, bottomLine+1);
+		} catch (Exception e1) {
+			System.out.println(Messages.ConcordancesEditor_74+e1);
+			Log.printStackTrace(e1);
+			return;
+		}
+
+		job.syncExec(new Runnable() {
+			@Override
+			public void run() {
+				fillDisplayArea(topLine, bottomLine+1);
+				CorporaView.refreshObject(corpus);
+			}
+		});
+
+	}
+
+	/**
+	 * Compose control area.
+	 *
+	 * @param controlArea the control area
+	 */
+	private void composeControlArea(final Composite controlArea) {
+		GridLayout controlLayout = new GridLayout(1, false);
+		controlLayout.verticalSpacing = 0;
+		controlLayout.marginWidth = 0;
+		controlLayout.marginHeight = 0;
+		controlArea.setLayout(controlLayout);
+
+		// Query Area: query itself + view properties
+		queryArea = new Composite(controlArea, SWT.NONE);
+		queryArea.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true));
+		queryArea.setLayout(new GridLayout(4, false));
+
+		////////////////////////////////
+		//composeAnnotationArea(controlArea);
+		//////////////////////////////////
+
+		Composite navigationPanel = new Composite(controlArea, SWT.NONE);
+		navigationPanel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true));
+		GridLayout navigationLayout = new GridLayout(7, false); 
+		navigationLayout.verticalSpacing = 0;
+		navigationLayout.marginWidth = 0;
+		navigationLayout.marginHeight = 0;
+		navigationPanel.setLayout(navigationLayout);
+		///////////////////////////
+		// | Query: [ (v)] [Search] |
+
+		// Query:
+		Label queryLabel = new Label(queryArea, SWT.NONE);
+		queryLabel.setText(Messages.CreateSubcorpusDialog_10);
+		queryLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+				false));
+
+		// [ (v)]
+		// queryWidget = new QueryWidget(queryArea, SWT.DROP_DOWN);
+		queryWidget = new AssistedQueryWidget(queryArea, SWT.DROP_DOWN, corpus);
+		queryWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
+		queryWidget.addKeyListener(new KeyListener() {
+			@Override
+			public void keyPressed(KeyEvent e) {
+				// System.out.println("key pressed : "+e.keyCode);
+				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
+					compute();
+				}
+			}
+
+			@Override
+			public void keyReleased(KeyEvent e) {
+			}
+		});
+
+		// | Properties: word/pos [Edit] |
+		Composite propertiesArea = new Composite(queryArea, SWT.NONE);
+		propertiesArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false,
+				false, 1, 1));
+		propertiesArea.setLayout(new GridLayout(3, false));
+		// Properties:
+		Label propLabel = new Label(propertiesArea, SWT.NONE);
+		propLabel.setText(Messages.ConcordancesEditor_16);
+		propLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, true));
+
+		// word/pos
+		viewPropertiesLabel = new Label(propertiesArea, SWT.NONE);
+		viewPropertiesLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER,
+				false, true));
+		this.updateViewPropertiesLabel();
+
+		// [Edit]
+		Button editViewProperties = new Button(propertiesArea, SWT.PUSH);
+		editViewProperties.setText(Messages.ConcordancesEditor_18);
+		editViewProperties.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, true));
+		editViewProperties.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				StatusLine.setMessage(Messages.ConcordancesEditor_55);
+				new ViewPropertySelectionDialog(getSite(),
+						availableKeywordViewProperties,
+						selectedKeywordViewProperties).open();
+				if (concordance != null)
+					try {
+						refreshViewProperties();
+					} catch (Exception e1) {
+						System.err.println(NLS.bind(
+								Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE,
+								e1));
+					}
+				updateViewPropertiesLabel();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// [Search]
+		Button go = new Button(queryArea, SWT.PUSH);
+		go.setText(Messages.SEARCH);
+
+		Font f = go.getFont();
+		FontData defaultFont = f.getFontData()[0];
+		defaultFont.setStyle(SWT.BOLD);
+		Font newf = new Font(go.getDisplay(), defaultFont);
+		go.setFont(newf);
+
+		go.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+		go.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				compute();
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// Complex sort chooser (full line)
+		complexsorter = new ComplexSortSelector(queryArea, SWT.NONE);
+		complexsorter.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
+				true, 4, 1));
+
+		// Delete line button
+		deleteLineButton = new Button(navigationPanel, SWT.PUSH);
+		deleteLineButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false,
+				false));
+		deleteLineButton.setToolTipText(Messages.ConcordancesEditor_88);
+		deleteLineButton.setImage(IImageKeys.getImage(IImageKeys.CONCORDANCE_DELETE));
+		deleteLineButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				DeleteLines.deleteConcordanceLines(ConcordancesEditor.this);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+
+
+		if (corpus.getKnowledgeRepositoryNames().size() > 0) { // shown only if corpus has a registered KR
+
+			annotationButton = new Button(navigationPanel, SWT.PUSH);
+			annotationButton.setToolTipText(Messages.ConcordancesEditor_75);
+			annotationButton.setImage(IImageKeys.getImage(IImageKeys.PENCIL));
+			annotationButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					if (annotationArea != null) {
+						AnnotationManager am = corpus.getMainCorpus().getAnnotationManager();
+						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) {
+								// update editor corpus
+								System.out.println("Fail to save annotations of the corpus."); //$NON-NLS-1$
+							}
+						}
+
+					} else {
+						if (annotationArea == null) composeAnnotationArea(controlArea);
+						if (annotationArea == null) return;
+
+						annotationColumn.pack();
+						annotationButton.setToolTipText(Messages.ConcordancesEditor_76);
+						annotationButton.setImage(IImageKeys.getImage(IImageKeys.PENCIL_SAVE));
+
+						annotSize = annotationArea.getSize();
+						Point size = controlArea.getSize();
+						controlArea.setSize(size.x, size.y + annotSize.y);
+						GridData data = (GridData) annotationArea.getLayoutData();
+						data.heightHint = annotSize.y;
+						data.minimumHeight = annotSize.y;
+						annotationArea.setSize(annotSize);
+						controlArea.layout(true);
+						parent.layout();
+
+						if (concordance != null) {
+							AnnotationType type = getSelectedAnnotationType();
+							if (type != null) {
+								concordance.setViewAnnotation(type);
+								concordance.setAnnotationOverlap(true);
+								fillDisplayArea(topLine, bottomLine+1);
+							}
+						}
+
+						CorporaView.refreshObject(corpus);
+					}
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {	}
+			});
+		}
+		// Navigation Area: infoLine and buttons
+				navigationArea = new NavigationWidget(navigationPanel, SWT.NONE);
+				navigationArea.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, false, 4, 1));
+
+				// | [|<] [<] infos [>] [>|] |
+				// [|<]
+				navigationArea.addFirstListener(new SelectionListener() {
+					@Override
+					public void widgetDefaultSelected(SelectionEvent arg0) {
+					}
+
+					@Override
+					public void widgetSelected(SelectionEvent arg0) {
+						fillDisplayArea(0, nLinePerPage - 1);
+					}
+				});
+
+				// [<]
+				navigationArea.addPreviousListener(new SelectionListener() {
+					@Override
+					public void widgetDefaultSelected(SelectionEvent e) {
+					}
+
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						int top = topLine - nLinePerPage;
+						if (top < 0)
+							top = 0;
+						int bottom = top + nLinePerPage -1 ;
+						fillDisplayArea(top, bottom);
+					}
+				});
+
+				// [>]
+				navigationArea.addNextListener(new SelectionListener() {
+					@Override
+					public void widgetDefaultSelected(SelectionEvent e) {
+					}
+
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						fillDisplayArea(bottomLine + 1, bottomLine + nLinePerPage);
+					}
+				});
+
+				// [>|]
+				navigationArea.addLastListener(new SelectionListener() {
+					@Override
+					public void widgetDefaultSelected(SelectionEvent e) {
+					}
+
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						int top = (concordance.getNLines()/nLinePerPage)*nLinePerPage;
+						int bottom = top + nLinePerPage -1 ;
+						fillDisplayArea(top, bottom);
+						//fillDisplayArea(concordance.getNLines() - 1 - nLinePerPage,concordance.getNLines() - 1);
+					}
+				});
+		hideBtn = new Button(navigationPanel, SWT.PUSH);
+		hideBtn.setText(Messages.ConcordancesEditor_38);
+		hideBtn.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (isSetupShown) { // must hide
+					//System.out.println("hide");
+					hideBtn.setText(Messages.ConcordancesEditor_39);
+					querySize = queryArea.getSize();
+					//queryArea.setVisible(false);
+					Point size = controlArea.getSize();
+					controlArea.setSize(size.x, size.y - querySize.y);
+					queryArea.setSize(0,0);
+					GridData data = (GridData) queryArea.getLayoutData();
+					data.heightHint = 0;
+					data.minimumHeight = 0;
+					controlArea.layout(true);
+					isSetupShown = false;
+					parent.layout();
+				} else {
+					//System.out.println("show");
+					hideBtn.setText(Messages.ConcordancesEditor_38);
+					//queryArea.setVisible(true);
+					Point size = controlArea.getSize();
+					controlArea.setSize(size.x, size.y + querySize.y);
+					GridData data = (GridData) queryArea.getLayoutData();
+					data.heightHint = querySize.y;
+					data.minimumHeight = querySize.y;
+					queryArea.setSize(querySize);
+					controlArea.layout(true);
+					isSetupShown = true;
+					parent.layout();
+				}
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {	}
+		});
+
+		//		List<String> krnames = corpus.getKnowledgeRepositoryNames();
+		//		if (krnames==null){
+		//			System.out.println("Corpus "+corpus.getName()+" has no KR ");
+		//		}else {
+		//			
+		//			for(String krname : krnames){
+		//				System.out.println("Corpus "+corpus.getName()+" has KR "+krname);
+		//			}
+		//		}
+
+		queryArea.layout();
+		if (complexsorter != null)
+			complexsorter.setComparators(this);
+	}
+
+	/**
+	 * Computes the concordance and fills the display area with the specified lines range.
+	 * @param top
+	 * @param bottom
+	 */
+	public void compute(int top, int bottom, boolean fillDisplay) {
+		StatusLine.setMessage(Messages.ConcordancesEditor_56);
+		Query query = new Query(queryWidget.getQueryString());
+
+		String cql_limit = null;
+		if (cqlSeparator != null) cql_limit = cqlSeparator.getText();
+		if (cql_limit != null && cql_limit.trim().length() == 0) cql_limit = null;
+		if (cql_limit == null) cql_limit = corpus.getCQLLimitQuery();
+
+		//if (true)// concordance==null || concordance.getQuery()!=query)
+		try {
+			JobsTimer.start();
+			Concordance oldConcordance = concordance;
+			System.out.println(NLS.bind(Messages.ConcordancesEditor_5, query.getQueryString(), corpus.getName()));
+			concordance = new Concordance(corpus, query,
+					selectedLeftSortProperties, 
+					selectedRightSortProperties,
+					selectedKeywordSortProperties,
+					selectedLeftViewProperties,
+					selectedRightViewProperties,
+					selectedKeywordViewProperties,
+					getViewReferencePattern(),
+					getSortReferencePattern(),
+					leftContextSize, rightContextSize);
+
+			concordance.setCQLSeparator(cql_limit);
+
+			if (annotationArea != null) {
+				AnnotationType type = getSelectedAnnotationType();
+				if (type != null) {
+					concordance.setViewAnnotation(type);
+					concordance.setAnnotationOverlap(true);
+				}
+			}
+			StatusLine.setMessage(NLS.bind(Messages.ConcordancesEditor_19, concordance.getNLines()));
+			if (concordance.getNLines() == 1)
+				System.out.println(Messages.ConcordancesEditor_52);
+			else if (concordance.getNLines() > 0)
+				System.out.println(NLS.bind(Messages.ConcordancesEditor_19, concordance.getNLines()));
+			else
+				System.out.println(TXMCoreMessages.COMPUTE_DONE_NO_RESULT);
+
+			// FIXXME: SYNC
+			//			if (oldConcordance != null)
+			//				corpus.removeResult(oldConcordance);
+			//			corpus.storeResult(concordance);
+			if (oldConcordance != null) {
+				corpus.removeResult(oldConcordance);
+				oldConcordance.cleanMemory(); // drop the CQP corpus
+			}
+			corpus.addResult(concordance);
+
+			CorporaView.refresh();
+			CorporaView.expand(corpus);
+			QueriesView.refresh();
+			RVariablesView.refresh();
+
+			// FIXME: SYNC
+			if (fillDisplay) {
+				fillDisplayArea(top, bottom);
+			}
+
+			setPartName(concordance.getName());
+			queryWidget.memorize();
+
+			resetColumnWidths();
+
+			updateAnnotationWidgetStates();
+			JobsTimer.stopAndPrint();
+
+
+			((ConcordancesEditorInput)this.getEditorInput()).setConcordance(concordance);
+
+			JobsTimer.stopAndPrint();
+
+		} catch (Exception e1) {
+			System.err.println(Messages.CorporaView_3+" "+Log.toString(e1)); //$NON-NLS-1$
+			//System.err.println(Messages.CorporaView_3);
+			//org.txm.rcp.utils.Logger.printStackTrace(e1);
+			try {
+				System.out.println(Messages.LastCQPError+Toolbox.getCqiClient().getLastCQPError());
+				Log.severe(Messages.LastCQPError+Toolbox.getCqiClient().getLastCQPError());
+			} catch (Exception e2) {
+				System.out.println(Messages.ConcordancesEditor_7+e2);
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
+				Log.severe(Log.toString(e1));
+			}
+			
+		}
+	}
+
+
+	/**
+	 * Computes the concordance and fills the display area with lines range corresponding to the first page.
+	 */
+	public void compute() {
+		this.compute(true);
+	}
+
+	/**
+	 * Computes the concordance and fills the display area with lines range corresponding to the first page.
+	 * @param fillDisplay
+	 */
+	public void compute(boolean fillDisplay) {
+		this.compute(0, nLinePerPage - 1, fillDisplay);
+	}
+
+	/**
+	 * Sets the line per page.
+	 *
+	 * @param nb the new line per page
+	 */
+	public void setLinePerPage(int nb) {
+		this.nLinePerPage = nb;
+	}
+
+	/**
+	 * Gets the line per page.
+	 *
+	 * @return the line per page
+	 */
+	public int getLinePerPage() {
+		return nLinePerPage;
+	}
+
+	/**
+	 * Update view properties label.
+	 */
+	void updateViewPropertiesLabel() {
+		StringBuffer buffer = new StringBuffer();
+		Iterator<Property> it = selectedKeywordViewProperties.iterator();
+		if (it.hasNext())
+			buffer.append(it.next().getName());
+		while (it.hasNext())
+			buffer.append("_" + it.next().getName()); //$NON-NLS-1$
+		viewPropertiesLabel.setText(buffer.toString());
+		viewPropertiesLabel.getParent().layout();
+		viewPropertiesLabel.update();
+		queryArea.layout();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#getTitleToolTip()
+	 */
+	@Override
+	public String getTitleToolTip() {
+		if (concordance != null) {
+			StringBuffer buf = new StringBuffer();
+			buf.append("Concordance:\n"); //$NON-NLS-1$
+			buf.append("\tCorpus: " + corpus.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\tQuery: " + concordance.getQuery().getQueryString() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\tView properties: " + viewPropertiesLabel.getText() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\tLeft Context Sort property: " + selectedLeftSortProperties + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\tKeyword Sort property: " + selectedKeywordSortProperties + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf
+			.append("\right Context Sort property: " + selectedRightSortProperties + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf.append("\tReference View Pattern: " + refViewPattern + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			buf.append("\tReference Sort Pattern: " + refSortPattern + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			return buf.toString();
+		}
+		return ""; //$NON-NLS-1$
+	}
+
+	/**
+	 * Gets the reference pattern.
+	 *
+	 * @return the reference pattern
+	 */
+	ReferencePattern getViewReferencePattern() {
+		return refViewPattern;
+	}
+
+	/**
+	 * Gets the reference pattern.
+	 *
+	 * @return the reference pattern
+	 */
+	ReferencePattern getSortReferencePattern() {
+		return refSortPattern;
+	}
+
+	/**
+	 * Sets the left sort properties.
+	 *
+	 * @param list the new left sort properties
+	 */
+	public void setLeftSortProperties(List<Property> list) {
+		this.selectedLeftSortProperties = list;
+	}
+
+	/**
+	 * Sets the keyword sort properties.
+	 *
+	 * @param list the new keyword sort property
+	 */
+	public void setKeywordSortProperties(List<Property> list) {
+		this.selectedKeywordSortProperties = list;
+		if (concordance != null) {
+			try {
+				concordance.setAnalysisProperty(list);
+			} catch (Exception e) {
+				System.err.println(NLS.bind(
+						Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
+			}
+			sort();
+		}
+	}
+
+	/**
+	 * Sets the right sort properties.
+	 *
+	 * @param list the new right sort properties
+	 */
+	public void setRightSortProperties(List<Property> list) {
+		this.selectedRightSortProperties = list;
+		if (concordance != null) {
+			try {
+				concordance.setAnalysisProperty(list);
+			} catch (Exception e) {
+				System.err.println(NLS.bind(
+						Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
+			}
+			sort();
+		}
+	}
+
+	/**
+	 * Sets the view reference pattern.
+	 *
+	 * @param referencePattern the new reference pattern
+	 */
+	public void setRefViewPattern(ReferencePattern referencePattern) {
+		this.refViewPattern = referencePattern;
+
+		if (concordance != null) {
+			concordance.setRefViewPattern(referencePattern);
+			//			int top = topLine;
+			//			int bottom = bottomLine;
+			//
+			sort();
+			//fillDisplayArea(top, bottom); // we return to the previously
+
+			// displayed page
+		}
+	}
+
+	/**
+	 * Sets the sort reference pattern.
+	 *
+	 * @param referencePattern the new reference pattern
+	 */
+	public void setRefSortPattern(ReferencePattern referencePattern) {
+		this.refSortPattern = referencePattern;
+
+		if (concordance != null) {
+			concordance.setRefAnalysePattern(referencePattern);
+			//			int top = topLine;
+			//			int bottom = bottomLine;
+			sort();
+			//fillDisplayArea(top, bottom); // we return to the previously
+			// displayed page
+		}
+	}
+
+	/**
+	 * Sets the context size.
+	 *
+	 * @param leftContextSize the left context size
+	 * @param rightContextSize the right context size
+	 */
+	public void setContextSize(int leftContextSize, int rightContextSize) {
+		this.leftContextSize = leftContextSize;
+		this.rightContextSize = rightContextSize;
+		if (concordance != null) {
+			concordance.setLeftContextSize(leftContextSize);
+			concordance.setRightContextSize(rightContextSize);
+			int top = topLine;
+			int bottom = bottomLine;
+			//sort();
+			fillDisplayArea(top, bottom); // we return to the previously
+			// displayed page
+		}
+	}
+
+	/**
+	 * Creates the context menu.
+	 */
+	private void createContextMenu() {
+		createActions();
+
+		// store the mouse position
+		viewer.getTable().addMouseListener(new MouseAdapter() {
+			@Override
+			public void mouseDown(MouseEvent arg0) {
+
+				if (arg0.button == 3)
+					mouseposition = new Point(arg0.x, arg0.y);
+				//				System.out.println("arg.x="+arg0.x);
+				//				System.out.println("arg.y="+arg0.y);
+				//				System.out.println("hbar: "+lineTableViewer.getTable().getHorizontalBar().getSelection());
+				//				System.out.println("vbar: "+lineTableViewer.getTable().getVerticalBar().getSelection());
+				//				System.out.println("Col: "+getPointedColumn());
+			}
+		});
+		MenuManager menuManager = new MenuManager(); //$NON-NLS-1$
+		Menu menu = menuManager.createContextMenu(viewer.getTable());
+		menuManager.setRemoveAllWhenShown(true);
+		menuManager.addMenuListener(new IMenuListener() {
+			@Override
+			public void menuAboutToShow(IMenuManager manager) {
+				IWorkbenchPartSite site = ConcordancesEditor.this.getSite();
+				site.getPage().activate(ConcordancesEditor.this);
+				// manager.add(computeCoocAction);
+
+				//manager.add(computeIndexAction);
+				manager.add(defineViewReferencePatternAction);
+				manager.add(defineSortReferencePatternAction);
+				manager.add(setViewPropertyAction);
+				manager.add(setSortPropertyAction);
+				manager.add(new Separator());
+				//manager.add(complexSortAction);
+				manager.add(setContextSizeAction);
+				//manager.add(resetColumnWidths); // don't work properly
+				manager.add(setLineNumberAction);
+				manager.add(new Separator());
+				//manager.add(backToTextAction);
+			}
+		});
+
+		//viewer.getTable().setMenu(menuManager.createContextMenu(viewer.getTable()));
+		viewer.getTable().setMenu(menu);
+		getSite().registerContextMenu(menuManager, viewer);
+		getSite().setSelectionProvider(viewer);
+	}
+
+	/**
+	 * Gets the mouse position.
+	 *
+	 * @return the mouse position
+	 */
+	private Point getMousePosition() {
+		return this.mouseposition;
+	}
+
+	/**
+	 * return the column under the mouse pointer.
+	 *
+	 * @return the pointed column
+	 */
+	public int getPointedColumn() {
+		int x = getMousePosition().x; // + lineTableViewer.getTable().get;
+		int sumWidthColumn = this.referenceColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 0;
+
+		sumWidthColumn += this.leftContextColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 1;
+
+		sumWidthColumn += this.keywordColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 2;
+
+		sumWidthColumn += this.rightContextColumn.getWidth();
+		if (x < sumWidthColumn)
+			return 3;
+
+		return 0;
+	}
+
+	/**
+	 * Creates the actions.
+	 */
+	private void createActions() {
+		setSortPropertyAction = new SortPropertySelection(getSite()
+				.getWorkbenchWindow(), this, this.viewer);
+		setContextSizeAction = new SetContextSize(getSite()
+				.getWorkbenchWindow(), this);
+		//resetColumnWidths = new ResetColumnWidths(getSite().getWorkbenchWindow(), this);
+		setLineNumberAction = new SetLineNumber(getSite().getWorkbenchWindow(),
+				this);
+		defineViewReferencePatternAction = new DefineViewReferencePattern(getSite()
+				.getWorkbenchWindow(), this);
+		defineSortReferencePatternAction = new DefineSortReferencePattern(getSite()
+				.getWorkbenchWindow(), this);
+		setViewPropertyAction = new ViewPropertySelection(getSite()
+				.getWorkbenchWindow(), this, this.viewer);
+	}
+
+	/**
+	 * Gets the concordance.
+	 *
+	 * @return the concordance
+	 */
+	public Concordance getConcordance() {
+		return concordance;
+	}
+
+	/**
+	 * Gets the available sort properties.
+	 *
+	 * @return the available sort properties
+	 */
+	public List<Property> getAvailableSortProperties() {
+		return availableKeywordSortProperties;
+	}
+
+	/**
+	 * Gets the user defined comparators.
+	 *
+	 * @return the user defined comparators
+	 */
+	public List<LineComparator> getUserDefinedComparators() {
+		return userDefinedComparators;
+	}
+
+	/**
+	 * Sets the user defined comparators.
+	 *
+	 * @param userDefinedComparators the new user defined comparators
+	 */
+	public void setUserDefinedComparators(
+			List<LineComparator> userDefinedComparators) {
+		this.userDefinedComparators = userDefinedComparators;
+	}
+
+	/**
+	 * Sets the current comparator.
+	 *
+	 * @param comparator the new current comparator
+	 */
+	public void setCurrentComparator(LineComparator comparator) {
+		this.currentComparator = comparator;
+	}
+
+	/**
+	 * Gets the standard comparators.
+	 *
+	 * @return the standard comparators
+	 */
+	public List<LineComparator> getStandardComparators() {
+		return standardComparators;
+	}
+
+	/**
+	 * Gets the top line.
+	 *
+	 * @return the top line
+	 */
+	public int getTopLine() {
+		return topLine;
+	}
+
+	/**
+	 * Gets the bottom line.
+	 *
+	 * @return the bottom line
+	 */
+	public int getBottomLine() {
+		return bottomLine;
+	}
+
+	/**
+	 * Gets the left context size.
+	 *
+	 * @return the left context size
+	 */
+	public int getLeftContextSize() {
+		return leftContextSize;
+	}
+
+	/**
+	 * Gets the right context size.
+	 *
+	 * @return the right context size
+	 */
+	public int getRightContextSize() {
+		return rightContextSize;
+	}
+
+	/**
+	 * Gets the corpus.
+	 *
+	 * @return the corpus
+	 */
+	public Corpus getCorpus() {
+		return corpus;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+		if (this.queryWidget == null) return;
+		this.queryWidget.setFocus();
+	}
+
+	/**
+	 * refresh column display accordingly to the views properties.
+	 */
+	private void refreshViewProperties() {
+		if (concordance != null) {
+			concordance.setViewProperties(
+					selectedLeftViewProperties,
+					selectedRightViewProperties,
+					selectedKeywordViewProperties);
+			sort();
+			//fillDisplayArea(topLine, bottomLine);
+		}
+	}
+
+	/**
+	 * Refresh sort properties.
+	 */
+	private void refreshSortProperties() {
+		if (concordance != null) {
+			try {
+				concordance.setLeftAnalysisProperties(selectedLeftSortProperties);
+				concordance.setRightAnalysisProperties(selectedRightSortProperties);
+				concordance.setKeywordAnalysisProperties(selectedKeywordSortProperties);
+			} catch (Exception e) {
+				System.err.println(NLS.bind(
+						Messages.ERROR_WHILE_LOADING_CONCORDANCE_LINE, e));
+			}
+			sort();
+		}
+	}
+
+	/**
+	 * Sets the left c view properties.
+	 *
+	 * @param selectedViewProperties the new left c view properties
+	 */
+	public void setLeftViewProperties(List<Property> selectedViewProperties) {
+		this.selectedLeftViewProperties = selectedViewProperties;
+		refreshViewProperties();
+	}
+
+	/**
+	 * Sets the right c view properties.
+	 *
+	 * @param selectedViewProperties the new right c view properties
+	 */
+	public void setRightViewProperties(List<Property> selectedViewProperties) {
+		this.selectedRightViewProperties = selectedViewProperties;
+		refreshViewProperties();
+	}
+
+	/**
+	 * Sets the keyword view properties.
+	 *
+	 * @param selectedViewProperties the new keyword view properties
+	 */
+	public void setKeywordViewProperties(List<Property> selectedViewProperties) {
+		this.selectedKeywordViewProperties = selectedViewProperties;
+		refreshViewProperties();
+		updateViewPropertiesLabel();
+	}
+
+	/**
+	 * Refresh reference column title.
+	 */
+	public void refreshReferenceColumnTitle()
+	{
+		if (refViewPattern == null) {
+			referenceColumn.setText(Messages.ConcordancesEditor_1);
+		} else if (refViewPattern.getProperties().size() == 0) {
+			referenceColumn.setText(Messages.ConcordancesEditor_1);
+		} else {
+			referenceColumn.setText(refViewPattern.getTitle());
+		}
+	}
+
+	/**
+	 * Gets the selected left c view properties.
+	 *
+	 * @return the selected left c view properties
+	 */
+	public List<Property> getSelectedLeftViewProperties() {
+		return this.selectedLeftViewProperties;
+	}
+
+	/**
+	 * Gets the selected keyword view properties.
+	 *
+	 * @return the selected keyword view properties
+	 */
+	public List<Property> getSelectedKeywordViewProperties() {
+		return this.selectedKeywordViewProperties;
+	}
+
+	/**
+	 * Gets the selected right c view properties.
+	 *
+	 * @return the selected right c view properties
+	 */
+	public List<Property> getSelectedRightViewProperties() {
+		return this.selectedRightViewProperties;
+	}
+
+	/**
+	 * Gets the selected left c sort properties.
+	 *
+	 * @return the selected left c sort properties
+	 */
+	public List<Property> getSelectedLeftSortProperties() {
+		return this.selectedLeftSortProperties;
+	}
+
+	/**
+	 * Gets the selected keyword sort properties.
+	 *
+	 * @return the selected keyword sort properties
+	 */
+	public List<Property> getSelectedKeywordSortProperties() {
+		return this.selectedKeywordSortProperties;
+	}
+
+	/**
+	 * Gets the selected right c sort properties.
+	 *
+	 * @return the selected right c sort properties
+	 */
+	public List<Property> getSelectedRightSortProperties() {
+		return this.selectedRightSortProperties;
+	}
+
+	/**
+	 * Gets the available left c view properties.
+	 *
+	 * @return the available left c view properties
+	 */
+	public List<Property> getAvailableLeftViewProperties() {
+		return availableLeftViewProperties;
+	}
+
+	/**
+	 * Gets the available keyword view properties.
+	 *
+	 * @return the available keyword view properties
+	 */
+	public List<Property> getAvailableKeywordViewProperties() {
+		return availableKeywordViewProperties;
+	}
+
+	/**
+	 * Gets the available right c view properties.
+	 *
+	 * @return the available right c view properties
+	 */
+	public List<Property> getAvailableRightViewProperties() {
+		return availableRightViewProperties;
+	}
+
+	/**
+	 * Gets the available left sort properties.
+	 *
+	 * @return the available left sort properties
+	 */
+	public List<Property> getAvailableLeftSortProperties() {
+		return availableLeftSortProperties;
+	}
+
+	/**
+	 * Gets the available keyword sort properties.
+	 *
+	 * @return the available keyword sort properties
+	 */
+	public List<Property> getAvailableKeywordSortProperties() {
+		return availableKeywordSortProperties;
+	}
+
+	/**
+	 * Gets the available right sort properties.
+	 *
+	 * @return the available right sort properties
+	 */
+	public List<Property> getAvailableRightSortProperties() {
+		return availableRightSortProperties;
+	}
+
+	/**
+	 * Gets the selected references.
+	 *
+	 * @return the selected references
+	 */
+	public List<Property> getSelectedViewReferences() {
+		return refViewPattern.getProperties();
+	}
+
+	/**
+	 * Gets the selected references.
+	 *
+	 * @return the selected references
+	 */
+	public List<Property> getSelectedSortReferences() {
+		return refSortPattern.getProperties();
+	}
+
+	/**
+	 * Gets the line table viewer.
+	 *
+	 * @return the line table viewer
+	 */
+	public TableViewer getLineTableViewer() {
+		return viewer;
+	}
+
+	/**
+	 * Reset sorted column.
+	 *
+	 * @param col the col
+	 */
+	public void resetSortedColumn(int col) {
+		switch(col) {
+		case 1://keyword
+			viewer.getTable().setSortColumn(this.keywordColumn);
+			viewer.getTable().setSortDirection(SWT.DOWN);
+			break;
+		case 2://left
+			viewer.getTable().setSortColumn(this.leftContextColumn);
+			viewer.getTable().setSortDirection(SWT.DOWN);
+			break;
+		case 3://right
+			viewer.getTable().setSortColumn(this.rightContextColumn);
+			viewer.getTable().setSortDirection(SWT.DOWN);
+			break;
+		case 4://references
+			viewer.getTable().setSortColumn(this.referenceColumn);
+			viewer.getTable().setSortDirection(SWT.DOWN);
+			break;
+		default:
+			viewer.getTable().setSortColumn(null);
+			viewer.getTable().setSortDirection(SWT.NONE);
+		}
+
+	}
+
+	/*
+	/**
+	 * Back to text.
+
+	@SuppressWarnings("restriction") //$NON-NLS-1$
+	public void backToText() {
+		try {
+			StructuredSelection select = (StructuredSelection) viewer.getSelection();
+			if (select == null) return;
+			Line line = (Line) select.getFirstElement();
+			if (line == null) return;
+
+			StructuralUnit textS = null;
+			textid = ""; //$NON-NLS-1$
+			String baseid = ""; //$NON-NLS-1$
+
+			String projectid = ""; //$NON-NLS-1$
+			try {
+				textS = corpus.getStructuralUnit("text"); //$NON-NLS-1$
+				Property textP = textS.getProperty("id"); //$NON-NLS-1$
+				textid = line.getMatch().getValueForProperty(textP);// get text via text struc property id
+				// Log.info("Corpus' base ("+baseid+") : "+corpus.getParent());
+			} catch (Exception e2) {
+				System.out.println(Messages.ConcordancesEditor_8);
+				org.txm.rcp.utils.Logger.printStackTrace(e2);
+				return;
+			}
+
+			Log.info(Messages.ConcordancesEditor_20);
+
+			final List<String> wordids = concordance.getKeywordsId(
+					textid, getTopLine(), getBottomLine() + 1);
+
+			lineids = null;
+			try {
+				lineids = line.getMatch().getValuesForProperty(
+						corpus.getProperty("id")); //$NON-NLS-1$
+			} catch (Exception e1) {
+				org.txm.rcp.utils.Logger.printStackTrace(e1);
+				return;
+			}
+			Log.info(NLS.bind(Messages.ConcordancesEditor_26, 
+					new Object[]{projectid, baseid, textid}));
+
+			Text text = corpus.getMainCorpus().getText(textid);
+			if (text == null) {
+				System.out.println(NLS.bind(Messages.ConcordancesEditor_27, textid));
+				StatusLine.setMessage(NLS.bind(Messages.ConcordancesEditor_27, textid));
+				Log.severe(NLS.bind(Messages.ConcordancesEditor_27, textid));
+				return;
+			}
+
+			Edition edition = text.getEdition(corpus.getMainCorpus().getDefaultEdition()); 
+			if (edition == null) {
+				System.out.println(Messages.ConcordancesEditor_30);
+				StatusLine.setMessage(Messages.ConcordancesEditor_30);
+				Log.severe(Messages.ConcordancesEditor_30);
+				return;
+			}
+
+			String line_wordid = lineids.get(0);
+			if (line_wordid == null) {
+				System.out.println(Messages.ConcordancesEditor_9+edition+Messages.ConcordancesEditor_10);
+				return;				
+			}
+			openedPage = edition.getPageForWordId(line_wordid);
+			if (openedPage != null) {
+				// System.out.println(page.getFile());
+				if (attachedBrowserEditor == null || attachedBrowserEditor.isDisposed()) {
+					attachedBrowserEditor = OpenBrowser.openEdition(openedPage.getFile().getAbsolutePath(), openedPage.getFile().getName());
+					if (attachedBrowserEditor != null) {
+						attachedBrowserEditor.setEdition(edition);
+					} else {
+						System.out.println("Fail to create Edition editor.");
+						return;
+					}
+				}
+
+				if (attachedBrowserEditor != null) {
+					attachedBrowserEditor.showPage(openedPage);
+					attachedBrowserEditor.setWordsIds(wordids, lineids);
+
+					IWorkbenchPage attachedPage = attachedBrowserEditor.getEditorSite().getPage();
+					attachedPage.activate(attachedBrowserEditor);
+				}
+			} else
+				System.out.println(NLS.bind(Messages.ConcordancesEditor_29, wordids.get(0)));
+		} catch (Exception err) {
+			Log.severe(NLS.bind(Messages.ConcordancesEditor_46, err));
+			Log.printStackTrace(err);
+		}
+	}
+	 */
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setName(java.lang.String)
+	 */
+	@Override
+	public void setName(String name) {
+		this.setPartName(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setIcon(org.eclipse.swt.graphics.Image)
+	 */
+	@Override
+	public void setIcon(Image image) {
+		this.setTitleImage(image);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#setSource(java.lang.Object)
+	 */
+	@Override
+	public void setSource(Object source)
+	{
+		//this.source = source;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.rcp.commands.editor.CustomizableEditor#getSource()
+	 */
+	@Override
+	public Object getSource() {
+		return concordance;
+	}
+
+	/**
+	 * Gets the current comparator used for sorting lines.
+	 * @return the currentComparator
+	 */
+	public LineComparator getCurrentComparator() {
+		return currentComparator;
+	}
+
+	/**
+	 * Gets the number of pages.
+	 * @return
+	 */
+	public int getPagesCount()	{
+		return (int) Math.ceil(((double)this.concordance.getNLines() / this.nLinePerPage));
+	}
+
+
+	@Override
+	public Object toConcordance() { return null;}
+	@Override
+	public Object toIndex() { return null;}
+	@Override
+	public Object toProgression() { return null;}
+
+	public void setQuery(String query) {
+		queryWidget.setText(query);
+	}
+
+
+	private static final String BACKTOTEXT_COMMAND_ID = "org.txm.rcp.extensionpoint.backtotext"; //$NON-NLS-1$
+	/**
+	 * Open the edition for the selected line.
+	 * The command used to show the edition is an EditionBackToText Extension
+	 */
+	public boolean backToText() {
+
+		StructuredSelection select = (StructuredSelection) viewer.getSelection();
+		if (select == null) return false;
+		Line line = (Line) select.getFirstElement();
+		if (line == null) return false;
+
+		try {
+			IConfigurationElement[] config = Platform.getExtensionRegistry()
+					.getConfigurationElementsFor(BACKTOTEXT_COMMAND_ID);
+			for (IConfigurationElement e : config) {
+				Object o = e.createExecutableExtension(Messages.ConcordancesEditor_78);
+				if (o instanceof BackToTextCommand) {
+					return ((BackToTextCommand) o).backToText(this, line);
+				}
+			}
+		} catch (CoreException e1) {
+			e1.printStackTrace();
+		}
+
+		// Last resort edition
+		InternalViewEditorInput editorInput = new InternalViewEditorInput(corpus, null);
+
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		try {
+			StatusLine.setMessage(Messages.ComputeReferencer_0);
+			InternalViewEditor editor = (InternalViewEditor)page.openEditor(editorInput,"org.txm.rcp.editors.internal.InternalViewEditor"); //$NON-NLS-1$
+			editor.backToText(line);
+			SWTEditorsUtils.addEditor(this, editor, EModelService.ABOVE);
+		} catch (PartInitException e) {
+			System.err.println(Messages.CorporaView_6+ e);
+		}
+
+		return false;
+
+		//		try {
+		//			StructuredSelection select = (StructuredSelection) viewer.getSelection();
+		//			if (select == null) return;
+		//			Line line = (Line) select.getFirstElement();
+		//			if (line == null) return;
+		//			org.txm.rcp.synoptic.commands.BackToText.backToText(line);
+		//		} catch(Exception err) {
+		//			System.out.println("Error while calling backtotext: "+err);
+		//			Log.printStackTrace(err);
+		//		}
+	}
+
+	public boolean isAnnotationEnable() {
+		return annotationArea != null;
+	}
+
+	public void resetColumnWidths() {
+
+		//		tableLayout.setColumnData(referenceColumn, new ColumnWeightData(10, true)); 
+		//		tableLayout.setColumnData(leftContextColumn, new ColumnWeightData(50, true));  
+		//		tableLayout.setColumnData(keywordColumn, new ColumnWeightData(10, true)); 
+		//		tableLayout.setColumnData(rightContextColumn, new ColumnWeightData(50, true));  
+		if (annotationArea != null) {
+			annotationColumn.pack();
+
+			annotationColumn.setResizable(true);
+			//			tableLayout.setColumnData(annotationColumn, new ColumnWeightData(10, true));
+		} else { 
+			annotationColumn.setWidth(0);
+			//			tableLayout.setColumnData(annotationColumn, new ColumnWeightData(0, false));
+		}
+
+		referenceColumn.pack();
+		leftContextColumn.pack();
+		keywordColumn.pack();
+		rightContextColumn.pack();
+
+		//viewer.getTable().layout(true, true);
+	}
+
+	@Override
+	public boolean usingCorpus(Corpus corpus) {
+		return this.corpus.getName().equals(corpus.getName());
+	}
+
+	@Override
+	public boolean updateCorpus(Corpus corpus) {
+		ConcordancesEditorInput input = (ConcordancesEditorInput) this.getEditorInput();
+		input.setCorpus(corpus);
+		input.setConcordance(null);
+		initializeEditor();
+		return true;
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ReferenceLabelProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ReferenceLabelProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ReferenceLabelProvider.java	(revision 324)
@@ -0,0 +1,102 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.txm.functions.concordances.Line;
+import org.txm.rcp.Messages;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ReferenceLabelProvider.
+ *
+ * @deprecated @ author mdecorde
+ */
+@Deprecated
+public class ReferenceLabelProvider extends LabelProvider implements
+		ITableLabelProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+	 */
+	@Override
+	public Image getColumnImage(Object element, int columnIndex) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+	 */
+	@Override
+	public String getColumnText(Object element, int columnIndex) {
+		if (columnIndex != 0)
+			throw new RuntimeException(Messages.LineLabelProvider_1);
+		Line line = (Line) element;
+		return line.getViewRef().toString();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.BaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+	 */
+	@Override
+	public void addListener(ILabelProviderListener listener) {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.BaseLabelProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.BaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
+	 */
+	@Override
+	public boolean isLabelProperty(Object element, String property) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.BaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+	 */
+	@Override
+	public void removeListener(ILabelProviderListener listener) {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ReferenceLabelProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetLineNumber.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetLineNumber.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetLineNumber.java	(revision 324)
@@ -0,0 +1,154 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Action to set the number of line shown per concordance page @ author mdecorde.
+ */
+public class SetLineNumber extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.setcontextsize"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+
+	/**
+	 * Instantiates a new sets the line number.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 */
+	public SetLineNumber(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.window = window;
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.SetLineNumber_0);
+		setToolTipText(Messages.SetLineNumber_0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		SetLineNumberDialog d = new SetLineNumberDialog(window.getShell());
+		if (d.open() == Window.OK) {
+			concordanceEditor.setLinePerPage(d.getValue());
+			// concordanceEditor.getConcordance().setLeftContextSize(d.getLeftContextSize());
+			// concordanceEditor.getConcordance().setRightContextSize(d.getRightContextSize());
+			// concordanceEditor.sort();
+			// concordanceEditor.fillDisplayArea(concordanceEditor.getTopLine(),
+			// concordanceEditor.getBottomLine());
+		}
+	}
+
+	/**
+	 * The Class SetLineNumberDialog.
+	 */
+	private class SetLineNumberDialog extends Dialog {
+
+		/** The right context size. */
+		private int rightContextSize;
+		
+		/** The right spinner. */
+		private Spinner rightSpinner;
+
+		/**
+		 * Instantiates a new sets the line number dialog.
+		 *
+		 * @param parentShell the parent shell
+		 */
+		protected SetLineNumberDialog(Shell parentShell) {
+			super(parentShell);
+			//parentShell.setText(Messages.SetLineNumber_0);
+		}
+
+		/**
+		 * Gets the value.
+		 *
+		 * @return the value
+		 */
+		public int getValue() {
+			return rightContextSize;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			Composite mainArea = new Composite(parent, SWT.NONE);
+			mainArea.setLayout(new GridLayout(2, false));
+
+			new Label(mainArea, SWT.None).setText(Messages.SetLineNumber_1);
+			rightSpinner = new Spinner(mainArea, SWT.NONE);
+			rightSpinner.setSelection(concordanceEditor.getLinePerPage());
+			rightSpinner.setMinimum(0);
+			rightSpinner.setMaximum(100000);
+			return mainArea;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		@Override
+		protected void okPressed() {
+			rightContextSize = rightSpinner.getSelection();
+			super.okPressed();
+		}
+
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SetLineNumber.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesProvider.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesProvider.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesProvider.java	(revision 324)
@@ -0,0 +1,82 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.txm.functions.concordances.Line;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The IStructuredContentProvider used by the reference and line tables.
+ *
+ * @author jmague
+ */
+public class ConcordancesProvider implements IStructuredContentProvider {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
+	 * .lang.Object)
+	 */
+	@Override
+	public Object[] getElements(Object inputElement) {
+		@SuppressWarnings("unchecked") //$NON-NLS-1$
+		List<Line> lines = (List<Line>) inputElement;
+		return lines.toArray();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
+	 * .viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ConcordancesProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/package.html
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/package.html	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/package.html	(revision 324)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>concordances editors</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/DefineSortReferencePattern.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/DefineSortReferencePattern.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/DefineSortReferencePattern.java	(revision 324)
@@ -0,0 +1,382 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.functions.ReferencePattern;
+import org.txm.rcp.Messages;
+import org.txm.rcp.editors.parabrowser.ParaBrowserEditor;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+// TODO: Auto-generated Javadoc
+/**
+ * Action to build the reference pattern.
+ *
+ * @ author mdecorde
+ */
+public class DefineSortReferencePattern extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.definereferencepattern"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+	
+	/** The para browser editor. */
+	private ParaBrowserEditor paraBrowserEditor;
+
+	/**
+	 * Instantiates a new define reference pattern.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 */
+	public DefineSortReferencePattern(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.window = window;
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.DefineReferencePattern_3);
+		setToolTipText(Messages.DefineReferencePattern_4);
+	}
+
+	/**
+	 * Instantiates a new define reference pattern.
+	 *
+	 * @param window the window
+	 * @param paraBrowserEditor the para browser editor
+	 */
+	public DefineSortReferencePattern(IWorkbenchWindow window,
+			ParaBrowserEditor paraBrowserEditor) {
+		this.window = window;
+		this.paraBrowserEditor = paraBrowserEditor;
+		setId(ID);
+		setText(Messages.DefineReferencePattern_3);
+		setToolTipText(Messages.DefineReferencePattern_4);
+	}
+
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		List<StructuralUnit> structuralUnits = null;
+		List<Property> availableReferenceItems = new ArrayList<Property>();
+		try {
+			if (paraBrowserEditor != null) {
+				structuralUnits = paraBrowserEditor.getCorpus()
+						.getOrderedStructuralUnits();
+				availableReferenceItems.addAll(paraBrowserEditor.getCorpus()
+						.getOrderedProperties());
+
+			} else if (concordanceEditor != null) {
+				structuralUnits = concordanceEditor.getCorpus()
+						.getOrderedStructuralUnits();
+				availableReferenceItems.addAll(concordanceEditor.getCorpus()
+						.getOrderedProperties());
+
+			}
+
+		} catch (Exception e) {
+			org.txm.rcp.utils.Logger.printStackTrace(e);
+		}
+
+		for (StructuralUnit unit : structuralUnits) {
+			availableReferenceItems.addAll(unit.getProperties());
+		}
+
+		// System.out.println("selected "+concordanceEditor.getSelectedReferences());
+		// System.out.println("before avail"+availableReferenceItems);
+		if (paraBrowserEditor != null) {
+			availableReferenceItems.remove(paraBrowserEditor
+					.getSelectedReferences());
+		} else {
+			availableReferenceItems.remove(concordanceEditor
+					.getSelectedSortReferences());
+		}
+
+		// System.out.println("after avail"+availableReferenceItems);
+		DefineReferencePatternDialog d = null;
+		if (paraBrowserEditor != null) {
+			d = new DefineReferencePatternDialog(window.getShell(),
+					availableReferenceItems, paraBrowserEditor
+							.getSelectedReferences());
+		} else if (concordanceEditor != null) {
+			d = new DefineReferencePatternDialog(window.getShell(),
+					availableReferenceItems, concordanceEditor
+							.getSelectedSortReferences());
+		}
+
+		if (d.open() == Window.OK) {
+			if (paraBrowserEditor != null) {
+				paraBrowserEditor.setReferencePattern(new ReferencePattern(d
+						.getSelectesdReferenceItems()));
+			} else if (concordanceEditor != null) {
+				concordanceEditor.setRefSortPattern(new ReferencePattern(d
+						.getSelectesdReferenceItems()));
+			}
+			//System.out.println(concordanceEditor.getSortReferencePattern());
+		}
+	}
+
+	/**
+	 * The Class DefineReferencePatternDialog.
+	 */
+	private class DefineReferencePatternDialog extends Dialog {
+
+		/** The available reference items. */
+		private List<Property> availableReferenceItems;
+		
+		/** The selected reference items. */
+		private List<Property> selectedReferenceItems;
+
+		/**
+		 * Instantiates a new define reference pattern dialog.
+		 *
+		 * @param parentShell the parent shell
+		 * @param availableReferenceItems the available reference items
+		 * @param selectedReferences the selected references
+		 */
+		protected DefineReferencePatternDialog(Shell parentShell,
+				List<Property> availableReferenceItems,
+				List<Property> selectedReferences) {
+			super(parentShell);
+			
+			this.availableReferenceItems = availableReferenceItems;
+			this.selectedReferenceItems = selectedReferences;
+			this.availableReferenceItems.removeAll(selectedReferences);
+			this.setShellStyle(this.getShellStyle() | SWT.RESIZE);	
+		}
+
+		/**
+		 * Gets the selectesd reference items.
+		 *
+		 * @return the selectesd reference items
+		 */
+		public List<Property> getSelectesdReferenceItems() {
+			return selectedReferenceItems;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+		 */
+		@Override
+		protected void configureShell(Shell shell) {
+		      super.configureShell(shell);
+		      shell.setText(Messages.DefineReferencePattern_5);
+		      
+		      shell.setSize(400, 500);
+		      shell.setLocation(shell.getParent().getLocation());
+		   }
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+
+			Composite mainArea = new Composite(parent, SWT.NONE);
+			mainArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, true));
+			mainArea.setLayout(new GridLayout(4, false));
+
+			final org.eclipse.swt.widgets.List availbleItems = new org.eclipse.swt.widgets.List(
+					mainArea, SWT.BORDER | SWT.V_SCROLL);
+			for (Property property : availableReferenceItems) {
+				if (property instanceof StructuralUnitProperty) {
+					StructuralUnitProperty sProperty = (StructuralUnitProperty) property;
+					availbleItems.add(sProperty.getStructuralUnit().getName()
+							+ ": " + property.getName()); //$NON-NLS-1$
+				} else {
+					availbleItems.add(property.getName());
+				}
+			}
+						
+			GridData gridData = new GridData(GridData.FILL, GridData.FILL,
+					true, true);
+			//Point size = availbleItems.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+			//gridData.widthHint = size.x;
+			availbleItems.setLayoutData(gridData);
+
+			Composite selectionButtons = new Composite(mainArea, SWT.NONE);
+			selectionButtons.setLayout(new GridLayout(1, false));
+			Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+			Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+			final org.eclipse.swt.widgets.List selectedItems = new org.eclipse.swt.widgets.List(
+					mainArea, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+			selectedItems.setLayoutData(gridData);
+			for (Property property : selectedReferenceItems) {
+				if (property instanceof StructuralUnitProperty) {
+					StructuralUnitProperty sProperty = (StructuralUnitProperty) property;
+					selectedItems.add(sProperty.getStructuralUnit().getName()
+							+ ": " + property.getName()); //$NON-NLS-1$
+				} else {
+					selectedItems.add(property.getName());
+				}
+			}
+			
+			//DBL CLICK Listeners
+			selectedItems.addMouseListener(new MouseListener() {
+				@Override
+				public void mouseUp(MouseEvent e) { }
+				
+				@Override
+				public void mouseDown(MouseEvent e) { }
+				
+				@Override
+				public void mouseDoubleClick(MouseEvent e) {
+					int ind = selectedItems.getSelectionIndex();
+					availbleItems.add(selectedItems.getItem(ind));
+					selectedItems.remove(ind);
+					availableReferenceItems
+							.add(selectedReferenceItems.get(ind));
+					selectedReferenceItems.remove(ind);
+					selectedItems.setSelection(ind);	
+				}
+			});
+			availbleItems.addMouseListener(new MouseListener() {
+				@Override
+				public void mouseUp(MouseEvent e) { }
+				
+				@Override
+				public void mouseDown(MouseEvent e) { }
+				
+				@Override
+				public void mouseDoubleClick(MouseEvent e) {
+					int ind = availbleItems.getSelectionIndex();
+					selectedItems.add(availbleItems.getItem(ind));
+					availbleItems.remove(ind);
+					selectedReferenceItems
+							.add(availableReferenceItems.get(ind));
+					availableReferenceItems.remove(ind);
+					availbleItems.setSelection(ind);
+				}
+			});
+
+			Composite orderButtons = new Composite(mainArea, SWT.NONE);
+			orderButtons.setLayout(new GridLayout(1, false));
+			Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+			Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+			select.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int ind = availbleItems.getSelectionIndex();
+					selectedItems.add(availbleItems.getItem(ind));
+					availbleItems.remove(ind);
+					selectedReferenceItems
+							.add(availableReferenceItems.get(ind));
+					availableReferenceItems.remove(ind);
+					availbleItems.setSelection(ind);
+				}
+			});
+
+			unselect.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int ind = selectedItems.getSelectionIndex();
+					availbleItems.add(selectedItems.getItem(ind));
+					selectedItems.remove(ind);
+					availableReferenceItems
+							.add(selectedReferenceItems.get(ind));
+					selectedReferenceItems.remove(ind);
+					selectedItems.setSelection(ind);					
+				}
+			});
+
+			up.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int ind = selectedItems.getSelectionIndex();
+					if (ind > 0) {
+						String value = selectedItems.getItem(ind);
+						selectedItems.remove(ind);
+						selectedItems.add(value, ind -1);
+						
+						Property prop = selectedReferenceItems.get(ind);
+						selectedReferenceItems.remove(ind);
+						selectedReferenceItems.add(ind-1,prop);
+						
+						selectedItems.setSelection(ind -1);
+					}
+				}
+			});
+
+			down.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					int ind = selectedItems.getSelectionIndex();
+					if (ind < selectedItems.getItemCount() - 1) {
+						String value = selectedItems.getItem(ind);
+						selectedItems.remove(ind);
+						selectedItems.add(value, ind + 1);
+						
+						Property prop = selectedReferenceItems.get(ind);
+						selectedReferenceItems.remove(ind);
+						selectedReferenceItems.add(ind+1, prop);
+						
+						selectedItems.setSelection(ind + 1);
+					}
+				}
+			});
+
+			return mainArea;
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/DefineSortReferencePattern.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComplexSort.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComplexSort.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComplexSort.java	(revision 324)
@@ -0,0 +1,403 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.functions.concordances.comparators.CompositeComparator;
+import org.txm.functions.concordances.comparators.LineComparator;
+import org.txm.rcp.Messages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.editors.concordances.ConcordancesEditor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * action called to set the complex sort of the concordance @ author mdecorde.
+ */
+public class ComplexSort extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.complexsort"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+
+	/**
+	 * Instantiates a new complex sort.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 */
+	public ComplexSort(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.window = window;
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.ComplexSort_1);
+		setToolTipText(Messages.ComplexSort_2);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		SelectComplexSortDialog d = new SelectComplexSortDialog(window
+				.getShell());
+		if (d.open() == Window.OK) {
+			concordanceEditor.setUserDefinedComparators(d
+					.getUserDefinedComparators());
+			concordanceEditor.setCurrentComparator(d.getSelectedComparator());
+			concordanceEditor.sort();
+		}
+
+	}
+
+	/**
+	 * The Class SelectComplexSortDialog.
+	 */
+	private class SelectComplexSortDialog extends Dialog {
+
+		/** The selected comparator. */
+		private LineComparator selectedComparator;
+		
+		/** The user defined comparators. */
+		private List<LineComparator> userDefinedComparators;
+		
+		/** The list. */
+		private org.eclipse.swt.widgets.List list;
+
+		/**
+		 * Instantiates a new select complex sort dialog.
+		 *
+		 * @param shell the shell
+		 */
+		public SelectComplexSortDialog(Shell shell) {
+			super(shell);
+			this.userDefinedComparators = new ArrayList<LineComparator>(
+					concordanceEditor.getUserDefinedComparators());
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+		 */
+		@Override
+		protected void configureShell(Shell newShell) {
+			super.configureShell(newShell);
+			newShell.setText(Messages.ComplexSort_3);
+		}
+
+		/**
+		 * Gets the user defined comparators.
+		 *
+		 * @return the user defined comparators
+		 */
+		public List<LineComparator> getUserDefinedComparators() {
+			return userDefinedComparators;
+		}
+
+		/**
+		 * Gets the selected comparator.
+		 *
+		 * @return the selected comparator
+		 */
+		public LineComparator getSelectedComparator() {
+			return selectedComparator;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			Composite mainArea = new Composite(parent, SWT.NONE);
+			mainArea.setLayout(new GridLayout(2, false));
+			list = new org.eclipse.swt.widgets.List(mainArea, SWT.V_SCROLL
+					| SWT.BORDER);
+			GridData layoutData = new GridData(GridData.FILL, GridData.FILL,
+					true, true);
+			layoutData.verticalSpan = 2;
+			layoutData.minimumWidth = 100;
+			layoutData.minimumHeight = 75;
+			list.setLayoutData(layoutData);
+			for (LineComparator comparator : concordanceEditor
+					.getUserDefinedComparators()) {
+				list.add(comparator.getName());
+			}
+			list.select(0);
+			Button newButton = new Button(mainArea, SWT.PUSH);
+			newButton.setText(Messages.ComplexSort_4);
+			newButton.addSelectionListener(new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					StatusLine.setMessage(Messages.ComplexSort_0);
+					CompositeSorterCreationDialog sorterCreationDialog = new CompositeSorterCreationDialog(
+							getShell());
+					int code = sorterCreationDialog.open();
+					if (code == Window.OK) {
+						CompositeComparator comp = new CompositeComparator(
+								sorterCreationDialog.getName(),
+								sorterCreationDialog.getComparators());
+						list.add(comp.getName());
+						userDefinedComparators.add(comp);
+						list.select(list.getItemCount() - 1);
+					}
+					StatusLine.setMessage(""); //$NON-NLS-1$
+				}
+
+				@Override
+				public void widgetDefaultSelected(SelectionEvent e) {
+				}
+			});
+			return mainArea;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		@Override
+		protected void okPressed() {
+			selectedComparator = userDefinedComparators.get(list
+					.getSelectionIndex());
+			super.okPressed();
+		}
+
+	}
+
+	/**
+	 * The Class CompositeSorterCreationDialog.
+	 */
+	private class CompositeSorterCreationDialog extends Dialog {
+
+		/** The available comparators. */
+		final private List<LineComparator> availableComparators;
+		
+		/** The selected comparators. */
+		final private List<LineComparator> selectedComparators;
+		
+		/** The name text. */
+		private Text nameText;
+		
+		/** The name. */
+		private String name;
+
+		/**
+		 * Instantiates a new composite sorter creation dialog.
+		 *
+		 * @param shell the shell
+		 */
+		protected CompositeSorterCreationDialog(Shell shell) {
+			super(shell);
+			this.availableComparators = new ArrayList<LineComparator>(
+					concordanceEditor.getStandardComparators());
+			this.selectedComparators = new ArrayList<LineComparator>();
+		}
+
+		/**
+		 * Gets the name.
+		 *
+		 * @return the name
+		 */
+		public String getName() {
+			return name;
+		}
+
+		/**
+		 * Gets the comparators.
+		 *
+		 * @return the comparators
+		 */
+		public List<LineComparator> getComparators() {
+			return selectedComparators;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+		 */
+		@Override
+		protected void configureShell(Shell newShell) {
+			super.configureShell(newShell);
+			newShell.setText(Messages.ComplexSort_5);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			Composite mainArea = new Composite(parent, SWT.NONE);
+			GridLayout layout = new GridLayout(4, false);
+			mainArea.setLayout(layout);
+
+			Label nameLabel = new Label(mainArea, SWT.NONE);
+			nameLabel.setText(Messages.ComplexSort_6);
+
+			nameText = new Text(mainArea, SWT.NONE);
+			GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false);
+			gridData.horizontalSpan = 3;
+			nameText.setLayoutData(gridData);
+
+			final org.eclipse.swt.widgets.List availbleItems = new org.eclipse.swt.widgets.List(
+					mainArea, SWT.BORDER | SWT.V_SCROLL);
+			for (LineComparator comparator : availableComparators) {
+				availbleItems.add(comparator.getName());
+			}
+			gridData = new GridData(GridData.FILL, GridData.FILL, true, false);
+			Point size = availbleItems.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+			gridData.widthHint = size.x;
+			availbleItems.setLayoutData(gridData);
+
+			Composite selectionButtons = new Composite(mainArea, SWT.NONE);
+			selectionButtons.setLayout(new GridLayout(1, false));
+			Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+			Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+			final org.eclipse.swt.widgets.List selectedItems = new org.eclipse.swt.widgets.List(
+					mainArea, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+			selectedItems.setLayoutData(gridData);
+
+			Composite orderButtons = new Composite(mainArea, SWT.NONE);
+			orderButtons.setLayout(new GridLayout(1, false));
+			Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+			Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+			select.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					StatusLine.setMessage(Messages.ComplexSort_12);
+					int ind = availbleItems.getSelectionIndex();
+					selectedItems.add(availbleItems.getItem(ind));
+					availbleItems.remove(ind);
+					selectedComparators.add(availableComparators.get(ind));
+					availableComparators.remove(ind);
+					availbleItems.setSelection(ind);
+					StatusLine.setMessage(""); //$NON-NLS-1$
+				}
+			});
+
+			unselect.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					StatusLine.setMessage(Messages.ComplexSort_14);
+					int ind = selectedItems.getSelectionIndex();
+					availbleItems.add(selectedItems.getItem(ind));
+					selectedItems.remove(ind);
+					availableComparators.add(selectedComparators.get(ind));
+					selectedComparators.remove(ind);
+					selectedItems.setSelection(ind);
+					StatusLine.setMessage(""); //$NON-NLS-1$
+				}
+			});
+
+			up.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					StatusLine.setMessage(Messages.ComplexSort_16);
+					int ind = selectedItems.getSelectionIndex();
+					if (ind > 0) {
+						selectedItems.add(selectedItems.getItem(ind), ind - 1);
+						selectedItems.remove(ind + 1);
+						selectedComparators.add(selectedComparators
+								.get(ind - 1));
+						selectedComparators.remove(ind + 1);
+						selectedItems.setSelection(ind - 1);
+					}
+					StatusLine.setMessage(""); //$NON-NLS-1$
+				}
+			});
+
+			down.addSelectionListener(new SelectionAdapter() {
+				@Override
+				public void widgetSelected(SelectionEvent e) {
+					StatusLine.setMessage(Messages.ComplexSort_18);
+					int ind = selectedItems.getSelectionIndex();
+					if (ind < selectedItems.getItemCount() - 1) {
+						selectedItems.add(selectedItems.getItem(ind), ind + 2);
+						selectedItems.remove(ind);
+						selectedComparators.add(selectedComparators
+								.get(ind + 2));
+						selectedComparators.remove(ind);
+						selectedItems.setSelection(ind + 2);
+					}
+					StatusLine.setMessage(""); //$NON-NLS-1$
+				}
+			});
+			return mainArea;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		@Override
+		protected void okPressed() {
+			if (nameText.getText().equals("")) { //$NON-NLS-1$
+				MessageDialog.openError(getShell(), Messages.CreateSubcorpusDialog_11,
+						Messages.ComplexSort_9);
+				return;
+			}
+			name = nameText.getText();
+			if (selectedComparators.size() < 2) {
+				MessageDialog.openError(getShell(), Messages.ComplexSort_10,
+						Messages.ComplexSort_11);
+				return;
+			}
+			super.okPressed();
+		}
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComplexSort.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/OpenFileDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/OpenFileDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/OpenFileDialog.java	(revision 324)
@@ -0,0 +1,101 @@
+package org.txm.rcp.editors.concordances;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+
+public class OpenFileDialog {
+
+  Display d;
+
+  Shell s;
+
+  OpenFileDialog() {
+    d = new Display();
+    s = new Shell(d);
+    s.setSize(400, 400);
+    
+    s.setText("A MessageBox Example");
+    //         create the menu system
+    Menu m = new Menu(s, SWT.BAR);
+    // create a file menu and add an exit item
+    final MenuItem file = new MenuItem(m, SWT.CASCADE);
+    file.setText("&File");
+    final Menu filemenu = new Menu(s, SWT.DROP_DOWN);
+    file.setMenu(filemenu);
+    final MenuItem openItem = new MenuItem(filemenu, SWT.PUSH);
+    openItem.setText("&Open\tCTRL+O");
+    openItem.setAccelerator(SWT.CTRL + 'O');
+    final MenuItem saveItem = new MenuItem(filemenu, SWT.PUSH);
+    saveItem.setText("&Save\tCTRL+S");
+    saveItem.setAccelerator(SWT.CTRL + 'S');
+    final MenuItem separator = new MenuItem(filemenu, SWT.SEPARATOR);
+    final MenuItem exitItem = new MenuItem(filemenu, SWT.PUSH);
+    exitItem.setText("E&xit");
+
+    class Open implements SelectionListener {
+      public void widgetSelected(SelectionEvent event) {
+        FileDialog fd = new FileDialog(s, SWT.OPEN);
+        fd.setText("Open");
+        fd.setFilterPath("C:/");
+        String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
+        fd.setFilterExtensions(filterExt);
+        String selected = fd.open();
+        System.out.println(selected);
+      }
+
+      public void widgetDefaultSelected(SelectionEvent event) {
+      }
+    }
+
+    class Save implements SelectionListener {
+      public void widgetSelected(SelectionEvent event) {
+        FileDialog fd = new FileDialog(s, SWT.SAVE);
+        fd.setText("Save");
+        fd.setFilterPath("C:/");
+        String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
+        fd.setFilterExtensions(filterExt);
+        String selected = fd.open();
+        System.out.println(selected);
+      }
+
+      public void widgetDefaultSelected(SelectionEvent event) {
+      }
+    }
+    openItem.addSelectionListener(new Open());
+    saveItem.addSelectionListener(new Save());
+
+    exitItem.addSelectionListener(new SelectionAdapter() {
+      public void widgetSelected(SelectionEvent e) {
+        MessageBox messageBox = new MessageBox(s, SWT.ICON_QUESTION
+            | SWT.YES | SWT.NO);
+        messageBox.setMessage("Do you really want to exit?");
+        messageBox.setText("Exiting Application");
+        int response = messageBox.open();
+        if (response == SWT.YES)
+          System.exit(0);
+      }
+    });
+    s.setMenuBar(m);
+    s.open();
+
+    while (!s.isDisposed()) {
+      if (!d.readAndDispatch())
+        d.sleep();
+    }
+    d.dispose();
+  }
+
+  public static void main(String[] argv) {
+    new OpenFileDialog();
+  }
+
+}
\ No newline at end of file

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/OpenFileDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SortPropertySelectionDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SortPropertySelectionDialog.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SortPropertySelectionDialog.java	(revision 324)
@@ -0,0 +1,313 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+
+// TODO: Auto-generated Javadoc
+/**
+ * the dialog box called to select the view properties @ author mdecorde.
+ */
+public class SortPropertySelectionDialog extends Dialog {
+
+	/** The available properties. */
+	final private List<Property> availableProperties;
+	
+	/** The selected properties. */
+	final private List<Property> selectedProperties;
+	
+	/** The maxprops. */
+	int maxprops = -1;
+
+	/** The available properties view. */
+	org.eclipse.swt.widgets.List availablePropertiesSort;
+	
+	/** The selected properties view. */
+	org.eclipse.swt.widgets.List selectedPropertiesSort;
+
+	/**
+	 * Instantiates a new view property selection dialog.
+	 *
+	 * @param parentShell the parent shell
+	 * @param availableProperties the available properties
+	 * @param selectedProperties the selected properties
+	 */
+	public SortPropertySelectionDialog(IShellProvider parentShell,
+			List<Property> availableProperties,
+			List<Property> selectedProperties) {
+		super(parentShell);
+
+		this.availableProperties = availableProperties;
+		this.selectedProperties = selectedProperties;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+	}
+
+	/**
+	 * Instantiates a new view property selection dialog.
+	 *
+	 * @param shell the shell
+	 * @param availableProperties the available properties
+	 * @param selectedProperties the selected properties
+	 */
+	public SortPropertySelectionDialog(Shell shell,
+			List<Property> availableProperties,
+			List<Property> selectedProperties) {
+		super(shell);
+
+		this.availableProperties = availableProperties;
+		this.selectedProperties = selectedProperties;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+	}
+
+	/**
+	 * Instantiates a new view property selection dialog.
+	 *
+	 * @param shell the shell
+	 * @param availableProperties the available properties
+	 * @param selectedProperties the selected properties
+	 * @param maxprops the maxprops
+	 */
+	public SortPropertySelectionDialog(Shell shell,
+			List<Property> availableProperties,
+			List<Property> selectedProperties, int maxprops) {
+		super(shell);
+
+		this.availableProperties = availableProperties;
+		this.selectedProperties = selectedProperties;
+		this.setShellStyle(this.getShellStyle() | SWT.RESIZE);
+		this.maxprops = maxprops;
+	}
+
+	/**
+	 * Gets the selected properties.
+	 *
+	 * @return the selected properties
+	 */
+	public List<Property> getSelectedProperties() {
+		return selectedProperties;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(Messages.SortPropertySelection_0);
+		newShell.setMinimumSize(300, 200);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		// parent.setLayout(new FormLayout());
+		Composite mainArea = new Composite(parent, SWT.NONE);
+		mainArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+		// 4 columns
+		GridLayout layout = new GridLayout(4, false);
+		mainArea.setLayout(layout);
+
+		availablePropertiesSort = new org.eclipse.swt.widgets.List(mainArea,
+				SWT.BORDER | SWT.V_SCROLL);
+		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		availablePropertiesSort.setLayoutData(gridData);
+
+		Composite selectionButtons = new Composite(mainArea, SWT.NONE);
+		selectionButtons.setLayout(new GridLayout(1, false));
+		Button select = new Button(selectionButtons, SWT.ARROW | SWT.RIGHT);
+		Button unselect = new Button(selectionButtons, SWT.ARROW | SWT.LEFT);
+
+		selectedPropertiesSort = new org.eclipse.swt.widgets.List(mainArea,
+				SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+		gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		selectedPropertiesSort.setLayoutData(gridData);
+
+		Composite orderButtons = new Composite(mainArea, SWT.NONE);
+		orderButtons.setLayout(new GridLayout(1, false));
+		Button up = new Button(orderButtons, SWT.ARROW | SWT.UP);
+		Button down = new Button(orderButtons, SWT.ARROW | SWT.DOWN);
+
+		select.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int index = availablePropertiesSort.getSelectionIndex();
+				if (maxprops == 1) {
+					selectedProperties.add(availableProperties.get(index));
+					availableProperties.remove(index);
+
+					availableProperties.add(selectedProperties.get(0));
+					selectedProperties.remove(0);
+				} else {
+					if (maxprops > 0) {
+						if (selectedProperties.size() >= maxprops)
+							return;
+					}
+
+					selectedProperties.add(availableProperties.get(index));
+					availableProperties.remove(index);
+				}
+				reload();
+				availablePropertiesSort.setSelection(index);
+			}
+		});
+
+		unselect.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if (maxprops == 1 || selectedProperties.size() > 1) {
+					int index = selectedPropertiesSort.getSelectionIndex();
+
+					availableProperties.add(selectedProperties.get(index));
+					selectedProperties.remove(index);
+
+					reload();
+					selectedPropertiesSort.setSelection(index);
+				}
+			}
+		});
+
+		up.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int index = selectedPropertiesSort.getSelectionIndex();
+				if (index > 0) {
+					Property selectedP = selectedProperties.get(index);
+					Property upperP = selectedProperties.get(index - 1);
+
+					selectedProperties.set(index, upperP);
+					selectedProperties.set(index - 1, selectedP);
+
+					reload();
+					selectedPropertiesSort.setSelection(index - 1);
+				}
+			}
+		});
+
+		down.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int index = selectedPropertiesSort.getSelectionIndex();
+				if (index < selectedProperties.size() - 1) {
+					Property selectedP = selectedProperties.get(index);
+					Property bellowP = selectedProperties.get(index + 1);
+
+					selectedProperties.set(index, bellowP);
+					selectedProperties.set(index + 1, selectedP);
+
+					reload();
+					selectedPropertiesSort.setSelection(index + 1);
+				}
+			}
+		});
+
+		availablePropertiesSort.addMouseListener(new MouseAdapter() {
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+				int index = availablePropertiesSort.getSelectionIndex();
+
+				selectedProperties.add(availableProperties.get(index));
+				availableProperties.remove(index);
+
+				reload();
+				availablePropertiesSort.setSelection(index);
+			}
+		});
+
+		selectedPropertiesSort.addMouseListener(new MouseAdapter() {
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+				if (selectedProperties.size() > 1) {
+					int index = selectedPropertiesSort.getSelectionIndex();
+
+					availableProperties.add(selectedProperties.get(index));
+					selectedProperties.remove(index);
+
+					reload();
+					selectedPropertiesSort.setSelection(index);
+				}
+			}
+		});
+
+		reload();
+		return mainArea;
+	}
+
+	/**
+	 * Reload.
+	 */
+	public void reload() {
+		availablePropertiesSort.removeAll();
+		for (Property property : availableProperties) {
+			//if (!property.getName().equals("id")) //$NON-NLS-1$
+			if (property instanceof StructuralUnitProperty)
+				availablePropertiesSort.add(((StructuralUnitProperty)property).getFullName());
+			else
+				availablePropertiesSort.add(property.getName());
+		}
+		selectedPropertiesSort.removeAll();
+		for (Property property : selectedProperties) {
+			//if (!property.getName().equals("id")) //$NON-NLS-1$
+			if (property instanceof StructuralUnitProperty)
+				selectedPropertiesSort.add(((StructuralUnitProperty)property).getFullName());
+			else
+				selectedPropertiesSort.add(property.getName());
+		}
+
+		availablePropertiesSort.getParent().layout();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	@Override
+	protected void okPressed() {
+		if (selectedProperties.size() != 0)
+			super.okPressed();
+	}
+
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/SortPropertySelectionDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ResetColumnWidths.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ResetColumnWidths.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ResetColumnWidths.java	(revision 324)
@@ -0,0 +1,25 @@
+package org.txm.rcp.editors.concordances;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.IWorkbenchWindow;
+
+public class ResetColumnWidths extends Action {
+	
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.ResetColumnWidths"; //$NON-NLS-1$
+	
+	
+	private ConcordancesEditor concordanceEditor;
+
+	public ResetColumnWidths(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText("Reset column widths");
+	}
+	
+	@Override
+	public void run() {
+		concordanceEditor.resetColumnWidths();
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ResetColumnWidths.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComputeIndexFromLines.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComputeIndexFromLines.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComputeIndexFromLines.java	(revision 324)
@@ -0,0 +1,84 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.rcp.Messages;
+import org.txm.rcp.commands.link.ConcordanceToIndex;
+
+// TODO: Auto-generated Javadoc
+/**
+ * use the line selection to compute an index.
+ */
+public class ComputeIndexFromLines extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.computecoocfromconclines"; //$NON-NLS-1$
+	
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+
+	/**
+	 * Instantiates a new compute index from lines.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 */
+	public ComputeIndexFromLines(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor) {
+		this.window = window;
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.ComputeIndexFromLines_0);
+		setToolTipText(Messages.ComputeIndexFromLines_0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		TableViewer table = concordanceEditor.getLineTableViewer();
+		ConcordanceToIndex.link(concordanceEditor,
+				(IStructuredSelection) table.getSelection());
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ComputeIndexFromLines.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewPropertySelection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewPropertySelection.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewPropertySelection.java	(revision 324)
@@ -0,0 +1,137 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// 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.editors.concordances;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.rcp.Messages;
+// TODO: Auto-generated Javadoc
+/**
+ * Action to define the view properties of each column @ author mdecorde.
+ */
+public class ViewPropertySelection extends Action implements IWorkbenchAction {
+
+	/** The Constant ID. */
+	private static final String ID = "org.txm.rcp.editors.concordances.ViewPropertySelection"; //$NON-NLS-1$
+
+	/** The concordance editor. */
+	private ConcordancesEditor concordanceEditor;
+
+	/** The available view properties. */
+	List<Property> availableViewProperties;
+
+	/** The selected view properties. */
+	List<Property> selectedViewProperties;
+
+	/**
+	 * Instantiates a new view property selection.
+	 *
+	 * @param window the window
+	 * @param concordanceEditor the concordance editor
+	 * @param tableViewer the table viewer
+	 */
+	public ViewPropertySelection(IWorkbenchWindow window,
+			ConcordancesEditor concordanceEditor, TableViewer tableViewer) {
+		this.concordanceEditor = concordanceEditor;
+		setId(ID);
+		setText(Messages.ViewPropertySelection_0);
+		setToolTipText(Messages.ViewPropertySelection_0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
+	 */
+	@Override
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		int columnid = concordanceEditor.getPointedColumn(); 
+		IWorkbenchPartSite site = concordanceEditor.getSite();
+
+		List<Property> selectedViewProperties = new ArrayList<Property>();
+		switch (columnid) // the selected properties depends on the columns
+		{
+		case 1:
+			availableViewProperties = concordanceEditor
+			.getAvailableLeftViewProperties();
+			selectedViewProperties = concordanceEditor
+					.getSelectedLeftViewProperties();
+			break;
+		case 2:
+			availableViewProperties = concordanceEditor
+			.getAvailableKeywordViewProperties();
+			selectedViewProperties = concordanceEditor
+					.getSelectedKeywordViewProperties();
+			break;
+		case 3:
+			availableViewProperties = concordanceEditor
+			.getAvailableRightViewProperties();
+			selectedViewProperties = concordanceEditor
+					.getSelectedRightViewProperties();
+			break;
+		default:
+			availableViewProperties = concordanceEditor
+			.getAvailableKeywordViewProperties();
+			selectedViewProperties = concordanceEditor
+					.getSelectedKeywordViewProperties();
+			break;
+		}
+
+		if (new ViewPropertySelectionDialog(site, availableViewProperties,
+				selectedViewProperties).open() == SWT.CANCEL)
+			return;
+
+		switch (columnid) {
+		case 1:
+			concordanceEditor.setLeftViewProperties(selectedViewProperties);
+			break;
+		case 2:
+			concordanceEditor.setKeywordViewProperties(selectedViewProperties);
+			break;
+		case 3:
+			concordanceEditor.setRightViewProperties(selectedViewProperties);
+			break;
+		default:
+			concordanceEditor.setKeywordViewProperties(selectedViewProperties);
+			break;
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/concordances/ViewPropertySelection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/plugin.xml
===================================================================
--- tmp/org.txm.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.rcp/plugin.xml	(revision 324)
@@ -10,22 +10,22 @@
       <application
             icon="icons/logo/TXM logo.png">
          <run
-               class="org.txm.rcpapplication.Application">
+               class="org.txm.rcp.Application">
          </run>
       </application>
    </extension>
    <extension
          point="org.eclipse.ui.perspectives">
       <perspective
-            class="org.txm.rcpapplication.perspective.TXMPerspective"
+            class="org.txm.rcp.perspective.TXMPerspective"
             icon="icons/objects/corpus.png"
-            id="org.txm.rcpapplication.perspective.TXMPerspective"
+            id="org.txm.rcp.perspective.TXMPerspective"
             name="%perspective.name">
       </perspective>
       <perspective
-            class="org.txm.rcpapplication.perspective.RPerspective"
+            class="org.txm.rcp.perspective.RPerspective"
             icon="icons/logo/Rcran.png"
-            id="org.txm.rcpapplication.perspective.RPerspective"
+            id="org.txm.rcp.perspective.RPerspective"
             name="%perspective.name.0">
       </perspective>
    </extension>
@@ -78,7 +78,7 @@
       <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
          <view
                closeable="false"
-               id="org.txm.rcpapplication.views.CorporaView"
+               id="org.txm.rcp.views.CorporaView"
                ratio="0.5"
                relationship="right"
                relative="org.eclipse.ui.views.TaskList"/>
@@ -92,7 +92,7 @@
          </view>
          <view
                closeable="true"
-               id="org.txm.rcpapplication.views.GroovyConsole"
+               id="org.txm.rcp.views.GroovyConsole"
                minimized="false"
                ratio="0.5"
                relationship="bottom"
@@ -100,7 +100,7 @@
          </view>
          <view
                closeable="true"
-               id="org.txm.rcpapplication.views.QueriesView"
+               id="org.txm.rcp.views.QueriesView"
                ratio="0.5"
                relationship="right"
                relative="org.eclipse.ui.views.TaskList">
@@ -110,13 +110,13 @@
    <extension
          point="org.eclipse.ui.views">
       <category
-            id="org.txm.rcpapplication"
+            id="org.txm.rcp"
             name="%category.name"/>
       <view
-            category="org.txm.rcpapplication"
-            class="org.txm.rcpapplication.views.corpora.CorporaView"
+            category="org.txm.rcp"
+            class="org.txm.rcp.views.corpora.CorporaView"
             icon="icons/objects/corpus.png"
-            id="org.txm.rcpapplication.views.CorporaView"
+            id="org.txm.rcp.views.CorporaView"
             name="%view.name"/>
       <view
             allowMultiple="false"
@@ -128,56 +128,56 @@
       </view>
       <view
             allowMultiple="false"
-            category="org.txm.rcpapplication"
-            class="org.txm.rcpapplication.views.fileexplorer.Explorer"
+            category="org.txm.rcp"
+            class="org.txm.rcp.views.fileexplorer.Explorer"
             icon="icons/objects/folder.png"
-            id="org.txm.rcpapplication.views.fileexplorer.Explorer"
+            id="org.txm.rcp.views.fileexplorer.Explorer"
             name="%view.name.1"
             restorable="true">
       </view>
       <view
             allowMultiple="false"
-            category="org.txm.rcpapplication"
-            class="org.txm.rcpapplication.views.GroovyConsole"
-            id="org.txm.rcpapplication.views.GroovyConsole"
+            category="org.txm.rcp"
+            class="org.txm.rcp.views.GroovyConsole"
+            id="org.txm.rcp.views.GroovyConsole"
             name="%view.name.2"
             restorable="true">
       </view>
       <view
-            category="org.txm.rcpapplication"
-            class="org.txm.rcpapplication.views.BasesView"
-            id="org.txm.rcpapplication.views.BasesView"
+            category="org.txm.rcp"
+            class="org.txm.rcp.views.BasesView"
+            id="org.txm.rcp.views.BasesView"
             name="%view.name.3"
             restorable="true">
       </view>
       <view
-            category="org.txm.rcpapplication"
-            class="org.txm.rcpapplication.views.QueriesView"
+            category="org.txm.rcp"
+            class="org.txm.rcp.views.QueriesView"
             icon="icons/objects/query.png"
-            id="org.txm.rcpapplication.views.QueriesView"
+            id="org.txm.rcp.views.QueriesView"
             name="%view.name.4"
             restorable="true">
       </view>
       <view
-            category="org.txm.rcpapplication"
-            class="org.txm.rcpapplication.views.SummaryView"
-            id="org.txm.rcpapplication.views.InternalCorpusView"
+            category="org.txm.rcp"
+            class="org.txm.rcp.views.SummaryView"
+            id="org.txm.rcp.views.InternalCorpusView"
             name="%view.name.7"
             restorable="true">
       </view>
       <view
             allowMultiple="false"
-            category="org.txm.rcpapplication"
-            class="org.txm.rcpapplication.views.fileexplorer.MacroExplorer"
+            category="org.txm.rcp"
+            class="org.txm.rcp.views.fileexplorer.MacroExplorer"
             icon="icons/objects/script.png"
-            id="org.txm.rcpapplication.views.fileexplorer.MacroExplorer"
+            id="org.txm.rcp.views.fileexplorer.MacroExplorer"
             name="%view.name.8"
             restorable="true">
       </view>
       <view
-            category="org.txm.rcpapplication"
-            class="org.txm.rcpapplication.views.knowledgerepositories.KRView"
-            id="org.txm.rcpapplication.views.knowledgerepositories.KRView"
+            category="org.txm.rcp"
+            class="org.txm.rcp.views.knowledgerepositories.KRView"
+            id="org.txm.rcp.views.knowledgerepositories.KRView"
             name="%view.name.9"
             restorable="true">
       </view>
@@ -186,24 +186,24 @@
          point="org.eclipse.core.runtime.adapters">
       <factory
             adaptableType="org.txm.searchengine.cqp.corpus.CorpusManager"
-            class="org.txm.rcpapplication.AdapterFactory">
+            class="org.txm.rcp.AdapterFactory">
          <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
       </factory>
 	<factory 
 		adaptableType="org.txm.searchengine.cqp.corpus.Lexicon" 
-		class="org.txm.rcpapplication.AdapterFactory">
+		class="org.txm.rcp.AdapterFactory">
 		<adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
 	</factory>
 
 	<factory 
 		adaptableType="org.txm.searchengine.cqp.corpus.Corpus" 
-		class="org.txm.rcpapplication.AdapterFactory">
+		class="org.txm.rcp.AdapterFactory">
 		<adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
 	</factory>
 
 	<factory 
 		adaptableType="org.txm.searchengine.cqp.corpus.Partition" 
-		class="org.txm.rcpapplication.AdapterFactory">
+		class="org.txm.rcp.AdapterFactory">
 		<adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
 	</factory>
 
@@ -211,26 +211,26 @@
 
 	<factory 
 		adaptableType="org.txm.functions.concordances.Concordance" 
-		class="org.txm.rcpapplication.AdapterFactory">
+		class="org.txm.rcp.AdapterFactory">
 		<adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
 	</factory>
  <factory
        adaptableType="org.txm.functions.referencer.Referencer"
-       class="org.txm.rcpapplication.AdapterFactory">
+       class="org.txm.rcp.AdapterFactory">
     <adapter
           type="org.eclipse.ui.model.IWorkbenchAdapter">
     </adapter>
  </factory>
  <factory
        adaptableType="org.txm.functions.internal.InternalView"
-       class="org.txm.rcpapplication.AdapterFactory">
+       class="org.txm.rcp.AdapterFactory">
     <adapter
           type="org.eclipse.ui.model.IWorkbenchAdapter">
     </adapter>
  </factory>
  <factory
        adaptableType="org.txm.functions.intertextualdistance.InterTextDistance"
-       class="org.txm.rcpapplication.AdapterFactory">
+       class="org.txm.rcp.AdapterFactory">
     <adapter
           type="org.eclipse.ui.model.IWorkbenchAdapter">
     </adapter>
@@ -240,88 +240,88 @@
    <extension
          point="org.eclipse.ui.editors">
       <editor
-            class="org.txm.rcpapplication.editors.SVGGraphicEditor"
+            class="org.txm.rcp.editors.SVGGraphicEditor"
             default="false"
-            id="org.txm.rcpapplication.editors.SVGGraphicEditor"
+            id="org.txm.rcp.editors.SVGGraphicEditor"
             name="%editor.name"/>
       <editor
-            class="org.txm.rcpapplication.editors.GenericMultiPageEditor"
+            class="org.txm.rcp.editors.GenericMultiPageEditor"
             default="false"
-            id="org.txm.rcpapplication.editors.GenericMultiPageEditor"
+            id="org.txm.rcp.editors.GenericMultiPageEditor"
             name="%editor.name.1">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.concordances.ConcordancesEditor"
+            class="org.txm.rcp.editors.concordances.ConcordancesEditor"
             default="false"
             icon="icons/functions/Concordances.png"
-            id="org.txm.rcpapplication.editors.ConcordancesEditor"
+            id="org.txm.rcp.editors.ConcordancesEditor"
             name="%editor.name.2"/>
       <editor
-            class="org.txm.rcpapplication.editors.TxtEditor"
+            class="org.txm.rcp.editors.TxtEditor"
             contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
             default="false"
             icon="icons/objects/file.png"
-            id="org.txm.rcpapplication.editors.TxtEditor"
+            id="org.txm.rcp.editors.TxtEditor"
             name="%editor.name.4">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.TXMBrowser"
+            class="org.txm.rcp.editors.TXMBrowser"
             default="false"
             icon="icons/objects/edition.png"
-            id="org.txm.rcpapplication.editors.TXMBrowser"
+            id="org.txm.rcp.editors.TXMBrowser"
             name="%editor.name.5">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.objectexplorer.ObjectExplorer"
+            class="org.txm.rcp.editors.objectexplorer.ObjectExplorer"
             default="false"
-            id="org.txm.rcpapplication.editors.ObjectExplorer"
+            id="org.txm.rcp.editors.ObjectExplorer"
             name="%editor.name.6">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.parabrowser.ParaBrowserEditor"
+            class="org.txm.rcp.editors.parabrowser.ParaBrowserEditor"
             default="false"
-            id="org.txm.rcpapplication.editors.parabrowser.ParaBrowserEditor"
+            id="org.txm.rcp.editors.parabrowser.ParaBrowserEditor"
             name="%editor.name.8">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.referencer.ReferencerEditor"
+            class="org.txm.rcp.editors.referencer.ReferencerEditor"
             default="false"
             icon="icons/functions/Referencer.png"
-            id="org.txm.rcpapplication.editors.referencer.ReferencerEditor"
+            id="org.txm.rcp.editors.referencer.ReferencerEditor"
             name="%editor.name.14">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.imports.ImportFormEditor"
+            class="org.txm.rcp.editors.imports.ImportFormEditor"
             default="false"
             icon="icons/objects/books.png"
-            id="org.txm.rcpapplication.editors.imports.ImportFormEditor"
+            id="org.txm.rcp.editors.imports.ImportFormEditor"
             name="%editor.name.15">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.TestEditor"
+            class="org.txm.rcp.editors.TestEditor"
             default="false"
-            id="org.txm.rcpapplication.editors.TestEditor"
+            id="org.txm.rcp.editors.TestEditor"
             name="%editor.name.16">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.internal.InternalViewEditor"
+            class="org.txm.rcp.editors.internal.InternalViewEditor"
             default="false"
             icon="icons/objects/folder.png"
-            id="org.txm.rcpapplication.editors.internal.InternalViewEditor"
+            id="org.txm.rcp.editors.internal.InternalViewEditor"
             name="%editor.name.17">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.internal.InternalViewEditor"
+            class="org.txm.rcp.editors.internal.InternalViewEditor"
             default="false"
             icon="icons/functions/InternalView.png"
-            id="org.txm.rcpapplication.editors.TableEditor"
+            id="org.txm.rcp.editors.TableEditor"
             name="%editor.name.19">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.TXMWebBrowserEditor"
+            class="org.txm.rcp.editors.TXMWebBrowserEditor"
             default="false"
             icon="icons/objects/world.png"
-            id="org.txm.rcpapplication.editors.TXMWebBrowserEditor"
+            id="org.txm.rcp.editors.TXMWebBrowserEditor"
             name="%editor.name.22">
       </editor>
       <editor
@@ -330,107 +330,107 @@
             name="%editor.name.23">
       </editor>
       <editor
-            class="org.txm.rcpapplication.editors.TableEditor"
+            class="org.txm.rcp.editors.TableEditor"
             default="false"
             icon="icons/index.png"
-            id="org.txm.rcpapplication.editors.TableEditor"
+            id="org.txm.rcp.editors.TableEditor"
             name="%editor.name.0">
       </editor>
    </extension>
    <extension
          point="org.eclipse.core.runtime.preferences">
       <initializer
-            class="org.txm.rcpapplication.preferences.CQPPreferenceInitializer">
+            class="org.txm.rcp.preferences.CQPPreferenceInitializer">
       </initializer>
       <initializer
-            class="org.txm.rcpapplication.preferences.ConcordancerPreferenceInitializer">
+            class="org.txm.rcp.preferences.ConcordancerPreferenceInitializer">
       </initializer>
       <initializer
-            class="org.txm.rcpapplication.preferences.ScriptPreferenceInitializer">
+            class="org.txm.rcp.preferences.ScriptPreferenceInitializer">
       </initializer>
    </extension>
   <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.TextometriePreferencePage"
-            class="org.txm.rcpapplication.preferences.UserPreferencePage"
-            id="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.TextometriePreferencePage"
+            class="org.txm.rcp.preferences.UserPreferencePage"
+            id="org.txm.rcp.preferences.UserPreferencePage"
             name="%page.name">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.TextometriePreferencePage"
-            class="org.txm.rcpapplication.preferences.AdvancePreferencePage"
-            id="org.txm.rcpapplication.preferences.AdvancePreferencePage"
+            category="org.txm.rcp.preferences.TextometriePreferencePage"
+            class="org.txm.rcp.preferences.AdvancePreferencePage"
+            id="org.txm.rcp.preferences.AdvancePreferencePage"
             name="%page.name.0">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
-            class="org.txm.rcpapplication.preferences.ConcordancerPreferencePage"
-            id="org.txm.rcpapplication.preferences.ConcordancerPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
+            class="org.txm.rcp.preferences.ConcordancerPreferencePage"
+            id="org.txm.rcp.preferences.ConcordancerPreferencePage"
             name="%page.name.1"/>
       <page
-            category="org.txm.rcpapplication.preferences.AdvancePreferencePage"
-            class="org.txm.rcpapplication.preferences.CQPPreferencePage"
-            id="org.txm.rcpapplication.preferences.CQPPreferencePage"
+            category="org.txm.rcp.preferences.AdvancePreferencePage"
+            class="org.txm.rcp.preferences.CQPPreferencePage"
+            id="org.txm.rcp.preferences.CQPPreferencePage"
             name="%page.name.4">
       </page>
       <page
-            class="org.txm.rcpapplication.preferences.TXMPreferencePage"
-            id="org.txm.rcpapplication.preferences.TextometriePreferencePage"
+            class="org.txm.rcp.preferences.TXMMainPreferencePage"
+            id="org.txm.rcp.preferences.TextometriePreferencePage"
             name="%page.name.6">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.NLPPreferencePage"
-            class="org.txm.rcpapplication.preferences.TreeTaggerPreferencePage"
-            id="org.txm.rcpapplication.preferences.TreeTaggerPreferencePage"
+            category="org.txm.rcp.preferences.NLPPreferencePage"
+            class="org.txm.rcp.preferences.TreeTaggerPreferencePage"
+            id="org.txm.rcp.preferences.TreeTaggerPreferencePage"
             name="%page.name.7">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.AdvancePreferencePage"
-            class="org.txm.rcpapplication.preferences.NLPPreferencePage"
-            id="org.txm.rcpapplication.preferences.NLPPreferencePage"
+            category="org.txm.rcp.preferences.AdvancePreferencePage"
+            class="org.txm.rcp.preferences.NLPPreferencePage"
+            id="org.txm.rcp.preferences.NLPPreferencePage"
             name="%page.name.8">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
-            class="org.txm.rcpapplication.preferences.ScriptPreferencePage"
-            id="org.txm.rcpapplication.preferences.ScriptPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
+            class="org.txm.rcp.preferences.ScriptPreferencePage"
+            id="org.txm.rcp.preferences.ScriptPreferencePage"
             name="%page.name.18">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
-            class="org.txm.rcpapplication.preferences.DiagnosticPreferencePage"
-            id="org.txm.rcpapplication.preferences.DiagnosticPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
+            class="org.txm.rcp.preferences.DiagnosticPreferencePage"
+            id="org.txm.rcp.preferences.DiagnosticPreferencePage"
             name="%page.name.9">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
-            class="org.txm.rcpapplication.preferences.ExportPreferencePage"
-            id="org.txm.rcpapplication.preferences.ExportPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
+            class="org.txm.rcp.preferences.ExportPreferencePage"
+            id="org.txm.rcp.preferences.ExportPreferencePage"
             name="%page.name.12">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
-            class="org.txm.rcpapplication.preferences.ReferencerPreferencePage"
-            id="org.txm.rcpapplication.preferences.ReferencerPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
+            class="org.txm.rcp.preferences.ReferencerPreferencePage"
+            id="org.txm.rcp.preferences.ReferencerPreferencePage"
             name="%page.name.16">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
-            class="org.txm.rcpapplication.preferences.FileExplorerPreferencePage"
-            id="org.txm.rcpapplication.preferences.FileExplorerPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
+            class="org.txm.rcp.preferences.FileExplorerPreferencePage"
+            id="org.txm.rcp.preferences.FileExplorerPreferencePage"
             name="%page.name.2">
       </page>
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
-            class="org.txm.rcpapplication.preferences.ImportPreferencePage"
-            id="org.txm.rcpapplication.preferences.ImportPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
+            class="org.txm.rcp.preferences.ImportPreferencePage"
+            id="org.txm.rcp.preferences.ImportPreferencePage"
             name="%page.name.19">
 	</page>
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
-            class="org.txm.rcpapplication.preferences.AnnotationPreferencePage"
-            id="org.txm.rcpapplication.preferences.AnnotationPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
+            class="org.txm.rcp.preferences.AnnotationPreferencePage"
+            id="org.txm.rcp.preferences.AnnotationPreferencePage"
             name="%page.name.23">
       </page>
    </extension>
@@ -442,35 +442,35 @@
                id="menu.file"
                label="%menu.label">
             <separator
-                  name="org.txm.rcpapplication.separator2"
+                  name="org.txm.rcp.separator2"
                   visible="true">
             </separator>
             <menu
                   id="menu.file.import"
                   label="%menu.label.0">
                <command
-                     commandId="org.txm.rcpapplication.commands.ImportSelectedText"
+                     commandId="org.txm.rcp.commands.ImportSelectedText"
                      label="%command.label.60"
                      style="push"
                      tooltip="%command.tooltip.27">
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.78"
                      style="push"
                      tooltip="%command.tooltip.45">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="quickLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.87"
                      style="push"
                      tooltip="%command.tooltip.66">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="docLoader.groovy">
                   </parameter>
                </command>
@@ -479,82 +479,82 @@
                      visible="true">
                </separator>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.1"
                      style="push"
                      tooltip="%command.tooltip.44">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="xmlLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.92"
                      style="push"
                      tooltip="%command.tooltip.88">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="xtzLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.5"
                      style="push"
                      tooltip="%command.tooltip.8">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="bfmLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.9"
                      style="push"
                      tooltip="%command.tooltip.9">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="frantextLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.12"
                      style="push"
                      tooltip="%command.tooltip.11">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="xmltxmLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.3"
                      style="push"
                      tooltip="%command.tooltip.5">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="transcriberLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.2"
                      style="push"
                      tooltip="%command.tooltip.1">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="factivaLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.81"
                      style="push"
                      tooltip="%command.tooltip.24">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="tmxLoader.groovy">
                   </parameter>
                </command>
@@ -563,58 +563,58 @@
                      visible="true">
                </separator>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.64"
                      style="push"
                      tooltip="%command.tooltip.22">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="factivamailLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.0"
                      style="push"
                      tooltip="%command.tooltip.28">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="discoursLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.62"
                      style="push"
                      tooltip="%command.tooltip.30">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="alcesteLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.61"
                      style="push"
                      tooltip="%command.tooltip.29">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="hyperbaseLoader.groovy">
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.ExecuteScriptImport"
+                     commandId="org.txm.rcp.commands.ExecuteScriptImport"
                      label="%command.label.82"
                      style="push"
                      tooltip="%command.tooltip.25">
                   <parameter
-                        name="org.txm.rcpapplication.commands.commandParameter3"
+                        name="org.txm.rcp.commands.commandParameter3"
                         value="wtcLoader.groovy">
                   </parameter>
                </command>
             </menu>
             <command
-                  commandId="org.txm.rcpapplication.commands.workspace.AddBase"
+                  commandId="org.txm.rcp.commands.workspace.AddBase"
                   label="%command.label.50"
                   style="push">
             </command>
@@ -623,7 +623,7 @@
                   id="menu.file.export"
                   label="%menu.label.5">
                <command
-                     commandId="org.txm.rcpapplication.commands.base.ExportCorpus"
+                     commandId="org.txm.rcp.commands.base.ExportCorpus"
                      icon="icons/functions/Compress.png"
                      label="%command.name.52"
                      style="push"
@@ -636,7 +636,7 @@
                   </visibleWhen>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.annotation.ExportStandoff"
+                     commandId="org.txm.rcp.commands.annotation.ExportStandoff"
                      id="menu.file.export.exporttei"
                      label="%command.label.193"
                      style="push">
@@ -648,7 +648,7 @@
                   </visibleWhen>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.function.ExportResult"
+                     commandId="org.txm.rcp.commands.function.ExportResult"
                      icon="icons/functions/export_data.png"
                      label="%command.label.51"
                      style="push">
@@ -692,7 +692,7 @@
                   </visibleWhen>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.function.ExportSVG"
+                     commandId="org.txm.rcp.commands.function.ExportSVG"
                      icon="icons/functions/exportSVG.png"
                      label="%command.label.101"
                      style="push"
@@ -721,12 +721,12 @@
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.commands.CreateFile"
+                  commandId="org.txm.rcp.commands.CreateFile"
                   icon="icons/functions/page_white_add.png"
                   label="%command.label.83">
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.EditFile"
+                  commandId="org.txm.rcp.commands.EditFile"
                   icon="icons/functions/open.png"
                   id="file.open"
                   label="%command.label.45"
@@ -743,7 +743,7 @@
                   label="%command.label.88">
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.editor.SaveAs"
+                  commandId="org.txm.rcp.commands.editor.SaveAs"
                   icon="icons/functions/saveas.png"
                   label="%command.label.29">
                <visibleWhen
@@ -766,7 +766,7 @@
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenBrowser"
+                  commandId="org.txm.rcp.commands.OpenBrowser"
                   label="%command.label"
                   style="push"
                   tooltip="%command.tooltip">
@@ -776,7 +776,7 @@
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.commands.changelanguage"
+                  commandId="org.txm.rcp.commands.changelanguage"
                   label="%command.label.75"
                   style="push"
                   tooltip="%command.tooltip.42">
@@ -786,7 +786,7 @@
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.p2.plugins.TXMUpdateHandler"
+                  commandId="org.txm.rcp.p2.plugins.TXMUpdateHandler"
                   label="%command.label.181"
                   style="push">
                <visibleWhen
@@ -797,7 +797,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.p2.plugins.InstallPluginHandler"
+                  commandId="org.txm.rcp.p2.plugins.InstallPluginHandler"
                   label="%command.label.182"
                   style="push">
                <visibleWhen
@@ -819,11 +819,11 @@
                </visibleWhen>
             </command>
             <separator
-                  name="org.txm.rcpapplication.separator1"
+                  name="org.txm.rcp.separator1"
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.commands.RestartTXM"
+                  commandId="org.txm.rcp.commands.RestartTXM"
                   label="%command.label.59"
                   style="push"
                   tooltip="%command.tooltip.26">
@@ -999,7 +999,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.editor.SetEncoding"
+                  commandId="org.txm.rcp.commands.editor.SetEncoding"
                   icon="icons/functions/encoding.png"
                   label="%command.label.30">
                <visibleWhen
@@ -1054,9 +1054,9 @@
          <menu
                id="menu.corpus"
                label="%menu.label.1"
-               sibling_order="&lt;command&#x0A;                  commandId=&quot;org.txm.rcpapplication.commands.function.ComputeConcordance&quot;&#x0A;                  icon=&quot;icons/functions/Concordances.png&quot;&#x0A;                  label=&quot;%command.label.11&quot;&#x0A;                  style=&quot;push&quot;&#x0A;                  tooltip=&quot;%command.tooltip.7&quot;&gt;&#x0A;               &lt;visibleWhen&#x0A;                     checkEnabled=&quot;false&quot;&gt;&#x0A;                  &lt;reference&#x0A;                        definitionId=&quot;OneCorpusSelected&quot;&gt;&#x0A;                  &lt;/reference&gt;&#x0A;               &lt;/visibleWhen&gt;&#x0A;            &lt;/command&gt;">
+               sibling_order="&lt;command&#x0A;                  commandId=&quot;org.txm.rcp.commands.function.ComputeConcordance&quot;&#x0A;                  icon=&quot;icons/functions/Concordances.png&quot;&#x0A;                  label=&quot;%command.label.11&quot;&#x0A;                  style=&quot;push&quot;&#x0A;                  tooltip=&quot;%command.tooltip.7&quot;&gt;&#x0A;               &lt;visibleWhen&#x0A;                     checkEnabled=&quot;false&quot;&gt;&#x0A;                  &lt;reference&#x0A;                        definitionId=&quot;OneCorpusSelected&quot;&gt;&#x0A;                  &lt;/reference&gt;&#x0A;               &lt;/visibleWhen&gt;&#x0A;            &lt;/command&gt;">
             <command
-                  commandId="org.txm.rcpapplication.commands.base.Diagnostique"
+                  commandId="org.txm.rcp.commands.base.Diagnostique"
                   icon="icons/functions/diagnostique.png"
                   id="menu.corpus.description"
                   label="%command.label.48"
@@ -1070,7 +1070,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ComputeInternalView"
+                  commandId="org.txm.rcp.commands.function.ComputeInternalView"
                   icon="icons/functions/InternalView.png"
                   label="%command.label.176"
                   style="push"
@@ -1083,7 +1083,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.base.DeleteInCorpora"
+                  commandId="org.txm.rcp.commands.base.DeleteInCorpora"
                   icon="icons/functions/Delete.png"
                   label="%command.label.65"
                   style="push"
@@ -1143,7 +1143,7 @@
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.commands.base.CreateSubCorpus"
+                  commandId="org.txm.rcp.commands.base.CreateSubCorpus"
                   icon="icons/functions/SubCorpus.png"
                   label="%command.label.7"
                   style="push"
@@ -1156,7 +1156,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.base.CreatePartition"
+                  commandId="org.txm.rcp.commands.base.CreatePartition"
                   icon="icons/functions/Partition.png"
                   label="%command.label.8"
                   style="push"
@@ -1169,7 +1169,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.annotation.SaveAnnotations"
+                  commandId="org.txm.rcp.commands.annotation.SaveAnnotations"
                   icon="icons/functions/save.png"
                   label="%command.label.111"
                   style="push">
@@ -1185,7 +1185,7 @@
                id="menu.tools"
                label="%menu.label.6">
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ComputeConcordance"
+                  commandId="org.txm.rcp.commands.function.ComputeConcordance"
                   icon="icons/functions/Concordances.png"
                   label="%command.label.11"
                   style="push"
@@ -1199,7 +1199,7 @@
             </command>
             
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ComputeReferencer"
+                  commandId="org.txm.rcp.commands.function.ComputeReferencer"
                   icon="icons/functions/Referencer.png"
                   label="%command.label.108"
                   style="push"
@@ -1240,7 +1240,7 @@
                      style="push">
                   <parameter
                         name="org.eclipse.ui.views.showView.viewId"
-                        value="org.txm.rcpapplication.views.CorporaView">
+                        value="org.txm.rcp.views.CorporaView">
                   </parameter>
                </command>
                <command
@@ -1249,7 +1249,7 @@
                      style="push">
                   <parameter
                         name="org.eclipse.ui.views.showView.viewId"
-                        value="org.txm.rcpapplication.views.fileexplorer.Explorer">
+                        value="org.txm.rcp.views.fileexplorer.Explorer">
                   </parameter>
                </command>
                <command
@@ -1258,7 +1258,7 @@
                      style="push">
                   <parameter
                         name="org.eclipse.ui.views.showView.viewId"
-                        value="org.txm.rcpapplication.views.fileexplorer.MacroExplorer">
+                        value="org.txm.rcp.views.fileexplorer.MacroExplorer">
                   </parameter>
                </command>
                <command
@@ -1267,7 +1267,7 @@
                      style="push">
                   <parameter
                         name="org.eclipse.ui.views.showView.viewId"
-                        value="org.txm.rcpapplication.views.QueriesView">
+                        value="org.txm.rcp.views.QueriesView">
                   </parameter>
                </command>
                <command
@@ -1280,7 +1280,7 @@
                   </parameter>
                </command>
                <command
-                     commandId="org.txm.rcpapplication.commands.krview.OpenKRView"
+                     commandId="org.txm.rcp.commands.krview.OpenKRView"
                      label="%command.label.150"
                      style="push">
                </command>
@@ -1298,7 +1298,7 @@
                      style="push">
                   <parameter
                         name="org.eclipse.ui.perspectives.showPerspective.perspectiveId"
-                        value="org.txm.rcpapplication.perspective.TXMPerspective">
+                        value="org.txm.rcp.perspective.TXMPerspective">
                   </parameter>
                </command>
                <command
@@ -1307,12 +1307,12 @@
                      style="push">
                   <parameter
                         name="org.eclipse.ui.perspectives.showPerspective.perspectiveId"
-                        value="org.txm.rcpapplication.perspective.RPerspective">
+                        value="org.txm.rcp.perspective.RPerspective">
                   </parameter>
                </command>
             </menu>
             <command
-                  commandId="org.txm.rcpapplication.commands.CleanPerspective"
+                  commandId="org.txm.rcp.commands.CleanPerspective"
                   style="push">
             </command>
             <command
@@ -1325,7 +1325,7 @@
                label="%menu.label.2"
                tooltip="%menu.tooltip">
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenWelcomePage"
+                  commandId="org.txm.rcp.commands.OpenWelcomePage"
                   label="%command.label.173"
                   style="push">
             </command>
@@ -1339,34 +1339,34 @@
                   style="push">
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.R.ShowSvgHelp"
+                  commandId="org.txm.rcp.commands.R.ShowSvgHelp"
                   label="%command.label.141"
                   style="push"
                   tooltip="%command.tooltip.83">
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.68"
                   style="push"
                   tooltip="%command.tooltip.23">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="refman">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenManual"
+                  commandId="org.txm.rcp.commands.OpenManual"
                   label="%command.label.63"
                   style="push"
                   tooltip="%command.tooltip.64">
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.33"
                   style="push"
                   tooltip="%command.tooltip.13">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="macros">
                </parameter>
             </command>
@@ -1375,51 +1375,51 @@
                   label="%menu.label.4">
             </menu>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.70"
                   style="push">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="sf_docs">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.178"
                   style="push"
                   tooltip="%command.tooltip.41">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="faq">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.35"
                   style="push"
                   tooltip="%command.tooltip.43">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="txm-users wiki">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.55"
                   style="push"
                   tooltip="%command.tooltip">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="mailinglist">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.76"
                   style="push"
                   tooltip="%command.tooltip.65">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="http://webchat.freenode.net/?channels=txm">
                </parameter>
             </command>
@@ -1428,30 +1428,30 @@
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.56"
                   style="push"
                   tooltip="%command.tooltip">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="sf">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.69"
                   style="push">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="textometrie">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.72"
                   style="push">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="textometrie_docs">
                </parameter>
             </command>
@@ -1460,42 +1460,42 @@
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.67"
                   style="push"
                   tooltip="%command.tooltip">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="treetagger">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.53"
                   style="push"
                   tooltip="%command.tooltip">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="bug">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.54"
                   style="push"
                   tooltip="%command.tooltip">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="feature">
                </parameter>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+                  commandId="org.txm.rcp.commands.OpenLocalizedWebPage"
                   label="%command.label.179"
                   style="push"
                   tooltip="%command.tooltip.47">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter3"
+                     name="org.txm.rcp.commands.commandParameter3"
                      value="contrib">
                </parameter>
             </command>
@@ -1528,9 +1528,9 @@
             allPopups="true"
             locationURI="toolbar:org.eclipse.ui.main.toolbar">
          <toolbar
-               id="org.txm.rcpapplication.toolbarcorpus">
+               id="org.txm.rcp.toolbarcorpus">
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ExportResult"
+                  commandId="org.txm.rcp.commands.function.ExportResult"
                   icon="icons/functions/export_data.png"
                   label="%command.label.51"
                   style="push">
@@ -1574,7 +1574,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ExportSVG"
+                  commandId="org.txm.rcp.commands.function.ExportSVG"
                   icon="icons/functions/exportSVG.png"
                   label="%command.label.101"
                   style="push"
@@ -1598,13 +1598,13 @@
                </visibleWhen>
             </command>
             <separator
-                  name="org.txm.rcpapplication.separator1"
+                  name="org.txm.rcp.separator1"
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.commands.base.Diagnostique"
+                  commandId="org.txm.rcp.commands.base.Diagnostique"
                   icon="icons/functions/diagnostique.png"
-                  id="org.txm.rcpapplication.toolbarcorpus.description"
+                  id="org.txm.rcp.toolbarcorpus.description"
                   label="%command.label.48"
                   style="push"
                   tooltip="%command.tooltip.60">
@@ -1616,7 +1616,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ComputeInternalView"
+                  commandId="org.txm.rcp.commands.function.ComputeInternalView"
                   icon="icons/functions/InternalView.png"
                   label="%command.label.183"
                   style="push"
@@ -1629,7 +1629,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.base.DeleteInCorpora"
+                  commandId="org.txm.rcp.commands.base.DeleteInCorpora"
                   icon="icons/functions/Delete.png"
                   label="%command.label.65"
                   style="push"
@@ -1665,11 +1665,11 @@
                </visibleWhen>
             </command>
             <separator
-                  name="org.txm.rcpapplication.separator4"
+                  name="org.txm.rcp.separator4"
                   visible="true">
             </separator>
             <command
-                  commandId="org.txm.rcpapplication.commands.base.CreateSubCorpus"
+                  commandId="org.txm.rcp.commands.base.CreateSubCorpus"
                   icon="icons/functions/SubCorpus.png"
                   label="%command.label.7"
                   style="push"
@@ -1682,7 +1682,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.base.CreatePartition"
+                  commandId="org.txm.rcp.commands.base.CreatePartition"
                   icon="icons/functions/Partition.png"
                   label="%command.label.8"
                   style="push"
@@ -1695,7 +1695,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.annotation.SaveAnnotations"
+                  commandId="org.txm.rcp.commands.annotation.SaveAnnotations"
                   icon="icons/functions/save.png"
                   label="%command.label.151"
                   style="push">
@@ -1712,9 +1712,9 @@
                visible="true">
          </separator>
          <toolbar
-               id="org.txm.rcpapplication.toolbartools">
+               id="org.txm.rcp.toolbartools">
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ComputeConcordance"
+                  commandId="org.txm.rcp.commands.function.ComputeConcordance"
                   icon="icons/functions/Concordances.png"
                   label="%command.label.11"
                   style="push"
@@ -1727,7 +1727,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ComputeReferencer"
+                  commandId="org.txm.rcp.commands.function.ComputeReferencer"
                   icon="icons/functions/Referencer.png"
                   label="%command.label.108"
                   style="push"
@@ -1744,7 +1744,7 @@
                   visible="true">
             </separator>
             <separator
-                  name="org.txm.rcpapplication.separator1">
+                  name="org.txm.rcp.separator1">
             </separator>
             <command
                   commandId="org.eclipse.ui.window.preferences"
@@ -1759,20 +1759,20 @@
                visible="true">
          </separator>
          <toolbar
-               id="org.txm.rcpapplication.toolbartext">
+               id="org.txm.rcp.toolbartext">
             <command
-                  commandId="org.txm.rcpapplication.commands.CreateFile"
+                  commandId="org.txm.rcp.commands.CreateFile"
                   icon="icons/functions/page_white_add.png"
                   label="%command.label.158"
                   tooltip="%command.tooltip.34">
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.EditFile"
+                  commandId="org.txm.rcp.commands.EditFile"
                   icon="icons/functions/open.png"
                   label="%command.label.45"
                   style="push">
                <parameter
-                     name="org.txm.rcpapplication.commands.commandParameter2"
+                     name="org.txm.rcp.commands.commandParameter2"
                      value=" ">
                </parameter>
             </command>
@@ -1788,7 +1788,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.editor.SaveAs"
+                  commandId="org.txm.rcp.commands.editor.SaveAs"
                   icon="icons/functions/saveas.png">
                <visibleWhen
                      checkEnabled="false">
@@ -1989,7 +1989,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.editor.SetEncoding"
+                  commandId="org.txm.rcp.commands.editor.SetEncoding"
                   icon="icons/functions/encoding.png"
                   label="%command.label.30">
                <visibleWhen
@@ -2017,9 +2017,9 @@
                visible="true">
          </separator>
          <toolbar
-               id="org.txm.rcpapplication.toolbarscript">
+               id="org.txm.rcp.toolbarscript">
             <command
-                  commandId="org.txm.rcpapplication.commands.R.OpenEmptyEditor"
+                  commandId="org.txm.rcp.commands.R.OpenEmptyEditor"
                   label="%command.label.142"
                   style="push"
                   tooltip="%command.tooltip.84">
@@ -2031,7 +2031,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.ExecuteScript"
+                  commandId="org.txm.rcp.commands.ExecuteScript"
                   icon="icons/functions/run.png"
                   label="%command.label.170"
                   style="push"
@@ -2044,7 +2044,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.ExecuteText"
+                  commandId="org.txm.rcp.commands.ExecuteText"
                   icon="icons/functions/page_select_go.png"
                   label="%command.label.171"
                   style="push"
@@ -2057,7 +2057,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.ExecuteScriptGroovyFromFile"
+                  commandId="org.txm.rcp.commands.ExecuteScriptGroovyFromFile"
                   icon="icons/functions/page_go.png"
                   label="%command.label.172"
                   style="push"
@@ -2070,7 +2070,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.ExecuteLastGroovyScript"
+                  commandId="org.txm.rcp.commands.ExecuteLastGroovyScript"
                   icon="icons/functions/rerun.png"
                   label="%command.label.40"
                   style="push"
@@ -2082,9 +2082,9 @@
                visible="true">
          </separator>
           <toolbar
-               id="org.txm.rcpapplication.toolbarfile">
+               id="org.txm.rcp.toolbarfile">
             <command
-                  commandId="org.txm.rcpapplication.commands.base.ExportCorpus"
+                  commandId="org.txm.rcp.commands.base.ExportCorpus"
                   icon="icons/functions/Compress.png"
                   label="%command.name.52"
                   style="push"
@@ -2099,9 +2099,9 @@
          </toolbar>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.fileexplorer.Explorer">
+            locationURI="popup:org.txm.rcp.views.fileexplorer.Explorer">
          <command
-               commandId="org.txm.rcpapplication.commands.CreateFile"
+               commandId="org.txm.rcp.commands.CreateFile"
                label="%command.label.122"
                style="push"
                tooltip="%command.tooltip.75">
@@ -2113,7 +2113,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.CreateFolder"
+               commandId="org.txm.rcp.commands.CreateFolder"
                label="%command.label.123"
                style="push"
                tooltip="%command.tooltip.76">
@@ -2125,7 +2125,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.EditSelectedFile"
+               commandId="org.txm.rcp.commands.EditSelectedFile"
                label="%command.label.186"
                style="push"
                tooltip="%command.tooltip.17">
@@ -2137,7 +2137,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.OpenBrowser"
+               commandId="org.txm.rcp.commands.OpenBrowser"
                label="%command.label.22"
                style="push"
                tooltip="%command.tooltip.18">
@@ -2149,7 +2149,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.ExecuteScript"
+               commandId="org.txm.rcp.commands.ExecuteScript"
                label="%command.label.23"
                style="push"
                tooltip="%command.tooltip.19">
@@ -2161,11 +2161,11 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.ShowSelected"
+               commandId="org.txm.rcp.commands.ShowSelected"
                style="push">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.RenameFile"
+               commandId="org.txm.rcp.commands.RenameFile"
                style="push">
             <visibleWhen
                   checkEnabled="false">
@@ -2175,7 +2175,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.DeleteFile"
+               commandId="org.txm.rcp.commands.DeleteFile"
                style="push"
                tooltip="%command.tooltip.15">
             <visibleWhen
@@ -2186,7 +2186,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.CopyFile"
+               commandId="org.txm.rcp.commands.CopyFile"
                style="push"
                tooltip="%command.tooltip.16">
             <visibleWhen
@@ -2197,7 +2197,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.CutFile"
+               commandId="org.txm.rcp.commands.CutFile"
                style="push"
                tooltip="%command.tooltip.20">
             <visibleWhen
@@ -2208,7 +2208,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.PasteFile"
+               commandId="org.txm.rcp.commands.PasteFile"
                style="push"
                tooltip="%command.tooltip.21">
             <visibleWhen
@@ -2224,30 +2224,30 @@
          <menu
                label="%menu.label.10">
             <command
-                  commandId="org.txm.rcpapplication.commands.ExecuteGroovyText"
+                  commandId="org.txm.rcp.commands.ExecuteGroovyText"
                   label="%command.label.25"
                   style="push">
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.ExecuteScriptGroovy"
+                  commandId="org.txm.rcp.commands.ExecuteScriptGroovy"
                   label="%command.label.26"
                   style="push">
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.ExecuteScriptGroovyFromFile"
+                  commandId="org.txm.rcp.commands.ExecuteScriptGroovyFromFile"
                   label="%command.label.156"
                   style="push">
             </command>
          </menu>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <menu
                icon="icons/functions/export.png"
                id="corporaview.menu.file.export"
                label="%menu.label.5">
             <command
-                  commandId="org.txm.rcpapplication.commands.base.ExportCorpus"
+                  commandId="org.txm.rcp.commands.base.ExportCorpus"
                   icon="icons/functions/Compress.png"
                   label="%command.name.52"
                   style="push"
@@ -2260,7 +2260,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.annotation.ExportStandoff"
+                  commandId="org.txm.rcp.commands.annotation.ExportStandoff"
                   label="%command.label.193"
                   style="push">
                <visibleWhen
@@ -2271,7 +2271,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ExportResult"
+                  commandId="org.txm.rcp.commands.function.ExportResult"
                   icon="icons/functions/export_data.png"
                   label="%command.label.51"
                   style="push">
@@ -2315,7 +2315,7 @@
                </visibleWhen>
             </command>
             <command
-                  commandId="org.txm.rcpapplication.commands.function.ExportSVG"
+                  commandId="org.txm.rcp.commands.function.ExportSVG"
                   icon="icons/functions/exportSVG.png"
                   label="%command.label.101"
                   style="push"
@@ -2340,7 +2340,7 @@
             </command>
          </menu>
          <command
-               commandId="org.txm.rcpapplication.commands.base.Diagnostique"
+               commandId="org.txm.rcp.commands.base.Diagnostique"
                icon="icons/functions/diagnostique.png"
                id="corporaview.description"
                label="%command.label.49"
@@ -2354,7 +2354,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeInternalView"
+               commandId="org.txm.rcp.commands.function.ComputeInternalView"
                icon="icons/functions/InternalView.png"
                label="%command.label.185"
                style="push"
@@ -2367,7 +2367,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.base.DeleteInCorpora"
+               commandId="org.txm.rcp.commands.base.DeleteInCorpora"
                icon="icons/functions/Delete.png"
                label="%command.label.65"
                style="push"
@@ -2403,11 +2403,11 @@
             </visibleWhen>
          </command>
          <separator
-               name="org.txm.rcpapplication.separator52"
+               name="org.txm.rcp.separator52"
                visible="true">
          </separator>
          <command
-               commandId="org.txm.rcpapplication.commands.base.CreateSubCorpus"
+               commandId="org.txm.rcp.commands.base.CreateSubCorpus"
                icon="icons/functions/SubCorpus.png"
                label="%command.label.7"
                style="push"
@@ -2420,7 +2420,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.base.CreatePartition"
+               commandId="org.txm.rcp.commands.base.CreatePartition"
                icon="icons/functions/Partition.png"
                label="%command.label.8"
                style="push"
@@ -2434,11 +2434,11 @@
          </command>
         
          <separator
-               name="org.txm.rcpapplication.separator53"
+               name="org.txm.rcp.separator53"
                visible="true">
          </separator>
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeConcordance"
+               commandId="org.txm.rcp.commands.function.ComputeConcordance"
                icon="icons/functions/Concordances.png"
                label="%command.label.11"
                style="push"
@@ -2451,7 +2451,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.function.ComputeReferencer"
+               commandId="org.txm.rcp.commands.function.ComputeReferencer"
                icon="icons/functions/Referencer.png"
                label="%command.label.108"
                style="push"
@@ -2464,15 +2464,15 @@
             </visibleWhen>
          </command>
          <separator
-               name="org.txm.rcpapplication.separator54"
+               name="org.txm.rcp.separator54"
                visible="true">
          </separator>
          <separator
-               name="org.txm.rcpapplication.separator55"
+               name="org.txm.rcp.separator55"
                visible="true">
          </separator>
          <command
-               commandId="org.txm.rcpapplication.commands.annotation.SaveAnnotations"
+               commandId="org.txm.rcp.commands.annotation.SaveAnnotations"
                icon="icons/functions/save.png"
                label="%command.label.154"
                style="push">
@@ -2485,7 +2485,7 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.BasesView">
+            locationURI="popup:org.txm.rcp.views.BasesView">
          <command
                commandId="HIDEorg.txm.rcp2.commands.workspace.AddProject"
                label="%command.label.36"
@@ -2498,7 +2498,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.workspace.AddBase"
+               commandId="org.txm.rcp.commands.workspace.AddBase"
                label="%command.label.37"
                style="push">
             <visibleWhen
@@ -2509,10 +2509,10 @@
             </visibleWhen>
          </command>       
          <separator
-               name="org.txm.rcpapplication.separator1">
+               name="org.txm.rcp.separator1">
          </separator>
          <command
-               commandId="org.txm.rcpapplication.commands.base.DeleteInCorpora"
+               commandId="org.txm.rcp.commands.base.DeleteInCorpora"
                icon="icons/functions/Delete.png"
                label="%command.label.65"
                style="push"
@@ -2551,7 +2551,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.base.OpenBiblio"
+               commandId="org.txm.rcp.commands.base.OpenBiblio"
                icon="icons/functions/Biblio.png"
                label="%command.label.148"
                style="push"
@@ -2570,35 +2570,35 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.index.IndexEditor">
+            locationURI="popup:org.txm.rcp.editors.index.IndexEditor">
          <command
-               commandId="org.txm.rcpapplication.commands.link.IndexToConcordance"
+               commandId="org.txm.rcp.commands.link.IndexToConcordance"
                label="%command.label.73"
                style="push">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.link.IndexToCooccurrence"
+               commandId="org.txm.rcp.commands.link.IndexToCooccurrence"
                label="%command.label.149"
                style="push">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.link.IndexToProgression"
+               commandId="org.txm.rcp.commands.link.IndexToProgression"
                label="%command.label.99"
                style="push">
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.TableEditor">
+            locationURI="popup:org.txm.rcp.editors.TableEditor">
          <command
-               commandId="org.txm.rcpapplication.commands.link.TextToConcordance"
+               commandId="org.txm.rcp.commands.link.TextToConcordance"
                label="%command.label.74"
                style="push">
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.SVGGraphicEditor">
+            locationURI="popup:org.txm.rcp.editors.SVGGraphicEditor">
          <command
-               commandId="org.txm.rcpapplication.commands.function.ExportSVG"
+               commandId="org.txm.rcp.commands.function.ExportSVG"
                label="%command.label.101"
                style="push"
                tooltip="%command.tooltip.60">
@@ -2611,43 +2611,43 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.cooccurrences.CooccurrencesEditor">
+            locationURI="popup:org.txm.rcp.editors.cooccurrences.CooccurrencesEditor">
          <command
-               commandId="org.txm.rcpapplication.commands.link.CooccurrencesToConcordances"
+               commandId="org.txm.rcp.commands.link.CooccurrencesToConcordances"
                label="%command.label.102"
                style="push">
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.dictionnary.DictionnaryEditor">
+            locationURI="popup:org.txm.rcp.editors.dictionnary.DictionnaryEditor">
          <command
-               commandId="org.txm.rcpapplication.commands.link.IndexToConcordance"
+               commandId="org.txm.rcp.commands.link.IndexToConcordance"
                label="%command.label.73"
                style="push">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.link.LexiconToIndex"
+               commandId="org.txm.rcp.commands.link.LexiconToIndex"
                label="%command.label.128"
                style="push">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.link.IndexToProgression"
+               commandId="org.txm.rcp.commands.link.IndexToProgression"
                label="%command.label.103"
                style="push">
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.referencer.ReferencerEditor">
+            locationURI="popup:org.txm.rcp.editors.referencer.ReferencerEditor">
          <command
-               commandId="org.txm.rcpapplication.commands.link.ReferencerToConc"
+               commandId="org.txm.rcp.commands.link.ReferencerToConc"
                label="%command.label.73"
                style="push">
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.QueriesView">
+            locationURI="popup:org.txm.rcp.views.QueriesView">
          <command
-               commandId="org.txm.rcpapplication.commands.queryview.Copy"
+               commandId="org.txm.rcp.commands.queryview.Copy"
                label="%command.label.129"
                style="push"
                tooltip="%command.tooltip.81">
@@ -2659,7 +2659,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.queryview.Paste"
+               commandId="org.txm.rcp.commands.queryview.Paste"
                label="%command.label.130"
                style="push"
                tooltip="%command.tooltip.82">
@@ -2671,7 +2671,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.base.DeleteInCorpora"
+               commandId="org.txm.rcp.commands.base.DeleteInCorpora"
                icon="icons/functions/Delete.png"
                label="%command.label.65"
                style="push"
@@ -2685,36 +2685,36 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.RVariablesView">
+            locationURI="popup:org.txm.rcp.views.RVariablesView">
          <command
-               commandId="org.txm.rcpapplication.commands.R.CopySelection"
+               commandId="org.txm.rcp.commands.R.CopySelection"
                label="%command.label.129"
                style="push"
                tooltip="%command.label.129">
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.internal.InternalViewEditor">
+            locationURI="popup:org.txm.rcp.editors.internal.InternalViewEditor">
          <command
-               commandId="org.txm.rcpapplication.commands.link.ToConcordance"
+               commandId="org.txm.rcp.commands.link.ToConcordance"
                label="%command.label.73"
                style="push">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.link.ToIndex"
+               commandId="org.txm.rcp.commands.link.ToIndex"
                label="%command.label.77"
                style="push">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.link.ToProgression"
+               commandId="org.txm.rcp.commands.link.ToProgression"
                label="%command.label.99"
                style="push">
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.fileexplorer.MacroExplorer">
+            locationURI="popup:org.txm.rcp.views.fileexplorer.MacroExplorer">
          <command
-               commandId="org.txm.rcpapplication.commands.ExecuteMacro"
+               commandId="org.txm.rcp.commands.ExecuteMacro"
                label="%command.label.23"
                style="push"
                tooltip="%command.tooltip.19">
@@ -2726,7 +2726,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.EditSelectedFile"
+               commandId="org.txm.rcp.commands.EditSelectedFile"
                label="%command.label.186"
                style="push"
                tooltip="%command.tooltip.86">
@@ -2738,7 +2738,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.CreateMacro"
+               commandId="org.txm.rcp.commands.CreateMacro"
                label="%command.label.187"
                style="push"
                tooltip="%command.tooltip.92">
@@ -2750,7 +2750,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.CreateFolder"
+               commandId="org.txm.rcp.commands.CreateFolder"
                label="%command.label.123"
                style="push"
                tooltip="%command.tooltip.76">
@@ -2762,11 +2762,11 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.ShowSelected"
+               commandId="org.txm.rcp.commands.ShowSelected"
                style="push">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.RenameFile"
+               commandId="org.txm.rcp.commands.RenameFile"
                style="push">
             <visibleWhen
                   checkEnabled="false">
@@ -2776,7 +2776,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.DeleteFile"
+               commandId="org.txm.rcp.commands.DeleteFile"
                style="push"
                tooltip="%command.tooltip.15">
             <visibleWhen
@@ -2787,7 +2787,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.CopyFile"
+               commandId="org.txm.rcp.commands.CopyFile"
                style="push"
                tooltip="%command.tooltip.16">
             <visibleWhen
@@ -2798,7 +2798,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.CutFile"
+               commandId="org.txm.rcp.commands.CutFile"
                style="push"
                tooltip="%command.tooltip.20">
             <visibleWhen
@@ -2809,7 +2809,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.PasteFile"
+               commandId="org.txm.rcp.commands.PasteFile"
                style="push"
                tooltip="%command.tooltip.21">
             <visibleWhen
@@ -2821,27 +2821,27 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.TXMBrowser">
+            locationURI="popup:org.txm.rcp.editors.TXMBrowser">
          <command
-               commandId="org.txm.rcpapplication.commands.link.TextToConcordance"
+               commandId="org.txm.rcp.commands.link.TextToConcordance"
                label="%command.label.73"
                style="push">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.editor.Copy"
+               commandId="org.txm.rcp.commands.editor.Copy"
                label="%command.label.19">
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.views.knowledgerepositories.KRView">
+            locationURI="popup:org.txm.rcp.views.knowledgerepositories.KRView">
          <command
-               commandId="org.txm.rcpapplication.commands.krview.Copy"
+               commandId="org.txm.rcp.commands.krview.Copy"
                label="%command.label.188"
                style="push"
                tooltip="%command.tooltip.89">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.krview.Reload"
+               commandId="org.txm.rcp.commands.krview.Reload"
                label="%command.label.189"
                style="push"
                tooltip="%command.tooltip.90">
@@ -2853,13 +2853,13 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.krview.Informations"
+               commandId="org.txm.rcp.commands.krview.Informations"
                label="%command.label.190"
                style="push"
                tooltip="%command.tooltip.93">
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.krview.Add"
+               commandId="org.txm.rcp.commands.krview.Add"
                label="%command.label.191"
                style="push"
                tooltip="%command.tooltip.94">
@@ -2876,7 +2876,7 @@
             </visibleWhen>
          </command>
          <command
-               commandId="org.txm.rcpapplication.commands.krview.Delete"
+               commandId="org.txm.rcp.commands.krview.Delete"
                label="%command.label.192"
                style="push"
                tooltip="%command.tooltip.95">
@@ -2894,9 +2894,9 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="popup:org.txm.rcpapplication.editors.ConcordancesEditor">
+            locationURI="popup:org.txm.rcp.editors.ConcordancesEditor">
          <command
-               commandId="org.txm.rcpapplication.commands.editor.DeleteLines"
+               commandId="org.txm.rcp.commands.editor.DeleteLines"
                label="%command.label.104"
                style="push">
          </command>
@@ -2908,36 +2908,36 @@
          point="org.eclipse.ui.commands">
       <category
             description="%category.description"
-            id="org.txm.rcpapplication.category.txm"
+            id="org.txm.rcp.category.txm"
             name="%category.name.0">
       </category>
       <command
             categoryId="org.eclipse.ui.category.edit"
-            defaultHandler="org.txm.rcpapplication.commands.EditFile"
-            id="org.txm.rcpapplication.commands.EditFile"
+            defaultHandler="org.txm.rcp.commands.EditFile"
+            id="org.txm.rcp.commands.EditFile"
             name="%command.name">
          <commandParameter
-               id="org.txm.rcpapplication.commands.commandParameter2"
+               id="org.txm.rcp.commands.commandParameter2"
                name="%commandParameter.name"
                optional="true">
          </commandParameter>
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ExecuteGroovyScript"
-            id="org.txm.rcpapplication.commands.ExecuteScriptGroovy"
+            defaultHandler="org.txm.rcp.commands.ExecuteGroovyScript"
+            id="org.txm.rcp.commands.ExecuteScriptGroovy"
             name="%command.name.0">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ExecuteGroovyText"
-            id="org.txm.rcpapplication.commands.ExecuteGroovyText"
+            defaultHandler="org.txm.rcp.commands.ExecuteGroovyText"
+            id="org.txm.rcp.commands.ExecuteGroovyText"
             name="%command.name.10">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ExecuteImportScript"
-            id="org.txm.rcpapplication.commands.ExecuteScriptImport"
+            defaultHandler="org.txm.rcp.commands.ExecuteImportScript"
+            id="org.txm.rcp.commands.ExecuteScriptImport"
             name="%command.name.22">
          <commandParameter
-               id="org.txm.rcpapplication.commands.commandParameter3"
+               id="org.txm.rcp.commands.commandParameter3"
                name="%commandParameter.name.1"
                optional="true">
          </commandParameter>
@@ -2945,274 +2945,274 @@
       
       <command
             categoryId="org.eclipse.ui.category.navigate"
-            defaultHandler="org.txm.rcpapplication.commands.OpenBrowser"
-            id="org.txm.rcpapplication.commands.OpenBrowser"
+            defaultHandler="org.txm.rcp.commands.OpenBrowser"
+            id="org.txm.rcp.commands.OpenBrowser"
             name="%command.name.8">
          <commandParameter
-               id="org.txm.rcpapplication.commands.commandParameter2"
+               id="org.txm.rcp.commands.commandParameter2"
                name="%commandParameter.name"
                optional="true">
          </commandParameter>
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ShowSelected"
-            id="org.txm.rcpapplication.commands.ShowSelected"
+            defaultHandler="org.txm.rcp.commands.ShowSelected"
+            id="org.txm.rcp.commands.ShowSelected"
             name="%command.name.9">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.RestartTXM"
+            defaultHandler="org.txm.rcp.commands.RestartTXM"
             description="%command.description"
-            id="org.txm.rcpapplication.commands.RestartTXM"
+            id="org.txm.rcp.commands.RestartTXM"
             name="%command.name.25">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.base.DeleteObject"
-            id="org.txm.rcpapplication.commands.base.DeleteInCorpora"
+            defaultHandler="org.txm.rcp.commands.base.DeleteObject"
+            id="org.txm.rcp.commands.base.DeleteInCorpora"
             name="%command.name.26">
       </command>
       
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ImportSelectedText"
-            id="org.txm.rcpapplication.commands.ImportSelectedText"
+            defaultHandler="org.txm.rcp.commands.ImportSelectedText"
+            id="org.txm.rcp.commands.ImportSelectedText"
             name="%command.name.28">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.base.OpenEdition"
-            id="org.txm.rcpapplication.commands.base.OpenEdition"
+            defaultHandler="org.txm.rcp.commands.base.OpenEdition"
+            id="org.txm.rcp.commands.base.OpenEdition"
             name="%command.name.29">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.utils.LanguageSwitchHandler"
-            id="org.txm.rcpapplication.commands.changelanguage"
+            defaultHandler="org.txm.rcp.utils.LanguageSwitchHandler"
+            id="org.txm.rcp.commands.changelanguage"
             name="%command.name.31">
       </command>
       
       <command
-            defaultHandler="org.txm.rcpapplication.commands.editor.DeleteLines"
-            id="org.txm.rcpapplication.commands.editor.DeleteLines"
+            defaultHandler="org.txm.rcp.commands.editor.DeleteLines"
+            id="org.txm.rcp.commands.editor.DeleteLines"
             name="%command.name.37">
       </command>
       
       <command
-            defaultHandler="org.txm.rcpapplication.commands.CreateFile"
-            id="org.txm.rcpapplication.commands.CreateFile"
+            defaultHandler="org.txm.rcp.commands.CreateFile"
+            id="org.txm.rcp.commands.CreateFile"
             name="%command.name.47">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.CreateFolder"
-            id="org.txm.rcpapplication.commands.CreateFolder"
+            defaultHandler="org.txm.rcp.commands.CreateFolder"
+            id="org.txm.rcp.commands.CreateFolder"
             name="%command.name.48">
       </command>
       
       <command
-            defaultHandler="org.txm.rcpapplication.commands.OpenTXMUserPreferences"
-            id="org.txm.rcpapplication.commands.OpenTXMUserPreferences"
+            defaultHandler="org.txm.rcp.commands.OpenTXMUserPreferences"
+            id="org.txm.rcp.commands.OpenTXMUserPreferences"
             name="%command.name.51">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.base.ExportCorpus"
-            id="org.txm.rcpapplication.commands.base.ExportCorpus"
+            defaultHandler="org.txm.rcp.commands.base.ExportCorpus"
+            id="org.txm.rcp.commands.base.ExportCorpus"
             name="%command.name.52">
       </command>
       
       <command
-            defaultHandler="org.txm.rcpapplication.commands.R.OpenEmptyEditor"
-            id="org.txm.rcpapplication.commands.R.OpenEmptyEditor"
+            defaultHandler="org.txm.rcp.commands.R.OpenEmptyEditor"
+            id="org.txm.rcp.commands.R.OpenEmptyEditor"
             name="%command.name.59">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.R.Submit"
-            id="org.txm.rcpapplication.commands.R.Submit"
+            defaultHandler="org.txm.rcp.commands.R.Submit"
+            id="org.txm.rcp.commands.R.Submit"
             name="%command.name.60">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.R.ShowSvgHelp"
-            id="org.txm.rcpapplication.commands.R.ShowSvgHelp"
+            defaultHandler="org.txm.rcp.commands.R.ShowSvgHelp"
+            id="org.txm.rcp.commands.R.ShowSvgHelp"
             name="%command.name.61">
       </command>
       <command
             categoryId="org.eclipse.ui.category.edit"
-            defaultHandler="org.txm.rcpapplication.commands.OpenImportForm"
-            id="org.txm.rcpapplication.commands.OpenImportForm"
+            defaultHandler="org.txm.rcp.commands.OpenImportForm"
+            id="org.txm.rcp.commands.OpenImportForm"
             name="%command.name.62">
          <commandParameter
-               id="org.txm.rcpapplication.commands.importscript"
+               id="org.txm.rcp.commands.importscript"
                name="%commandParameter.name.2"
                optional="false">
          </commandParameter>
       </command>
       <command
             categoryId="org.eclipse.ui.category.navigate"
-            defaultHandler="org.txm.rcpapplication.commands.base.OpenBiblio"
-            id="org.txm.rcpapplication.commands.base.OpenBiblio"
+            defaultHandler="org.txm.rcp.commands.base.OpenBiblio"
+            id="org.txm.rcp.commands.base.OpenBiblio"
             name="%command.name.63">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ExecuteGroovyScriptFromFile"
-            id="org.txm.rcpapplication.commands.ExecuteScriptGroovyFromFile"
+            defaultHandler="org.txm.rcp.commands.ExecuteGroovyScriptFromFile"
+            id="org.txm.rcp.commands.ExecuteScriptGroovyFromFile"
             name="%command.name.66">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.ConvertCorpus"
+            defaultHandler="org.txm.rcp.commands.workspace.ConvertCorpus"
             description="%command.description.0"
-            id="org.txm.rcpapplication.commands.workspace.ConvertCorpus"
+            id="org.txm.rcp.commands.workspace.ConvertCorpus"
             name="%command.name.3">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.PurgeCorpora"
+            defaultHandler="org.txm.rcp.commands.workspace.PurgeCorpora"
             description="%command.description.1"
-            id="org.txm.rcpapplication.commands.workspace.PurgeCorpora"
+            id="org.txm.rcp.commands.workspace.PurgeCorpora"
             name="%command.name.18">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.OpenTestEditor"
-            id="org.txm.rcpapplication.commands.OpenTestEditor"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.OpenTestEditor"
+            id="org.txm.rcp.commands.OpenTestEditor"
             name="%command.name.19">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ExecuteScript"
-            id="org.txm.rcpapplication.commands.ExecuteScript"
+            defaultHandler="org.txm.rcp.commands.ExecuteScript"
+            id="org.txm.rcp.commands.ExecuteScript"
             name="%command.name.21">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ExecuteText"
-            id="org.txm.rcpapplication.commands.ExecuteText"
+            defaultHandler="org.txm.rcp.commands.ExecuteText"
+            id="org.txm.rcp.commands.ExecuteText"
             name="%command.name.50">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.editor.SaveAs"
-            id="org.txm.rcpapplication.commands.editor.SaveAs"
+            defaultHandler="org.txm.rcp.commands.editor.SaveAs"
+            id="org.txm.rcp.commands.editor.SaveAs"
             name="%command.name.67">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.DeleteFile"
-            id="org.txm.rcpapplication.commands.DeleteFile"
+            defaultHandler="org.txm.rcp.commands.DeleteFile"
+            id="org.txm.rcp.commands.DeleteFile"
             name="%command.name.68">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.CopyFile"
-            id="org.txm.rcpapplication.commands.CopyFile"
+            defaultHandler="org.txm.rcp.commands.CopyFile"
+            id="org.txm.rcp.commands.CopyFile"
             name="%command.name.69">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.PasteFile"
-            id="org.txm.rcpapplication.commands.PasteFile"
+            defaultHandler="org.txm.rcp.commands.PasteFile"
+            id="org.txm.rcp.commands.PasteFile"
             name="%command.name.70">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.CutFile"
-            id="org.txm.rcpapplication.commands.CutFile"
+            defaultHandler="org.txm.rcp.commands.CutFile"
+            id="org.txm.rcp.commands.CutFile"
             name="%command.name.71">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.RenameFile"
-            id="org.txm.rcpapplication.commands.RenameFile"
+            defaultHandler="org.txm.rcp.commands.RenameFile"
+            id="org.txm.rcp.commands.RenameFile"
             name="%command.name.108">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.editor.SetEncoding"
-            id="org.txm.rcpapplication.commands.editor.SetEncoding"
+            defaultHandler="org.txm.rcp.commands.editor.SetEncoding"
+            id="org.txm.rcp.commands.editor.SetEncoding"
             name="%command.name.72">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.function.ComputeInternalView"
-            id="org.txm.rcpapplication.commands.function.ComputeInternalView"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.function.ComputeInternalView"
+            id="org.txm.rcp.commands.function.ComputeInternalView"
             name="%command.name.73">
       </command>
       <command
             categoryId="org.eclipse.ui.category.navigate"
-            defaultHandler="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
-            id="org.txm.rcpapplication.commands.OpenLocalizedWebPage"
+            defaultHandler="org.txm.rcp.commands.OpenLocalizedWebPage"
+            id="org.txm.rcp.commands.OpenLocalizedWebPage"
             name="%command.name.74">
          <commandParameter
-               id="org.txm.rcpapplication.commands.commandParameter3"
+               id="org.txm.rcp.commands.commandParameter3"
                name="%commandParameter.name.3"
                optional="true">
          </commandParameter>
       </command>
       <command
             categoryId="org.eclipse.ui.category.navigate"
-            defaultHandler="org.txm.rcpapplication.commands.OpenWelcomePage"
-            id="org.txm.rcpapplication.commands.OpenWelcomePage"
+            defaultHandler="org.txm.rcp.commands.OpenWelcomePage"
+            id="org.txm.rcp.commands.OpenWelcomePage"
             name="%command.name.8">
          <commandParameter
-               id="org.txm.rcpapplication.commands.commandParameter2"
+               id="org.txm.rcp.commands.commandParameter2"
                name="%commandParameter.name"
                optional="true">
          </commandParameter>
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ExecuteGroovyMacro"
-            id="org.txm.rcpapplication.commands.ExecuteMacro"
+            defaultHandler="org.txm.rcp.commands.ExecuteGroovyMacro"
+            id="org.txm.rcp.commands.ExecuteMacro"
             name="%command.name.79">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.CreateMacro"
-            id="org.txm.rcpapplication.commands.CreateMacro"
+            defaultHandler="org.txm.rcp.commands.CreateMacro"
+            id="org.txm.rcp.commands.CreateMacro"
             name="%command.name.80">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.p2.plugins.InstallPluginHandler"
+            defaultHandler="org.txm.rcp.p2.plugins.InstallPluginHandler"
             description="%command.label.182"
-            id="org.txm.rcpapplication.p2.plugins.InstallPluginHandler"
+            id="org.txm.rcp.p2.plugins.InstallPluginHandler"
             name="%command.label.182">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.p2.plugins.TXMUpdateHandler"
+            defaultHandler="org.txm.rcp.p2.plugins.TXMUpdateHandler"
             description="%command.description.3"
-            id="org.txm.rcpapplication.p2.plugins.TXMUpdateHandler"
+            id="org.txm.rcp.p2.plugins.TXMUpdateHandler"
             name="%command.name.87">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.p2.plugins.FixUpdateHandler"
+            defaultHandler="org.txm.rcp.p2.plugins.FixUpdateHandler"
             description="%command.description.4"
-            id="org.txm.rcpapplication.p2.plugins.FixUpdateHandler"
+            id="org.txm.rcp.p2.plugins.FixUpdateHandler"
             name="%command.name.88">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.ExecuteLastGroovyScript"
-            id="org.txm.rcpapplication.commands.ExecuteLastGroovyScript"
+            defaultHandler="org.txm.rcp.commands.ExecuteLastGroovyScript"
+            id="org.txm.rcp.commands.ExecuteLastGroovyScript"
             name="%command.name.89">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.CleanPerspective"
-            id="org.txm.rcpapplication.commands.CleanPerspective"
+            defaultHandler="org.txm.rcp.commands.CleanPerspective"
+            id="org.txm.rcp.commands.CleanPerspective"
             name="%command.name.94">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.OpenManual"
-            id="org.txm.rcpapplication.commands.OpenManual"
+            defaultHandler="org.txm.rcp.commands.OpenManual"
+            id="org.txm.rcp.commands.OpenManual"
             name="%command.name.95">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.annotation.SaveAnnotations"
-            id="org.txm.rcpapplication.commands.annotation.SaveAnnotations"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.annotation.SaveAnnotations"
+            id="org.txm.rcp.commands.annotation.SaveAnnotations"
             name="%command.name.97">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.workspace.UpdateCorpus"
-            id="org.txm.rcpapplication.commands.workspace.UpdateCorpus"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.workspace.UpdateCorpus"
+            id="org.txm.rcp.commands.workspace.UpdateCorpus"
             name="%command.name.98">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.krview.OpenKRView"
-            id="org.txm.rcpapplication.commands.krview.OpenKRView"
+            defaultHandler="org.txm.rcp.commands.krview.OpenKRView"
+            id="org.txm.rcp.commands.krview.OpenKRView"
             name="%command.name.99">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.workspace.RecodeCorpus"
-            id="org.txm.rcpapplication.commands.workspace.RecodeCorpus"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.workspace.RecodeCorpus"
+            id="org.txm.rcp.commands.workspace.RecodeCorpus"
             name="%command.name.100">
       </command>
       <command
             categoryId="org.eclipse.ui.category.edit"
-            defaultHandler="org.txm.rcpapplication.commands.EditSelectedFile"
-            id="org.txm.rcpapplication.commands.EditSelectedFile"
+            defaultHandler="org.txm.rcp.commands.EditSelectedFile"
+            id="org.txm.rcp.commands.EditSelectedFile"
             name="%command.name.106">
       </command>
    </extension>
@@ -3221,13 +3221,13 @@
          name="commands"
          point="org.eclipse.ui.commands">
          <command
-            defaultHandler="org.txm.rcpapplication.commands.base.CreateSubCorpus"
-            id="org.txm.rcpapplication.commands.base.CreateSubCorpus"
+            defaultHandler="org.txm.rcp.commands.base.CreateSubCorpus"
+            id="org.txm.rcp.commands.base.CreateSubCorpus"
             name="%command.name.1">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.base.CreatePartition"
-            id="org.txm.rcpapplication.commands.base.CreatePartition"
+            defaultHandler="org.txm.rcp.commands.base.CreatePartition"
+            id="org.txm.rcp.commands.base.CreatePartition"
             name="%command.name.2">
          <commandParameter
                id="CorpusParameter"
@@ -3236,48 +3236,48 @@
          </commandParameter>
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.function.ComputeConcordance"
-            id="org.txm.rcpapplication.commands.function.ComputeConcordance"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.function.ComputeConcordance"
+            id="org.txm.rcp.commands.function.ComputeConcordance"
             name="%command.name.5">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.function.ComputeDiagnostic"
-            id="org.txm.rcpapplication.commands.base.Diagnostique"
+            defaultHandler="org.txm.rcp.commands.function.ComputeDiagnostic"
+            id="org.txm.rcp.commands.base.Diagnostique"
             name="%command.name.23">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.function.OpenParaBrowser"
-            id="org.txm.rcpapplication.commands.function.OpenParaBrowser"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.function.OpenParaBrowser"
+            id="org.txm.rcp.commands.function.OpenParaBrowser"
             name="%command.name.33">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.tests.NilsTest"
+            defaultHandler="org.txm.rcp.commands.tests.NilsTest"
             description="%command.description.2"
-            id="org.txm.rcpapplication.commands.tests.NilsTest"
+            id="org.txm.rcp.commands.tests.NilsTest"
             name="%command.name.85">
       </command>
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.function.ComputeReferencer"
-            id="org.txm.rcpapplication.commands.function.ComputeReferencer"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.function.ComputeReferencer"
+            id="org.txm.rcp.commands.function.ComputeReferencer"
             name="%command.name.44">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.function.ExportResult"
-            id="org.txm.rcpapplication.commands.function.ExportResult"
+            defaultHandler="org.txm.rcp.commands.function.ExportResult"
+            id="org.txm.rcp.commands.function.ExportResult"
             name="%command.name.24">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.function.ExportSVG"
-            id="org.txm.rcpapplication.commands.function.ExportSVG"
+            defaultHandler="org.txm.rcp.commands.function.ExportSVG"
+            id="org.txm.rcp.commands.function.ExportSVG"
             name="%command.name.34">
       </command>
          <command
-            categoryId="org.txm.rcpapplication.category.txm"
-            defaultHandler="org.txm.rcpapplication.commands.function.ComputeInterTextDistance"
-            id="org.txm.rcpapplication.commands.function.ComputeInterTextDistance"
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.rcp.commands.function.ComputeInterTextDistance"
+            id="org.txm.rcp.commands.function.ComputeInterTextDistance"
             name="%command.name.81">
       </command>
    </extension>
@@ -3286,63 +3286,63 @@
          name="links"
          point="org.eclipse.ui.commands">
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.IndexToConcordance"
-            id="org.txm.rcpapplication.commands.link.IndexToConcordance"
+            defaultHandler="org.txm.rcp.commands.link.IndexToConcordance"
+            id="org.txm.rcp.commands.link.IndexToConcordance"
             name="%command.name.30">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.CooccurrencesToConcordances"
-            id="org.txm.rcpapplication.commands.link.CooccurrencesToConcordances"
+            defaultHandler="org.txm.rcp.commands.link.CooccurrencesToConcordances"
+            id="org.txm.rcp.commands.link.CooccurrencesToConcordances"
             name="%command.name.41">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.IndexToProgression"
-            id="org.txm.rcpapplication.commands.link.IndexToProgression"
+            defaultHandler="org.txm.rcp.commands.link.IndexToProgression"
+            id="org.txm.rcp.commands.link.IndexToProgression"
             name="%command.name.42">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.IndexToLexicalTable"
-            id="org.txm.rcpapplication.commands.link.IndexToLexicalTable"
+            defaultHandler="org.txm.rcp.commands.link.IndexToLexicalTable"
+            id="org.txm.rcp.commands.link.IndexToLexicalTable"
             name="%command.name.43">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.ReferencerToConc"
-            id="org.txm.rcpapplication.commands.link.ReferencerToConc"
+            defaultHandler="org.txm.rcp.commands.link.ReferencerToConc"
+            id="org.txm.rcp.commands.link.ReferencerToConc"
             name="%command.name.57">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.LexiconToIndex"
-            id="org.txm.rcpapplication.commands.link.LexiconToIndex"
+            defaultHandler="org.txm.rcp.commands.link.LexiconToIndex"
+            id="org.txm.rcp.commands.link.LexiconToIndex"
             name="%command.name.58">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.IndexToCooccurrence"
-            id="org.txm.rcpapplication.commands.link.IndexToCooccurrence"
+            defaultHandler="org.txm.rcp.commands.link.IndexToCooccurrence"
+            id="org.txm.rcp.commands.link.IndexToCooccurrence"
             name="%command.name.65">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.ToConcordance"
-            id="org.txm.rcpapplication.commands.link.ToConcordance"
+            defaultHandler="org.txm.rcp.commands.link.ToConcordance"
+            id="org.txm.rcp.commands.link.ToConcordance"
             name="%command.name.75">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.ToIndex"
-            id="org.txm.rcpapplication.commands.link.ToIndex"
+            defaultHandler="org.txm.rcp.commands.link.ToIndex"
+            id="org.txm.rcp.commands.link.ToIndex"
             name="%command.name.76">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.ToProgression"
-            id="org.txm.rcpapplication.commands.link.ToProgression"
+            defaultHandler="org.txm.rcp.commands.link.ToProgression"
+            id="org.txm.rcp.commands.link.ToProgression"
             name="%command.name.77">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.link.TextToConcordance"
-            id="org.txm.rcpapplication.commands.link.TextToConcordance"
+            defaultHandler="org.txm.rcp.commands.link.TextToConcordance"
+            id="org.txm.rcp.commands.link.TextToConcordance"
             name="%command.name.96">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.editor.Copy"
-            id="org.txm.rcpapplication.commands.editor.Copy"
+            defaultHandler="org.txm.rcp.commands.editor.Copy"
+            id="org.txm.rcp.commands.editor.Copy"
             name="%command.name.55">
       </command>
    </extension>
@@ -3351,93 +3351,93 @@
          name="views"
          point="org.eclipse.ui.commands">
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.AddProject"
-            id="org.txm.rcpapplication.commands.workspace.AddProject"
+            defaultHandler="org.txm.rcp.commands.workspace.AddProject"
+            id="org.txm.rcp.commands.workspace.AddProject"
             name="%command.name.11">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.RemoveProject"
-            id="org.txm.rcpapplication.commands.workspace.RemoveProject"
+            defaultHandler="org.txm.rcp.commands.workspace.RemoveProject"
+            id="org.txm.rcp.commands.workspace.RemoveProject"
             name="%command.name.12">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.LoadBinaryCorpus"
-            id="org.txm.rcpapplication.commands.workspace.AddBase"
+            defaultHandler="org.txm.rcp.commands.workspace.LoadBinaryCorpus"
+            id="org.txm.rcp.commands.workspace.AddBase"
             name="%command.name.13">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.RemoveBase"
-            id="org.txm.rcpapplication.commands.workspace.RemoveBase"
+            defaultHandler="org.txm.rcp.commands.workspace.RemoveBase"
+            id="org.txm.rcp.commands.workspace.RemoveBase"
             name="%command.name.14">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.AddText"
-            id="org.txm.rcpapplication.commands.workspace.AddText"
+            defaultHandler="org.txm.rcp.commands.workspace.AddText"
+            id="org.txm.rcp.commands.workspace.AddText"
             name="%command.name.15">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.RemoveText"
-            id="org.txm.rcpapplication.commands.workspace.RemoveText"
+            defaultHandler="org.txm.rcp.commands.workspace.RemoveText"
+            id="org.txm.rcp.commands.workspace.RemoveText"
             name="%command.name.16">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.BuildCorpus"
-            id="org.txm.rcpapplication.commands.workspace"
+            defaultHandler="org.txm.rcp.commands.workspace.BuildCorpus"
+            id="org.txm.rcp.commands.workspace"
             name="%command.name.17">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.workspace.SetSearchEngine"
-            id="org.txm.rcpapplication.commands.workspace.SetSearchEngine"
+            defaultHandler="org.txm.rcp.commands.workspace.SetSearchEngine"
+            id="org.txm.rcp.commands.workspace.SetSearchEngine"
             name="%command.name.20">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.queryview.Copy"
-            id="org.txm.rcpapplication.commands.queryview.Copy"
+            defaultHandler="org.txm.rcp.commands.queryview.Copy"
+            id="org.txm.rcp.commands.queryview.Copy"
             name="%command.name.55">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.queryview.Paste"
-            id="org.txm.rcpapplication.commands.queryview.Paste"
+            defaultHandler="org.txm.rcp.commands.queryview.Paste"
+            id="org.txm.rcp.commands.queryview.Paste"
             name="%command.name.56">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.R.CopySelection"
-            id="org.txm.rcpapplication.commands.R.CopySelection"
+            defaultHandler="org.txm.rcp.commands.R.CopySelection"
+            id="org.txm.rcp.commands.R.CopySelection"
             name="%command.name.64">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.DownloadFile"
-            id="org.txm.rcpapplication.commands.DownloadFile"
+            defaultHandler="org.txm.rcp.commands.DownloadFile"
+            id="org.txm.rcp.commands.DownloadFile"
             name="%command.name.91">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.krview.Copy"
-            id="org.txm.rcpapplication.commands.krview.Copy"
+            defaultHandler="org.txm.rcp.commands.krview.Copy"
+            id="org.txm.rcp.commands.krview.Copy"
             name="%command.name.101">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.krview.Reload"
-            id="org.txm.rcpapplication.commands.krview.Reload"
+            defaultHandler="org.txm.rcp.commands.krview.Reload"
+            id="org.txm.rcp.commands.krview.Reload"
             name="%command.name.102">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.krview.Informations"
-            id="org.txm.rcpapplication.commands.krview.Informations"
+            defaultHandler="org.txm.rcp.commands.krview.Informations"
+            id="org.txm.rcp.commands.krview.Informations"
             name="%command.name.103">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.krview.Delete"
-            id="org.txm.rcpapplication.commands.krview.Delete"
+            defaultHandler="org.txm.rcp.commands.krview.Delete"
+            id="org.txm.rcp.commands.krview.Delete"
             name="%command.name.104">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.krview.Add"
-            id="org.txm.rcpapplication.commands.krview.Add"
+            defaultHandler="org.txm.rcp.commands.krview.Add"
+            id="org.txm.rcp.commands.krview.Add"
             name="%command.name.105">
       </command>
       <command
-            defaultHandler="org.txm.rcpapplication.commands.annotation.ExportStandoff"
-            id="org.txm.rcpapplication.commands.annotation.ExportStandoff"
+            defaultHandler="org.txm.rcp.commands.annotation.ExportStandoff"
+            id="org.txm.rcp.commands.annotation.ExportStandoff"
             name="%command.name.107">
       </command>
       <command
@@ -3517,7 +3517,7 @@
             </instanceof>
             <test
                   args="isDirectory()"
-                  property="org.txm.rcpapplication.test2"
+                  property="org.txm.rcp.test2"
                   value="true">
             </test>
          </and>
@@ -3618,7 +3618,7 @@
                <with
                      variable="activeEditorId">
                   <equals
-                        value="org.txm.rcpapplication.editors.SVGGraphicEditor">
+                        value="org.txm.rcp.editors.SVGGraphicEditor">
                   </equals>
                </with>
             </definition>
@@ -3666,7 +3666,7 @@
                <with
                      variable="activeWorkbenchWindow.activePerspective">
                   <equals
-                        value="org.txm.rcpapplication.perspective.RPerspective">
+                        value="org.txm.rcp.perspective.RPerspective">
                   </equals>
                </with>
             </definition>
@@ -3683,7 +3683,7 @@
                <with
                      variable="activeWorkbenchWindow.activePerspective">
                   <equals
-                        value="org.txm.rcpapplication.perspective.LabPerspective">
+                        value="org.txm.rcp.perspective.LabPerspective">
                   </equals>
                </with>
             </definition>
@@ -3785,7 +3785,7 @@
                <with
                      variable="activePartId">
                   <equals
-                        value="org.txm.rcpapplication.editors.TxtEditor">
+                        value="org.txm.rcp.editors.TxtEditor">
                   </equals>
                </with>
             </definition>
@@ -3814,27 +3814,27 @@
          point="org.eclipse.ui.popupMenus">
       <viewerContribution
             id="projmenu"
-            targetID="org.txm.rcpapplication.views.BasesView">
+            targetID="org.txm.rcp.views.BasesView">
       </viewerContribution>
    </extension>
    
    <extension
          point="org.eclipse.ui.splashHandlers">
       <splashHandler
-            class="org.txm.rcpapplication.AbstractSplashHandler2"
-            id="org.txm.rcpapplication.splashHandler2">
+            class="org.txm.rcp.AbstractSplashHandler2"
+            id="org.txm.rcp.splashHandler2">
       </splashHandler>
       <splashHandlerProductBinding
-            productId="org.txm.rcpapplication.product"
-            splashId="org.txm.rcpapplication.splash">
+            productId="org.txm.rcp.product"
+            splashId="org.txm.rcp.splash">
       </splashHandlerProductBinding>
    </extension>
    <extension
          point="org.eclipse.ui.decorators">
       <decorator
-            class="org.txm.rcpapplication.decorators.RDecorator"
+            class="org.txm.rcp.decorators.RDecorator"
             icon="icons/decorators/R.png"
-            id="org.txm.rcpapplication.decorators.RDecorator"
+            id="org.txm.rcp.decorators.RDecorator"
             label="%decorator.label"
             lightweight="false"
             location="TOP_LEFT"
@@ -3876,19 +3876,19 @@
    <extension
          point="org.eclipse.ui.bindings">
       <key
-            commandId="org.txm.rcpapplication.commands.ExecuteText"
+            commandId="org.txm.rcp.commands.ExecuteText"
             contextId="org.eclipse.ui.contexts.window"
             schemeId="org.txm.rcp.scheme"
             sequence="F11">
       </key>
       <key
-            commandId="org.txm.rcpapplication.commands.ExecuteScript"
+            commandId="org.txm.rcp.commands.ExecuteScript"
             contextId="org.eclipse.ui.contexts.window"
             schemeId="org.txm.rcp.scheme"
             sequence="M1+F11">
       </key>
       <key
-            commandId="org.txm.rcpapplication.commands.ExecuteLastGroovyScript"
+            commandId="org.txm.rcp.commands.ExecuteLastGroovyScript"
             contextId="org.eclipse.ui.contexts.window"
             schemeId="org.txm.rcp.scheme"
             sequence="F12">
@@ -3900,31 +3900,31 @@
             parentId="org.eclipse.ui.defaultAcceleratorConfiguration">
       </scheme>
       <key
-            commandId="org.txm.rcpapplication.commands.krview.Add"
+            commandId="org.txm.rcp.commands.krview.Add"
             contextId="org.txm.rcp.annotation.krview"
             schemeId="org.txm.rcp.scheme"
             sequence="Ctrl+A">
       </key>
       <key
-            commandId="org.txm.rcpapplication.commands.krview.Reload"
+            commandId="org.txm.rcp.commands.krview.Reload"
             contextId="org.txm.rcp.annotation.krview"
             schemeId="org.txm.rcp.scheme"
             sequence="Ctrl+R">
       </key>
       <key
-            commandId="org.txm.rcpapplication.commands.krview.Informations"
+            commandId="org.txm.rcp.commands.krview.Informations"
             contextId="org.txm.rcp.annotation.krview"
             schemeId="org.txm.rcp.scheme"
             sequence="Ctrl+I">
       </key>
       <key
-            commandId="org.txm.rcpapplication.commands.krview.Copy"
+            commandId="org.txm.rcp.commands.krview.Copy"
             contextId="org.txm.rcp.annotation.krview"
             schemeId="org.txm.rcp.scheme"
             sequence="Ctrl+C">
       </key>
       <key
-            commandId="org.txm.rcpapplication.commands.krview.Delete"
+            commandId="org.txm.rcp.commands.krview.Delete"
             contextId="org.txm.rcp.annotation.krview"
             schemeId="org.txm.rcp.scheme"
             sequence="Ctrl+D">
@@ -3960,7 +3960,7 @@
       <wizard
             category="org.txm.rcp.wizard.new"
             class="org.txm.rcp.wizard.NewCorpusWizard"
-            finalPerspective="org.txm.rcpapplication.perspective.TXMPerspective"
+            finalPerspective="org.txm.rcp.perspective.TXMPerspective"
             icon="icons/objects/books.png"
             id="org.txm.rcp.wizard.corpus"
             name="%wizard.name"
@@ -3975,7 +3975,7 @@
       <wizard
             category="org.txm.rcp.wizard.export"
             class="org.txm.rcp.wizard.ExportCorpusWizard"
-            finalPerspective="org.txm.rcpapplication.perspective.TXMPerspective"
+            finalPerspective="org.txm.rcp.perspective.TXMPerspective"
             icon="icons/functions/Compress.png"
             id="org.txm.rcp.wizard.corpus"
             name="%wizard.name.0"
@@ -3994,7 +3994,7 @@
       <wizard
             category="org.txm.rcp.wizard.import"
             class="org.txm.rcp.wizard.ImportCorpusWizard"
-            finalPerspective="org.txm.rcpapplication.perspective.TXMPerspective"
+            finalPerspective="org.txm.rcp.perspective.TXMPerspective"
             icon="icons/objects/corpus.png"
             id="org.txm.rcp.wizard.corpus"
             name="%wizard.name.1"
Index: tmp/org.txm.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.rcp/META-INF/MANIFEST.MF	(revision 323)
+++ tmp/org.txm.rcp/META-INF/MANIFEST.MF	(revision 324)
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.txm.rcp;singleton:=true
 Bundle-Version: 0.7.8.qualifier
-Bundle-Activator: org.txm.rcpapplication.Activator
+Bundle-Activator: org.txm.rcp.Activator
 Bundle-Vendor: %Bundle-Vendor
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
@@ -154,48 +154,48 @@
  org.txm.rcp.testers,
  org.txm.rcp.tests,
  org.txm.rcp.wizard,
- org.txm.rcpapplication,
- org.txm.rcpapplication.actions,
- org.txm.rcpapplication.commands,
- org.txm.rcpapplication.commands.R,
- org.txm.rcpapplication.commands.annotation,
- org.txm.rcpapplication.commands.base,
- org.txm.rcpapplication.commands.editor,
- org.txm.rcpapplication.commands.function,
- org.txm.rcpapplication.commands.krview,
- org.txm.rcpapplication.commands.link,
- org.txm.rcpapplication.commands.queryview,
- org.txm.rcpapplication.commands.tests,
- org.txm.rcpapplication.commands.workspace,
- org.txm.rcpapplication.decorators,
- org.txm.rcpapplication.editors,
- org.txm.rcpapplication.editors.adaptableDataStructure,
- org.txm.rcpapplication.editors.concordances,
- org.txm.rcpapplication.editors.imports,
- org.txm.rcpapplication.editors.imports.sections,
- org.txm.rcpapplication.editors.input,
- org.txm.rcpapplication.editors.internal,
- org.txm.rcpapplication.editors.objectexplorer,
- org.txm.rcpapplication.editors.parabrowser,
- org.txm.rcpapplication.editors.referencer,
- org.txm.rcpapplication.jface,
- org.txm.rcpapplication.log,
- org.txm.rcpapplication.p2.plugins,
- org.txm.rcpapplication.perspective,
- org.txm.rcpapplication.preferences,
- org.txm.rcpapplication.splashHandlers,
- org.txm.rcpapplication.svg,
- org.txm.rcpapplication.swt.dialog,
- org.txm.rcpapplication.swt.provider,
- org.txm.rcpapplication.swt.widget,
- org.txm.rcpapplication.swt.widget.parameters,
- org.txm.rcpapplication.swt.widget.preferences,
- org.txm.rcpapplication.utils,
- org.txm.rcpapplication.views,
- org.txm.rcpapplication.views.cmdparameters,
- org.txm.rcpapplication.views.corpora,
- org.txm.rcpapplication.views.fileexplorer,
- org.txm.rcpapplication.views.knowledgerepositories
+ org.txm.rcp,
+ org.txm.rcp.actions,
+ org.txm.rcp.commands,
+ org.txm.rcp.commands.R,
+ org.txm.rcp.commands.annotation,
+ org.txm.rcp.commands.base,
+ org.txm.rcp.commands.editor,
+ org.txm.rcp.commands.function,
+ org.txm.rcp.commands.krview,
+ org.txm.rcp.commands.link,
+ org.txm.rcp.commands.queryview,
+ org.txm.rcp.commands.tests,
+ org.txm.rcp.commands.workspace,
+ org.txm.rcp.decorators,
+ org.txm.rcp.editors,
+ org.txm.rcp.editors.adaptableDataStructure,
+ org.txm.rcp.editors.concordances,
+ org.txm.rcp.editors.imports,
+ org.txm.rcp.editors.imports.sections,
+ org.txm.rcp.editors.input,
+ org.txm.rcp.editors.internal,
+ org.txm.rcp.editors.objectexplorer,
+ org.txm.rcp.editors.parabrowser,
+ org.txm.rcp.editors.referencer,
+ org.txm.rcp.jface,
+ org.txm.rcp.log,
+ org.txm.rcp.p2.plugins,
+ org.txm.rcp.perspective,
+ org.txm.rcp.preferences,
+ org.txm.rcp.splashHandlers,
+ org.txm.rcp.svg,
+ org.txm.rcp.swt.dialog,
+ org.txm.rcp.swt.provider,
+ org.txm.rcp.swt.widget,
+ org.txm.rcp.swt.widget.parameters,
+ org.txm.rcp.swt.widget.preferences,
+ org.txm.rcp.utils,
+ org.txm.rcp.views,
+ org.txm.rcp.views.cmdparameters,
+ org.txm.rcp.views.corpora,
+ org.txm.rcp.views.fileexplorer,
+ org.txm.rcp.views.knowledgerepositories
 Bundle-ClassPath: bin/,
  .,
  lib/commons-cli-1.2.jar,
Index: tmp/org.txm.rcp/schema/org.txm.rcp.extensionpoint.backtotext.exsd
===================================================================
--- tmp/org.txm.rcp/schema/org.txm.rcp.extensionpoint.backtotext.exsd	(revision 323)
+++ tmp/org.txm.rcp/schema/org.txm.rcp.extensionpoint.backtotext.exsd	(revision 324)
@@ -1,9 +1,9 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.txm.rcpapplication" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.txm.rcp" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appinfo>
-         <meta.schema plugin="org.txm.rcpapplication" id="org.txm.rcp.extensionpoint.backtotext" name="Back to text"/>
+         <meta.schema plugin="org.txm.rcp" id="org.txm.rcp.extensionpoint.backtotext" name="Back to text"/>
       </appinfo>
       <documentation>
          Called from the concordance editor to open an edition using the selected concordance line.
@@ -55,7 +55,7 @@
                   
                </documentation>
                <appinfo>
-                  <meta.attribute kind="java" basedOn="org.txm.rcpapplication.commands.BackToTextCommand:"/>
+                  <meta.attribute kind="java" basedOn="org.txm.rcp.commands.BackToTextCommand:"/>
                </appinfo>
             </annotation>
          </attribute>
Index: tmp/org.txm.rcp/schema/org.txm.rcp.extentionpoint.command.exsd
===================================================================
--- tmp/org.txm.rcp/schema/org.txm.rcp.extentionpoint.command.exsd	(revision 323)
+++ tmp/org.txm.rcp/schema/org.txm.rcp.extentionpoint.command.exsd	(revision 324)
@@ -55,7 +55,7 @@
                   
                </documentation>
                <appinfo>
-                  <meta.attribute kind="java" basedOn="org.txm.rcpapplication.commands.TxmCommand:"/>
+                  <meta.attribute kind="java" basedOn="org.txm.rcp.commands.TxmCommand:"/>
                </appinfo>
             </annotation>
          </attribute>
Index: tmp/org.txm.lexicon.rcp/src/org/txm/lexicon/rcp/handlers/ComputeLexicon.java
===================================================================
--- tmp/org.txm.lexicon.rcp/src/org/txm/lexicon/rcp/handlers/ComputeLexicon.java	(revision 323)
+++ tmp/org.txm.lexicon.rcp/src/org/txm/lexicon/rcp/handlers/ComputeLexicon.java	(revision 324)
@@ -35,8 +35,8 @@
 import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
 import org.txm.lexicon.rcp.editors.DictionnaryEditor;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.TXMWindows;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Corpus;
 
 // TODO: Auto-generated Javadoc
@@ -95,7 +95,7 @@
 			
 		}
 		catch (Exception e) {
-			org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			org.txm.rcp.utils.Logger.printStackTrace(e);
 		} 
 
 		
Index: tmp/org.txm.lexicon.rcp/src/org/txm/lexicon/rcp/editors/DictionnaryEditor.java
===================================================================
--- tmp/org.txm.lexicon.rcp/src/org/txm/lexicon/rcp/editors/DictionnaryEditor.java	(revision 323)
+++ tmp/org.txm.lexicon.rcp/src/org/txm/lexicon/rcp/editors/DictionnaryEditor.java	(revision 324)
@@ -39,7 +39,7 @@
 public class DictionnaryEditor extends IndexEditor {
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.index.IndexEditor#createPartControl(org.eclipse.swt.widgets.Composite)
+	 * @see org.txm.rcp.editors.index.IndexEditor#createPartControl(org.eclipse.swt.widgets.Composite)
 	 */
 	@Override
 	public void createPartControl(final Composite parent) {
@@ -57,7 +57,7 @@
 	
 
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.index.IndexEditor#getTitleToolTip()
+	 * @see org.txm.rcp.editors.index.IndexEditor#getTitleToolTip()
 	 */
 	@Override
 	public String getTitleToolTip() {
@@ -74,7 +74,7 @@
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.txm.rcpapplication.editors.index.IndexEditor#getSource()
+	 * @see org.txm.rcp.editors.index.IndexEditor#getSource()
 	 */
 	@Override
 	public Object getSource()
Index: tmp/org.txm.lexicon.rcp/plugin.xml
===================================================================
--- tmp/org.txm.lexicon.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.lexicon.rcp/plugin.xml	(revision 324)
@@ -5,7 +5,7 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputeLexicon"
                icon="icons/lexicon.png"
@@ -21,7 +21,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeLexicon"
                icon="icons/lexicon.png"
@@ -52,7 +52,7 @@
    <extension
          point="org.eclipse.ui.commands">
                <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.lexicon.rcp.handlers.ComputeLexicon"
             id="ComputeLexicon"
             name="%command.name">
Index: tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditorInput.java
===================================================================
--- tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditorInput.java	(revision 323)
+++ tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditorInput.java	(revision 324)
@@ -31,8 +31,8 @@
 import org.eclipse.ui.IPersistableElement;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.txm.chartsengine.rcp.editors.ChartEditorInput;
-import org.txm.rcpapplication.Application;
-import org.txm.rcpapplication.IImageKeys;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
 import org.txm.wordcloud.core.functions.WordCloud;
 import org.txm.wordcloud.core.preferences.WordCloudPreferences;
 
Index: tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java
===================================================================
--- tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java	(revision 323)
+++ tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java	(revision 324)
@@ -37,9 +37,9 @@
 import org.txm.index.core.functions.Index;
 import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.StatusLine;
-import org.txm.rcpapplication.commands.OpenBrowser;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.serverException.CqiServerError;
Index: tmp/org.txm.wordcloud.rcp/plugin.xml
===================================================================
--- tmp/org.txm.wordcloud.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.wordcloud.rcp/plugin.xml	(revision 324)
@@ -22,7 +22,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.wordcloud.rcp.handlers.ComputeWordCloud"
             id="ComputeWordCloud"
             name="%command.name">
@@ -32,7 +32,7 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputeWordCloud"
                icon="icons/functions/wordcloud.png"
@@ -55,7 +55,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputeWordCloud"
                icon="icons/functions/wordcloud.png"
@@ -101,12 +101,12 @@
       <menuContribution
             locationURI="menu:menu.help.plugins">
          <command
-               commandId="org.txm.rcpapplication.commands.OpenBrowser"
+               commandId="org.txm.rcp.commands.OpenBrowser"
                icon="icons/functions/wordcloud.png"
                label="%command.name"
                style="push">
             <parameter
-                  name="org.txm.rcpapplication.commands.commandParameter2"
+                  name="org.txm.rcp.commands.commandParameter2"
                   value="https://groupes.renater.fr/wiki/txm-users/public/extensions#wordcloud">
             </parameter>
          </command>
@@ -135,7 +135,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.wordcloud.rcp.preferences.WordCloudPreferencePage"
             id="org.txm.wordcloud.rcp.preferences.WordCloudPreferencePage"
             name="%page.name">
Index: tmp/org.txm.partition.rcp/plugin.xml
===================================================================
--- tmp/org.txm.partition.rcp/plugin.xml	(revision 323)
+++ tmp/org.txm.partition.rcp/plugin.xml	(revision 324)
@@ -5,7 +5,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.txm.rcpapplication.category.txm"
+            categoryId="org.txm.rcp.category.txm"
             defaultHandler="org.txm.partition.rcp.handlers.ComputePartitionDimensionsBarChart"
             id="ComputePartitionDimensionsBarChart"
             name="%command.name">
@@ -15,7 +15,7 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+            locationURI="toolbar:org.txm.rcp.toolbartools">
          <command
                commandId="ComputePartitionDimensionsBarChart"
                icon="icons/silk_dimensions.png"
@@ -33,7 +33,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+            locationURI="popup:org.txm.rcp.views.CorporaView">
          <command
                commandId="ComputePartitionDimensionsBarChart"
                icon="icons/silk_dimensions.png"
@@ -80,7 +80,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
-            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            category="org.txm.rcp.preferences.UserPreferencePage"
             class="org.txm.partition.rcp.preferences.PartitionPreferencePage"
             id="org.txm.rcp.partition.preferences.PartitionPreferencePage"
             name="%page.name">
Index: tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java
===================================================================
--- tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java	(revision 323)
+++ tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java	(revision 324)
@@ -45,8 +45,8 @@
 import org.txm.partition.core.preferences.PartitionDimensionsPreferences;
 import org.txm.partition.rcp.messages.PartitionUIMessages;
 import org.txm.rcp.handlers.BaseAbstractHandler;
-import org.txm.rcpapplication.IImageKeys;
-import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.views.corpora.CorporaView;
 import org.txm.searchengine.cqp.corpus.Part;
 import org.txm.searchengine.cqp.corpus.Partition;
 
@@ -98,7 +98,7 @@
 				CorporaView.expand(partition);
 				
 			} catch (Exception e) {
-				org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+				org.txm.rcp.utils.Logger.printStackTrace(e);
 			}
 		}
 		// Reopen an editor
Index: tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/preferences/PartitionPreferencePage.java
===================================================================
--- tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/preferences/PartitionPreferencePage.java	(revision 323)
+++ tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/preferences/PartitionPreferencePage.java	(revision 324)
@@ -35,7 +35,7 @@
 import org.txm.partition.rcp.messages.PartitionUIMessages;
 import org.txm.rcp.preferences.TXMPreferencePage;
 import org.txm.rcp.preferences.TXMPreferenceStore;
-import org.txm.rcpapplication.Messages;
+import org.txm.rcp.Messages;
 
 /**
  * Partition preference page.
Index: tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/RasterImageChartsComponentProvider.java
===================================================================
--- tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/RasterImageChartsComponentProvider.java	(revision 323)
+++ tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/RasterImageChartsComponentProvider.java	(revision 324)
@@ -18,9 +18,9 @@
 import org.txm.chartsengine.rcp.editors.ChartEditorPart;
 import org.txm.chartsengine.rcp.swt.ChartComposite;
 import org.txm.core.results.ITXMResult;
-import org.txm.rcpapplication.commands.OpenBrowser;
-import org.txm.rcpapplication.editors.TXMWebBrowserEditor;
-import org.txm.rcpapplication.utils.OpenURI;
+import org.txm.rcp.commands.OpenBrowser;
+import org.txm.rcp.editors.TXMWebBrowserEditor;
+import org.txm.rcp.utils.OpenURI;
 
 /**
  * Raster image/SWT WebBrowserEditor charts component provider.
