summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-05-11 19:55:27 +0300
committerVaadin Code Review <review@vaadin.com>2014-05-12 05:15:58 +0000
commit20f56330401e983e3682ca437ff30b22db850f03 (patch)
treeb20d96fd0281dcfe42f51754ae87d65ea085bb1f
parente8f0fe7a5a7ca0d5605dfeb5bc774578019b65da (diff)
downloadvaadin-framework-20f56330401e983e3682ca437ff30b22db850f03.tar.gz
vaadin-framework-20f56330401e983e3682ca437ff30b22db850f03.zip
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
-rw-r--r--client-compiler/ivy.xml7
-rw-r--r--client/src/com/vaadin/client/SuperDevMode.java7
-rw-r--r--client/src/com/vaadin/client/ui/VNotification.java16
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 @@
<dependency org="ant" name="ant-launcher" rev="1.6.5"
conf="build,ide -> default" />
- <dependency org="org.eclipse.jetty" name="jetty-server"
+ <dependency org="org.eclipse.jetty" name="jetty-distribution"
rev="8.1.12.v20130726" conf="build,ide -> default">
<exclude org="org.eclipse.jetty.orbit"></exclude>
</dependency>
+
<dependency org="org.eclipse.jetty" name="jetty-util"
rev="8.1.12.v20130726" conf="build,ide -> default" />
@@ -56,8 +57,8 @@
rev="1.1" conf="build,ide -> default" />
<dependency org="commons-codec" name="commons-codec"
rev="1.8" conf="build,ide -> default" />
- <dependency org="commons-io" name="commons-io" rev="${commons-io.version}"
- conf="build,ide -> default" />
+ <dependency org="commons-io" name="commons-io"
+ rev="${commons-io.version}" conf="build,ide -> default" />
<dependency org="org.apache.commons" name="commons-lang3"
rev="3.1" conf="build,ide -> default" />
<dependency org="org.apache.james" name="apache-mime4j"
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.<br/>"
- + "Ensure that your module definition (.gwt.xml) contains <br/>"
- + "&lt;add-linker name=&quot;xsiframe&quot;/&gt;<br/>"
- + "&lt;set-configuration-property name=&quot;devModeRedirectEnabled&quot; value=&quot;true&quot; /&gt;<br/>");
+ showError("SuperDevMode is disabled for this module/widgetset.<br/>"
+ + "Ensure that your module definition (.gwt.xml) does not contain <br/>"
+ + "&lt;set-configuration-property name=&quot;devModeRedirectEnabled&quot; value=&quot;false&quot; /&gt;<br/>");
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);
}