Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 2982)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 2983)
@@ -74,8 +74,6 @@
 import org.w3c.dom.Element;
 import org.xml.sax.SAXException;
 
-import com.sun.org.apache.bcel.internal.generic.CPInstruction;
-
 /**
  * The Class Project represent a Corpus project with its sources, corpus indexes, texts, editions, pages, etc.
  */
@@ -93,7 +91,6 @@
 	 */
 	protected boolean needToBuild;
 	
-	
 	@Parameter(key = TBXPreferences.CLEAN)
 	private boolean pCleanAfterBuild;
 	
@@ -244,10 +241,8 @@
 	public boolean open(IProgressMonitor monitor) {
 		if (rcpProject != null && !rcpProject.isOpen()) {
 			try {
-				
 				monitor.beginTask("Openning project", 100);
 				
-				
 				rcpProject.open(monitor);
 				
 				initRCPStuffs(monitor);
@@ -326,7 +321,6 @@
 				catch (MalformedURLException e) {
 					e.printStackTrace();
 				}
-				
 			}
 		}
 		return documentationPath;
@@ -480,8 +474,6 @@
 		description.setLocation(folder.getLocation());
 		description.setNatureIds(new String[] { TXMCORPUSNATURE });
 		
-		
-		
 		rcpProject.create(description, monitor);
 		rcpProject.open(monitor);
 		// TODO might fail if corpus source directory changed
@@ -951,17 +943,21 @@
 	
 	public ArrayList<Alignement> getLinksFrom(String from) {
 		ArrayList<Alignement> rez = new ArrayList<>();
-		for (String key : links.keySet())
-			if (key.startsWith("#" + from + " ")) //$NON-NLS-1$ //$NON-NLS-2$
+		for (String key : links.keySet()) {
+			if (key.startsWith("#" + from + " ")) {//$NON-NLS-1$ //$NON-NLS-2$
 				rez.add(links.get(key));
+			}
+		}
 		return rez;
 	}
 	
 	public ArrayList<Alignement> getLinksTo(String to) {
 		ArrayList<Alignement> rez = new ArrayList<>();
-		for (String key : links.keySet())
-			if (key.endsWith(" #" + to)) //$NON-NLS-1$
+		for (String key : links.keySet()) {
+			if (key.endsWith(" #" + to)) { //$NON-NLS-1$
 				rez.add(links.get(key));
+			}
+		}
 		return rez;
 	}
 	
@@ -1047,7 +1043,6 @@
 				rcpProject.delete(true, true, new LogMonitor("Cleaning " + this));
 				
 				// Toolbox.getEngineManager(EngineType.SEARCH).getEngine("CQP").start(null); //$NON-NLS-1$
-				
 			}
 			catch (Exception e) {
 				// TODO Auto-generated catch block
@@ -1402,7 +1397,6 @@
 			try {
 				
 				// Log.finest("Toolbox.initialize(): checking result type linked to node path " + parametersNodePath);
-				
 				Preferences node = TXMPreferences.preferencesRootNode.node(parametersNodePath);
 				String className = node.get("class", ""); //$NON-NLS-1$
 				
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/XMLText2MetadataCSVMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/XMLText2MetadataCSVMacro.groovy	(revision 2982)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/XMLText2MetadataCSVMacro.groovy	(revision 2983)
@@ -68,7 +68,7 @@
 	if (!name.endsWith(".xml")) continue;
 	
 	println "Processing file $xmlFile..."
-	name = name.substring(0, name.indexOf(".xml"))
+	name = name.substring(0, name.lastIndexOf(".xml"))
 	
 	writer.print "$name"
 	
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/ForceWordIDsMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/ForceWordIDsMacro.groovy	(revision 2982)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/xml/ForceWordIDsMacro.groovy	(revision 2983)
@@ -34,8 +34,8 @@
 
 // build text id
 textid = inputFile.getName()
-if (textid.indexOf(".xml") > 0) {
-	textid = textid.substring(0, textid.indexOf(".xml"))
+if (textid.lastIndexOf(".xml") > 0) {
+	textid = textid.substring(0, textid.lastIndexOf(".xml"))
 }
 
 def parser = new StaxIdentityParser(inputFile) {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/importer.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/importer.groovy	(revision 2982)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/importer.groovy	(revision 2983)
@@ -123,7 +123,7 @@
 		for (File infile : trsfiles) {
 			cpb.tick()
 			String textid = infile.getName()
-			int idx = textid.indexOf(".trs")
+			int idx = textid.lastIndexOf(".trs")
 			if (idx > 0) textid = textid.substring(0, idx)
 			File outfile = new File(txmDir, textid+".xml")
 			TRSToTEI p = new TRSToTEI(infile);
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 2982)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 2983)
@@ -221,7 +221,7 @@
 				println "Removing some speakers in "+txmDir.listFiles().length+" file(s)"
 				for (File infile : txmDir.listFiles()) {
 					String filename = infile.getName();
-					int idx = filename.indexOf(".xml");
+					int idx = filename.lastIndexOf(".xml");
 					if (idx > 0)
 						filename = filename.substring(0, idx);
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/TRSToTEI.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/TRSToTEI.groovy	(revision 2982)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/TRSToTEI.groovy	(revision 2983)
@@ -58,7 +58,7 @@
 	public TRSToTEI(File infile) {
 		super(infile.toURI().toURL());
 		textid = infile.getName()
-		int idx = textid.indexOf(".trs")
+		int idx = textid.lastIndexOf(".trs")
 		if (idx > 0) textid = textid.substring(0, idx)
 	}
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZPager.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZPager.groovy	(revision 2982)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZPager.groovy	(revision 2983)
@@ -490,7 +490,7 @@
 			String pagename = f.getName();
 			if (pagename.startsWith(textName+"_")) { // this is a page
 				String firstWordID = getMetaContent(f);
-				pagename = pagename.substring((textName+"_").length(), pagename.indexOf(".html")) // !!!!
+				pagename = pagename.substring((textName+"_").length(), pagename.lastIndexOf(".html")) // !!!!
 				edition.addPage(pagename, firstWordID)
 			}
 		}
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/doc/DocumentToTei.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/doc/DocumentToTei.groovy	(revision 2982)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/doc/DocumentToTei.groovy	(revision 2983)
@@ -51,7 +51,7 @@
 			print "."
 			String name = file.getName();
 			if (file.getName().endsWith(".odt")) {
-				name = name.substring(0, name.indexOf(".odt"));
+				name = name.substring(0, name.lastIndexOf(".odt"));
 				File teifile = new File(outdir, name+".xml");
 				try {
 					if (!new DocumentToTei().run(file, xslOdtTei, teifile)) {
@@ -61,7 +61,7 @@
 					}
 				} catch(Exception e) { println "ODT to TEI failed: $file: $e"; }
 			} else if (file.getName().endsWith(".docx")) {
-				name = name.substring(0, name.indexOf(".docx"));
+				name = name.substring(0, name.lastIndexOf(".docx"));
 				File teifile = new File(outdir, name+".xml");
 				File odtFile = File.createTempFile("workflowdocx", "sfsdf.odt", outdir);
 				
@@ -80,7 +80,7 @@
 				}
 				
 			} else if (file.getName().endsWith(".doc")) {
-				name = name.substring(0, name.indexOf(".doc"));
+				name = name.substring(0, name.lastIndexOf(".doc"));
 				File teifile = new File(outdir, name+".xml");
 				File odtFile = File.createTempFile("workflowdoc", "sfsdf.odt", outdir);
 				
Index: tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/prepare/Project2XTZMacro.groovy
===================================================================
--- tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/prepare/Project2XTZMacro.groovy	(revision 2982)
+++ tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/prepare/Project2XTZMacro.groovy	(revision 2983)
@@ -93,11 +93,11 @@
 
 for (File xmlFile : xmlFiles) {
 	if (xmlFile.getName().endsWith("-w.xml")) {
-		String name = xmlFile.getName().substring(0, xmlFile.getName().indexOf(".xml"))
+		String name = xmlFile.getName().substring(0, xmlFile.getName().lastIndexOf(".xml"))
 		wDirectory = new File(txmDirectory, name)
 		wFile = xmlFile
 	} else if (xmlFile.getName().endsWith("-c.xml")) {
-		String name = xmlFile.getName().substring(0, xmlFile.getName().indexOf(".xml"))
+		String name = xmlFile.getName().substring(0, xmlFile.getName().lastIndexOf(".xml"))
 		cDirectory = new File(txmDirectory, name)
 		cFile = xmlFile
 	}
Index: tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/prepare/CoordsProjection.groovy
===================================================================
--- tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/prepare/CoordsProjection.groovy	(revision 2982)
+++ tmp/org.txm.oriflamms.rcp/groovy/org/txm/macro/oriflamms/prepare/CoordsProjection.groovy	(revision 2983)
@@ -31,7 +31,7 @@
 		this.wordTag = wordTag;
 
 		textname = xmlFile.getName()
-		int idx = textname.indexOf(".xml")
+		int idx = textname.lastIndexOf(".xml")
 		if (idx > 0) textname = textname.substring(0, idx)
 
 		idx = textname.indexOf("-w")
Index: tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/CoordsProjection.java
===================================================================
--- tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/CoordsProjection.java	(revision 2982)
+++ tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/CoordsProjection.java	(revision 2983)
@@ -37,7 +37,7 @@
 		this.wordTag = wordTag;
 
 		textname = xmlFile.getName();
-		int idx = textname.indexOf(".xml");
+		int idx = textname.lastIndexOf(".xml");
 		if (idx > 0) textname = textname.substring(0, idx);
 
 		idx = textname.indexOf("-w");
Index: tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/Project2XTZ.java
===================================================================
--- tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/Project2XTZ.java	(revision 2982)
+++ tmp/org.txm.oriflamms.rcp/src/org/txm/oriflamms/functions/Project2XTZ.java	(revision 2983)
@@ -100,11 +100,11 @@
 
 		for (File xmlFile : xmlFiles) {
 			if (xmlFile.getName().endsWith("-w.xml")) {
-				String name = xmlFile.getName().substring(0, xmlFile.getName().indexOf(".xml"));
+				String name = xmlFile.getName().substring(0, xmlFile.getName().lastIndexOf(".xml"));
 				wDirectory = new File(txmDirectory, name);
 				wFile = xmlFile;
 			} else if (xmlFile.getName().endsWith("-c.xml")) {
-				String name = xmlFile.getName().substring(0, xmlFile.getName().indexOf(".xml"));
+				String name = xmlFile.getName().substring(0, xmlFile.getName().lastIndexOf(".xml"));
 				cDirectory = new File(txmDirectory, name);
 				cFile = xmlFile;
 			}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 2982)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 2983)
@@ -88,7 +88,7 @@
 			for (File model : files) {
 				if (!model.getName().endsWith(".par")) continue;
 				String lang = model.getName();
-				lang = lang.substring(0, lang.indexOf(".par"));
+				lang = lang.substring(0, lang.lastIndexOf(".par"));
 				langcombo.add(lang);
 				if (locale.equals(lang)) {
 					langToSelectIndex = added;
Index: tmp/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImporter.groovy
===================================================================
--- tmp/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImporter.groovy	(revision 2982)
+++ tmp/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImporter.groovy	(revision 2983)
@@ -129,7 +129,7 @@
 		module.orderedFiles = new ArrayList<String>();
 		for (def f : xmlFiles) {
 			String id = f.getName()
-			id = id.substring(0, id.indexOf(".xml"))
+			id = id.substring(0, id.lastIndexOf(".xml"))
 			module.orderedFiles.add(id)
 		}
 		isSuccessFul = outputDirectory.listFiles(IOUtils.HIDDENFILE_FILTER).size() > 0
Index: tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Apply.java
===================================================================
--- tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Apply.java	(revision 2982)
+++ tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Apply.java	(revision 2983)
@@ -93,7 +93,7 @@
 			System.out.println("Model file name must ends with the '.par' extension");
 			return;
 		}
-		lang = lang.substring(0, lang.indexOf(".par"));
+		lang = lang.substring(0, lang.lastIndexOf(".par"));
 		
 		final HashMap<String, String> hash = new HashMap<String, String>();
 		for (File txmFile : files) {
Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessagesManager.java
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessagesManager.java	(revision 2982)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessagesManager.java	(revision 2983)
@@ -208,7 +208,7 @@
 				if (!name.endsWith(".properties")) continue;
 				// messages.properties
 				// messages_xx.properties
-				String lang = name.substring(8, name.indexOf(".properties"));
+				String lang = name.substring(8, name.lastIndexOf(".properties"));
 				langs.put(propFile, new HashMap<String, String>());
 				file2lang.put(propFile, lang);
 				
