|
Lines 88-108
Link Here
|
| 88 |
private boolean columnInVisibleArea(Rectangle clientArea, ViewerRow row, int colIndex) { |
88 |
private boolean columnInVisibleArea(Rectangle clientArea, ViewerRow row, int colIndex) { |
| 89 |
return row.getBounds(colIndex).x >= clientArea.x; |
89 |
return row.getBounds(colIndex).x >= clientArea.x; |
| 90 |
} |
90 |
} |
| 91 |
|
|
|
| 92 |
public ViewerCell getFocusCell() { |
| 93 |
ViewerCell cell = super.getFocusCell(); |
| 94 |
Table t = (Table) getViewer().getControl(); |
| 95 |
|
| 96 |
// It is possible that the selection has changed under the hood |
| 97 |
if (cell != null) { |
| 98 |
if (t.getSelection().length == 1 |
| 99 |
&& t.getSelection()[0] != cell.getItem()) { |
| 100 |
setFocusCell(getViewer().getViewerRowFromItem( |
| 101 |
t.getSelection()[0]).getCell(cell.getColumnIndex())); |
| 102 |
} |
| 103 |
} |
| 104 |
|
| 105 |
return super.getFocusCell(); |
| 106 |
} |
| 107 |
|
91 |
|
|
|
92 |
// RAP [if] 361052: Focused cell is not highlighted if navigating with CTRL + Arrow Up/Down |
| 93 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=361052 |
| 94 |
// public ViewerCell getFocusCell() { |
| 95 |
// ViewerCell cell = super.getFocusCell(); |
| 96 |
// Table t = (Table) getViewer().getControl(); |
| 97 |
// |
| 98 |
// // It is possible that the selection has changed under the hood |
| 99 |
// if (cell != null) { |
| 100 |
// if (t.getSelection().length == 1 |
| 101 |
// && t.getSelection()[0] != cell.getItem()) { |
| 102 |
// setFocusCell(getViewer().getViewerRowFromItem( |
| 103 |
// t.getSelection()[0]).getCell(cell.getColumnIndex())); |
| 104 |
// } |
| 105 |
// } |
| 106 |
// |
| 107 |
// return super.getFocusCell(); |
| 108 |
// } |
| 109 |
// RAPEND |
| 108 |
} |
110 |
} |