Refactor GridLCA#readCellToolTipTextRequested
diff --git a/bundles/org.eclipse.rap.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/gridkit/GridLCA.java b/bundles/org.eclipse.rap.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/gridkit/GridLCA.java
index abc6c98..463cc32 100644
--- a/bundles/org.eclipse.rap.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/gridkit/GridLCA.java
+++ b/bundles/org.eclipse.rap.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/gridkit/GridLCA.java
@@ -238,18 +238,20 @@
private static void readCellToolTipTextRequested( Grid grid ) {
ICellToolTipAdapter adapter = CellToolTipUtil.getAdapter( grid );
- ICellToolTipProvider provider = adapter.getCellToolTipProvider();
adapter.setCellToolTipText( null );
- ClientMessage message = ProtocolUtil.getClientMessage();
- CallOperation[] operations
- = message.getAllCallOperationsFor( getId( grid ), "renderToolTipText" );
- if( provider != null && operations.length > 0 ) {
- CallOperation operation = operations[ operations.length - 1 ];
- String itemId = ( String )operation.getProperty( "item" );
- int columnIndex = ( ( Integer )operation.getProperty( "column" ) ).intValue();
- GridItem item = getItem( grid, itemId );
- if( item != null && ( columnIndex == 0 || columnIndex < grid.getColumnCount() ) ) {
- provider.getToolTipText( item, columnIndex );
+ ICellToolTipProvider provider = adapter.getCellToolTipProvider();
+ if( provider != null ) {
+ ClientMessage message = ProtocolUtil.getClientMessage();
+ CallOperation[] operations
+ = message.getAllCallOperationsFor( getId( grid ), "renderToolTipText" );
+ if( operations.length > 0 ) {
+ CallOperation operation = operations[ operations.length - 1 ];
+ String itemId = ( String )operation.getProperty( "item" );
+ int columnIndex = ( ( Integer )operation.getProperty( "column" ) ).intValue();
+ GridItem item = getItem( grid, itemId );
+ if( item != null && ( columnIndex == 0 || columnIndex < grid.getColumnCount() ) ) {
+ provider.getToolTipText( item, columnIndex );
+ }
}
}
}