Recent Changes‎ > ‎

Improved Rendering Error Diagnostics

posted Jun 13, 2011, 1:47 PM by Tor Norbye
The error console, which is shown at the bottom of the layout editor if any errors or warnings are encountered when the layout is rendered, now contains additional "action links" to help resolve certain types of errors.

For example, if it cannot find a class referenced in the layout, it will add a link to "Fix Build Path", which will open the Java Build Path page in the project's options dialog, where you can configure the project class path assuming the view is in some library you haven't configured for this project.

A particularly useful check is the "misspelling" analysis. It checks whether the name of the view is a misspelling of any of the built-in views, or any of the custom views in the project, and if so, it lists a suggestion you can click on to fix the typo.

For example, here's what you see if you add an <AnalogueClock/> element in the layout:
The first link offers to edit the name of the layout from AnalogueClock to AnalogClock.

A similar scenario is forgetting to include the full package name when specifying a custom view:
There are other action links too, such as creating a new class (only shown when the missing class appears to be a custom view), or opening the error log (when the class exists, but its constructor throws an error).