Eliminates the code for the long deprecated urn:with feature.

Review at http://gwt-code-reviews.appspot.com/1500808

Review by: hermes@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10485 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/uibinder/attributeparsers/BundleAttributeParser.java b/user/src/com/google/gwt/uibinder/attributeparsers/BundleAttributeParser.java
deleted file mode 100644
index d842bd0..0000000
--- a/user/src/com/google/gwt/uibinder/attributeparsers/BundleAttributeParser.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2008 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.uibinder.attributeparsers;
-
-import com.google.gwt.core.ext.typeinfo.JClassType;
-
-/**
- * Interprets an attribute's contents as a method call on a resource class (one
- * tied to an xmnls prefix via a "with://" url).
- * @deprecated soon to die, replaced by brace expressions
- */
-@Deprecated
-public class BundleAttributeParser implements AttributeParser {
-
-  private final JClassType bundleClass;
-  private String bundleInstance;
-  private boolean isBundleStatic;
-
-  public BundleAttributeParser(JClassType bundleClass, String bundleInstance,
-      boolean isBundleStatic) {
-    this.bundleClass = bundleClass;
-    this.bundleInstance = bundleInstance;
-    this.isBundleStatic = isBundleStatic;
-  }
-
-  public JClassType bundleClass() {
-    return bundleClass;
-  }
-
-  public String bundleInstance() {
-    return bundleInstance;
-  }
-
-  public String fullBundleClassName() {
-    return bundleClass.getPackage().getName() + "." + bundleClass.getName();
-  }
-
-  public boolean isBundleStatic() {
-    return isBundleStatic;
-  }
-
-  public String parse(String attribute) {
-    StringBuilder b = new StringBuilder();
-    String[] values = attribute.split(" ");
-    boolean first = true;
-    for (String value : values) {
-      if (first) {
-        first = false;
-      } else {
-        b.append(" + \" \" + ");
-      }
-      b.append(bundleInstance() + "." + parenthesizeDots(value) + "()");
-    }
-    return b.toString();
-  }
-
-  private String parenthesizeDots(String value) {
-    return value.replaceAll("\\.", "().");
-  }
-}
diff --git a/user/src/com/google/gwt/uibinder/attributeparsers/BundleAttributeParsers.java b/user/src/com/google/gwt/uibinder/attributeparsers/BundleAttributeParsers.java
deleted file mode 100644
index 734c28b..0000000
--- a/user/src/com/google/gwt/uibinder/attributeparsers/BundleAttributeParsers.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright 2009 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.uibinder.attributeparsers;
-
-import com.google.gwt.core.ext.UnableToCompleteException;
-import com.google.gwt.core.ext.typeinfo.JClassType;
-import com.google.gwt.core.ext.typeinfo.JMethod;
-import com.google.gwt.core.ext.typeinfo.TypeOracle;
-import com.google.gwt.uibinder.rebind.MortalLogger;
-import com.google.gwt.uibinder.rebind.XMLAttribute;
-import com.google.gwt.uibinder.rebind.XMLElement;
-import com.google.gwt.uibinder.rebind.model.OwnerClass;
-import com.google.gwt.uibinder.rebind.model.OwnerField;
-import com.google.gwt.uibinder.rebind.model.OwnerFieldClass;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Manages BundleAttributeParsers, which provide the deprecated
- * res:style{style.pretty} feature.
- */
-@Deprecated
-public class BundleAttributeParsers {
-  private static final String BUNDLE_URI_SCHEME = "urn:with:";
-
-  private final TypeOracle oracle;
-  private final MortalLogger logger;
-  private final OwnerClass ownerClass;
-  private final String templatePath;
-  private final JClassType uiOwnerType;
-
-  /**
-   * Map of bundle parsers, keyed by bundle class name.
-   */
-  private final Map<String, BundleAttributeParser> parsers = new LinkedHashMap<String, BundleAttributeParser>();
-
-  public BundleAttributeParsers(TypeOracle oracle, MortalLogger logger,
-      OwnerClass ownerClass, String templatePath, JClassType uiOwnerType) {
-    this.oracle = oracle;
-    this.logger = logger;
-    this.ownerClass = ownerClass;
-    this.templatePath = templatePath;
-    this.uiOwnerType = uiOwnerType;
-  }
-
-  public BundleAttributeParser get(OwnerFieldClass type) {
-    return parsers.get(type.getRawType().getQualifiedSourceName());
-  }
-
-  public BundleAttributeParser get(XMLAttribute attribute)
-      throws UnableToCompleteException {
-    String attributePrefixUri = attribute.getNamespaceUri();
-
-    if ((attributePrefixUri == null)
-        || !attributePrefixUri.startsWith(BUNDLE_URI_SCHEME)) {
-      return null;
-    }
-
-    String bundleClassName = attributePrefixUri.substring(BUNDLE_URI_SCHEME.length());
-    BundleAttributeParser parser = parsers.get(bundleClassName);
-    if (parser == null) {
-      JClassType bundleClassType = getOracle().findType(bundleClassName);
-      if (bundleClassType == null) {
-        die(attribute.getElement(), "No such resource class: "
-            + bundleClassName);
-      }
-      parser = createBundleParser(bundleClassType, attribute);
-      parsers.put(bundleClassName, parser);
-    }
-
-    return parser;
-  }
-
-  public Map<String, BundleAttributeParser> getMap() {
-    return Collections.unmodifiableMap(parsers);
-  }
-
-  /**
-   * Creates a parser for the given bundle class. This method will die soon.
-   */
-  private BundleAttributeParser createBundleParser(JClassType bundleClass,
-      XMLAttribute attribute) throws UnableToCompleteException {
-
-    final String templateResourceName = attribute.getName().split(":")[0];
-    warn(attribute.getElement(), "\"%s\" is deprecated by "
-        + "<ui:with field='%s' type='%s.%s' />", BUNDLE_URI_SCHEME,
-        templateResourceName, bundleClass.getPackage().getName(),
-        bundleClass.getName());
-
-    // Try to find any bundle instance created with UiField.
-    OwnerField field = getOwnerClass().getUiFieldForType(bundleClass);
-    if (field != null) {
-      if (!templateResourceName.equals(field.getName())) {
-        die(attribute.getElement(),
-            "Template %s has no \"xmlns:%s='urn:with:%s'\" for %s.%s#%s",
-            templatePath, field.getName(),
-            bundleClass.getQualifiedSourceName(),
-            uiOwnerType.getPackage().getName(), uiOwnerType.getName(),
-            field.getName());
-      }
-
-      if (field.isProvided()) {
-        return new BundleAttributeParser(bundleClass, "owner."
-            + field.getName(), false);
-      }
-    }
-
-    // Try to find any bundle instance created with @UiFactory.
-    JMethod method = getOwnerClass().getUiFactoryMethod(bundleClass);
-    if (method != null) {
-      return new BundleAttributeParser(bundleClass, "owner." + method.getName()
-          + "()", false);
-    }
-
-    return new BundleAttributeParser(bundleClass, "my"
-        + bundleClass.getName().replace('.', '_') + "Instance", true);
-  }
-
-  private void die(XMLElement elem, String string, Object... params)
-      throws UnableToCompleteException {
-    logger.die(elem, string, params);
-  }
-
-  private TypeOracle getOracle() {
-    return oracle;
-  }
-
-  private OwnerClass getOwnerClass() {
-    return ownerClass;
-  }
-
-  private void warn(XMLElement elem, String string, Object... params) {
-    logger.warn(elem, string, params);
-  }
-}
diff --git a/user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java b/user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java
index 2246e27..c8592e2 100644
--- a/user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java
+++ b/user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java
@@ -16,7 +16,6 @@
 package com.google.gwt.uibinder.elementparsers;
 
 import com.google.gwt.core.ext.UnableToCompleteException;
-import com.google.gwt.uibinder.attributeparsers.AttributeParser;
 import com.google.gwt.uibinder.rebind.UiBinderWriter;
 import com.google.gwt.uibinder.rebind.XMLAttribute;
 import com.google.gwt.uibinder.rebind.XMLElement;
@@ -25,8 +24,7 @@
 import java.util.Map;
 
 /**
- * Assigns computed values to element attributes, e.g. nasty old
- * resources:styleName="style.pretty" and nice new
+ * Assigns computed values to element attributes, e.g.
  * styleName={resources.style.pretty}, which will become something like
  * myWidget.setStyleName(resources.style().pretty()) in the generated code.
  */
@@ -57,24 +55,12 @@
     this.writer = writer;
   }
 
-  @SuppressWarnings("deprecation")
   public String interpretElement(XMLElement elem)
       throws UnableToCompleteException {
     Map<String, String> attNameToToken = new HashMap<String, String>();
 
     for (int i = elem.getAttributeCount() - 1; i >= 0; i--) {
       XMLAttribute att = elem.getAttribute(i);
-      AttributeParser parser = writer.getBundleAttributeParser(att);
-
-      if (parser != null) {
-        // Legacy res:style='style.pretty'
-        String parsedValue = parser.parse(att.consumeRawValue());
-        String attToken = writer.tokenForStringExpression(parsedValue);
-
-        // Use localName so <div res:style='...'> becomes <div style='...'>
-        attNameToToken.put(att.getLocalName(), attToken);
-        continue;
-      }
 
       if (att.hasComputedValue()) {
         String attToken = delegate.getAttributeToken(att);
diff --git a/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java b/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
index 37d94ba..33254ab 100644
--- a/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
+++ b/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
@@ -68,10 +68,6 @@
       return styleName;
     }
 
-    public void setColumns(List<CellContent> columns) {
-      this.columns = columns;
-    }
-
     public void setStyleName(String styleName) {
       this.styleName = styleName;
     }
diff --git a/user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java b/user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
index b89a0f5..8381922 100644
--- a/user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
+++ b/user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
@@ -183,7 +183,7 @@
 
   @Override
   public void writeFieldBuilder(IndentedWriter w, int getterCount,
-    OwnerField ownerField) throws UnableToCompleteException {
+    OwnerField ownerField) {
     if (getterCount > 1) {
       w.write("%s;  // more than one getter call detected. Type: %s, precedence: %s",
             FieldManager.getFieldBuilder(name), getFieldType(), getBuildPrecedence());
diff --git a/user/src/com/google/gwt/uibinder/rebind/FieldManager.java b/user/src/com/google/gwt/uibinder/rebind/FieldManager.java
index fee8dca..899f6cc 100644
--- a/user/src/com/google/gwt/uibinder/rebind/FieldManager.java
+++ b/user/src/com/google/gwt/uibinder/rebind/FieldManager.java
@@ -335,10 +335,8 @@
    * Writes all stored gwt fields.
    *
    * @param writer the writer to output
-   * @param ownerTypeName the name of the class being processed
    */
-  public void writeGwtFieldsDeclaration(IndentedWriter writer,
-      String ownerTypeName) throws UnableToCompleteException {
+  public void writeGwtFieldsDeclaration(IndentedWriter writer) throws UnableToCompleteException {
     Collection<FieldWriter> fields = fieldsMap.values();
     for (FieldWriter field : fields) {
       field.write(writer);
diff --git a/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfGeneratedCssResource.java b/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfGeneratedCssResource.java
index 6d074b7..e89abdc 100644
--- a/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfGeneratedCssResource.java
+++ b/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfGeneratedCssResource.java
@@ -73,7 +73,7 @@
 
   @Override
   public void writeFieldBuilder(IndentedWriter w,
-      int getterCount, OwnerField ownerField) throws UnableToCompleteException {
+      int getterCount, OwnerField ownerField) {
     w.write("%s;  // generated css resource must be always created. Type: %s. Precedence: %s",
         FieldManager.getFieldBuilder(getName()), getFieldType(), getBuildPrecedence());
   }
diff --git a/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java b/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
index 610c07e..f858731 100644
--- a/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
+++ b/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
@@ -295,7 +295,7 @@
       }
 
       if (ownerField.isProvided()) {
-        createResourceUiField(resourceName, resourceType, ownerField);
+        createResourceUiField(resourceName, ownerField);
         return;
       } else {
         // Let's keep trying, but we know the type at least.
@@ -344,8 +344,7 @@
     fieldWriter.setInitializer(initializer);
   }
 
-  private void createResourceUiField(String resourceName, JClassType resourceType,
-      OwnerField ownerField)
+  private void createResourceUiField(String resourceName, OwnerField ownerField)
       throws UnableToCompleteException {
     FieldWriter fieldWriter;
     String initializer;
diff --git a/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java b/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
index 255fcf0..2cbe8f8 100644
--- a/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
+++ b/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
@@ -27,10 +27,7 @@
 import com.google.gwt.dom.client.TagName;
 import com.google.gwt.resources.client.ClientBundle;
 import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
-import com.google.gwt.uibinder.attributeparsers.AttributeParser;
 import com.google.gwt.uibinder.attributeparsers.AttributeParsers;
-import com.google.gwt.uibinder.attributeparsers.BundleAttributeParser;
-import com.google.gwt.uibinder.attributeparsers.BundleAttributeParsers;
 import com.google.gwt.uibinder.client.AbstractUiRenderer;
 import com.google.gwt.uibinder.client.LazyDomElement;
 import com.google.gwt.uibinder.client.UiBinder;
@@ -67,13 +64,7 @@
 
 /**
  * Writer for UiBinder generated classes.
- *
- * TODO(rdamazio): Refactor this, extract model classes, improve ordering
- * guarantees, etc.
- *
- * TODO(rjrjr): Line numbers in error messages.
  */
-@SuppressWarnings("deprecation")
 public class UiBinderWriter implements Statements {
   private static final String PACKAGE_URI_SCHEME = "urn:import:";
 
@@ -309,8 +300,6 @@
   private final LinkedList<List<String>> detachStatementsStack = new LinkedList<List<String>>();
   private final AttributeParsers attributeParsers;
 
-  private final BundleAttributeParsers bundleParsers;
-
   private final UiBinderContext uiBinderCtx;
 
   private final String binderUri;
@@ -399,8 +388,6 @@
         ownerClass, logger, oracle, useLazyWidgetBuilders);
 
     attributeParsers = new AttributeParsers(oracle, fieldManager, logger);
-    bundleParsers = new BundleAttributeParsers(oracle, logger, getOwnerClass(),
-        templatePath, uiOwnerType);
   }
 
   /**
@@ -771,20 +758,6 @@
     return baseClass;
   }
 
-  /**
-   * Finds an attribute {@link BundleAttributeParser} for the given xml
-   * attribute, if any, based on its namespace uri.
-   *
-   * @return the parser or null
-   * @deprecated exists only to support {@link BundleAttributeParser}, which
-   *             will be leaving us soon.
-   */
-  @Deprecated
-  public AttributeParser getBundleAttributeParser(XMLAttribute attribute)
-      throws UnableToCompleteException {
-    return bundleParsers.get(attribute);
-  }
-
   public ImplicitClientBundle getBundleClass() {
     return bundleClass;
   }
@@ -1083,7 +1056,7 @@
     gwtPrefix = documentElement.lookupPrefix(binderUri);
 
     XMLElement elem = new XMLElementProviderImpl(attributeParsers,
-        bundleParsers, oracle, logger, designTime).get(documentElement);
+        oracle, logger, designTime).get(documentElement);
     this.rendered = tokenator.detokenate(parseDocumentElement(elem));
     printWriter.print(rendered);
   }
@@ -1100,24 +1073,6 @@
   }
 
   /**
-   * Outputs a bundle resource for a given bundle attribute parser.
-   */
-  private String declareStaticField(BundleAttributeParser parser) {
-    if (!parser.isBundleStatic()) {
-      return null;
-    }
-
-    String fullBundleClassName = parser.fullBundleClassName();
-
-    StringBuilder b = new StringBuilder();
-    b.append("static ").append(fullBundleClassName).append(" ").append(
-        parser.bundleInstance()).append(" = GWT.create(").append(
-        fullBundleClassName).append(".class);");
-
-    return b.toString();
-  }
-
-  /**
    * Ensures that all of the internal data structures are cleaned up correctly
    * at the end of parsing the document.
    *
@@ -1665,7 +1620,7 @@
       }
     }
 
-    fieldManager.writeGwtFieldsDeclaration(niceWriter, uiOwnerType.getName());
+    fieldManager.writeGwtFieldsDeclaration(niceWriter);
   }
 
   private void writeHandlers(IndentedWriter w) throws UnableToCompleteException {
@@ -1719,14 +1674,7 @@
       String fieldName = ownerField.getName();
       FieldWriter fieldWriter = fieldManager.lookup(fieldName);
 
-      BundleAttributeParser bundleParser = bundleParsers.get(ownerField.getType());
-
-      if (bundleParser != null) {
-        // ownerField is a bundle resource.
-        maybeWriteFieldSetter(niceWriter, ownerField,
-            bundleParser.bundleClass(), bundleParser.bundleInstance());
-
-      } else if (fieldWriter != null) {
+      if (fieldWriter != null) {
         // ownerField is a widget.
         JClassType type = fieldWriter.getInstantiableType();
         if (type != null) {
@@ -1818,8 +1766,7 @@
     w.write("}");
   }
 
-  private void writeRendererGetters(IndentedWriter w, JClassType owner, String rootFieldName)
-      throws UnableToCompleteException {
+  private void writeRendererGetters(IndentedWriter w, JClassType owner, String rootFieldName) {
     List<JMethod> getters = findGetterNames(owner);
 
     // For every requested getter
@@ -1882,25 +1829,6 @@
     }
   }
 
-  /**
-   * Generates instances of any bundle classes that have been referenced by a
-   * namespace entry in the top level element. This must be called *after* all
-   * parsing is through, as the bundle list is generated lazily as dom elements
-   * are parsed.
-   */
-  private void writeStaticBundleInstances(IndentedWriter niceWriter) {
-    // TODO(rjrjr) It seems bad that this method has special
-    // knowledge of BundleAttributeParser, but that'll die soon so...
-
-    Map<String, BundleAttributeParser> bpMap = bundleParsers.getMap();
-    for (String key : bpMap.keySet()) {
-      String declaration = declareStaticField(bpMap.get(key));
-      if (declaration != null) {
-        niceWriter.write(declaration);
-      }
-    }
-  }
-
   private void writeStaticMessagesInstance(IndentedWriter niceWriter) {
     if (messages.hasMessages()) {
       niceWriter.write(messages.getDeclaration());
@@ -1909,7 +1837,6 @@
 
   private void writeStatics(IndentedWriter w) {
     writeStaticMessagesInstance(w);
-    writeStaticBundleInstances(w);
     designTime.addDeclarations(w);
   }
 }
diff --git a/user/src/com/google/gwt/uibinder/rebind/XMLElement.java b/user/src/com/google/gwt/uibinder/rebind/XMLElement.java
index f3a4a8b..dfa4e9d 100644
--- a/user/src/com/google/gwt/uibinder/rebind/XMLElement.java
+++ b/user/src/com/google/gwt/uibinder/rebind/XMLElement.java
@@ -129,9 +129,6 @@
 
   private final Element elem;
   private final AttributeParsers attributeParsers;
-  // for legacy templates
-  @SuppressWarnings("deprecation")
-  private final com.google.gwt.uibinder.attributeparsers.BundleAttributeParsers bundleParsers;
   private final TypeOracle oracle;
 
   private final MortalLogger logger;
@@ -166,17 +163,13 @@
     NO_END_TAG.add("wbr");
   }
 
-  // bundleParsers for legacy templates
-  @SuppressWarnings("deprecation")
   XMLElement(
       Element elem,
       AttributeParsers attributeParsers,
-      com.google.gwt.uibinder.attributeparsers.BundleAttributeParsers bundleParsers,
-      TypeOracle oracle, MortalLogger logger, DesignTimeUtils designTime,
-      XMLElementProvider provider) {
+      TypeOracle oracle,
+      MortalLogger logger, DesignTimeUtils designTime, XMLElementProvider provider) {
     this.elem = elem;
     this.attributeParsers = attributeParsers;
-    this.bundleParsers = bundleParsers;
     this.oracle = oracle;
     this.logger = logger;
     this.designTime = designTime;
@@ -273,11 +266,6 @@
    */
   public String consumeAttributeWithDefault(String name, String defaultValue,
       JType[] types) throws UnableToCompleteException {
-    /*
-     * TODO(rjrjr) The only reason we need the attribute here is for getParser,
-     * and getParser only needs it for horrible old BundleAttributeParsers. When
-     * that dies, this gets much simpler.
-     */
     XMLAttribute attribute = getAttribute(name);
     if (attribute == null) {
       if (defaultValue != null) {
@@ -286,7 +274,7 @@
       return defaultValue;
     }
     String rawValue = attribute.consumeRawValue();
-    AttributeParser parser = getParser(attribute, types);
+    AttributeParser parser = getParser(types);
     if (parser == null) {
       logger.die(this, "No such attribute %s", name);
     }
@@ -586,16 +574,11 @@
    */
   public String consumeRequiredAttribute(String name, JType... types)
       throws UnableToCompleteException {
-    /*
-     * TODO(rjrjr) We have to get the attribute to get the parser, and we must
-     * get the attribute before we consume the value. This nasty subtlety is all
-     * down to BundleParsers, which we'll hopefully kill off soon.
-     */
     XMLAttribute attribute = getAttribute(name);
     if (attribute == null) {
       failRequired(name);
     }
-    AttributeParser parser = getParser(attribute, types);
+    AttributeParser parser = getParser(types);
     String rawValue = consumeRequiredRawAttribute(name);
 
     try {
@@ -937,15 +920,8 @@
     return b.toString();
   }
 
-  @SuppressWarnings("deprecation")
-  private AttributeParser getParser(XMLAttribute xmlAttribute, JType... types)
-      throws UnableToCompleteException {
-    AttributeParser rtn = bundleParsers.get(xmlAttribute);
-    if (rtn == null) {
-      rtn = attributeParsers.get(types);
-    }
-
-    return rtn;
+  private AttributeParser getParser(JType... types) {
+    return attributeParsers.get(types);
   }
 
   private JType getSafeHtmlType() {
diff --git a/user/src/com/google/gwt/uibinder/rebind/XMLElementProviderImpl.java b/user/src/com/google/gwt/uibinder/rebind/XMLElementProviderImpl.java
index d830108..6b978c3 100644
--- a/user/src/com/google/gwt/uibinder/rebind/XMLElementProviderImpl.java
+++ b/user/src/com/google/gwt/uibinder/rebind/XMLElementProviderImpl.java
@@ -17,35 +17,31 @@
 
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.uibinder.attributeparsers.AttributeParsers;
-import com.google.gwt.uibinder.attributeparsers.BundleAttributeParsers;
 
 import org.w3c.dom.Element;
 
 /**
  * The default implemenatation of {@link XMLElementProvider}.
  */
-@SuppressWarnings("deprecation")
 public class XMLElementProviderImpl implements XMLElementProvider {
   private final AttributeParsers attributeParsers;
   // bundleParsers for legacy templates
-  private final BundleAttributeParsers bundleParsers;
   private final TypeOracle oracle;
   private final MortalLogger logger;
   private final DesignTimeUtils designTime;
 
   // bundleParsers for legacy templates
   public XMLElementProviderImpl(AttributeParsers attributeParsers,
-      BundleAttributeParsers bundleParsers, TypeOracle oracle,
-      MortalLogger logger, DesignTimeUtils designTime) {
+      TypeOracle oracle, MortalLogger logger,
+      DesignTimeUtils designTime) {
     this.attributeParsers = attributeParsers;
-    this.bundleParsers = bundleParsers;
     this.oracle = oracle;
     this.logger = logger;
     this.designTime = designTime;
   }
 
   public XMLElement get(Element e) {
-    return new XMLElement(e, attributeParsers, bundleParsers, oracle, logger,
-        designTime, this);
+    return new XMLElement(e, attributeParsers, oracle, logger, designTime,
+        this);
   }
 }
diff --git a/user/src/com/google/gwt/uibinder/rebind/messages/PlaceholderInterpreter.java b/user/src/com/google/gwt/uibinder/rebind/messages/PlaceholderInterpreter.java
index 1a645c0..ef0328d 100644
--- a/user/src/com/google/gwt/uibinder/rebind/messages/PlaceholderInterpreter.java
+++ b/user/src/com/google/gwt/uibinder/rebind/messages/PlaceholderInterpreter.java
@@ -97,6 +97,7 @@
    * Performs escaping on the consumed text to make it safe for use as a
    * Messages {@literal @}Default value
    */
+  @SuppressWarnings("unused")
   public String postProcess(String consumed) throws UnableToCompleteException {
     return tokenator.detokenate(MessageWriter.escapeMessageFormat(consumed));
   }
diff --git a/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java b/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
index 32e8d90..0ffd82d 100644
--- a/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
+++ b/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
@@ -90,7 +90,6 @@
 
   final ElementParser parser;
 
-  @SuppressWarnings("deprecation")
   ElementParserTester(String parsedTypeName, ElementParser parser,
       Resource... moreJava) throws UnableToCompleteException {
     this.parser = parser;
@@ -102,11 +101,8 @@
         uiResources);
     types = state.getTypeOracle();
 
-    // Fully qualified to avoid deprecation warning on the import line
-    com.google.gwt.uibinder.attributeparsers.BundleAttributeParsers bundleParsers = new com.google.gwt.uibinder.attributeparsers.BundleAttributeParsers(
-        types, logger, null, templatePath, null);
     elemProvider = new XMLElementProviderImpl(new AttributeParsers(types, null,
-        logger), bundleParsers, types, logger, DesignTimeUtilsStub.EMPTY);
+        logger), types, logger, DesignTimeUtilsStub.EMPTY);
 
     fieldManager = new FieldManager(types, logger, false);
     JClassType baseType = types.findType("my.Ui.BaseClass");
diff --git a/user/test/com/google/gwt/uibinder/rebind/AbstractUiBinderWriterTest.java b/user/test/com/google/gwt/uibinder/rebind/AbstractUiBinderWriterTest.java
index 52eb316..7e6e40c 100644
--- a/user/test/com/google/gwt/uibinder/rebind/AbstractUiBinderWriterTest.java
+++ b/user/test/com/google/gwt/uibinder/rebind/AbstractUiBinderWriterTest.java
@@ -26,9 +26,7 @@
 import com.google.gwt.dev.util.collect.HashSet;
 import com.google.gwt.dev.util.log.PrintWriterTreeLogger;
 import com.google.gwt.uibinder.attributeparsers.AttributeParsers;
-import com.google.gwt.uibinder.attributeparsers.BundleAttributeParsers;
 import com.google.gwt.uibinder.rebind.messages.MessagesWriter;
-import com.google.gwt.uibinder.rebind.model.OwnerClass;
 import com.google.gwt.uibinder.test.UiJavaResources;
 
 import junit.framework.TestCase;
@@ -122,7 +120,6 @@
   protected PrintWriter printWriter;
   protected UiBinderWriter writer;
   protected UiBinderParser parser;
-  protected BundleAttributeParsers attributeParsers;
   protected XMLElementProvider elemProvider;
   protected XMLElement elm;
   protected FieldManager fieldManager;
@@ -142,7 +139,6 @@
     super(name);
   }
 
-  @SuppressWarnings("deprecation")
   @Override
   public void setUp() throws Exception {
     super.setUp();
@@ -161,17 +157,13 @@
     CompilationState state = CompilationStateBuilder.buildFrom(createCompileLogger(), resources);
     types = state.getTypeOracle();
     logger = new MockMortalLogger();
-    JClassType ownerType = types.findType(RENDERER_OWNER_CLASS_NAME);
     UiBinderContext uiBinderCtx = new UiBinderContext();
-    attributeParsers =
-        new BundleAttributeParsers(types, logger, new OwnerClass(ownerType, logger, uiBinderCtx),
-            "templatePath", ownerType);
     fieldManager = new FieldManager(types, logger, true);
     String baseClass = RENDERER_BASE_CLASS_NAME;
     DesignTimeUtils designTime = DesignTimeUtilsStub.EMPTY;
     elemProvider =
         new XMLElementProviderImpl(new AttributeParsers(types, fieldManager, logger),
-            attributeParsers, types, logger, designTime);
+            types, logger, designTime);
     doc = docHelper.documentFor(domString, rendererClass.getPath());
     item = (Element) doc.getDocumentElement().getChildNodes().item(0);
     elm = elemProvider.get(item);
diff --git a/user/test/com/google/gwt/uibinder/rebind/DesignTimeUtilsTest.java b/user/test/com/google/gwt/uibinder/rebind/DesignTimeUtilsTest.java
index 032730a..0e28f3a 100644
--- a/user/test/com/google/gwt/uibinder/rebind/DesignTimeUtilsTest.java
+++ b/user/test/com/google/gwt/uibinder/rebind/DesignTimeUtilsTest.java
@@ -23,6 +23,7 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
+import org.xml.sax.SAXParseException;
 
 import java.beans.Beans;
 import java.io.PrintWriter;
@@ -42,7 +43,7 @@
   /**
    * Test for {@link DesignTimeUtilsImpl#isDesignTime(String)}.
    */
-  public void test_isDesignTime_evaluate() throws Exception {
+  public void test_isDesignTime_evaluate() {
     // not design time
     {
       Beans.setDesignTime(false);
@@ -71,7 +72,7 @@
   /**
    * Test for {@link DesignTimeUtils#addDeclarations(IndentedWriter)}.
    */
-  public void test_addDeclarations_default() throws Exception {
+  public void test_addDeclarations_default() {
     String result = call_addDeclarations(stub);
     assertEquals("", result);
   }
@@ -79,7 +80,7 @@
   /**
    * Test for {@link DesignTimeUtils#addDeclarations(IndentedWriter)}.
    */
-  public void test_addDeclarations_designTime() throws Exception {
+  public void test_addDeclarations_designTime() {
     String result = call_addDeclarations(impl);
     assertContains(result, "public static interface DTObjectHandler");
     assertContains(result, "void handle(String path, Object object)");
@@ -104,7 +105,7 @@
   /**
    * Test for {@link DesignTimeUtils#getImplName(String)}.
    */
-  public void test_getImplName_default() throws Exception {
+  public void test_getImplName_default() {
     String basicName = "MyBinderImpl";
     String result = stub.getImplName(basicName);
     assertEquals(basicName, result);
@@ -113,7 +114,7 @@
   /**
    * Test for {@link DesignTimeUtils#getImplName(String)}.
    */
-  public void test_getImplName_designTime() throws Exception {
+  public void test_getImplName_designTime() {
     String basicName = "MyBinderImpl";
     String result = impl.getImplName(basicName);
     // has "_designTime" substring
@@ -128,7 +129,7 @@
   /**
    * Test for {@link DesignTimeUtils#getPath(Element)} and related methods.
    */
-  public void test_path_default() throws Exception {
+  public void test_path_default() throws SAXParseException {
     Document doc = docHelper.documentFor("<root><first/><second/></root>", null);
     stub.rememberPathForElements(doc);
     Element first = getChildElement(doc.getDocumentElement(), "first");
@@ -140,7 +141,7 @@
   /**
    * Test for {@link DesignTimeUtils#getPath(Element)} and related methods.
    */
-  public void test_path_designTime() throws Exception {
+  public void test_path_designTime() throws SAXParseException {
     Document doc = docHelper.documentFor(
         "<root><first/><second><subSecond/></second></root>", null);
     impl.rememberPathForElements(doc);
@@ -155,7 +156,7 @@
   /**
    * Test for {@link DesignTimeUtils#getProvidedField(String, String)}.
    */
-  public void test_getProvidedField_default() throws Exception {
+  public void test_getProvidedField_default() {
     String source = stub.getProvidedField("java.lang.String", "fieldName");
     assertEquals(null, source);
   }
@@ -163,7 +164,7 @@
   /**
    * Test for {@link DesignTimeUtils#getProvidedField(String, String)}.
    */
-  public void test_getProvidedField_designTime() throws Exception {
+  public void test_getProvidedField_designTime() {
     String source = impl.getProvidedField("java.lang.String", "fieldName");
     assertEquals("(java.lang.String) dtObjectHandler.provideField("
         + "java.lang.String.class, \"fieldName\")", source);
@@ -173,7 +174,7 @@
    * Test for {@link DesignTimeUtils#getProvidedFactory(String, String, String)}
    * .
    */
-  public void test_getProvidedFactory_default() throws Exception {
+  public void test_getProvidedFactory_default() {
     String source = stub.getProvidedFactory("java.lang.String", "methodName",
         "false, 1");
     assertEquals(null, source);
@@ -183,7 +184,7 @@
    * Test for {@link DesignTimeUtils#getProvidedFactory(String, String, String)}
    * .
    */
-  public void test_getProvidedFactory_designTime() throws Exception {
+  public void test_getProvidedFactory_designTime() {
     String source = impl.getProvidedFactory("java.lang.String", "methodName",
         "false, 1");
     assertEquals("(java.lang.String) dtObjectHandler.provideFactory("
@@ -194,7 +195,7 @@
   /**
    * Test for {@link DesignTimeUtils#getTemplateContent(String)}.
    */
-  public void test_getTemplateContent_default() throws Exception {
+  public void test_getTemplateContent_default() {
     String path = "the/path";
     assertEquals(null, stub.getTemplateContent(path));
   }
@@ -202,7 +203,7 @@
   /**
    * Test for {@link DesignTimeUtils#getTemplateContent(String)}.
    */
-  public void test_getTemplateContent_designTime() throws Exception {
+  public void test_getTemplateContent_designTime() {
     String path = "the/path";
     String key = "gwt.UiBinder.designTime " + path;
     try {
@@ -219,7 +220,7 @@
    * {@link DesignTimeUtils#handleUIObject(IUiBinderWriterStatements, XMLElement, String)}
    * .
    */
-  public void test_handleUIObject_default() throws Exception {
+  public void test_handleUIObject_default() {
     WriterStatements writer = new WriterStatements();
     stub.handleUIObject(writer, null, "myField");
     assertEquals(0, writer.statements.size());
@@ -230,7 +231,7 @@
    * {@link DesignTimeUtils#handleUIObject(IUiBinderWriterStatements, XMLElement, String)}
    * .
    */
-  public void test_handleUIObject_designTime() throws Exception {
+  public void test_handleUIObject_designTime() throws SAXParseException {
     // prepare XMLElement
     XMLElement element;
     {
@@ -256,14 +257,14 @@
   /**
    * Test for {@link DesignTimeUtils#isDesignTime()}.
    */
-  public void test_isDesignTime_default() throws Exception {
+  public void test_isDesignTime_default() {
     assertEquals(false, stub.isDesignTime());
   }
 
   /**
    * Test for {@link DesignTimeUtils#isDesignTime()}.
    */
-  public void test_getOwnerCheck_designTime() throws Exception {
+  public void test_getOwnerCheck_designTime() {
     assertEquals(true, impl.isDesignTime());
   }
 
@@ -271,7 +272,7 @@
    * Test for {@link DesignTimeUtils#putAttribute(XMLElement, String, String)}
    * and {@link DesignTimeUtils#writeAttributes(Statements)}.
    */
-  public void test_putAttribute_default() throws Exception {
+  public void test_putAttribute_default() throws SAXParseException {
     List<String> statements = call_putAttribute(stub);
     // validate
     assertEquals(0, statements.size());
@@ -281,15 +282,15 @@
    * Test for {@link DesignTimeUtils#putAttribute(XMLElement, String, String)}
    * and {@link DesignTimeUtils#writeAttributes(Statements)}.
    */
-  public void test_putAttribute_designTime() throws Exception {
+  public void test_putAttribute_designTime() throws SAXParseException {
     List<String> statements = call_putAttribute(impl);
     // validate
     assertEquals(1, statements.size());
     assertEquals("dtPutAttribute(\"0/0 attr\", val);", statements.get(0));
   }
 
-  private static List<String> call_putAttribute(DesignTimeUtils designTime)
-      throws Exception {
+  private static List<String> call_putAttribute(DesignTimeUtils designTime) throws SAXParseException
+      {
     // prepare XMLElement
     XMLElement element;
     {
@@ -314,7 +315,7 @@
    * Test for {@link DesignTimeUtils#putAttribute(XMLElement, String, String[])}
    * .
    */
-  public void test_putAttributeStrings_default() throws Exception {
+  public void test_putAttributeStrings_default() throws SAXParseException {
     List<String> statements = call_putAttributeStrings(new String[]{"a", "b"},
         stub);
     // validate
@@ -325,7 +326,7 @@
    * Test for {@link DesignTimeUtils#putAttribute(XMLElement, String, String[])}
    * .
    */
-  public void test_putAttributeStrings_designTime_empty() throws Exception {
+  public void test_putAttributeStrings_designTime_empty() throws SAXParseException {
     List<String> statements = call_putAttributeStrings(new String[]{}, impl);
     // validate
     assertEquals(0, statements.size());
@@ -335,7 +336,7 @@
    * Test for {@link DesignTimeUtils#putAttribute(XMLElement, String, String[])}
    * .
    */
-  public void test_putAttributeStrings_designTime() throws Exception {
+  public void test_putAttributeStrings_designTime() throws SAXParseException {
     List<String> statements = call_putAttributeStrings(new String[]{"a", "b"},
         impl);
     // validate
@@ -345,7 +346,7 @@
   }
 
   private static List<String> call_putAttributeStrings(String[] strings,
-      DesignTimeUtils designTime) throws Exception {
+      DesignTimeUtils designTime) throws SAXParseException {
     // prepare XMLElement
     XMLElement element;
     {
@@ -379,7 +380,7 @@
    */
   private static XMLElement createXMLElement(Element elem,
       DesignTimeUtils designTime) {
-    return new XMLElement(elem, null, null, null, null, designTime, null);
+    return new XMLElement(elem, null, null, null, designTime, null);
   }
 
   /**
diff --git a/user/test/com/google/gwt/uibinder/rebind/UiBinderParserUiWithTest.java b/user/test/com/google/gwt/uibinder/rebind/UiBinderParserUiWithTest.java
index 16a5e5d..3e4c155 100644
--- a/user/test/com/google/gwt/uibinder/rebind/UiBinderParserUiWithTest.java
+++ b/user/test/com/google/gwt/uibinder/rebind/UiBinderParserUiWithTest.java
@@ -25,7 +25,6 @@
 import com.google.gwt.dev.util.collect.HashSet;
 import com.google.gwt.dev.util.log.PrintWriterTreeLogger;
 import com.google.gwt.uibinder.attributeparsers.AttributeParsers;
-import com.google.gwt.uibinder.attributeparsers.BundleAttributeParsers;
 import com.google.gwt.uibinder.test.UiJavaResources;
 
 import junit.framework.TestCase;
@@ -125,7 +124,6 @@
   }
 
   UiBinderParser parser;
-  private BundleAttributeParsers attributeParsers;
   private Document doc;
   private XMLElementProvider elemProvider;
 
@@ -156,7 +154,6 @@
     CompilationState state = CompilationStateBuilder.buildFrom(createCompileLogger(), resources);
     types = state.getTypeOracle();
     logger = new MockMortalLogger();
-    attributeParsers = new BundleAttributeParsers(types, logger, null, "templatePath", null);
     fieldManager = new FieldManager(types, logger, true);
   }
 
@@ -271,8 +268,8 @@
       UnableToCompleteException {
     DesignTimeUtils designTime = DesignTimeUtilsStub.EMPTY;
     elemProvider =
-        new XMLElementProviderImpl(new AttributeParsers(types, null, logger), attributeParsers,
-            types, logger, designTime);
+        new XMLElementProviderImpl(new AttributeParsers(types, null, logger), types,
+            logger, designTime);
     doc = docHelper.documentFor(domString, null);
     item = (Element) doc.getDocumentElement().getElementsByTagName("with").item(0);
     elm = elemProvider.get(item);
diff --git a/user/test/com/google/gwt/uibinder/rebind/XMLElementTest.java b/user/test/com/google/gwt/uibinder/rebind/XMLElementTest.java
index 6d05932..97a13cc 100644
--- a/user/test/com/google/gwt/uibinder/rebind/XMLElementTest.java
+++ b/user/test/com/google/gwt/uibinder/rebind/XMLElementTest.java
@@ -23,7 +23,6 @@
 import com.google.gwt.dev.javac.testing.impl.MockResourceOracle;
 import com.google.gwt.dev.util.log.PrintWriterTreeLogger;
 import com.google.gwt.uibinder.attributeparsers.AttributeParsers;
-import com.google.gwt.uibinder.attributeparsers.BundleAttributeParsers;
 import com.google.gwt.uibinder.elementparsers.NullInterpreter;
 import com.google.gwt.uibinder.test.UiJavaResources;
 
@@ -58,14 +57,12 @@
 
   private TypeOracle types;
   private MockMortalLogger logger;
-  private BundleAttributeParsers attributeParsers;
 
   private Document doc;
   private XMLElementProvider elemProvider;
   private XMLElement elm;
   private Element item;
 
-  @SuppressWarnings("deprecation")
   @Override
   public void setUp() throws Exception {
     super.setUp();
@@ -73,8 +70,6 @@
         createCompileLogger(), UiJavaResources.getUiResources());
     types = state.getTypeOracle();
     logger = new MockMortalLogger();
-    attributeParsers = new BundleAttributeParsers(types, logger, null,
-        "templatePath", null);
     init(DesignTimeUtilsStub.EMPTY,
         "<doc><elm attr1=\"attr1Value\" attr2=\"attr2Value\"/></doc>");
   }
@@ -490,7 +485,7 @@
   private void init(DesignTimeUtils designTime, String domString)
       throws SAXParseException {
     elemProvider = new XMLElementProviderImpl(new AttributeParsers(types, null,
-        logger), attributeParsers, types, logger, designTime);
+        logger), types, logger, designTime);
     init(domString);
     designTime.rememberPathForElements(doc);
   }
diff --git a/user/test/com/google/gwt/uibinder/test/client/DomBasedUi.ui.xml b/user/test/com/google/gwt/uibinder/test/client/DomBasedUi.ui.xml
index 2377b41..794df55 100644
--- a/user/test/com/google/gwt/uibinder/test/client/DomBasedUi.ui.xml
+++ b/user/test/com/google/gwt/uibinder/test/client/DomBasedUi.ui.xml
@@ -13,14 +13,14 @@
 <!-- limitations under the License.                                         -->
 <ui:UiBinder
   xmlns:ui='urn:ui:com.google.gwt.uibinder'
-  xmlns:res='urn:with:com.google.gwt.uibinder.test.client.DomBasedUi.Resources'
   >
-  <div ui:field='root' res:class="style.bodyColor style.bodyFont" 
+  <ui:with field='res' type='com.google.gwt.uibinder.test.client.DomBasedUi.Resources' />
+  <div ui:field='root' class="{res.style.bodyColor} {res.style.bodyFont}" 
       title="The title of this div is localizable">
     <ui:attribute name='title'/>
     Hello, <span ui:field="nameSpan" />.
     <ui:msg>How goes it?</ui:msg>
-      <h2 res:class="style.bodyColor style.bodyFont">Placeholders in localizables</h2>
+      <h2 class="{res.style.bodyColor} {res.style.bodyFont}">Placeholders in localizables</h2>
       <p><ui:msg>When you mark up your text for translation, there will be bits
       that you don't want the translators to mess with. You can protect
       these with <span style="font-weight:bold"
diff --git a/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java b/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
index 8748ecd..db6badd 100644
--- a/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
+++ b/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
@@ -152,21 +152,6 @@
     assertEquals(foo.getText(), widgetUi.theFoo.getText());
   }
 
-  public void testBundleLegacyBeansText() {
-    assertEquals(widgetUi.legacyValuesForBeans.helloText(),
-        widgetUi.bundledLabelLegacy.getText());
-  }
-
-  public void testBundleLegacyBeansOther() {
-    assertEquals(widgetUi.legacyValuesForBeans.helloText(),
-        widgetUi.bundledLabelLegacy.getStyleName());
-  }
-
-  public void testBundleLegacyHtml() {
-    assertEquals(widgetUi.legacyValuesForHtml.helloText(),
-        widgetUi.bundledDivLegacy.getClassName());
-  }
-
   public void testCenter() {
     // TODO(rjrjr) More of a test of HTMLPanelParser
 
@@ -564,7 +549,7 @@
   }
 
   public void testDataResource() {
-    assertNotNull(widgetUi.heartCursorResource.getUrl());
+    assertNotNull(widgetUi.heartCursorResource.getSafeUri());
   }
 
   public void testCssImportedScopes() {
diff --git a/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java b/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java
index 0ceb549..e1c676f 100644
--- a/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java
+++ b/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java
@@ -25,12 +25,12 @@
 import com.google.gwt.dom.client.SpanElement;
 import com.google.gwt.dom.client.TableElement;
 import com.google.gwt.i18n.client.DateTimeFormat;
-import com.google.gwt.i18n.client.NumberFormat;
 import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
+import com.google.gwt.i18n.client.NumberFormat;
 import com.google.gwt.resources.client.CssResource;
+import com.google.gwt.resources.client.CssResource.Shared;
 import com.google.gwt.resources.client.DataResource;
 import com.google.gwt.resources.client.ImageResource;
-import com.google.gwt.resources.client.CssResource.Shared;
 import com.google.gwt.text.client.DoubleRenderer;
 import com.google.gwt.text.shared.Renderer;
 import com.google.gwt.uibinder.client.UiBinder;
@@ -41,6 +41,7 @@
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.DateLabel;
 import com.google.gwt.user.client.ui.DisclosurePanel;
+import com.google.gwt.user.client.ui.DockPanel;
 import com.google.gwt.user.client.ui.Grid;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.HTMLPanel;
@@ -122,8 +123,7 @@
   @UiField TreeItem myTreeItemCA;
   @UiField Widget myTreeWidgetCB;
   @UiField Element nonStandardElement;
-  @SuppressWarnings("deprecation")
-  @UiField com.google.gwt.user.client.ui.DockPanel root;
+  @UiField DockPanel root;
   @UiField Widget sideBarWidget;
   @UiField DivElement sideBar;
   @UiField SpanElement spanInMsg;
@@ -173,12 +173,6 @@
   @UiField FooLabel objectBooleanIntoPrimitive;
   @UiField FooLabel allObjectBoolean;
   @UiField FooLabel allPrimitiveBoolean;
-  @UiField(provided = true) @SuppressWarnings("uibinder")
-  FakeBundle2 legacyValuesForBeans = new FakeBundle2();
-  @UiField(provided = true) @SuppressWarnings("uibinder")
-  FakeBundle3 legacyValuesForHtml = new FakeBundle3();
-  @UiField Label bundledLabelLegacy;
-  @UiField DivElement bundledDivLegacy;
   @UiField ToggleButton toggle;
   @UiField HTML styleLess;
   @UiField FooDialog fooDialog;
diff --git a/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml b/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml
index 03376f3..ea5911f 100644
--- a/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml
+++ b/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml
@@ -51,9 +51,6 @@
   xmlns:gwt3='urn:import:com'
   xmlns:demo='urn:import:com.google.gwt.uibinder.test.client'
 
-  xmlns:legacyValuesForBeans='urn:with:com.google.gwt.uibinder.test.client.WidgetBasedUi.FakeBundle2'
-  xmlns:legacyValuesForHtml='urn:with:com.google.gwt.uibinder.test.client.WidgetBasedUi.FakeBundle3'
-
   ui:baseMessagesInterface="com.google.gwt.uibinder.test.client.MyMessages"
   ui:defaultLocale="en_US"
   ui:generateKeys="com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator"
@@ -460,8 +457,6 @@
        this label gets its text from somplace tricky and its style from a ClientBundle
        defined outside of this UI:</p>
       <gwt:Label ui:field='bundledLabel' text="{values.helloText}" styleName="{external.style.prettyText}"/>
-      <gwt:Label ui:field='bundledLabelLegacy' legacyValuesForBeans:text="helloText" legacyValuesForBeans:styleName="helloText" />
-      <div ui:field='bundledDivLegacy' legacyValuesForHtml:class="helloText"/>
       <!-- Note use of id rather than ui:field, to test that ids work on dom elements -->
       <p class="{external.style.prettyText}" id='prettyPara'>
         This stylish paragraph also gets its good looks from the