Révision 2276
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/ConcordanceEditor.java (revision 2276) | ||
---|---|---|
325 | 325 |
|
326 | 326 |
super.init(site, input); |
327 | 327 |
|
328 |
if (!(this.result instanceof Concordance)) { throw new PartInitException(ConcordanceUIMessages.bind(ConcordanceUIMessages.canNotOpenConcordanceEditorWithP0, result)); } |
|
328 |
if (!(this.result instanceof Concordance)) { |
|
329 |
throw new PartInitException(ConcordanceUIMessages.bind(ConcordanceUIMessages.canNotOpenConcordanceEditorWithP0, result)); |
|
330 |
} |
|
329 | 331 |
this.concordance = (Concordance) this.result; |
330 | 332 |
|
331 | 333 |
this.standardComparators = new ArrayList<LineComparator>(); |
... | ... | |
427 | 429 |
} |
428 | 430 |
}); |
429 | 431 |
viewerRight = new TableViewer(displayArea, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER |
430 |
// | SWT.VIRTUAL
|
|
431 |
);
|
|
432 |
// | SWT.VIRTUAL |
|
433 |
); |
|
432 | 434 |
|
433 | 435 |
// viewer.setLabelProvider(new LineLabelProvider(this)); |
434 | 436 |
viewerRight.setContentProvider(new ConcordancesProvider()); |
... | ... | |
473 | 475 |
@Override |
474 | 476 |
public void keyPressed(KeyEvent e) { |
475 | 477 |
|
476 |
if (e.keyCode != SWT.DEL) { return; } |
|
478 |
if (e.keyCode != SWT.DEL) { |
|
479 |
return; |
|
480 |
} |
|
477 | 481 |
DeleteLines.deleteConcordanceLines(ConcordanceEditor.this); |
478 | 482 |
} |
479 | 483 |
}; |
... | ... | |
866 | 870 |
*/ |
867 | 871 |
public void fillDisplayArea(boolean update) { |
868 | 872 |
|
869 |
if (viewerRight == null) { return; } |
|
873 |
if (viewerRight == null) { |
|
874 |
return; |
|
875 |
} |
|
870 | 876 |
|
871 | 877 |
int from = concordance.getTopIndex(); |
872 | 878 |
from = Math.max(from, 0); |
... | ... | |
2128 | 2134 |
IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(BACKTOTEXT_COMMAND_ID); |
2129 | 2135 |
for (IConfigurationElement e : config) { |
2130 | 2136 |
Object o = e.createExecutableExtension("class"); // //$NON-NLS-1$ |
2131 |
if (o instanceof BackToTextCommand) { return ((BackToTextCommand) o).backToText(this, line.getMatch()); } |
|
2137 |
if (o instanceof BackToTextCommand) { |
|
2138 |
return ((BackToTextCommand) o).backToText(this, line.getMatch()); |
|
2139 |
} |
|
2132 | 2140 |
} |
2133 | 2141 |
} |
2134 | 2142 |
catch (CoreException e1) { |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 2276) | ||
---|---|---|
362 | 362 |
*/ |
363 | 363 |
public Shell getShell() { |
364 | 364 |
|
365 |
if (parent != null && !parent.isDisposed()) { return parent.getShell(); } |
|
365 |
if (parent != null && !parent.isDisposed()) { |
|
366 |
return parent.getShell(); |
|
367 |
} |
|
366 | 368 |
return Display.getDefault().getActiveShell(); |
367 | 369 |
} |
368 | 370 |
|
... | ... | |
886 | 888 |
|
887 | 889 |
this.runInit(monitor); |
888 | 890 |
|
889 |
if (isLocked()) { return Status.CANCEL_STATUS; } |
|
891 |
if (isLocked()) { |
|
892 |
return Status.CANCEL_STATUS; |
|
893 |
} |
|
890 | 894 |
|
891 | 895 |
try { |
892 | 896 |
JobsTimer.start(); |
... | ... | |
948 | 952 |
} |
949 | 953 |
}); |
950 | 954 |
|
951 |
if (this.isCanceled()) { return Status.CANCEL_STATUS; } |
|
955 |
if (this.isCanceled()) { |
|
956 |
return Status.CANCEL_STATUS; |
|
957 |
} |
|
952 | 958 |
|
953 | 959 |
// computing result |
954 | 960 |
monitor.beginTask(TXMUIMessages.computing_3, 100); |
... | ... | |
1095 | 1101 |
if (this.parent.isDisposed()) return; // nothing to refresh |
1096 | 1102 |
|
1097 | 1103 |
// skip refresh if the part creation has failed |
1098 |
if (!createPartControlDoneSucessfully) { return; } |
|
1104 |
if (!createPartControlDoneSucessfully) { |
|
1105 |
return; |
|
1106 |
} |
|
1099 | 1107 |
|
1100 | 1108 |
// this.parent.setRedraw(false); |
1101 | 1109 |
|
... | ... | |
1676 | 1684 |
for (int i = 0; i < table.getColumnCount(); i++) { |
1677 | 1685 |
TableColumn col = table.getColumn(i); |
1678 | 1686 |
sumWidthColumn += col.getWidth(); |
1679 |
if (x < sumWidthColumn) { return i; } |
|
1687 |
if (x < sumWidthColumn) { |
|
1688 |
return i; |
|
1689 |
} |
|
1680 | 1690 |
} |
1681 | 1691 |
|
1682 | 1692 |
return -1; |
Formats disponibles : Unified diff