private static FeatureDetailWidgetBuilder getCustomBuilder(Layer<?> layer) {
		FeatureDetailWidgetBuilder b = null;
		try {
			if (layer != null) {
				ClientWidgetInfo cwi = layer.getLayerInfo().getWidgetInfo(WidgetBuilderInfo.IDENTIFIER);
				if (cwi != null) {
					if (cwi instanceof WidgetBuilderInfo) {
						WidgetBuilderInfo lcfdii = (WidgetBuilderInfo) cwi;
						WidgetBuilder wb = WidgetFactory.get(lcfdii);
						if (wb instanceof FeatureDetailWidgetBuilder) {
							return (FeatureDetailWidgetBuilder) wb;
						} else {
							GWT.log("Builder is not of type FeatureDetailWidgetBuilder: " + lcfdii.getBuilderName());
						}
					} else {
						GWT.log("ClientWidgetInfo is not of class type LayerCustomFeatureDetailInfoInfo!! (layer type: "
								+ layer.getServerLayerId() + ")");
					}
				}
			}
		} catch (Exception e) { // NOSONAR
			Log.logError("Error getting custom detail widget: " + e.getMessage());
		}
		if (b == null) {
			if (layer instanceof VectorLayer && defaultVectorFeatureDetailWidgetBuilder != null) {
				b = defaultVectorFeatureDetailWidgetBuilder;
			} else if (layer instanceof RasterLayer && defaultRasterFeatureDetailWidgetBuilder != null) {
				b = defaultRasterFeatureDetailWidgetBuilder;
			}
		}
		return b;
	}
private static FeatureDetailWidgetBuilder getCustomBuilder ( Layer < ? > layer ) { FeatureDetailWidgetBuilder b = null ; try { if ( layer != null ) { ClientWidgetInfo cwi = layer . getLayerInfo ( ) . getWidgetInfo ( WidgetBuilderInfo . IDENTIFIER ) ; if ( cwi != null ) { if ( cwi instanceof WidgetBuilderInfo ) { WidgetBuilderInfo lcfdii = ( WidgetBuilderInfo ) cwi ; WidgetBuilder wb = WidgetFactory . get ( lcfdii ) ; if ( wb instanceof FeatureDetailWidgetBuilder ) { return ( FeatureDetailWidgetBuilder ) wb ; } else { GWT . log ( "Builder is not of type FeatureDetailWidgetBuilder: " + lcfdii . getBuilderName ( ) ) ; } } else { GWT . log ( "ClientWidgetInfo is not of class type LayerCustomFeatureDetailInfoInfo!! (layer type: " + layer . getServerLayerId ( ) + ")" ) ; } } } } catch ( Exception e ) { Log . logError ( "Error getting custom detail widget: " + e . getMessage ( ) ) ; } if ( b == null ) { if ( layer instanceof VectorLayer && defaultVectorFeatureDetailWidgetBuilder != null ) { b = defaultVectorFeatureDetailWidgetBuilder ; } else if ( layer instanceof RasterLayer && defaultRasterFeatureDetailWidgetBuilder != null ) { b = defaultRasterFeatureDetailWidgetBuilder ; } } return b ; }
----------------------------------------------------------