- /**
- * @param configurator
- * @param display
- * @param importResult
- */
- private void showResult(String importName, final Display display,
- ImportResult importResult) {
- StringBuffer reportTextTemp = importResult.createReport();
- final StringBuffer reportText;
- if (StringUtils.isBlank(reportTextTemp.toString())){
- reportTextTemp.append("No update result available");
- //TODO: this is a workaround because the abcd import writes the report in the report part...
- if (!importResult.getReports().isEmpty() && importResult.getReports().get(0) != null){
- reportTextTemp = new StringBuffer();
- if(importResult!=null){
- List<byte[]> reports = importResult.getReports();
- for (byte[] bs : reports) {
- if (bs != null){ reportTextTemp.append(new String(bs));}
- }
- }
- }
- }
- reportText = reportTextTemp;
- display.asyncExec(new Runnable() {
-
- @Override
- public void run() {
- // display reports with possibility to save
- ReportTextDialog dialog = new ReportTextDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- dialog.setTitle(importName+" Report");
- dialog.setReportText(reportText.toString());
- dialog.open();
- CdmStore.getContextManager().notifyContextRefresh();
- }
- });
- }
+