gwt-eclipse-plugin icon indicating copy to clipboard operation
gwt-eclipse-plugin copied to clipboard

Field has no corresponding field in template file abc.ui.xml

Open slavap opened this issue 6 years ago • 2 comments

After updating Eclipse (current version I'm using is 4.12), all @UiField in java files started to be highlighted red, though there are corresponding fields in ui.xml, and project compiles and runs successfully without any errors or warnings. Sometimes when did some changes and saved java file these red marks disappear and everything works till next project clean.

slavap avatar Oct 02 '19 00:10 slavap

Hi @slavap, if you can describe a repeatable sequence of actions (say... create a project, modify UI file, and so on... I may try to have a look at it.

protoism avatar Feb 08 '23 13:02 protoism

@protoism Unfortunately, I have no reproducible example of this problem. It looks like this:

image

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder
  xmlns:ui="urn:ui:com.google.gwt.uibinder"
  xmlns:g="urn:import:com.google.gwt.user.client.ui"
  xmlns:e="urn:import:com.sksamuel.jqm4gwt.form.elements">

  <ui:import field="com.vx.sw.client.i18n.Labels.i18n"/>
  <ui:import field="com.vx.sw.client.Resources.r"/>
  <ui:import field="com.vx.sw.client.Resx.rx"/>

  <g:FlowPanel>
    <e:JQMNumber ui:field="id" text="{i18n.textCompanyID}" addStyleNames="{r.style.hideInputNumSpinBtns}" />
  </g:FlowPanel>
</ui:UiBinder>

The interesting part is:

  1. If I do a dummy change to ui.xml (for example add a space symbol) and save it - the problem is immediately fixed.
  2. If java file is opened in the editor and I close and reopen Eclipse - again problem solved (but not every time, sometimes).

slavap avatar Feb 17 '23 23:02 slavap