UiBinder changes don't get picked up in SDM (trunk)

138 views
Skip to first unread message

Ali Akhtar

unread,
Feb 10, 2015, 8:01:40 PM2/10/15
to google-web-tool...@googlegroups.com
I'm using 2.8.0-SNAPSHOT. If I add any new ui-field=".." to a ui.xml file, they aren't picked up either on refresh, or on clearing the SDM cache . Instead, I have to restart SDM in order for these changes to be picked up. Otherwise, I keep getting the error that there's no @UiField for the corresponding field in the ui.xml file.

(To be clear, adding new fields to the Java file works, but when I assign those fields in the ui.xml template, that isn't picked up. So e.g if I add a @UiField Label foo to MyView.java, and assign that via <g:Label ui-field="foo" /> in the ui.xml file, I still get the error that MyView#foo isn't assigned to a ui-field. Other ui.xml changes do get picked up, but not new ui-fields)

On a related note,it seems that CellTable is using CssResource. The compiler fails to run if you use CellTable unless you set the css mode to lenient. (Also the error message asks to set it to strict in order to temporarily avoid the issue, which is confusing as it needs to be set to lenient)

Ali Akhtar

unread,
Feb 11, 2015, 6:11:59 AM2/11/15
to google-web-tool...@googlegroups.com
Update: Seems like this issue applies to all changes made to ui.xml files. If I have an existing foo.ui.xml file, and I made a change to it, such as adding the text 'foo' anywhere inside a HtmlPanel, reloading doesn't pick up the change. A full sdm restart is required.

Jens

unread,
Feb 11, 2015, 6:50:22 AM2/11/15
to google-web-tool...@googlegroups.com
We are currently using a GWT trunk build from 5. Jan 2015 and don't see this issue. So either a recent commit causes that behavior or your project setup is broken.

-- J.

Ali Akhtar

unread,
Feb 11, 2015, 7:12:37 AM2/11/15
to google-web-tool...@googlegroups.com
I'm using the snapshot build, so it might be a recent issue. I'm not sure if I could've done anything in my project to cause this, I just have a regular ui binder file / class.

On Wed, Feb 11, 2015 at 4:50 PM, Jens <jens.ne...@gmail.com> wrote:
We are currently using a GWT trunk build from 5. Jan 2015 and don't see this issue. So either a recent commit causes that behavior or your project setup is broken.

-- J.

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Contributors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit-contributors/K4_aFOc-RG4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/88b930b9-d875-4d38-a8eb-c8ffda2d8243%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Goktug Gokdogan

unread,
Feb 11, 2015, 5:52:33 PM2/11/15
to google-web-toolkit-contributors
In same cases, you can accidentally include of ui.xml files in your build that will make your regular compile work but SDM will not pick up the changes. This happens if the ui.xml file is in the classpath but not included as a resource in the gwt.xml file. I think if we notice that during compilation, we will print a warning about it.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAKiMtbcLP0s3gdfE-Uw3oEZfvTEZW85-kgLSrxPOUTUM8NoEUg%40mail.gmail.com.

Ali Akhtar

unread,
Feb 11, 2015, 8:35:36 PM2/11/15
to google-web-tool...@googlegroups.com
I have a maven layout, and the ui.xml file is in src/main/resources, in the same package as the Java class. So I don't think that's the case here.

Also the file does get picked up, it just requires an SDM restart to pick up some of the changes.

Thomas Broyer

unread,
Feb 12, 2015, 5:25:51 AM2/12/15
to google-web-tool...@googlegroups.com


On Thursday, February 12, 2015 at 2:35:36 AM UTC+1, Ali Akhtar wrote:
I have a maven layout, and the ui.xml file is in src/main/resources, in the same package as the Java class. So I don't think that's the case here.

Also the file does get picked up, it just requires an SDM restart to pick up some of the changes.

How do you launch SDM?
If you're using the gwt-maven-plugin, it won't include src/main/resources (or other resource dirs) as resources could be filtered, and/or with inclusion/exclusion patterns and/or relocation. That means you have to run "mvn process-resources" to copy the resources to target/classes where they'll be picked up by GWT. Eclipse should do that automatically on file save IIRC.
Alternatively, you can put your ui.xml et al. in src/main/java.
Maybe the gwt-maven-plugin could be enhanced to detect the common case where resources are neither filtered nor relocated and automatically add them to the DevMode/CodeServer classpath. Patches welcome.
 

On Thu, Feb 12, 2015 at 3:52 AM, 'Goktug Gokdogan' via GWT Contributors <google-web-toolkit-contri...@googlegroups.com> wrote:
In same cases, you can accidentally include of ui.xml files in your build that will make your regular compile work but SDM will not pick up the changes. This happens if the ui.xml file is in the classpath but not included as a resource in the gwt.xml file. I think if we notice that during compilation, we will print a warning about it.
On Wed, Feb 11, 2015 at 4:12 AM, Ali Akhtar <ali.r...@gmail.com> wrote:
I'm using the snapshot build, so it might be a recent issue. I'm not sure if I could've done anything in my project to cause this, I just have a regular ui binder file / class.
On Wed, Feb 11, 2015 at 4:50 PM, Jens <jens.ne...@gmail.com> wrote:
We are currently using a GWT trunk build from 5. Jan 2015 and don't see this issue. So either a recent commit causes that behavior or your project setup is broken.

-- J.

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Contributors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit-contributors/K4_aFOc-RG4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Contributors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit-contributors/K4_aFOc-RG4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

Ali Akhtar

unread,
Feb 12, 2015, 7:33:30 AM2/12/15
to google-web-tool...@googlegroups.com
Thomas,

As usual, you're right. I was using the maven plugin, and the resources weren't being updated.

For the moment, I've just created a new run configuration in intellij for running process-resources , and when I get this error, I just run that config once, and it fixes the problem.

Still, it would be a good idea for the mvn plugin to detect this, as you suggested.

Thanks.

To unsubscribe from this group and all its topics, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/bc0e0f1e-fd91-40c5-82fc-d18d1f0debde%40googlegroups.com.

Henrik Gram

unread,
Feb 21, 2015, 6:20:38 PM2/21/15
to google-web-tool...@googlegroups.com

On Thursday, February 12, 2015 at 11:25:51 AM UTC+1, Thomas Broyer wrote:
On Thursday, February 12, 2015 at 2:35:36 AM UTC+1, Ali Akhtar wrote:
I have a maven layout, and the ui.xml file is in src/main/resources, in the same package as the Java class. So I don't think that's the case here.

Also the file does get picked up, it just requires an SDM restart to pick up some of the changes.

How do you launch SDM?
If you're using the gwt-maven-plugin, it won't include src/main/resources (or other resource dirs) as resources could be filtered, and/or with inclusion/exclusion patterns and/or relocation. That means you have to run "mvn process-resources" to copy the resources to target/classes where they'll be picked up by GWT. Eclipse should do that automatically on file save IIRC.

I had a similar problem with editing my webcomponents' html/css files which along with all other non-GWT files are located in src/main/webapp for my projects.  When I tried changing Eclipse's output destination for the webapp sourcedir in the build-path dialog, it would loop and fail and eventually change it back on its own. 

Perhaps there's a way to configure eclipse properly, but I didn't find it and ended up writing a small C program (for Windows) to detect file-changes anywhere from a root directory and copy them over to the right place and that works like a charm. 

Reply all
Reply to author
Forward
0 new messages