X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.eclipse.ui%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fdialogs%2FErrorFeedback.java;h=c311f019cff2a40006521782bc426bede48e4144;hb=5ec9d72c96b13bf18d702bf01dc2c03b0aee43a4;hp=183468402a7393e45c95746711472bdeffe6595e;hpb=f2688921e89c75ee626ff79b64105c577c415cca;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/ErrorFeedback.java b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/ErrorFeedback.java index 183468402..c311f019c 100644 --- a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/ErrorFeedback.java +++ b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/ErrorFeedback.java @@ -47,11 +47,15 @@ public class ErrorFeedback extends TitleAreaDialog { if (e instanceof ThreadDeath) throw (ThreadDeath) e; - new ErrorFeedback(getDisplay().getActiveShell(), message, e).open(); + new ErrorFeedback(newShell(), message, e).open(); } public static void show(String message) { - new ErrorFeedback(getDisplay().getActiveShell(), message, null).open(); + new ErrorFeedback(newShell(), message, null).open(); + } + + private static Shell newShell() { + return new Shell(getDisplay(), SWT.NO_TRIM); } /** Tries to find a display */ @@ -69,6 +73,7 @@ public class ErrorFeedback extends TitleAreaDialog { public ErrorFeedback(Shell parentShell, String message, Throwable e) { super(parentShell); + setShellStyle(SWT.NO_TRIM); this.message = message; this.exception = e; log.error(message, e); @@ -89,14 +94,11 @@ public class ErrorFeedback extends TitleAreaDialog { composite.setLayout(new GridLayout(2, false)); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - setMessage(message != null ? message - + (exception != null ? ": " + exception.getMessage() : "") - : exception != null ? exception.getMessage() : "Unkown Error", - IMessageProvider.ERROR); + setMessage(message != null ? message + (exception != null ? ": " + exception.getMessage() : "") + : exception != null ? exception.getMessage() : "Unkown Error", IMessageProvider.ERROR); if (exception != null) { - Text stack = new Text(composite, SWT.MULTI | SWT.LEAD | SWT.BORDER - | SWT.V_SCROLL | SWT.H_SCROLL); + Text stack = new Text(composite, SWT.MULTI | SWT.LEAD | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); stack.setEditable(false); stack.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); StringWriter sw = new StringWriter();