try {
GridGeometry2D gridGeometry = null;
if (geoResource.canResolve(GridGeometry2D.class)) {
gridGeometry = geoResource.resolve(GridGeometry2D.class, new NullProgressMonitor());
} else if (geoResource.canResolve(GridCoverage.class)) {
GridCoverage2D gridCoverage = (GridCoverage2D) geoResource.resolve(GridCoverage.class,
new NullProgressMonitor());
gridGeometry = gridCoverage.getGridGeometry();
}
if (gridGeometry != null)
setWidgetsToWindow(OmsBoxUtils.gridGeometry2ProcessingRegion(gridGeometry));