Revision 1248

tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/WorkspaceMessagesManager.java (revision 1248)
86 86
		this.createUsedKeysFilesIndex();
87 87
		this.dumpUsedKeysFilesIndex();
88 88
		
89
		
89
		// Log summary
90
		System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): ------------------ process summary --------------------------------------------------------------");
91
		System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): numbers of projects: " + this.pluginsMessagesPerProject.size() + ".");
92
		System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): numbers of used keys: " + this.usedKeysFilesIndex.size() + ".");
93
		System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): numbers of unused keys: " + PluginMessages.getUnusedKeys(this.usedKeysFilesIndex, true).size() + ".");
90 94
		System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): done.");
91 95
	}
92 96

  
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessages.java (revision 1248)
238 238
	 * @return a sorted list containing all unused keys
239 239
	 */
240 240
	public ArrayList<String> getUnusedKeys()	{
241
		return getUnusedKeys(usedKeysFilesIndex, debug);
242
	}
243

  
244
	/**
245
	 * Returns the keys of all messages that are not used in the used key files index.
246
	 * @param usedKeysFilesIndex
247
	 * @return a sorted list containing all unused keys
248
	 */
249
	public static ArrayList<String> getUnusedKeys(HashMap<String, TreeSet<File>> usedKeysFilesIndex, boolean debug)	{
241 250
		ArrayList<String> unusedKeys = new ArrayList<String>();
242
		for (Map.Entry<String, TreeSet<File>> entry : this.usedKeysFilesIndex.entrySet()) {
251
		for (Map.Entry<String, TreeSet<File>> entry : usedKeysFilesIndex.entrySet()) {
243 252
		    if(entry.getValue().isEmpty())	{
244 253
		    	
245 254
		    	if(debug)	{
246
		    		System.out.println("PluginMessages.findUnusedKeys(): unused key found: " + entry.getKey() + ".");
255
		    		System.out.println("PluginMessages.getUnusedKeys(): unused key found: " + entry.getKey() + ".");
247 256
		    	}
248 257
		    	
249 258
		    	unusedKeys.add(entry.getKey());
......
253 262
		Collections.sort(unusedKeys);
254 263
		return unusedKeys;
255 264
	}
256

  
265
	
257 266
	/**
258 267
	 * Gets the map of the messages keys and values for the specified language.
259 268
	 * @param lang

Also available in: Unified diff