Révision 2092
tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInFileMacro.groovy (revision 2092) | ||
---|---|---|
51 | 51 |
|
52 | 52 |
if (!ParametersDialog.open(this)) return; |
53 | 53 |
|
54 |
replaceWith = org.apache.commons.lang.StringEscapeUtils.unescapeJava(replaceWith) |
|
55 |
|
|
54 | 56 |
println "SearchAndReplace in $file" |
55 | 57 |
|
56 | 58 |
def tmp = File.createTempFile("SearchReplaceInDirectoryTemp", ".tmp", file.getParentFile()) // create temporary file |
tmp/org.txm.groovy.core/src/groovy/org/txm/macro/txt/SearchReplaceInDirectoryMacro.groovy (revision 2092) | ||
---|---|---|
56 | 56 |
|
57 | 57 |
if (!ParametersDialog.open(this)) return; |
58 | 58 |
|
59 |
replaceWith = org.apache.commons.lang.StringEscapeUtils.unescapeJava(replaceWith) |
|
60 |
|
|
59 | 61 |
println "Working with $inputDirectory files with extension="+/.*$extension/ |
60 | 62 |
if (showMatchingFilesOnly) { |
61 | 63 |
println "Search '$find'" |
tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/conversion/CorpusRuledConvertion.java (revision 2092) | ||
---|---|---|
11 | 11 |
|
12 | 12 |
import org.apache.commons.lang.StringUtils; |
13 | 13 |
import org.txm.Toolbox; |
14 |
import org.txm.core.preferences.TBXPreferences; |
|
15 | 14 |
import org.txm.searchengine.cqp.corpus.MainCorpus; |
16 | 15 |
import org.txm.utils.ConsoleProgressBar; |
17 | 16 |
import org.txm.utils.io.IOUtils; |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java (revision 2092) | ||
---|---|---|
530 | 530 |
|
531 | 531 |
installPreferenceRestored = false; // reset and finally set true if the process ended correctly |
532 | 532 |
|
533 |
try { |
|
533 | 534 |
Display.getDefault().syncExec(new Runnable() { |
534 | 535 |
@Override |
535 | 536 |
public void run() { OpenWelcomePage.openWelcomePage(); } |
536 | 537 |
}); |
537 |
|
|
538 |
} catch(Exception e2) {} |
|
539 |
|
|
538 | 540 |
// set the install directory preference |
539 | 541 |
String installpath = Platform.getInstallLocation().getURL().getFile(); // the TXM.exe file path |
540 | 542 |
File installDirectory = new File(installpath); |
... | ... | |
585 | 587 |
|
586 | 588 |
TBXPreferences.getInstance().put(TBXPreferences.INSTALL_DIR, installDirectory.getAbsolutePath()); |
587 | 589 |
TBXPreferences.getInstance().flush(); |
588 |
TXMPreferences.saveAll(); |
|
589 | 590 |
return true; |
590 | 591 |
} |
591 | 592 |
} catch (Exception e) { |
592 |
System.err.println(TXMCoreMessages.bind(TXMUIMessages.couldNotReadInstallPreferencesFile, e.getLocalizedMessage()));
|
|
593 |
Log.severe(TXMCoreMessages.bind(TXMUIMessages.couldNotReadInstallPreferencesFile, e));
|
|
593 | 594 |
Log.printStackTrace(e); |
594 | 595 |
return false; |
595 | 596 |
} |
tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/export/URSAnnotationTEIExporter.java (revision 2092) | ||
---|---|---|
423 | 423 |
@Override |
424 | 424 |
public int compare(Schema s1, Schema s2) { |
425 | 425 |
Unite u1 = s1.getUnite0(); |
426 |
Unite u2 = s2.getUnite0(); |
|
427 |
|
|
428 |
if (u1 == null && u2 == null) return 0; |
|
426 | 429 |
if (u1 == null) return -1; |
427 |
Unite u2 = s2.getUnite0(); |
|
428 | 430 |
if (u2 == null) return 1; |
431 |
|
|
429 | 432 |
if (u1.getDeb() < u2.getDeb()) return -1; |
430 | 433 |
if (u1.getDeb() > u2.getDeb()) return 1; |
434 |
|
|
435 |
// u1.deb == u2.deb |
|
431 | 436 |
if (u1.getFin() < u2.getFin()) return -1; |
432 | 437 |
if (u1.getFin() > u2.getFin()) return 1; |
438 |
|
|
433 | 439 |
return 0; |
434 | 440 |
} |
435 | 441 |
}); |
Formats disponibles : Unified diff