if (getViewer().getSelection() != null
&& getViewer().getSelection() instanceof IStructuredSelection) {
final Object obj = ((IStructuredSelection) getViewer().getSelection())
.getFirstElement();
if (obj instanceof Region) {
final Region f = (Region) obj;
if (showConfirm(getViewer().getControl().getShell(),
Messages.MapsAndRegionsView_Delete, NLS.bind(
Messages.MapsAndRegionsView_RegionRegionConfirmation, f.getName()),
"/icons/world_delete.png")) { //$NON-NLS-1$
// EditPlugin.getModel().delete(f);
// _viewer.setInput(EditPlugin.getModel().getTreeRoot());
_viewer.refresh();
_viewer.refresh();
}
}
else if (obj instanceof ScannedMap) {
final ScannedMap f = (ScannedMap) obj;
f.getName();
// if (showConfirm(getViewer().getControl().getShell(), "Löschen",
// "Region '"
// + f.getRegion().getName() + "' und Inhalt wirklich löschen?",
// "/icons/world_delete.png")) {
// EditPlugin.getModel().delete(f);