getDetails().showPage(information);
return;
}
if( selection instanceof SimpleFeature ) {
getDetails().showPage(featureDisplay.getControl());
FeaturePropertySource source = new FeaturePropertySource( (SimpleFeature)selection, false, false);
StructuredSelection sel = new StructuredSelection(source);
featureDisplay.selectionChanged(null, sel);
//featureDisplay.setInfo( (SimpleFeature) selection );
}
if (selection instanceof LayerPointInfo) {
LayerPointInfo info = (LayerPointInfo) selection;
if (info.getMimeType() == null) {
getDetails().showPage(information);
} else if (info.getMimeType().startsWith(LayerPointInfo.GML)) {
getDetails().showPage(featureDisplay.getControl());
try {
SimpleFeature feature = (SimpleFeature) info.acquireValue();
FeaturePropertySource src = new FeaturePropertySource(feature);
StructuredSelection sel = new StructuredSelection(src);
featureDisplay.selectionChanged(null, sel);
} catch(IOException ex) {
InfoPlugin.log("GML value could not be acquired.", ex); //$NON-NLS-1$
}