private void handleOpenInDesignEditor() {
if (_tblWebApplications.getTable().getSelectionCount() > 0) {
try {
WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());
Map<String, IContainer> connectedDesigns;
try {
connectedDesigns = _model.getWgaRuntime().getConnectedDesignContainers();
IContainer design = connectedDesigns.get(app.getContentStore().getKey());
if (design !=null && design.exists()){
WGADesignStructureHelper helper = new WGADesignStructureHelper(design);
WorkbenchUtils.openEditor(Plugin.getDefault().getWorkbench(), helper.getSyncInfo(), ExternalResourceIDs.EDITOR_WGA_DESIGN);
}
else {
MessageDialog.openWarning(getSite().getShell(), "Unable to determine design", "Unable to determine design for application '" + app.getContentStore().getKey() + "'.");
}
} catch (IncompatibleWGAConfigVersion e1) {
WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to determine design", "Unable to determine design for application '" + app.getContentStore().getKey() + "'. WGA configuration is incompatible.", e1);
} catch (IOException e1) {
WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to determine design", "Unable to determine design for application '" + app.getContentStore().getKey() + "'. Cannot read WGA configuration.", e1);
}
} catch (Exception e1) {
WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open Design Editor", e1);
}
} else {