public Command getCommand(Request request) {
IHTMLGraphicalViewer viewer = (IHTMLGraphicalViewer) _part
.getViewer();
Element table = (Element) _part.getIDOMNode();
if (request instanceof TableResizeRequest) {
TableResizeRequest trq = (TableResizeRequest) request;
if (trq.isRow()) {
return new TableResizeRowCommand(viewer, table, trq
.getIndex(), trq.getDelta());
}
return new TableResizeColumnCommand(viewer, table, trq
.getIndex(), trq.getDelta());
} else if (request instanceof TableInsertRequest) {
TableInsertRequest tableInsertRequest = (TableInsertRequest) request;
int index = tableInsertRequest.getIndex()
+ (tableInsertRequest.isBefore() ? 0 : 1);
if (tableInsertRequest.isRow()) {