Révision 1282
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessagesManager.java (revision 1282) | ||
---|---|---|
452 | 452 |
} |
453 | 453 |
|
454 | 454 |
public String getMessageClassName() { |
455 |
if (javaMessageFile == null) return ""; |
|
455 | 456 |
return javaMessageFile.getName().substring(0, javaMessageFile.getName().length()-5); |
456 | 457 |
} |
457 | 458 |
|
458 | 459 |
public String getMessageFullClassName() { |
460 |
if (javaMessageFile == null) return ""; |
|
459 | 461 |
return javaMessageFile.getAbsolutePath().substring(javaMessageFile.getAbsolutePath().lastIndexOf("org/txm/"), javaMessageFile.getAbsolutePath().length()-5).replace("/", "."); |
460 | 462 |
} |
461 | 463 |
|
... | ... | |
463 | 465 |
* @return the XXXMessages.java class name without the 'Messages' part |
464 | 466 |
*/ |
465 | 467 |
public String getMessageName() { |
468 |
if (javaMessageFile == null) return ""; |
|
466 | 469 |
return javaMessageFile.getName().substring(0, javaMessageFile.getName().length()-5-8); |
467 | 470 |
} |
468 | 471 |
|
469 | 472 |
public String getMessageFullName() { |
473 |
if (javaMessageFile == null) return ""; |
|
470 | 474 |
return javaMessageFile.getAbsolutePath().substring(javaMessageFile.getAbsolutePath().lastIndexOf("org/txm/")+8, javaMessageFile.getAbsolutePath().length()-5-8).replace("/", "."); |
471 | 475 |
} |
472 | 476 |
|
tmp/org.txm.utils/src/org/txm/utils/io/IOUtils.java (revision 1282) | ||
---|---|---|
206 | 206 |
public static OutputStream getOutputStream(File file, boolean append) throws FileNotFoundException { |
207 | 207 |
return new BufferedOutputStream(new FileOutputStream(file, append)); |
208 | 208 |
} |
209 |
|
|
210 |
public static void replaceAll(File file, String oldKey, String string) throws IOException { |
|
211 |
String text = getText(file, "UTF-8"); |
|
212 |
IOUtils.write(file, text); |
|
213 |
} |
|
209 | 214 |
} |
Formats disponibles : Unified diff