From 20f56330401e983e3682ca437ff30b22db850f03 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 11 May 2014 19:55:27 +0300 Subject: [PATCH] Make SuperDevMode work again (#13682) VNotification now works without ApplicationConnection again. Dependencies needed by codeserver are now dependencies for client-compiler Error message now takes into account that devModeRedirect is enabled by default Change-Id: I079d162d9975f99fe7b91e14ad100459c80a5587 --- client-compiler/ivy.xml | 7 ++++--- client/src/com/vaadin/client/SuperDevMode.java | 7 +++---- .../src/com/vaadin/client/ui/VNotification.java | 16 +++++++++++----- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/client-compiler/ivy.xml b/client-compiler/ivy.xml index 8c45597214..156a8d3ace 100644 --- a/client-compiler/ivy.xml +++ b/client-compiler/ivy.xml @@ -45,10 +45,11 @@ - + @@ -56,8 +57,8 @@ rev="1.1" conf="build,ide -> default" /> - + " - + "Ensure that your module definition (.gwt.xml) contains
" - + "<add-linker name="xsiframe"/>
" - + "<set-configuration-property name="devModeRedirectEnabled" value="true" />
"); + showError("SuperDevMode is disabled for this module/widgetset.
" + + "Ensure that your module definition (.gwt.xml) does not contain
" + + "<set-configuration-property name="devModeRedirectEnabled" value="false" />
"); return false; } return SuperDevMode.recompileIfNeeded(superDevModeParameter); diff --git a/client/src/com/vaadin/client/ui/VNotification.java b/client/src/com/vaadin/client/ui/VNotification.java index b40149c054..7097b428d0 100644 --- a/client/src/com/vaadin/client/ui/VNotification.java +++ b/client/src/com/vaadin/client/ui/VNotification.java @@ -38,9 +38,9 @@ import com.vaadin.client.UIDL; import com.vaadin.client.Util; import com.vaadin.client.ui.aria.AriaHelper; import com.vaadin.shared.Position; +import com.vaadin.shared.ui.ui.NotificationRole; import com.vaadin.shared.ui.ui.UIConstants; import com.vaadin.shared.ui.ui.UIState.NotificationTypeConfiguration; -import com.vaadin.shared.ui.ui.NotificationRole; public class VNotification extends VOverlay { @@ -183,11 +183,13 @@ public class VNotification extends VOverlay { } private boolean hasPostfix(NotificationTypeConfiguration styleSetup) { - return styleSetup != null && styleSetup.postfix != null && !styleSetup.postfix.isEmpty(); + return styleSetup != null && styleSetup.postfix != null + && !styleSetup.postfix.isEmpty(); } private boolean hasPrefix(NotificationTypeConfiguration styleSetup) { - return styleSetup != null && styleSetup.prefix != null && !styleSetup.prefix.isEmpty(); + return styleSetup != null && styleSetup.prefix != null + && !styleSetup.prefix.isEmpty(); } public void show(String html, Position position, String style) { @@ -214,8 +216,12 @@ public class VNotification extends VOverlay { } private NotificationTypeConfiguration getUiState(String style) { - return getApplicationConnection() - .getUIConnector().getState().notificationConfigurations + if (getApplicationConnection() == null + || getApplicationConnection().getUIConnector() == null) { + return null; + } + + return getApplicationConnection().getUIConnector().getState().notificationConfigurations .get(style); } -- 2.39.5