Révision 3602
TXM/trunk/org.txm.progression.rcp/src/org/txm/progression/rcp/chartsengine/events/ProgressionEventCallBack.java (revision 3602) | ||
---|---|---|
309 | 309 |
*/ |
310 | 310 |
public void updateLinkedConcordanceEditor(final ConcordanceEditor linkedEditor, final ArrayList<Integer> selectedPointPositions, boolean loadLines) { |
311 | 311 |
|
312 |
final TableViewer tableViewer = linkedEditor.getLineTableViewer(); |
|
312 |
final TableViewer linesTableViewer = linkedEditor.getLineTableViewer(); |
|
313 |
final TableViewer refTableViewer = linkedEditor.getReferenceTableViewer(); |
|
313 | 314 |
|
314 |
if (tableViewer.getTable().isDisposed()) {
|
|
315 |
if (linesTableViewer.getTable().isDisposed()) {
|
|
315 | 316 |
return; |
316 | 317 |
} |
317 | 318 |
|
... | ... | |
354 | 355 |
|
355 | 356 |
final int selectedPointInTableRange = lineIndex - top; |
356 | 357 |
|
357 |
tableViewer.getControl().getDisplay().asyncExec(new Runnable() {
|
|
358 |
linesTableViewer.getControl().getDisplay().asyncExec(new Runnable() {
|
|
358 | 359 |
|
359 | 360 |
@Override |
360 | 361 |
public void run() { |
361 |
tableViewer.getTable().deselectAll(); |
|
362 |
linesTableViewer.getTable().deselectAll(); |
|
363 |
refTableViewer.getTable().deselectAll(); |
|
362 | 364 |
|
363 |
Object line = tableViewer.getElementAt(selectedPointInTableRange); |
|
364 |
if (line != null) { |
|
365 |
tableViewer.setSelection(new StructuredSelection(line), true); |
|
365 |
Object line = linesTableViewer.getElementAt(selectedPointInTableRange); |
|
366 |
Object refLine = refTableViewer.getElementAt(selectedPointInTableRange); |
|
367 |
if (line != null && refLine != null) { |
|
368 |
refTableViewer.setSelection(new StructuredSelection(refLine), false); |
|
369 |
linesTableViewer.setSelection(new StructuredSelection(line), true); |
|
370 |
|
|
366 | 371 |
// FIXME: commented because the set top index makes the read of the table difficult |
367 | 372 |
// tableViewer.getTable().setTopIndex(selectedPointInTableRange); |
368 | 373 |
Log.finest("ProgressionEventCallBack.updateLinkedConcordanceEditor(...).new Runnable() {...}.run(): Selecting progression point (" + selectedPointInTableRange + " / " //$NON-NLS-1$ //$NON-NLS-2$ |
369 |
+ tableViewer.getTable().getItemCount() + ") in the linked Concordance table."); //$NON-NLS-1$
|
|
374 |
+ linesTableViewer.getTable().getItemCount() + ") in the linked Concordance table."); //$NON-NLS-1$
|
|
370 | 375 |
} |
371 | 376 |
else { |
372 | 377 |
Log.finest("ProgressionEventCallBack.updateLinkedConcordanceEditor(...).new Runnable() {...}.run(): Selected progression point (" + selectedPointInTableRange + " / " //$NON-NLS-1$ //$NON-NLS-2$ |
373 |
+ tableViewer.getTable().getItemCount() + ") doesn't exist in the linked Concordance table."); //$NON-NLS-1$
|
|
378 |
+ linesTableViewer.getTable().getItemCount() + ") doesn't exist in the linked Concordance table."); //$NON-NLS-1$
|
|
374 | 379 |
} |
375 | 380 |
} |
376 | 381 |
}); |
377 | 382 |
} |
378 | 383 |
else { |
379 |
tableViewer.getTable().deselectAll();
|
|
384 |
linesTableViewer.getTable().deselectAll();
|
|
380 | 385 |
} |
381 | 386 |
} |
382 | 387 |
|
Formats disponibles : Unified diff