From 20f56330401e983e3682ca437ff30b22db850f03 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 11 May 2014 19:55:27 +0300 Subject: 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/src/com/vaadin/client/SuperDevMode.java | 7 +++---- client/src/com/vaadin/client/ui/VNotification.java | 16 +++++++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'client') diff --git a/client/src/com/vaadin/client/SuperDevMode.java b/client/src/com/vaadin/client/SuperDevMode.java index c8efee357b..f1020b3d25 100644 --- a/client/src/com/vaadin/client/SuperDevMode.java +++ b/client/src/com/vaadin/client/SuperDevMode.java @@ -246,10 +246,9 @@ public class SuperDevMode { // in super dev mode, as a result of the recompile, the enabled // check will fail... if (!isSuperDevModeEnabledInModule()) { - showError("SuperDevMode is not enabled for this module/widgetset.
" - + "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); } -- cgit v1.2.3