Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/storage/temporary/TemporaryAnnotationManager.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/storage/temporary/TemporaryAnnotationManager.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/storage/temporary/TemporaryAnnotationManager.java	(revision 3883)
@@ -34,38 +34,38 @@
 	 * @return
 	 */
 	public static HashMap<String, Object> getInitialisationProperties(Class clazz, MainCorpus corpus) {
-		File path = new File(corpus.getProjectDirectory(), "temporary_annotations/" + corpus.getID() + "/db");
+		File path = new File(corpus.getProjectDirectory(), "temporary_annotations/" + corpus.getID() + "/db"); //$NON-NLS-1$ //$NON-NLS-2$
 		path.getParentFile().mkdirs();
 		
 		HashMap<String, Object> properties = new HashMap<>();
 		// System.out.println("CLASSLOADER: "+Toolbox.class.getClassLoader());
 		properties.put(PersistenceUnitProperties.CLASSLOADER, clazz.getClassLoader());
-		properties.put("javax.persistence.jdbc.driver", "org.hsqldb.jdbcDriver");
+		properties.put("javax.persistence.jdbc.driver", "org.hsqldb.jdbcDriver"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		String urlProperty = "jdbc:hsqldb:file:" + path + ";shutdown=true;hsqldb.write_delay=false;hsqldb.lock_file=false;";
+		String urlProperty = "jdbc:hsqldb:file:" + path + ";shutdown=true;hsqldb.write_delay=false;hsqldb.lock_file=false;"; //$NON-NLS-1$ //$NON-NLS-2$
 		if (Log.getLevel().intValue() < Level.INFO.intValue()) {
-			urlProperty += "";
+			urlProperty += ""; //$NON-NLS-1$
 		}
 		else {
-			urlProperty += "hsqldb.applog=0;hsqldb.sqllog=0";
+			urlProperty += "hsqldb.applog=0;hsqldb.sqllog=0"; //$NON-NLS-1$
 		}
-		properties.put("javax.persistence.jdbc.url", urlProperty);
-		properties.put("javax.persistence.jdbc.username", "SA");
-		properties.put(PersistenceUnitProperties.DDL_GENERATION_MODE, "database");
+		properties.put("javax.persistence.jdbc.url", urlProperty); //$NON-NLS-1$
+		properties.put("javax.persistence.jdbc.username", "SA"); //$NON-NLS-1$ //$NON-NLS-2$
+		properties.put(PersistenceUnitProperties.DDL_GENERATION_MODE, "database"); //$NON-NLS-1$
 		if (KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.PRESERVE_ANNOTATIONS)) {
-			properties.put(PersistenceUnitProperties.DDL_GENERATION, "create-or-extend-tables"); // create&update table if needed, drop-and-create-tables to reset all
+			properties.put(PersistenceUnitProperties.DDL_GENERATION, "create-or-extend-tables"); // create&update table if needed, drop-and-create-tables to reset all //$NON-NLS-1$
 		}
 		else {
-			properties.put(PersistenceUnitProperties.DDL_GENERATION, "drop-and-create-tables"); // drop-and-create-tables to reset all
+			properties.put(PersistenceUnitProperties.DDL_GENERATION, "drop-and-create-tables"); // drop-and-create-tables to reset all //$NON-NLS-1$
 		}
 		
 		if (Log.getLevel().intValue() < Level.INFO.intValue()) {
-			properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "INFO");
-			properties.put(PersistenceUnitProperties.LOGGING_PARAMETERS, "true");
+			properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "INFO"); //$NON-NLS-1$
+			properties.put(PersistenceUnitProperties.LOGGING_PARAMETERS, "true"); //$NON-NLS-1$
 		}
 		else {
-			properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "OFF");
-			properties.put(PersistenceUnitProperties.LOGGING_PARAMETERS, "false");
+			properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "OFF"); //$NON-NLS-1$
+			properties.put(PersistenceUnitProperties.LOGGING_PARAMETERS, "false"); //$NON-NLS-1$
 		}
 		
 		return properties;
@@ -89,13 +89,13 @@
 	
 	public void checkData() throws Exception {
 		List<Annotation> annots = getAnnotations();
-		System.out.println("ID \t Type \t Val \t startPos \t startEnd \t Text ");
-		System.out.println("----------------------------------------------------");
+		System.out.println("ID \t Type \t Val \t startPos \t startEnd \t Text "); //$NON-NLS-1$
+		System.out.println("----------------------------------------------------"); //$NON-NLS-1$
 		for (Annotation an : annots) {
-			System.out.print("\t " + an.getPK().getRefType());
-			System.out.print("\t " + an.getValue());
-			System.out.print("\t " + an.getPK().getStartPosition());
-			System.out.print("\t " + an.getPK().getEndPosition() + "\n");
+			System.out.print("\t " + an.getPK().getRefType()); //$NON-NLS-1$
+			System.out.print("\t " + an.getValue()); //$NON-NLS-1$
+			System.out.print("\t " + an.getPK().getStartPosition()); //$NON-NLS-1$
+			System.out.print("\t " + an.getPK().getEndPosition() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 	}
 	
@@ -270,7 +270,7 @@
 	 */
 	public List<Annotation> getAnnotations() throws Exception {
 		
-		TypedQuery<Annotation> query = em.createQuery("SELECT annot FROM Annotation AS annot", Annotation.class);
+		TypedQuery<Annotation> query = em.createQuery("SELECT annot FROM Annotation AS annot", Annotation.class); //$NON-NLS-1$
 		return query.getResultList();
 	}
 	
@@ -306,15 +306,15 @@
 	 * @throws Exception
 	 */
 	public List<Annotation> getAnnotations(AnnotationType refType, int startPosition, int endPosition, String value) {
-		String query = "SELECT annot FROM Annotation AS annot WHERE annot.PK.refType LIKE '" + refType.getId() + "'";
+		String query = "SELECT annot FROM Annotation AS annot WHERE annot.PK.refType LIKE '" + refType.getId() + "'"; //$NON-NLS-1$ //$NON-NLS-2$
 		if (startPosition >= 0)
-			query += " AND annot.PK.startpos = " + startPosition;
+			query += " AND annot.PK.startpos = " + startPosition; //$NON-NLS-1$
 		
 		if (endPosition >= 0)
-			query += " AND annot.PK.endpos = " + endPosition;
+			query += " AND annot.PK.endpos = " + endPosition; //$NON-NLS-1$
 		
 		if (value != null)
-			query += " AND annot.refVal LIKE ':" + value + "' ";
+			query += " AND annot.refVal LIKE ':" + value + "' "; //$NON-NLS-1$ //$NON-NLS-2$
 		
 		TypedQuery<Annotation> typedQuery = em.createQuery(query, Annotation.class);
 		return typedQuery.getResultList();
@@ -328,10 +328,10 @@
 	 * @throws Exception
 	 */
 	public List<Annotation> getAnnotations(AnnotationType type, List<? extends Match> matches, String value, boolean ordered, boolean overlap) throws Exception {
-		String query = "SELECT annot FROM Annotation AS annot";
+		String query = "SELECT annot FROM Annotation AS annot"; //$NON-NLS-1$
 		boolean where = false; // TODO: need to replace this
 		
-		String queryPos = " ";
+		String queryPos = " "; //$NON-NLS-1$
 		int i = 0;
 		
 		for (Match match : matches) {
@@ -346,26 +346,26 @@
 			
 			if (i == 0) {
 				if (overlap) {
-					queryPos += " ( (" + overlapString(start, end, 0) + ")"
-							+ " OR (" + overlapString(start, end, 1) + ") ";
+					queryPos += " ( (" + overlapString(start, end, 0) + ")" //$NON-NLS-1$ //$NON-NLS-2$
+							+ " OR (" + overlapString(start, end, 1) + ") "; //$NON-NLS-1$ //$NON-NLS-2$
 					// String overlapBesides = "annot.PK.endpos < "+match.getStart()+" OR annot.PK.startpos > "+match.getEnd()+"";
 					// queryPos += " AND NOT ( "+overlapBesides+" ) ) ";
-					queryPos += " OR ( annot.PK.startpos <= " + start + " AND " + end + " <= annot.PK.endpos ) )";
+					queryPos += " OR ( annot.PK.startpos <= " + start + " AND " + end + " <= annot.PK.endpos ) )"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				}
 				else {
-					queryPos += " (annot.PK.startpos = " + start + " AND annot.PK.endpos = " + end + ")";
+					queryPos += " (annot.PK.startpos = " + start + " AND annot.PK.endpos = " + end + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				}
 			}
 			else {
 				if (overlap) {
-					queryPos += " OR ( (" + overlapString(start, end, 0) + ")"
-							+ " OR (" + overlapString(start, end, 1) + ") ";
+					queryPos += " OR ( (" + overlapString(start, end, 0) + ")" //$NON-NLS-1$ //$NON-NLS-2$
+							+ " OR (" + overlapString(start, end, 1) + ") "; //$NON-NLS-1$ //$NON-NLS-2$
 					// String overlapBesides = "annot.PK.endpos < "+match.getStart()+" OR annot.PK.startpos > "+match.getEnd()+"";
 					// queryPos += " AND NOT ( "+overlapBesides+" ) ) ";
-					queryPos += " OR ( annot.PK.startpos <= " + start + " AND " + end + " <= annot.PK.endpos ) )";
+					queryPos += " OR ( annot.PK.startpos <= " + start + " AND " + end + " <= annot.PK.endpos ) )"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				}
 				else {
-					queryPos += " OR (annot.PK.startpos = " + start + " AND annot.PK.endpos = " + end + ")";
+					queryPos += " OR (annot.PK.startpos = " + start + " AND annot.PK.endpos = " + end + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				}
 			}
 			++i;
@@ -373,27 +373,27 @@
 		
 		if (matches.size() > 0) {
 			if (where)
-				query += " AND ( " + queryPos + " )";
+				query += " AND ( " + queryPos + " )"; //$NON-NLS-1$ //$NON-NLS-2$
 			else {
-				query += " WHERE ( " + queryPos + " )";
+				query += " WHERE ( " + queryPos + " )"; //$NON-NLS-1$ //$NON-NLS-2$
 				where = true;
 			}
 		}
 		
 		if (type != null) {
 			if (where)
-				query += " AND annot.PK.refType LIKE '" + type.getId() + "'";
+				query += " AND annot.PK.refType LIKE '" + type.getId() + "'"; //$NON-NLS-1$ //$NON-NLS-2$
 			else {
-				query += " WHERE annot.PK.refType LIKE '" + type.getId() + "'";
+				query += " WHERE annot.PK.refType LIKE '" + type.getId() + "'"; //$NON-NLS-1$ //$NON-NLS-2$
 				where = true;
 			}
 		}
 		
 		if (value != null) {
 			if (where)
-				query += " AND annot.PK.refVal LIKE '" + value + "'";
+				query += " AND annot.PK.refVal LIKE '" + value + "'"; //$NON-NLS-1$ //$NON-NLS-2$
 			else {
-				query += " WHERE annot.PK.refVal LIKE '" + value + "'";
+				query += " WHERE annot.PK.refVal LIKE '" + value + "'"; //$NON-NLS-1$ //$NON-NLS-2$
 				where = true;
 			}
 		}
@@ -481,12 +481,12 @@
 	public boolean hasChanges() {
 		try {
 			if (em == null) return false;
-			TypedQuery<Annotation> query = em.createQuery("SELECT annot FROM Annotation AS annot", Annotation.class);
+			TypedQuery<Annotation> query = em.createQuery("SELECT annot FROM Annotation AS annot", Annotation.class); //$NON-NLS-1$
 			// System.out.println("hasChanges query rez: "+query.getResultList());
 			return query.setMaxResults(1).getResultList().size() > 0; // get only the first match -> faster
 		}
 		catch (Exception e) {
-			Log.severe("** Error while testing corpus annotations state: " + e);
+			Log.severe("** Error while testing corpus annotations state: " + e); //$NON-NLS-1$
 		}
 		return false;
 	}
@@ -521,12 +521,12 @@
 	}
 	
 	private String overlapString(int startPos, int endPos, int typeOverlap) {
-		String overlap = "";
+		String overlap = ""; //$NON-NLS-1$
 		switch (typeOverlap) {
 			case 0:
-				return overlap += "annot.PK.startpos >= " + startPos + " AND annot.PK.startpos <= " + endPos; // OverlapOnStart
+				return overlap += "annot.PK.startpos >= " + startPos + " AND annot.PK.startpos <= " + endPos; // OverlapOnStart //$NON-NLS-1$ //$NON-NLS-2$
 			case 1:
-				return overlap += "annot.PK.endpos >= " + startPos + " AND annot.PK.endpos <= " + endPos + ""; // OverlapOnEnd
+				return overlap += "annot.PK.endpos >= " + startPos + " AND annot.PK.endpos <= " + endPos + ""; // OverlapOnEnd //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			default:
 				return overlap;
 		}
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/messages/messages.properties
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/messages/messages.properties	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/messages/messages.properties	(revision 3883)
@@ -1,18 +1,53 @@
 #TXM messages generated by the PluginMessagesManager class
 #Fri Jun 10 16:36:03 CEST 2022
+AnnotationsSavedInP0=Annotations saved in ''{0}''.
+affectAnnotationCanceled=Affect annotation canceled.
 annotationSuccesfullyWritten=Pivot files updated.
 annotationSuccesfullyWrittenIntheP0File=Annotations successfully written in the {0} file.
 savingAnnotations=Saving annotations.
 savingP0Annotations=Saving {0} annotations...
 ConversionRulesP0=Conversion rules: {0}.
 CouldNotReplaceOriginalFileWithTheP0ResultFile=Could not replace original file with the {0} result file with {1}.
+deleteAnnotationCanceled=Delete annotation canceled.
+errorAnnotationFileHeaderFormatIsNotWekkfomattedP0ItShouldBeP1=Error: annotation file header format is not well-formatted: 
+errorCannotCloseTheP0AMP1=Error: cannot close the {0} AM : {1}.
+errorCannotCloseTheP0KRP1=Error: cannot close the {0} KR : {1}.
+errorDuringAnnotationCreationP0=Error during annotation creation: {0}.
+errorNoAnnotationLineFound=Error: no annotation line found
+errorNoKRFoundInP0Corpus=** Error: no knowledge repository found in {0} corpus.
+errorNoKRP0FoundInP1Corpus=** Error: no knowledge repository {0} found in {1} corpus.
+exportingP0Annotations=Exporting {0} annotations.
+ErrorCannotFoundAXMLTXMFileForTextWithTheP0Id=Error: cannot found a XML-TXM file for text with the ''{0}'' id.
+ErrorCouldNotCreateDirectoryP0=ERROR: could not create directory: {0}.
+ErrorCouldNotCreateWriteTemporaryDirectoryP0=ERROR: could not create/write temporary directory: {0}.
+ErrorCouldNotReplaceXMLTXMFileP0WithP1=Error: could not replace XML-TXM file: {0} with {1}
+ErrorNoKnowledgeRepositoryFoundInP0Corpus=** Error: no knowledge repository found in {0} corpus.
+ErrorNoKnowledgeRepositoryP0FoundInP1Corpus=** Error: no knowledge repository {0} found in {1} corpus.
+ErrorNPEForEndPositionOfAnnotationP0=Error: null pointer for end position of annotation {0}.
+ErrorResultFileP0IsMalformed=Error: result file {0} is malformed.
+ErrorTheP0ResultFileIsMalformed=Error: the {0} result file is malformed.
+ErrorWhileProcessingP0InTempDir=Error: while processing {0} in temp dir
+ErrorWhileProcessingTheP0FileInStandOffDir=Error: while processing the {0} file in standoff dir
+ErrorWhileWritingAnnotationsOfTextInP0=Error while writing annotations of text in {0}.
+ErrorWhileWritingAnnotationsOfTextP0=Error while writing annotations of text 
+ErrorWithCurrentWriterP0=Error with current writer: {0}.
+ExportingAnnotationsOfTheP0Texts=Exporting annotations of the {0} text(s).
+failToClearTheAnnotationManagerInstanceP0=Fail to clear AnnotationManager instance with error: {0}
 FailToProcessTheP0XMLFile=Fail to process the {0} XML file.
 MoreErrorsSeeTheP0ErrorFile=More errors, see the {0} errors file.
 NoFileFoundInTheP0Directory=No file found in the {0} directory.
 SomeValuesDidNotMatchRule=Some values did not match rule: 
+TestP0=\ \ text=
 TheP0CorpusDirectoryWasNotFoundInP1=The ''{0}'' corpus directory was not found in {1}.
 ThxTXMDirectoryWasNotFoundInP0=The 'txm' directory was not found in {0}.
 FailToGetSQLConnectionWithTheP0PropertiesErrorP1=Fail to get SQL connection with the {0} properties, error={1}
+importingP0Annotations=Importing {0} annotations...
 KRIsNotConnectedCheckingCredentialRequirement=KR is not connected, checking credential requirement.
 LocalKnowledgeRepository.ErrorWhileLoadingTypesFromFileP0=Error while loading types from file: {0}.
 LocalKnowledgeRepository.WarningDuplicatedP0ValueInP1OfTheP2KRIgnoringTheValue=WARNING: duplicated ''{0}'' value ID in  the ''{1}'' type of the ''{3}'' knowledge repository. Ignoring the value.
+noAnnotationToSaveAborting=No annotation to save. Aborting.
+noMatchFoundWithCQLEqualP0=No match found with CQL={0}
+warningNoAnnotationsToExportAborting=Warning: no annotations to export. Aborting.
+writingAnnotationsInXMLTXMFiles=Writing annotations in XML-TXM files
+WarningUnknownTypeP0=Warning: unknown type: {0}
+WritingAnnotationsXMLFilesInP0=Writing annotations XML files in {0}.
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/messages/Messages.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/messages/Messages.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/messages/Messages.java	(revision 3883)
@@ -17,14 +17,52 @@
 	
 	private static final String BUNDLE_NAME = "org.txm.annotation.kr.core.messages.messages"; //$NON-NLS-1$
 
+	public static String AnnotationsSavedInP0;
+
 	public static String KRIsNotConnectedCheckingCredentialRequirement;
 
 	public static String WarningDuplicatedP0ValueInP1OfTheP2KRIgnoringTheValue;
 
+	public static String WarningUnknownTypeP0;
+
+	public static String WritingAnnotationsXMLFilesInP0;
+
+	public static String ErrorCannotFoundAXMLTXMFileForTextWithTheP0Id;
+
+	public static String ErrorCouldNotCreateDirectoryP0;
+
+	public static String ErrorCouldNotCreateWriteTemporaryDirectoryP0;
+
+	public static String ErrorCouldNotReplaceXMLTXMFileP0WithP1;
+
+	public static String ErrorNoKnowledgeRepositoryFoundInP0Corpus;
+
+	public static String ErrorNoKnowledgeRepositoryP0FoundInP1Corpus;
+
+	public static String ErrorNPEForEndPositionOfAnnotationP0;
+
+	public static String ErrorResultFileP0IsMalformed;
+
+	public static String ErrorTheP0ResultFileIsMalformed;
+
 	public static String ErrorWhileLoadingTypesFromFileP0;
+
+	public static String ErrorWhileProcessingP0InTempDir;
+
+	public static String ErrorWhileProcessingTheP0FileInStandOffDir;
+
+	public static String ErrorWhileWritingAnnotationsOfTextInP0;
+
+	public static String ErrorWhileWritingAnnotationsOfTextP0;
+
+	public static String ErrorWithCurrentWriterP0;
+
+	public static String ExportingAnnotationsOfTheP0Texts;
 	
 	public static String savingP0Annotations;
 	
+	public static String affectAnnotationCanceled;
+
 	public static String annotationSuccesfullyWritten;
 	
 	public static String savingAnnotations;
@@ -33,15 +71,47 @@
 	
 	public static String ConversionRulesP0;
 	public static String CouldNotReplaceOriginalFileWithTheP0ResultFile;
+
+	public static String deleteAnnotationCanceled;
+	public static String errorAnnotationFileHeaderFormatIsNotWekkfomattedP0ItShouldBeP1;
+
+	public static String errorCannotCloseTheP0AMP1;
+
+	public static String errorCannotCloseTheP0KRP1;
+
+	public static String errorDuringAnnotationCreationP0;
+
+	public static String errorNoAnnotationLineFound;
+
+	public static String errorNoKRFoundInP0Corpus;
+
+	public static String errorNoKRP0FoundInP1Corpus;
+
+	public static String exportingP0Annotations;
+
+	public static String failToClearTheAnnotationManagerInstanceP0;
+
 	public static String FailToProcessTheP0XMLFile;
 	public static String MoreErrorsSeeTheP0ErrorFile;
 	public static String NoFileFoundInTheP0Directory;
 	public static String SomeValuesDidNotMatchRule;
+	public static String TestP0;
+
 	public static String TheP0CorpusDirectoryWasNotFoundInP1;
 	public static String ThxTXMDirectoryWasNotFoundInP0;
 
 	public static String FailToGetSQLConnectionWithTheP0PropertiesErrorP1;
+
+	public static String importingP0Annotations;
+
+	public static String noAnnotationToSaveAborting;
+
+	public static String noMatchFoundWithCQLEqualP0;
 	
+	public static String warningNoAnnotationsToExportAborting;
+
+	public static String writingAnnotationsInXMLTXMFiles;
+
 	static {
 		// initialize resource bundle
 		Utf8NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/KRAnnotationEngine.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/KRAnnotationEngine.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/KRAnnotationEngine.java	(revision 3883)
@@ -12,6 +12,7 @@
 import org.osgi.service.prefs.BackingStoreException;
 import org.osgi.service.prefs.Preferences;
 import org.txm.annotation.core.AnnotationEngine;
+import org.txm.annotation.kr.core.messages.Messages;
 import org.txm.annotation.kr.core.preferences.KRAnnotationPreferences;
 import org.txm.annotation.kr.core.repository.KnowledgeRepository;
 import org.txm.annotation.kr.core.repository.KnowledgeRepositoryManager;
@@ -31,15 +32,15 @@
 	
 	static HashMap<MainCorpus, AnnotationManager> ams = new HashMap<>();
 	
-	public static String KNOWLEDGE_ACCESS = "access";
+	public static String KNOWLEDGE_ACCESS = "access"; //$NON-NLS-1$
 	
-	public static String KNOWLEDGE_STRINGS = "strings";
+	public static String KNOWLEDGE_STRINGS = "strings"; //$NON-NLS-1$
 	
-	public static String KNOWLEDGE_TYPEQUERIES = "queries";
+	public static String KNOWLEDGE_TYPEQUERIES = "queries"; //$NON-NLS-1$
 	
-	public static String KNOWLEDGE_TYPES = "fields";
+	public static String KNOWLEDGE_TYPES = "fields"; //$NON-NLS-1$
 	
-	public static String KNOWLEDGE_TYPEWEBACCESS = "typeaccess";
+	public static String KNOWLEDGE_TYPEWEBACCESS = "typeaccess"; //$NON-NLS-1$
 	
 	public static boolean canBeAnnotated(MainCorpus corpus) {
 		return getKnowledgeRepositoryNames(corpus).size() > 0;
@@ -105,8 +106,8 @@
 		if (e == null) return null;
 		
 		access.put(SQLKnowledgeRepository.NAME, e.getAttribute(SQLKnowledgeRepository.NAME));
-		access.put("version", e.getAttribute("version"));
-		access.put("mode", e.getAttribute("mode"));
+		access.put("version", e.getAttribute("version")); //$NON-NLS-1$ //$NON-NLS-2$
+		access.put("mode", e.getAttribute("mode")); //$NON-NLS-1$ //$NON-NLS-2$
 		access.put(SQLKnowledgeRepository.TYPE_URL, e.getAttribute(SQLKnowledgeRepository.TYPE_URL));
 		access.put(SQLKnowledgeRepository.TYPE_RESURL, e.getAttribute(SQLKnowledgeRepository.TYPE_RESURL));
 		access.put(SQLKnowledgeRepository.TYPE_TYPEURL, e.getAttribute(SQLKnowledgeRepository.TYPE_TYPEURL));
@@ -117,30 +118,30 @@
 		access.put(SQLConnection.SQL_PASSWORD, e.getAttribute(SQLConnection.SQL_PASSWORD));
 		
 		// <type id="" name> ... </type>
-		NodeList typesList = e.getElementsByTagName("type");
+		NodeList typesList = e.getElementsByTagName("type"); //$NON-NLS-1$
 		for (int i = 0; i < typesList.getLength(); i++) {
 			// <field type="xxx">yyy</field>
 			Element typeElement = (Element) typesList.item(i);
-			String type_id = "" + typeElement.getAttribute(SQLKnowledgeRepository.TYPE_ID);
+			String type_id = "" + typeElement.getAttribute(SQLKnowledgeRepository.TYPE_ID); //$NON-NLS-1$
 			
 			String type_name = typeElement.getAttribute(SQLKnowledgeRepository.NAME);
 			if (type_name == null || type_name.length() == 0) type_name = type_id;
 			
-			String type_url = "" + typeElement.getAttribute(SQLKnowledgeRepository.TYPE_URL);
+			String type_url = "" + typeElement.getAttribute(SQLKnowledgeRepository.TYPE_URL); //$NON-NLS-1$
 			
 			String type_size = typeElement.getAttribute(SQLKnowledgeRepository.TYPE_SIZE);
-			if (type_size == null || type_size.length() == 0) type_size = "SMALL"; // show all by default
+			if (type_size == null || type_size.length() == 0) type_size = "SMALL"; // show all by default //$NON-NLS-1$
 			type_size = type_size.toUpperCase();
 			
 			String type_effect = typeElement.getAttribute(SQLKnowledgeRepository.TYPE_EFFECT);
-			if (type_effect == null || type_effect.length() == 0) type_effect = "SEGMENT"; // segment annotation by default
+			if (type_effect == null || type_effect.length() == 0) type_effect = "SEGMENT"; // segment annotation by default //$NON-NLS-1$
 			type_effect = type_effect.toUpperCase();
 			
 			HashMap<String, String> hashFields = new HashMap<>();
-			NodeList fieldsList = typeElement.getElementsByTagName("field"); // contains KR type specific properties
+			NodeList fieldsList = typeElement.getElementsByTagName("field"); // contains KR type specific properties //$NON-NLS-1$
 			for (int j = 0; j < fieldsList.getLength(); j++) {
 				Element fieldElement = (Element) fieldsList.item(j);
-				hashFields.put(fieldElement.getAttribute("type"), fieldElement.getTextContent());
+				hashFields.put(fieldElement.getAttribute("type"), fieldElement.getTextContent()); //$NON-NLS-1$
 			}
 			
 			hashFields.put(SQLKnowledgeRepository.TYPE_URL, type_url);
@@ -150,19 +151,19 @@
 			fields.put(type_id, hashFields);
 		}
 		
-		NodeList stringsList = e.getElementsByTagName("strings");
+		NodeList stringsList = e.getElementsByTagName("strings"); //$NON-NLS-1$
 		for (int i = 0; i < stringsList.getLength(); i++) {
 			Element stringsElement = (Element) stringsList.item(i);
-			String lang = stringsElement.getAttribute("lang");
-			if (lang == null) lang = "en"; // default lang is "en"
+			String lang = stringsElement.getAttribute("lang"); //$NON-NLS-1$
+			if (lang == null) lang = "en"; // default lang is "en" //$NON-NLS-1$
 			
 			HashMap<String, String> values = new HashMap<>();
 			strings.put(lang, values);
 			
-			NodeList stringList = stringsElement.getElementsByTagName("string");
+			NodeList stringList = stringsElement.getElementsByTagName("string"); //$NON-NLS-1$
 			for (int j = 0; j < stringList.getLength(); j++) {
 				Element stringElement = (Element) stringList.item(j);
-				String key = stringElement.getAttribute("key");
+				String key = stringElement.getAttribute("key"); //$NON-NLS-1$
 				if (key != null) {
 					values.put(key, stringElement.getTextContent());
 				}
@@ -192,20 +193,20 @@
 		
 		if (preference == null) return null;
 		
-		access.put(SQLKnowledgeRepository.NAME, preference.get(SQLKnowledgeRepository.NAME, "default"));
-		access.put("version", preference.get("version", "0"));
-		access.put("mode", preference.get("mode", ""));
-		access.put(SQLKnowledgeRepository.TYPE_URL, preference.get(SQLKnowledgeRepository.TYPE_URL, ""));
-		access.put(SQLKnowledgeRepository.TYPE_RESURL, preference.get(SQLKnowledgeRepository.TYPE_RESURL, ""));
-		access.put(SQLKnowledgeRepository.TYPE_TYPEURL, preference.get(SQLKnowledgeRepository.TYPE_TYPEURL, ""));
-		access.put(SQLConnection.SQL_ADDRESS, preference.get(SQLConnection.SQL_ADDRESS, ""));
-		access.put(SQLConnection.SQL_DRIVER, preference.get(SQLConnection.SQL_DRIVER, ""));
-		access.put(SQLConnection.SQL_PORT, preference.get(SQLConnection.SQL_PORT, ""));
-		access.put(SQLConnection.SQL_USER, preference.get(SQLConnection.SQL_USER, ""));
-		access.put(SQLConnection.SQL_PASSWORD, preference.get(SQLConnection.SQL_PASSWORD, ""));
+		access.put(SQLKnowledgeRepository.NAME, preference.get(SQLKnowledgeRepository.NAME, "default")); //$NON-NLS-1$
+		access.put("version", preference.get("version", "0")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		access.put("mode", preference.get("mode", "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		access.put(SQLKnowledgeRepository.TYPE_URL, preference.get(SQLKnowledgeRepository.TYPE_URL, "")); //$NON-NLS-1$
+		access.put(SQLKnowledgeRepository.TYPE_RESURL, preference.get(SQLKnowledgeRepository.TYPE_RESURL, "")); //$NON-NLS-1$
+		access.put(SQLKnowledgeRepository.TYPE_TYPEURL, preference.get(SQLKnowledgeRepository.TYPE_TYPEURL, "")); //$NON-NLS-1$
+		access.put(SQLConnection.SQL_ADDRESS, preference.get(SQLConnection.SQL_ADDRESS, "")); //$NON-NLS-1$
+		access.put(SQLConnection.SQL_DRIVER, preference.get(SQLConnection.SQL_DRIVER, "")); //$NON-NLS-1$
+		access.put(SQLConnection.SQL_PORT, preference.get(SQLConnection.SQL_PORT, "")); //$NON-NLS-1$
+		access.put(SQLConnection.SQL_USER, preference.get(SQLConnection.SQL_USER, "")); //$NON-NLS-1$
+		access.put(SQLConnection.SQL_PASSWORD, preference.get(SQLConnection.SQL_PASSWORD, "")); //$NON-NLS-1$
 		
 		// <type id="" name> ... </type>
-		Preferences typesList = preference.node("type");
+		Preferences typesList = preference.node("type"); //$NON-NLS-1$
 		for (String type_id : typesList.childrenNames()) {
 			// <field type="xxx">yyy</field>
 			// Element typeElement = (Element)typesList.item(i);
@@ -215,18 +216,18 @@
 			
 			String type_name = typeElement.get(SQLKnowledgeRepository.NAME, type_id);
 			
-			String type_url = "" + typeElement.get(SQLKnowledgeRepository.TYPE_URL, "");
+			String type_url = "" + typeElement.get(SQLKnowledgeRepository.TYPE_URL, ""); //$NON-NLS-1$ //$NON-NLS-2$
 			
-			String type_size = typeElement.get(SQLKnowledgeRepository.TYPE_SIZE, "SMALL");
+			String type_size = typeElement.get(SQLKnowledgeRepository.TYPE_SIZE, "SMALL"); //$NON-NLS-1$
 			type_size = type_size.toUpperCase();
 			
-			String type_effect = typeElement.get(SQLKnowledgeRepository.TYPE_EFFECT, "SEGMENT");
+			String type_effect = typeElement.get(SQLKnowledgeRepository.TYPE_EFFECT, "SEGMENT"); //$NON-NLS-1$
 			type_effect = type_effect.toUpperCase();
 			
 			HashMap<String, String> hashFields = new HashMap<>();
-			Preferences fieldsList = typeElement.node("field"); // contains KR type specific properties
+			Preferences fieldsList = typeElement.node("field"); // contains KR type specific properties //$NON-NLS-1$
 			for (String field_type : fieldsList.keys()) {
-				hashFields.put(field_type, fieldsList.get(field_type, ""));
+				hashFields.put(field_type, fieldsList.get(field_type, "")); //$NON-NLS-1$
 			}
 			
 			hashFields.put(SQLKnowledgeRepository.TYPE_URL, type_url);
@@ -236,7 +237,7 @@
 			fields.put(type_id, hashFields);
 		}
 		
-		Preferences stringsList = preference.node("strings");
+		Preferences stringsList = preference.node("strings"); //$NON-NLS-1$
 		for (String lang : stringsList.childrenNames()) {
 			Preferences stringsElement = stringsList.node(lang);
 			// String lang = stringsElement.getAttribute("lang");
@@ -246,7 +247,7 @@
 			strings.put(lang, values);
 			
 			for (String key : stringsElement.keys()) {
-				values.put(key, stringsElement.get(key, ""));
+				values.put(key, stringsElement.get(key, "")); //$NON-NLS-1$
 			}
 		}
 		
@@ -306,11 +307,11 @@
 		
 		String[] names;
 		try {
-			IEclipsePreferences node = base.getPreferencesScope().getNode("KnowledgeRepository");
+			IEclipsePreferences node = base.getPreferencesScope().getNode("KnowledgeRepository"); //$NON-NLS-1$
 			if (!node.nodeExists(corpus.getID())) {
 				// create the "DEFAULT" KR configuration
 				Preferences krconf = node.node(corpus.getID());
-				krconf.put("name", corpus.getID());
+				krconf.put("name", corpus.getID()); //$NON-NLS-1$
 			}
 			names = node.childrenNames();
 			return Arrays.asList(names); // getKnowledgeRepositoryNames(params);
@@ -357,7 +358,7 @@
 	
 	@Override
 	public String getName() {
-		return "CQP";
+		return "CQP"; //$NON-NLS-1$
 	}
 	
 	@Override
@@ -390,7 +391,7 @@
 					kr.getJPAManager().close();
 			}
 			catch (Exception e) {
-				Log.warning(NLS.bind("Error: cannot close the {0} KR : {1}.", kr, e.getLocalizedMessage()));
+				Log.warning(NLS.bind(Messages.errorCannotCloseTheP0KRP1, kr, e.getLocalizedMessage()));
 				Log.printStackTrace(e);
 				success = false;
 			}
@@ -401,7 +402,7 @@
 					am.closeAll();
 			}
 			catch (Exception e) {
-				Log.warning(NLS.bind("Error: cannot close the {0} AM : {1}.", am, e.getLocalizedMessage()));
+				Log.warning(NLS.bind(Messages.errorCannotCloseTheP0AMP1, am, e.getLocalizedMessage()));
 				Log.printStackTrace(e);
 				success = false;
 			}
@@ -428,7 +429,7 @@
 	@Override
 	public void notify(TXMResult r, String state) {
 		
-		if (r instanceof MainCorpus && "before_clean".equals(state)) {
+		if (r instanceof MainCorpus && "before_clean".equals(state)) { //$NON-NLS-1$
 			
 			MainCorpus c = (MainCorpus) r;
 			
@@ -437,7 +438,7 @@
 			}
 			
 			for (String krname : KRAnnotationEngine.getKnowledgeRepositoryNames(c)) {
-				Log.fine("cleaning KR: " + krname);
+				Log.fine("cleaning KR: " + krname); //$NON-NLS-1$
 				KRAnnotationEngine.unregisterKnowledgeRepositoryName(c, krname);
 			}
 			
@@ -446,15 +447,15 @@
 			}
 			
 			if (ams.get(c) != null && ams.get(c).tempManager != null && ams.get(c).tempManager.getEntityManager() != null ) {
-				Log.fine("closing temporary annotations database of: "+c);
+				Log.fine("closing temporary annotations database of: "+c); //$NON-NLS-1$
 				ams.get(c).tempManager.close(); // free files
 			}
 			
-			File buildDirectory = new File(c.getProjectDirectory(), "temporary_annotations/" + c.getID());
+			File buildDirectory = new File(c.getProjectDirectory(), "temporary_annotations/" + c.getID()); //$NON-NLS-1$
 			if (buildDirectory.exists()) {
 				DeleteDir.deleteDirectory(buildDirectory);
 			}
-		} else if (r instanceof MainCorpus && "clean".equals(state)) {
+		} else if (r instanceof MainCorpus && "clean".equals(state)) { //$NON-NLS-1$
 			
 			MainCorpus c = (MainCorpus) r;
 			
@@ -463,7 +464,7 @@
 			}
 			
 			for (String krname : KRAnnotationEngine.getKnowledgeRepositoryNames(c)) {
-				Log.fine("cleaning KR: " + krname);
+				Log.fine("cleaning KR: " + krname); //$NON-NLS-1$
 				KRAnnotationEngine.unregisterKnowledgeRepositoryName(c, krname);
 			}
 			
@@ -474,25 +475,25 @@
 			}
 			
 			if (ams.get(c) != null && ams.get(c).tempManager != null && ams.get(c).tempManager.getEntityManager() != null ) {
-				Log.fine("closing temporary annotations databse of: "+c);
+				Log.fine("closing temporary annotations databse of: "+c); //$NON-NLS-1$
 				ams.get(c).tempManager.close(); // free files
 			}
 			
-			File buildDirectory = new File(c.getProjectDirectory(), "temporary_annotations/" + c.getID());
+			File buildDirectory = new File(c.getProjectDirectory(), "temporary_annotations/" + c.getID()); //$NON-NLS-1$
 			if (buildDirectory.exists()) {
 				DeleteDir.deleteDirectory(buildDirectory);
 			}
 		}
-		else if (r instanceof Project && "clean".equals(state)) {
+		else if (r instanceof Project && "clean".equals(state)) { //$NON-NLS-1$
 			
 			Project p = (Project) r;
 			for (MainCorpus c : p.getChildren(MainCorpus.class)) { // if any MainCorpus is remaining, clean it
 				for (String krname : KRAnnotationEngine.getKnowledgeRepositoryNames(c)) {
-					Log.fine("cleaning KR: " + krname);
+					Log.fine("cleaning KR: " + krname); //$NON-NLS-1$
 					KRAnnotationEngine.unregisterKnowledgeRepositoryName(c, krname);
 				}
 			}
-			File buildDirectory = new File(p.getProjectDirectory(), "temporary_annotations");
+			File buildDirectory = new File(p.getProjectDirectory(), "temporary_annotations"); //$NON-NLS-1$
 			if (buildDirectory.exists()) {
 				DeleteDir.deleteDirectory(buildDirectory);
 			}
@@ -501,7 +502,7 @@
 	
 	@Override
 	public String getDetails() {
-		return "";
+		return ""; //$NON-NLS-1$
 	}
 	
 	public static void registerKnowledgeRepositoryName(CQPCorpus corpus, String name) {
@@ -509,11 +510,11 @@
 		Project project = corpus.getProject();
 		if (project == null) return;
 		try {
-			IEclipsePreferences node = project.getPreferencesScope().getNode("KnowledgeRepository");
+			IEclipsePreferences node = project.getPreferencesScope().getNode("KnowledgeRepository"); //$NON-NLS-1$
 			if (!node.nodeExists(name)) {
 				// create the "DEFAULT" KR configuration
 				Preferences krconf = node.node(name);
-				krconf.put("name", name);
+				krconf.put("name", name); //$NON-NLS-1$
 			}
 		}
 		catch (BackingStoreException e) {
@@ -526,7 +527,7 @@
 		Project project = corpus.getProject();
 		if (project == null) return;
 		try {
-			IEclipsePreferences node = project.getPreferencesScope().getNode("KnowledgeRepository");
+			IEclipsePreferences node = project.getPreferencesScope().getNode("KnowledgeRepository"); //$NON-NLS-1$
 			if (node.nodeExists(name)) {
 				Preferences krconf = node.node(name);
 				krconf.removeNode();
@@ -534,7 +535,7 @@
 			
 			KnowledgeRepository kr = KnowledgeRepositoryManager.getKnowledgeRepository(name);
 			if (kr != null) {
-				Log.fine("Deleting KR database: " + kr);
+				Log.fine("Deleting KR database: " + kr); //$NON-NLS-1$
 				KnowledgeRepositoryManager.deleteKnowledgeRepository(kr);
 			}
 		}
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/TypedValue.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/TypedValue.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/TypedValue.java	(revision 3883)
@@ -46,10 +46,10 @@
 	}
 	
 	public String toString() {
-		return PK.toString() + "(" + name + ")";
+		return PK.toString() + "(" + name + ")"; //$NON-NLS-1$ //$NON-NLS-2$
 	}
 	
 	public String toHumanString() {
-		return name + "(" + PK.getId() + ")";
+		return name + "(" + PK.getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
 	}
 }
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/AnnotationEffect.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/AnnotationEffect.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/AnnotationEffect.java	(revision 3883)
@@ -17,8 +17,8 @@
 	 * @return Effet suffix used to display the annotation type in messages
 	 */
 	public String toSuffix() {
-		if (this.equals(TOKEN)) return " (T)";
-		else if (this.equals(ANNOTATION)) return " (A)";
-		else return "";
+		if (this.equals(TOKEN)) return " (T)"; //$NON-NLS-1$
+		else if (this.equals(ANNOTATION)) return " (A)"; //$NON-NLS-1$
+		else return ""; //$NON-NLS-1$
 	}
 }
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/TypedValuePK.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/TypedValuePK.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/TypedValuePK.java	(revision 3883)
@@ -44,6 +44,6 @@
 	}
 	
 	public String toString() {
-		return typeId + "=" + id;
+		return typeId + "=" + id; //$NON-NLS-1$
 	}
 }
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/KnowledgeRepository.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/KnowledgeRepository.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/repository/KnowledgeRepository.java	(revision 3883)
@@ -19,13 +19,13 @@
 
 public abstract class KnowledgeRepository { // extends Vector<AnnotationType>
 	
-	protected String values_base_url = "";
+	protected String values_base_url = ""; //$NON-NLS-1$
 	
-	protected String types_base_url = "";
+	protected String types_base_url = ""; //$NON-NLS-1$
 	
-	protected String url = "";
+	protected String url = ""; //$NON-NLS-1$
 	
-	protected String dbPath = ""; // the KR database path
+	protected String dbPath = ""; // the KR database path //$NON-NLS-1$
 	
 	protected String name;
 	
@@ -45,29 +45,29 @@
 
 	private EntityManagerFactory emf;
 	
-	public final static String NAME = "name";
+	public final static String NAME = "name"; //$NON-NLS-1$
 	
-	public final static String TYPE_URL = "url";
+	public final static String TYPE_URL = "url"; //$NON-NLS-1$
 	
-	public final static String TYPE_RESURL = "resurl";
+	public final static String TYPE_RESURL = "resurl"; //$NON-NLS-1$
 	
-	public final static String TYPE_TYPEURL = "typeurl";
+	public final static String TYPE_TYPEURL = "typeurl"; //$NON-NLS-1$
 	
-	public final static String TYPE_ID = "id";
+	public final static String TYPE_ID = "id"; //$NON-NLS-1$
 	
-	public final static String TYPE_SIZE = "size";
+	public final static String TYPE_SIZE = "size"; //$NON-NLS-1$
 	
-	public final static String TYPE_EFFECT = "effect";
+	public final static String TYPE_EFFECT = "effect"; //$NON-NLS-1$
 	
-	public final static String TYPE_SQLFIELD_NAME = "sql_name";
+	public final static String TYPE_SQLFIELD_NAME = "sql_name"; //$NON-NLS-1$
 	
-	public final static String TYPE_SQLFIELD_ID = "sql_id";
+	public final static String TYPE_SQLFIELD_ID = "sql_id"; //$NON-NLS-1$
 	
-	public final static String TYPE_SQLFIELD_QUERY = "sql_query";
+	public final static String TYPE_SQLFIELD_QUERY = "sql_query"; //$NON-NLS-1$
 	
-	public final static String LOGIN_KEY = "org.txm.repository.credencies.login.";
+	public final static String LOGIN_KEY = "org.txm.repository.credencies.login."; //$NON-NLS-1$
 	
-	public final static String PASSWORD_KEY = "org.txm.repository.credencies.password.";
+	public final static String PASSWORD_KEY = "org.txm.repository.credencies.password."; //$NON-NLS-1$
 	
 	public static final boolean[] FALSES = { false, false };
 	
@@ -85,7 +85,7 @@
 	 * @return
 	 */
 	public EntityManager initializeEntityManager() {
-		this.dbPath = new File(Toolbox.getTxmHomePath(), "repositories/" + name).getAbsolutePath();
+		this.dbPath = new File(Toolbox.getTxmHomePath(), "repositories/" + name).getAbsolutePath(); //$NON-NLS-1$
 		// System.out.println("KnowledgeRepository.initializeEntityManager [DB @ "+dbPath+"]");
 		
 		HashMap<String, Object> properties = new HashMap<String, Object>();
@@ -95,17 +95,17 @@
 		//
 		// properties.put(PersistenceUnitProperties.ECLIPSELINK_PERSISTENCE_XML, "/home/mdecorde/workspace079/org.txm.annotation.core/META-INF");
 		// //properties.put("javax.persistence.jdbc.driver", "org.hsqldb.jdbcDriver");
-		String urlProperty = "jdbc:hsqldb:file:" + dbPath + "/db;shutdown=true;hsqldb.lock_file=false;";
+		String urlProperty = "jdbc:hsqldb:file:" + dbPath + "/db;shutdown=true;hsqldb.lock_file=false;"; //$NON-NLS-1$ //$NON-NLS-2$
 		if (Log.getLevel().intValue() < Level.INFO.intValue()) {
-			urlProperty += "";
+			urlProperty += ""; //$NON-NLS-1$
 		}
 		else {
-			urlProperty += "hsqldb.applog=0;hsqldb.sqllog=0";
+			urlProperty += "hsqldb.applog=0;hsqldb.sqllog=0"; //$NON-NLS-1$
 		}
-		properties.put("javax.persistence.jdbc.url", urlProperty);
+		properties.put("javax.persistence.jdbc.url", urlProperty); //$NON-NLS-1$
 		// properties.put("javax.persistence.jdbc.username", "SA");
 		// properties.put(PersistenceUnitProperties.DDL_GENERATION_MODE, "database");
-		properties.put(PersistenceUnitProperties.DDL_GENERATION, "create-or-extend-tables"); // create&update table if needed
+		properties.put(PersistenceUnitProperties.DDL_GENERATION, "create-or-extend-tables"); // create&update table if needed //$NON-NLS-1$
 		// properties.put(PersistenceUnitProperties.DDL_GENERATION, "drop-and-create-tables"); // drop all and recreate
 		// if (Log.getLevel().intValue() < Level.WARNING.intValue()) {
 		// properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "WARNING");
@@ -119,7 +119,7 @@
 		PersistenceProvider pp = new PersistenceProvider();
 		emf = pp.createEntityManagerFactory(DatabasePersistenceManager.PERSISTENCE_UNIT_NAME, properties);
 		if (emf == null) {
-			Log.warning(NLS.bind("Error: could not create the ''{0}'' EntityManagerFactory and PersistenceProvider={1}.", DatabasePersistenceManager.PERSISTENCE_UNIT_NAME, pp));
+			Log.warning(NLS.bind("Error: could not create the ''{0}'' EntityManagerFactory and PersistenceProvider={1}.", DatabasePersistenceManager.PERSISTENCE_UNIT_NAME, pp)); //$NON-NLS-1$
 			return null;
 		}
 		EntityManager entityManager = (EntityManager) emf.createEntityManager();
@@ -132,7 +132,7 @@
 	public void setAccessProperties(HashMap<String, String> accessProperties) {
 		this.accessProperties = accessProperties;
 		
-		String sVersion = accessProperties.get("version");
+		String sVersion = accessProperties.get("version"); //$NON-NLS-1$
 		if (sVersion.length() > 0) {
 			this.version = Integer.parseInt(sVersion);
 		}
@@ -218,15 +218,15 @@
 	
 	public String toHumanString() {
 		StringBuffer buffer = new StringBuffer();
-		buffer.append(this.getName() + " version=" + version + " (" + this.getURL() + "): " + this.getAccessType() + "\n");
+		buffer.append(this.getName() + " version=" + version + " (" + this.getURL() + "): " + this.getAccessType() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		for (AnnotationType type : getAllAnnotationTypes()) {
-			buffer.append("\t" + type.toHumanString() + "\n");
+			buffer.append("\t" + type.toHumanString() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		return buffer.toString();
 	}
 	
 	public void reload() {
-		Log.fine("Reloading KR " + name);
+		Log.fine("Reloading KR " + name); //$NON-NLS-1$
 		
 		clearTypes();
 		buildTypesAndValues();
@@ -240,8 +240,8 @@
 	 */
 	public List<TypedValue> getValues(AnnotationType type, int limit) throws Exception {
 		
-		TypedQuery<TypedValue> query = jpaem.createQuery("SELECT t FROM TypedValue AS t "
-				+ "WHERE t.PK.typeId LIKE '" + type.getId() + "'", TypedValue.class);
+		TypedQuery<TypedValue> query = jpaem.createQuery("SELECT t FROM TypedValue AS t " //$NON-NLS-1$
+				+ "WHERE t.PK.typeId LIKE '" + type.getId() + "'", TypedValue.class); //$NON-NLS-1$ //$NON-NLS-2$
 		if (limit != -1) {
 			query.setMaxResults(limit);
 		}
@@ -256,8 +256,8 @@
 	 * @throws Exception
 	 */
 	public boolean hasValues(AnnotationType type) throws Exception {
-		TypedQuery<TypedValue> query = jpaem.createQuery("SELECT t.name FROM TypedValue AS t "
-				+ "WHERE t.PK.typeId LIKE '" + type.getId() + "'", TypedValue.class);
+		TypedQuery<TypedValue> query = jpaem.createQuery("SELECT t.name FROM TypedValue AS t " //$NON-NLS-1$
+				+ "WHERE t.PK.typeId LIKE '" + type.getId() + "'", TypedValue.class); //$NON-NLS-1$ //$NON-NLS-2$
 		query.setMaxResults(1);
 		
 		return query.getResultList().size() > 0;
@@ -280,7 +280,7 @@
 		// clear all persisted values
 		if (jpaem != null) {
 			jpaem.getTransaction().begin();
-			Query query = jpaem.createQuery("DELETE FROM TypedValue");
+			Query query = jpaem.createQuery("DELETE FROM TypedValue"); //$NON-NLS-1$
 			query.executeUpdate();
 			jpaem.getTransaction().commit();
 		}
@@ -329,7 +329,7 @@
 				String url = typeFieldsContent.get(KnowledgeRepository.TYPE_URL);
 				String size = typeFieldsContent.get(KnowledgeRepository.TYPE_SIZE);
 				String s_effect = typeFieldsContent.get(KnowledgeRepository.TYPE_EFFECT);
-				if (s_effect == null) s_effect = "SEGMENT";
+				if (s_effect == null) s_effect = "SEGMENT"; //$NON-NLS-1$
 				
 				for (String typeField : typeFieldsContent.keySet()) {
 					// System.out.println("Type field : "+typeField+" value : "+typeFieldsContent.get(typeField));
@@ -360,7 +360,7 @@
 	 * @return
 	 */
 	public AnnotationType addType(String name, String id) {
-		return addType(name, id, this.url + "/" + id);
+		return addType(name, id, this.url + "/" + id); //$NON-NLS-1$
 	}
 	
 	/**
@@ -403,12 +403,12 @@
 	}
 	
 	public List<AnnotationType> getAllAnnotationTypes() {
-		TypedQuery<AnnotationType> query = jpaem.createQuery("SELECT t FROM AnnotationType AS t ", AnnotationType.class);
+		TypedQuery<AnnotationType> query = jpaem.createQuery("SELECT t FROM AnnotationType AS t ", AnnotationType.class); //$NON-NLS-1$
 		return query.getResultList();
 	}
 	
 	public List<TypedValue> getAllTypedValuesForType(String idType) {
-		TypedQuery<TypedValue> query = jpaem.createQuery("SELECT t FROM TypedValue AS t WHERE t.PK.typeId LIKE '" + idType + "'", TypedValue.class);
+		TypedQuery<TypedValue> query = jpaem.createQuery("SELECT t FROM TypedValue AS t WHERE t.PK.typeId LIKE '" + idType + "'", TypedValue.class); //$NON-NLS-1$ //$NON-NLS-2$
 		return query.getResultList();
 	}
 	
@@ -419,9 +419,9 @@
 	 * @throws Exception
 	 */
 	public List<TypedValue> findTypedValuesWithPrefix(AnnotationType type, String prefix) throws Exception {
-		TypedQuery<TypedValue> query = jpaem.createQuery("SELECT t FROM TypedValue AS t "
-				+ "WHERE t.PK.typeId LIKE '" + type.getId() + "'"
-				+ " AND t.name LIKE '" + prefix + "%'", TypedValue.class);
+		TypedQuery<TypedValue> query = jpaem.createQuery("SELECT t FROM TypedValue AS t " //$NON-NLS-1$
+				+ "WHERE t.PK.typeId LIKE '" + type.getId() + "'" //$NON-NLS-1$ //$NON-NLS-2$
+				+ " AND t.name LIKE '" + prefix + "%'", TypedValue.class); //$NON-NLS-1$ //$NON-NLS-2$
 		// System.out.println("Query for "+prefix+" has nb results = "+query.getResultList().size());
 		return query.getResultList();
 	}
@@ -478,7 +478,7 @@
 			values = strings.get(lang);
 		}
 		if (values == null) { // get default lang = "en"
-			values = strings.get("en");
+			values = strings.get("en"); //$NON-NLS-1$
 		}
 		if (values == null) { // fail
 			return null;
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/temporary/DeleteAnnotation.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/temporary/DeleteAnnotation.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/temporary/DeleteAnnotation.java	(revision 3883)
@@ -8,7 +8,7 @@
 	
 	@Test
 	public void test() {
-		fail("Not yet implemented");
+		fail("Not yet implemented"); //$NON-NLS-1$
 	}
 	
 }
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/temporary/UpdateAnnotation.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/temporary/UpdateAnnotation.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/temporary/UpdateAnnotation.java	(revision 3883)
@@ -8,7 +8,7 @@
 	
 	@Test
 	public void test() {
-		fail("Not yet implemented");
+		fail("Not yet implemented"); //$NON-NLS-1$
 	}
 	
 }
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/temporary/CreateAnnotation.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/temporary/CreateAnnotation.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/temporary/CreateAnnotation.java	(revision 3883)
@@ -16,12 +16,12 @@
 	
 	@Test
 	public void test() throws CqiClientException, InvalidCqpIdException {
-		if (!Toolbox.isInitialized()) fail("Toolbox not initialized.");
-		MainCorpus corpus = CorpusManager.getCorpusManager().getCorpus("VOEUX");
-		if (corpus == null) fail("Corpus Voeux not loaded.");
+		if (!Toolbox.isInitialized()) fail("Toolbox not initialized."); //$NON-NLS-1$
+		MainCorpus corpus = CorpusManager.getCorpusManager().getCorpus("VOEUX"); //$NON-NLS-1$
+		if (corpus == null) fail("Corpus Voeux not loaded."); //$NON-NLS-1$
 		
 		HashMap<String, Object> properties = TemporaryAnnotationManager.getInitialisationProperties(this.getClass(), corpus);
-		properties.put("eclipselink.persistencexml", System.getProperty("user.home") + "/workspace442/org.txm.core/META-INF/persistence.xml");
+		properties.put("eclipselink.persistencexml", System.getProperty("user.home") + "/workspace442/org.txm.core/META-INF/persistence.xml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		
 		TemporaryAnnotationManager tam = new TemporaryAnnotationManager(corpus, properties);
 		System.out.println(tam);
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationManager.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationManager.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationManager.java	(revision 3883)
@@ -68,14 +68,14 @@
 		
 		List<Annotation> annots = tempManager.getAnnotations();
 		if (annots.isEmpty()) {
-			Log.info("No annotation to save. Aborting.");
+			Log.info(Messages.noAnnotationToSaveAborting);
 			dirty = false;
 			return true;
 		}
 		
 		if (monitor != null) {
 			monitor.beginTask(Messages.savingAnnotations, annots.size());
-			monitor.setTaskName("Writing annotations in XML-TXM files");
+			monitor.setTaskName(Messages.writingAnnotationsInXMLTXMFiles);
 		}
 		
 		AnnotationWriter writer = new AnnotationWriter(corpus);
@@ -116,7 +116,7 @@
 			tempManager.getEntityManager().getTransaction().begin();
 			for (Annotation a : temporaryAnnotations) {
 				if (job != null && job.isCanceled()) {
-					Log.info("Delete annotation canceled.");
+					Log.info(Messages.deleteAnnotationCanceled);
 					return false;
 				}
 				tempManager.deleteAnnotation(type, a.getStart(), a.getEnd());
@@ -127,12 +127,12 @@
 			tempManager.getEntityManager().getTransaction().begin();
 			for (Annotation a : cqpAnnotations) {
 				if (job != null && job.isCanceled()) {
-					Log.info("Delete annotation canceled.");
+					Log.info(Messages.deleteAnnotationCanceled);
 					return false;
 				}
 				String value = cqpManager.getCQPAnnotationValue(a.getStart(), a.getEnd(), type);
 				if (value != null) {
-					tempManager.createAnnotationNoCommit(type, new TypedValue("#del", "#del", type.getId()), a.getStart(), a.getEnd());
+					tempManager.createAnnotationNoCommit(type, new TypedValue("#del", "#del", type.getId()), a.getStart(), a.getEnd()); //$NON-NLS-1$ //$NON-NLS-2$
 				}
 				else {
 					tempManager.deleteAnnotationNoCommit(type, a.getStart(), a.getEnd());
@@ -166,14 +166,14 @@
 				}
 				
 				if (job != null && job.isCanceled()) {
-					Log.info("Delete annotation canceled.");
+					Log.info(Messages.deleteAnnotationCanceled);
 					return false;
 				}
 				
 				String value = cqpManager.getCQPAnnotationValue(start, end, type);
 				
 				if (value != null) {
-					tempManager.createAnnotationNoCommit(type, new TypedValue("#del", "#del", type.getId()), start, end);
+					tempManager.createAnnotationNoCommit(type, new TypedValue("#del", "#del", type.getId()), start, end); //$NON-NLS-1$ //$NON-NLS-2$
 				}
 				else {
 					tempManager.deleteAnnotationNoCommit(type, start, end);
@@ -206,7 +206,7 @@
 			// System.out.println("Temporary annotations: "+temporaryAnnotations);
 			// System.out.println("CQP annotations: "+cqpAnnotations);
 			if (cqpAnnotations.size() != matches.size() || temporaryAnnotations.size() != matches.size()) {
-				Log.info("ERROR in getAnnotationsForMatches methods! ");
+				Log.info("ERROR in getAnnotationsForMatches methods! "); //$NON-NLS-1$
 				return new ArrayList<>(matches.size());
 			}
 			// merge the 2 results
@@ -237,7 +237,7 @@
 			tempManager.close();
 		}
 		catch (Exception e) {
-			Log.warning(NLS.bind("Fail to clear AnnotationManager instance with error: {0}", e));
+			Log.warning(NLS.bind(Messages.failToClearTheAnnotationManagerInstanceP0, e));
 			Log.printStackTrace(e);
 		}
 	}
@@ -286,7 +286,7 @@
 			}
 			
 			if (job != null && job.isCanceled()) { // check if user canceled the job
-				Log.info("Affect annotation canceled.");
+				Log.info(Messages.affectAnnotationCanceled);
 				return null;
 			}
 			
@@ -345,7 +345,7 @@
 				
 			}
 			catch (Throwable e) {
-				Log.info(NLS.bind("Error during annotation creation: {0}.", e));
+				Log.info(NLS.bind(Messages.errorDuringAnnotationCreationP0, e));
 				Log.printStackTrace(e);
 				
 				if (tempManager.getEntityManager().getTransaction().isActive()) {
@@ -390,7 +390,7 @@
 	}
 	
 	public void closeAll() {
-		Log.fine("Closing annotation manager of " + corpus);
+		Log.fine("Closing annotation manager of " + corpus); //$NON-NLS-1$
 		tempManager.close();
 		cqpManager.close();
 	}
@@ -423,22 +423,22 @@
 		
 		List<String> krnames = KRAnnotationEngine.getKnowledgeRepositoryNames(corpus);
 		if (krnames.size() == 0) {
-			Log.severe(NLS.bind("** Error: no knowledge repository found in {0} corpus.", corpus));
-			throw new IllegalArgumentException("No kr in " + corpus);
+			Log.severe(NLS.bind(Messages.errorNoKRFoundInP0Corpus, corpus));
+			throw new IllegalArgumentException("No kr in " + corpus); //$NON-NLS-1$
 		}
 		String firtsKRName = krnames.get(0);
 		KnowledgeRepository defaultKR = KRAnnotationEngine.getKnowledgeRepository(corpus, firtsKRName);
 		if (defaultKR == null) {
-			Log.severe(NLS.bind("** Error: no knowledge repository {0} found in {0} corpus.", defaultKR, corpus));
-			throw new IllegalArgumentException("No kr " + defaultKR + " in " + corpus);
+			Log.severe(NLS.bind(Messages.errorNoKRP0FoundInP1Corpus, defaultKR, corpus));
+			throw new IllegalArgumentException("No kr " + defaultKR + " in " + corpus); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		
 		PrintWriter writer = IOUtils.getWriter(resultFile, encoding, false);
-		String cols [] = {"text_id", "id", "end_id", "start", "end", "type", "value", "mode", "date", "annotator"};
+		String cols [] = {"text_id", "id", "end_id", "start", "end", "type", "value", "mode", "date", "annotator"}; //$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$ //$NON-NLS-10$
 		writer.println(StringUtils.join(cols, colseparator));
 		
 		if (this.getTemporaryManager().getAnnotations().size() == 0) {
-			Log.warning("Warning: no annotations to export. Aborting.");
+			Log.warning(Messages.warningNoAnnotationsToExportAborting);
 			return false;
 		}
 		
@@ -456,7 +456,7 @@
 		for (int p : positions2Ids.keySet()) {
 			positions[i++] = p;
 		}
-		String values[] = corpus.getProperty("id").cpos2Str(positions);
+		String values[] = corpus.getProperty("id").cpos2Str(positions); //$NON-NLS-1$
 		for (i = 0 ; i < positions.length ; i++) {
 			positions2Ids.put(positions[i], values[i]);
 		}
@@ -469,7 +469,7 @@
 			}
 		});
 		
-		Log.info(NLS.bind("Exporting {0} annotations.", annotations.size()));
+		Log.info(NLS.bind(Messages.exportingP0Annotations, annotations.size()));
 		ConsoleProgressBar cpb = new ConsoleProgressBar(annotations.size());
 		
 		int currentText = 0;
@@ -515,28 +515,28 @@
 		
 		List<String> krnames = KRAnnotationEngine.getKnowledgeRepositoryNames(corpus);
 		if (krnames.size() == 0) {
-			Log.severe(NLS.bind("** Error: no knowledge repository found in {0} corpus.", corpus));
-			throw new IllegalArgumentException("No kr in " + corpus);
+			Log.severe(NLS.bind(Messages.errorNoKRFoundInP0Corpus, corpus));
+			throw new IllegalArgumentException("No kr in " + corpus); //$NON-NLS-1$
 		}
 		String firtsKRName = krnames.get(0);
 		KnowledgeRepository defaultKR = KRAnnotationEngine.getKnowledgeRepository(corpus, firtsKRName);
 		if (defaultKR == null) {
-			Log.severe(NLS.bind("** Error: no knowledge repository {0} found in {0} corpus.", defaultKR, corpus));
-			throw new IllegalArgumentException("No kr " + defaultKR + " in " + corpus);
+			Log.severe(NLS.bind(Messages.errorNoKRP0FoundInP1Corpus, defaultKR, corpus));
+			throw new IllegalArgumentException("No kr " + defaultKR + " in " + corpus); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		
 		CsvReader reader = new CsvReader(annotationsFile.getAbsolutePath(), colseparator.charAt(0), Charset.forName(encoding));
 		if (txtseparator.length() > 0) reader.setTextQualifier(txtseparator.charAt(0));
 		reader.readHeaders();
 		String headers [] = reader.getHeaders();
-		String cols [] = {"text_id", "id", "end_id", "start", "end", "type", "value", "mode", "date", "annotator"};
+		String cols [] = {"text_id", "id", "end_id", "start", "end", "type", "value", "mode", "date", "annotator"}; //$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$ //$NON-NLS-10$
 		if (headers.length != cols.length) {
-			Log.warning("Error: annotation file header format is not well-formatted: "+StringUtils.join(headers, ", ")+". Should be: "+StringUtils.join(cols, ", "));
+			Log.warning(Messages.errorAnnotationFileHeaderFormatIsNotWekkfomattedP0ItShouldBeP1+StringUtils.join(headers, ", ")+". Should be: "+StringUtils.join(cols, ", ")); //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			return false;
 		}
 		for (int i = 0 ; i < cols.length ; i++) {
 			if (!(headers[i].equals(cols[i]))) {
-				Log.warning("Error: annotation file header format is not well-formatted: "+StringUtils.join(headers, ", ")+". Should be: "+StringUtils.join(cols, ", "));
+				Log.warning(Messages.errorAnnotationFileHeaderFormatIsNotWekkfomattedP0ItShouldBeP1+StringUtils.join(headers, ", ")+". Should be: "+StringUtils.join(cols, ", ")); //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 				return false;
 			}
 		}
@@ -548,11 +548,11 @@
 		reader.close();
 		
 		if (nLines == 0) {
-			Log.warning("Error: no annotation line found");
+			Log.warning(Messages.errorNoAnnotationLineFound);
 			return false;
 		}
 		
-		Log.info(NLS.bind("Importing {0} annotations...", nLines));
+		Log.info(NLS.bind(Messages.importingP0Annotations, nLines));
 		reader = new CsvReader(annotationsFile.getAbsolutePath(), colseparator.charAt(0), Charset.forName(encoding));
 		if (txtseparator.length() > 0) reader.setTextQualifier(txtseparator.charAt(0));
 		reader.readHeaders();
@@ -574,27 +574,27 @@
 			if (startId.length() > 0 && endId.length() > 0) { // use the word id if present
 				String textId = record[0].trim();
 				if (startId.equals(endId)) {
-					CQLQuery cql = new CQLQuery(NLS.bind("[id=\"{0}\" & _.text_id=\"{1}\"]", startId, textId));
-					QueryResult qr = corpus.query(cql , "TMP", false);
+					CQLQuery cql = new CQLQuery(NLS.bind("[id=\"{0}\" & _.text_id=\"{1}\"]", startId, textId)); //$NON-NLS-1$
+					QueryResult qr = corpus.query(cql , "TMP", false); //$NON-NLS-1$
 					if (qr.getNMatch() == 0) {
-						Log.warning("No match found with CQL="+cql);
+						Log.warning(Messages.noMatchFoundWithCQLEqualP0+cql);
 						continue;
 					}
 					startPos = qr.getMatch(0).getStart();
 					endPos = startPos;
 				} else {
-					CQLQuery cql = new CQLQuery(NLS.bind("[id=\"{0}\" & _.text_id=\"{1}\"]", startId, textId));
-					QueryResult qr = corpus.query(cql , "TMP", false);
+					CQLQuery cql = new CQLQuery(NLS.bind("[id=\"{0}\" & _.text_id=\"{1}\"]", startId, textId)); //$NON-NLS-1$
+					QueryResult qr = corpus.query(cql , "TMP", false); //$NON-NLS-1$
 					if (qr.getNMatch() == 0) {
-						Log.warning("No match found with CQL="+cql);
+						Log.warning(Messages.noMatchFoundWithCQLEqualP0+cql);
 						continue;
 					}
 					startPos = qr.getMatch(0).getStart();
 					qr.drop();
-					cql = new CQLQuery(NLS.bind("[id=\"{0}\" & _.text_id=\"{1}\"]", endId, textId));
-					qr = corpus.query(cql , "TMP", false);
+					cql = new CQLQuery(NLS.bind("[id=\"{0}\" & _.text_id=\"{1}\"]", endId, textId)); //$NON-NLS-1$
+					qr = corpus.query(cql , "TMP", false); //$NON-NLS-1$
 					if (qr.getNMatch() == 0) {
-						Log.warning("No match found with CQL="+cql);
+						Log.warning(Messages.noMatchFoundWithCQLEqualP0+cql);
 						continue;
 					}
 					endPos = qr.getMatch(0).getStart();
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/XMLTXMFileRuledConversion.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/XMLTXMFileRuledConversion.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/XMLTXMFileRuledConversion.java	(revision 3883)
@@ -26,11 +26,11 @@
 	
 	protected String newType;
 	
-	public static final String DELETE = "supprimer";
+	public static final String DELETE = "supprimer"; //$NON-NLS-1$
 	
-	public static final String COPY = "copier";
+	public static final String COPY = "copier"; //$NON-NLS-1$
 	
-	public static final String ABANDON = "abandon";
+	public static final String ABANDON = "abandon"; //$NON-NLS-1$
 	
 	HashSet<String> noMatchValues = new HashSet<>();
 	
@@ -58,8 +58,8 @@
 		}
 		
 		if (elementPath == null) { // where fixing txm:words
-			if (!this.newType.startsWith("#")) this.newType = "#" + this.newType;
-			if (!this.oldType.startsWith("#")) this.oldType = "#" + this.oldType;
+			if (!this.newType.startsWith("#")) this.newType = "#" + this.newType; //$NON-NLS-1$ //$NON-NLS-2$
+			if (!this.oldType.startsWith("#")) this.oldType = "#" + this.oldType; //$NON-NLS-1$ //$NON-NLS-2$
 		}
 	}
 	
@@ -99,7 +99,7 @@
 				String value = parser.getAttributeValue(i);
 				if (oldType != null && oldType.equals(att)) {
 					if (converter != null) {
-						if (debug) Log.finer("CALL CONVERTER with attribute "+att);
+						if (debug) Log.finer("CALL CONVERTER with attribute "+att); //$NON-NLS-1$
 						newValue = converter.getValue(parser, localname, att, value);
 					}
 					else {
@@ -112,12 +112,12 @@
 			}
 			
 			if (oldType == null && converter != null) {
-				if (debug) Log.finer("CALL CONVERTER with no attribute set");
+				if (debug) Log.finer("CALL CONVERTER with no attribute set"); //$NON-NLS-1$
 				newValue = converter.getValue(parser, localname, null, null);
 			}
 			
 			if (newValue != null) {
-				if (debug) Log.finer("WRITE NEWTYPE: " + newType + "=" + newValue);
+				if (debug) Log.finer("WRITE NEWTYPE: " + newType + "=" + newValue); //$NON-NLS-1$ //$NON-NLS-2$
 				writeAttribute(null, newType, newValue);
 			}
 		}
@@ -142,26 +142,26 @@
 			
 			if (!inW) super.processStartElement(); // don't write W content
 			
-			if (localname.equals("w")) {
+			if (localname.equals("w")) { //$NON-NLS-1$
 				inW = true;
 				anaValues.clear();
 				anaResps.clear();
 				
 				// initialize the new type to a empty value in case there is transformation rule
-				anaValues.put(newType, "");
-				anaResps.put(newType, "#txm_recode");
+				anaValues.put(newType, ""); //$NON-NLS-1$
+				anaResps.put(newType, "#txm_recode"); //$NON-NLS-1$
 			}
-			else if (localname.equals("ana")) {
+			else if (localname.equals("ana")) { //$NON-NLS-1$
 				inAna = true;
-				typeName = parser.getAttributeValue(null, "type");
-				respName = parser.getAttributeValue(null, "resp");
+				typeName = parser.getAttributeValue(null, "type"); //$NON-NLS-1$
+				respName = parser.getAttributeValue(null, "resp"); //$NON-NLS-1$
 				anaResps.put(typeName, respName);
 				// if (typeName != null) typeName = typeName.substring(1); // remove #
-				typeValue = "";
+				typeValue = ""; //$NON-NLS-1$
 			}
-			else if (localname.equals("form")) {
+			else if (localname.equals("form")) { //$NON-NLS-1$
 				inForm = true;
-				formValue = "";
+				formValue = ""; //$NON-NLS-1$
 			}
 		}
 	}
@@ -186,21 +186,21 @@
 		}
 		else {
 			
-			if (localname.equals("w")) {
+			if (localname.equals("w")) { //$NON-NLS-1$
 				inW = false;
 				
 				// write W content
 				try {
 					// get the value to test
 					String value = null;
-					if (oldType.equals("word")) {
+					if (oldType.equals("word")) { //$NON-NLS-1$
 						value = formValue;
 					}
 					else {
 						value = anaValues.get(oldType);
 					}
 					
-					if (newType.equals("word")) { // update form property
+					if (newType.equals("word")) { // update form property //$NON-NLS-1$
 						updateFormValueIfMatch(value);
 					}
 					else { // update a ana property
@@ -210,17 +210,17 @@
 					}
 					
 					// write the word element
-					writer.writeStartElement("txm:form");
+					writer.writeStartElement("txm:form"); //$NON-NLS-1$
 					writer.writeCharacters(formValue);
 					writer.writeEndElement();
 					
 					for (String k : anaValues.keySet()) {
 						String resp = anaResps.get(k);
-						if (resp == null) resp = "#txm_recode";
+						if (resp == null) resp = "#txm_recode"; //$NON-NLS-1$
 						
-						writer.writeStartElement("txm:ana");
-						writer.writeAttribute("resp", resp);
-						writer.writeAttribute("type", k);
+						writer.writeStartElement("txm:ana"); //$NON-NLS-1$
+						writer.writeAttribute("resp", resp); //$NON-NLS-1$
+						writer.writeAttribute("type", k); //$NON-NLS-1$
 						writer.writeCharacters(anaValues.get(k));
 						writer.writeEndElement();
 					}
@@ -229,11 +229,11 @@
 					e.printStackTrace();
 				}
 			}
-			else if (localname.equals("ana")) {
+			else if (localname.equals("ana")) { //$NON-NLS-1$
 				anaValues.put(typeName, typeValue);
 				inAna = false;
 			}
-			else if (localname.equals("form")) {
+			else if (localname.equals("form")) { //$NON-NLS-1$
 				inForm = false;
 			}
 			
@@ -279,7 +279,7 @@
 			String v = converter.getValue(parser, localname, null, value);
 			if (v != null) {
 				anaValues.put(newType, v); // do a replace if newType == oldType :-)
-				anaResps.put(newType, "#txm_recode");
+				anaResps.put(newType, "#txm_recode"); //$NON-NLS-1$
 				return; // ok stop
 			}
 		}
@@ -289,13 +289,13 @@
 				if (rule.matcher(value).matches()) {
 					value = rules.get(rule);
 					anaValues.put(newType, value); // do a replace if newType == oldType :-)
-					anaResps.put(newType, "#txm_recode");
+					anaResps.put(newType, "#txm_recode"); //$NON-NLS-1$
 					return;
 				}
 			}
 		}
-		if (DELETE.equals(mode)) anaValues.put(newType, ""); // do a replace if newType == oldType :-)
-		else if (ABANDON.equals(mode)) anaValues.put(newType, "ERROR(" + value + ")"); // do a replace if newType == oldType :-)
+		if (DELETE.equals(mode)) anaValues.put(newType, ""); // do a replace if newType == oldType :-) //$NON-NLS-1$
+		else if (ABANDON.equals(mode)) anaValues.put(newType, "ERROR(" + value + ")"); // do a replace if newType == oldType :-) //$NON-NLS-1$ //$NON-NLS-2$
 		
 		noMatchValues.add(value);
 	}
@@ -306,21 +306,21 @@
 	
 	public static void main(String args[]) {
 		try {
-			File xmlFile = new File("/home/mdecorde/xml/recode/test.xml");
-			File tmpFile = new File("/home/mdecorde/xml/recode/test-o.xml");
-			String oldType = "myattr";
-			String newType = "myattr";
+			File xmlFile = new File("/home/mdecorde/xml/recode/test.xml"); //$NON-NLS-1$
+			File tmpFile = new File("/home/mdecorde/xml/recode/test-o.xml"); //$NON-NLS-1$
+			String oldType = "myattr"; //$NON-NLS-1$
+			String newType = "myattr"; //$NON-NLS-1$
 			LinkedHashMap<Pattern, String> rules = new LinkedHashMap<>();
-			rules.put(Pattern.compile(".+"), "NEWW");
-			rules.put(Pattern.compile("x.+"), "XWORD");
-			rules.put(Pattern.compile("y"), "YWORD");
-			rules.put(Pattern.compile("y.*"), "YMULTIWORD");
-			XMLTXMFileRuledConversion converter = new XMLTXMFileRuledConversion(xmlFile, rules, "w", oldType, newType, ABANDON);
+			rules.put(Pattern.compile(".+"), "NEWW"); //$NON-NLS-1$ //$NON-NLS-2$
+			rules.put(Pattern.compile("x.+"), "XWORD"); //$NON-NLS-1$ //$NON-NLS-2$
+			rules.put(Pattern.compile("y"), "YWORD"); //$NON-NLS-1$ //$NON-NLS-2$
+			rules.put(Pattern.compile("y.*"), "YMULTIWORD"); //$NON-NLS-1$ //$NON-NLS-2$
+			XMLTXMFileRuledConversion converter = new XMLTXMFileRuledConversion(xmlFile, rules, "w", oldType, newType, ABANDON); //$NON-NLS-1$
 			converter.converter = new Converter() {
 				
 				@Override
 				public String getValue(XMLStreamReader parser, String localname, String attribute, String value) {
-					return "NEW" + value;
+					return "NEW" + value; //$NON-NLS-1$
 				}
 			};
 			System.out.println(converter.process(tmpFile));
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationWriter.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationWriter.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationWriter.java	(revision 3883)
@@ -45,14 +45,14 @@
 		this.corpus = corpus;
 		List<String> krnames = KRAnnotationEngine.getKnowledgeRepositoryNames(corpus);
 		if (krnames.size() == 0) {
-			Log.severe(NLS.bind("** Error: no knowledge repository found in {0} corpus.", corpus));
-			throw new IllegalArgumentException("No kr in " + corpus);
+			Log.severe(NLS.bind(Messages.ErrorNoKnowledgeRepositoryFoundInP0Corpus, corpus));
+			throw new IllegalArgumentException("No kr in " + corpus); //$NON-NLS-1$
 		}
 		String firtsKRName = krnames.get(0);
 		defaultKR = KRAnnotationEngine.getKnowledgeRepository(corpus, firtsKRName);
 		if (defaultKR == null) {
-			Log.severe(NLS.bind("** Error: no knowledge repository {0} found in {0} corpus.", defaultKR, corpus));
-			throw new IllegalArgumentException("No kr " + defaultKR + " in " + corpus);
+			Log.severe(NLS.bind(Messages.ErrorNoKnowledgeRepositoryP0FoundInP1Corpus, defaultKR, corpus));
+			throw new IllegalArgumentException("No kr " + defaultKR + " in " + corpus); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		
 		types = new ArrayList<AnnotationType>();
@@ -78,7 +78,7 @@
 	 * @throws XMLStreamException
 	 */
 	protected boolean writeTextAnnotationToSyMoGIH(String textid, File currentXMLFile, File currentXMLStandoffFile, File xmlStandOffDirectory) throws IOException, CqiServerError, CqiClientException, InvalidCqpIdException, XMLStreamException {
-		Log.info("  text=" + textid);
+		Log.info(Messages.TestP0 + textid);
 		boolean show_debug = Log.getLevel().intValue() < Level.INFO.intValue();
 		
 		AnnotationSyMoGIHWriter annotationstdoff = new AnnotationSyMoGIHWriter(textid, currentXMLFile, xmlStandOffDirectory, types, show_debug);
@@ -89,11 +89,11 @@
 				return true;
 			}
 			else {
-				Log.warning(NLS.bind("Error: the {0} result file is malformed.", currentXMLStandoffFile));
+				Log.warning(NLS.bind(Messages.ErrorTheP0ResultFileIsMalformed, currentXMLStandoffFile));
 			}
 		}
 		else {
-			Log.warning(NLS.bind("Error: while processing the {0} file in standoff dir", currentXMLStandoffFile));
+			Log.warning(NLS.bind(Messages.ErrorWhileProcessingTheP0FileInStandOffDir, currentXMLStandoffFile));
 		}
 		return false;
 		
@@ -113,29 +113,29 @@
 	public boolean writeAnnotationsInStandoff(File resultZipFile) throws IOException, CqiServerError, CqiClientException, InvalidCqpIdException, XMLStreamException {
 		
 		List<String> textsIds = Arrays.asList(corpus.getCorpusTextIdsList());
-		Log.info(NLS.bind("Exporting annotations of the {0} text(s).", StringUtils.join(textsIds, ", ")));
+		Log.info(NLS.bind(Messages.ExportingAnnotationsOfTheP0Texts, StringUtils.join(textsIds, ", "))); //$NON-NLS-2$
 		
-		File resultDirectory = new File(Toolbox.getTxmHomePath(), "results/" + corpus.getID() + "_annotations");
+		File resultDirectory = new File(Toolbox.getTxmHomePath(), "results/" + corpus.getID() + "_annotations"); //$NON-NLS-1$ //$NON-NLS-2$
 		DeleteDir.deleteDirectory(resultDirectory);
 		resultDirectory.mkdirs();
 		if (!(resultDirectory.exists() && resultDirectory.canWrite())) {
-			Log.warning(NLS.bind("ERROR: could not create/write temporary directory: {0}.", resultDirectory));
+			Log.warning(NLS.bind(Messages.ErrorCouldNotCreateWriteTemporaryDirectoryP0, resultDirectory));
 			return false;
 		}
 		
 		File inputDirectory = corpus.getProjectDirectory();
-		File corpusTxmDirectory = new File(inputDirectory, "txm/" + corpus.getID());
+		File corpusTxmDirectory = new File(inputDirectory, "txm/" + corpus.getID()); //$NON-NLS-1$
 		
-		Log.info(NLS.bind("Writing annotations XML files in {0}.", resultDirectory));
+		Log.info(NLS.bind(Messages.WritingAnnotationsXMLFilesInP0, resultDirectory));
 		for (String textid : textsIds) {
-			File currentXMLFile = new File(corpusTxmDirectory, textid + ".xml");
+			File currentXMLFile = new File(corpusTxmDirectory, textid + ".xml"); //$NON-NLS-1$
 			if (!currentXMLFile.exists()) {
-				Log.warning(NLS.bind("Error: cannot found ab XML-TXM file for text with the ''{0}'' id.", textid));
+				Log.warning(NLS.bind(Messages.ErrorCannotFoundAXMLTXMFileForTextWithTheP0Id, textid));
 				return false;
 			}
-			File currentXMLStandoffFile = new File(resultDirectory, textid + ".xml"); // To Be Changed ?
+			File currentXMLStandoffFile = new File(resultDirectory, textid + ".xml"); // To Be Changed ? //$NON-NLS-1$
 			if (!writeTextAnnotationToSyMoGIH(textid, currentXMLFile, currentXMLStandoffFile, resultDirectory)) {
-				Log.warning(NLS.bind("Error while writing annotations of text in {0}.", currentXMLStandoffFile));
+				Log.warning(NLS.bind(Messages.ErrorWhileWritingAnnotationsOfTextInP0, currentXMLStandoffFile));
 				return false;
 			}
 		}
@@ -143,7 +143,7 @@
 		Zip.compress(resultDirectory, resultZipFile, new ConsoleProgressBar(1));
 		DeleteDir.deleteDirectory(resultDirectory);
 		
-		Log.info(NLS.bind("Annotations saved in ''{0}''.", resultZipFile.getAbsolutePath()));
+		Log.info(NLS.bind(Messages.AnnotationsSavedInP0, resultZipFile.getAbsolutePath()));
 		return resultZipFile.exists();
 	}
 	
@@ -169,13 +169,13 @@
 		List<String> textsIds = Arrays.asList(corpus.getCorpusTextIdsList());
 		
 		File inputDirectory = corpus.getProjectDirectory();
-		File txmDirectory = new File(inputDirectory, "txm/" + corpus.getID());
+		File txmDirectory = new File(inputDirectory, "txm/" + corpus.getID()); //$NON-NLS-1$
 		
 		ArrayList<Annotation> textAnnotations = new ArrayList<Annotation>();
 		HashMap<String, ArrayList<Annotation>> annotationsPerTexts = new HashMap<String, ArrayList<Annotation>>();
 		
 		int currentText = 0;
-		File currentXMLFile = new File(txmDirectory, textsIds.get(currentText) + ".xml");
+		File currentXMLFile = new File(txmDirectory, textsIds.get(currentText) + ".xml"); //$NON-NLS-1$
 		
 		textAnnotations = new ArrayList<Annotation>();
 		annotationsPerTexts.put(textsIds.get(currentText), textAnnotations);
@@ -206,30 +206,30 @@
 			textAnnotations.add(currentAnnot);
 		}
 		
-		File tmpXMLTXMDirectory = new File(txmDirectory.getAbsolutePath() + "_tmp");
+		File tmpXMLTXMDirectory = new File(txmDirectory.getAbsolutePath() + "_tmp"); //$NON-NLS-1$
 		DeleteDir.deleteDirectory(tmpXMLTXMDirectory);
 		tmpXMLTXMDirectory.mkdirs();
 		if (!(tmpXMLTXMDirectory.exists() && tmpXMLTXMDirectory.canWrite())) {
-			Log.warning(NLS.bind("ERROR: could not create directory: {0}.", tmpXMLTXMDirectory));
+			Log.warning(NLS.bind(Messages.ErrorCouldNotCreateDirectoryP0, tmpXMLTXMDirectory));
 			return false;
 		}
 		
-		File previousXMLTXMDirectory = new File(txmDirectory.getAbsolutePath() + "_previous");
+		File previousXMLTXMDirectory = new File(txmDirectory.getAbsolutePath() + "_previous"); //$NON-NLS-1$
 		// DeleteDir.deleteDirectory(tmpXMLTXMDirectory);
 		previousXMLTXMDirectory.mkdirs();
 		if (!(previousXMLTXMDirectory.exists() && previousXMLTXMDirectory.canWrite())) {
-			Log.warning(NLS.bind("ERROR: could not create directory: {0}.", previousXMLTXMDirectory));
+			Log.warning(NLS.bind(Messages.ErrorCouldNotCreateDirectoryP0, previousXMLTXMDirectory));
 			return false;
 		}
 		
-		Log.fine("Annotations grouped per text for " + annotationsPerTexts.size() + " text" + (annotationsPerTexts.size() > 0 ? "s" : ""));
-		Log.fine(" - Writing temporary XML files in: " + tmpXMLTXMDirectory);
-		Log.fine(" - Copying previous version of XML files in: " + previousXMLTXMDirectory);
+		Log.fine("Annotations grouped per text for " + annotationsPerTexts.size() + " text" + (annotationsPerTexts.size() > 0 ? "s" : "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		Log.fine(" - Writing temporary XML files in: " + tmpXMLTXMDirectory); //$NON-NLS-1$
+		Log.fine(" - Copying previous version of XML files in: " + previousXMLTXMDirectory); //$NON-NLS-1$
 		// for all annotation PER TEXT, update the XML-TXM files
 		currentText = 0;
 		ConsoleProgressBar cpb = new ConsoleProgressBar(annotationsPerTexts.size());
 		while (currentText < end_limits.length) { // end limits : 10, 30, 45, 55, 103
-			currentXMLFile = new File(txmDirectory, textsIds.get(currentText) + ".xml");
+			currentXMLFile = new File(txmDirectory, textsIds.get(currentText) + ".xml"); //$NON-NLS-1$
 			ArrayList<Annotation> allAnnotations = annotationsPerTexts.get(textsIds.get(currentText));
 			if (allAnnotations != null && allAnnotations.size() > 0) {
 				ArrayList<Annotation> allSegmentAnnotations = new ArrayList<Annotation>();
@@ -246,18 +246,18 @@
 							allTokenAnnotations.add(a);
 						}
 						else {
-							Log.fine("Annotation " + a + " with type=" + a.getType() + " not found in default KR=" + defaultKR);
+							Log.fine("Annotation " + a + " with type=" + a.getType() + " not found in default KR=" + defaultKR); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 						}
 					}
 					else {
-						Log.warning("Warning: unknowed type: " + a.getType());
+						Log.warning(Messages.WarningUnknownTypeP0 + a.getType());
 					}
 				}
 				
 				if (!writeAnnotationsInFile(currentXMLFile, start_limits[currentText],
 						allSegmentAnnotations, allTokenAnnotations,
 						tmpXMLTXMDirectory, previousXMLTXMDirectory)) {
-					Log.severe("Error while writing annotations of text " + currentXMLFile);
+					Log.severe(Messages.ErrorWhileWritingAnnotationsOfTextP0 + currentXMLFile);
 					return false;
 				}
 				else {
@@ -279,7 +279,7 @@
 	protected boolean writeAnnotationsInFile(File xmlFile, int text_start_position,
 			ArrayList<Annotation> segmentAnnotations, ArrayList<Annotation> tokenAnnotations, File tmpXMLTXMDirectory, File previousXMLTXMDirectory) throws CqiClientException, IOException,
 			CqiServerError, InvalidCqpIdException, XMLStreamException {
-		Log.fine("Writing annotations for text " + xmlFile + " segment annotations=" + segmentAnnotations.size() + " token annotations=" + tokenAnnotations.size());
+		Log.fine("Writing annotations for text " + xmlFile + " segment annotations=" + segmentAnnotations.size() + " token annotations=" + tokenAnnotations.size()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		// System.out.println(segmentAnnotations);
 		// System.out.println(tokenAnnotations);
 		
@@ -297,15 +297,15 @@
 					return true;
 				}
 				else {
-					Log.severe("Error: could not replace XML-TXM file: " + xmlFile + " with " + tmpfile);
+					Log.severe(Messages.ErrorCouldNotReplaceXMLTXMFileP0WithP1 + xmlFile + " with " + tmpfile); //$NON-NLS-2$
 				}
 			}
 			else {
-				Log.severe("Error: result file " + tmpfile + " is malformed.");
+				Log.severe(Messages.ErrorResultFileP0IsMalformed + tmpfile + " is malformed."); //$NON-NLS-2$
 			}
 		}
 		else {
-			Log.severe("Error: while processing " + xmlFile + " in temp dir");
+			Log.severe(Messages.ErrorWhileProcessingP0InTempDir + xmlFile + " in temp dir"); //$NON-NLS-2$
 		}
 		return false;
 	}
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationSyMoGIHWriter.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationSyMoGIHWriter.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationSyMoGIHWriter.java	(revision 3883)
@@ -15,6 +15,7 @@
 import javax.xml.stream.XMLStreamWriter;
 
 import org.eclipse.osgi.util.NLS;
+import org.txm.annotation.kr.core.messages.Messages;
 import org.txm.annotation.kr.core.repository.AnnotationType;
 import org.txm.importer.StaxIdentityParser;
 import org.txm.utils.logger.Log;
@@ -142,16 +143,16 @@
 		 */
 		boolean foundAnnot = false;
 		
-		if (types.contains(localname) && parser.getPrefix().equals("txm")) { // don't write txm annotation elements
+		if (types.contains(localname) && parser.getPrefix().equals("txm")) { // don't write txm annotation elements //$NON-NLS-1$
 			// System.out.println(" START "+ localname);
 			foundAnnot = true;
 			currentType = localname;
 			// <txm:actr author="gazelledess" ref="PhileasFogg" date="2016-09-05" start="56" end="57">
-			currentAuthor = parser.getAttributeValue(null, "author");
-			currentRef = parser.getAttributeValue(null, "ref");
-			currentStartPos = parser.getAttributeValue(null, "start");
-			currentEndPos = parser.getAttributeValue(null, "end");
-			currentDate = parser.getAttributeValue(null, "date");
+			currentAuthor = parser.getAttributeValue(null, "author"); //$NON-NLS-1$
+			currentRef = parser.getAttributeValue(null, "ref"); //$NON-NLS-1$
+			currentStartPos = parser.getAttributeValue(null, "start"); //$NON-NLS-1$
+			currentEndPos = parser.getAttributeValue(null, "end"); //$NON-NLS-1$
+			currentDate = parser.getAttributeValue(null, "date"); //$NON-NLS-1$
 			// annotation is here
 			startAnnotation = true;
 			positions = new ArrayList<String>();
@@ -176,8 +177,8 @@
 			super.processStartElement(); /// continue writing in file all elements, except the tags that are now in stand-off files
 			
 			// get words ids of the current annotations
-			if (localname.equals("w") && startAnnotation) {
-				String id = parser.getAttributeValue(null, "id");
+			if (localname.equals("w") && startAnnotation) { //$NON-NLS-1$
+				String id = parser.getAttributeValue(null, "id"); //$NON-NLS-1$
 				for (String typeIn : annotationsPositions.keySet()) {
 					positions = annotationsPositions.get(typeIn);
 					positions.add(id);
@@ -217,54 +218,54 @@
 	private XMLStreamWriter writeStartStandOffFile(File file) {
 		// System.out.println("writeStartStandOffFile ...");
 		
-		String ns = "http://www.tei-c.org/ns/1.0";
+		String ns = "http://www.tei-c.org/ns/1.0"; //$NON-NLS-1$
 		XMLOutputFactory output = XMLOutputFactory.newInstance();
 		XMLStreamWriter writer = null;
 		try {
 			writer = output.createXMLStreamWriter(new FileWriter(file));
 			writer.writeStartDocument();
-			writer.setPrefix("tei", ns);
+			writer.setPrefix("tei", ns); //$NON-NLS-1$
 			writer.setDefaultNamespace(ns);
 			
-			writer.writeStartElement("TEI");
+			writer.writeStartElement("TEI"); //$NON-NLS-1$
 			
-			writer.writeStartElement("teiHeader");
-			writer.writeStartElement("fileDesc");
+			writer.writeStartElement("teiHeader"); //$NON-NLS-1$
+			writer.writeStartElement("fileDesc"); //$NON-NLS-1$
 			
-			writer.writeStartElement("titleStmt");
-			writer.writeStartElement("title");
+			writer.writeStartElement("titleStmt"); //$NON-NLS-1$
+			writer.writeStartElement("title"); //$NON-NLS-1$
 			writer.writeCharacters(textid);
 			writer.writeEndElement(); // title
 			writer.writeEndElement(); // titleStmt
 			
-			writer.writeStartElement("publicationStmt");
-			writer.writeStartElement("p");
-			writer.writeCharacters("PUBLICATION INFO à renseigner");
+			writer.writeStartElement("publicationStmt"); //$NON-NLS-1$
+			writer.writeStartElement("p"); //$NON-NLS-1$
+			writer.writeCharacters("PUBLICATION INFO à renseigner"); //$NON-NLS-1$
 			writer.writeEndElement(); // p
 			writer.writeEndElement(); // publicationStmt
 			
-			writer.writeStartElement("sourceDesc");
-			writer.writeStartElement("p");
-			writer.writeCharacters("Ce document permet l'annotation sémantique de tous les textes, par auteur");
+			writer.writeStartElement("sourceDesc"); //$NON-NLS-1$
+			writer.writeStartElement("p"); //$NON-NLS-1$
+			writer.writeCharacters("Ce document permet l'annotation sémantique de tous les textes, par auteur"); //$NON-NLS-1$
 			writer.writeEndElement(); // p
 			writer.writeEndElement(); // sourceDesc
 			
 			writer.writeEndElement(); // </fileDesc>
-			writer.writeStartElement("encodingDesc");
-			writer.writeStartElement("projectDesc");
-			writer.writeStartElement("p");
-			writer.writeCharacters("Annotations created by " + currentAuthor + ", for the use in Symogih XML platform");
+			writer.writeStartElement("encodingDesc"); //$NON-NLS-1$
+			writer.writeStartElement("projectDesc"); //$NON-NLS-1$
+			writer.writeStartElement("p"); //$NON-NLS-1$
+			writer.writeCharacters("Annotations created by " + currentAuthor + ", for the use in Symogih XML platform"); //$NON-NLS-1$ //$NON-NLS-2$
 			writer.writeEndElement(); // p
 			writer.writeEndElement(); // </projectDesc>
 			writer.writeEndElement(); // </encodingDesc>
 			writer.writeEndElement(); // </teiHeader>
 			
 			
-			writer.writeStartElement("text");
-			writer.writeStartElement("body");
-			writer.writeCharacters("\n");
-			writer.writeStartElement("div");
-			writer.writeCharacters("\n");
+			writer.writeStartElement("text"); //$NON-NLS-1$
+			writer.writeStartElement("body"); //$NON-NLS-1$
+			writer.writeCharacters("\n"); //$NON-NLS-1$
+			writer.writeStartElement("div"); //$NON-NLS-1$
+			writer.writeCharacters("\n"); //$NON-NLS-1$
 		}
 		catch (XMLStreamException e) {
 			// TODO Auto-generated catch block
@@ -291,16 +292,16 @@
 	private void writeStartAnnotationToStandoffFile(String[] data, ArrayList<String> positions) {
 		// System.out.println("writeStartAnnotationToStandoffFile ...");
 		try {
-			currentWriter.writeStartElement("span");
-			currentWriter.writeAttribute("type", data[2]);
-			currentWriter.writeAttribute("ana", data[1]);
+			currentWriter.writeStartElement("span"); //$NON-NLS-1$
+			currentWriter.writeAttribute("type", data[2]); //$NON-NLS-1$
+			currentWriter.writeAttribute("ana", data[1]); //$NON-NLS-1$
 			StringBuffer listWids = new StringBuffer();
 			for (String posW : positions) {
-				listWids.append("#" + posW + " ");
+				listWids.append("#" + posW + " "); //$NON-NLS-1$ //$NON-NLS-2$
 			}
-			currentWriter.writeAttribute("target", listWids.toString().trim());
+			currentWriter.writeAttribute("target", listWids.toString().trim()); //$NON-NLS-1$
 			currentWriter.writeEndElement(); // span
-			currentWriter.writeCharacters("\n");
+			currentWriter.writeCharacters("\n"); //$NON-NLS-1$
 		}
 		catch (XMLStreamException e) {
 			// TODO Auto-generated catch block
@@ -310,7 +311,7 @@
 	
 	protected void processEndElement() throws XMLStreamException {
 		boolean foundAnnot = false;
-		if (types.contains(localname) && parser.getPrefix().equals("txm")) { // skip annotation end element
+		if (types.contains(localname) && parser.getPrefix().equals("txm")) { // skip annotation end element //$NON-NLS-1$
 			// System.out.println(" END "+ localname);
 			foundAnnot = true;
 			// annotation ends here
@@ -324,11 +325,11 @@
 		}
 		
 		if (!foundAnnot) {
-			if (localname.equals("TEI")) {
+			if (localname.equals("TEI")) { //$NON-NLS-1$
 				try {
 					for (String author : allannotations.keySet()) {
-						Log.info("    author=" + author);
-						File currentXmlFile = new File(xmlStandOffDirectory, filename.substring(0, filename.length() - 4) + "_" + currentAuthor + "_annotations.xml");
+						Log.info("    author=" + author); //$NON-NLS-1$
+						File currentXmlFile = new File(xmlStandOffDirectory, filename.substring(0, filename.length() - 4) + "_" + currentAuthor + "_annotations.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 						
 						// write start of the stand-off file
 						currentWriter = writeStartStandOffFile(currentXmlFile);
@@ -340,22 +341,22 @@
 							ArrayList<String[]> datas = dates.get(date);
 							ArrayList<ArrayList<String>> positions = datesPositions.get(date);
 							
-							currentWriter.writeStartElement("div");
-							currentWriter.writeCharacters("\n");
-							currentWriter.writeStartElement("head");
-							currentWriter.writeStartElement("date");
-							currentWriter.writeAttribute("type", "annotation_date");
-							currentWriter.writeAttribute("when", date);
+							currentWriter.writeStartElement("div"); //$NON-NLS-1$
+							currentWriter.writeCharacters("\n"); //$NON-NLS-1$
+							currentWriter.writeStartElement("head"); //$NON-NLS-1$
+							currentWriter.writeStartElement("date"); //$NON-NLS-1$
+							currentWriter.writeAttribute("type", "annotation_date"); //$NON-NLS-1$ //$NON-NLS-2$
+							currentWriter.writeAttribute("when", date); //$NON-NLS-1$
 							currentWriter.writeEndElement(); // date
 							currentWriter.writeEndElement(); // head
-							currentWriter.writeCharacters("\n");
+							currentWriter.writeCharacters("\n"); //$NON-NLS-1$
 							
 							for (int i = 0; i < datas.size(); i++) {
 								writeStartAnnotationToStandoffFile(datas.get(i), positions.get(i));
 							}
 							
 							currentWriter.writeEndElement(); // div
-							currentWriter.writeCharacters("\n");
+							currentWriter.writeCharacters("\n"); //$NON-NLS-1$
 						}
 						
 						// write the end of the stand-off file
@@ -363,7 +364,7 @@
 					}
 				}
 				catch (Exception e) {
-					Log.warning(NLS.bind("Error with current writer: {0}.", currentWriter));
+					Log.warning(NLS.bind(Messages.ErrorWithCurrentWriterP0, currentWriter));
 					Log.printStackTrace(e);
 				}
 			}
@@ -373,15 +374,15 @@
 	
 	public static void main(String strs[]) {
 		try {
-			File xmlFile = new File("/home/mdecorde/TXM/corpora/TDM80J/txm/TDM80J", "tdm80j.xml");
-			File outfile = new File(xmlFile.getParentFile(), "tdm80j-tei.xml");
+			File xmlFile = new File("/home/mdecorde/TXM/corpora/TDM80J/txm/TDM80J", "tdm80j.xml"); //$NON-NLS-1$ //$NON-NLS-2$
+			File outfile = new File(xmlFile.getParentFile(), "tdm80j-tei.xml"); //$NON-NLS-1$
 			
 			File xmlStandOffDirectory = xmlFile.getParentFile();
 			List<AnnotationType> types = new ArrayList<AnnotationType>();
-			types.add(new AnnotationType("local", "actr_id", "actr"));
+			types.add(new AnnotationType("local", "actr_id", "actr")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			AnnotationSyMoGIHWriter annotStdff;
 			try {
-				annotStdff = new AnnotationSyMoGIHWriter("TDBM80J", xmlFile, xmlStandOffDirectory, types, true);
+				annotStdff = new AnnotationSyMoGIHWriter("TDBM80J", xmlFile, xmlStandOffDirectory, types, true); //$NON-NLS-1$
 				annotStdff.process(outfile);
 			}
 			catch (MalformedURLException e) {
Index: TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationInjector.java
===================================================================
--- TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationInjector.java	(revision 3882)
+++ TXM/trunk/bundles/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/AnnotationInjector.java	(revision 3883)
@@ -15,6 +15,7 @@
 
 import org.eclipse.osgi.util.NLS;
 import org.txm.Toolbox;
+import org.txm.annotation.kr.core.messages.Messages;
 import org.txm.importer.StaxIdentityParser;
 import org.txm.importer.ValidateXml;
 import org.txm.utils.logger.Log;
@@ -86,7 +87,7 @@
 			XMLStreamException {
 		super(xmlFile.toURI().toURL()); // init reader and writer
 		
-		this.user = System.getProperty("user.name");
+		this.user = System.getProperty("user.name"); //$NON-NLS-1$
 		
 		this.debug = debug;
 		this.xmlFile = xmlFile;
@@ -149,10 +150,10 @@
 		});
 		
 		if (debug) {
-			Log.finer("annotations for " + xmlFile);
-			Log.finer(" segment grouped and ordered by start position: " + annotationsToAddByStartPos);
-			Log.finer(" segment grouped and ordered by end position: " + annotationsToAddByEndPos);
-			Log.finer(" token ordered by start position: " + tokenAnnotations);
+			Log.finer("annotations for " + xmlFile); //$NON-NLS-1$
+			Log.finer(" segment grouped and ordered by start position: " + annotationsToAddByStartPos); //$NON-NLS-1$
+			Log.finer(" segment grouped and ordered by end position: " + annotationsToAddByEndPos); //$NON-NLS-1$
+			Log.finer(" token ordered by start position: " + tokenAnnotations); //$NON-NLS-1$
 		}
 	}
 	
@@ -172,12 +173,12 @@
 		// System.out.println("A Starts: "+currentStartAnnotations+" "+currentEndAnnotations);
 		// if (debug)
 		// System.out.println("----- "+localname+"@"+position_counter+" START ANNOT = "+currentStartAnnotations);
-		if ("teiHeader".equals(localname)) {
+		if ("teiHeader".equals(localname)) { //$NON-NLS-1$
 			super.processStartElement();
-			goToEnd("teiHeader"); // skip teiHeader // will be closed in
+			goToEnd("teiHeader"); // skip teiHeader // will be closed in //$NON-NLS-1$
 			// processEndElement()
 		}
-		else if ("w".equals(localname)) {
+		else if ("w".equals(localname)) { //$NON-NLS-1$
 			// System.out.println("W START pos="+position_counter+" annots="+currentStartAnnotations);
 			if (currentStartAnnotations != null) {// there are still annotations
 				// to write, possible
@@ -185,20 +186,20 @@
 				// if (debug)
 				// System.out.println("WRITING START at "+position_counter+": "+currentStartAnnotations);
 				for (Annotation a : currentStartAnnotations) {
-					if (!"#del".equals(a.getValue())) {
+					if (!"#del".equals(a.getValue())) { //$NON-NLS-1$
 						if (debug) {
-							Log.finer(" force write start annotation " + a);
+							Log.finer(" force write start annotation " + a); //$NON-NLS-1$
 						}
 						writeStartAnnotation(a);
 					}
 					else {
 						if (debug)
-							Log.finer(" no need to write start annotation " + a);
+							Log.finer(" no need to write start annotation " + a); //$NON-NLS-1$
 						currentEndAnnotations = annotationsToAddByEndPos.get(a.getEnd());
 						// System.out.println(" shall we need to change annotation attribute : "+a.getValue()+
 						// " | currentEndAnnotations : "+currentEndAnnotations);
 						if (currentEndAnnotations == null) {
-							Log.finer("WARNING ERROR null pointer for end position of annotation " + a);
+							Log.finer("WARNING ERROR null pointer for end position of annotation " + a); //$NON-NLS-1$
 						}
 						else {
 							currentEndAnnotations.remove(a);
@@ -230,20 +231,20 @@
 			super.processStartElement(); // write the tag
 			
 		}
-		else if ("form".equals(localname) && inW) {
-			if (currentTokenAnnotations.containsKey("word")) {
-				Annotation a = currentTokenAnnotations.get("word");
+		else if ("form".equals(localname) && inW) { //$NON-NLS-1$
+			if (currentTokenAnnotations.containsKey("word")) { //$NON-NLS-1$
+				Annotation a = currentTokenAnnotations.get("word"); //$NON-NLS-1$
 				// System.out.println("Updating token annotation with: " + a);
 				
 				String value = a.getValue();
-				if ("#del".equals(value)) {
-					value = "";
+				if ("#del".equals(value)) { //$NON-NLS-1$
+					value = ""; //$NON-NLS-1$
 				}
 				if (value == null) {
-					value = "ERROR";
+					value = "ERROR"; //$NON-NLS-1$
 				}
 				try {
-					writer.writeStartElement(TXMNS, "form");
+					writer.writeStartElement(TXMNS, "form"); //$NON-NLS-1$
 					writer.writeCharacters(value);
 					mustChangeWordValue = true;
 				}
@@ -252,31 +253,31 @@
 					e.printStackTrace();
 				}
 				
-				currentTokenAnnotations.remove("word"); // annotation updated
+				currentTokenAnnotations.remove("word"); // annotation updated //$NON-NLS-1$
 			}
 			else {
 				super.processStartElement();
 			}
 		}
-		else if ("ana".equals(localname) && inW) {
+		else if ("ana".equals(localname) && inW) { //$NON-NLS-1$
 			inAna = true;
-			String type = parser.getAttributeValue(null, "type").substring(1);
+			String type = parser.getAttributeValue(null, "type").substring(1); //$NON-NLS-1$
 			if (currentTokenAnnotations.containsKey(type)) {
 				Annotation a = currentTokenAnnotations.get(type);
 				// System.out.println("Updating token annotation with: " + a);
 				
 				String value = a.getValue();
-				if ("#del".equals(value)) {
-					value = "";
+				if ("#del".equals(value)) { //$NON-NLS-1$
+					value = ""; //$NON-NLS-1$
 				}
 				if (value == null) {
-					value = "ERROR";
+					value = "ERROR"; //$NON-NLS-1$
 				}
 				
 				try {
-					writer.writeStartElement("ana");
-					writer.writeAttribute("type", "#" + type);
-					writer.writeAttribute("resp", "#" + a.getAnnotator()); // change
+					writer.writeStartElement("ana"); //$NON-NLS-1$
+					writer.writeAttribute("type", "#" + type); //$NON-NLS-1$ //$NON-NLS-2$
+					writer.writeAttribute("resp", "#" + a.getAnnotator()); // change //$NON-NLS-1$ //$NON-NLS-2$
 					// resp
 					writer.writeCharacters(value);
 					mustChangeAnaValue = true;
@@ -295,10 +296,10 @@
 		else if (currentStartAnnotations != null) { // is it an annotations ?
 			// System.out.println("A START="+localname);
 			
-			String s_end = parser.getAttributeValue(null, "end");
-			String s_start = parser.getAttributeValue(null, "start");
-			String s_author = parser.getAttributeValue(null, "author");
-			String s_ref = parser.getAttributeValue(null, "ref");
+			String s_end = parser.getAttributeValue(null, "end"); //$NON-NLS-1$
+			String s_start = parser.getAttributeValue(null, "start"); //$NON-NLS-1$
+			String s_author = parser.getAttributeValue(null, "author"); //$NON-NLS-1$
+			String s_ref = parser.getAttributeValue(null, "ref"); //$NON-NLS-1$
 			
 			boolean toDelete = false;
 			
@@ -328,12 +329,12 @@
 							// updated = true;
 							// if (debug)
 							// System.out.println(" found existing annotation "+a);
-							if ("#del".equals(a.getValue())) {
+							if ("#del".equals(a.getValue())) { //$NON-NLS-1$
 								toDelete = true;
 								// currentEndAnnotations.remove(a); // MAYBE NOT TO
 								// DO THIS HERE ?
 								if (debug) {
-									Log.finer(" force delete start annotation " + a);
+									Log.finer(" force delete start annotation " + a); //$NON-NLS-1$
 								}
 							}
 							else { // update existing annotation, no need to store
@@ -341,7 +342,7 @@
 								writeStartAnnotation(a);
 								toDelete = true;
 								if (debug) {
-									Log.finer(" update annotation " + a);
+									Log.finer(" update annotation " + a); //$NON-NLS-1$
 								}
 								currentEndAnnotations = annotationsToAddByEndPos.get(a.getEnd());// EL
 								// NO
@@ -351,7 +352,7 @@
 								// System.out.println(" shall we need to change annotation attribute : "+a.getValue()+
 								// " | currentEndAnnotations : "+currentEndAnnotations);
 								if (currentEndAnnotations == null) {
-									Log.warning(NLS.bind("Error: null pointer for end position of annotation {0}.", a));
+									Log.warning(NLS.bind(Messages.ErrorNPEForEndPositionOfAnnotationP0, a));
 								}
 								else {
 									currentEndAnnotations.remove(a);
@@ -369,9 +370,9 @@
 						
 						if (s_start != null && s_end != null && s_author != null && s_ref != null) {
 							if (a.getEnd() >= end) { // must write a
-								if (!"#del".equals(a.getValue())) {
+								if (!"#del".equals(a.getValue())) { //$NON-NLS-1$
 									if (debug) {
-										Log.finer(NLS.bind(" writing of start annotation {0}.", a));
+										Log.finer(NLS.bind(" writing of start annotation {0}.", a)); //$NON-NLS-1$
 									}
 									writeStartAnnotation(a);
 									
@@ -379,13 +380,13 @@
 								else {
 									toDelete = true;
 									if (debug) {
-										Log.finer(NLS.bind(" no writing of start annotation {0}.", a));
+										Log.finer(NLS.bind(" no writing of start annotation {0}.", a)); //$NON-NLS-1$
 									}
 									currentEndAnnotations = annotationsToAddByEndPos.get(a.getEnd());
 									// System.out.println(" shall we need to change annotation attribute : "+a.getValue()+
 									// " | currentEndAnnotations : "+currentEndAnnotations);
 									if (currentEndAnnotations == null) {
-										Log.warning(NLS.bind("Error: null pointer for end position of annotation {0}.", a));
+										Log.warning(NLS.bind(Messages.ErrorNPEForEndPositionOfAnnotationP0, a));
 									}
 									else {
 										currentEndAnnotations.remove(a);
@@ -441,14 +442,14 @@
 		// if (debug)
 		// System.out.println("----- "+localname+"@"+position_counter+" END ANNOT = "+currentEndAnnotations);
 		
-		if ("w".equals(localname)) {
+		if ("w".equals(localname)) { //$NON-NLS-1$
 			// System.out.println("W END");
 			
 			for (String type : currentTokenAnnotations.keySet()) {
 				try {
-					writer.writeStartElement("ana");
-					writer.writeAttribute("type", "#" + type);
-					writer.writeAttribute("resp", "#" + currentTokenAnnotations.get(type).getAnnotator()); // change
+					writer.writeStartElement("ana"); //$NON-NLS-1$
+					writer.writeAttribute("type", "#" + type); //$NON-NLS-1$ //$NON-NLS-2$
+					writer.writeAttribute("resp", "#" + currentTokenAnnotations.get(type).getAnnotator()); // change //$NON-NLS-1$ //$NON-NLS-2$
 					// resp
 					writer.writeCharacters(currentTokenAnnotations.get(type).getValue());
 					writer.writeEndElement();
@@ -469,9 +470,9 @@
 				for (Annotation a : currentEndAnnotations) {
 					// if (debug)
 					// System.out.println("=============== End annot : "+a);
-					if (!"#del".equals(a.getValue())) {
+					if (!"#del".equals(a.getValue())) { //$NON-NLS-1$
 						if (debug) {
-							Log.finer(" force write end annotation " + a);
+							Log.finer(" force write end annotation " + a); //$NON-NLS-1$
 						}
 						writeEndAnnotation(a);
 					} /*
@@ -485,13 +486,13 @@
 			
 			position_counter++;
 		}
-		else if ("form".equals(localname) && inW) {
+		else if ("form".equals(localname) && inW) { //$NON-NLS-1$
 			// if (!mustChangeAnaValue)
 			super.processEndElement();
 			mustChangeWordValue = false;
 			inForm = false;
 		}
-		else if ("ana".equals(localname) && inW) {
+		else if ("ana".equals(localname) && inW) { //$NON-NLS-1$
 			// if (!mustChangeAnaValue)
 			super.processEndElement();
 			inAna = false;
@@ -508,12 +509,12 @@
 					// if (debug)
 					// System.out.println(" found existing end annotation "+a);
 					
-					if ("#del".equals(a.getValue())) { // if
+					if ("#del".equals(a.getValue())) { // if //$NON-NLS-1$
 						// (!"#del".equals(a.getValue()))
 						// {
 						toDelete = true;
 						if (debug) {
-							Log.finer(" force delete end annotation " + a);
+							Log.finer(" force delete end annotation " + a); //$NON-NLS-1$
 						}
 					}
 					
@@ -538,12 +539,12 @@
 	
 	private void writeStartAnnotation(Annotation a) {
 		try {
-			writer.writeStartElement("txm:" + a.getType());
-			writer.writeAttribute("author", "" + a.getAnnotator());
-			writer.writeAttribute("ref", a.getValue());
-			writer.writeAttribute("date", Toolbox.dateformat.format(new Date()));
-			writer.writeAttribute("start", Integer.toString(a.getStart()));
-			writer.writeAttribute("end", Integer.toString(a.getEnd()));
+			writer.writeStartElement("txm:" + a.getType()); //$NON-NLS-1$
+			writer.writeAttribute("author", "" + a.getAnnotator()); //$NON-NLS-1$ //$NON-NLS-2$
+			writer.writeAttribute("ref", a.getValue()); //$NON-NLS-1$
+			writer.writeAttribute("date", Toolbox.dateformat.format(new Date())); //$NON-NLS-1$
+			writer.writeAttribute("start", Integer.toString(a.getStart())); //$NON-NLS-1$
+			writer.writeAttribute("end", Integer.toString(a.getEnd())); //$NON-NLS-1$
 		}
 		catch (XMLStreamException e) {
 			// TODO Auto-generated catch block
@@ -565,7 +566,7 @@
 	
 	public static ArrayList<Annotation> testAdding() {
 		
-		Annotation a1 = new Annotation("Actr", "Actr100", 15, 16);
+		Annotation a1 = new Annotation("Actr", "Actr100", 15, 16); //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		return annotations;
@@ -573,7 +574,7 @@
 	
 	public static ArrayList<Annotation> testAddingInclusive() {
 		
-		Annotation a1 = new Annotation("CoAc", "CoAc2093", 15, 19);
+		Annotation a1 = new Annotation("CoAc", "CoAc2093", 15, 19); //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		return annotations;
@@ -581,7 +582,7 @@
 	
 	public static ArrayList<Annotation> testAddingInclusive2() {
 		
-		Annotation a1 = new Annotation("Actr", "Actr100", 15, 16);
+		Annotation a1 = new Annotation("Actr", "Actr100", 15, 16); //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		return annotations;
@@ -589,15 +590,15 @@
 	
 	public static ArrayList<Annotation> testUpdating() {
 		
-		Annotation a1 = new Annotation("Actr", "Actr200", 15, 16);
+		Annotation a1 = new Annotation("Actr", "Actr200", 15, 16); //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		return annotations;
 	}
 	
 	public static ArrayList<Annotation> testUpdatingDeleting() {
-		Annotation a1 = new Annotation("Actr", "Actr200", 15, 16);
-		Annotation a2 = new Annotation("CoAc", "#del", 15, 19);
+		Annotation a1 = new Annotation("Actr", "Actr200", 15, 16); //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("CoAc", "#del", 15, 19); //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -605,8 +606,8 @@
 	}
 	
 	public static ArrayList<Annotation> testAddDeleting2() {
-		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE
-		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 19); // ADD
+		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 19); // ADD //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -614,9 +615,9 @@
 	}
 	
 	public static ArrayList<Annotation> testUpdatingDeletingAdding() {
-		Annotation a1 = new Annotation("Actr", "Actr200", 15, 16); // UPDATE
-		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 19); // ADD
-		Annotation a3 = new Annotation("CoAc", "#del", 15, 19);	// DELETE
+		Annotation a1 = new Annotation("Actr", "Actr200", 15, 16); // UPDATE //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 19); // ADD //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a3 = new Annotation("CoAc", "#del", 15, 19);	// DELETE //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -625,9 +626,9 @@
 	}
 	
 	public static ArrayList<Annotation> testUpdatingDeletingAdding2() {	// NOT WORKING
-		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE
-		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 19); // ADD same place as CoAc
-		Annotation a3 = new Annotation("CoAc", "CoAc2091", 15, 19); // UPDATE
+		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 19); // ADD same place as CoAc //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a3 = new Annotation("CoAc", "CoAc2091", 15, 19); // UPDATE //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -636,9 +637,9 @@
 	}
 	
 	public static ArrayList<Annotation> testUpdatingDeletingAdding3() {	// NOT WORKING
-		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE
-		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 16); // ADD same place as Actr
-		Annotation a3 = new Annotation("CoAc", "CoAc2091", 15, 19); // UPDATE
+		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 16); // ADD same place as Actr //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a3 = new Annotation("CoAc", "CoAc2091", 15, 19); // UPDATE //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -647,9 +648,9 @@
 	}
 	
 	public static ArrayList<Annotation> testUpdatingDeletingAdding4() {
-		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE
-		Annotation a2 = new Annotation("NaPl", "NaPl14554", 13, 20); // ADD Outside Actr and CoAc
-		Annotation a3 = new Annotation("CoAc", "CoAc2091", 15, 19); // UPDATE
+		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("NaPl", "NaPl14554", 13, 20); // ADD Outside Actr and CoAc //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a3 = new Annotation("CoAc", "CoAc2091", 15, 19); // UPDATE //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -658,9 +659,9 @@
 	}
 	
 	public static ArrayList<Annotation> testUpdatingDeletingAdding5() {
-		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE
-		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 16); // ADD
-		Annotation a3 = new Annotation("CoAc", "#del", 15, 19); // DELETE
+		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 16); // ADD //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a3 = new Annotation("CoAc", "#del", 15, 19); // DELETE //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -669,10 +670,10 @@
 	}
 	
 	public static ArrayList<Annotation> testUpdatingDeletingAdding6() {
-		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE
-		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 16); // ADD
-		Annotation a3 = new Annotation("CoAc", "#del", 15, 19); // DELETE
-		Annotation a4 = new Annotation("CoAc", "CoAc1", 15, 18); // DELETE
+		Annotation a1 = new Annotation("Actr", "#del", 15, 16); // DELETE //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("NaPl", "NaPl14554", 15, 16); // ADD //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a3 = new Annotation("CoAc", "#del", 15, 19); // DELETE //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a4 = new Annotation("CoAc", "CoAc1", 15, 18); // DELETE //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -682,8 +683,8 @@
 	}
 	
 	public static ArrayList<Annotation> testUpdatingInclusive() {
-		Annotation a1 = new Annotation("Actr", "Actr200", 15, 16);
-		Annotation a2 = new Annotation("CoAc", "CoAc321", 15, 19);
+		Annotation a1 = new Annotation("Actr", "Actr200", 15, 16); //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("CoAc", "CoAc321", 15, 19); //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -692,7 +693,7 @@
 	
 	public static ArrayList<Annotation> testDeleting() {
 		
-		Annotation a1 = new Annotation("Actr", "#del", 15, 16);
+		Annotation a1 = new Annotation("Actr", "#del", 15, 16); //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		return annotations;
@@ -700,8 +701,8 @@
 	
 	public static ArrayList<Annotation> testDeletingInclusive() {
 		
-		Annotation a1 = new Annotation("Actr", "#del", 15, 16);
-		Annotation a2 = new Annotation("CoAc", "#del", 15, 16);
+		Annotation a1 = new Annotation("Actr", "#del", 15, 16); //$NON-NLS-1$ //$NON-NLS-2$
+		Annotation a2 = new Annotation("CoAc", "#del", 15, 16); //$NON-NLS-1$ //$NON-NLS-2$
 		ArrayList<Annotation> annotations = new ArrayList<>();
 		annotations.add(a1);
 		annotations.add(a2);
@@ -753,92 +754,92 @@
 		switch (test) {
 			case 1:
 				// AnnotationWriter.ADD
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testAdding(); /// OK
 				break;
 			case 2:
 				// AnnotationWriter.UPDATE
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST2.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST2.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdating(); /// OK
 				break;
 			case 3:
 				// AnnotationWriter.DELETE
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST4.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST4.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testDeleting(); /// OK
 				break;
 			case 4:
 				// AnnotationWriter.ADD2
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST3.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST3.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testAddingInclusive(); /// OK
 				break;
 			case 5:
 				// AnnotationWriter.UPDATE2
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdating(); /// OK
 				break;
 			case 6:
 				// AnnotationWriter.DELETE2
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST6.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST6.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testDeleting();
 				break;
 			case 7:
 				// AnnotationWriter.DELETE3
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST6.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST6.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testDeletingInclusive();
 				break;
 			case 8:
 				// AnnotationWriter.DELETE4
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST7.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST7.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testDeletingInclusive();
 				break;
 			case 9:
 				// AnnotationWriter.ADD3
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST3bis.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST3bis.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testAddingInclusive2(); /// OK
 				break;
 			case 10:
 				// AnnotationWriter.UPDATE3
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdatingInclusive(); /// OK
 				break;
 			case 11:
 				// AnnotationWriter.UPDATEDELETE
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdatingDeleting(); /// OK
 				break;
 			case 12:
 				// AnnotationWriter.UPDATEDELETEADD
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdatingDeletingAdding(); /// NOT OK
 				break;
 			case 13:
 				// AnnotationWriter.UPDATEDELETEADD2
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdatingDeletingAdding2(); /// OK
 				break;
 			case 14:
 				// AnnotationWriter.UPDATEDELETEADD3
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdatingDeletingAdding3(); /// OK
 				break;
 			case 15:
 				// AnnotationWriter.UPDATEDELETEADD4 -- add 1 annotation over the 2 others
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdatingDeletingAdding4(); /// OK
 				break;
 			case 16:
 				// AnnotationWriter.UPDATEDELETEADD5 -- delete 2 annotations, add 1
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdatingDeletingAdding5(); /// OK
 				break;
 			case 17:
 				// AnnotationWriter.UPDATEDELETEADD6 -- delete 2 annotations, add 2
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testUpdatingDeletingAdding6(); /// NOT OK
 				break;
 			case 18:
 				// AnnotationWriter.ADDDELETE -- delete 1, add 1
-				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml");
+				xmlFile = new File(System.getProperty("user.home"), "TXM/corpora/TEST/TEST5.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 				annotations = testAddDeleting2(); /// OK
 				break;
 			//
@@ -848,13 +849,13 @@
 		
 		// no token annotations
 		AnnotationInjector annotationInjector = new AnnotationInjector(xmlFile, annotations, new ArrayList<Annotation>(), corpus_start_position, true);
-		File outfile = new File(xmlFile.getParentFile(), "result-" + xmlFile.getName());
+		File outfile = new File(xmlFile.getParentFile(), "result-" + xmlFile.getName()); //$NON-NLS-1$
 		if (annotationInjector.process(outfile)) {
 			if (!ValidateXml.test(outfile)) {
-				System.out.println("FAIL");
+				System.out.println("FAIL"); //$NON-NLS-1$
 			}
 			else {
-				System.out.println("SUCCESS ??");
+				System.out.println("SUCCESS ??"); //$NON-NLS-1$
 			}
 		}
 		
@@ -862,8 +863,8 @@
 	
 	public static void main(String[] args) {
 		try {
-			File xmlFile = new File(System.getProperty("user.home"), "TXM-0.8.3/corpora/XMLLINEBREAK/txm/XMLLINEBREAK/test.xml");
-			File outfile = new File(System.getProperty("user.home"), "TXM-0.8.3/corpora/XMLLINEBREAK/txm/XMLLINEBREAK/test-out.xml");
+			File xmlFile = new File(System.getProperty("user.home"), "TXM-0.8.3/corpora/XMLLINEBREAK/txm/XMLLINEBREAK/test.xml"); //$NON-NLS-1$ //$NON-NLS-2$
+			File outfile = new File(System.getProperty("user.home"), "TXM-0.8.3/corpora/XMLLINEBREAK/txm/XMLLINEBREAK/test-out.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 			
 			ArrayList<Annotation> segmentAnnotations = new ArrayList<>();
 			// int starts[] = { 3, 6 };
@@ -877,16 +878,16 @@
 			int positions[] = { 1, 2 };
 			int n = 1;
 			for (int p : positions) {
-				tokenAnnotations.add(new Annotation("frlemma", "" + (n++), p, p));
-				tokenAnnotations.add(new Annotation("frpos", "" + (n++), p, p));
+				tokenAnnotations.add(new Annotation("frlemma", "" + (n++), p, p)); //$NON-NLS-1$ //$NON-NLS-2$
+				tokenAnnotations.add(new Annotation("frpos", "" + (n++), p, p)); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 			
 			AnnotationInjector ai;
 			
 			ai = new AnnotationInjector(xmlFile, segmentAnnotations, tokenAnnotations, 0, true);
-			System.out.println("start processing...");
+			System.out.println("start processing..."); //$NON-NLS-1$
 			ai.process(outfile);
-			System.out.println("Done.");
+			System.out.println("Done."); //$NON-NLS-1$
 		}
 		catch (Exception e) {
 			e.printStackTrace();
