use of com.amalto.workbench.dialogs.DOMViewDialog in project tmdm-studio-se by Talend.
the class EditItemAction method run.
@Override
public void run() {
try {
super.run();
IStructuredSelection selection = ((IStructuredSelection) viewer.getSelection());
if (selection.isEmpty()) {
return;
}
WSRoutingOrderV2 routingOrder = (WSRoutingOrderV2) selection.getFirstElement();
StringWriter sw = new StringWriter();
Marshaller.marshal(routingOrder, sw);
final DOMViewDialog d = new DOMViewDialog(shell, Util.parse(sw.toString()));
d.addListener(new Listener() {
public void handleEvent(Event event) {
d.close();
}
});
d.setBlockOnOpen(true);
d.open();
} catch (Exception e) {
log.error(e.getMessage(), e);
MessageDialog.openError(shell, Messages._Error, Messages.bind(Messages.RoutingEngineV2BrowserMainPage_ErrorToViewRoutingOrder, e.getLocalizedMessage()));
}
}
Aggregations