diff options
| author | Florian Barbin | 2016-02-04 14:36:57 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2016-03-14 13:59:24 +0000 |
| commit | cd8856ffc89d2b59afb0032984fab761d073e21a (patch) | |
| tree | 293b31487f45f52a089d118907fab1b9f0d0f490 | |
| parent | 30bbb751e356536c5828406ec8748c05c33ee3ca (diff) | |
| download | org.eclipse.sirius-cd8856ffc89d2b59afb0032984fab761d073e21a.tar.gz org.eclipse.sirius-cd8856ffc89d2b59afb0032984fab761d073e21a.tar.xz org.eclipse.sirius-cd8856ffc89d2b59afb0032984fab761d073e21a.zip | |
[485837] Avoid displaying empty popup on SecurityException
* If there is no message, we do not display this empty popup (which is
useless and disturbing for the end-user)
Bug: 485837
Cherry-picked-from: 8a70741f3cc0fab1f2db400d3733646d5a94e477
Change-Id: I95faa085a526e3315ced5055636f5c76243d243c
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
| -rw-r--r-- | plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/LogThroughActiveDialectEditorLogListener.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/LogThroughActiveDialectEditorLogListener.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/LogThroughActiveDialectEditorLogListener.java index d7c9b4ca03..bc103c012b 100644 --- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/LogThroughActiveDialectEditorLogListener.java +++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/business/internal/dialect/LogThroughActiveDialectEditorLogListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2015 THALES GLOBAL SERVICES and others. + * Copyright (c) 2012, 2016 THALES GLOBAL SERVICES and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -158,8 +158,15 @@ public final class LogThroughActiveDialectEditorLogListener implements ILogListe * false otherwise */ private boolean shouldBeLoggedThroughPopup(Throwable exception) { - // We only consider LockedInstanceException - return exception instanceof LockedInstanceException || exception instanceof SecurityException; + boolean shouldBeLogged = false; + // We only consider LockedInstanceException and SecurityException with + // message + shouldBeLogged = exception instanceof LockedInstanceException || exception instanceof SecurityException; + if (shouldBeLogged) { + String message = getErrorMessage(exception); + shouldBeLogged = message != null && !message.isEmpty(); + } + return shouldBeLogged; } /** |
