WCK's folder/package structure and ASDOC

Hey all, I'm trying to document my codebase and trying to use ASDOC. I'm running into some issues where the ASDOCr tool and a few other options are basically complaining about the structure of WCK's code files.

Ultimately, I get a message like the following:
Quote:
/<mycomputerpathtotheproject>/src/wck-lib/Box2DAS/Dynamics/b2ContactListener.as: Error: A file found in a source-path must have the same package structure 'wck-lib.Box2DAS.Dynamics', as the definition's package, 'Box2DAS.Dynamics'.


It's complaining that the folder structure conveys the package wck-lib, yet all of the package names disregard the presence of the wck-lib folder and just assume you'll put that folder as a classpath. ASDOC hates this apparently and doesn't seem to get beyond just complaining about the discrepancy between the folder structure and the package structure written in the files.

I was wondering if anyone else has used ASDOC enough to help me figure out how to work around this problem. The sure fire solution is to kick everything out of the wck-lib folder, but that could potentially cause issues for me when I update to a newer version of WCK or anything like that where I've altered the code base and I'm unable to merge changes quickly.

Thanks. Hope that makes sense. Ask questions if you have any.
I think I'm also a bit curious as to why the code base was never reverse domain referenced in the first place.

... something like com.sideroller.wck-lib with V2 having a package name and exactly matching folder location of com.sideroller.wck-lib.Box2DAS.Common.V2

I'm not exactly ranting, but I've always thought the manner in which packages/folders were organized was a bit peculiar, having a duality where wck-lib is the inferred package name because all of the files are in it, while the packages don't acknowledge the existence of their parent folder as part of the package just seems a little weird to me.

Love to hear some thoughts on it. I'm not for stirring the pot if there's not a reason I feel strongly enough about. I think the consistency that you normally find package names and the like helped me to become a better Flash programmer, albeit in a small way.
You probably got started using that tutorial on the WIKI that says something like "copy files into wck-lib in your project folder". I don't work this way. I keep my WCK stuff and project stuff completely separate and just include both source paths in Flash (which you have to do anyway even if they share folders).

I think with ASDOC there should be a way to include more than one directory. For example maybe something like:

asdoc -doc-sources /stuff/wck /stuff/my-project

I'm not sure that's the right option but should give you the idea. Since "wck" is not in the "my-project" folder it shouldn't see it as a sub package.

As far as com.sideroller.wck for the package: I just can't stand deeply nested directories, that's all. Also it's nice when defining assets to just type "shapes.Box" into the class name rather than "com.sideroller.wck.shapes.Box".
Yea, I've included multiple ones. It just sees the gravity folder sitting in the folder (you're right, I followed the wiki instructions) wck-lib and asks, "why isn't gravity in the wck-lib.gravity package?" It's not as forgiving, apparently, as the Flash IDE and Flash Builder both are. It's going off of appearances of the folder structure. Instead of allowing me to clarify, it just refuses to work. I think it wouldn't be a deal if I didn't have the wck-lib in the source path and instead had it off to the side, maybe it wouldn't have an issue. But I think it sees it from both perspectives and takes issue. It's both in the source path and you're telling me it's in this other path. Anyways...

I'll just have to figure out how to restructure things safely so that I can successfully run ASDoc without all of the whining. I just wanted the process of integrating future builds of your code to be easy. I think I'm tip-toeing on the line of "find and replace" on package names every time someone would pull new wck related code files down.

I hear you on the package name typing. I usually have the ones I need off in TextMate selected and ready to be copied and pasted.

Thanks for the help.

Original thread: https://box2d.org/forum/viewtopic.php?t=6928