File openFile = JFileDataStoreChooser.showOpenFile(new String[]{"*.shp"}, shell); //$NON-NLS-1$
try {
if (openFile != null && openFile.exists()) {
MapContent mapContent = mapPane.getMapContent();
FileDataStore store = FileDataStoreFinder.getDataStore(openFile);
SimpleFeatureSource featureSource = store.getFeatureSource();
Style style = Utils.createStyle(openFile, featureSource);
FeatureLayer featureLayer = new FeatureLayer(featureSource, style);
mapContent.addLayer(featureLayer);
mapPane.redraw();
}