Surely using the (not extremely long) full class path would avoid all import callisthenics?
-W
Hi,
I'm fixing a bug in all of Guvnors' guided editors: https://issues.jboss.org/browse/GUVNOR-1362
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).
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.
I have two options to remove the need for the user to do anything:-
(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.
(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).
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?
Thanks,
Mike
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev