Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/UISection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/UISection.java	(revision 1940)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/UISection.java	(revision 1941)
@@ -10,6 +10,7 @@
 import org.eclipse.ui.forms.widgets.ScrolledForm;
 import org.eclipse.ui.forms.widgets.TableWrapData;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.txm.objects.CorpusCommandPreferences;
 import org.txm.objects.Project;
 import org.txm.rcp.messages.TXMUIMessages;
 import org.w3c.dom.Element;
@@ -51,26 +52,19 @@
 
 	@Override
 	public void update(Project project) {
-//		//Element concordanceElement = params.getUIElement(params.getCorpusElement(), "concordance"); //$NON-NLS-1$
-//		if (concordanceElement != null) {
-//			Element context_limitsElement = params.getCQLLimitElement(concordanceElement);
-//			if (context_limitsElement != null)
-//				structLimitsText.setText(project.getCorpusBuild().getCQLLimitQuery()context_limitsElement.getTextContent());
-//		}
+		CorpusCommandPreferences concPrefs = project.getCommandPreferences("concordance");
+		if (concPrefs.get("context_limits") != null) {
+			structLimitsText.setText(concPrefs.get("context_limits"));
+		}
 	}
 
 	@Override
 	public boolean save(Project project) {
-//		if (this.section != null && !section.isDisposed()) {
-//			Element concordanceElement = params.getUIElement(params.getCorpusElement(), "concordance");//.setAttribute("xsl", xsltfileValue.getText()); //$NON-NLS-1$
-//			if (concordanceElement != null) {
-//				Element context_limitsElement = params.getCQLLimitElement(concordanceElement);
-//				context_limitsElement.setAttribute("type", "list"); //$NON-NLS-1$ //$NON-NLS-2$
-//				context_limitsElement.setTextContent(structLimitsText.getText());
-//				//System.out.println(Messages.CorpusPage_80+structLimitsText.getText());
-//			}
-//			return true;
-//		}
+		if (this.section != null && !section.isDisposed()) {
+			CorpusCommandPreferences concPrefs = project.getCommandPreferences("concordance");
+			concPrefs.set("context_limits_type", "list");
+			concPrefs.set("context_limits", structLimitsText.getText());
+		}
 
 		return true;
 	}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 1940)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 1941)
@@ -298,7 +298,7 @@
 		if (project == null) return;
 
 
-		textWhiteSpaces.setText(project.getTokenizerParameter("whitepaces", TokenizerClasses.whitespaces));
+		textWhiteSpaces.setText(project.getTokenizerParameter("whitespaces", TokenizerClasses.whitespaces));
 		textPuncts.setText(project.getTokenizerParameter("regPunct", TokenizerClasses.regPunct));
 		textPunctsStrong.setText(project.getTokenizerParameter("punct_strong", TokenizerClasses.punct_strong));
 		textElisions.setText(project.getTokenizerParameter("regElision", TokenizerClasses.regElision));
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java	(revision 1940)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java	(revision 1941)
@@ -5,6 +5,7 @@
 import java.util.Date;
 import java.util.Locale;
 
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.osgi.util.NLS;
@@ -15,10 +16,13 @@
 import org.txm.core.engines.EngineType;
 import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.results.TXMResult;
+import org.txm.objects.BaseOldParameters;
 import org.txm.objects.EditionDefinition;
 import org.txm.objects.Project;
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.utils.logger.Log;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
 
 public class ImportWizard extends Wizard implements INewWizard {
 
@@ -61,8 +65,8 @@
 						project = p;
 					}
 				}
-				
-				if (project == null) { // it's a new project configuration
+				boolean newProject = project == null;
+				if (newProject) { // it's a new project configuration
 					project = Toolbox.workspace.getProject(name);
 					if (project == null) {
 						project = new Project(Toolbox.workspace, name);
@@ -84,6 +88,13 @@
 						Log.info("The 'annotate' import parameter was not activated since TreeTagger is not installed.");
 					}
 					
+					File importxml = new File(page1.getSourcePath(), "import.xml");
+					if (importxml.exists()) {
+						System.out.println("An import.xml import configuration file was found. Restoring import parameters using this file.");
+						BaseOldParameters params = new BaseOldParameters(importxml);
+						params.load();
+						params.initializeProject(project);
+					}
 				} else {
 					Date date = project.getLastComputingDate();
 					if (date == null) {
@@ -92,8 +103,6 @@
 					Log.info(NLS.bind(TXMUIMessages.theP1P0CorpusWillBeReplaced, project, date));
 				}
 				
-				//project.compute(); // create/update files
-				
 				if (!project.hasEditionDefinition("default")) {
 					EditionDefinition def = project.getEditionDefinition("default");
 					def.setBuildEdition(true);
@@ -101,13 +110,6 @@
 					def.setPageBreakTag("pb");
 				}
 				
-				File importxml = new File(page1.getSourcePath(), "import.xml");
-				if (importxml.exists()) {
-					//System.out.println("Warning: old TXM source directory containing an import.xml file found. Settings import parameters using this file.");
-					//BaseOldParameters params = new BaseOldParameters(importxml);
-					//project._load(params);
-				}
-				
 				project.setDoUpdate(false);
 				project.saveParameters();
 				return true;
Index: tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java
===================================================================
--- tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java	(revision 1940)
+++ tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java	(revision 1941)
@@ -314,10 +314,9 @@
 				Display.getDefault().syncExec(new Runnable() {
 					@Override
 					public void run() {
-						linkedEditor.fillDisplayArea();						
+						linkedEditor.fillDisplayArea(true);
 					}
 				});
-
 			}
 
 			// update range change tracking variables
Index: tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java
===================================================================
--- tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 1940)
+++ tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java	(revision 1941)
@@ -789,7 +789,7 @@
 	 * @param from the from
 	 * @param to the to
 	 */
-	public void fillDisplayArea() {
+	public void fillDisplayArea(boolean update) {
 		if (viewerRight == null) {
 			return;
 		}
@@ -819,8 +819,7 @@
 		viewerRight.setInput(lines);
 		viewerLeft.setInput(lines);
 
-		navigationWidget.setInfoLineText("" + (from+1), //$NON-NLS-1$
-				" - " + (to+1) + " / " + concordance.getNLines()); //$NON-NLS-1$ //$NON-NLS-2$
+		navigationWidget.setInfoLineText("" + (from+1), " - " + (to+1) + " / " + concordance.getNLines()); //$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-3$
 
 		navigationWidget.setPreviousEnabled(concordance.getTopIndex() > 0);
 		navigationWidget.setFirstEnabled(concordance.getTopIndex() > 0);
@@ -1155,7 +1154,7 @@
 			public void widgetSelected(SelectionEvent arg0) {
 				concordance.setTopIndex(0);
 				try {
-					refresh(true);
+					refresh(false);
 					viewerRight.getTable().setTopIndex(0);
 				} catch (Exception e1) {
 					// TODO Auto-generated catch block
@@ -1177,7 +1176,7 @@
 					top = 0;
 				concordance.setTopIndex(top);
 				try {
-					refresh(true);
+					refresh(false);
 					viewerRight.getTable().setTopIndex(0);
 				} catch (Exception e1) {
 					// TODO Auto-generated catch block
@@ -1196,7 +1195,7 @@
 			public void widgetSelected(SelectionEvent e) {
 				concordance.setTopIndex(concordance.getTopIndex() + concordance.getNLinePerPage());
 				try {
-					refresh(true);
+					refresh(false);
 					viewerRight.getTable().setTopIndex(0);
 				} catch (Exception e1) {
 					// TODO Auto-generated catch block
@@ -1218,7 +1217,7 @@
 				//int bottom = top + concordance.getNLinePerPage() -1;
 				concordance.setTopIndex(top);
 				try {
-					refresh(true);
+					refresh(false);
 					viewerRight.getTable().setTopIndex(0);
 				} catch (Exception e1) {
 					// TODO Auto-generated catch block
@@ -1242,10 +1241,13 @@
 
 			QueriesView.refresh();
 
-			this.fillDisplayArea();
+			this.fillDisplayArea(update);
+			
 			this.queryWidget.memorize();
 
-			resetColumnWidths();
+			if (update) {
+				resetColumnWidths();
+			}
 
 			JobsTimer.stopAndPrint();
 
@@ -1377,7 +1379,7 @@
 	public void setContextSize(int leftContextSize, int rightContextSize) {
 		concordance.setLeftContextSize(leftContextSize);
 		concordance.setRightContextSize(rightContextSize);
-		fillDisplayArea(); // we return to the previously
+		fillDisplayArea(false); // we return to the previously
 		resetRightTableColumnWidths();
 	}
 
Index: tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/DeleteLines.java
===================================================================
--- tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/DeleteLines.java	(revision 1940)
+++ tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/handlers/DeleteLines.java	(revision 1941)
@@ -81,7 +81,7 @@
 		try {
 		//	System.out.println("Delete line "+lines);
 			if (concordance.removeLines(lines)) {
-				editor.fillDisplayArea();
+				editor.fillDisplayArea(false);
 			}
 		} catch (Exception e1) {
 			// TODO Auto-generated catch block
Index: tmp/org.txm.core/src/java/org/txm/objects/CorpusCommandPreferences.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/CorpusCommandPreferences.java	(revision 0)
+++ tmp/org.txm.core/src/java/org/txm/objects/CorpusCommandPreferences.java	(revision 1941)
@@ -0,0 +1,50 @@
+package org.txm.objects;
+
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+import org.txm.core.preferences.TBXPreferences;
+
+/**
+ * Wrapper for getting&setting corpus command default parameters
+ * 
+ * @author mdecorde
+ *
+ */
+public class CorpusCommandPreferences {
+
+	Preferences node;
+	
+	public CorpusCommandPreferences(Project project, String name) {
+		this.node = project.getPreferencesScope().getNode(CorpusCommandPreferences.class.getSimpleName()).node(name);
+		setName(name);
+	}
+
+	public String getName() {
+		return node.get(TBXPreferences.NAME, null);
+	}
+
+	public void set(String key, String value) {
+		node.put(key, value);
+	}
+	
+	public String get(String key) {
+		return node.get(key, null);
+	}
+
+	public void setName(String name) {
+		node.put(TBXPreferences.NAME, name);
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		try {
+			for (String k : node.keys()) {
+				buffer.append(k+"="+node.get(k, "")+"\t");
+			}
+		} catch (BackingStoreException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return buffer.toString();
+	}
+}

Property changes on: tmp/org.txm.core/src/java/org/txm/objects/CorpusCommandPreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/src/java/org/txm/objects/BaseOldParameters.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/BaseOldParameters.java	(revision 1940)
+++ tmp/org.txm.core/src/java/org/txm/objects/BaseOldParameters.java	(revision 1941)
@@ -188,19 +188,19 @@
 	 */
 	public Element addEdition(Element textElem, String name, String index, String type)
 	{
-		NodeList editionsList = textElem.getElementsByTagName("editions");
+		NodeList editionsList = textElem.getElementsByTagName("editions");//$NON-NLS-1$
 		Element editions = null;
 		if (editionsList.getLength() == 0) {
-			editions = textElem.getOwnerDocument().createElement("editions");
+			editions = textElem.getOwnerDocument().createElement("editions");//$NON-NLS-1$
 			textElem.appendChild(editions);
 		} else {
 			editions = (Element) editionsList.item(0);
 		}
 
-		Element editionElement = editions.getOwnerDocument().createElement("edition");
+		Element editionElement = editions.getOwnerDocument().createElement("edition");//$NON-NLS-1$
 		editionElement.setAttribute(NAME, name);
-		editionElement.setAttribute("index", index);
-		editionElement.setAttribute("type", type);
+		editionElement.setAttribute("index", index);//$NON-NLS-1$
+		editionElement.setAttribute("type", type);//$NON-NLS-1$
 		editions.appendChild(editionElement);
 
 		return editionElement;
@@ -216,15 +216,15 @@
 	 */
 	public Element addEditionDefinition(Element corpusElem, String name, String mode, String script) {
 		Element editionsElement = getEditionsElement(corpusElem);
-		Element editionElement = editionsElement.getOwnerDocument().createElement("edition");
+		Element editionElement = editionsElement.getOwnerDocument().createElement("edition");//$NON-NLS-1$
 		editionElement.setAttribute(NAME, name);
-		editionElement.setAttribute("build_edition", ""+DEFAULT_DOEDITION);
-		editionElement.setAttribute("page_break_tag", ""+DEFAULT_PAGEELEMENT);
-		editionElement.setAttribute("words_per_page", ""+DEFAULT_WORDSPERPAGE);
-		editionElement.setAttribute("mode", mode);
-		editionElement.setAttribute("script", script);
-		editionElement.setAttribute("type", "html");
-		editionElement.setAttribute("index", ".");
+		editionElement.setAttribute("build_edition", ""+DEFAULT_DOEDITION);//$NON-NLS-1$
+		editionElement.setAttribute("page_break_tag", ""+DEFAULT_PAGEELEMENT);//$NON-NLS-1$
+		editionElement.setAttribute("words_per_page", ""+DEFAULT_WORDSPERPAGE);//$NON-NLS-1$
+		editionElement.setAttribute("mode", mode);//$NON-NLS-1$
+		editionElement.setAttribute("script", script);//$NON-NLS-1$
+		editionElement.setAttribute("type", "html");//$NON-NLS-1$
+		editionElement.setAttribute("index", ".");//$NON-NLS-1$
 		editionsElement.appendChild(editionElement);
 
 		return editionElement;
@@ -232,9 +232,9 @@
 
 	public Element addPage(Element edition, String idx, String wordid)
 	{
-		Element page = edition.getOwnerDocument().createElement("page");
-		page.setAttribute("id", idx);
-		page.setAttribute("wordid", wordid);
+		Element page = edition.getOwnerDocument().createElement("page");//$NON-NLS-1$
+		page.setAttribute("id", idx);//$NON-NLS-1$
+		page.setAttribute("wordid", wordid);//$NON-NLS-1$
 		edition.appendChild(page);
 		return page;
 	}
@@ -242,10 +242,10 @@
 	public void addPartition(Element corpusElem, String name, String[] queries,
 			String[] names) {
 		Element preBuildElement = this.getPreBuildElement(corpusElem);
-		Element partitionElem = preBuildElement.getOwnerDocument().createElement("partition");
+		Element partitionElem = preBuildElement.getOwnerDocument().createElement("partition");//$NON-NLS-1$
 		partitionElem.setAttribute(NAME, name);
 		for (int i = 0 ; i < queries.length ; i++) {
-			Element partElem = preBuildElement.getOwnerDocument().createElement("part");
+			Element partElem = preBuildElement.getOwnerDocument().createElement("part");//$NON-NLS-1$
 			partElem.setAttribute(NAME, names[i]);
 			partElem.setAttribute(QUERY, queries[i]);
 			partitionElem.appendChild(partElem);
@@ -255,23 +255,23 @@
 
 	public Element addPAttribute(Element corpusElem, String name, String shortname, String longname, String type, String renderer, String tooltip, String pattern, String importB, String mandatory, String inputFormat, String outputFormat)
 	{
-		NodeList pattributesList = corpusElem.getElementsByTagName("pattributes");
+		NodeList pattributesList = corpusElem.getElementsByTagName("pattributes");//$NON-NLS-1$
 		if(pattributesList.getLength() == 0)
 			return null;
 
 		Element pattributes = (Element) pattributesList.item(0);
-		Element pattribute = pattributes.getOwnerDocument().createElement("pattribute");
-		pattribute.setAttribute("id", name);
-		pattribute.setAttribute("shortname", shortname);
-		pattribute.setAttribute("longname", longname);
-		pattribute.setAttribute("type", type);
-		pattribute.setAttribute("renderer", renderer);
-		pattribute.setAttribute("tooltip", tooltip);
-		pattribute.setAttribute("pattern", pattern);
-		pattribute.setAttribute("import", importB);
-		pattribute.setAttribute("mandatory", mandatory);
-		pattribute.setAttribute("inputFormat", inputFormat);
-		pattribute.setAttribute("outputFormat", outputFormat);
+		Element pattribute = pattributes.getOwnerDocument().createElement("pattribute");//$NON-NLS-1$
+		pattribute.setAttribute("id", name);//$NON-NLS-1$
+		pattribute.setAttribute("shortname", shortname);//$NON-NLS-1$
+		pattribute.setAttribute("longname", longname);//$NON-NLS-1$
+		pattribute.setAttribute("type", type);//$NON-NLS-1$
+		pattribute.setAttribute("renderer", renderer);//$NON-NLS-1$
+		pattribute.setAttribute("tooltip", tooltip);//$NON-NLS-1$
+		pattribute.setAttribute("pattern", pattern);//$NON-NLS-1$
+		pattribute.setAttribute("import", importB);//$NON-NLS-1$
+		pattribute.setAttribute("mandatory", mandatory);//$NON-NLS-1$
+		pattribute.setAttribute("inputFormat", inputFormat);//$NON-NLS-1$
+		pattribute.setAttribute("outputFormat", outputFormat);//$NON-NLS-1$
 		pattributes.appendChild(pattribute);
 
 		return pattribute;
@@ -279,12 +279,12 @@
 
 	public Element addPreBuildCorpus(Element corpusElem, String name, String query, String exemple)
 	{
-		NodeList prebuildsList = corpusElem.getElementsByTagName("preBuild");
+		NodeList prebuildsList = corpusElem.getElementsByTagName("preBuild");//$NON-NLS-1$
 		if(prebuildsList.getLength() == 0)
 			return null;
 
 		Element preBuild = (Element) prebuildsList.item(0);
-		Element subcorpus = preBuild.getOwnerDocument().createElement("subcorpus");
+		Element subcorpus = preBuild.getOwnerDocument().createElement("subcorpus");//$NON-NLS-1$
 		subcorpus.setAttribute(NAME, name);
 		subcorpus.setAttribute(QUERY, query);
 
@@ -294,7 +294,7 @@
 
 	public Element addQuery(Element corpusElem, String name, String query, String desc)
 	{
-		NodeList queriesList = corpusElem.getElementsByTagName("queries");
+		NodeList queriesList = corpusElem.getElementsByTagName("queries");//$NON-NLS-1$
 		if(queriesList.getLength() == 0)
 			return null;
 
@@ -310,23 +310,23 @@
 
 	public Element addSAttribute(Element corpusElem, String name, String shortname, String longname, String type, String renderer, String tooltip, String pattern, String importB, String mandatory, String inputFormat, String outputFormat)
 	{
-		NodeList sattributesList = corpusElem.getElementsByTagName("sattributes");
+		NodeList sattributesList = corpusElem.getElementsByTagName("sattributes");//$NON-NLS-1$
 		if(sattributesList.getLength() == 0)
 			return null;
 
 		Element sattributes = (Element) sattributesList.item(0);
-		Element sattribute = sattributes.getOwnerDocument().createElement("sattribute");
-		sattribute.setAttribute("id", name);
-		sattribute.setAttribute("shortname", shortname);
-		sattribute.setAttribute("longname", longname);
-		sattribute.setAttribute("type", type);
-		sattribute.setAttribute("renderer", renderer);
-		sattribute.setAttribute("tooltip", tooltip);
-		sattribute.setAttribute("pattern", pattern);
-		sattribute.setAttribute("import", importB);
-		sattribute.setAttribute("mandatory", mandatory);
-		sattribute.setAttribute("inputFormat", inputFormat);
-		sattribute.setAttribute("outputFormat", outputFormat);
+		Element sattribute = sattributes.getOwnerDocument().createElement("sattribute");//$NON-NLS-1$
+		sattribute.setAttribute("id", name);//$NON-NLS-1$
+		sattribute.setAttribute("shortname", shortname);//$NON-NLS-1$
+		sattribute.setAttribute("longname", longname);//$NON-NLS-1$
+		sattribute.setAttribute("type", type);//$NON-NLS-1$
+		sattribute.setAttribute("renderer", renderer);//$NON-NLS-1$
+		sattribute.setAttribute("tooltip", tooltip);//$NON-NLS-1$
+		sattribute.setAttribute("pattern", pattern);//$NON-NLS-1$
+		sattribute.setAttribute("import", importB);//$NON-NLS-1$
+		sattribute.setAttribute("mandatory", mandatory);//$NON-NLS-1$
+		sattribute.setAttribute("inputFormat", inputFormat);//$NON-NLS-1$
+		sattribute.setAttribute("outputFormat", outputFormat);//$NON-NLS-1$
 		sattributes.appendChild(sattribute);
 
 		return sattribute;
@@ -335,7 +335,7 @@
 	public void addSubcorpus(Element corpusElem, String name, String query,
 			String desc) {
 		Element preBuildElement = this.getPreBuildElement(corpusElem);
-		Element subcorpusElem = preBuildElement.getOwnerDocument().createElement("subcorpus");
+		Element subcorpusElem = preBuildElement.getOwnerDocument().createElement("subcorpus");//$NON-NLS-1$
 		subcorpusElem.setAttribute(NAME, name);
 		subcorpusElem.setAttribute(QUERY, query);
 		subcorpusElem.setAttribute(DESC, desc);
@@ -351,33 +351,33 @@
 	 */
 	public Element addText(Element corpusElem, String name, File sourceFile)
 	{
-		NodeList textsList = corpusElem.getElementsByTagName("texts");
+		NodeList textsList = corpusElem.getElementsByTagName("texts");//$NON-NLS-1$
 		Element texts = null;
 		if (textsList.getLength() == 0) {
-			texts = corpusElem.getOwnerDocument().createElement("texts");
+			texts = corpusElem.getOwnerDocument().createElement("texts");//$NON-NLS-1$
 			corpusElem.appendChild(texts);
 		} else {
 			texts = (Element) textsList.item(0);
 		}
 
-		Element text = texts.getOwnerDocument().createElement("text");
+		Element text = texts.getOwnerDocument().createElement("text");//$NON-NLS-1$
 		text.setAttribute(NAME, name);
 		texts.appendChild(text);
 
-		Element source = texts.getOwnerDocument().createElement("source");
-		source.setAttribute("file", sourceFile.getAbsolutePath());
-		source.setAttribute("type", ".xml");
+		Element source = texts.getOwnerDocument().createElement("source");//$NON-NLS-1$
+		source.setAttribute("file", sourceFile.getAbsolutePath());//$NON-NLS-1$
+		source.setAttribute("type", ".xml");//$NON-NLS-1$
 		text.appendChild(source);
-		text.appendChild(texts.getOwnerDocument().createElement("editions"));
+		text.appendChild(texts.getOwnerDocument().createElement("editions"));//$NON-NLS-1$
 
 		return text;
 	}
 
 
 	public Element getTextsElement(Element corpusElement) {
-		NodeList textsList = corpusElement.getElementsByTagName("texts");
+		NodeList textsList = corpusElement.getElementsByTagName("texts");//$NON-NLS-1$
 		if(textsList.getLength() == 0) {
-			Element texts = corpusElement.getOwnerDocument().createElement("texts");
+			Element texts = corpusElement.getOwnerDocument().createElement("texts");//$NON-NLS-1$
 			corpusElement.appendChild(texts);
 			return texts;
 		} else {
@@ -399,22 +399,22 @@
 	}
 
 	public Element getTextElement(Element textsElement, String name) {
-		NodeList textsList = textsElement.getElementsByTagName("text");
+		NodeList textsList = textsElement.getElementsByTagName("text");//$NON-NLS-1$
 
 		for (int i = 0 ; i < textsList.getLength() ;i++) {
 			Element text = (Element) textsList.item(i);
-			if (name.equals(text.getAttribute("name"))) return text;
+			if (name.equals(text.getAttribute("name"))) return text;//$NON-NLS-1$
 		}
 		return null;
 
 	}
 
 	public Element getEditionElement(Element textElement, String name) {
-		NodeList editionsList = textElement.getElementsByTagName("edition");
+		NodeList editionsList = textElement.getElementsByTagName("edition");//$NON-NLS-1$
 
 		for (int i = 0 ; i < editionsList.getLength() ;i++) {
 			Element editionElement = (Element) editionsList.item(i);
-			if (name.equals(editionElement.getAttribute("name"))) {
+			if (name.equals(editionElement.getAttribute("name"))) {//$NON-NLS-1$
 				return editionElement;
 			}
 		}
@@ -443,12 +443,12 @@
 	public void addTokenizerTest(Element corpusElem, String regex,
 			String type, String before, String hit, String after) {
 		Element tokenizer = getTokenizerElement(corpusElem);
-		Element test = tokenizer.getOwnerDocument().createElement("test");
+		Element test = tokenizer.getOwnerDocument().createElement("test");//$NON-NLS-1$
 		test.setAttribute(TYPE, type);
 		test.setAttribute(VALUE, regex);
-		test.setAttribute("before", before);
-		test.setAttribute("hit", hit);
-		test.setAttribute("after", after);
+		test.setAttribute("before", before);//$NON-NLS-1$
+		test.setAttribute("hit", hit);//$NON-NLS-1$
+		test.setAttribute("after", after);//$NON-NLS-1$
 		tokenizer.appendChild(test);
 	}
 
@@ -467,7 +467,7 @@
 	}
 
 	public Element getBibliosElement(Element corpusElem) {
-		return getElement(corpusElem, "biblios");
+		return getElement(corpusElem, "biblios");//$NON-NLS-1$
 	}
 
 	public boolean getCleanTEMPDirectories(Element corpusElem) {
@@ -497,12 +497,12 @@
 	}
 
 	public Element getCQLLimitElement(Element uiElement) {
-		NodeList uiList = uiElement.getElementsByTagName("context_limits");
+		NodeList uiList = uiElement.getElementsByTagName("context_limits");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
 			return (Element)(uiList.item(0));
 		} else {
-			Element context_limitsElement = uiElement.getOwnerDocument().createElement("context_limits");
-			context_limitsElement.setAttribute("type", "list");
+			Element context_limitsElement = uiElement.getOwnerDocument().createElement("context_limits");//$NON-NLS-1$
+			context_limitsElement.setAttribute("type", "list");//$NON-NLS-1$ $NON-NLS-2$
 			context_limitsElement.setTextContent(DEFAULT_CQPLIMITS);
 			uiElement.appendChild(context_limitsElement);
 			return context_limitsElement;
@@ -511,25 +511,24 @@
 
 	public Element getWordElement() {
 		Element textualPlanEelement = getTextualPlans();
-		NodeList uiList = textualPlanEelement.getElementsByTagName("word");
+		NodeList uiList = textualPlanEelement.getElementsByTagName("word");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
 			return (Element)(uiList.item(0));
 		} else {
-			Element wordElement = textualPlanEelement.getOwnerDocument().createElement("word");
-			wordElement.setTextContent("w");
+			Element wordElement = textualPlanEelement.getOwnerDocument().createElement("word");//$NON-NLS-1$
+			wordElement.setTextContent("w");//$NON-NLS-1$
 			textualPlanEelement.appendChild(wordElement);
 			return wordElement;
 		}
 	}
 
-
 	public Element getMilestonesElement() {
 		Element textualPlanEelement = getTextualPlans();
-		NodeList uiList = textualPlanEelement.getElementsByTagName("milestones");
+		NodeList uiList = textualPlanEelement.getElementsByTagName("milestones");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
 			return (Element)(uiList.item(0));
 		} else {
-			Element wordElement = textualPlanEelement.getOwnerDocument().createElement("milestones");
+			Element wordElement = textualPlanEelement.getOwnerDocument().createElement("milestones");//$NON-NLS-1$
 			wordElement.setTextContent("");
 			textualPlanEelement.appendChild(wordElement);
 			return wordElement;
@@ -547,13 +546,13 @@
 
 	public Element getOutSideTextTagsElement() {
 		Element textualPlanEelement = getTextualPlans();
-		NodeList uiList = textualPlanEelement.getElementsByTagName("outsidetexttags");
+		NodeList uiList = textualPlanEelement.getElementsByTagName("outsidetexttags");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
 			return (Element)(uiList.item(0));
 		} else {
-			Element context_limitsElement = textualPlanEelement.getOwnerDocument().createElement("outsidetexttags");
-			context_limitsElement.setAttribute("type", "list");
-			context_limitsElement.setTextContent("");
+			Element context_limitsElement = textualPlanEelement.getOwnerDocument().createElement("outsidetexttags");//$NON-NLS-1$
+			context_limitsElement.setAttribute("type", "list");//$NON-NLS-1$ $NON-NLS-2$
+			context_limitsElement.setTextContent("");//$NON-NLS-1$
 			textualPlanEelement.appendChild(context_limitsElement);
 			return context_limitsElement;
 		}
@@ -561,13 +560,13 @@
 	
 	public Element getOutSideTextTagsAndKeepContentElement() {
 		Element textualPlanEelement = getTextualPlans();
-		NodeList uiList = textualPlanEelement.getElementsByTagName("outside_text_tags_and_keep_content");
+		NodeList uiList = textualPlanEelement.getElementsByTagName("outside_text_tags_and_keep_content");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
 			return (Element)(uiList.item(0));
 		} else {
-			Element element = textualPlanEelement.getOwnerDocument().createElement("outside_text_tags_and_keep_content");
-			element.setAttribute("type", "list");
-			element.setTextContent("");
+			Element element = textualPlanEelement.getOwnerDocument().createElement("outside_text_tags_and_keep_content");//$NON-NLS-1$
+			element.setAttribute("type", "list");//$NON-NLS-1$ $NON-NLS-2$
+			element.setTextContent("");//$NON-NLS-1$
 			textualPlanEelement.appendChild(element);
 			return element;
 		}
@@ -575,13 +574,13 @@
 	
 	public Element getNoteElement() {
 		Element textualPlanElement = getTextualPlans();
-		NodeList noteList = textualPlanElement.getElementsByTagName("note");
+		NodeList noteList = textualPlanElement.getElementsByTagName("note");//$NON-NLS-1$
 		if (noteList.getLength() > 0) {
 			return (Element)(noteList.item(0));
 		} else {
-			Element element = textualPlanElement.getOwnerDocument().createElement("note");
-			element.setAttribute("type", "list");
-			element.setTextContent("");
+			Element element = textualPlanElement.getOwnerDocument().createElement("note");//$NON-NLS-1$
+			element.setAttribute("type", "list");//$NON-NLS-1$
+			element.setTextContent("");//$NON-NLS-1$
 			textualPlanElement.appendChild(element);
 			return element;
 		}
@@ -595,7 +594,7 @@
 		Element editionElement = getEditionDefinitionElement(editionsElement, edition);
 		if (editionElement == null) return DEFAULT_DOEDITION;
 
-		String value = editionElement.getAttribute("build_edition");
+		String value = editionElement.getAttribute("build_edition");//$NON-NLS-1$
 		if (value == null | value.length() == 0) return DEFAULT_DOEDITION;
 
 		return TRUE.equals(value);
@@ -608,10 +607,10 @@
 	 * @return the edition Element corresponding to the asked edition name
 	 */
 	public Element getEditionDefinitionElement(Element editionsElem, String name) {
-		NodeList editionList = editionsElem.getElementsByTagName("edition");
+		NodeList editionList = editionsElem.getElementsByTagName("edition");//$NON-NLS-1$
 		for (int i = 0 ; i < editionList.getLength() ; i++) {
 			Element elem = (Element)editionList.item(i);
-			if (name.equals(elem.getAttribute("name")))
+			if (name.equals(elem.getAttribute("name")))//$NON-NLS-1$
 				return elem;
 		}
 		//
@@ -634,9 +633,9 @@
 	 * @return the element that list the declared editions in a corpus
 	 */
 	public Element getEditionsElement(Element corpusElem) {
-		Element elem = getElement(corpusElem, "editions");
+		Element elem = getElement(corpusElem, "editions");//$NON-NLS-1$
 		if (elem == null) {
-			elem = corpusElem.getOwnerDocument().createElement("editions");
+			elem = corpusElem.getOwnerDocument().createElement("editions");//$NON-NLS-1$
 		}
 		if (!elem.hasAttribute(DEFAULT))
 			elem.setAttribute(DEFAULT, DEFAULT);
@@ -663,10 +662,10 @@
 	public ArrayList<String> getExcludeXpaths() {
 		Element filter = getFilterElement();
 		ArrayList<String> xpaths = new ArrayList<String>();
-		NodeList excludeList = filter.getElementsByTagName("exclude");
+		NodeList excludeList = filter.getElementsByTagName("exclude");//$NON-NLS-1$
 		for (int i = 0 ; i < excludeList.getLength() ; i++) {
 			Element exclude = (Element) excludeList.item(i);
-			if ("xpath".equals(exclude.getAttribute("type")))
+			if ("xpath".equals(exclude.getAttribute("type")))//$NON-NLS-1$ $NON-NLS-2$
 				xpaths.add(exclude.getTextContent().trim());
 		}
 		return xpaths;
@@ -674,12 +673,12 @@
 
 	public Element getFilterElement() {
 		Element corpusElem = corpora.get(getCorpusName());
-		return getElement(corpusElem, "xmlfilter");
+		return getElement(corpusElem, "xmlfilter");//$NON-NLS-1$
 	}
 
 	public String getLang(Element corpusElem) {
 		String str = corpusElem.getAttribute(LANG);
-		if (str == null) str = System.getProperty("user.locale");
+		if (str == null) str = System.getProperty("user.locale");//$NON-NLS-1$
 		return str;
 	}
 
@@ -691,59 +690,59 @@
 		Element editionElement = getEditionDefinitionElement(editionsElement, edition);
 		if (editionElement == null) return DEFAULT_PAGEELEMENT;
 
-		String value = editionElement.getAttribute("page_break_tag");
+		String value = editionElement.getAttribute("page_break_tag");//$NON-NLS-1$
 		if (value == null || value.length() == 0) return DEFAULT_PAGEELEMENT;
 
 		return value;
 	}
 
 	public NodeList getPAttributes(Element corpusElem) {
-		NodeList pattributesList = corpusElem.getElementsByTagName("pattributes");
+		NodeList pattributesList = corpusElem.getElementsByTagName("pattributes");//$NON-NLS-1$
 		if(pattributesList.getLength() == 0)
 			return null;
-		return ((Element)pattributesList.item(0)).getElementsByTagName("pattribute");
+		return ((Element)pattributesList.item(0)).getElementsByTagName("pattribute");//$NON-NLS-1$
 	}
 
 	public Element getPAttributesElement(Element corpusElem) {
-		return getElement(corpusElem, "pattributes");
+		return getElement(corpusElem, "pattributes");//$NON-NLS-1$
 	}
 
 	public Element getPreBuildElement() {
 		Element corpusElem = corpora.get(getCorpusName());
-		return getElement(corpusElem, "preBuild");
+		return getElement(corpusElem, "preBuild");//$NON-NLS-1$
 	}
 
 	public Element getPreBuildElement(Element corpusElem) {
-		return getElement(corpusElem, "preBuild");
+		return getElement(corpusElem, "preBuild");//$NON-NLS-1$
 	}
 
 	public Element getQueriesElement(Element corpusElem) {
-		return getElement(corpusElem, "queries");
+		return getElement(corpusElem, "queries");//$NON-NLS-1$
 	}
 
 	public Element getSAttributesElement(Element corpusElem) {
-		return getElement(corpusElem, "sattributes");
+		return getElement(corpusElem, "sattributes");//$NON-NLS-1$
 	}
 
 	public Element getTokenizerElement(Element corpusElem) {
-		return getElement(corpusElem, "tokenizer");
+		return getElement(corpusElem, "tokenizer");//$NON-NLS-1$
 	}
 
 	public Element getUIElement(Element corpusElem, String command) {
 		Element uisElement = getUIsElement(corpusElem);
 		Element uiElement = null;
-		NodeList uiList = uisElement.getElementsByTagName("ui");
+		NodeList uiList = uisElement.getElementsByTagName("ui");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
 			for (int i = 0 ; i < uiList.getLength() ; i++ ) {
 				Element ui = (Element)(uiList.item(i));
-				if (command.equals(ui.getAttribute("command"))) {
+				if (command.equals(ui.getAttribute("command"))) {//$NON-NLS-1$
 					return ui;
 				}
 			}
 		} 
 		if (uiElement == null){
-			uiElement = uisElement.getOwnerDocument().createElement("ui");
-			uiElement.setAttribute("command", command);
+			uiElement = uisElement.getOwnerDocument().createElement("ui");//$NON-NLS-1$
+			uiElement.setAttribute("command", command);//$NON-NLS-1$
 			uisElement.appendChild(uiElement);
 		}
 		return uiElement;
@@ -761,34 +760,34 @@
 		Element editionElement = getEditionDefinitionElement(editionsElement, edition);
 		if (editionElement == null) return DEFAULT_WORDSPERPAGE;
 
-		String value = editionElement.getAttribute("words_per_page");
+		String value = editionElement.getAttribute("words_per_page");//$NON-NLS-1$
 		if (value == null) return DEFAULT_WORDSPERPAGE;
 
 		try {
 			return Integer.parseInt(value);
 		} catch (NumberFormatException e) {
-			Log.fine("words_per_page value is not an Integer value: "+value);
+			Log.fine("words_per_page value is not an Integer value: "+value);//$NON-NLS-1$
 			return DEFAULT_WORDSPERPAGE;
 		}
 	}
 
 	public Element getXsltElement(Element corpusElem) {
-		Element elem = getElement(corpusElem, "xslt");
-		if (!elem.hasAttribute("xsl"))
-			elem.setAttribute("xsl", "");
+		Element elem = getElement(corpusElem, "xslt");//$NON-NLS-1$
+		if (!elem.hasAttribute("xsl"))//$NON-NLS-1$
+			elem.setAttribute("xsl", "");//$NON-NLS-1$
 		return elem;
 	}
 
 	public HashMap<String, String> getXsltParams(Element corpusElem) {
-		Element elem = getElement(corpusElem, "xslt");
-		if (!elem.hasAttribute("xsl"))
-			elem.setAttribute("xsl", "");
+		Element elem = getElement(corpusElem, "xslt");//$NON-NLS-1$
+		if (!elem.hasAttribute("xsl"))//$NON-NLS-1$
+			elem.setAttribute("xsl", "");//$NON-NLS-1$
 		HashMap<String, String> hash = new HashMap<String, String>();
-		NodeList params = elem.getElementsByTagName("param");
+		NodeList params = elem.getElementsByTagName("param");//$NON-NLS-1$
 		for(int i = 0 ; i < params.getLength() ; i++) {
 			Element paramElem = (Element) params.item(i);
-			String name = paramElem.getAttribute("name");
-			String value = paramElem.getAttribute("value");
+			String name = paramElem.getAttribute("name");//$NON-NLS-1$
+			String value = paramElem.getAttribute("value");//$NON-NLS-1$
 			if (name != null && value != null && name.length() > 0) {
 				hash.put(name, value);
 			}
@@ -798,7 +797,7 @@
 
 	public void loadKeyValueParameters(Element parametersElem) {
 		//HashMap<String, String> hash = new HashMap<String, String>();
-		NodeList params = parametersElem.getElementsByTagName("param");
+		NodeList params = parametersElem.getElementsByTagName("param");//$NON-NLS-1$
 		for (int i = 0 ; i < params.getLength() ; i++) {
 			Element paramElem = (Element) params.item(i);
 			String name = paramElem.getAttribute(PARAMETERKEY);
@@ -812,7 +811,7 @@
 	public void saveKeyValueParameters(Element parametersElem) {
 		//HashMap<String, String> hash = new HashMap<String, String>();
 		
-		NodeList params = parametersElem.getElementsByTagName("param");
+		NodeList params = parametersElem.getElementsByTagName("param");//$NON-NLS-1$
 		HashSet<String> existingNames = new HashSet<String>();
 		for (int i = 0 ; i < params.getLength() ; i++) {
 			Element paramElem = (Element) params.item(i);
@@ -828,7 +827,7 @@
 		
 		for (String name : keyValueParameters.keySet()) {
 			if (!existingNames.contains(name)) { // create the element
-				Element paramElem = parametersElem.getOwnerDocument().createElement("param");
+				Element paramElem = parametersElem.getOwnerDocument().createElement("param");//$NON-NLS-1$
 				paramElem.setAttribute(PARAMETERKEY, name);
 				paramElem.setAttribute(PARAMETERVALUE, keyValueParameters.get(name).toString());
 				parametersElem.appendChild(paramElem);
@@ -851,7 +850,7 @@
 		if (root == null) return false;
 		// import general infos
 		try {
-			if (root.getAttribute(DATE).matches("....-..-..")) {
+			if (root.getAttribute(DATE).matches("....-..-..")) {//$NON-NLS-1$
 				this.date = dateformat.parse(root.getAttribute(DATE));
 			} else { // try with DateFormat.getDateInstance(DateFormat.SHORT, Locale.UK)
 				this.date = shortUKDateformat.parse(root.getAttribute(DATE));
@@ -859,15 +858,15 @@
 			}
 		} catch (ParseException e) {
 			this.date = new Date(0);
-			System.out.println("Warning: can't parse date '"+root.getAttribute(DATE)+"' in file "+paramFile+": "+e);
+			System.out.println("Warning: can't parse date '"+root.getAttribute(DATE)+"' in file "+paramFile+": "+e);//$NON-NLS-1$
 		}
-		this.version = root.getAttribute("version");
+		this.version = root.getAttribute("version");//$NON-NLS-1$
 		this.name = root.getAttribute(NAME).toUpperCase();
 		root.setAttribute(NAME, name);// force UPPERCASED NAME
-		this.author = root.getAttribute("author");
+		this.author = root.getAttribute("author");//$NON-NLS-1$
 		this.description = root.getAttribute(DESC);
-		this.rootDir = root.getAttribute("rootDir");
-		this.scriptFile = root.getAttribute("script");
+		this.rootDir = root.getAttribute("rootDir");//$NON-NLS-1$
+		this.scriptFile = root.getAttribute("script");//$NON-NLS-1$
 
 		// get Alignements
 		NodeList alignNodes = root.getElementsByTagName("linkGrp");
@@ -877,20 +876,20 @@
 			for (int i = 0 ; i < linkNodes.getLength() ; i++) {
 				Element link = (Element)linkNodes.item(i);
 				String target = link.getAttribute(TARGET);
-				String[] split = target.split("#");
+				String[] split = target.split("#");//$NON-NLS-1$
 				if (split.length != 3) {
-					System.out.println("Error: linkGrp/link/@target malformed: "+target);
+					System.out.println("Error: linkGrp/link/@target malformed: "+target);//$NON-NLS-1$
 					continue;
 				}
 				String from = split[1].trim();
 				String to = split[2].trim();
 
-				links.put("#"+to+" #"+from, link);
+				links.put("#"+to+" #"+from, link);//$NON-NLS-1$
 			}
 		}
 
 		// corpora
-		NodeList corporaNodes = root.getElementsByTagName("corpora");
+		NodeList corporaNodes = root.getElementsByTagName("corpora");//$NON-NLS-1$
 		if (corporaNodes.getLength() > 0) {
 			corporaElement = (Element) corporaNodes.item(0);
 			NodeList corpusNodes = corporaElement.getElementsByTagName(CORPUS);
@@ -919,7 +918,7 @@
 			this.saveKeyValueParameters(getParametersElement(getCorpusElement())); // save additional parameters
 			return DomUtils.save(root.getOwnerDocument(), paramFile);
 		} catch (Exception e) {
-			System.out.println("Fail to save parameters in "+paramFile+". Reason: "+e);
+			System.out.println("Fail to save parameters in "+paramFile+". Reason: "+e);//$NON-NLS-1$
 			org.txm.utils.logger.Log.printStackTrace(e);
 		}
 		return false;
@@ -928,8 +927,8 @@
 	public void saveToElement() {
 		root.setAttribute(NAME, name);
 		root.setAttribute(DESC, description);
-		root.setAttribute("script", scriptFile);
-		root.setAttribute("rootDir", rootDir);
+		root.setAttribute("script", scriptFile);//$NON-NLS-1$
+		root.setAttribute("rootDir", rootDir);//$NON-NLS-1$
 	}
 
 	/* (non-Javadoc)
@@ -944,7 +943,7 @@
 	}
 
 	public String getCQPLimits() {
-		Element concordanceElement = this.getUIElement(getCorpusElement(), "concordance");
+		Element concordanceElement = this.getUIElement(getCorpusElement(), "concordance");//$NON-NLS-1$
 		if (concordanceElement != null) {
 			Element context_limitsElement = this.getCQLLimitElement(concordanceElement);
 			if (context_limitsElement != null) {
@@ -956,11 +955,11 @@
 		return DEFAULT_CQPLIMITS;
 	}
 	public Element getTextualPlans() {
-		Element uiElement = this.getUIElement(this.getCorpusElement(), "textualplans");
+		Element uiElement = this.getUIElement(this.getCorpusElement(), "textualplans");//$NON-NLS-1$
 		if (uiElement == null) {
 			Element uisElement = getUIsElement(this.getCorpusElement());
-			uiElement = uisElement.getOwnerDocument().createElement("ui");
-			uiElement.setAttribute("command", "textualplans");
+			uiElement = uisElement.getOwnerDocument().createElement("ui");//$NON-NLS-1$
+			uiElement.setAttribute("command", "textualplans");//$NON-NLS-1$
 			uisElement.appendChild(uiElement);
 		}
 		return uiElement;
@@ -972,13 +971,13 @@
 	 */
 	public String getFacsEditionImageDirectory() {
 		Element corpusElement = getCorpusElement();
-		if (corpusElement == null) return "";
+		if (corpusElement == null) return "";//$NON-NLS-1$
 		Element editionsElement = getEditionsElement(corpusElement);
 		if (editionsElement == null) return "";
 		Element editionElement = getEditionDefinitionElement(editionsElement, "facs"); //$NON-NLS-1$
 		if (editionElement == null) return "";
 
-		String value = editionElement.getAttribute("images_directory");
+		String value = editionElement.getAttribute("images_directory");//$NON-NLS-1$
 		if (value == null || value.length() == 0) return "";
 
 		return value;
@@ -992,18 +991,18 @@
 		Element editionElement = getEditionDefinitionElement(editionsElement, "facs"); //$NON-NLS-1$
 		if (editionElement == null) return false;
 
-		String value = editionElement.getAttribute("build_edition");
+		String value = editionElement.getAttribute("build_edition"); //$NON-NLS-1$
 		if (value == null | value.length() == 0) return DEFAULT_DOEDITION;
 
 		return TRUE.equals(value);
 	}
 	
 	public boolean getSkipTokenization() {
-		return "true".equals(getTokenizerElement(getCorpusElement()).getAttribute("skip"));
+		return "true".equals(getTokenizerElement(getCorpusElement()).getAttribute("skip")); // $NON-NLS-1$ $NON-NLS-2$
 	}
 	
 	public void setSkipTokenization(boolean skip) {
-		getTokenizerElement(getCorpusElement()).setAttribute("skip", Boolean.toString(skip));
+		getTokenizerElement(getCorpusElement()).setAttribute("skip", Boolean.toString(skip));//$NON-NLS-1$
 	}
 	
 	public void setDoAnnotation(boolean annotate) {
@@ -1032,7 +1031,7 @@
 			Element milestonesElement = getMilestonesElement();
 			milestonesElement.setTextContent(milestoneElements.trim());
 		} else {
-			System.out.println("Error: Textual plan parameters not saved.");
+			System.out.println("Error: Textual plan parameters not saved."); //$NON-NLS-1$
 		}
 	}
 	
@@ -1057,4 +1056,50 @@
 			} 
 		}
 	}
+
+	public void initializeProject(Project project) {
+		EditionDefinition defaultEditionDef = project.getEditionDefinition("default"); //$NON-NLS-1$
+		defaultEditionDef.setBuildEdition(this.getDoEdition("default")); //$NON-NLS-1$
+		defaultEditionDef.setWordsPerPage(this.getWordsPerPage("default")); //$NON-NLS-1$
+		defaultEditionDef.setPageBreakTag(this.getPageElement("default")); //$NON-NLS-1$
+		
+		project.setTextualPlan("MileStones", this.getMilestonesElement().getTextContent()); //$NON-NLS-1$
+		project.setTextualPlan("OutSideTextTags", this.getOutSideTextTagsElement().getTextContent()); //$NON-NLS-1$
+		project.setTextualPlan("OutSideTextTagsAndKeepContent", this.getOutSideTextTagsAndKeepContentElement().getTextContent()); //$NON-NLS-1$
+		project.setTextualPlan("Note", this.getNoteElement().getTextContent()); //$NON-NLS-1$
+		
+		EditionDefinition facsEditionDef = project.getEditionDefinition("facs"); //$NON-NLS-1$
+		facsEditionDef.setBuildEdition(this.getDoEdition("facs")); //$NON-NLS-1$
+		facsEditionDef.setWordsPerPage(this.getWordsPerPage("facs")); //$NON-NLS-1$
+		facsEditionDef.setPageBreakTag(this.getPageElement("facs")); //$NON-NLS-1$
+		facsEditionDef.setImagesDirectory(this.getFacsEditionImageDirectory()); //$NON-NLS-1$
+		
+		if (this.getCorpusElement().getAttribute("font") != null) { //$NON-NLS-1$
+			project.setFont(this.getCorpusElement().getAttribute("font")); //$NON-NLS-1$
+		}
+		if (this.getCorpusElement().getAttribute("lang") != null) { //$NON-NLS-1$
+			project.setLang(this.getCorpusElement().getAttribute("lang")); //$NON-NLS-1$
+		}
+		if (this.getCorpusElement().getAttribute("encoding") != null) { //$NON-NLS-1$
+			project.setEncoding(this.getCorpusElement().getAttribute("encoding")); //$NON-NLS-1$
+		}
+		
+		if (this.getCQPLimits() != null) {
+			project.getCommandPreferences("concordance").set("context_limits_type", "list"); //$NON-NLS-1$ $NON-NLS-2$
+			project.getCommandPreferences("concordance").set("context_limits", this.getCQPLimits()); //$NON-NLS-1$ $NON-NLS-2$
+		}
+		
+		NodeList nodes = this.getTokenizerElement(this.getCorpusElement()).getElementsByTagName("param"); //$NON-NLS-1$
+		for (int i = 0 ; i < nodes.getLength() ; i++) {
+			Element paramElement = (Element) nodes.item(i);
+			project.addTokenizerParameter(paramElement.getAttribute("name"), paramElement.getTextContent()); //$NON-NLS-1$
+		}
+		project.addTokenizerParameter("word_tags", this.getWordElement().getTextContent()); //$NON-NLS-1$
+		project.addTokenizerParameter("onlyThoseTests", "false"); //$NON-NLS-1$ $NON-NLS-2$
+		project.addTokenizerParameter("doTokenizeStep", Boolean.toString(!this.getSkipTokenization())); //$NON-NLS-1$
+		
+		project.setXslt(this.getXsltElement(this.getCorpusElement()).getAttribute("xsl")); //$NON-NLS-1$
+		project.setAnnotate("true".equals(this.getCorpusElement().getAttribute("annotate"))); //$NON-NLS-1$ $NON-NLS-2$
+		project.setCleanAfterBuild(this.getCleanTEMPDirectories(this.getCorpusElement()));
+	}
 }
Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1940)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1941)
@@ -1133,6 +1133,10 @@
 	public EditionDefinition getEditionDefinition(String name) {
 		return new EditionDefinition(this, name);
 	}
+	
+	public CorpusCommandPreferences getCommandPreferences(String name) {
+		return new CorpusCommandPreferences(this, name);
+	}
 
 	public ProjectScope getPreferencesScope() {
 		return this.preferenceScope;
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/compiler.groovy	(revision 1940)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/compiler.groovy	(revision 1941)
@@ -310,7 +310,7 @@
 //									localname = type
 //								}
 
-								if (foundtei && !foundtext) break;
+								if (!foundtei || !foundtext) break;
 
 								sattrsListener.startElement(localname);
 								output.write("<"+localname);
@@ -348,8 +348,11 @@
 								vAna = "";
 								vForm = "";
 								break;
-
+							case "text":
+								foundtext = false;
+								break;
 							case "tei":
+								foundtei = false;
 								break;
 							case "form":
 								flagForm = false;
@@ -359,7 +362,7 @@
 								flagAna = false;
 								break;
 							default:
-								if (foundtei && !foundtext) break;
+								if (!foundtei || !foundtext) break;
 
 //								if ("div" == localname && divs.size() > 0) {
 //									localname = divs.pop()
@@ -371,6 +374,8 @@
 						break;
 
 					case XMLStreamConstants.CHARACTERS:
+						if (!foundtei || !foundtext) break;
+					
 						if (flagForm)
 							vForm += parser.getText().trim();
 						if (flagAna) {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompilerStep.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompilerStep.groovy	(revision 1940)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompilerStep.groovy	(revision 1941)
@@ -179,7 +179,7 @@
 								break;
 
 							default:
-								if (foundtei && !foundtext) break;
+								if (!foundtei || !foundtext) break;
 
 								output.write("<"+localname);
 
@@ -221,7 +221,11 @@
 								break;
 
 							case "tei":
+								foundtei = false;
 								break;
+							case "text":
+								foundtext = false;
+								break;
 							case FORM:
 								flagForm = false;
 								break;
@@ -230,13 +234,14 @@
 								flagAna = false;
 								break;
 							default:
-								if (foundtei && !foundtext) break;
+								if (!foundtei || !foundtext) break;
 
 								output.write("</"+localname+">\n");
 						}
 						break;
 
 					case XMLStreamConstants.CHARACTERS:
+						if (!foundtei || !foundtext) break;
 						if (flagWord) {
 							if (flagForm) {
 								if (normalizeFormValues) {
Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java	(revision 1940)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java	(revision 1941)
@@ -397,7 +397,7 @@
 							if (concordance != null) {
 								annotations.setViewAnnotation(type);
 								annotations.setAnnotationOverlap(true);
-								editor.fillDisplayArea();
+								editor.fillDisplayArea(false);
 							}
 							annotationArea.layout(true);
 						} else {
@@ -721,7 +721,7 @@
 			job.syncExec(new Runnable() {
 				@Override
 				public void run() {
-					editor.fillDisplayArea();
+					editor.fillDisplayArea(false);
 					CorporaView.refreshObject(corpus);
 				}
 			});
@@ -844,7 +844,7 @@
 		job.syncExec(new Runnable() {
 			@Override
 			public void run() {
-				editor.fillDisplayArea();
+				editor.fillDisplayArea(false);
 				CorporaView.refreshObject(corpus);
 			}
 		});
Index: tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java
===================================================================
--- tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java	(revision 1940)
+++ tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java	(revision 1941)
@@ -662,8 +662,6 @@
 			@Override
 			public void widgetDefaultSelected(SelectionEvent e) {}
 		});
-		
-		
 
 		updateAnnotationWidgetStates();
 		editor.layout(true);
