Hehe, yes it would Wolfgang. The clarity a nights sleep brings.<br><br>Thanks.<br><br><div class="gmail_quote">On 8 May 2011 07:22, Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Surely using the (not extremely long) full class path would avoid all import callisthenics?<br>
-W<br><br><div class="gmail_quote"><div><div></div><div class="h5">On 7 May 2011 23:42, Michael Anstis <span dir="ltr"><<a href="mailto:michael.anstis@gmail.com" target="_blank">michael.anstis@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Hi,<br><br>I'm fixing a bug in all of Guvnors' guided editors: <a href="https://issues.jboss.org/browse/GUVNOR-1362" target="_blank">https://issues.jboss.org/browse/GUVNOR-1362</a><br>
<br>The existing problem is if a model Date field is set in one of the guided editors RHS we need to convert the String into a Date for use in the set Method (currently we attempt to pass the String which fails).<br>
<br>I have a working solution however it requires the user to explicitly add a package import for "java.text.SimpleDateFormat" that handles the parsing. This can be accomplished through the UI.<br><br>I have two options to remove the need for the user to do anything:-<br>
<br>(1) Pre-process all rules to be included in the package, check if one uses Date in the RHS and if so add an import into the header. I'd need to pre-process all rules as the package DRL String is built linearly and by the time the package compiler gets to a rule that uses a Date in the RHS the header, including imports, has already been built.<br>
<br>(2) Add (another) implicit import into *all* packages. I assume we already do something like this for the boxed primitives and some others (List? Collection? Map? etc).<br><br>Before I venture into option (1) can any (core) developer advise (1) where can I add an additional implicit import (I assume the compiler somewhere), (2) is this simpler solution acceptable to the (core) developers?<br>
<br>Thanks,<br><br>Mike <br><br>
<br></div></div>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>