Révision 3550
TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java (revision 3550) | ||
---|---|---|
350 | 350 |
unitColumn = new TableColumn(viewer.getTable(), SWT.LEFT); |
351 | 351 |
unitColumn.setText(TXMCoreMessages.common_units); |
352 | 352 |
unitColumn.setToolTipText(TXMCoreMessages.common_units); |
353 |
unitColumn.setWidth(200);
|
|
353 |
unitColumn.setWidth(300);
|
|
354 | 354 |
unitColumn.addSelectionListener(new SelectionListener() { |
355 | 355 |
|
356 | 356 |
@Override |
... | ... | |
422 | 422 |
|
423 | 423 |
// Register the context menu |
424 | 424 |
TXMEditor.initContextMenu(this.viewer.getTable(), this.getSite(), this.viewer); |
425 |
|
|
425 |
TXMEditor.packColumns(this.viewer); |
|
426 | 426 |
setFocus(); |
427 | 427 |
|
428 | 428 |
} |
... | ... | |
451 | 451 |
|
452 | 452 |
fillResultArea(); |
453 | 453 |
|
454 |
TXMEditor.packColumns(this.viewer); |
|
455 |
|
|
454 | 456 |
viewer.getTable().setFocus(); |
455 | 457 |
} |
456 | 458 |
|
TXM/trunk/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java (revision 3550) | ||
---|---|---|
1500 | 1500 |
this.queryWidget.memorize(); |
1501 | 1501 |
|
1502 | 1502 |
if (getResult().isDirty()) { // the result compute failed |
1503 |
|
|
1503 | 1504 |
SearchEngine se = getResult().getQuery().getSearchEngine(); |
1504 | 1505 |
if (se instanceof CQPSearchEngine) { |
1505 | 1506 |
try { |
... | ... | |
1515 | 1516 |
e1.printStackTrace(); |
1516 | 1517 |
} |
1517 | 1518 |
} |
1519 |
|
|
1520 |
fillDisplayArea(true); |
|
1518 | 1521 |
} else { |
1519 | 1522 |
if (queryWidgetInitBackground != null) queryWidget.setBackground(queryWidgetInitBackground); |
1520 | 1523 |
} |
TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java (revision 3550) | ||
---|---|---|
237 | 237 |
|
238 | 238 |
// finally we can 'try' to create the annotations \o/ |
239 | 239 |
try { |
240 |
System.out.println("CREATE ANNOTATIONS"); |
|
240 |
//System.out.println("CREATE ANNOTATIONS");
|
|
241 | 241 |
HashMap<Match, List<Annotation>> existingAnnots = annotManager.createAnnotations(type, value_to_add, matches, job); |
242 |
System.out.println("END OF CREATE ANNOTATIONS"); |
|
242 |
//System.out.println("END OF CREATE ANNOTATIONS");
|
|
243 | 243 |
// did we had problems ? |
244 | 244 |
if (existingAnnots != null && existingAnnots.size() > 0) { |
245 | 245 |
String message = NLS.bind(KRAnnotationUIMessages.couldNotAnnotateTheValueP0OnCertainSequences, value_to_add.getStandardName()); |
... | ... | |
283 | 283 |
@Override |
284 | 284 |
public void run() { |
285 | 285 |
try { |
286 |
System.out.println("REFRESH ANNOTATIONS"); |
|
286 |
//System.out.println("REFRESH ANNOTATIONS");
|
|
287 | 287 |
annotationColumn.setText("*" + annotations.getViewAnnotation().getName()); |
288 | 288 |
notifyStartOfRefresh(); |
289 |
System.out.println("END OF REFRESH ANNOTATIONS"); |
|
289 |
//System.out.println("END OF REFRESH ANNOTATIONS");
|
|
290 | 290 |
annotationColumnViewer.getViewer().refresh(); |
291 | 291 |
//editor.refresh(false); |
292 | 292 |
} |
TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotationsAndUpdateCorpus.java (revision 3550) | ||
---|---|---|
66 | 66 |
// System.out.println("DISPLAY="+Display.getDefault()); |
67 | 67 |
final Boolean[] doit = new Boolean[1]; |
68 | 68 |
doit[0] = true; |
69 |
|
|
70 |
final Boolean[] doupdateedition = new Boolean[1]; |
|
71 |
doupdateedition[0] = KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION); |
|
72 |
|
|
69 | 73 |
Display.getDefault().syncExec(new Runnable() { |
70 | 74 |
|
71 | 75 |
@Override |
... | ... | |
77 | 81 |
dialog.setDoUpdateEdition(KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION)); |
78 | 82 |
|
79 | 83 |
doit[0] = dialog.open() == Window.OK; |
84 |
doupdateedition[0] = dialog.getDoUpdateEdition(); |
|
80 | 85 |
} |
81 | 86 |
}); |
82 | 87 |
if (doit[0] == false) { |
... | ... | |
102 | 107 |
|
103 | 108 |
try { |
104 | 109 |
monitor.setTaskName("Updating corpus"); |
105 |
if (fcorpus != null && UpdateCorpus.update(fcorpus, false, KRAnnotationPreferences.getInstance().getBoolean(KRAnnotationPreferences.UPDATE_EDITION)) != null) {
|
|
110 |
if (fcorpus != null && UpdateCorpus.update(fcorpus, false, doupdateedition[0]) != null) {
|
|
106 | 111 |
monitor.worked(50); |
107 | 112 |
this.syncExec(new Runnable() { |
108 | 113 |
|
TXM/trunk/org.txm.treesearch.rcp/src/org/txm/treesearch/editor/TreeSearchEditor.java (revision 3550) | ||
---|---|---|
15 | 15 |
import org.eclipse.swt.widgets.Combo; |
16 | 16 |
import org.eclipse.swt.widgets.Composite; |
17 | 17 |
import org.eclipse.swt.widgets.Event; |
18 |
import org.eclipse.swt.widgets.Group; |
|
18 | 19 |
import org.eclipse.swt.widgets.Label; |
19 | 20 |
import org.eclipse.swt.widgets.Listener; |
20 | 21 |
import org.eclipse.swt.widgets.Spinner; |
... | ... | |
91 | 92 |
private Combo visuCombo; |
92 | 93 |
|
93 | 94 |
private Label visuLabel; |
95 |
|
|
96 |
private Label queryAreaLabel; |
|
94 | 97 |
|
95 | 98 |
@Override |
96 | 99 |
public void _createPartControl() { |
... | ... | |
203 | 206 |
line1.getLayout().horizontalSpacing = 5; |
204 | 207 |
line1.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true)); |
205 | 208 |
|
206 |
Label l = new Label(line1, SWT.NONE); |
|
207 |
l.setText(TXMUIMessages.query); // $NON-NLS-1$ |
|
208 |
l.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, false)); |
|
209 |
|
|
210 |
queryArea = new LargeQueryField(line1, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL, currentSelector.getQueryClass()); |
|
211 |
GridData queryAreaLayoutData = new GridData(GridData.FILL, GridData.FILL, true, true); |
|
212 |
queryAreaLayoutData.horizontalSpan = 12; |
|
213 |
queryAreaLayoutData.heightHint = 80; |
|
214 |
queryAreaLayoutData.minimumHeight = 80; |
|
215 |
queryArea.setLayoutData(queryAreaLayoutData); |
|
216 |
|
|
217 |
queryArea.addListener(SWT.KeyDown, new Listener() { |
|
218 |
|
|
219 |
@Override |
|
220 |
public void handleEvent(Event e) { |
|
221 |
|
|
222 |
if (e.stateMask == SWT.CTRL) { |
|
223 |
if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) { |
|
224 |
e.doit = false; |
|
225 |
compute(false); |
|
226 |
} |
|
227 |
} |
|
228 |
} |
|
229 |
}); |
|
230 |
|
|
231 | 209 |
// second line |
232 | 210 |
GLComposite line2 = new GLComposite(queryPanel, SWT.NONE, "line2"); |
233 | 211 |
line2.getLayout().numColumns = 4; |
... | ... | |
254 | 232 |
|
255 | 233 |
|
256 | 234 |
// bottom toolbar |
257 |
GLComposite navigationAreaComposite = getBottomToolbar().installGLComposite(ConcordanceUIMessages.navigation, 10, false); |
|
235 |
|
|
236 |
GLComposite navigationAreaComposite = getBottomToolbar().installGLComposite(ConcordanceUIMessages.navigation, 12, false); |
|
258 | 237 |
navigationAreaComposite.getLayout().verticalSpacing = 5; |
259 | 238 |
navigationAreaComposite.getLayout().horizontalSpacing = 5; |
260 | 239 |
navigationAreaComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); |
261 | 240 |
|
241 |
Button search = new Button(navigationAreaComposite, SWT.PUSH); |
|
242 |
search.setImage(IImageKeys.getImage(IImageKeys.ACTION_SEARCH)); |
|
243 |
search.addSelectionListener(new SelectionListener() { |
|
244 |
|
|
245 |
@Override |
|
246 |
public void widgetSelected(SelectionEvent e) { |
|
247 |
|
|
248 |
GridData queryAreaLayoutData = (GridData) queryArea.getLayoutData(); |
|
249 |
if (queryArea.isVisible()) { // need to close |
|
250 |
search.setImage(IImageKeys.getImage(IImageKeys.ACTION_SEARCH)); |
|
251 |
queryArea.setVisible(false); |
|
252 |
queryAreaLabel.setVisible(false); |
|
253 |
queryAreaLayoutData.heightHint = 0; |
|
254 |
queryAreaLayoutData.minimumHeight = 0; |
|
255 |
queryAreaLayoutData.grabExcessVerticalSpace = false; |
|
256 |
queryAreaLayoutData.grabExcessHorizontalSpace = false; |
|
257 |
} else { |
|
258 |
search.setImage(IImageKeys.getImage(IImageKeys.ACTION_DELETE)); |
|
259 |
queryArea.setVisible(true); |
|
260 |
queryAreaLabel.setVisible(true); |
|
261 |
queryAreaLayoutData.heightHint = 80; |
|
262 |
queryAreaLayoutData.minimumHeight = 80; |
|
263 |
queryAreaLayoutData.grabExcessVerticalSpace = true; |
|
264 |
queryAreaLayoutData.grabExcessHorizontalSpace = true; |
|
265 |
} |
|
266 |
navigationAreaComposite.getParent().getParent().layout(); |
|
267 |
} |
|
268 |
|
|
269 |
@Override |
|
270 |
public void widgetDefaultSelected(SelectionEvent e) { } |
|
271 |
}); |
|
272 |
queryAreaLabel = new Label(navigationAreaComposite, SWT.NONE); |
|
273 |
queryAreaLabel.setText(TXMUIMessages.query); //$NON-NLS-1$ |
|
274 |
queryAreaLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false)); |
|
275 |
queryAreaLabel.setVisible(false); |
|
276 |
|
|
277 |
queryArea = new LargeQueryField(navigationAreaComposite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL, currentSelector.getQueryClass()); |
|
278 |
GridData queryAreaLayoutData = new GridData(GridData.FILL, GridData.FILL, true, true); |
|
279 |
queryAreaLayoutData.horizontalSpan = 2; |
|
280 |
queryAreaLayoutData.heightHint = 80; |
|
281 |
queryAreaLayoutData.minimumHeight = 80; |
|
282 |
queryArea.setLayoutData(queryAreaLayoutData); |
|
283 |
queryArea.setVisible(false); |
|
284 |
|
|
285 |
queryArea.addListener(SWT.KeyDown, new Listener() { |
|
286 |
|
|
287 |
@Override |
|
288 |
public void handleEvent(Event e) { |
|
289 |
|
|
290 |
if (e.stateMask == SWT.CTRL) { |
|
291 |
if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) { |
|
292 |
e.doit = false; |
|
293 |
compute(false); |
|
294 |
} |
|
295 |
} |
|
296 |
} |
|
297 |
}); |
|
298 |
|
|
262 | 299 |
// fill param Area |
263 | 300 |
Label l3 = new Label(navigationAreaComposite, SWT.NONE); |
264 | 301 |
l3.setText("Match "); //$NON-NLS-1$ |
TXM/trunk/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java (revision 3550) | ||
---|---|---|
335 | 335 |
this.queryResult = pQueryResult; |
336 | 336 |
} |
337 | 337 |
else { |
338 |
this.queryResult = pQuery.getSearchEngine().query(this.getCorpus(), pQuery, pQuery.getQueryString().replace(" ", "_") + "_concordance", true); |
|
338 |
try { |
|
339 |
this.queryResult = pQuery.getSearchEngine().query(this.getCorpus(), pQuery, pQuery.getQueryString().replace(" ", "_") + "_concordance", true); |
|
340 |
} catch (Exception e) { |
|
341 |
this.nLines = 0; |
|
342 |
this.pTopIndex = 0; |
|
343 |
this.lines = new ArrayList<>(); |
|
344 |
Log.warning("** CQP error: "+e.getMessage()); |
|
345 |
Log.printStackTrace(e); |
|
346 |
return false; |
|
347 |
} |
|
339 | 348 |
// this.queryResult = this.getCorpus().query(pQuery, pQuery.getQueryString().replace(" ", "_") + "_concordance", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
340 | 349 |
} |
341 | 350 |
|
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 3550) | ||
---|---|---|
994 | 994 |
notifyExtensions("notifyStartOfCompute"); //$NON-NLS-1$ |
995 | 995 |
|
996 | 996 |
if (!TXMEditor.this.getResult().compute(subMonitor.split(50))) { |
997 |
Log.info("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": computing failed."); //$NON-NLS-1$ //$NON-NLS-2$
|
|
997 |
Log.fine("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": computing failed."); //$NON-NLS-1$ //$NON-NLS-2$
|
|
998 | 998 |
} |
999 | 999 |
|
1000 | 1000 |
notifyExtensions("notifyEndOfCompute"); //$NON-NLS-1$ |
... | ... | |
1771 | 1771 |
Font font = viewer.getTable().getFont(); |
1772 | 1772 |
FontData fd = font.getFontData()[0]; |
1773 | 1773 |
|
1774 |
float W = fd.height * 0.45f;
|
|
1774 |
float W = fd.height * 0.55f;
|
|
1775 | 1775 |
|
1776 | 1776 |
// set width of each column |
1777 | 1777 |
for (int i = 0 ; i < ncolumns ; i++) { |
Formats disponibles : Unified diff