Restores old interface for GWT Designer.
Change-Id: I64b261f7121a9ab4af294fcf4c7fbf020bd3af14
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java b/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
index 35513e6..046548e 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
@@ -479,6 +479,16 @@
return name;
}
+ /**
+ * Provided for Designer compatibility. Do not use.
+ */
+ @Deprecated
+ public CompilationState getCompilationState(TreeLogger logger)
+ throws UnableToCompleteException {
+ CompilerContext emptyCompilerContext = new CompilerContext.Builder().build();
+ return getCompilationState(logger, emptyCompilerContext);
+ }
+
public CompilationState getCompilationState(TreeLogger logger, CompilerContext compilerContext)
throws UnableToCompleteException {
doRefresh();
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java b/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
index b584c01..a3ed802 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
@@ -123,6 +123,19 @@
}
/**
+ * Loads a new (assumed monolithic) module from the class path and may or may not immediately
+ * scan associated directories for resources.<br />
+ *
+ * Provided for Designer compatibility. Do not use.
+ */
+ @Deprecated
+ public static ModuleDef loadFromClassPath(TreeLogger logger, String moduleName, boolean refresh)
+ throws UnableToCompleteException {
+ CompilerContext emptyCompilerContext = new CompilerContext.Builder().build();
+ return loadFromClassPath(logger, emptyCompilerContext, moduleName, refresh, true);
+ }
+
+ /**
* Loads a new module from the class path and may or may not immediately scan associated
* directories for resources or consider it monolithic, depending on parameters.
*/
diff --git a/user/src/com/google/gwt/user/client/DOM.java b/user/src/com/google/gwt/user/client/DOM.java
index 61cff42..ee62b63 100644
--- a/user/src/com/google/gwt/user/client/DOM.java
+++ b/user/src/com/google/gwt/user/client/DOM.java
@@ -91,6 +91,23 @@
* @param child its new child
* @see com.google.gwt.user.client.ui.PotentialElement#resolve(Element)
*/
+ @Deprecated
+ public static void appendChild(com.google.gwt.user.client.Element parent,
+ com.google.gwt.user.client.Element child) {
+ appendChild((Element) parent, (Element) child);
+ }
+
+ /**
+ * Appends one element to another's list of children.
+ * <p>
+ * If the child element is a {@link com.google.gwt.user.client.ui.PotentialElement}, it is first
+ * resolved.
+ * </p>
+ *
+ * @param parent the parent element
+ * @param child its new child
+ * @see com.google.gwt.user.client.ui.PotentialElement#resolve(Element)
+ */
public static void appendChild(Element parent, Element child) {
assert !PotentialElement.isPotential(parent) : "Cannot append to a PotentialElement";
@@ -703,6 +720,19 @@
/**
* Gets an element's absolute left coordinate in the document's coordinate
* system.
+ *
+ * @param elem the element to be measured
+ * @return the element's absolute left coordinate
+ * @deprecated Use {@link Element#getAbsoluteLeft()} instead.
+ */
+ @Deprecated
+ public static int getAbsoluteLeft(com.google.gwt.user.client.Element elem) {
+ return getAbsoluteLeft((Element) elem);
+ }
+
+ /**
+ * Gets an element's absolute left coordinate in the document's coordinate
+ * system.
*
* @param elem the element to be measured
* @return the element's absolute left coordinate
@@ -716,6 +746,19 @@
/**
* Gets an element's absolute top coordinate in the document's coordinate
* system.
+ *
+ * @param elem the element to be measured
+ * @return the element's absolute top coordinate
+ * @deprecated Use {@link Element#getAbsoluteTop()} instead.
+ */
+ @Deprecated
+ public static int getAbsoluteTop(com.google.gwt.user.client.Element elem) {
+ return getAbsoluteTop((Element) elem);
+ }
+
+ /**
+ * Gets an element's absolute top coordinate in the document's coordinate
+ * system.
*
* @param elem the element to be measured
* @return the element's absolute top coordinate
@@ -766,6 +809,19 @@
/**
* Gets an element's n-th child element.
+ *
+ * @param parent the element whose child is to be retrieved
+ * @param index the index of the child element
+ * @return the n-th child element
+ */
+ @Deprecated
+ public static com.google.gwt.user.client.Element getChild(
+ com.google.gwt.user.client.Element parent, int index) {
+ return getChild((Element) parent, index);
+ }
+
+ /**
+ * Gets an element's n-th child element.
*
* @param parent the element whose child is to be retrieved
* @param index the index of the child element
@@ -777,6 +833,17 @@
/**
* Gets the number of child elements present in a given parent element.
+ *
+ * @param parent the element whose children are to be counted
+ * @return the number of children
+ */
+ @Deprecated
+ public static int getChildCount(com.google.gwt.user.client.Element parent) {
+ return getChildCount((Element) parent);
+ }
+
+ /**
+ * Gets the number of child elements present in a given parent element.
*
* @param parent the element whose children are to be counted
* @return the number of children
@@ -787,6 +854,20 @@
/**
* Gets the index of a given child element within its parent.
+ *
+ * @param parent the parent element
+ * @param child the child element
+ * @return the child's index within its parent, or <code>-1</code> if it is
+ * not a child of the given parent
+ */
+ @Deprecated
+ public static int getChildIndex(com.google.gwt.user.client.Element parent,
+ com.google.gwt.user.client.Element child) {
+ return getChildIndex((Element) parent, (Element) child);
+ }
+
+ /**
+ * Gets the index of a given child element within its parent.
*
* @param parent the parent element
* @param child the child element
@@ -799,6 +880,19 @@
/**
* Gets the named attribute from the element.
+ *
+ * @param elem the element whose property is to be retrieved
+ * @param attr the name of the attribute
+ * @return the value of the attribute
+ * @deprecated Use {@link Element#getAttribute(String)} instead.
+ */
+ @Deprecated
+ public static String getElementAttribute(com.google.gwt.user.client.Element elem, String attr) {
+ return getElementAttribute((Element) elem, attr);
+ }
+
+ /**
+ * Gets the named attribute from the element.
*
* @param elem the element whose property is to be retrieved
* @param attr the name of the attribute
@@ -813,7 +907,7 @@
/**
* Gets the element associated with the given unique id within the entire
* document.
- *
+ *
* @param id the id whose associated element is to be retrieved
* @return the associated element, or <code>null</code> if none is found
*/
@@ -823,6 +917,19 @@
/**
* Gets any named property from an element, as a string.
+ *
+ * @param elem the element whose property is to be retrieved
+ * @param prop the name of the property
+ * @return the property's value
+ * @deprecated Use {@link Element#getProperty(String)} instead.
+ */
+ @Deprecated
+ public static String getElementProperty(com.google.gwt.user.client.Element elem, String prop) {
+ return getElementProperty((Element) elem, prop);
+ }
+
+ /**
+ * Gets any named property from an element, as a string.
*
* @param elem the element whose property is to be retrieved
* @param prop the name of the property
@@ -906,6 +1013,18 @@
/**
* Gets an HTML representation of an element's children.
+ *
+ * @param elem the element whose HTML is to be retrieved
+ * @return the HTML representation of the element's children
+ * @deprecated Use {@link Element#getInnerHTML()} instead.
+ */
+ @Deprecated
+ public static String getInnerHTML(com.google.gwt.user.client.Element elem) {
+ return getInnerHTML((Element) elem);
+ }
+
+ /**
+ * Gets an HTML representation of an element's children.
*
* @param elem the element whose HTML is to be retrieved
* @return the HTML representation of the element's children
@@ -919,6 +1038,19 @@
/**
* Gets the text contained within an element. If the element has child
* elements, only the text between them will be retrieved.
+ *
+ * @param elem the element whose inner text is to be retrieved
+ * @return the text inside this element
+ * @deprecated Use {@link Element#getInnerText()} instead.
+ */
+ @Deprecated
+ public static String getInnerText(com.google.gwt.user.client.Element elem) {
+ return getInnerText((Element) elem);
+ }
+
+ /**
+ * Gets the text contained within an element. If the element has child
+ * elements, only the text between them will be retrieved.
*
* @param elem the element whose inner text is to be retrieved
* @return the text inside this element
@@ -939,6 +1071,20 @@
* {@link Element#getPropertyInt(String)} instead.
*/
@Deprecated
+ public static int getIntAttribute(com.google.gwt.user.client.Element elem, String attr) {
+ return getIntAttribute((Element) elem, attr);
+ }
+
+ /**
+ * Gets an integer property on a given element.
+ *
+ * @param elem the element whose property is to be retrieved
+ * @param attr the name of the property to be retrieved
+ * @return the property's value as an integer
+ * @deprecated Use the more appropriately named
+ * {@link Element#getPropertyInt(String)} instead.
+ */
+ @Deprecated
public static int getIntAttribute(Element elem, String attr) {
return elem.getPropertyInt(attr);
}
@@ -966,6 +1112,18 @@
/**
* Gets an element's parent element.
+ *
+ * @param elem the element whose parent is to be retrieved
+ * @return the parent element
+ */
+ @Deprecated
+ public static com.google.gwt.user.client.Element getParent(
+ com.google.gwt.user.client.Element elem) {
+ return getParent((Element) elem);
+ }
+
+ /**
+ * Gets an element's parent element.
*
* @param elem the element whose parent is to be retrieved
* @return the parent element
@@ -976,6 +1134,20 @@
/**
* Gets an attribute of the given element's style.
+ *
+ * @param elem the element whose style attribute is to be retrieved
+ * @param attr the name of the style attribute to be retrieved
+ * @return the style attribute's value
+ * @deprecated Use {@link Element#getStyle()} and
+ * {@link Style#getProperty(String)} instead.
+ */
+ @Deprecated
+ public static String getStyleAttribute(com.google.gwt.user.client.Element elem, String attr) {
+ return getStyleAttribute((Element) elem, attr);
+ }
+
+ /**
+ * Gets an attribute of the given element's style.
*
* @param elem the element whose style attribute is to be retrieved
* @param attr the name of the style attribute to be retrieved
@@ -1016,6 +1188,26 @@
* If the child element is a {@link com.google.gwt.user.client.ui.PotentialElement}, it is first
* resolved.
* </p>
+ *
+ * @param parent the parent element
+ * @param child the child element to add to <code>parent</code>
+ * @param index the index before which the child will be inserted (any value
+ * greater than the number of existing children will cause the child
+ * to be appended)
+ * @see com.google.gwt.user.client.ui.PotentialElement#resolve(Element)
+ */
+ @Deprecated
+ public static void insertChild(com.google.gwt.user.client.Element parent,
+ com.google.gwt.user.client.Element child, int index) {
+ insertChild((Element) parent, (Element) child, index);
+ }
+
+ /**
+ * Inserts an element as a child of the given parent element.
+ * <p>
+ * If the child element is a {@link com.google.gwt.user.client.ui.PotentialElement}, it is first
+ * resolved.
+ * </p>
*
* @param parent the parent element
* @param child the child element to add to <code>parent</code>
@@ -1091,6 +1283,19 @@
/**
* Removes a child element from the given parent element.
+ *
+ * @param parent the parent element
+ * @param child the child element to be removed
+ * @deprecated Use {@link Element#removeChild(Element)} instead.
+ */
+ @Deprecated
+ public static void removeChild(com.google.gwt.user.client.Element parent,
+ com.google.gwt.user.client.Element child) {
+ removeChild((Element) parent, (Element) child);
+ }
+
+ /**
+ * Removes a child element from the given parent element.
*
* @param parent the parent element
* @param child the child element to be removed
@@ -1202,6 +1407,20 @@
/**
* Sets a property on the given element.
+ *
+ * @param elem the element whose property is to be set
+ * @param prop the name of the property to be set
+ * @param value the new property value
+ * @deprecated Use {@link Element#setPropertyString(String, String)} instead.
+ */
+ @Deprecated
+ public static void setElementProperty(com.google.gwt.user.client.Element elem,
+ String prop, String value) {
+ setElementProperty((Element) elem, prop, value);
+ }
+
+ /**
+ * Sets a property on the given element.
*
* @param elem the element whose property is to be set
* @param prop the name of the property to be set
@@ -1325,6 +1544,21 @@
/**
* Sets an attribute on the given element's style.
+ *
+ * @param elem the element whose style attribute is to be set
+ * @param attr the name of the style attribute to be set
+ * @param value the style attribute's new value
+ * @deprecated Use {@link Element#getStyle()} and
+ * {@link Style#setProperty(String, String)} instead.
+ */
+ @Deprecated
+ public static void setStyleAttribute(com.google.gwt.user.client.Element elem,
+ String attr, String value) {
+ setStyleAttribute((Element) elem, attr, value);
+ }
+
+ /**
+ * Sets an attribute on the given element's style.
*
* @param elem the element whose style attribute is to be set
* @param attr the name of the style attribute to be set
@@ -1364,6 +1598,19 @@
/**
* Returns a stringized version of the element. This string is for debugging
* purposes and will NOT be consistent on different browsers.
+ *
+ * @param elem the element to stringize
+ * @return a string form of the element
+ * @deprecated Use {@link Element#getString()} instead.
+ */
+ @Deprecated
+ public static String toString(com.google.gwt.user.client.Element elem) {
+ return toString((Element) elem);
+ }
+
+ /**
+ * Returns a stringized version of the element. This string is for debugging
+ * purposes and will NOT be consistent on different browsers.
*
* @param elem the element to stringize
* @return a string form of the element