More root fun
Geoff Longman <[email protected]> Mon, 6 Feb 2006 02:11:13 -0500
| Newsgroups | gmane.comp.ide.eclipse.spindle.devel |
|---|---|
| Message-ID | <[email protected]> |
Have been looking at the NamespaceResolver, the class I want to write unit tests against (tests that will run outside of Eclipse). The more I look at it the more it appears that the simple JarClasspathRoot implementation I built on Sat is not sufficient. I have spent the evening building full implementations of Context and Classpath roots. It took a while so I didn't have time to write more tests. Although, the tests I wrote on sat still run (a good sign!). Here's how one would use the roots. lets say we need a ClasspathRoot and the classpath contains: src1 jar1 src2 jar2 assuming the above list is the classpath order and that each label above is a java.io.File, ClasspathRoot root = new ClasspathRoot(); root.addFolder(src1); root.addJar(jar1); root.addFolder(src2); root.addJar(jar2); that's it, the root is built. Context is easier if you expect an exploded war layout (like Spindle does today). ContextRoot root = new ContextRoot(); root.addFolder(explodedWarFolder); and we are done. The implementation does allow one to add more than one folder to the context root. As I said, I just finished writing these and need to write tests too. Geoff -- The Spindle guy. http://spindle.sf.net Get help with Spindle: http://lists.sourceforge.net/mailman/listinfo/spindle-user Blog: http://jroller.com/page/glongman Feature Updates: http://spindle.sf.net/updates ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642