Révision 1277
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/RemoveUnusedKeys.java (revision 1277) | ||
---|---|---|
23 | 23 |
WorkspaceMessagesManager wmm = new WorkspaceMessagesManager(); |
24 | 24 |
|
25 | 25 |
TreeMap<String, TreeSet<File>> usedKeys = wmm.getUsedKeysFilesIndex(); |
26 |
//System.out.println("all keys: "+usedKeys.keySet());
|
|
26 |
System.out.println("all keys: "+usedKeys.keySet()); |
|
27 | 27 |
int total = 0; |
28 | 28 |
for (PluginMessagesManager pm : wmm.getPluginMessages().values()) { |
29 | 29 |
//System.out.println("pm keys: "+pm.getProjectDirectory()+" "+pm.getUsedKeysFilesIndex().keySet()); |
... | ... | |
42 | 42 |
|
43 | 43 |
if (n > 0) { |
44 | 44 |
System.out.println(pm.getMessageFullName()+" "+n+" key removed: "+removedKeys); |
45 |
pm.saveChanges(true); |
|
45 |
//pm.saveChanges(true);
|
|
46 | 46 |
total += n; |
47 | 47 |
} |
48 | 48 |
} |
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/WorkspaceMessagesManager.java (revision 1277) | ||
---|---|---|
45 | 45 |
/** |
46 | 46 |
* Generic Regex to find keys in source files |
47 | 47 |
*/ |
48 |
public static final Pattern KEY_REGEX = Pattern.compile("[A-Z][a-zA-Z0-9]+Messages\\.[a-zA-Z0-9_]+");
|
|
48 |
public static final Pattern KEY_REGEX = Pattern.compile("(?:[A-Z][a-zA-Z0-9]+)?Messages\\.[a-zA-Z0-9_]+");
|
|
49 | 49 |
|
50 | 50 |
/** |
51 | 51 |
* Generic Regex to find Strings in source files. Warning the "\"" strings are not found. |
Formats disponibles : Unified diff