Révision 1524
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java (revision 1524) | ||
|---|---|---|
| 570 | 570 |
|
| 571 | 571 |
|
| 572 | 572 |
|
| 573 |
public static String withinAContextOf;
|
|
| 573 |
public static String withinAContextOf; |
|
| 574 | 574 |
|
| 575 | 575 |
|
| 576 |
|
|
| 577 |
public static String isDifferentFrom; |
|
| 578 |
|
|
| 579 |
|
|
| 576 | 580 |
|
| 577 | 581 |
static {
|
| 578 | 582 |
// initialize resource bundle |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties (revision 1524) | ||
|---|---|---|
| 481 | 481 |
aWord=a word |
| 482 | 482 |
aWordWithItsProperties=a word with properties |
| 483 | 483 |
removeTheLastWord=Remove the last word |
| 484 |
withinAContextOf=within a context of |
|
| 484 |
withinAContextOf=within a context of |
|
| 485 |
isDifferentFrom=is different from |
|
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties (revision 1524) | ||
|---|---|---|
| 482 | 482 |
aWord=un mot |
| 483 | 483 |
aWordWithItsProperties=un mot avec les propriétés |
| 484 | 484 |
removeTheLastWord=Retirer le dernier mot |
| 485 |
withinAContextOf=dans un context de |
|
| 485 |
withinAContextOf=dans un context de |
|
| 486 |
isDifferentFrom=est différent de |
|
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java (revision 1524) | ||
|---|---|---|
| 196 | 196 |
withinN.setToolTipText("context size");
|
| 197 | 197 |
withinN.setMinimum(1); |
| 198 | 198 |
withinN.setMaximum(200); |
| 199 |
withinN.setEnabled(false); |
|
| 199 | 200 |
|
| 200 | 201 |
structsCombo = new Combo(withinComposite, SWT.READ_ONLY); |
| 201 | 202 |
structsCombo.setToolTipText("The available contexts");
|
| ... | ... | |
| 407 | 408 |
testCombo.add(TXMUIMessages.startsWith); |
| 408 | 409 |
testCombo.add(TXMUIMessages.endsWith); |
| 409 | 410 |
testCombo.add(TXMUIMessages.contains); |
| 411 |
testCombo.add(TXMUIMessages.isDifferentFrom); |
|
| 410 | 412 |
testCombo.select(0); |
| 411 | 413 |
|
| 412 | 414 |
valueT = new Text(this, SWT.SINGLE | SWT.BORDER); |
| ... | ... | |
| 606 | 608 |
|
| 607 | 609 |
query += propCombo.getItem(propCombo.getSelectionIndex()); |
| 608 | 610 |
if (testCombo.getSelectionIndex() == 0)// equals |
| 609 |
query += "=\"" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
| 611 |
query += " = \"" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
| 610 | 612 |
else if (testCombo.getSelectionIndex() == 1)// starts with |
| 611 |
query += "=\"" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
| 613 |
query += " = \"" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
| 612 | 614 |
else if (testCombo.getSelectionIndex() == 2)// ends with |
| 613 |
query += "=\".*" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
| 615 |
query += " = \".*" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
| 614 | 616 |
else if (testCombo.getSelectionIndex() == 3)// contains |
| 615 |
query += "=\".*" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
| 616 |
|
|
| 617 |
query += " = \".*" + valueT.getText().replace("\"", "\\\"") + ".*\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
| 618 |
else if (testCombo.getSelectionIndex() == 4)// different from |
|
| 619 |
query += " != \"" + valueT.getText().replace("\"", "\\\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
| 617 | 620 |
nField++; |
| 618 | 621 |
} |
| 619 | 622 |
return query + "]"; //$NON-NLS-1$ |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java (revision 1524) | ||
|---|---|---|
| 1015 | 1015 |
} |
| 1016 | 1016 |
|
| 1017 | 1017 |
/** |
| 1018 |
* Called just before the Toolbox is initialized |
|
| 1019 |
*/ |
|
| 1020 |
private void callPreStartScript() {
|
|
| 1021 |
try {
|
|
| 1022 |
File startupScript = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/prestart.groovy");//$NON-NLS-1$ |
|
| 1023 |
|
|
| 1024 |
if (startupScript.exists() && startupScript.canRead()) {
|
|
| 1025 |
ExecuteGroovyScript.executeScript(startupScript.getAbsolutePath(), null, null, true, ""); |
|
| 1026 |
} |
|
| 1027 |
} catch(Exception e) {
|
|
| 1028 |
System.out.println(TXMCoreMessages.bind("Fail to execute 'start.groovy' script: {0}.", e));
|
|
| 1029 |
Log.printStackTrace(e); |
|
| 1030 |
} |
|
| 1031 |
} |
|
| 1032 |
|
|
| 1033 |
/** |
|
| 1018 | 1034 |
* Called just after Toolbox is initialized |
| 1019 | 1035 |
*/ |
| 1020 | 1036 |
private void callStartScript() {
|
| 1021 | 1037 |
try {
|
| 1022 |
File startupScript = new File(Toolbox.getTxmHomePath(), "scripts/user/start.groovy");//$NON-NLS-1$ |
|
| 1038 |
File startupScript = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/start.groovy");//$NON-NLS-1$ |
|
| 1039 |
|
|
| 1023 | 1040 |
if (startupScript.exists() && startupScript.canRead()) {
|
| 1024 | 1041 |
ExecuteGroovyScript.executeScript(startupScript.getAbsolutePath(), null, null, true, ""); |
| 1025 | 1042 |
} |
| ... | ... | |
| 1034 | 1051 |
*/ |
| 1035 | 1052 |
private void callStopScript() {
|
| 1036 | 1053 |
try {
|
| 1037 |
File stopScript = new File(Toolbox.getTxmHomePath(), "scripts/user/stop.groovy"); //$NON-NLS-1$ |
|
| 1054 |
File stopScript = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/stop.groovy"); //$NON-NLS-1$
|
|
| 1038 | 1055 |
if (stopScript.exists() && stopScript.canRead()) {
|
| 1039 | 1056 |
|
| 1040 | 1057 |
ExecuteGroovyScript.executeScript(stopScript.getAbsolutePath(), null, null, true, ""); |
| ... | ... | |
| 1074 | 1091 |
if (!Toolbox.isInitialized()) {
|
| 1075 | 1092 |
try {
|
| 1076 | 1093 |
monitor.worked(1); |
| 1094 |
|
|
| 1095 |
monitor.setTaskName("Calling Groovy prestart script...");
|
|
| 1096 |
callPreStartScript(); |
|
| 1097 |
|
|
| 1077 | 1098 |
monitor.setTaskName("Initializing Toolbox (engines and corpora)...");
|
| 1078 |
// init with Eclipse preference stores |
|
| 1079 |
|
|
| 1080 | 1099 |
if (Toolbox.initialize(TBXPreferences.class, monitor)) {
|
| 1081 | 1100 |
StatusLine.setMessage(TXMUIMessages.ready); |
| 1082 | 1101 |
System.out.println(TXMUIMessages.ready); |
Formats disponibles : Unified diff