JDepend jdepend = new JDepend(packageFilter);
jdepend.addDirectory("classes");
DependencyConstraint constraint = new DependencyConstraint();
// Sweet Home 3D packages
JavaPackage sweetHome3DModel = constraint.addPackage("com.eteks.sweethome3d.model");
JavaPackage sweetHome3DTools = constraint.addPackage("com.eteks.sweethome3d.tools");
JavaPackage sweetHome3DPlugin = constraint.addPackage("com.eteks.sweethome3d.plugin");
JavaPackage sweetHome3DViewController = constraint.addPackage("com.eteks.sweethome3d.viewcontroller");
JavaPackage sweetHome3DSwing = constraint.addPackage("com.eteks.sweethome3d.swing");
JavaPackage sweetHome3DJava3D = constraint.addPackage("com.eteks.sweethome3d.j3d");
JavaPackage sweetHome3DIO = constraint.addPackage("com.eteks.sweethome3d.io");
JavaPackage sweetHome3DApplication = constraint.addPackage("com.eteks.sweethome3d");
JavaPackage sweetHome3DApplet = constraint.addPackage("com.eteks.sweethome3d.applet");
// Swing components packages
JavaPackage swing = constraint.addPackage("javax.swing");
JavaPackage imageio = constraint.addPackage("javax.imageio");
// Java 3D
JavaPackage java3d = constraint.addPackage("javax.media.j3d");
JavaPackage vecmath = constraint.addPackage("javax.vecmath");
JavaPackage sun3dLoaders = constraint.addPackage("com.sun.j3d.loaders");
JavaPackage sun3dLoadersLw3d = constraint.addPackage("com.sun.j3d.loaders.lw3d");
JavaPackage sun3dUtilsGeometry = constraint.addPackage("com.sun.j3d.utils.geometry");
JavaPackage sun3dUtilsImage = constraint.addPackage("com.sun.j3d.utils.image");
JavaPackage sun3dUtilsUniverse = constraint.addPackage("com.sun.j3d.utils.universe");
JavaPackage sun3dExpSwing = constraint.addPackage("com.sun.j3d.exp.swing.JCanvas3D");
JavaPackage loader3ds = constraint.addPackage("com.microcrowd.loader.java3d.max3ds");
// XML
JavaPackage xmlParsers = constraint.addPackage("javax.xml.parsers");
JavaPackage xmlSax = constraint.addPackage("org.xml.sax");
JavaPackage xmlSaxHelpers = constraint.addPackage("org.xml.sax.helpers");
// JMF
JavaPackage jmf = constraint.addPackage("javax.media");
JavaPackage jmfControl = constraint.addPackage("javax.media.control");
JavaPackage jmfDataSink = constraint.addPackage("javax.media.datasink");
JavaPackage jmfFormat = constraint.addPackage("javax.media.format");
JavaPackage jmfProtocol = constraint.addPackage("javax.media.protocol");
// SunFlow
JavaPackage sunflow = constraint.addPackage("org.sunflow");
JavaPackage sunflowCore = constraint.addPackage("org.sunflow.core");
JavaPackage sunflowCoreLight = constraint.addPackage("org.sunflow.core.light");
JavaPackage sunflowCorePrimitive = constraint.addPackage("org.sunflow.core.primitive");
JavaPackage sunflowImage = constraint.addPackage("org.sunflow.image");
JavaPackage sunflowMath = constraint.addPackage("org.sunflow.math");
JavaPackage sunflowSystem = constraint.addPackage("org.sunflow.system");
JavaPackage sunflowSystemUI = constraint.addPackage("org.sunflow.system.ui");
// iText for PDF
JavaPackage iText = constraint.addPackage("com.lowagie.text");
JavaPackage iTextPdf = constraint.addPackage("com.lowagie.text.pdf");
// FreeHEP Vector Graphics for SVG
JavaPackage vectorGraphicsUtil = constraint.addPackage("org.freehep.util");
JavaPackage vectorGraphicsSvg = constraint.addPackage("org.freehep.graphicsio.svg");
// Java JNLP
JavaPackage jnlp = constraint.addPackage("javax.jnlp");
// Mac OS X specific interfaces
JavaPackage eawt = constraint.addPackage("com.applet.eawt");
JavaPackage eio = constraint.addPackage("com.applet.eio");
// Describe dependencies : model don't have any dependency on
// other packages, IO and View/Controller packages ignore each other
// and Swing components and Java 3D use is isolated in sweetHome3DSwing
sweetHome3DTools.dependsUpon(sweetHome3DModel);