try {
if (PlatformUI.getWorkbench().isClosing())
return;
monitor.beginTask(Messages.OpenMapCommand_taskName, IProgressMonitor.UNKNOWN);
final UDIGEditorInput input = ApplicationGIS.getInput(element);
// if (element instanceof Map) {
// Map map = (Map) element;
// if (map.getViewportModel().getBounds().isNull()) {
// Envelope bounds = map.getBounds(monitor);
// map.getViewportModelInternal().setBounds(bounds);
// }
// }
if (input == null) {
return;
}
input.setProjectElement(element);
PlatformGIS.syncInDisplayThread(new Runnable(){
public void run() {
IWorkbenchPage activePage = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();