I was thinking that something along the lines of a BXML 'checker' would be
useful and probably be part of any forthcoming GUI creation/editing tools.

Perhaps it could simply be an Ant task wrapper for BXMLSerializer which
would spit out warnings & errors, but also perform tasks such as reporting
any @BXML annotated fields that are null after binding, missing or unused
namespaces etc.  If so, and following with the 'BXML is for more than just
GUI creation' thinking, it would be a tool in its own right.

I haven't thought this through in any level of detail, but anything which
might help new users get started with using BXML would be beneficial.  Over
the last couple of months there have been a number of patches & improvements
to the BXML/WTKXSerializer classes to improve the quality of error
reporting, but I'm sure that more can be done to help catch some of the more
simple slip ups.

Regards,

Chris

On Thu, Jul 22, 2010 at 9:32 PM, Greg Brown (JIRA) <[email protected]> wrote:

>
>    [
> https://issues.apache.org/jira/browse/PIVOT-578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891190#action_12891190]
>
> Greg Brown commented on PIVOT-578:
> ----------------------------------
>
> I can see some potential value in it, but I think you should try to more
> clearly articulate what problem you are trying to solve and how you plan to
> solve it. BXML is primarily a shortcut for creating Java object hierarchies.
> You can write comparable Java code by hand to produce the same result - what
> benefits does the Java compiler offer you in this case that BXML currently
> does not?
>
> I'm not sure annotations will offer much here. What you are describing
> seems more along the lines of "javac for BXML", only it wouldn't produce
> compiled class files - only a boolean "valid" result. But you need to define
> what "valid" means. Again, I suspect that you might end up simply re-writing
> BXMLSerializer in order to determine a BXML document's validity.
>
>
> > create an annotation to check at compile time bxml files
> > --------------------------------------------------------
> >
> >                 Key: PIVOT-578
> >                 URL: https://issues.apache.org/jira/browse/PIVOT-578
> >             Project: Pivot
> >          Issue Type: New Feature
> >            Reporter: Sandro Martini
> >            Assignee: Sandro Martini
> >            Priority: Minor
> >
> > In some cases could be useful to have an optional annotation to check
> (but at compile time) bxml files, so when application grows, less tests
> should be done by hand. This could be a great plus.
> > For example checks could be more, ranging from existence of the resource
> file, to check for a well-formed structure, to a well-formed contents (if
> possible) ...
> > At the moment this is only an experimental (optional) feature.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Reply via email to