Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/SourceDirectoryPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/SourceDirectoryPage.java	(revision 2441)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/SourceDirectoryPage.java	(revision 2442)
@@ -34,7 +34,7 @@
 	
 	private Text corpusName;
 	
-	private Text sourceDirectory;
+	private Label sourceDirectory;
 	// private Text descriptionText;
 	
 	private Composite container;
@@ -59,20 +59,6 @@
 		Label label2 = new Label(container, SWT.NONE);
 		label2.setText("Source directory");
 		
-		sourceDirectory = new Text(container, SWT.BORDER | SWT.SINGLE);
-		final String lastSourcesLocation = RCPPreferences.getInstance().getString("lastSourcesLocation");
-		sourceDirectory.setText(lastSourcesLocation);
-		sourceDirectory.setToolTipText("The corpus source directory");
-		sourceDirectory.setLayoutData(gd);
-		sourceDirectory.addModifyListener(new ModifyListener() {
-			
-			@Override
-			public void modifyText(ModifyEvent e) {
-				corpusName.setText(AsciiUtils.buildId(new File(getSourcePath()).getName()).toUpperCase());
-				setPageComplete(isCompleted());
-			}
-		});
-		
 		Button button = new Button(container, SWT.PUSH);
 		button.setText("...");
 		button.setToolTipText("click to select the corpus source directory");
@@ -101,12 +87,27 @@
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
 		});
+		
+		sourceDirectory = new Label(container, SWT.SINGLE);
+		final String lastSourcesLocation = RCPPreferences.getInstance().getString("lastSourcesLocation");
+		sourceDirectory.setText(lastSourcesLocation);
+		sourceDirectory.setLayoutData(gd);
+		// sourceDirectory.addModifyListener(new ModifyListener() {
+		//
+		// @Override
+		// public void modifyText(ModifyEvent e) {
+		// corpusName.setText(AsciiUtils.buildId(new File(getSourcePath()).getName()).toUpperCase());
+		// setPageComplete(isCompleted());
+		// }
+		// });
+		
+		
 		Label label1 = new Label(container, SWT.NONE);
 		label1.setText("Corpus name");
 		
 		corpusName = new Text(container, SWT.BORDER | SWT.SINGLE);
+		corpusName.setLayoutData(GridDataFactory.fillDefaults().span(2, 1).create());
 		corpusName.setText(AsciiUtils.buildId(new File(lastSourcesLocation).getName()).toUpperCase());
-		corpusName.setToolTipText("The corpus name");
 		corpusName.addKeyListener(new KeyListener() {
 			
 			@Override
@@ -118,7 +119,6 @@
 			public void keyPressed(KeyEvent e) {}
 		});
 		
-		corpusName.setLayoutData(gd);
 		new Label(container, SWT.NONE);
 		
 		newOrEdit = new Label(container, SWT.NONE);
@@ -149,12 +149,12 @@
 		if (corpusName.getText().length() > 0) {
 			// File srcProjectLink = ResourcesPlugin.getWorkspace().getRoot().getProject(corpusName.getText()).getFolder("src").getRawLocation().toFile();
 			if (ResourcesPlugin.getWorkspace().getRoot().getProject(getCorpusName()).exists()) {
-				Project p = Toolbox.workspace.getProject();
+				Project p = Toolbox.workspace.getProject(getCorpusName());
 				if (p != null && p.getChildren().size() > 0) {
 					newOrEdit.setText(NLS.bind("The ''{0}'' corpus will be replaced.", getCorpusName()));
 				}
 				else {
-					newOrEdit.setText(NLS.bind("The ''{0}'' corpus import will be resumed.", getCorpusName()));
+					newOrEdit.setText(NLS.bind("The ''{0}'' corpus import will be resumed or restarted.", getCorpusName()));
 				}
 			}
 			else {
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties	(revision 2441)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties	(revision 2442)
@@ -826,7 +826,7 @@
 
 selectTextId = Select a text
 
-selectTheSourceDirectory = Select the source files directory
+selectTheSourceDirectory = Select the source files directory and name the corpus
 
 selectThecorporaSetsToRestore = Select the corpora sets to restore
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties	(revision 2441)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties	(revision 2442)
@@ -809,7 +809,7 @@
 
 selectTextId = Sélectionner un texte
 
-selectTheSourceDirectory = Sélectionner le répertoire des fichiers sources
+selectTheSourceDirectory = Sélectionner le répertoire des fichiers sources et nommer le corpus
 
 selectThecorporaSetsToRestore = Sélectionnez les corpus à restaurer
 
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 2441)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 2442)
@@ -34,6 +34,7 @@
 
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.wizard.WizardDialog;
@@ -43,6 +44,7 @@
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.layout.RowLayout;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchPartConstants;
@@ -88,78 +90,100 @@
  * 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;
-
+	
 	private Project project;
-
+	
 	/**
 	 * Instantiates a new main page.
 	 *
 	 * @param editor the editor
-	 * @param corpusname 
+	 * @param corpusname
 	 */
 	public CorpusPage(ImportFormEditor editor) {
-		super(editor, TXMUIMessages.parameters, TXMUIMessages.parameters); 
+		super(editor, TXMUIMessages.parameters, TXMUIMessages.parameters);
 		this.editor = editor;
 	}
-
+	
 	private int createEditionsSection() {
-		editionSection = new EditionSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE, moduleParams, editor.getGroovyScript().getName());
+		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);
+		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);
+		fontSection = new FontSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
 		return fontSection.getSectionSize();
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
 	 */
 	@Override
@@ -169,588 +193,560 @@
 		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
+			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) ) {
+		
+		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();
-
+		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);
+		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(), TXMUIMessages.dDotMandatoryField, SWT.WRAP);
-		gdata = new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE, 2,1);
+		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);
+		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);
+		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);
+		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);
+		xsltSection = new FrontXSLSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
 		return xsltSection.getSectionSize();
 	}
-
+	
 	/**
 	 * Creates the lang section.
 	 */
 	private int createLangSection() {
-		langSection = new LangSection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		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));
-		}
+		/*
+		 * 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$
-		}
+		/*
+		 * 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));
-		}
+		/*
+		 * 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();
-		}
+		/*
+		 * 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);
+		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 = 4;
 		layout.makeColumnsEqualWidth = false;
 		hyperlinks.setLayout(layout);
-
-		Label titleLabel = toolkit.createLabel(hyperlinks,"", SWT.WRAP); //$NON-NLS-1$
+		
+		Label titleLabel = toolkit.createLabel(hyperlinks, "", SWT.WRAP); //$NON-NLS-1$
 		titleLabel.setLayoutData(new TableWrapData(TableWrapData.FILL, TableWrapData.TOP));
-		titleLabel.setText(NLS.bind(TXMUIMessages.importParametersOfP0, 
+		titleLabel.setText(NLS.bind(TXMUIMessages.importParametersOfP0,
 				ImportModuleCustomization.getName(editor.getGroovyScript().getName())));
 		FontData[] fD = titleLabel.getFont().getFontData();
 		fD[0].setHeight(16);
-		titleLabel.setFont( new Font(titleLabel.getDisplay(),fD[0]));
-
+		titleLabel.setFont(new Font(titleLabel.getDisplay(), fD[0]));
+		
 		HyperlinkAdapter selectDirHListener = new HyperlinkAdapter() {
+			
 			@Override
 			public void linkActivated(HyperlinkEvent e) {
-				//System.out.println("Opening...");
+				// System.out.println("Opening...");
 				selectSourceDir();
 			}
 		};
 		
 		HyperlinkAdapter saveHListener = new HyperlinkAdapter() {
+			
 			@Override
 			public void linkActivated(HyperlinkEvent e) {
 				if (project != null) {
 					saveConfig();
-				} else 
+				}
+				else
 					System.out.println(TXMUIMessages.cannotStartImportConfigurationNoSourceFolderSelected);
 			}
 		};
-
+		
 		HyperlinkAdapter startImportListener = new HyperlinkAdapter() {
+			
 			@Override
 			public void linkActivated(HyperlinkEvent e) {
-				//System.out.println("Starting...");
+				// System.out.println("Starting...");
 				if (project != null) {
 					if (saveConfig()) {
 						startImport();
 					}
-				} else 
+				}
+				else
 					System.out.println(TXMUIMessages.cannotStartImportConfigurationNoSourceFolderSelected);
 			}
 		};
-
+		
 		ImageHyperlink openImportLink = toolkit.createImageHyperlink(hyperlinks, SWT.NULL);
 		openImportLink.setLayoutData(new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE));
 		openImportLink.setImage(IImageKeys.getImage(IImageKeys.FOLDER));
@@ -760,13 +756,13 @@
 		saveImportLink.setLayoutData(new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE));
 		saveImportLink.setImage(IImageKeys.getImage(IImageKeys.SAVE));
 		saveImportLink.addHyperlinkListener(saveHListener);
-
+		
 		ImageHyperlink startImportLink = toolkit.createImageHyperlink(hyperlinks, SWT.NULL);
 		startImportLink.setLayoutData(new TableWrapData(TableWrapData.FILL, TableWrapData.MIDDLE));
 		startImportLink.setImage(IImageKeys.getImage(IImageKeys.START));
-		startImportLink.addHyperlinkListener(startImportListener);	
-
-
+		startImportLink.addHyperlinkListener(startImportListener);
+		
+		
 		Composite line1 = toolkit.createComposite(form.getBody());
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL, 2, 1);
 		gdata.colspan = 2;
@@ -775,14 +771,14 @@
 		hLayout.center = true;
 		line1.setLayout(hLayout);
 		toolkit.createLabel(line1, TXMUIMessages._1, SWT.WRAP);
-
+		
 		Hyperlink hyperlink1 = toolkit.createHyperlink(line1, TXMUIMessages.selectTheSourceDirectory, 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;
@@ -792,7 +788,7 @@
 		line2.setLayout(hLayout);
 		toolkit.createLabel(line2, TXMUIMessages._2, SWT.WRAP);
 		toolkit.createLabel(line2, TXMUIMessages.setImportParametersInTheSectionsBelow, SWT.WRAP);
-
+		
 		Composite line4 = toolkit.createComposite(form.getBody());
 		gdata = new TableWrapData(TableWrapData.LEFT, TableWrapData.FILL, 2, 1);
 		gdata.colspan = 2;
@@ -807,14 +803,14 @@
 		startImportLink2.setImage(IImageKeys.getImage(IImageKeys.START));
 		startImportLink2.addHyperlinkListener(startImportListener);
 	}
-
+	
 	private int createUIsSection() {
-		uiSection = new UISection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR|ExpandableComposite.TWISTIE);
+		uiSection = new UISection(toolkit, form, form.getBody(), ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
 		return uiSection.getSectionSize();
 	}
-
+	
 	/**
-	 * Called by "selectSourceDir". 
+	 * Called by "selectSourceDir".
 	 * Theparameter file is read to fill the section fields.
 	 * 
 	 * @throws ParserConfigurationException
@@ -822,14 +818,14 @@
 	 * @throws IOException
 	 */
 	public void loadParams() throws ParserConfigurationException, SAXException, IOException {
-
-		File metadataFile = Metadatas.findMetadataFile(project.getSrcdir()); //$NON-NLS-1$
+		
+		File metadataFile = Metadatas.findMetadataFile(project.getSrcdir());
 		if (metadataFile.exists())
 			this.editor.getMetaPage().setMetadataFile(metadataFile);
-
+		
 		Log.fine(NLS.bind(TXMUIMessages.moduleUIParametersColonP0, moduleParams));
 		this.setPartName(project.getName());
-
+		
 		if (infosSection != null && !infosSection.isDisposed()) {
 			infosSection.setEnabled(true);
 			infosSection.update(project);
@@ -866,34 +862,34 @@
 			textualPlansSection.setEnabled(true);
 			textualPlansSection.update(project);
 		}
-
+		
 		if (optionsSection != null && !optionsSection.isDisposed()) {
 			optionsSection.setEnabled(true);
 			optionsSection.update(project);
 		}
-
+		
 		/*
-		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();
-		}
+		 * 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 true if import parameters are saved
 	 */
 	public boolean saveConfig() {
@@ -905,13 +901,13 @@
 			return false;
 		}
 		
-		//		params.rootDir = project.getSrcdir().getAbsolutePath();
-		//		project.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$
-
+		// params.rootDir = project.getSrcdir().getAbsolutePath();
+		// project.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()) {
@@ -948,7 +944,7 @@
 			System.out.println("Some fields are not correctly filled.");
 			return false;
 		}
-
+		
 		// SAVE ALL SECTIONS
 		boolean successfulSave = true;
 		if (infosSection != null && !infosSection.isDisposed()) {
@@ -981,133 +977,144 @@
 		if (optionsSection != null && !optionsSection.isDisposed()) {
 			successfulSave = successfulSave & optionsSection.save(project);
 		}
-
+		
 		if (successfulSave) {
 			try {
 				project.save();
-				//				DomUtils.save(params.root.getOwnerDocument(), paramFile);
-			} catch (Exception e1) {
+				// DomUtils.save(params.root.getOwnerDocument(), paramFile);
+			}
+			catch (Exception e1) {
 				org.txm.utils.logger.Log.printStackTrace(e1);
 			}
-
+			
 			return true;
 		}
 		System.out.println("Error while saving parameters.");
 		return false;
-
+		
 	}
-
+	
 	/**
-	 * Called by the "folder" button 
+	 * Called by the "folder" button
 	 */
 	public void selectSourceDir() {
-
+		
 		ImportWizard wiz = new ImportWizard();
 		WizardDialog wdialog = new WizardDialog(this.getEditor().getSite().getShell(), wiz);
 		wdialog.open();
-
+		
 		project = wiz.getProject();
 		if (project == null) {
-			//System.out.println("Error: no project created");
+			// System.out.println("Error: no project created");
 			return;
 		}
-		//TODO currently the script directory is the same as the import name
+		// TODO currently the script directory is the same as the import name
 		project.setImportModuleName(editor.getGroovyScript().getParentFile().getName());
 		
 		try {
 			loadParams();
-
+			
 			this.editor.getMetaPage().reload();
 			this.editor.firePropertyChange(IEditorPart.PROP_TITLE);
-		} catch (Exception e1) {
+		}
+		catch (Exception e1) {
 			org.txm.utils.logger.Log.printStackTrace(e1);
 		}
 	}
-
+	
 	public void startImport() {
-		//TODO: test all sections here
+		// TODO: test all sections here
 		project.setDirty();
 		project.setDoUpdate(false);
 		project.setNeedToBuild();
 		
+		if (project.getChildren().size() > 0) {
+			boolean b = MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), TXMUIMessages.warning, NLS.bind(TXMUIMessages.theP0CorpusDirectoryAlreadyExistsDoYouWantToReplaceIt, project
+					.getName()));
+			if (!b) {
+				Log.info(TXMUIMessages.abort);
+				return;
+			}
+		}
+		
 		DeleteObject.closeEditorOf(project, true);
 		
 		ExecuteImportScript.executeScript(project);
-
+		
 	}
-
-	//	private void updateEditionsSection() {
-	//		
-	//	}
+	
+	// private void updateEditionsSection() {
 	//
-	//	private void updateEncodingSection() {
-	//		
-	//	}
+	// }
 	//
-	//	private void updateFontSection() {
-	//		
-	//	}
+	// private void updateEncodingSection() {
 	//
-	//	private void updateFrontXsltSection()  {
-	//		
-	//	}
+	// }
 	//
-	//	private void updateLangSection() {
-	//		
-	//	}
+	// private void updateFontSection() {
 	//
-	//	protected void updatePAttributeSection() {
-	//		if (pattrSection.isDisposed()) return;
-	//		if (project == 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 (project == null) return;
-	//		preBuildViewer.getTable().getParent().layout();
-	//		Element queriesElem = params.getPreBuildElement(params.getCorpusElement());
-	//		preBuildViewer.setInput(queriesElem.getElementsByTagName("subcorpus")); //$NON-NLS-1$
+	// private void updateFrontXsltSection() {
 	//
-	//		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 (project == null) return;
-	//		queriesViewer.getTable().getParent().layout();
-	//		Element queriesElem = params.getQueriesElement(params.getCorpusElement());
-	//		queriesViewer.setInput(queriesElem.getElementsByTagName("query")); //$NON-NLS-1$
-	//	}
+	// private void updateLangSection() {
 	//
-	//	private void updateSAttributeSection() {
-	//		if (sattrSection.isDisposed()) return;
-	//		if (project == null) return;
-	//		sattributesViewer.getTable().getParent().layout();
-	//		Element queriesElem = params.getSAttributesElement(params.getCorpusElement());
-	//		sattributesViewer.setInput(queriesElem.getElementsByTagName("sattribute")); //$NON-NLS-1$
-	//	}
+	// }
 	//
-	//	private void updateTokenizerSection() {
+	// protected void updatePAttributeSection() {
+	// if (pattrSection.isDisposed()) return;
+	// if (project == 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 (project == null) return;
+	// preBuildViewer.getTable().getParent().layout();
+	// Element queriesElem = params.getPreBuildElement(params.getCorpusElement());
+	// preBuildViewer.setInput(queriesElem.getElementsByTagName("subcorpus")); //$NON-NLS-1$
 	//
-	//	private void updateUisSection() {
+	// 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 (project == 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 (project == 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() {
 		if (project == null) return null;
 		if (project.getSrcdir() == null) return null;
 		return project.getSrcdir().getAbsolutePath();
 	}
-
+	
 	public Project getProject() {
 		return project;
 	}
-}
\ No newline at end of file
+}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 2441)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 2442)
@@ -84,6 +84,7 @@
 import org.txm.searchengine.cqp.ReferencePattern;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.query.CQLQuery;
+import org.txm.utils.LogMonitor;
 import org.txm.utils.logger.Log;
 
 /**
@@ -855,6 +856,7 @@
 	// }
 	
 	
+	
 	/**
 	 * Computes the TXMResult if all required parameters are set then refreshes the editor UI.
 	 * Also loads and saves some parameters from result to Widgets fields and from Widgets fields to result.
@@ -1058,6 +1060,10 @@
 		IWorkbenchPage page = window.getActivePage();
 		try {
 			boolean wasAlreadyOpened = SWTEditorsUtils.isOpenEditor(editorInput, editorId);
+			// TODO pre-compute result ?
+			// if (!wasAlreadyOpened && (RCPPreferences.getInstance().getBoolean(RCPPreferences.AUTO_COMPUTE_ON_EDITOR_OPEN))) {
+			// editorInput.getResult().compute(false);
+			// }
 			
 			// opening the editor
 			IEditorPart e = page.openEditor(editorInput, editorId, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
@@ -1074,6 +1080,7 @@
 			else {
 				// TODO until the TXMResult don't know if its parameters are set by the user or by the default preference value, we need to use the AUTO_COMPUTE_ON_EDITOR_OPEN preference
 				// compute the result only if the editor wasn't already opened
+				
 				if ((RCPPreferences.getInstance().getBoolean(RCPPreferences.AUTO_COMPUTE_ON_EDITOR_OPEN))) {
 					editor.compute(false);
 				}
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 2441)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 2442)
@@ -201,8 +201,8 @@
 	public final static String DEFAULT_STRUCTURAL_UNIT_PROPERTY = "text_id"; //$NON-NLS-1$
 	// End of command preferences shared strings
 	
+	public static final String PERSITABLE = "persistable";
 	
-	
 	/**
 	 * Preferences node qualifier of the instance.
 	 */
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 2441)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 2442)
@@ -10,177 +10,211 @@
 import org.txm.utils.logger.Log;
 
 public class TBXPreferences extends TXMPreferences {
-
+	
 	public static String VERSION = "version";
-
+	
 	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$
+	
 	public static final String ADD_TECH_LOGS = "log_in_console"; //$NON-NLS-1$
+	
 	public static final String SHOW_TIMINGS = "show_timings"; //$NON-NLS-1$
+	
 	public static final String LOG_DIR = "log_directory"; //$NON-NLS-1$
+	
 	public static final String LOG_IN_FILE = "log_in_file"; //$NON-NLS-1$
+	
 	public static final String EXPERT_USER = "txm_expert_user"; //$NON-NLS-1$
+	
 	public static final String LOG_STACKTRACE = "log_stacktrace"; //$NON-NLS-1$
-
+	
 	/** 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 UI_LOCALE. */
 	public static final String UI_LOCALE = "ui_locale"; //$NON-NLS-1$
-
+	
 	/** The Constant INSTALL_DIR. */
 	public static final String INSTALL_DIR = "install_dir"; //$NON-NLS-1$
-
+	
 	/** The Constant USER_TXM_HOME. */
 	public static final String USER_TXM_HOME = "user_txm_home"; //$NON-NLS-1$
-
+	
 	public static final String METADATA_ENCODING = "metadata_encoding"; //$NON-NLS-1$
+	
 	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 EMPTY_PROPERTY_VALUE_CODE = "empty_property_value_code";
-
+	
 	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_COL_SEPARATOR = "export_colseparator"; //$NON-NLS-1$
+	
 	/** The Constant EXPORT_TXTSEPARATOR. */
 	public static final String EXPORT_TXT_SEPARATOR = "export_txtseparator"; //$NON-NLS-1$
-
+	
 	public static final String EDITION_DEFINITION_BUILD = "edition_definition_build"; //$NON-NLS-1$
+	
 	public static final String EDITION_DEFINITION_WORDS_PER_PAGE = "edition_definition_words_per_page"; //$NON-NLS-1$
+	
 	public static final String EDITION_DEFINITION_PAGE_BREAK_ELEMENT = "edition_definition_page_break_element"; //$NON-NLS-1$
+	
 	public static final String EDITION_DEFINITION_IMAGES_DIRECTORY = "edition_definition_images_directory"; //$NON-NLS-1$
-
+	
 	/**
 	 * To show or not all nodes in some views, eg. in CorporaView tree.
 	 */
 	public static final String SHOW_ALL_RESULT_NODES = "show_all_result_nodes"; //$NON-NLS-1$
+	
 	public static final String UPDATESITE = "update_site"; //$NON-NLS-1$
-
-
+	
+	
 	/**
 	 * To enable/disable the results persistence (save after a computing and load at Toolbox start).
 	 */
 	public static final String AUTO_PERSISTENCE_ENABLED = "auto_persistence_enabled"; //$NON-NLS-1$
-
+	
 	public static final String VALUE = "value";
+	
 	public static final String INDEX = "index";
+	
 	public static final String NAME = "name";
+	
 	public static final String NAMES = "names";
+	
 	public static final String TYPE = "type";
-
+	
 	public static final String SOURCE = "source";
+	
 	public static final String XMLTXM = "xmltxm";
-
+	
 	public static final String LANG = "lang";
+	
 	/**
 	 * start script of the import process of a corpus
 	 */
 	public static final String IMPORT_MODULE_NAME = "import_module_name";
+	
 	/**
 	 * corpus alignment configurations
 	 */
 	public static final String LINKS = "corpus_links";
-
+	
 	public static final String IMPORTXMLFILE = "import_xml_path";
-
+	
 	public static final String FONT = "font";
+	
 	public static final String AUTHOR = "author";
+	
 	public static final String FRONT_XSL = "front_xsl";
-
+	
 	public static final String DEFAULT_EDITION = "default_edition";
-
+	
 	public static final String FRONT_XSL_PARAMETERS = "front_xsl_parameters";
-
+	
 	public static final String DESCRIPTION = "description";
+	
 	public static final String ANNOTATE = "annotate";
-
+	
 	public static final String ID = "id";
-
+	
 	public static final String REF_PROPERTY = "ref_property";
+	
 	public static final String SORT_PROPERTY = "sort_property";
+	
 	public static final String VIEW_PROPERTY = "view_property";
-
+	
 	public static final String CLEAN = "clean.directories";
+	
 	public static final String TTMODEL = "annotate.model";
+	
 	public static final String TTANNOTATE = "annotate.run";
-
+	
 	public static final String MULTITHREAD = "multithread";
+	
 	public static final String DEBUG = "debug";
+	
 	public static final String UPDATECORPUS = "corpus.update";
-
+	
 	public static final String NORMALISEANAVALUES = "normalize.ana.values";
+	
 	public static final String NORMALISEATTRIBUTEVALUES = "normalize.attribute.values";
-
+	
 	public static final String CORPUS_VERSION = "corpus_version";
-
+	
 	/**
 	 * Gets the instance.
+	 * 
 	 * @return the instance
 	 */
-	public static TXMPreferences getInstance()	{
+	public static TXMPreferences getInstance() {
 		if (!TXMPreferences.instances.containsKey(TBXPreferences.class)) {
 			new TBXPreferences();
 		}
 		return TXMPreferences.instances.get(TBXPreferences.class);
 	}
-
-
+	
+	
 	@Override
 	public void initializeDefaultPreferences() {
 		super.initializeDefaultPreferences();
 		Preferences preferences = this.getDefaultPreferencesNode();
-
-		//		//FIXME: USE osgi.instance.area later & done in ApplicationWorkbenchAdvisor
-		//		preferences.put(TBXPreferences.USER_TXM_HOME, System.getProperty("user.home")+"/TXM");
-		//	preferences.put(TBXPreferences.USER_TXM_HOME, System.getProperty("user.home")); //$NON-NLS-1$
 		
+		// //FIXME: USE osgi.instance.area later & done in ApplicationWorkbenchAdvisor
+		// preferences.put(TBXPreferences.USER_TXM_HOME, System.getProperty("user.home")+"/TXM");
+		// preferences.put(TBXPreferences.USER_TXM_HOME, System.getProperty("user.home")); //$NON-NLS-1$
+		
 		preferences.putBoolean(TBXPreferences.EXPERT_USER, false);
 		preferences.putBoolean(TBXPreferences.VISIBLE, true);
 		preferences.putBoolean(TBXPreferences.CLEAN, true);
+		preferences.putBoolean(TBXPreferences.PERSITABLE, false);
 		
-
+		
 		// FIXME
 		preferences.putBoolean(TBXPreferences.ADD_TECH_LOGS, true);
 		preferences.putBoolean(TBXPreferences.LOG_STACKTRACE, true);
 		preferences.putBoolean(TBXPreferences.LOG_IN_FILE, false);
 		preferences.put(TBXPreferences.LOG_LEVEL, "INFO"); //$NON-NLS-1$
-
+		
 		preferences.put(TBXPreferences.IMPORT_DEFAULT_LANG, Locale.getDefault().getLanguage().toLowerCase());
 		preferences.put(TBXPreferences.UI_LOCALE, "fr"); //$NON-NLS-1$
-
-		preferences.put(TBXPreferences.LANG, Locale.getDefault().getLanguage().toLowerCase()); //$NON-NLS-1$
+		
+		preferences.put(TBXPreferences.LANG, Locale.getDefault().getLanguage().toLowerCase());
 		preferences.put(TBXPreferences.ENCODING, DEFAULT_ENCODING);
 		preferences.put(TBXPreferences.DEFAULT_EDITION, "default"); //$NON-NLS-1$
 		preferences.putBoolean(TBXPreferences.ANNOTATE, false);
-
+		
 		preferences.put(TBXPreferences.METADATA_ENCODING, "UTF-8"); //$NON-NLS-1$
 		preferences.put(TBXPreferences.METADATA_TXTSEPARATOR, "\""); //$NON-NLS-1$
 		preferences.put(TBXPreferences.METADATA_COLSEPARATOR, ","); //$NON-NLS-1$
 		preferences.put(TBXPreferences.EMPTY_PROPERTY_VALUE_CODE, "__UNDEF__"); //$NON-NLS-1$
-
+		
 		preferences.put(EXPORT_COL_SEPARATOR, "\t"); //$NON-NLS-1$
 		preferences.put(EXPORT_ENCODING, System.getProperty("file.encoding")); //$NON-NLS-1$
 		preferences.put(EXPORT_TXT_SEPARATOR, ""); //$NON-NLS-1$
 		preferences.putBoolean(EXPORT_SHOW, false);
-
+		
 		preferences.putBoolean(SHOW_ALL_RESULT_NODES, false);
 		preferences.putBoolean(AUTO_PERSISTENCE_ENABLED, false);
-
+		
 		if (Toolbox.getTxmHomePath().endsWith("-dev")) {
-			preferences.put(UPDATESITE, "file://"+System.getProperty("user.home")+"/workspace047/TXMReleasePlugins.site");
-		} else {
+			preferences.put(UPDATESITE, "file://" + System.getProperty("user.home") + "/workspace047/TXMReleasePlugins.site");
+		}
+		else {
 			preferences.put(UPDATESITE, "http://textometrie.ens-lyon.fr/dist");
 		}
 	}
Index: tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 2441)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 2442)
@@ -147,13 +147,9 @@
 	protected ArrayList<HashMap<String, Object>> parametersHistory = new ArrayList<>();
 	
 	/**
-	 * Internal persistable state.
-	 */
-	protected boolean internalPersistable;
-	
-	/**
 	 * User persistable state.
 	 */
+	@Parameter(key = TXMPreferences.PERSITABLE, type = Parameter.INTERNAL)
 	protected boolean userPersistable;
 	
 	/**
@@ -270,9 +266,11 @@
 		
 		this.visible = true;
 		this.dirty = true;
-		this.internalPersistable = false;
-		this.userPersistable = TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED);
 		
+		if (TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED)) {
+			this.userPersistable = true; // force persistable state if AUTO_PERSISTENCE_ENABLED is set
+		}
+		
 		// retrieving parent from UUID
 		String parentNodePath = this.getStringParameterValue(TXMPreferences.PARENT_PARAMETERS_NODE_PATH);
 		
@@ -2527,7 +2525,7 @@
 	 * @return true if the result as been internally marked as persistable (eg. Corpora, Partition) or if the user has marked the result
 	 */
 	public boolean mustBePersisted() {
-		return this.internalPersistable || this.userPersistable;
+		return this.isInternalPersistable() || this.userPersistable;
 	}
 	
 	/**
@@ -2731,19 +2729,10 @@
 	 * @return the persistable
 	 */
 	public boolean isInternalPersistable() {
-		return internalPersistable;
+		return false;
 	}
 	
 	/**
-	 * Sets the internal persistable state. Results internally persisted will not be deleted when quitting, event if the user set them as non persistable.
-	 * 
-	 * @param persistable the persistable to set
-	 */
-	public void setInternalPersistable(boolean persistable) {
-		this.internalPersistable = persistable;
-	}
-	
-	/**
 	 * Gets the lazy name.
 	 * Since some result names need computed data, this name is dedicated to display the result name even if it has not been recomputed after being loaded.
 	 * 
@@ -2765,55 +2754,42 @@
 	/**
 	 * Sets the user defined persistable state of the result.
 	 * 
-	 * If doCheck is equal to true:
-	 * - propagates persistence to parent and non-persistence to the children if needed.
-	 * - also copies parameters values from Java annotations to result preferences node and flushes the node to file.
-	 * 
-	 * @param userPersistable
-	 * @param doCheck
+	 * @param userPersistable the state to set
 	 */
-	public void setUserPersistable(boolean userPersistable, boolean doCheck) {
+	public void setUserPersistable(boolean userPersistable) {
 		this.userPersistable = userPersistable;
 		
+		// 1- MANAGE THE PARENTS
+		// force persistable state of the parent if this result is set to persistable
+		if (userPersistable && this.parent != null && !this.parent.isInternalPersistable()) {
+			this.parent.setUserPersistable(true);
+		} // un persist parent if it is not visible (internal persistable parent is always visible)
+		else if (!userPersistable && !parent.isVisible()) {
+			this.parent.setUserPersistable(false);
+		}
 		
-		if (!doCheck) {
-			
-			// force persistable state of the parent if this result is set to persistable
-			if (userPersistable && this.parent != null && !this.parent.isInternalPersistable()) {
-				this.parent.setUserPersistable(true);
+		// 2- MANAGE THE CHILDREN
+		// force non-persistable state of children if this result is set to non-persistable
+		if (!userPersistable) {
+			for (TXMResult child : getChildren()) {
+				child.setUserPersistable(userPersistable);
 			}
-			
-			// force non-persistable state of children if this result is set to non-persistable
-			if (!userPersistable) {
-				for (TXMResult child : getChildren()) {
-					child.setUserPersistable(userPersistable);
-				}
+		}
+		
+		// directly save and flush the preference
+		try {
+			if (this.isUserPersistable()) {
+				this.autoSaveParametersFromAnnotations();
+				this.saveParameters();
+				TXMPreferences.flush(this);
 			}
-			
-			// directly save and flush the preference
-			try {
-				if (this.isUserPersistable()) {
-					this.autoSaveParametersFromAnnotations();
-					this.saveParameters();
-					TXMPreferences.flush(this);
-				}
-			}
-			catch (Exception e) {
-				e.printStackTrace();
-			}
 		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}
 	}
 	
 	/**
-	 * Sets the user defined persistable state of the result.
-	 * 
-	 * @param userPersistable the state to set
-	 */
-	public void setUserPersistable(boolean userPersistable) {
-		this.setUserPersistable(userPersistable, true);
-	}
-	
-	/**
 	 * Swaps the user persistable state.
 	 * 
 	 * propagate persistence to parent if necessary
Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 2441)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 2442)
@@ -177,7 +177,6 @@
 		super("/project/" + name + "/" + createUUID() + "_Project", workspace);
 		
 		this.needToBuild = needToBuild;
-		this.internalPersistable = true;
 		this.userName = name;
 		this.dirty = false;
 		this.hasBeenComputedOnce = true;
@@ -286,7 +285,6 @@
 		super(parametersNodePath);
 		
 		this.needToBuild = false;
-		this.internalPersistable = true;
 		this.dirty = false;
 		this.hasBeenComputedOnce = true;
 		this.setVisible(false);
@@ -310,6 +308,10 @@
 		this.loadResults(null);
 	}
 	
+	@Override
+	public boolean isInternalPersistable() {
+		return true;
+	}
 	
 	@Override
 	public boolean canCompute() throws Exception {
@@ -532,11 +534,10 @@
 				// }
 				loaded.put(resultNodePath, result);
 				
-				// not an internal persistence (eg. corpus or partition)
-				if (!result.isInternalPersistable()) {
-					result.setUserPersistable(true, false);
+				// TODO TXM 0.8.0 compatibility code: set user persistable to true is the result restored and was not an internal persistable result. See the userPErsitable member
+				if (!result.isInternalPersistable() && !result.isUserPersistable()) {
+					result.setUserPersistable(true);
 				}
-				
 			}
 			catch (Exception e) {
 				// TODO Auto-generated catch block
Index: tmp/org.txm.core/src/java/org/txm/objects/Partition.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Partition.java	(revision 2441)
+++ tmp/org.txm.core/src/java/org/txm/objects/Partition.java	(revision 2442)
@@ -33,14 +33,13 @@
  * Partition abstract representation.
  */
 public abstract class Partition extends TXMResult {
-
+	
 	/**
 	 * 
 	 * @param parent
 	 */
 	public Partition(CorpusBuild parent) {
 		super(parent);
-		this.internalPersistable = true;
 	}
 	
 	/**
@@ -49,7 +48,6 @@
 	 */
 	public Partition(String parametersNodePath) {
 		super(parametersNodePath);
-		this.internalPersistable = true;
 	}
 	
 	/**
@@ -59,4 +57,9 @@
 	public CorpusBuild getCorpus() {
 		return (CorpusBuild) this.getParent();
 	}
+	
+	@Override
+	public boolean isInternalPersistable() {
+		return true;
+	}
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Text.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Text.java	(revision 2441)
+++ tmp/org.txm.core/src/java/org/txm/objects/Text.java	(revision 2442)
@@ -41,17 +41,18 @@
  * The Class Text.
  */
 public class Text extends TXMResult {
-
-	//	/** The editions. */
-	//	HashMap<String, Edition> editions = new HashMap<String, Edition>();
-
+	
+	// /** The editions. */
+	// HashMap<String, Edition> editions = new HashMap<String, Edition>();
+	
 	/** The source file. */
-	@Parameter(key=TBXPreferences.SOURCE)
+	@Parameter(key = TBXPreferences.SOURCE)
 	File pSource;
+	
 	/** The XML-TXM file. */
-	@Parameter(key=TBXPreferences.XMLTXM)
+	@Parameter(key = TBXPreferences.XMLTXM)
 	File pXMLTXMFile;
-
+	
 	/**
 	 * Instantiates a new text.
 	 *
@@ -60,15 +61,15 @@
 	 */
 	public Text(Project project) {
 		super(project);
-
+		
 		this.setVisible(false);
-		this.internalPersistable = true;
 	}
-
+	
+	@Override
 	public Project getParent() {
 		return (Project) super.getParent();
 	}
-
+	
 	/**
 	 * Instantiates a new text.
 	 *
@@ -77,19 +78,23 @@
 	 */
 	public Text(String parametersNodePath) {
 		super(parametersNodePath);
-
+		
 		this.setVisible(false);
-		this.internalPersistable = true;
 	}
-
-	/* 
-	 * Retro compatiblity to load Editions from a XML Element 
+	
+	@Override
+	public boolean isInternalPersistable() {
+		return true;
+	}
+	
+	/*
+	 * Retro compatiblity to load Editions from a XML Element
 	 */
 	protected boolean _load(Element e) {
 		Element src = (Element) e
 				.getElementsByTagName("source").item(0); //$NON-NLS-1$
 		pSource = new File(src.getAttribute("file")); //$NON-NLS-1$
-		//sourcetype = src.getAttribute("type"); //$NON-NLS-1$
+		// sourcetype = src.getAttribute("type"); //$NON-NLS-1$
 		try {
 			String biblio = e.getAttribute("biblio"); //$NON-NLS-1$
 			if (biblio != null && biblio.length() > 0) {
@@ -97,8 +102,10 @@
 				ed.setName("biblio");
 				ed.setIndex(biblio);
 			}
-		} catch (Exception e2) {	} 
-
+		}
+		catch (Exception e2) {
+		}
+		
 		try {
 			String pdf = e.getAttribute("pdf"); //$NON-NLS-1$
 			if (pdf != null && pdf.length() > 0) {
@@ -106,23 +113,25 @@
 				ed.setName("pdf");
 				ed.setIndex(pdf);
 			}
-		} catch (Exception e2) {	} 
-
+		}
+		catch (Exception e2) {
+		}
+		
 		userName = e.getAttribute("name"); //$NON-NLS-1$
-
+		
 		Element editionsnode = (Element) e.getElementsByTagName("editions").item(0); //$NON-NLS-1$
 		NodeList editionList = editionsnode.getElementsByTagName("edition"); //$NON-NLS-1$
-
-		//System.out.println(" build text "+name+" nb editions: "+editionList.getLength());
+		
+		// System.out.println(" build text "+name+" nb editions: "+editionList.getLength());
 		for (int i = 0; i < editionList.getLength(); i++) {
 			Element edition = (Element) editionList.item(i);
 			Edition ed = new Edition(this);
 			ed._load(edition);
 		}
-
+		
 		return true;
 	}
-
+	
 	/**
 	 * Gets the editions.
 	 *
@@ -132,7 +141,7 @@
 	public List<Edition> getEditions() {
 		return (List<Edition>) getChildren(Edition.class);
 	}
-
+	
 	/**
 	 * Gets the edition.
 	 *
@@ -148,48 +157,48 @@
 		}
 		return null;
 	}
-
-	//	/**
-	//	 * Adds the edition.
-	//	 *
-	//	 * @param name the name
-	//	 * @param type the type
-	//	 * @param index the index
-	//	 * @return the edition
-	//	 */
-	//	public Edition addEdition(String name, String type, File index) {
-	//		Document doc = getSelfElement().getOwnerDocument();
-	//		Element editionRoot = (Element) getSelfElement().getElementsByTagName(
-	//				"editions").item(0); //$NON-NLS-1$
-	//		Element editionElem = doc.createElement("edition"); //$NON-NLS-1$
-	//		editionElem.setAttribute("name", name); //$NON-NLS-1$
-	//		editionElem.setAttribute("type", type); //$NON-NLS-1$
-	//		editionElem.setAttribute("index", index.getAbsolutePath()); //$NON-NLS-1$
-	//		editionRoot.appendChild(editionElem);
+	
+	// /**
+	// * Adds the edition.
+	// *
+	// * @param name the name
+	// * @param type the type
+	// * @param index the index
+	// * @return the edition
+	// */
+	// public Edition addEdition(String name, String type, File index) {
+	// Document doc = getSelfElement().getOwnerDocument();
+	// Element editionRoot = (Element) getSelfElement().getElementsByTagName(
+	// "editions").item(0); //$NON-NLS-1$
+	// Element editionElem = doc.createElement("edition"); //$NON-NLS-1$
+	// editionElem.setAttribute("name", name); //$NON-NLS-1$
+	// editionElem.setAttribute("type", type); //$NON-NLS-1$
+	// editionElem.setAttribute("index", index.getAbsolutePath()); //$NON-NLS-1$
+	// editionRoot.appendChild(editionElem);
 	//
-	//		Edition e = new Edition(this, editionElem);
-	//		e.setPath(this.getPath() + e.name);
-	//		editions.put(name, e);
-	//		return e;
-	//	}
+	// Edition e = new Edition(this, editionElem);
+	// e.setPath(this.getPath() + e.name);
+	// editions.put(name, e);
+	// return e;
+	// }
 	//
-	//	/**
-	//	 * Removes the edition.
-	//	 *
-	//	 * @param name the name
-	//	 * @return the edition
-	//	 */
-	//	public Edition removeEdition(String name) {
-	//		Edition e = editions.get(name);
-	//		if (e != null) {
-	//			Element editionRoot = (Element) getSelfElement().getElementsByTagName(
-	//					"editions").item(0); //$NON-NLS-1$
-	//			editionRoot.removeChild(e.getSelfElement());
-	//			editions.remove(name);
-	//		}
-	//		return e;
-	//	}
-
+	// /**
+	// * Removes the edition.
+	// *
+	// * @param name the name
+	// * @return the edition
+	// */
+	// public Edition removeEdition(String name) {
+	// Edition e = editions.get(name);
+	// if (e != null) {
+	// Element editionRoot = (Element) getSelfElement().getElementsByTagName(
+	// "editions").item(0); //$NON-NLS-1$
+	// editionRoot.removeChild(e.getSelfElement());
+	// editions.remove(name);
+	// }
+	// return e;
+	// }
+	
 	/**
 	 * Gets the source file.
 	 *
@@ -202,7 +211,7 @@
 	public File getXMLTXMFile() {
 		return pXMLTXMFile;
 	}
-
+	
 	/**
 	 * Gets the PDF edition page path.
 	 *
@@ -211,7 +220,7 @@
 	public String getPDFPath() {
 		return getEdition("PDF").getIndex();
 	}
-
+	
 	/**
 	 * Gets the biblio edition page path.
 	 *
@@ -220,17 +229,17 @@
 	public String getBiblioPath() {
 		return getEdition("biblio").getIndex();
 	}
-
+	
 	@Override
 	public boolean saveParameters() throws Exception {
 		return true;
 	}
-
+	
 	@Override
 	public boolean loadParameters() throws Exception {
 		return true;
 	}
-
+	
 	@Override
 	public boolean setParameters(TXMParameters parameters) throws Exception {
 		String path = parameters.getString(TBXPreferences.SOURCE);
@@ -243,65 +252,65 @@
 		}
 		return true;
 	}
-
+	
 	public void setName(String name) {
 		this.userName = name;
 	}
-
+	
 	public void setSourceFile(File src) {
 		if (pSource == null || !pSource.equals(src)) {
 			this.pSource = src;
 			this.dirty = true;
 		}
 	}
-
+	
 	public void setTXMFile(File txmFile) {
 		this.pXMLTXMFile = txmFile;
 	}
-
+	
 	@Override
 	public String getName() {
 		return userName;
 	}
-
+	
 	@Override
 	public String getSimpleName() {
 		return userName;
 	}
-
+	
 	@Override
 	public String getDetails() {
 		return userName;
 	}
-
+	
 	@Override
 	public void clean() {
 		if (pXMLTXMFile != null && pXMLTXMFile.exists()) {
 			pXMLTXMFile.delete();
 		}
 	}
-
+	
 	@Override
 	public boolean canCompute() throws Exception {
-		return true;//pSource.exists() || pTXMFile.exists();
+		return true;// pSource.exists() || pTXMFile.exists();
 	}
-
+	
 	@Override
 	protected boolean _compute() throws Exception {
-		//TODO System.out.println("CALL IMPORTMODULE TO BUILD TEXT="+userName);
+		// TODO System.out.println("CALL IMPORTMODULE TO BUILD TEXT="+userName);
 		return true;
 	}
-
+	
 	@Override
 	public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception {
 		return false;
 	}
-
+	
 	@Override
 	public String getResultType() {
 		return "Text";
 	}
-
+	
 	@Override
 	public String toString() {
 		return userName + " (file: " + pXMLTXMFile + ")";
Index: tmp/org.txm.core/src/java/org/txm/objects/CorpusBuild.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/CorpusBuild.java	(revision 2441)
+++ tmp/org.txm.core/src/java/org/txm/objects/CorpusBuild.java	(revision 2442)
@@ -54,65 +54,95 @@
  * The abstract Corpus class.
  */
 public abstract class CorpusBuild extends TXMResult {
-
-	@Parameter(key=TBXPreferences.ID)
+	
+	@Parameter(key = TBXPreferences.ID)
 	protected String pID;
-
+	
 	public static final String TEXT = "text";
+	
 	public static final String TEXTS = "texts";
+	
 	public static final String BIBLIO = "biblio";
+	
 	public static final String PDF = "pdf";
+	
 	public static final String SOURCE = "source";
+	
 	public static final String TYPE = "type";
+	
 	public static final String FILE = "file";
+	
 	public static final String EDITIONS = "editions";
+	
 	public static final String EDITION = "edition";
+	
 	public static final String NAME = "name";
+	
 	public static final String LANG = "lang";
+	
 	public static final String WORDSPERPAGE = "wordsperpage";
+	
 	public static final String DOEDITIONSTEP = "doeditionstep";
+	
 	public static final String AVOIDXMLSTEPS = "avoidxmlsteps";
+	
 	public static final String CLEANTEMPDIRS = "cleantempdirectories";
+	
 	public static final String CORPUS = "corpus";
+	
 	public static final String CORPORA = "corpora";
+	
 	public static final String ID = "id";
+	
 	public static final String DEFAULT = "default";
-
+	
 	/** The importmetadatas. */
-	public ArrayList<Metadata> importmetadatas = new ArrayList<Metadata>();
-	public ArrayList<MetadataGroup> groupedMetadatas = new ArrayList<MetadataGroup>();
-
+	public ArrayList<Metadata> importmetadatas = new ArrayList<>();
+	
+	public ArrayList<MetadataGroup> groupedMetadatas = new ArrayList<>();
+	
 	/** The p attribute info names. */
-	private static String[] attributeInfoNames = {ID, "shortname", "longname", TYPE, "renderer", "tooltip", "pattern", "import", "mandatory", "inputFormat", "outputFormat"};
-	private HashMap<String, HashMap<String, String>> pPAttributesInformations = new HashMap<String, HashMap<String,String>>();
-	private HashMap<String, HashMap<String, String>> pSAttributesInformations = new HashMap<String, HashMap<String,String>>();
-
-	private ArrayList<String> refProperties = new ArrayList<String>();
-	private ArrayList<String> sortProperties = new ArrayList<String>();
-	private ArrayList<String> viewProperties = new ArrayList<String>();
-
-	private HashMap<String, Alignement> links = new HashMap<String, Alignement>();
-
-	@Parameter(key=TBXPreferences.DESCRIPTION)
+	private static String[] attributeInfoNames = { ID, "shortname", "longname", TYPE, "renderer", "tooltip", "pattern", "import", "mandatory", "inputFormat", "outputFormat" };
+	
+	private HashMap<String, HashMap<String, String>> pPAttributesInformations = new HashMap<>();
+	
+	private HashMap<String, HashMap<String, String>> pSAttributesInformations = new HashMap<>();
+	
+	private ArrayList<String> refProperties = new ArrayList<>();
+	
+	private ArrayList<String> sortProperties = new ArrayList<>();
+	
+	private ArrayList<String> viewProperties = new ArrayList<>();
+	
+	private HashMap<String, Alignement> links = new HashMap<>();
+	
+	@Parameter(key = TBXPreferences.DESCRIPTION)
 	private String pDescription;
-
+	
 	// The default properties to use
-	@Parameter(key=TBXPreferences.REF_PROPERTY)
+	@Parameter(key = TBXPreferences.REF_PROPERTY)
 	private String pDefaultRefProperty;
-	@Parameter(key=TBXPreferences.SORT_PROPERTY)
+	
+	@Parameter(key = TBXPreferences.SORT_PROPERTY)
 	private String pDefaultSortProperty;
-	@Parameter(key=TBXPreferences.VIEW_PROPERTY)
+	
+	@Parameter(key = TBXPreferences.VIEW_PROPERTY)
 	private String pDefaultViewProperty;
-
+	
 	private int pageSize;
+	
 	private boolean doEditionStep;
+	
 	private boolean avoidXMLSteps;
+	
 	private boolean cleanTempDirs;
-
+	
 	protected String cql_limit_query = "<text>[]"; // read only
+	
 	protected int conc_left_context = 8; // read only
+	
 	protected int conc_right_context = 12; // read only
-
+	
 	/**
 	 * Instantiates a new root corpus.
 	 *
@@ -120,19 +150,23 @@
 	 */
 	public CorpusBuild(Project project) {
 		super(project);
-		this.internalPersistable = true;
-
-		//		this.name = name;
-		//		this.persistable = true;
-		//		this.userPersistable = false;
-		//		if(base != null && c != null) {
-		//			this.project = project;
-		//			this.setPath(base.getPath() + getName());
-		//			setSelfElement(c);
-		//			_load();
-		//		}
+		
+		// this.name = name;
+		// this.persistable = true;
+		// this.userPersistable = false;
+		// if(base != null && c != null) {
+		// this.project = project;
+		// this.setPath(base.getPath() + getName());
+		// setSelfElement(c);
+		// _load();
+		// }
 	}
-
+	
+	@Override
+	public boolean isInternalPersistable() {
+		return true;
+	}
+	
 	/**
 	 * Instantiates a new sub corpus
 	 * 
@@ -140,7 +174,6 @@
 	 */
 	public CorpusBuild(CorpusBuild corpus2) {
 		super(corpus2);
-		this.internalPersistable = true;
 	}
 	
 	/**
@@ -150,16 +183,14 @@
 	 */
 	public CorpusBuild(Partition partition) {
 		super(partition);
-		this.internalPersistable = true;
 	}
-
+	
 	/**
 	 * 
 	 * @param parametersNodePath
 	 */
 	public CorpusBuild(String parametersNodePath) {
 		super(parametersNodePath);
-		this.internalPersistable = true;
 	}
 	
 	public String getID() {
@@ -181,15 +212,15 @@
 	public String getCQLLimitQuery() {
 		return cql_limit_query;
 	}
-
+	
 	public int getDefaultConcordanceLeftContextSize() {
 		return conc_left_context;
 	}
-
+	
 	public int getDefaultConcordanceRightContextSize() {
 		return conc_right_context;
 	}
-
+	
 	/**
 	 * Gets the queries log.
 	 *
@@ -199,34 +230,34 @@
 	public List<SavedQuery> getQueriesLog() {
 		return (List<SavedQuery>) getChildren(SavedQuery.class);
 	}
-
-//	/**
-//	 * Adds Texts from a directory of sources.
-//	 *
-//	 * @param directory the directory
-//	 * @return true, if successful
-//	 */
-//	public boolean addDirectory(File directory) {
-//		FileFilter filter = new FileFilter() {
-//			@Override
-//			public boolean	accept(File pathname) {
-//				return !pathname.isHidden();
-//			}
-//		};
-//		if (directory.isDirectory() && directory.exists()) {
-//			File[] files = directory.listFiles(filter);
-//			Arrays.sort(files);
-//			for (File f : files) {
-//				Text t = new Text(this.getProject());
-//				t.setSourceFile(f);
-//			}
-//		} else {
-//			System.out.println(directory + " is not a directory.");
-//			return false;
-//		}
-//		return true;
-//	}
 	
+	// /**
+	// * Adds Texts from a directory of sources.
+	// *
+	// * @param directory the directory
+	// * @return true, if successful
+	// */
+	// public boolean addDirectory(File directory) {
+	// FileFilter filter = new FileFilter() {
+	// @Override
+	// public boolean accept(File pathname) {
+	// return !pathname.isHidden();
+	// }
+	// };
+	// if (directory.isDirectory() && directory.exists()) {
+	// File[] files = directory.listFiles(filter);
+	// Arrays.sort(files);
+	// for (File f : files) {
+	// Text t = new Text(this.getProject());
+	// t.setSourceFile(f);
+	// }
+	// } else {
+	// System.out.println(directory + " is not a directory.");
+	// return false;
+	// }
+	// return true;
+	// }
+	
 	/**
 	 * 
 	 * @return the corpus language. Override this method to set another lang. eg for parallel corpus
@@ -234,81 +265,80 @@
 	public String getLang() {
 		return getProject().getLang();
 	}
-
-//	/**
-//	 * Adds the text.
-//	 *
-//	 * @param file the file
-//	 * @return the text
-//	 */
-//	public Text addText(File file) {
-//		if (texts.containsKey(file.getName()))
-//			return texts.get(file.getName());
-//
-//		String filename = file.getName();
-//		int idx = filename.lastIndexOf(".");
-//		String txtname = filename;
-//		if(idx > 0)
-//			txtname = filename.substring(0, idx);
-//
-//		Document doc = getSelfElement().getOwnerDocument();
-//		Element textRoot = (Element) getSelfElement().getElementsByTagName(TEXTS).item(0); //$NON-NLS-1$
-//		Element textElem = doc.createElement(TEXT); 
-//		textElem.setAttribute(NAME, txtname); 
-//		textElem.setAttribute(BIBLIO, ""); //$NON-NLS-1$
-//		textElem.setAttribute(PDF, ""); //$NON-NLS-1$
-//		Element src = doc.createElement(SOURCE); 
-//		src.setAttribute(TYPE, filename.substring(idx+1)); 
-//		src.setAttribute(FILE, file.getAbsolutePath()); 
-//
-//		textElem.appendChild(src);
-//		Element editions = doc.createElement(EDITIONS);
-//		textElem.appendChild(editions);
-//		textRoot.appendChild(textElem);
-//
-//		Text t = new Text(this, textElem);
-//		if (texts.keySet().contains(txtname)) {
-//			System.out.println("Warning corpus configuration file contains texts with the same ID: "+txtname+" (next ones are ignored).");
-//			return null;
-//		}
-//		texts.put(txtname, t);
-//		textnames.add(t.getName());
-//		return t;
-//	}
-//
-//	/**
-//	 * Removes the text.
-//	 *
-//	 * @param name the name
-//	 * @return the text
-//	 */
-//	public Text removeText(String name) {
-//		Text text = texts.get(name);
-//
-//		if (text != null) {
-//			Element textRoot = (Element) getSelfElement().getElementsByTagName(
-//					TEXTS).item(0); //$NON-NLS-1$
-//			textRoot.removeChild(text.getSelfElement());
-//			texts.remove(name);
-//			textnames.remove(name);
-//		}
-//		return text;
-//	}
-
-	/* 
+	
+	// /**
+	// * Adds the text.
+	// *
+	// * @param file the file
+	// * @return the text
+	// */
+	// public Text addText(File file) {
+	// if (texts.containsKey(file.getName()))
+	// return texts.get(file.getName());
+	//
+	// String filename = file.getName();
+	// int idx = filename.lastIndexOf(".");
+	// String txtname = filename;
+	// if(idx > 0)
+	// txtname = filename.substring(0, idx);
+	//
+	// Document doc = getSelfElement().getOwnerDocument();
+	// Element textRoot = (Element) getSelfElement().getElementsByTagName(TEXTS).item(0); //$NON-NLS-1$
+	// Element textElem = doc.createElement(TEXT);
+	// textElem.setAttribute(NAME, txtname);
+	// textElem.setAttribute(BIBLIO, ""); //$NON-NLS-1$
+	// textElem.setAttribute(PDF, ""); //$NON-NLS-1$
+	// Element src = doc.createElement(SOURCE);
+	// src.setAttribute(TYPE, filename.substring(idx+1));
+	// src.setAttribute(FILE, file.getAbsolutePath());
+	//
+	// textElem.appendChild(src);
+	// Element editions = doc.createElement(EDITIONS);
+	// textElem.appendChild(editions);
+	// textRoot.appendChild(textElem);
+	//
+	// Text t = new Text(this, textElem);
+	// if (texts.keySet().contains(txtname)) {
+	// System.out.println("Warning corpus configuration file contains texts with the same ID: "+txtname+" (next ones are ignored).");
+	// return null;
+	// }
+	// texts.put(txtname, t);
+	// textnames.add(t.getName());
+	// return t;
+	// }
+	//
+	// /**
+	// * Removes the text.
+	// *
+	// * @param name the name
+	// * @return the text
+	// */
+	// public Text removeText(String name) {
+	// Text text = texts.get(name);
+	//
+	// if (text != null) {
+	// Element textRoot = (Element) getSelfElement().getElementsByTagName(
+	// TEXTS).item(0); //$NON-NLS-1$
+	// textRoot.removeChild(text.getSelfElement());
+	// texts.remove(name);
+	// textnames.remove(name);
+	// }
+	// return text;
+	// }
+	
+	/*
 	 * Load Text from a XML DOM Element -> retro compatibility of import.xml file
-	 * 
-	 * Texts&Queries are created in 
+	 * Texts&Queries are created in
 	 */
 	protected boolean _load(Element e) {
 		if (e == null) return false;
-
+		
 		this.userName = e.getAttribute(NAME);
-		this.pID = e.getAttribute(NAME); 
-//		this.pLanguage = e.getAttribute(LANG);
+		this.pID = e.getAttribute(NAME);
+		// this.pLanguage = e.getAttribute(LANG);
 		// System.out.println("LOAD BASE "+this.name);
 		loadImportInfos(e);
-
+		
 		// get texts
 		NodeList textsNodes = e.getElementsByTagName(TEXTS);
 		if (textsNodes.getLength() > 0) {
@@ -318,15 +348,15 @@
 				Element textElement = (Element) textsList.item(i);
 				Text t = new Text(this.getProject());
 				t._load(textElement);
-//				if (texts.keySet().contains(t.getName())) {
-//					System.out.println("Warning "+this.name+" corpus configuration file contains duplicates with ID="+t.getName()+" (next ones are ignored).");
-//				} else {
-//					texts.put(t.getName(), t);
-//					textnames.add(t.getName());
-//				}
+				// if (texts.keySet().contains(t.getName())) {
+				// System.out.println("Warning "+this.name+" corpus configuration file contains duplicates with ID="+t.getName()+" (next ones are ignored).");
+				// } else {
+				// texts.put(t.getName(), t);
+				// textnames.add(t.getName());
+				// }
 			}
 		}
-
+		
 		// get saved queries
 		if (e.getElementsByTagName("queries").getLength() > 0) { //$NON-NLS-1$
 			Element queriesElement = (Element) e.getElementsByTagName("queries").item(0); //$NON-NLS-1$
@@ -335,115 +365,116 @@
 				Element qelem = (Element) queryList.item(i);
 				SavedQuery q = new SavedQuery(this);
 				q.setParameters(qelem);
-				//this.queries.put(q.getName(), q);
+				// this.queries.put(q.getName(), q);
 			}
 		}
-
-		//loadImportInfos(getSelfElement());
 		
+		// loadImportInfos(getSelfElement());
+		
 		return true;
 	}
-
-//	/**
-//	 * Adds the query log.
-//	 *
-//	 * @param query the query
-//	 * @param examples the examples
-//	 * @return the query log
-//	 */
-//	public SavedQuery addQueryLog(String query, List<String> examples) {
-//		if (queries.containsKey(query))
-//			return queries.get(query);
-//		if (getSelfElement() == null) return null;
-//
-//		SavedQuery q = new SavedQuery(this);
-//		q.setParameter(query, examples);
-//
-//		// q.selfElement = ;
-//		Document doc = getSelfElement().getOwnerDocument();
-//		Element queriesRoot;
-//		if (getSelfElement().getElementsByTagName("queries").getLength() == 0) //$NON-NLS-1$
-//		{
-//			queriesRoot = doc.createElement("queries"); //$NON-NLS-1$
-//			getSelfElement().appendChild(queriesRoot);
-//		} else
-//			queriesRoot = (Element) getSelfElement()
-//			.getElementsByTagName("queries").item(0); //$NON-NLS-1$
-//
-//		Element queryElem = doc.createElement("query"); //$NON-NLS-1$
-//		queryElem.setAttribute(NAME, q.getName()); 
-//		queryElem.setAttribute("query", q.getQuery()); //$NON-NLS-1$
-//		Element examplesElem = doc.createElement("examples"); //$NON-NLS-1$
-//		queryElem.appendChild(examplesElem);
-//		for (String ex : q.getExamples()) {
-//			Element exampleElem = doc.createElement("example"); //$NON-NLS-1$
-//			exampleElem.setTextContent(ex);
-//			examplesElem.appendChild(exampleElem);
-//		}
-//
-//		queriesRoot.appendChild(queryElem);
-//		queries.put(q.getName(), q);
-//		return q;
-//	}
-//
-//	/**
-//	 * Removes the query.
-//	 *
-//	 * @param name the name
-//	 * @return the query log
-//	 */
-//	public SavedQuery removeQuery(String name) {
-//		SavedQuery query = queries.get(name);
-//
-//		if (query != null) {
-//			Element queriesRoot = (Element) getSelfElement().getElementsByTagName(
-//					"queries").item(0); //$NON-NLS-1$
-//			queriesRoot.removeChild(query.getSelfElement());
-//			queries.remove(name);
-//		}
-//		return query;
-//	}
-
-	//	/* (non-Javadoc)
-	//	 * @see org.txm.objects.TxmObject#removeChildren(org.txm.objects.TxmObject)
-	//	 */
-	//	public TxmObject removeChildren(TxmObject o) {
-	//		if (o == null)
-	//			return null;
-	//		if (o instanceof Text) {
-	//			textsElement.removeChild(o.getSelfElement());
-	//			textnames.remove(((Text) o).getName());
-	//			return texts.remove(((Text) o).getName());
-	//		} else if (o instanceof SavedQuery) {
-	//			queriesElement.removeChild(o.getSelfElement());
-	//			return queries.remove(((SavedQuery) o).getName());
-	//		}
-	//		return null;
-	//	}
-
-
-//
-//	/**
-//	 * Register maincorpus.
-//	 *
-//	 * @param corpusName the corpus name
-//	 */
-//	public Element registerMaincorpus(String corpusName) {
-//		Document doc = getSelfElement().getOwnerDocument();
-//		Element maincorpus = doc.createElement(CORPUS);
-//		maincorpus.setAttribute(NAME, corpusName);
-//		if (getSelfElement().getElementsByTagName(CORPORA).getLength() == 0) {
-//			Log.severe(TXMCoreMessages.Base_22);
-//			return null;
-//		}
-//		Element corporaElem = (Element) getSelfElement().getElementsByTagName(CORPORA).item(0);
-//		corporaElem.appendChild(maincorpus); // append maincorpus
-//		return maincorpus;
-//	}
-
+	
+	// /**
+	// * Adds the query log.
+	// *
+	// * @param query the query
+	// * @param examples the examples
+	// * @return the query log
+	// */
+	// public SavedQuery addQueryLog(String query, List<String> examples) {
+	// if (queries.containsKey(query))
+	// return queries.get(query);
+	// if (getSelfElement() == null) return null;
+	//
+	// SavedQuery q = new SavedQuery(this);
+	// q.setParameter(query, examples);
+	//
+	// // q.selfElement = ;
+	// Document doc = getSelfElement().getOwnerDocument();
+	// Element queriesRoot;
+	// if (getSelfElement().getElementsByTagName("queries").getLength() == 0) //$NON-NLS-1$
+	// {
+	// queriesRoot = doc.createElement("queries"); //$NON-NLS-1$
+	// getSelfElement().appendChild(queriesRoot);
+	// } else
+	// queriesRoot = (Element) getSelfElement()
+	// .getElementsByTagName("queries").item(0); //$NON-NLS-1$
+	//
+	// Element queryElem = doc.createElement("query"); //$NON-NLS-1$
+	// queryElem.setAttribute(NAME, q.getName());
+	// queryElem.setAttribute("query", q.getQuery()); //$NON-NLS-1$
+	// Element examplesElem = doc.createElement("examples"); //$NON-NLS-1$
+	// queryElem.appendChild(examplesElem);
+	// for (String ex : q.getExamples()) {
+	// Element exampleElem = doc.createElement("example"); //$NON-NLS-1$
+	// exampleElem.setTextContent(ex);
+	// examplesElem.appendChild(exampleElem);
+	// }
+	//
+	// queriesRoot.appendChild(queryElem);
+	// queries.put(q.getName(), q);
+	// return q;
+	// }
+	//
+	// /**
+	// * Removes the query.
+	// *
+	// * @param name the name
+	// * @return the query log
+	// */
+	// public SavedQuery removeQuery(String name) {
+	// SavedQuery query = queries.get(name);
+	//
+	// if (query != null) {
+	// Element queriesRoot = (Element) getSelfElement().getElementsByTagName(
+	// "queries").item(0); //$NON-NLS-1$
+	// queriesRoot.removeChild(query.getSelfElement());
+	// queries.remove(name);
+	// }
+	// return query;
+	// }
+	
+	// /* (non-Javadoc)
+	// * @see org.txm.objects.TxmObject#removeChildren(org.txm.objects.TxmObject)
+	// */
+	// public TxmObject removeChildren(TxmObject o) {
+	// if (o == null)
+	// return null;
+	// if (o instanceof Text) {
+	// textsElement.removeChild(o.getSelfElement());
+	// textnames.remove(((Text) o).getName());
+	// return texts.remove(((Text) o).getName());
+	// } else if (o instanceof SavedQuery) {
+	// queriesElement.removeChild(o.getSelfElement());
+	// return queries.remove(((SavedQuery) o).getName());
+	// }
+	// return null;
+	// }
+	
+	
+	//
+	// /**
+	// * Register maincorpus.
+	// *
+	// * @param corpusName the corpus name
+	// */
+	// public Element registerMaincorpus(String corpusName) {
+	// Document doc = getSelfElement().getOwnerDocument();
+	// Element maincorpus = doc.createElement(CORPUS);
+	// maincorpus.setAttribute(NAME, corpusName);
+	// if (getSelfElement().getElementsByTagName(CORPORA).getLength() == 0) {
+	// Log.severe(TXMCoreMessages.Base_22);
+	// return null;
+	// }
+	// Element corporaElem = (Element) getSelfElement().getElementsByTagName(CORPORA).item(0);
+	// corporaElem.appendChild(maincorpus); // append maincorpus
+	// return maincorpus;
+	// }
+	
 	public boolean export(File exportzip) {
 		return export(exportzip, null);
 	}
+	
 	/**
 	 * Export.
 	 *
@@ -455,39 +486,39 @@
 		if (binarydir.exists() && exportzip.getParentFile().exists()) {
 			try {
 				Zip.compress(binarydir, exportzip, monitor);
-			} catch (IOException e) {
+			}
+			catch (IOException e) {
 				org.txm.utils.logger.Log.printStackTrace(e);
 				return false;
 			}
 			return true;
-		} else {
+		}
+		else {
 			System.out.println(NLS.bind(TXMCoreMessages.binaryDirectoryP0NotFound, binarydir));
 			System.out.println(NLS.bind(TXMCoreMessages.parentDirectoryP0NotFound, exportzip.getParentFile()));
-
+			
 		}
 		return false;
 	}
-
+	
 	/**
 	 * Gets the import metadata.
 	 *
 	 * @return the import metadata
 	 */
-	public ArrayList<Metadata> getImportMetadata()
-	{
+	public ArrayList<Metadata> getImportMetadata() {
 		return importmetadatas;
 	}
-
+	
 	/**
 	 * Gets the import metadata.
 	 *
 	 * @return the import metadata
 	 */
-	public ArrayList<MetadataGroup> getMetadataGroups()
-	{
+	public ArrayList<MetadataGroup> getMetadataGroups() {
 		return groupedMetadatas;
 	}
-
+	
 	/**
 	 * Load import infos.
 	 *
@@ -496,7 +527,7 @@
 	 */
 	private boolean loadImportInfos(Element root) {
 		// import general infos
-		//System.out.println("load import infos: "+root);
+		// System.out.println("load import infos: "+root);
 		this.getProject().setEncoding(root.getAttribute("encoding"));
 		this.getProject().setLang(root.getAttribute(LANG));
 		String str = root.getAttribute(WORDSPERPAGE);
@@ -511,75 +542,77 @@
 		str = root.getAttribute(CLEANTEMPDIRS);
 		if (str == null || str.length() == 0) str = "false";
 		this.cleanTempDirs = "true".equals(str);
-		//this.srcdir = root.getAttribute("rootdir");
-		//this.script = root.getAttribute("script");
-		//this.xslt = root.getAttribute("xslt");
+		// this.srcdir = root.getAttribute("rootdir");
+		// this.script = root.getAttribute("script");
+		// this.xslt = root.getAttribute("xslt");
 		this.pDescription = root.getAttribute("desc");
 		this.getProject().setFont(root.getAttribute("font"));
-
-		//tokenizer infos
+		
+		// tokenizer infos
 		/*
-		NodeList tokenizerNodes = root.getElementsByTagName("tokenizer");
-		if (tokenizerNodes.getLength() > 0)
-		{
-			Element tokenizerNode = (Element) tokenizerNodes.item(0);
-			NodeList tokenizerparamNodes = tokenizerNode.getElementsByTagName("param");
-		}
+		 * NodeList tokenizerNodes = root.getElementsByTagName("tokenizer");
+		 * if (tokenizerNodes.getLength() > 0)
+		 * {
+		 * Element tokenizerNode = (Element) tokenizerNodes.item(0);
+		 * NodeList tokenizerparamNodes = tokenizerNode.getElementsByTagName("param");
+		 * }
 		 */
-
-		//Pattributes definitions
+		
+		// Pattributes definitions
 		NodeList pAttributesNodes = root.getElementsByTagName("pattributes");
 		pPAttributesInformations.clear();
 		if (pAttributesNodes.getLength() > 0) { // only one
 			Element pattributesNode = (Element) pAttributesNodes.item(0);
 			NodeList pattributeNodes = pattributesNode.getElementsByTagName("pattribute");
-			for (int i = 0 ; i < pattributeNodes.getLength() ; i++) {
-				Element pattribute = (Element)pattributeNodes.item(i);
-				HashMap<String, String> values = new HashMap<String, String>();
+			for (int i = 0; i < pattributeNodes.getLength(); i++) {
+				Element pattribute = (Element) pattributeNodes.item(i);
+				HashMap<String, String> values = new HashMap<>();
 				pPAttributesInformations.put(pattribute.getAttribute(ID), values);
-
+				
 				for (String name : attributeInfoNames) {
 					if (pattribute.getAttribute(name) != null) {
 						values.put(name, pattribute.getAttribute(name));
-					} else {
+					}
+					else {
 						values.put(name, "");
 					}
 				}
 			}
 		}
-
-		//Sattributes definitions
+		
+		// Sattributes definitions
 		NodeList sAttributesNodes = root.getElementsByTagName("sattributes");
 		pSAttributesInformations.clear();
 		if (sAttributesNodes.getLength() > 0) {
 			Element sattributesNode = (Element) sAttributesNodes.item(0);
 			NodeList sattributeNodes = sattributesNode.getElementsByTagName("sattribute");
-			for (int i = 0 ; i < sattributeNodes.getLength() ; i++) {
-				Element sattribute = (Element)sattributeNodes.item(i);
-				HashMap<String, String> values = new HashMap<String, String>();
+			for (int i = 0; i < sattributeNodes.getLength(); i++) {
+				Element sattribute = (Element) sattributeNodes.item(i);
+				HashMap<String, String> values = new HashMap<>();
 				pSAttributesInformations.put(sattribute.getAttribute(ID), values);
-
+				
 				for (String name : attributeInfoNames) {
 					if (sattribute.getAttribute(name) != null) {
 						values.put(name, sattribute.getAttribute(name));
-					} else {
+					}
+					else {
 						values.put(name, "");
 					}
 				}
 			}
 		}
-		//System.out.println("sAttributes Infos : "+sAttributesInfos);
-
-		//Metadata definitions
+		// System.out.println("sAttributes Infos : "+sAttributesInfos);
+		
+		// Metadata definitions
 		importmetadatas.clear();
 		groupedMetadatas.clear();
-
-		//UI: sort, view and ref properties to show
+		
+		// UI: sort, view and ref properties to show
 		NodeList uisNodes = root.getElementsByTagName("uis");
 		if (uisNodes.getLength() > 0) { // only one
 			Element uisElem = (Element) uisNodes.item(0);
 			NodeList uiNodes = uisElem.getElementsByTagName("ui");
-			for (int c = 0 ; c < uiNodes.getLength() ; c++) {
+			for (int c = 0; c < uiNodes.getLength(); c++) {
 				Element uiElem = (Element) uiNodes.item(c);
 				if ("concordance".equals(uiElem.getAttribute("command").toLowerCase())) {
 					NodeList viewsNodes = uiElem.getElementsByTagName("view");
@@ -587,42 +620,48 @@
 					if (viewsNodes.getLength() > 0) { // only one
 						Element viewNode = (Element) viewsNodes.item(0);
 						this.pDefaultViewProperty = viewNode.getAttribute(DEFAULT);
-						for (int i = 0 ; i < viewNode.getChildNodes().getLength() ; i++) {
+						for (int i = 0; i < viewNode.getChildNodes().getLength(); i++) {
 							try {
-								Element element = (Element)viewNode.getChildNodes().item(i);
+								Element element = (Element) viewNode.getChildNodes().item(i);
 								viewProperties.add(element.getAttribute(ID));
-							} catch(Exception e){} // quick and dirty
+							}
+							catch (Exception e) {
+							} // quick and dirty
 						}
 					}
-
+					
 					NodeList sortsNodes = uiElem.getElementsByTagName("sort");
 					sortProperties.clear();
 					if (sortsNodes.getLength() > 0) { // only one
 						Element sortNode = (Element) sortsNodes.item(0);
 						this.pDefaultSortProperty = sortNode.getAttribute(DEFAULT);
-						for (int i = 0 ; i < sortNode.getChildNodes().getLength() ; i++) {
+						for (int i = 0; i < sortNode.getChildNodes().getLength(); i++) {
 							try {
-								Element element = (Element)sortNode.getChildNodes().item(i);
+								Element element = (Element) sortNode.getChildNodes().item(i);
 								sortProperties.add(element.getAttribute(ID));
-							} catch(Exception e){} // quick and dirty
+							}
+							catch (Exception e) {
+							} // quick and dirty
 						}
 					}
-
+					
 					NodeList refsNodes = uiElem.getElementsByTagName("ref");
 					refProperties.clear();
 					if (refsNodes.getLength() > 0) { // only one
 						Element refNode = (Element) refsNodes.item(0);
 						this.pDefaultRefProperty = refNode.getAttribute(DEFAULT);
-						for (int i = 0 ; i < refNode.getChildNodes().getLength() ; i++) {
+						for (int i = 0; i < refNode.getChildNodes().getLength(); i++) {
 							try {
-								Element element = (Element)refNode.getChildNodes().item(i);
+								Element element = (Element) refNode.getChildNodes().item(i);
 								refProperties.add(element.getAttribute(ID));
-							} catch (Exception e){} // quick and dirty
+							}
+							catch (Exception e) {
+							} // quick and dirty
 						}
 					}
-
+					
 					NodeList cqlLimitNodes = uiElem.getElementsByTagName("context_limits");
-					//cql_limit_query = null;
+					// cql_limit_query = null;
 					if (cqlLimitNodes.getLength() > 0) { // only one node
 						Element context_limitsNode = (Element) cqlLimitNodes.item(0);
 						cql_limit_query = context_limitsNode.getTextContent();
@@ -631,50 +670,53 @@
 							String[] split = cql_limit_query.split(",");
 							if (split.length > 0) {
 								for (String s : split) {
-									query += "|<"+s.trim()+">[]";
+									query += "|<" + s.trim() + ">[]";
 								}
 								cql_limit_query = query.substring(1);
 							}
 						}
 					}
-
+					
 					NodeList cqlCtxSizeNodes = uiElem.getElementsByTagName("context_sizes");
-					//cql_limit_query = null;
+					// cql_limit_query = null;
 					if (cqlCtxSizeNodes.getLength() > 0) { // only one node
 						Element context_limitsNode = (Element) cqlCtxSizeNodes.item(0);
 						try {
 							conc_left_context = Integer.parseInt(context_limitsNode.getAttribute("left"));
 							conc_right_context = Integer.parseInt(context_limitsNode.getAttribute("right"));
-						} catch(Exception e) {
-							System.out.println("In uis/ui@command=concordance/context_sizes: context sizes number malformed: "+e);
 						}
+						catch (Exception e) {
+							System.out.println("In uis/ui@command=concordance/context_sizes: context sizes number malformed: " + e);
+						}
 					}
-				} else if ("selection".equals(uiElem.getAttribute("command").toLowerCase())) {
+				}
+				else if ("selection".equals(uiElem.getAttribute("command").toLowerCase())) {
 					NodeList sattributeNodes = uiElem.getElementsByTagName("sattribute");
-					for (int i = 0 ; i < sattributeNodes.getLength() ; i++) {
-						Element sattributeElem = (Element)sattributeNodes.item(i);
+					for (int i = 0; i < sattributeNodes.getLength(); i++) {
+						Element sattributeElem = (Element) sattributeNodes.item(i);
 						String ref = sattributeElem.getAttribute("ref");
-						//String id = ref.substring(5);
+						// String id = ref.substring(5);
 						HashMap<String, String> infos = pSAttributesInformations.get(ref);
 						if (infos == null) {
-							Log.warning("Malformed sattribute tag at uis/command/selection: could not find s-attribute informations for @ref="+ref);
+							Log.warning("Malformed sattribute tag at uis/command/selection: could not find s-attribute informations for @ref=" + ref);
 						}
-						//System.out.println("REF: "+ref+" infos: "+infos);
+						// System.out.println("REF: "+ref+" infos: "+infos);
 						if (infos != null) {
 							if (ref.startsWith("text_")) {
-								//System.out.println("TEST: "+infos.get("type")+" =? 'Date'");
+								// System.out.println("TEST: "+infos.get("type")+" =? 'Date'");
 								if (infos.get(TYPE).equals("Date")) {
 									importmetadatas.add(new DateMetadata(infos, sattributeElem));
-								} else {
+								}
+								else {
 									importmetadatas.add(new Metadata(infos, sattributeElem));
 								}
 							}
 						}
 					}
-					//System.out.println("Load groups: "+importmetadatas);
+					// System.out.println("Load groups: "+importmetadatas);
 					NodeList groupNodes = uiElem.getElementsByTagName("group");
-					for (int i = 0 ; i < groupNodes.getLength() ; i++) {
-						Element groupElem = (Element)groupNodes.item(i);
+					for (int i = 0; i < groupNodes.getLength(); i++) {
+						Element groupElem = (Element) groupNodes.item(i);
 						if (groupElem.getAttribute(TYPE).equals("MinMaxDate")) {
 							groupedMetadatas.add(new MinMaxDateGroup(this, groupElem));
 						}
@@ -682,7 +724,7 @@
 				}
 			}
 		}
-
+		
 		// get available editions
 		NodeList editionsNodes = root.getElementsByTagName(EDITIONS);
 		if (editionsNodes.getLength() > 0) { // only one
@@ -692,8 +734,8 @@
 			this.getProject().setDefaultEditionName(editionNode.getAttribute(DEFAULT));
 			
 			NodeList editionNodes = editionNode.getElementsByTagName(EDITION);
-			for (int i = 0 ; i < editionNodes.getLength() ; i++) {
-				Element edition = (Element)editionNodes.item(i);
+			for (int i = 0; i < editionNodes.getLength(); i++) {
+				Element edition = (Element) editionNodes.item(i);
 				String name = edition.getAttribute(NAME);
 				String built = edition.getAttribute("build_edition");
 				if (built == null || built.length() == 0) built = "true";
@@ -702,11 +744,13 @@
 				int wpp = 500;
 				try {
 					wpp = Integer.parseInt(edition.getAttribute("words_per_page"));
-				} catch(Exception e) { }
-				//System.out.println("declare edition: "+name);
-				//String corpus = edition.getAttribute("corpus");
-				//				String mode = edition.getAttribute("mode");
-				//				String script = edition.getAttribute("script");
+				}
+				catch (Exception e) {
+				}
+				// System.out.println("declare edition: "+name);
+				// String corpus = edition.getAttribute("corpus");
+				// String mode = edition.getAttribute("mode");
+				// String script = edition.getAttribute("script");
 				
 				EditionDefinition ed = this.getProject().getEditionDefinition(name);
 				ed.setBuildEdition("true".equals(built));
@@ -714,14 +758,14 @@
 				ed.setWordsPerPage(wpp);
 			}
 		}
-
+		
 		// Text biblio
 		NodeList bibliosNodes = root.getElementsByTagName("biblios");
 		if (bibliosNodes.getLength() > 0) { // only one
 			Element biblioNode = (Element) bibliosNodes.item(0);
 			NodeList metadataNodes = biblioNode.getElementsByTagName(BIBLIO);
-			for (int i = 0 ; i < metadataNodes.getLength() ; i++) {
-				Element biblio = (Element)metadataNodes.item(i);
+			for (int i = 0; i < metadataNodes.getLength(); i++) {
+				Element biblio = (Element) metadataNodes.item(i);
 				String id = biblio.getAttribute(ID);
 				String url = biblio.getTextContent();
 				Text text = this.getProject().getText(id);
@@ -731,38 +775,38 @@
 				}
 			}
 		}
-
+		
 		return true;
 	}
-
+	
 	public HashMap<String, Alignement> getLinks() {
 		return links;
 	}
-
+	
 	public ArrayList<Alignement> getLinksFrom(String from) {
-		ArrayList<Alignement> rez = new ArrayList<Alignement>();
+		ArrayList<Alignement> rez = new ArrayList<>();
 		for (String key : links.keySet()) {
-			if (key.startsWith("#"+from+" ")) {
+			if (key.startsWith("#" + from + " ")) {
 				rez.add(links.get(key));
 			}
 		}
 		return rez;
 	}
-
+	
 	public ArrayList<Alignement> getLinksTo(String to) {
-		ArrayList<Alignement> rez = new ArrayList<Alignement>();
+		ArrayList<Alignement> rez = new ArrayList<>();
 		for (String key : links.keySet()) {
-			if(key.endsWith(" #"+to)) {
+			if (key.endsWith(" #" + to)) {
 				rez.add(links.get(key));
 			}
 		}
 		return rez;
 	}
-
+	
 	public Alignement getLink(String from, String to) {
-		return links.get("#"+from+" #"+to );
+		return links.get("#" + from + " #" + to);
 	}
-
+	
 	/**
 	 * Gets the p attributes info names.
 	 *
@@ -771,7 +815,7 @@
 	public String[] getPAttributesInfoNames() {
 		return attributeInfoNames;
 	}
-
+	
 	/**
 	 * Gets the p attributes infos.
 	 *
@@ -780,7 +824,7 @@
 	public HashMap<String, HashMap<String, String>> getPAttributesInfos() {
 		return pPAttributesInformations;
 	}
-
+	
 	/**
 	 * Gets the s attributes infos.
 	 *
@@ -789,14 +833,14 @@
 	public HashMap<String, HashMap<String, String>> getSAttributesInfos() {
 		return pSAttributesInformations;
 	}
-
-	public String getFont( ) {
+	
+	public String getFont() {
 		return getProject().getFont();
 	}
 	
-//	public String getLang( ) {
-//		return getProject().getLang();
-//	}
+	// public String getLang( ) {
+	// return getProject().getLang();
+	// }
 	
 	/**
 	 * Gets the description.
@@ -806,7 +850,7 @@
 	public String getDescription() {
 		return this.pDescription;
 	}
-
+	
 	/**
 	 * Gets the description.
 	 *
@@ -815,73 +859,73 @@
 	public void setDescription(String desc) {
 		this.pDescription = desc;
 	}
-
+	
 	public ArrayList<String> getRefProperties() {
 		return refProperties;
 	}
-
+	
 	public void setRefProperties(ArrayList<String> refProperties) {
 		this.refProperties = refProperties;
 	}
-
+	
 	public ArrayList<String> getSortProperties() {
 		return sortProperties;
 	}
-
+	
 	public void setSortProperties(ArrayList<String> sortProperties) {
 		this.sortProperties = sortProperties;
 	}
-
+	
 	public ArrayList<String> getViewProperties() {
 		return viewProperties;
 	}
-
+	
 	public void setViewProperties(ArrayList<String> viewProperties) {
 		this.viewProperties = viewProperties;
 	}
-
+	
 	/**
 	 * @return the defaultRefProperty
 	 */
 	public String getDefaultRefProperty() {
 		return pDefaultRefProperty;
 	}
-
+	
 	/**
 	 * @param defaultRefProperty the defaultRefProperty to set
 	 */
 	public void setDefaultRefProperty(String defaultRefProperty) {
 		this.pDefaultRefProperty = defaultRefProperty;
 	}
-
+	
 	/**
 	 * @return the defaultSortProperty
 	 */
 	public String getDefaultSortProperty() {
 		return pDefaultSortProperty;
 	}
-
+	
 	/**
 	 * @param defaultSortProperty the defaultSortProperty to set
 	 */
 	public void setDefaultSortProperty(String defaultSortProperty) {
 		this.pDefaultSortProperty = defaultSortProperty;
 	}
-
+	
 	/**
 	 * @return the defaultSortProperty
 	 */
 	public String getDefaultViewProperty() {
 		return pDefaultViewProperty;
 	}
-
+	
 	/**
 	 * @param pDefaultSortProperty the defaultSortProperty to set
 	 */
 	public void setDefaultViewProperty(String defaultViewProperty) {
 		this.pDefaultViewProperty = defaultViewProperty;
 	}
-
+	
 	public void setName(String name) {
 		this.userName = name;
 	}
@@ -889,10 +933,10 @@
 	protected void setID(String id) {
 		this.pID = id;
 	}
-
+	
 	public abstract void setIsModified(boolean b);
-
+	
 	public abstract CorpusBuild getRootCorpusBuild();
-
+	
 	public abstract List<? extends Match> getMatches();
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Edition.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Edition.java	(revision 2441)
+++ tmp/org.txm.core/src/java/org/txm/objects/Edition.java	(revision 2442)
@@ -49,22 +49,22 @@
  * The Class Edition groups edition pages
  */
 public class Edition extends TXMResult {
-
+	
 	/** The index page path. */
-	@Parameter(key=TBXPreferences.INDEX)
+	@Parameter(key = TBXPreferences.INDEX)
 	String pIndex;
-
+	
 	/** The pages. */
-	ArrayList<Page> pages = new ArrayList<Page>();
-
-	@Parameter(key=TBXPreferences.NAMES)
+	ArrayList<Page> pages = new ArrayList<>();
+	
+	@Parameter(key = TBXPreferences.NAMES)
 	ArrayList<String> pPageNames;
-
-	@Parameter(key="pages_wordids")
+	
+	@Parameter(key = "pages_wordids")
 	ArrayList<String> pPageFirstWordIds;
-
+	
 	private File defaultHtmlDir;
-
+	
 	/**
 	 * Instantiates a new edition.
 	 *
@@ -73,9 +73,8 @@
 	public Edition(Text text) {
 		super(text);
 		this.setVisible(false);
-		this.internalPersistable = true;
 	}
-
+	
 	/**
 	 * Instantiates a new edition.
 	 *
@@ -84,9 +83,13 @@
 	public Edition(String parametersNodePath) {
 		super(parametersNodePath);
 		this.setVisible(false);
-		this.internalPersistable = true;
 	}
-
+	
+	@Override
+	public boolean isInternalPersistable() {
+		return true;
+	}
+	
 	/**
 	 * Gets the text.
 	 *
@@ -95,7 +98,7 @@
 	public Text getText() {
 		return (Text) getParent();
 	}
-
+	
 	/**
 	 * Gets the num pages.
 	 *
@@ -104,16 +107,16 @@
 	public Integer getNumPages() {
 		return pages.size();
 	}
-
-	/* 
-	 * Retro compatiblity to load Editions from a XML Element 
+	
+	/*
+	 * Retro compatiblity to load Editions from a XML Element
 	 */
 	protected boolean _load(Element e) {
-		//		pType = e.getAttribute("type"); //$NON-NLS-1$
+		// pType = e.getAttribute("type"); //$NON-NLS-1$
 		pIndex = e.getAttribute("index"); //$NON-NLS-1$
 		userName = e.getAttribute("name"); //$NON-NLS-1$
-
-		// System.out.println("  build edition "+name);
+		
+		// System.out.println(" build edition "+name);
 		NodeList pagesList = e.getElementsByTagName("page"); //$NON-NLS-1$
 		int numpages = pagesList.getLength();
 		pages.clear();
@@ -121,30 +124,31 @@
 			Element p = (Element) pagesList.item(i);
 			Page page = new Page(this, "", "");
 			page._load(p);
-
+			
 			pages.add(page);
 			pPageNames.add(page.getName());
 			pPageFirstWordIds.add(page.getWordId());
 		}
-		//loadMetadata();
+		// loadMetadata();
 		return false;
 	}
-
+	
 	/**
 	 * The Class PageComparator.
 	 */
 	class PageComparator implements Comparator<Page> {
-
-		/* (non-Javadoc)
+		
+		/*
+		 * (non-Javadoc)
 		 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
 		 */
 		@Override
 		public int compare(Page arg0, Page arg1) {
 			return getInt(arg0.getWordId()) - getInt(arg1.getWordId());
 		}
-
+		
 	}
-
+	
 	/**
 	 * Gets the pages.
 	 *
@@ -153,14 +157,13 @@
 	public ArrayList<Page> getPages() {
 		return this.pages;
 	}
-
-	public Page get(String id)
-	{
+	
+	public Page get(String id) {
 		int i = pPageNames.indexOf(id);
 		if (i < 0) return null;
 		return pages.get(i);
 	}
-
+	
 	/**
 	 * Gets the page.
 	 *
@@ -170,9 +173,9 @@
 	public Page getPage(int no) {
 		return pages.get(no);
 	}
-
+	
 	public static final Pattern findNumbersPattern = Pattern.compile("([0-9]{1,10}+)"); //$NON-NLS-1$
-
+	
 	/**
 	 * Gets the int.
 	 *
@@ -180,7 +183,7 @@
 	 * @return the int
 	 */
 	private int getInt(String wordid) {
-
+		
 		int r = 0;
 		try {
 			Matcher m = findNumbersPattern.matcher(wordid);
@@ -188,21 +191,23 @@
 				wordid = m.group(1);
 			}
 			r = Integer.parseInt(wordid);
-		} catch (PatternSyntaxException pse) { }
+		}
+		catch (PatternSyntaxException pse) {
+		}
 		return r;
 	}
-
+	
 	public void addPage(String id, String wordid) {
 		this.pPageNames.add(id);
 		this.pPageFirstWordIds.add(wordid);
 	}
-
-
+	
+	
 	public void resetPages() {
 		this.pPageNames.clear();
 		this.pPageFirstWordIds.clear();
 	}
-
+	
 	/**
 	 * Gets the page for word id.
 	 *
@@ -210,15 +215,15 @@
 	 * @return the page for word id
 	 */
 	public Page getPageForWordId(String idx) {
-		Log.fine("Page.getPageForWordId(): "+idx);
+		Log.fine("Page.getPageForWordId(): " + idx);
 		Page lastpage = null;
 		for (Page p : pages) {
 			String s = p.getWordId();
-			Log.fine(p.name+": "+s+" >? "+idx);
-			//			if (getInt(s) > getInt(idx)) {
+			Log.fine(p.name + ": " + s + " >? " + idx);
+			// if (getInt(s) > getInt(idx)) {
 			System.out.println();
 			if (isFirstGTthanSecond(s, idx) > 0) {
-				Log.fine("page found: "+lastpage);
+				Log.fine("page found: " + lastpage);
 				return lastpage;
 			}
 			if (!("w_0".equals(p.getWordId()))) { // ignore the w_0 pages
@@ -227,7 +232,7 @@
 		}
 		return lastpage;
 	}
-
+	
 	public static int isFirstGTthanSecond(String s, String idx) {
 		
 		if (s == null) return -1;
@@ -235,29 +240,32 @@
 		
 		Matcher m1 = findNumbersPattern.matcher(s);
 		Matcher m2 = findNumbersPattern.matcher(idx);
-
+		
 		boolean m1ok = m1.find();
 		boolean m2ok = m2.find();
-
-		//boolean c = true;
+		
+		// boolean c = true;
 		while (true) {
 			if (m1ok && m2ok) {
 				int i1 = Integer.parseInt(m1.group(1));
 				int i2 = Integer.parseInt(m2.group(1));
-				if (i1 - i2 != 0) return i1 -i2;
-
+				if (i1 - i2 != 0) return i1 - i2;
+				
 				m1ok = m1.find();
 				m2ok = m2.find();
-			} else if (m1ok) {
+			}
+			else if (m1ok) {
 				return 1;
-			} else if (m2ok) {
+			}
+			else if (m2ok) {
 				return -1;
-			} else {
+			}
+			else {
 				return 0;
 			}
 		}
 	}
-
+	
 	/**
 	 * Gets the index.
 	 *
@@ -266,7 +274,7 @@
 	public String getIndex() {
 		return pIndex;
 	}
-
+	
 	// Navigation
 	/**
 	 * Gets the first page.
@@ -278,7 +286,7 @@
 			return pages.get(0);
 		return null;
 	}
-
+	
 	/**
 	 * Gets the last page.
 	 *
@@ -289,7 +297,7 @@
 			return pages.get(pages.size() - 1);
 		return null;
 	}
-
+	
 	/**
 	 * Gets the next page.
 	 *
@@ -302,7 +310,7 @@
 			return pages.get(idx + 1);
 		return p;
 	}
-
+	
 	/**
 	 * Gets the previous page.
 	 *
@@ -315,39 +323,40 @@
 			return pages.get(idx - 1);
 		return p;
 	}
-
+	
 	public File getHtmlDir() {
-
+		
 		if (defaultHtmlDir == null) {
 			File binDir = getText().getProject().getProjectDirectory();
-			defaultHtmlDir = new File(binDir, "HTML/"+getText().getProject().getName()+"/"+getName()); //$NON-NLS-1$ //$NON-NLS-2$
+			defaultHtmlDir = new File(binDir, "HTML/" + getText().getProject().getName() + "/" + getName()); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		return defaultHtmlDir;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see java.lang.Object#toString()
 	 */
 	@Override
 	public String toString() {
 		try {
-			return "Edition [name="+userName+" index=" + pIndex + ", pages=" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			return "Edition [name=" + userName + " index=" + pIndex + ", pages=" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 					+ pages.size() + "]"; //$NON-NLS-1$
 		}
 		catch (Exception e) {
 			return "Edition";
 		}
 	}
-
+	
 	public static void main(String[] args) {
-		String[] strings = {"c_w_P1719_5_3", "c_w_P1719_5_6", "c_w_P1719_16_8", "c_w_P1719_32_3"};
+		String[] strings = { "c_w_P1719_5_3", "c_w_P1719_5_6", "c_w_P1719_16_8", "c_w_P1719_32_3" };
 		for (String s1 : strings) {
 			for (String s2 : strings) {
-				System.out.println(s1+" - "+s2+" = "+Edition.isFirstGTthanSecond(s1, s2));
+				System.out.println(s1 + " - " + s2 + " = " + Edition.isFirstGTthanSecond(s1, s2));
 			}
 		}
 	}
-
+	
 	@Override
 	public boolean saveParameters() throws Exception {
 		if (pPageNames != null) {
@@ -358,87 +367,89 @@
 		}
 		return true;
 	}
-
+	
 	@Override
 	public boolean loadParameters() throws Exception {
-
+		
 		String names = this.getStringParameterValue(TBXPreferences.NAMES);
 		if (names != null && names.length() > 0) {
 			pPageNames = new ArrayList<>(Arrays.asList(names.split("\t")));
-		} else {
+		}
+		else {
 			pPageNames = new ArrayList<>();
 		}
-
+		
 		String wordids = this.getStringParameterValue("pages_wordids");
 		if (wordids != null && wordids.length() > 0) {
 			pPageFirstWordIds = new ArrayList<>(Arrays.asList(wordids.split("\t")));
-		} else {
+		}
+		else {
 			pPageFirstWordIds = new ArrayList<>();
 		}
-
+		
 		return true;
 	}
-
+	
 	@Override
 	public boolean setParameters(TXMParameters parameters) throws Exception {
 		return true;
 	}
-
+	
 	@Override
 	public String getName() {
 		return userName;
 	}
-
+	
 	@Override
 	public String getSimpleName() {
 		return userName;
 	}
-
+	
 	@Override
 	public String getDetails() {
 		return userName;
 	}
-
+	
 	@Override
 	public void clean() {
 		for (Page p : this.getPages()) {
 			p.getFile().delete();
 		}
 	}
-
+	
 	@Override
 	public boolean canCompute() throws Exception {
 		return true;
 	}
-
+	
 	@Override
 	protected boolean _compute() throws Exception {
-		//System.out.println("USE THE PROJECT IMPORTMODULE TO BUILD THE EDITION="+userName);
+		// System.out.println("USE THE PROJECT IMPORTMODULE TO BUILD THE EDITION="+userName);
 		pages.clear();
-
+		
 		if (pages.size() != pPageNames.size()) {
-			for (int i = 0 ; i < pPageNames.size() && i < pPageFirstWordIds.size() ; i++) {
+			for (int i = 0; i < pPageNames.size() && i < pPageFirstWordIds.size(); i++) {
 				pages.add(new Page(this, pPageNames.get(i), pPageFirstWordIds.get(i)));
 			}
 		}
-
+		
 		return true;
 	}
-
+	
 	@Override
 	public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception {
 		return false;
 	}
-
+	
 	@Override
 	public String getResultType() {
 		return "Edition";
 	}
-
+	
 	public void setIndex(String url) {
 		this.pIndex = url;
 	}
-
+	
 	public void setName(String name) {
 		this.userName = name;
 	}
Index: tmp/org.txm.core/src/java/org/txm/objects/Workspace.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 2441)
+++ tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 2442)
@@ -52,61 +52,63 @@
  * The Class Workspace: manages the TXM corpora in the $TXMHOME/corpora directory
  */
 public class Workspace extends TXMResult {
-
+	
 	private static final String NAME = "name";
-
+	
 	IWorkspace rcpWorkspace;
+	
 	IWorkspaceRoot root;
+	
 	IProject corporaProject;
-	//	/** The xmlfile. */
-	//	File xmlDefinitionFile;
+	// /** The xmlfile. */
+	// File xmlDefinitionFile;
 	//
-	//	/** The doc. */
-	//	Document doc;
+	// /** The doc. */
+	// Document doc;
 	//
-	//	/** The projs. */
-	//	Element projs;
-
-
-	//	/**
-	//	 * Creates the empty workspace.
-	//	 *
-	//	 * @param xmlfile the xmlfile
-	//	 * @return the workspace
-	//	 */
-	//	public static Workspace createEmptyWorkspaceDefinition(File xmlfile) {
-	//		writeEmptyWorkspaceFile(xmlfile);
-	//		return new Workspace(xmlfile);
-	//	}
+	// /** The projs. */
+	// Element projs;
+	
+	
+	// /**
+	// * Creates the empty workspace.
+	// *
+	// * @param xmlfile the xmlfile
+	// * @return the workspace
+	// */
+	// public static Workspace createEmptyWorkspaceDefinition(File xmlfile) {
+	// writeEmptyWorkspaceFile(xmlfile);
+	// return new Workspace(xmlfile);
+	// }
 	//
-	//	/**
-	//	 * Write empty workspace file.
-	//	 *
-	//	 * @param xmlfile the xmlfile
-	//	 * @return true, if successful
-	//	 */
-	//	protected static boolean writeEmptyWorkspaceFile(File xmlfile) {
-	//		xmlfile.getParentFile().mkdirs();
-	//		try {
-	//			OutputStreamWriter writer = new OutputStreamWriter(
-	//					new FileOutputStream(xmlfile), TXMPreferences.DEFAULT_ENCODING);
-	//			writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); //$NON-NLS-1$
-	//			writer.write("<workspace>\n"); //$NON-NLS-1$
-	//			writer.write("<projects>\n"); //$NON-NLS-1$
-	//			writer.write("<project name=\"default\">\n"); //$NON-NLS-1$
-	//			writer.write("<bases/>\n"); //$NON-NLS-1$
-	//			writer.write("</project>\n"); //$NON-NLS-1$
-	//			writer.write("</projects>\n"); //$NON-NLS-1$
-	//			writer.write("</workspace>\n"); //$NON-NLS-1$
-	//			writer.close();
-	//		} catch (IOException e) {
-	//			System.out.println(TXMCoreMessages.Workspace_6+xmlfile.getAbsolutePath());
-	//			Log.severe(TXMCoreMessages.Workspace_6+xmlfile.getAbsolutePath()+" : "+e.getMessage()); //$NON-NLS-1$
-	//			return false;
-	//		}
-	//		return true;
-	//	}
-
+	// /**
+	// * Write empty workspace file.
+	// *
+	// * @param xmlfile the xmlfile
+	// * @return true, if successful
+	// */
+	// protected static boolean writeEmptyWorkspaceFile(File xmlfile) {
+	// xmlfile.getParentFile().mkdirs();
+	// try {
+	// OutputStreamWriter writer = new OutputStreamWriter(
+	// new FileOutputStream(xmlfile), TXMPreferences.DEFAULT_ENCODING);
+	// writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); //$NON-NLS-1$
+	// writer.write("<workspace>\n"); //$NON-NLS-1$
+	// writer.write("<projects>\n"); //$NON-NLS-1$
+	// writer.write("<project name=\"default\">\n"); //$NON-NLS-1$
+	// writer.write("<bases/>\n"); //$NON-NLS-1$
+	// writer.write("</project>\n"); //$NON-NLS-1$
+	// writer.write("</projects>\n"); //$NON-NLS-1$
+	// writer.write("</workspace>\n"); //$NON-NLS-1$
+	// writer.close();
+	// } catch (IOException e) {
+	// System.out.println(TXMCoreMessages.Workspace_6+xmlfile.getAbsolutePath());
+	// Log.severe(TXMCoreMessages.Workspace_6+xmlfile.getAbsolutePath()+" : "+e.getMessage()); //$NON-NLS-1$
+	// return false;
+	// }
+	// return true;
+	// }
+	
 	/**
 	 * Instantiates a new workspace.
 	 *
@@ -114,34 +116,39 @@
 	 */
 	private Workspace() {
 		super("ROOT");
-
+		
 		rcpWorkspace = ResourcesPlugin.getWorkspace();
 		root = rcpWorkspace.getRoot();
 		corporaProject = root.getProject("corpora");
-
+		
 		if (!corporaProject.exists()) {
 			try {
 				corporaProject.create(null);
-			} catch (CoreException e) {
+			}
+			catch (CoreException e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
 		}
-
-		this.internalPersistable = true;
+		
 		this.userName = corporaProject.getName(); // corpora
-		//		this.setPath("/"+pName); 
-		//		this.xmlDefinitionFile = xmlfile;
+		// this.setPath("/"+pName);
+		// this.xmlDefinitionFile = xmlfile;
 	}
-
+	
+	@Override
+	public boolean isInternalPersistable() {
+		return true;
+	}
+	
 	public static Workspace getInstance() {
 		if (Toolbox.workspace == null) {
 			Toolbox.workspace = new Workspace();
 		}
-
+		
 		return Toolbox.workspace;
 	}
-
+	
 	/**
 	 * Gets the projects.
 	 *
@@ -151,7 +158,7 @@
 	public List<Project> getProjects() {
 		return (List<Project>) getChildren(Project.class);
 	}
-
+	
 	/**
 	 * Gets the project.
 	 *
@@ -166,66 +173,67 @@
 		}
 		return null;
 	}
-
+	
 	@Override
 	public String getSimpleName() {
 		return userName;
 	}
-
+	
 	@Override
 	public String getDetails() {
 		return userName;
 	}
-
+	
 	@Override
 	public void clean() {
 		// TODO Auto-generated method stub
 	}
-
+	
 	@Override
 	@Deprecated
 	public boolean toTxt(File arg0, String arg1, String arg2, String arg3) throws Exception {
 		// TODO Auto-generated method stub
 		return false;
 	}
-
+	
 	public File getLocation() {
 		return corporaProject.getLocation().toFile().getAbsoluteFile();
 	}
-
+	
 	/**
-	 * Scan directory: 
+	 * Scan directory:
 	 * 1- check the binary corpus format
 	 * 2- register in the workspace
 	 *
 	 * @param binCorpusDir the base
 	 * @return the base
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	public Project scanDirectory(File binCorpusDir) throws Exception {
-
-		//System.out.println(Messages.Project_5);
+		
+		// System.out.println(Messages.Project_5);
 		File HTMLs = new File(binCorpusDir, "HTML"); //$NON-NLS-1$
-		//File TXMs = new File(binCorpusDir, "txm"); //$NON-NLS-1$
+		// File TXMs = new File(binCorpusDir, "txm"); //$NON-NLS-1$
 		File DATAs = new File(binCorpusDir, "data"); //$NON-NLS-1$
 		File REGISTRY = new File(binCorpusDir, "registry"); //$NON-NLS-1$
 		File PARAMS = new File(binCorpusDir, ".settings"); //$NON-NLS-1$
 		File PROJECT = new File(binCorpusDir, ".project"); //$NON-NLS-1$
 		binCorpusDir = new File(this.getLocation(), binCorpusDir.getName()); // this is to ensure the project is in the workspace files
-
+		
 		if (binCorpusDir.exists() && HTMLs.exists() && DATAs.exists()
 				&& REGISTRY.exists() && PARAMS.exists() && PROJECT.exists())// && correspfile.exists())
 		{// minimal base data
-
+			
 			File[] maincorpusNames = DATAs.listFiles();
 			String maincorpusName = "";
 			if (maincorpusNames.length == 0) { // no CQP corpus
 				System.out.println(NLS.bind("Error: no CQP corpus data found in {0} directory.", DATAs));
 				return null;
-			} else {
+			}
+			else {
 				maincorpusName = maincorpusNames[0].getName();
 			}
-
+			
 			Project p = getProject(binCorpusDir.getName());
 			if (p != null) {
 				p.delete(); // a project with the same name already exists
@@ -234,57 +242,59 @@
 			if (p != null) {
 				p.delete(); // a project with the same name already exists
 			}
-
-			//System.out.println(parameters.toString());
-
+			
+			// System.out.println(parameters.toString());
+			
 			// load the project from the project .settings directory
 			IWorkspace rcpWorkspace = ResourcesPlugin.getWorkspace();
-
-			//rcpWorkspace.getRoot().refreshLocal(1, new LogMonitor());
-
-			IProjectDescription description = rcpWorkspace.loadProjectDescription(new Path(binCorpusDir.getAbsolutePath()+"/.project"));
+			
+			// rcpWorkspace.getRoot().refreshLocal(1, new LogMonitor());
+			
+			IProjectDescription description = rcpWorkspace.loadProjectDescription(new Path(binCorpusDir.getAbsolutePath() + "/.project"));
 			description.setLocation(new Path(binCorpusDir.getAbsolutePath()));
 			IProject rcpProject = rcpWorkspace.getRoot().getProject(description.getName());
-
+			
 			if (!rcpProject.exists()) {
 				rcpProject.create(description, new LogMonitor());
 			}
 			if (!rcpProject.isOpen()) {
 				rcpProject.open(new LogMonitor());
 			}
-
+			
 			Project b = Project.loadProjectFromProjectScope(rcpProject);
 			if (b != null) {
 				return b;
-			} else {
+			}
+			else {
 				Log.warning(NLS.bind("No TXM project found in {0}", binCorpusDir));
 				return null;
 			}
-		} else {
+		}
+		else {
 			System.out.println(TXMCoreMessages.bind(TXMCoreMessages.errorColonP0CorpusDirectoryIsNotConformantToTXMCorpusBinaryFormatColonCorpusSkipped, binCorpusDir));
 			System.out.println(TXMCoreMessages.bind(TXMCoreMessages.tXMNeedsFoldersColonP0P1P2AndP3, HTMLs, DATAs, REGISTRY, PARAMS));
 		}
 		return null;
 	}
-
+	
 	/**
-	 * Scan directory: 
+	 * Scan directory:
 	 * 1- check the binary corpus format
 	 * 2- register in the workspace
 	 *
 	 * @param binCorpusDir the base
 	 * @return the base
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	public Project scanDirectory079(File binCorpusDir) throws Exception {
-
-		//System.out.println(Messages.Project_5);
+		
+		// System.out.println(Messages.Project_5);
 		File HTMLs = new File(binCorpusDir, "HTML"); //$NON-NLS-1$
-		//File TXMs = new File(binCorpusDir, "txm"); //$NON-NLS-1$
+		// File TXMs = new File(binCorpusDir, "txm"); //$NON-NLS-1$
 		File DATAs = new File(binCorpusDir, "data"); //$NON-NLS-1$
 		File REGISTRY = new File(binCorpusDir, "registry"); //$NON-NLS-1$
 		File PARAMS = new File(binCorpusDir, "import.xml"); //$NON-NLS-1$
-
+		
 		if (HTMLs.exists() && DATAs.exists()
 				&& REGISTRY.exists() && PARAMS.exists())// && correspfile.exists())
 		{// minimal base data
@@ -294,112 +304,114 @@
 				Log.severe(NLS.bind(TXMCoreMessages.failedToLoadBaseParametersFromTheP0File, PARAMS));
 				return null;
 			}
-
-			//			if (parameters.version == null || parameters.version.length() == 0) {
-			//				System.out.println(TXMCoreMessages.Project_14);
-			//				return null;
-			//			} else if (CURRENTCORPUSVERSION.compareTo(parameters.version) > 0) {
-			//				System.out.println(TXMCoreMessages.Project_15);
-			//				System.out.println(CURRENTCORPUSVERSION+" > "+parameters.version); //$NON-NLS-1$
-			//				return null;
-			//			}
-
-			//System.out.println(parameters.toString());
-
+			
+			// if (parameters.version == null || parameters.version.length() == 0) {
+			// System.out.println(TXMCoreMessages.Project_14);
+			// return null;
+			// } else if (CURRENTCORPUSVERSION.compareTo(parameters.version) > 0) {
+			// System.out.println(TXMCoreMessages.Project_15);
+			// System.out.println(CURRENTCORPUSVERSION+" > "+parameters.version); //$NON-NLS-1$
+			// return null;
+			// }
+			
+			// System.out.println(parameters.toString());
+			
 			// Creates a new project that doesn't need to build
-
-			//FIXME: SJ: old version where there is a bug if the name or path are not in same case
-			//Project project = new Project(this, parameters.name, false);
-			//FIXME: SJ: new version that fix the bug but whe may want to not modify the case of the name? 
+			
+			// FIXME: SJ: old version where there is a bug if the name or path are not in same case
+			// Project project = new Project(this, parameters.name, false);
+			// FIXME: SJ: new version that fix the bug but whe may want to not modify the case of the name?
 			Project project = new Project(this, binCorpusDir.getName(), false);
-//			if (!parameters.name.equals(project.getRCPProject().getName())) {
-//				IPath destination = new Path(project.getRCPProject().getParent().getLocation(), parameters.name);
-//				project.getRCPProject().move(destination, true, project);
-//			}
-
+			// if (!parameters.name.equals(project.getRCPProject().getName())) {
+			// IPath destination = new Path(project.getRCPProject().getParent().getLocation(), parameters.name);
+			// project.getRCPProject().move(destination, true, project);
+			// }
+			
 			project._load(parameters);
 			project.pCorpusVersion = "0.7.9 -> 0.8.0";
-			//b._compute();
-			//System.out.println("CREATE CORPORA? "+b.corpora.values());
+			// b._compute();
+			// System.out.println("CREATE CORPORA? "+b.corpora.values());
 			for (Element c : parameters.corpora.values()) {
 				String corpusname = c.getAttribute(NAME);
-				//File TXMc = new File(TXMs, corpusname);
+				// File TXMc = new File(TXMs, corpusname);
 				File HTMLc = new File(HTMLs, corpusname);
 				File REGISTRYc = new File(REGISTRY, corpusname.toLowerCase());
 				File DATAc = new File(DATAs, corpusname);
-
+				
 				if (!(PARAMS.exists() && HTMLc.exists() && REGISTRYc.exists() && DATAc.exists())) {
 					System.out.println(NLS.bind(TXMCoreMessages.errorColonSkippingTheLoadingOfTheP0Corpus, corpusname));
 					System.out.println(NLS.bind(TXMCoreMessages.pARAMSColonP0, PARAMS));
-					System.out.println("HTMLc: "+HTMLc+" : "+HTMLc.exists()); //$NON-NLS-1$ //$NON-NLS-2$
-					System.out.println("REGISTRYc: "+REGISTRYc+" : "+REGISTRYc.exists()); //$NON-NLS-1$ //$NON-NLS-2$
-					System.out.println("DATAc: "+DATAc+" : "+DATAc.exists()); //$NON-NLS-1$ //$NON-NLS-2$
+					System.out.println("HTMLc: " + HTMLc + " : " + HTMLc.exists()); //$NON-NLS-1$ //$NON-NLS-2$
+					System.out.println("REGISTRYc: " + REGISTRYc + " : " + REGISTRYc.exists()); //$NON-NLS-1$ //$NON-NLS-2$
+					System.out.println("DATAc: " + DATAc + " : " + DATAc.exists()); //$NON-NLS-1$ //$NON-NLS-2$
 					continue;
 				}
 			}
-
+			
 			return project;
-		} else {
+		}
+		else {
 			System.out.println(TXMCoreMessages.bind(TXMCoreMessages.errorColonP0CorpusDirectoryIsNotConformantToTXM079CorpusBinaryFormatColonCorpusSkipped, binCorpusDir));
 			System.out.println(TXMCoreMessages.bind(TXMCoreMessages.tXMNeedsFoldersColonP0P1P2AndP3, HTMLs, DATAs, REGISTRY, PARAMS));
 		}
 		return null;
 	}
-
-
+	
+	
 	@Override
 	public boolean saveParameters() throws Exception {
 		return true;
 	}
-
+	
 	@Override
 	public boolean loadParameters() throws Exception {
 		return true;
 	}
-
+	
 	@Override
 	public boolean setParameters(TXMParameters parameters) throws Exception {
 		return true;
 	}
-
+	
 	@Override
 	public String getName() {
 		return userName;
 	}
-
+	
 	@Override
 	public boolean canCompute() throws Exception {
 		return true;
 	}
-
+	
 	@Override
 	protected boolean _compute() throws Exception {
-		//TODO should ensure its files are up to date
+		// TODO should ensure its files are up to date
 		return true;
 	}
-
+	
 	@Override
 	public String getResultType() {
 		return "Workspace";
 	}
-
+	
 	/**
 	 * Loads and recreates the existing projects.
-	 * @throws CoreException 
+	 * 
+	 * @throws CoreException
 	 */
-	public void loadProjectsFromProjectScopes(IProgressMonitor monitor) throws CoreException	{
-
+	public void loadProjectsFromProjectScopes(IProgressMonitor monitor) throws CoreException {
+		
 		Log.fine("Toolbox.initialize(): reloading projects...");
-
+		
 		IWorkspace rcpWorkspace = ResourcesPlugin.getWorkspace();
 		IProject corporaDirectory = rcpWorkspace.getRoot().getProject("corpora");
-
+		
 		if (!corporaDirectory.exists()) {
 			Log.severe("Can't load corpora projects: 'corpora' not found in workspace.");
 			return;
 		}
 		IProject projects[] = rcpWorkspace.getRoot().getProjects();
-
+		
 		Log.fine("Toolbox.initialize(): " + projects.length + " project(s) found in workspace.");
 		monitor.setTaskName(NLS.bind(TXMCoreMessages.initializingCorpora, 0, projects.length));
 		int c = 0;
@@ -412,25 +424,25 @@
 				continue;
 			}
 			
-			//project.open(monitor);
-			//String[] natures = project.getDescription().getNatureIds();
-			//if (Arrays.binarySearch(natures, Project.TXMCORPUSNATURE) < 0) continue;
+			// project.open(monitor);
+			// String[] natures = project.getDescription().getNatureIds();
+			// if (Arrays.binarySearch(natures, Project.TXMCORPUSNATURE) < 0) continue;
 			if (project.isOpen()) {
 				Project.loadProjectFromProjectScope(project); // !!!
 			}
 		}
-
+		
 		// force the initialization of CorpusBuilds
 		for (TXMResult r : this.getChildren(Project.class)) {
-			Project project = (Project)r;
+			Project project = (Project) r;
 			if (project.isOpen()) {
 				for (CorpusBuild cb : project.getCorpora()) {
 					if (!cb.compute(false)) {
-						System.out.println("Deleting broken corpus: "+cb+" of "+cb.getProject());
+						System.out.println("Deleting broken corpus: " + cb + " of " + cb.getProject());
 						cb.delete();
 					}
 				}
 			}
 		}
 	}
-}
\ No newline at end of file
+}
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java	(revision 2441)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java	(revision 2442)
@@ -63,11 +63,13 @@
  * @author jmague, mdecorde
  */
 public class MainCorpus extends CQPCorpus {
-
+	
 	protected File cqpFile;
+	
 	protected File dataDirectory;
+	
 	protected boolean modified = false;
-
+	
 	protected File registryFile;
 	
 	/**
@@ -77,10 +79,9 @@
 	 */
 	public MainCorpus(Partition partition) {
 		super(partition);
-		this.internalPersistable = true;
 		throw new IllegalArgumentException("Maincorpus parent must not be a Partition");
 	}
-
+	
 	/**
 	 * Instantiates a new corpus. This constructor is not intended to be used
 	 * directly. Use {@link CorpusManager#getCorpus(String)}.
@@ -92,9 +93,8 @@
 	 */
 	public MainCorpus(Project project) throws InvalidCqpIdException, CqiClientException {
 		super(project);
-		this.internalPersistable = true;
 	}
-
+	
 	/**
 	 * Instantiates a new corpus. This constructor is not intended to be used
 	 * directly. Use {@link CorpusManager#getCorpus(String)}.
@@ -106,16 +106,15 @@
 	 */
 	public MainCorpus(String parametersNodePath) throws InvalidCqpIdException, CqiClientException {
 		super(parametersNodePath);
-		this.internalPersistable = true;
-
+		
 		if (getID() != null && getProjectDirectory() != null) {
 			compute(false);
 		}
 	}
-
+	
 	@Override
 	protected boolean _compute() throws Exception {
-
+		
 		if (!CQPSearchEngine.isInitialized()) {
 			Log.warning("** TXM can't load MainCorpus when CQP search engine is not ready.");
 			return false;
@@ -125,29 +124,31 @@
 			Log.severe("** TXM can't load this MainCorpus: no CQP ID set.");
 			return false;
 		}
-
+		
 		HashMap<String, MainCorpus> corpora = CorpusManager.getCorpusManager().getCorpora();
 		if (CorpusManager.getCorpusManager().hasCorpus(this)) {
-			Log.severe(NLS.bind("** The \"{0}\" MainCorpus object in the \"{1}\" project can not be computed: another one with the same CQP identifier has already been computed.", this.pID, this.getProjectDirectory()));
+			Log.severe(NLS.bind("** The \"{0}\" MainCorpus object in the \"{1}\" project can not be computed: another one with the same CQP identifier has already been computed.", this.pID, this
+					.getProjectDirectory()));
 			return false;
 		}
 		CorpusManager.getCorpusManager().add(this);
-
-		this.dataDirectory = new File(getProjectDirectory(), "data/"+getID());
-		this.registryFile = new File(getProjectDirectory(), "registry/"+getID().toLowerCase());
 		
+		this.dataDirectory = new File(getProjectDirectory(), "data/" + getID());
+		this.registryFile = new File(getProjectDirectory(), "registry/" + getID().toLowerCase());
+		
 		if (!dataDirectory.exists()) {
-			Log.warning("MainCorpus data files not found: "+dataDirectory);
+			Log.warning("MainCorpus data files not found: " + dataDirectory);
 			return false;
 		}
 		if (!registryFile.exists()) {
-			Log.warning("MainCorpus registry file not found: "+registryFile);
+			Log.warning("MainCorpus registry file not found: " + registryFile);
 			return false;
 		}
 		try {
 			try {
 				PatchCwbRegistry.patch(this.registryFile, this.dataDirectory);
-			} catch (IOException e) {
+			}
+			catch (IOException e) {
 				Log.severe(TXMCoreMessages.bind("Error while updating the {0} registry file .", this.registryFile));
 				Log.printStackTrace(e);
 				return false;
@@ -156,14 +157,15 @@
 			CQPSearchEngine.getCqiClient().load_a_system_corpus(this.registryFile.getParent(), this.pID);
 			
 			corpora.put(this.pID, this); // register the corpus
-		} catch(Exception e) {
-			Log.severe("MainCorpus not loaded: "+e);
+		}
+		catch (Exception e) {
+			Log.severe("MainCorpus not loaded: " + e);
 			if (corpora.get(this.pID) == this) {
 				corpora.remove(this.pID); // unregister the broken corpus
 			}
 			return false;
 		}
-
+		
 		return true;
 	}
 	
@@ -173,31 +175,34 @@
 			if (hasBeenComputedOnce && this.pID != null) {
 				CorpusManager.getCorpusManager().deleteCorpus(this);
 			}
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.searchengine.cqp.corpus.Corpus#load()
 	 */
+	@Override
 	public boolean _load(Element e) {
 		boolean ret = super._load(e);
-
+		
 		// FIXME: test to create a project scope
-		//		CorpusScope scope = new CorpusScope(this.getName(), this.getProjectDirectory());
-		//		CorpusScope.addScope(scope);
-
+		// CorpusScope scope = new CorpusScope(this.getName(), this.getProjectDirectory());
+		// CorpusScope.addScope(scope);
+		
 		return ret;
 	}
-
-
+	
+	
 	@Override
 	public boolean canCompute() throws Exception {
 		return this.pID != null && this.pID.length() > 0;
 	}
-
+	
 	/**
 	 * Check whether the ID is a valid CQP ID.
 	 * 
@@ -215,46 +220,48 @@
 			throw new InvalidCqpIdException(pID + TXMCoreMessages.isNotAValidCQPIDForACorpusItMustBeInUppercaseCharacters);
 		return true;
 	}
-
+	
 	@Override
 	public void clean() {
 		super.clean();
-
+		
 		if (CorpusManager.getCorpusManager().getCorpora().get(this.pID) == this) { // un register the MainCorpus
 			CorpusManager.getCorpusManager().getCorpora().remove(this.pID);
 		}
-
+		
 		try {
 			if (CQPSearchEngine.isInitialized()) {
 				CQPSearchEngine.getCqiClient().dropCorpus(getID());
 			}
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			Log.fine(e.getLocalizedMessage());
 			Log.printStackTrace(e);
 		}
-
+		
 		if (dataDirectory != null) {
 			DeleteDir.deleteDirectory(dataDirectory);
 		}
 		if (registryFile != null) {
 			registryFile.delete();
 		}
-
+		
 		Toolbox.notifyEngines(this, "clean");
 		
-		cqpFile = null;;
+		cqpFile = null;
+		;
 		dataDirectory = null;
 		nbtext = -1;
 		registryFile = null;
 		textEndLimits = null;
 		textids = null;
 	}
-
+	
 	public boolean equals(MainCorpus corpus) {
 		if (corpus == null) return false;
 		return this.getQualifiedCqpId().equals(corpus.getQualifiedCqpId());
 	}
-
+	
 	/**
 	 * Export.
 	 *
@@ -262,14 +269,13 @@
 	 * @return true, if successful
 	 */
 	@Override
-	public boolean export(File exportzip)
-	{
+	public boolean export(File exportzip) {
 		return export(exportzip, null);
 	}
-
-
-
-
+	
+	
+	
+	
 	/**
 	 * Export.
 	 *
@@ -277,21 +283,21 @@
 	 * @return true, if successful
 	 */
 	@Override
-	public boolean export(File exportzip, IProgressMonitor monitor)
-	{
+	public boolean export(File exportzip, IProgressMonitor monitor) {
 		if (this.getProject() != null) {
 			try {
 				this.getProject().saveParameters(true); // write parameters in preferences
 				this.getProject().persist(true); // save preferences
 				return this.getProject().export(exportzip, monitor);
-			} catch (Exception e) {
+			}
+			catch (Exception e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
 		}
 		return false;
 	}
-
+	
 	/**
 	 * Find text no.
 	 *
@@ -301,32 +307,33 @@
 	 * @throws IOException Signals that an I/O exception has occurred.
 	 * @throws CqiServerError the cqi server error
 	 */
-	public int findTextNo(String textid) throws CqiClientException, IOException, CqiServerError
-	{
+	public int findTextNo(String textid) throws CqiClientException, IOException, CqiServerError {
 		HashMap<String, Integer> idsmap = this.getTextsIds();
 		if (idsmap.containsKey(textid))
 			return idsmap.get(textid);
 		else
 			return -1;
 	}
-
+	
 	@Override
 	public String getDetails() {
 		try {
-			return this.getName()+" T="+this.getSize();
-		} catch (CqiClientException e) {
+			return this.getName() + " T=" + this.getSize();
+		}
+		catch (CqiClientException e) {
 			return "corpus not ready.";
 		}
 	}
-
+	
 	@Override
 	public String getComputingDoneMessage() {
 		if (hasBeenComputedOnce()) {
 			return getDetails();
-		} else {
+		}
+		else {
 			return "";
 		}
-		//return TXMCoreMessages.common_done;
+		// return TXMCoreMessages.common_done;
 	}
 	
 	/**
@@ -337,6 +344,7 @@
 	public int getFirstPosition() {
 		return 0;
 	}
+	
 	/**
 	 * Gets the full name.
 	 * 
@@ -348,28 +356,30 @@
 	public String getFullName() throws CqiClientException {
 		try {
 			return CorpusManager.getCorpusManager().getCqiClient().corpusFullName(this.pID);
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			throw new CqiClientException(e);
 		}
-
+		
 	}
-
+	
 	@Override
 	public List<Match> getMatches() {
-		List<Match> rez = new ArrayList<Match>();
+		List<Match> rez = new ArrayList<>();
 		try {
-			rez.add(new Match(0, this.getSize()-1));
+			rez.add(new Match(0, this.getSize() - 1));
 			return rez;
-		} catch (CqiClientException e) {
+		}
+		catch (CqiClientException e) {
 			org.txm.utils.logger.Log.printStackTrace(e);
 		}
 		return null;
 	}
-
+	
 	public int getNMatch() {
 		return 1;
 	}
-
+	
 	/**
 	 * Gets the properties available in this corpus.
 	 * 
@@ -382,37 +392,38 @@
 	public List<WordProperty> getProperties() throws CqiClientException {
 		if (this.lexicalUnitsProperties != null)
 			return this.lexicalUnitsProperties;
-
+		
 		String[] propertiesName;
 		CorpusManager cm = null;
 		AbstractCqiClient cc = null;
 		try {
 			cm = CorpusManager.getCorpusManager();
 			cc = cm.getCqiClient();
-
+			
 			// if (cc != null)
 			// System.out.println("cqiclient OK");
-
-		} catch (Exception e) {
+			
+		}
+		catch (Exception e) {
 			throw new CqiClientException(e);
 		}
 		try {
 			// System.out.println(this.pID); // temp : toLowerCAse
 			propertiesName = cc.corpusPositionalAttributes(this.pID);
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			throw new CqiClientException(e);
 		}
-		List<WordProperty> properties = new ArrayList<WordProperty>(
+		List<WordProperty> properties = new ArrayList<>(
 				propertiesName.length);
 		for (int i = 0; i < propertiesName.length; i++)
 			properties.add(new WordProperty(propertiesName[i], this));
 		this.lexicalUnitsProperties = properties;
 		return properties;
 	}
-
+	
 	/*
 	 * (non-Javadoc)
-	 * 
 	 * @see
 	 * org.txm.searchengine.cqp.corpus.Corpus#getProperty(java.lang.
 	 * String)
@@ -422,12 +433,12 @@
 		if (this.lexicalUnitsProperties == null) {
 			getProperties();
 		}
-
+		
 		int idx = name.indexOf(".");
 		if (idx > 0) { // the name if a qualified name
-			name = name.substring(idx+1);
+			name = name.substring(idx + 1);
 		}
-
+		
 		for (WordProperty property : this.lexicalUnitsProperties) {
 			if (property.getName().equals(name)) {
 				return property;
@@ -435,10 +446,9 @@
 		}
 		return null;
 	}
-
+	
 	/*
 	 * (non-Javadoc)
-	 * 
 	 * @see
 	 * org.txm.searchengine.cqp.corpus.CqpObject#getQualifiedCqpId()
 	 */
@@ -446,12 +456,12 @@
 	public String getQualifiedCqpId() {
 		return pID;
 	}
-
+	
 	@Override
 	public String getResultType() {
 		return "Corpus";
 	}
-
+	
 	@Override
 	public String getSimpleName() {
 		if (modified) {
@@ -461,46 +471,45 @@
 			return getName();
 		}
 	}
-
+	
 	/*
 	 * (non-Javadoc)
-	 * 
 	 * @see org.txm.searchengine.cqp.corpus.Corpus#getSize()
 	 */
 	@Override
 	public int getSize() throws CqiClientException {
 		if (!hasBeenComputedOnce) return 0;
-
+		
 		if (this.size == -1) {
 			try {
 				this.size = CorpusManager.getCorpusManager().getCqiClient()
 						.attributeSize(this.pID + ".word"); //$NON-NLS-1$
-			} catch (Exception e) {
+			}
+			catch (Exception e) {
 				throw new CqiClientException(e);
 			}
 		}
 		return this.size;
 	}
-
+	
 	/**
-	 * Return the CQP START positions of the result matches of the 'cql_limit' query 
+	 * Return the CQP START positions of the result matches of the 'cql_limit' query
 	 */
 	@Override
 	public int[] getStartLimits(String cql_limit) throws IOException, CqiServerError, InvalidCqpIdException, CqiClientException {
 		String queryResultId = queryResultNamePrefix + UUID.randomUUID().toString();
 		CorpusManager.getCorpusManager().getCqiClient().cqpQuery(
-				this.getQualifiedCqpId(), queryResultId, CQLQuery.fixQuery(cql_limit)); //$NON-NLS-1$
-		QueryResult queryResult = new QueryResult(queryResultId, queryResultId, this,	new CQLQuery(cql_limit));
-
-		int[] rez =  queryResult.getStarts();
+				this.getQualifiedCqpId(), queryResultId, CQLQuery.fixQuery(cql_limit)); // $NON-NLS-1$
+		QueryResult queryResult = new QueryResult(queryResultId, queryResultId, this, new CQLQuery(cql_limit));
+		
+		int[] rez = queryResult.getStarts();
 		queryResult.drop();
 		return rez;
 	}
-
-
+	
+	
 	/*
 	 * (non-Javadoc)
-	 * 
 	 * @see
 	 * org.txm.searchengine.cqp.corpus.Corpus#getStructuralUnit(java
 	 * .lang.String)
@@ -517,6 +526,7 @@
 		}
 		return null;
 	}
+	
 	/**
 	 * Gets the structural attributes available in this corpus.
 	 * 
@@ -529,14 +539,15 @@
 	public List<StructuralUnit> getStructuralUnits() throws CqiClientException {
 		if (this.structuralUnits != null)
 			return this.structuralUnits;
-
+		
 		// get structures' name
 		Set<String> cqpNames;
 		try {
 			String[] names = CorpusManager.getCorpusManager().getCqiClient()
 					.corpusStructuralAttributes(this.pID);
-			cqpNames = new HashSet<String>(Arrays.asList(names));
-		} catch (Exception e) {
+			cqpNames = new HashSet<>(Arrays.asList(names));
+		}
+		catch (Exception e) {
 			throw new CqiClientException(e);
 		}
 		// What we call a structural unit is called a structural attribute by
@@ -550,15 +561,16 @@
 		// Here, we go through all the structural attribute known by cqp to
 		// decide which is a structural unit and which
 		// an attribute of a structural unit
-
-		Map<String, List<String>> attributes = new HashMap<String, List<String>>();
-
+		
+		Map<String, List<String>> attributes = new HashMap<>();
+		
 		for (String name : cqpNames) {
 			if (!attributes.containsKey(name)) {
 				int _ = name.lastIndexOf("_"); //$NON-NLS-1$
 				if (_ == -1 || !cqpNames.contains(name.substring(0, _))) {
 					attributes.put(name, new ArrayList<String>());
-				} else {
+				}
+				else {
 					String unitName = name.substring(0, _);
 					String attributeName = name.substring(_ + 1);
 					if (!attributes.containsKey(unitName)) {
@@ -568,65 +580,74 @@
 				}
 			}
 		}
-
-		this.structuralUnits = new ArrayList<StructuralUnit>();
+		
+		this.structuralUnits = new ArrayList<>();
 		for (String strucuralUnit : attributes.keySet())
 			this.structuralUnits.add(new StructuralUnit(strucuralUnit,
 					attributes.get(strucuralUnit), this));
-
+		
 		return this.structuralUnits;
 	}
-
-
-	public boolean isModified() { return modified; }
-
+	
+	
+	public boolean isModified() {
+		return modified;
+	}
+	
 	@Override
 	public boolean loadParameters() throws Exception {
 		return true;
 	}
-
+	
 	@Override
 	public boolean saveParameters() throws Exception {
 		return true;
 	}
-
+	
+	@Override
 	protected void setID(String id) {
 		this.pID = id;
 	}
-
-	public void setIsModified(boolean b) { modified = b; }
-
+	
+	@Override
+	public void setIsModified(boolean b) {
+		modified = b;
+	}
+	
+	@Override
 	public void setName(String name) {
 		this.userName = name;
 	}
-
+	
 	@Override
 	public boolean setParameters(TXMParameters parameters) throws Exception {
 		return true;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see java.lang.Object#toString()
 	 */
 	@Override
 	public String toString() {
 		return this.pID;
 	}
-
+	
 	@Override
 	public boolean toTxt(File arg0, String arg1, String arg2, String arg3) throws Exception {
 		// TODO Auto-generated method stub
 		return true;
 	}
-
+	
 	@Override
 	public CorpusBuild getRootCorpusBuild() {
 		return this;
 	}
-
+	
 	/**
 	 * Return the CQP START positions of the main corpus texts
 	 */
+	@Override
 	public int[] getTextStartLimits() throws CqiClientException, IOException, CqiServerError, InvalidCqpIdException {
 		if (textLimits == null) {
 			textLimits = getStartLimits("<text>[]");
@@ -637,12 +658,13 @@
 	/**
 	 * Return the CQP END positions of the main corpus texts
 	 */
+	@Override
 	public int[] getTextEndLimits() throws CqiClientException, IOException, CqiServerError, InvalidCqpIdException {
 		if (textEndLimits == null) {
 			String queryResultId = queryResultNamePrefix + UUID.randomUUID().toString();
 			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(
 					this.getQualifiedCqpId(), queryResultId, "<text>[] expand to text"); //$NON-NLS-1$
-			QueryResult queryResult = new QueryResult(queryResultId, queryResultId, this,	new CQLQuery("<text>[] expand to text")); //$NON-NLS-1$
+			QueryResult queryResult = new QueryResult(queryResultId, queryResultId, this, new CQLQuery("<text>[] expand to text")); //$NON-NLS-1$
 			textEndLimits = queryResult.getEnds();
 		}
 		return textEndLimits;
@@ -653,11 +675,11 @@
 	 *
 	 * @return the nb texts
 	 * @throws CqiClientException the cqi client exception
-	 * @throws CqiServerError 
-	 * @throws IOException 
+	 * @throws CqiServerError
+	 * @throws IOException
 	 */
-	public int getNbTexts() throws CqiClientException, IOException, CqiServerError
-	{
+	@Override
+	public int getNbTexts() throws CqiClientException, IOException, CqiServerError {
 		if (nbtext == -1) {
 			StructuralUnit text_su = this.getStructuralUnit("text"); //$NON-NLS-1$
 			StructuralUnitProperty text_id_sup = text_su.getProperty("id"); //$NON-NLS-1$
@@ -673,16 +695,17 @@
 	 * @throws IOException
 	 * @throws CqiServerError
 	 */
+	@Override
 	public String[] getCorpusTextIdsList() throws CqiClientException, IOException, CqiServerError {
-
+		
 		int nbtext = getNbTexts();
 		int[] structs = new int[nbtext];
-		for(int i = 0 ; i < nbtext ; i++)
+		for (int i = 0; i < nbtext; i++)
 			structs[i] = i;
-
+		
 		StructuralUnit text_su = this.getStructuralUnit("text"); //$NON-NLS-1$
 		StructuralUnitProperty text_id_sup = text_su.getProperty("id"); //$NON-NLS-1$
-
+		
 		return CorpusManager.getCorpusManager().getCqiClient().struc2Str(text_id_sup.getQualifiedName(), structs);
 	}
 	
@@ -694,24 +717,23 @@
 	 * @throws CqiServerError the cqi server error
 	 * @throws CqiClientException the cqi client exception
 	 */
-	public HashMap<String, Integer>  getTextsIds() throws IOException, CqiServerError, CqiClientException
-	{
+	@Override
+	public HashMap<String, Integer> getTextsIds() throws IOException, CqiServerError, CqiClientException {
 		if (textids == null) {
-			textids = new HashMap<String, Integer>();
+			textids = new HashMap<>();
 			int nbtext = getNbTexts();
 			int[] structs = new int[nbtext];
-			for(int i = 0 ; i < nbtext ; i++)
+			for (int i = 0; i < nbtext; i++)
 				structs[i] = i;
-
+			
 			StructuralUnit text_su = this.getStructuralUnit("text"); //$NON-NLS-1$
 			StructuralUnitProperty text_id_sup = text_su.getProperty("id"); //$NON-NLS-1$
-
+			
 			String[] ids = CorpusManager.getCorpusManager().getCqiClient().struc2Str(text_id_sup.getQualifiedName(), structs);
-			for(int i = 0 ; i < ids.length ; i++)
-			{
+			for (int i = 0; i < ids.length; i++) {
 				textids.put(ids[i], structs[i]);
 			}
 		}
 		return textids;
 	}
-}
\ No newline at end of file
+}
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Part.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Part.java	(revision 2441)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Part.java	(revision 2442)
@@ -58,7 +58,6 @@
 		this.pQuery = new CQLQuery(query);
 		this.pID = CqpObject.partNamePrefix + CQPCorpus.getNextSubcorpusCounter();
 		this.setVisible(false);
-		this.internalPersistable = true;
 		this.synchronizedWithParent = true;
 	}
 	
@@ -70,7 +69,6 @@
 		super(parametersNodePath);
 		
 		this.setVisible(false);
-		this.internalPersistable = true;
 		this.synchronizedWithParent = true;
 	}
 	
