Révision 1267
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/RemoveUnusedKeys.java (revision 1267) | ||
---|---|---|
4 | 4 |
import java.io.FileNotFoundException; |
5 | 5 |
import java.io.IOException; |
6 | 6 |
import java.io.UnsupportedEncodingException; |
7 |
import java.util.HashMap; |
|
8 | 7 |
import java.util.TreeMap; |
9 | 8 |
import java.util.TreeSet; |
10 | 9 |
|
... | ... | |
26 | 25 |
TreeMap<String, TreeSet<File>> usedKeys = wmm.getUsedKeysFilesIndex(); |
27 | 26 |
|
28 | 27 |
for (PluginMessages pm : wmm.getPluginMessages().values()) { |
28 |
|
|
29 | 29 |
for (String key : pm.getMessageKeys()) { |
30 |
if (!usedKeys.containsKey(key)) {
|
|
30 |
if (!usedKeys.containsKey(pm.getKeyFullName(key))) {
|
|
31 | 31 |
pm.removeKey(key); |
32 | 32 |
} |
33 | 33 |
} |
34 | 34 |
|
35 |
//pm.saveChanges();
|
|
35 |
pm.saveChanges(true);
|
|
36 | 36 |
} |
37 | 37 |
} |
38 | 38 |
} |
Formats disponibles : Unified diff