> package foo; > class Bar { > // this is a class that will be generated into the same package ("foo") > private Zap; > } > > IMHO we should instantiate an UnknownClass("foo.Zap") here instead of > UnknownClass("Zap"). Nobody uses classes in the default package scope, and > there are no import xxx.* statements, so "foo.Zap" is a fair assumption. > > Then consider: > > package foo; > import bob.*; > class Bar { > // this is a class that will be generated into the "bob" package > private Zap; > } > > Here there *are* import xxx.* statements, so it's impossible for xjavadoc > to > resolve Zap. > We could warn OR throw an exception here. The message should say something > nicely verbose like: > "The Zap class could be in the following packages: [foo,bob], but xjavadoc > can't decide since there is no qualified import for Zap, and Zap is not > found on the classpath (perhaps it's a class that doesn't exist yet?). > Please include an import statement for Zap using its fully qualified > name". > > Whether xjavadoc should warn or throw an exception can be decided based on > a > system property: xjavadoc.class.qualify=WARN|EXCEPTION where EXCEPTION is > the default. > > Waddaya think?
I like it. Show the warning always, but only in the end of the process imho. One big statement like this: Ambiguous class were found, xjavadoc can't decide since there is no qualified import for a class, and that class is not found on the classpath (perhaps it's a class that doesn't exist yet? Not yet generated?). Please include an import statement for Zap using its fully qualified name. Here are the classes: foo.Bar -> Zap (line 6) foo.Tull -> Tall (line 12) And so on. So we don't show irritating long messages but a condensed one. And you're building often, right? So the list won't be after all very long. Aslak, is it possible to show line numbers? Btw, xdoclet is stuck afaik when a class has a compilation error. Can you plz review the error reporting logic of xjavadoc? Ara. _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel