Remove check to UiElementNode.hasError() in format call

The XML editor would check node.hasError() and only format if that
method returned false.  The idea is that it shouldn't attempt to
prettyprint a DOM that might contain errors.

However, turns out that method is unrelated to the DOM model; it's
simply an error state which can be *set* on nodes. This is used by for
example the manifest editor to put error icons on certain
fields. However, it is never set on nodes in the layout editor, and
calling hasError() isn't cheap (because it iterates over all
attributes and recursively over all the children checking the hasError
state on all of them). Since this will never return true, we might as
well remove the call.

Change-Id: Iae176c8de1bb28460835a41faad75324acf97ebf
1 file changed