Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/FindUnusedKeys.java
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/FindUnusedKeys.java	(revision 1233)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/FindUnusedKeys.java	(revision 1234)
@@ -1,7 +1,7 @@
 package org.txm.rcp.translate.devtools;
 
 /**
- * Checks that all key defined in Messages.java are used in the source files.
+ * Checks that all key defined in Messages.java class of a bundle are used in the source files.
  * 
  * @author sjacquot
  *
Index: tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessages.java
===================================================================
--- tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessages.java	(revision 1233)
+++ tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessages.java	(revision 1234)
@@ -8,13 +8,13 @@
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
+import java.util.Map;
 import java.util.Properties;
 
+import org.apache.tools.ant.types.resources.First;
 import org.txm.utils.BiHashMap;
 import org.txm.utils.io.IOUtils;
 
@@ -29,8 +29,10 @@
 	
 	File projectDirectory;
 	File messageFile;
-	String encoding = "UTF-8";
+	public static String ENCODING = "UTF-8";
 	
+	public boolean debug = true;
+	
 	LinkedHashSet<String> messageKeys = new LinkedHashSet<String>();
 	HashMap<File, BiHashMap<String, String>> langs = new HashMap<File, BiHashMap<String, String>>();
 	BiHashMap<File, String> file2lang = new BiHashMap<File, String>();
@@ -57,14 +59,14 @@
 			BiHashMap<String, String> hash = langs.get(propFile);
 			
 			Properties props1 = new Properties();
-			props1.load(IOUtils.getReader(propFile, encoding));
+			props1.load(IOUtils.getReader(propFile, ENCODING));
 			for (Object k : props1.keySet()) {
 				hash.put(k.toString(), props1.get(k).toString());
 			}
 		}
 	
 		if (messageFile != null) {
-			BufferedReader reader2 = new BufferedReader(new InputStreamReader(new FileInputStream(messageFile), encoding));
+			BufferedReader reader2 = new BufferedReader(new InputStreamReader(new FileInputStream(messageFile), ENCODING));
 			String line2 = reader2.readLine();
 			while (line2 != null) {
 				line2 = line2.trim();
@@ -170,7 +172,7 @@
 				propFile.renameTo(oldFile);
 			}
 			
-			props.store(IOUtils.getWriter(propFile, encoding),  "TXM messages generated by the PluginMessages class");
+			props.store(IOUtils.getWriter(propFile, ENCODING),  "TXM messages generated by the PluginMessages class");
 		}
 		
 		// write message File
@@ -183,7 +185,7 @@
 		String name = getMessageName();
 		String classPackage = getMessageFullClassName().substring(0, getMessageFullClassName().length()- getMessageClassName().length());
 		
-		PrintWriter out = IOUtils.getWriter(messageFile, encoding);
+		PrintWriter out = IOUtils.getWriter(messageFile, ENCODING);
 		
 			// write start
 			out.println("package "+classPackage+";\n");
@@ -236,7 +238,7 @@
 	}
 	
 	
-    public void walk(File path, String fileExtension) {
+    public void getFilesUsingKey(File path, String fileExtension, String key, HashMap<File, String> files) {
 
 		File[] list = path.listFiles();
 
@@ -246,14 +248,25 @@
 
 		for (File f : list) {
 			if (f.isDirectory()) {
-				this.walk(f, fileExtension);
+				this.getFilesUsingKey(f, fileExtension, key, files);
 				// System.out.println( "Dir:" + f.getAbsoluteFile() );
 			}
 			else if (f.getName().endsWith(fileExtension)
-					//&& !f.equals(this.messageFile)
+					&& !f.equals(this.messageFile)
 					) {
+				//System.out.println("File: " + f.getAbsoluteFile());
 				
-				System.out.println("File: " + f.getAbsoluteFile());
+				ArrayList<String> lines = IOUtils.getLines(f, PluginMessages.ENCODING);
+				
+				for (String line : lines) {
+					//println ""+line
+					if(line.contains(key))	{
+						files.put(f, key);
+//						System.err.println("PluginMessages.walk(): file " + f + " contains key " + key);
+					};
+					
+				}
+				
 			}
 		}
     }
@@ -262,10 +275,30 @@
      * Returns all Java files using the specified message key.
      * @param key
      */
-	public void getFilesUsingKey(String key)	{
-		this.walk(this.projectDirectory, ".java");
+	public HashMap<File, String> getFilesUsingKey(String key)	{
+		HashMap<File, String> files = new HashMap<File, String>();
+		this.getFilesUsingKey(this.projectDirectory, ".java", key, files);
+		return files;
 	}
 	
+	
+	public ArrayList<String> findUnusedKeys()	{
+		ArrayList<String> unusedKeys = new ArrayList<String>();
+		for (String key : messageKeys) {
+
+			if(debug) {
+				System.out.println("PluginMessages.findUnsedKeys(): cheking key " + key + "...");
+			}
+			
+			HashMap<File, String> filesUsingKey = this.getFilesUsingKey(key);
+			if (filesUsingKey.isEmpty()) {
+				unusedKeys.add(key);
+			}
+		}
+		
+		return unusedKeys;
+	}
+	
 	/**
 	 * 
 	 * @param args
@@ -278,11 +311,25 @@
 		File messageFile = new File(projectFile, "src/java/org/txm/core/messages/TXMCoreMessages.java");
 		PluginMessages dict = new PluginMessages(projectFile, messageFile);
 		
+		// test to find files using the specified key
+		HashMap<File, String> files = dict.getFilesUsingKey("Base_5");
+		for (Map.Entry<File, String> entry : files.entrySet()) {
+		    System.out.println("find files using keys: file " + entry.getKey() + " contains key " + entry.getValue());
+		}
 		
-		//dict.getFilesUsingKey("test");
+		// test to find unused keys
+		ArrayList<String> unusedKeys = dict.findUnusedKeys();
+		for (int i = 0; i < unusedKeys.size(); i++) {
+			System.out.println("findUnusedKeys: key " + unusedKeys.get(i) + " is unused in project " + dict.getProjectDirectory() + " (main lang value = " + dict.getMessagesForLang("").get(unusedKeys.get(i)) + ")");	
+		}
 		
-		dict.summary();
+		
+		
+		
+		//dict.summary();
 		//dict.saveChanges();
+		
+		System.out.println("PluginMessages.main(): done.");
 	}
 
 	public BiHashMap<File, String> getFile2lang() {
