Permalink
Browse files

Non-sprint Task: Fix for http://bugs.eclipse.org/396594

  • Loading branch information...
1 parent ec6d975 commit b6aa52329670f8f3db9725165e4482eef44bc96e Marvin Mueller committed Dec 14, 2012
@@ -155,9 +155,11 @@ public void gdSelectCell(final String row, final String rowOperator,
}
Rectangle cellBounds;
+ Object source = getRealTable();
//if row is header and col is existing
if (implRow == -1 && implCol > -1) {
cellBounds = adapter.getHeaderBounds(implCol);
+ source = adapter.getTableHeader();
} else {
cellBounds = adapter.scrollCellToVisible(implRow, implCol);
}
@@ -170,7 +172,7 @@ public void gdSelectCell(final String row, final String rowOperator,
getRobot().keyPress(getRealTable(),
getExtendSelectionModifier());
}
- getRobot().click(getRealTable(), o, clickOptions,
+ getRobot().click(source, o, clickOptions,
xPos, xUnits.equalsIgnoreCase(POS_UNIT_PIXEL),
yPos, yUnits.equalsIgnoreCase(POS_UNIT_PIXEL));
} finally {
@@ -123,6 +123,12 @@
*/
public Rectangle scrollCellToVisible (int row , int col)
throws StepExecutionException;
+
+ /**
+ * @return the TableHeader if there is one,otherwise
+ * the table is returned.
+ */
+ public Object getTableHeader();
}
@@ -231,12 +231,12 @@ public Object run() throws StepExecutionException {
/**
* {@inheritDoc}
*/
- public Rectangle getHeaderBounds(int col) {
+ public Rectangle getHeaderBounds(final int col) {
Rectangle returnvalue = (Rectangle) getEventThreadQueuer()
.invokeAndWait("getHeaderBounds", //$NON-NLS-1$
new IRunnable() {
public Object run() throws StepExecutionException {
- return m_table.getTableHeader().getBounds();
+ return m_table.getTableHeader().getHeaderRect(col);
}
});
@@ -382,4 +382,18 @@ public String getText() {
final Cell selectedCell = getSelectedCell();
return getCellText(selectedCell.getRow(), selectedCell.getCol());
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getTableHeader() {
+ return getEventThreadQueuer()
+ .invokeAndWait("getHeaderBounds", //$NON-NLS-1$
+ new IRunnable() {
+ public Object run() throws StepExecutionException {
+ return m_table.getTableHeader();
+ }
+ });
+
+ }
}
@@ -531,4 +531,11 @@ public String getText() {
final Cell selectedCell = getSelectedCell();
return getCellText(selectedCell.getRow(), selectedCell.getCol());
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getTableHeader() {
+ return m_table;
+ }
}

0 comments on commit b6aa523

Please sign in to comment.