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$
}
//featureDisplay.setInfo(info);
} else if (info.getRequestURL() != null &&
info.getMimeType().startsWith(LayerPointInfo.HTML)) {
getDetails().showPage( browserDisplay.getControl() );
browserDisplay.setInfo(info);
} else if (info.getRequestURL() != null && info.getMimeType().startsWith(LayerPointInfo.XML)) {
getDetails().showPage( browserDisplay.getControl() );
browserDisplay.setInfo(info);
} else if (info.getRequestURL() != null && info.getMimeType().startsWith(LayerPointInfo.ERROR)) {
getDetails().showPage( browserDisplay.getControl() );
browserDisplay.setInfo(info);
} else if (info.getRequestURL() != null && info.getMimeType().startsWith(LayerPointInfo.TEXT)) {
getDetails().showPage( browserDisplay.getControl() );
browserDisplay.setInfo(info);
} else {
getDetails().showPage(information);
}
}
if (selection instanceof CoveragePointInfo) {
CoveragePointInfo info = (CoveragePointInfo) selection;
information.setText(info.getInfo());
getDetails().showPage(information);
}
}