Revision 65e61086
Added by Cherian Mathew over 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/CdmErrorDialog.java | ||
---|---|---|
47 | 47 |
String dialogTitle, |
48 | 48 |
String message, |
49 | 49 |
IStatus status, |
50 |
String stackTrace) { |
|
50 |
String stackTrace, |
|
51 |
boolean showStatusMessage) { |
|
51 | 52 |
super(parentShell, |
52 | 53 |
dialogTitle, |
53 | 54 |
message, status, |
54 | 55 |
IStatus.OK| IStatus.INFO | IStatus.WARNING | IStatus.ERROR); |
55 | 56 |
this.stackTrace = stackTrace; |
56 |
|
|
57 |
|
|
57 |
String statusMessage = ""; |
|
58 |
if(showStatusMessage) { |
|
59 |
statusMessage = status.getMessage(); |
|
60 |
} |
|
61 |
this.message = message == null ? statusMessage : message + "\n " + statusMessage; |
|
58 | 62 |
} |
59 | 63 |
|
60 |
/** |
|
61 |
* @param parentShell |
|
62 |
* @param dialogTitle |
|
63 |
* @param message |
|
64 |
* @param status |
|
65 |
* @param stackTrace |
|
66 |
*/ |
|
67 |
public CdmErrorDialog(Shell parentShell, |
|
68 |
String dialogTitle, |
|
69 |
String message, |
|
70 |
IStatus status, |
|
71 |
String stackTrace, |
|
72 |
Object[] updatedObjects) { |
|
73 |
this(parentShell, dialogTitle, message, status, stackTrace); |
|
74 |
this.message = message == null ? status.getMessage() |
|
75 |
: message + "\n " + status.getMessage(); //$NON-NLS-1$ |
|
76 |
} |
|
77 | 64 |
|
78 | 65 |
/** |
79 | 66 |
* @param parentShell |
... | ... | |
85 | 72 |
String dialogTitle, |
86 | 73 |
String message, |
87 | 74 |
IStatus status) { |
88 |
this(parentShell, dialogTitle, message, status, ""); |
|
75 |
this(parentShell, dialogTitle, message, status, "", true);
|
|
89 | 76 |
} |
90 | 77 |
|
91 | 78 |
/* (non-Javadoc) |
Also available in: Unified diff
#5209 Beautify error messages related to connection / access to remote server