Révision 1247
| tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/WorkspaceMessagesManager.java (revision 1247) | ||
|---|---|---|
| 42 | 42 |
this(new File(System.getProperty("user.dir")).getParentFile());
|
| 43 | 43 |
} |
| 44 | 44 |
|
| 45 |
|
|
| 46 |
|
|
| 47 |
/** |
|
| 48 |
* |
|
| 49 |
* @param workspaceLocation |
|
| 50 |
* @throws UnsupportedEncodingException |
|
| 51 |
* @throws FileNotFoundException |
|
| 52 |
* @throws IOException |
|
| 53 |
*/ |
|
| 45 | 54 |
public WorkspaceMessagesManager(File workspaceLocation) throws UnsupportedEncodingException, FileNotFoundException, IOException {
|
| 46 | 55 |
|
| 47 | 56 |
this.workspaceLocation = workspaceLocation; |
| 48 | 57 |
|
| 49 |
//System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): workspace location = " + this.workspaceLocation);
|
|
| 58 |
System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): workspace location = " + this.workspaceLocation);
|
|
| 50 | 59 |
|
| 51 | 60 |
if (!workspaceLocation.exists()) return; |
| 52 | 61 |
if (!workspaceLocation.isDirectory()) return; |
| ... | ... | |
| 71 | 80 |
} |
| 72 | 81 |
} |
| 73 | 82 |
} |
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
this.createUsedKeysFilesIndex(); |
|
| 87 |
this.dumpUsedKeysFilesIndex(); |
|
| 88 |
|
|
| 89 |
|
|
| 90 |
System.out.println("WorkspaceMessagesManager.WorkspaceMessagesManager(): done.");
|
|
| 74 | 91 |
} |
| 75 |
|
|
| 92 |
|
|
| 93 |
/** |
|
| 94 |
* Dumps the index of the keys used and their associated files. |
|
| 95 |
*/ |
|
| 96 |
protected void dumpUsedKeysFilesIndex() {
|
|
| 97 |
System.out.println("WorkspaceMessagesManager.dumpUsedKeysIndex(): dumping used keys files index...");
|
|
| 98 |
|
|
| 99 |
for (Map.Entry<String, TreeSet<File>> entry : this.usedKeysFilesIndex.entrySet()) {
|
|
| 100 |
System.out.println("key: " + entry.getKey());
|
|
| 101 |
if(entry.getValue().isEmpty()) {
|
|
| 102 |
System.out.println(" file(s): -not used in any file of the workspace-");
|
|
| 103 |
} |
|
| 104 |
else {
|
|
| 105 |
for(File file : entry.getValue()) {
|
|
| 106 |
System.out.println(" file(s): " + file);
|
|
| 107 |
} |
|
| 108 |
} |
|
| 109 |
} |
|
| 110 |
} |
|
| 111 |
|
|
| 76 | 112 |
public LinkedHashMap<File, PluginMessages> getPluginMessages() {
|
| 77 | 113 |
return pluginsMessagesPerProject; |
| 78 | 114 |
} |
| ... | ... | |
| 111 | 147 |
|
| 112 | 148 |
String fullKeyName = pmManager.getKeyFullName(entry.getKey()); |
| 113 | 149 |
|
| 114 |
System.out.println("key: " + fullKeyName);
|
|
| 150 |
System.out.println("WorkspaceMessagesManager.createUsedKeysFilesIndex(): key added: " + fullKeyName);
|
|
| 115 | 151 |
|
| 116 | 152 |
if(this.usedKeysFilesIndex.containsKey(fullKeyName)) {
|
| 117 | 153 |
this.usedKeysFilesIndex.get(fullKeyName).addAll(entry.getValue()); |
Formats disponibles : Unified diff