Révision 1147
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java (revision 1147) | ||
---|---|---|
518 | 518 |
* @param query |
519 | 519 |
*/ |
520 | 520 |
public void setQuery(String query) { |
521 |
// fix the query |
|
522 |
query = query.replaceAll("^\"(.*)\"$","$1"); //$NON-NLS-1$ |
|
521 | 523 |
assistedQueryWidget.setText(query); |
522 | 524 |
} |
523 | 525 |
|
... | ... | |
543 | 545 |
return this.queryExists(query, 0); |
544 | 546 |
} |
545 | 547 |
|
548 |
/** |
|
549 |
* Checks if the specified query already exists more than the specified max count. |
|
550 |
* @param query |
|
551 |
* @param maxCount |
|
552 |
* @return |
|
553 |
*/ |
|
546 | 554 |
protected boolean queryExists(String query, int maxCount) { |
547 | 555 |
int count = 0; |
548 | 556 |
for (int i = 0; i < queryWidgets.size(); i++) { |
549 |
if (queryWidgets.get(i).getRawString().equals(query)) { |
|
557 |
if (queryWidgets.get(i).getRawString().equals(query) || queryWidgets.get(i).getQuery().toString().equals(query)) {
|
|
550 | 558 |
count++; |
551 | 559 |
} |
552 | 560 |
} |
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java (revision 1147) | ||
---|---|---|
179 | 179 |
|
180 | 180 |
@Override |
181 | 181 |
public boolean hasParameterChanged(String key) { |
182 |
if (key.isEmpty()) { |
|
183 |
return false; |
|
184 |
} |
|
185 |
if (this.isChartDirty()) { |
|
186 |
return true; |
|
187 |
} |
|
188 |
|
|
182 | 189 |
HashMap<String, Object> lastParameters = this.lastParameters; |
183 | 190 |
if(this.parametersHistory.size() > 1) { |
184 | 191 |
lastParameters = this.parametersHistory.get(this.parametersHistory.size() - 2); |
tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java (revision 1147) | ||
---|---|---|
169 | 169 |
preferences.putBoolean(EXPORT_SHOW, false); |
170 | 170 |
|
171 | 171 |
preferences.putBoolean(SHOW_ALL_RESULT_NODES, false); |
172 |
preferences.putBoolean(AUTO_PERSISTENCE_ENABLED, true);
|
|
172 |
preferences.putBoolean(AUTO_PERSISTENCE_ENABLED, false);
|
|
173 | 173 |
} |
174 | 174 |
} |
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1147) | ||
---|---|---|
532 | 532 |
if (key.isEmpty()) { |
533 | 533 |
return false; |
534 | 534 |
} |
535 |
if (this.isDirty()) { |
|
536 |
return true; |
|
537 |
} |
|
538 |
|
|
535 | 539 |
Object lastValue = lastParameters.get(key); |
536 | 540 |
Object newValue = this.getParameter(key); |
537 | 541 |
if (lastValue == null) { |
tmp/org.txm.properties.core/src/org/txm/properties/core/functions/Properties.java (revision 1147) | ||
---|---|---|
70 | 70 |
|
71 | 71 |
// Numbers |
72 | 72 |
/** The T. */ |
73 |
int T = 0; // number of word
|
|
73 |
int numberOfWords = 0; // number of word
|
|
74 | 74 |
|
75 | 75 |
/** The N properties. */ |
76 | 76 |
int NProperties = 0; // number of word properties |
... | ... | |
177 | 177 |
} |
178 | 178 |
|
179 | 179 |
try { |
180 |
T = corpus.getSize();// corpus.getLexicon(corpus.getProperty("id")).nbrOfToken();
|
|
180 |
numberOfWords = corpus.getSize();// corpus.getLexicon(corpus.getProperty("id")).nbrOfToken();
|
|
181 | 181 |
} catch (CqiClientException e) { |
182 | 182 |
Log.severe(PropertiesCoreMessages.Properties_6 + corpus.getName() + PropertiesCoreMessages.Properties_8); |
183 | 183 |
Log.printStackTrace(e); |
... | ... | |
200 | 200 |
//propertiesCounts.put(p.getName(), size); |
201 | 201 |
//List<String> list = Arrays.asList(corpus.getLexicon(p).getForms(this.maxvalue)); |
202 | 202 |
|
203 |
int[] positions = new int[Math.min(pMaxPropertiesToDisplay, T)];
|
|
204 |
for(int i = 0 ; i < Math.min(pMaxPropertiesToDisplay, T) ; i++) {
|
|
203 |
int[] positions = new int[Math.min(pMaxPropertiesToDisplay, numberOfWords)];
|
|
204 |
for(int i = 0 ; i < Math.min(pMaxPropertiesToDisplay, numberOfWords) ; i++) {
|
|
205 | 205 |
positions[i] = i; |
206 | 206 |
} |
207 | 207 |
|
... | ... | |
301 | 301 |
|
302 | 302 |
// counts |
303 | 303 |
buff.append("<ul>\n"); //$NON-NLS-1$ |
304 |
buff.append("<li>" + PropertiesCoreMessages.Properties_7 + T + "</li>\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
304 |
buff.append("<li>" + PropertiesCoreMessages.Properties_7 + numberOfWords + "</li>\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
305 | 305 |
buff |
306 | 306 |
.append("<li>" + PropertiesCoreMessages.Properties_9 + (NProperties - 1) + "</li>\n"); //$NON-NLS-2$ //$NON-NLS-1$ |
307 | 307 |
buff.append("<li>" + PropertiesCoreMessages.Properties_16 + NStructures + "</li>\n"); //$NON-NLS-2$ //$NON-NLS-1$ |
... | ... | |
398 | 398 |
StringBuffer buff = new StringBuffer(); |
399 | 399 |
|
400 | 400 |
buff.append(PropertiesCoreMessages.Properties_40); |
401 |
buff.append(PropertiesCoreMessages.Properties_41 + String.format(Locale.FRANCE,"%,d", T) + "\n"); //$NON-NLS-1$
|
|
401 |
buff.append(PropertiesCoreMessages.Properties_41 + String.format(Locale.FRANCE,"%,d", numberOfWords) + "\n"); //$NON-NLS-1$
|
|
402 | 402 |
buff.append(PropertiesCoreMessages.Properties_43 + String.format("%,d", NProperties) + "\n"); //$NON-NLS-1$ |
403 | 403 |
/*for (String s : propertiesCounts.keySet()) |
404 | 404 |
if (!s.equals("id")) //$NON-NLS-1$ |
... | ... | |
476 | 476 |
* @return the t |
477 | 477 |
*/ |
478 | 478 |
public int getT() { |
479 |
return T;
|
|
479 |
return numberOfWords;
|
|
480 | 480 |
} |
481 | 481 |
|
482 | 482 |
/** |
... | ... | |
602 | 602 |
|
603 | 603 |
@Override |
604 | 604 |
public String getDetails() { |
605 |
return "" + T;
|
|
605 |
return "" + numberOfWords;
|
|
606 | 606 |
} |
607 | 607 |
|
608 | 608 |
@Override |
Formats disponibles : Unified diff