Revision 0a72efb6
Added by Cherian Mathew almost 9 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperation.java | ||
---|---|---|
52 | 52 |
} else { |
53 | 53 |
UpdateResult exceptionResult = new UpdateResult(); |
54 | 54 |
exceptionResult.addException(e); |
55 |
exceptionResult.setError();
|
|
55 |
exceptionResult.setAbort();
|
|
56 | 56 |
updateResult = exceptionResult; |
57 | 57 |
} |
58 | 58 |
} |
... | ... | |
79 | 79 |
int statusFlag = IStatus.OK; |
80 | 80 |
|
81 | 81 |
Collection<Exception> exceptions = updateResult.getExceptions(); |
82 |
StringBuffer statusMsg = new StringBuffer(); |
|
82 | 83 |
if(success && updateResult.isOk()) { |
83 | 84 |
if(exceptions.isEmpty()) { |
84 | 85 |
return Status.OK_STATUS; |
85 | 86 |
} else { |
86 | 87 |
statusFlag = IStatus.WARNING; |
88 |
statusMsg.append(getLabel() + " executed sucessfully but with warnings." + System.lineSeparator()); |
|
87 | 89 |
} |
88 |
} else { |
|
90 |
} else if (updateResult.isError()) {
|
|
89 | 91 |
statusFlag = IStatus.ERROR; |
92 |
statusMsg.append(getLabel() + " failed." + System.lineSeparator()); |
|
93 |
} else if (updateResult.isAbort()) { |
|
94 |
statusFlag = IStatus.ERROR; |
|
95 |
statusMsg.append(getLabel() + " aborted." + System.lineSeparator()); |
|
90 | 96 |
} |
91 | 97 |
|
92 | 98 |
Status[] childStatus = new Status[exceptions.size()]; |
... | ... | |
102 | 108 |
childStatus[count] = status; |
103 | 109 |
count++; |
104 | 110 |
} |
105 |
StringBuffer statusMsg = new StringBuffer(); |
|
106 |
for(String message : messages) { |
|
107 |
statusMsg.append(message); |
|
108 |
statusMsg.append(System.lineSeparator()); |
|
109 |
} |
|
111 |
|
|
112 |
statusMsg.append("Please click on the 'Details' button to see all the errors / warnings"); |
|
113 |
|
|
110 | 114 |
MultiStatus multiStatus = new MultiStatus("unknown", |
111 | 115 |
statusFlag, |
112 | 116 |
childStatus, |
Also available in: Unified diff
#5009 Update plugin to use remoting handlers