public int getMethodCount() { return graph.getVertexCount(); }
private int xsize(final DirectedGraph<ElementName, Dependency> cycle) { return Math.max(600, cycle.getVertexCount() * 90); }
private int xsize(final DirectedGraph<ElementName, Dependency> cycle) { return Math.max(600, cycle.getVertexCount() * 90); }
private int ysize(final DirectedGraph<ElementName, Dependency> cycle) { return Math.max(100, cycle.getVertexCount() * 90); }
private int ysize(final DirectedGraph<ElementName, Dependency> cycle) { return Math.max(100, cycle.getVertexCount() * 90); }
private int xsize(final DirectedGraph<ElementName, Dependency> cycle) { return Math.max(600, cycle.getVertexCount() * 90); }
private int ysize(final DirectedGraph<ElementName, Dependency> cycle) { return Math.max(100, cycle.getVertexCount() * 90); }
@Override public void printStats() { logger.info( "Graph contains {} nodes.", graph.getVertexCount() ); logger.info( "Graph contains {} relationships.", graph.getEdgeCount() ); }
private Layout<ElementName, Dependency> pickLayout( final DirectedGraph<ElementName, Dependency> g, final Dimension d) { if ( g.getVertexCount() == 2 ) { return linearLayout(g,d); } else if (g.getVertexCount() <= 20) { return circleLayout(g, d); } return springLayout(g, d); }
private Layout<ElementName, Dependency> pickLayout( final DirectedGraph<ElementName, Dependency> g, final Dimension d) { if ( g.getVertexCount() == 2 ) { return linearLayout(g,d); } else if (g.getVertexCount() <= 20) { return circleLayout(g, d); } return springLayout(g, d); }
private Layout<ElementName, Dependency> pickLayout( final DirectedGraph<ElementName, Dependency> g, final Dimension d) { if ( g.getVertexCount() == 2 ) { return linearLayout(g,d); } else if (g.getVertexCount() <= 20) { return circleLayout(g, d); } return springLayout(g, d); }
@Override protected void visitClassScc(final DirectedGraph<ElementName, Dependency> scc) { final String sccFile = this.getCurrentClassSccName(); final ElementName firstClass = scc.getVertices().iterator().next(); writeIndex("<li><a href=\"" + sccFile + "\">" + firstClass + " and " + (scc.getVertexCount() - 1) + " others</a></li>"); }
@Override protected void visitClassScc(final DirectedGraph<ElementName, Dependency> scc) { final String sccFile = this.getCurrentClassSccName(); final ElementName firstClass = scc.getVertices().iterator().next(); writeIndex("<li><a href=\"" + sccFile + "\">" + firstClass + " and " + (scc.getVertexCount() - 1) + " others</a></li>"); }
@Override public void visitPackageScc(final DirectedGraph<ElementName, Dependency> scc) { final String sccFile = getCurrentPackageSccName(); final ElementName firstPackage = scc.getVertices().iterator().next(); writeIndex("<li><a href=\"" + sccFile + "\">" + firstPackage + " and " + (scc.getVertexCount() - 1) + " others</a></li>"); }
@Override protected void visitClassScc(final DirectedGraph<ElementName, Dependency> scc) { final String sccFile = this.getCurrentClassSccName(); final ElementName firstClass = scc.getVertices().iterator().next(); writeIndex("<li><a href=\"" + sccFile + "\">" + firstClass + " and " + (scc.getVertexCount() - 1) + " others</a></li>"); }
@Override public void visitPackageScc(final DirectedGraph<ElementName, Dependency> scc) { final String sccFile = getCurrentPackageSccName(); final ElementName firstPackage = scc.getVertices().iterator().next(); writeIndex("<li><a href=\"" + sccFile + "\">" + firstPackage + " and " + (scc.getVertexCount() - 1) + " others</a></li>"); }
@Override public void visitPackageScc(final DirectedGraph<ElementName, Dependency> scc) { final String sccFile = getCurrentPackageSccName(); final ElementName firstPackage = scc.getVertices().iterator().next(); writeIndex("<li><a href=\"" + sccFile + "\">" + firstPackage + " and " + (scc.getVertexCount() - 1) + " others</a></li>"); }
private void writeScc(final DirectedGraph<ElementName, Dependency> scc, final String sccFile, final int number) { writeHeader(sccFile); write(sccFile, "<section>"); write(sccFile, "<header>"); write(sccFile, "<h1>Component " + number + "</h1>"); write(sccFile, "<h2>" + scc.getVertexCount() + " members " + scc.getEdgeCount() + " connections </h2>"); write(sccFile, "</header>"); final SVGExporter ex = new SVGExporter(this.streams.getStream(sccFile), this.dependencyScorer, xsize(scc), ysize(scc)); try { write(sccFile, "<figure>"); ex.export(scc); write(sccFile, "</figure>"); writeConnections(sccFile, scc); } catch (final IOException e) { throw new RuntimeException(e); } }
private void writeScc(final DirectedGraph<ElementName, Dependency> scc, final String sccFile, final int number) { writeHeader(sccFile); write(sccFile, "<section>"); write(sccFile, "<header>"); write(sccFile, "<h1>Component " + number + "</h1>"); write(sccFile, "<h2>" + scc.getVertexCount() + " members " + scc.getEdgeCount() + " connections </h2>"); write(sccFile, "</header>"); final SVGExporter ex = new SVGExporter(this.streams.getStream(sccFile), this.dependencyScorer, xsize(scc), ysize(scc)); try { write(sccFile, "<figure>"); ex.export(scc); write(sccFile, "</figure>"); writeConnections(sccFile, scc); } catch (final IOException e) { throw new RuntimeException(e); } }
private void writeSubCycle( final DirectedGraph<ElementName, Dependency> cycle, final String streamName) { write(streamName, "<section class='subcycle'>"); write(streamName, "<header>"); write(streamName, "<h1>Subcycle : " + cycle.getVertexCount() + " members " + cycle.getEdgeCount() + " connections </h1>"); write(streamName, "</header>"); final SVGExporter ex = new SVGExporter(this.streams.getStream(streamName), this.dependencyScorer, xsize(cycle), ysize(cycle)); try { write(streamName, "<figure>"); ex.export(cycle); write(streamName, "</figure>"); writeConnections(streamName, cycle); write(streamName, "<a href='#classConnections'>jump to class connections</a>"); write(streamName, "</section>"); } catch (final IOException e) { throw new RuntimeException(e); } }