X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Finspector%2Fjava%2FRenderJavaInspect.java;h=4b6ea85a2613dccb8b9c4eb6e924a8e0805e425b;hb=c98cda3c339e0a3345884e17e7657301d285ca1f;hp=c33c8a9bf558ee8888dc45f8b9e76781532e0382;hpb=4a2fa09cacf11397bf00407edc2947c23967afeb;p=javainspect.git diff --git a/src/main/java/eu/svjatoslav/inspector/java/RenderJavaInspect.java b/src/main/java/eu/svjatoslav/inspector/java/RenderJavaInspect.java index c33c8a9..4b6ea85 100755 --- a/src/main/java/eu/svjatoslav/inspector/java/RenderJavaInspect.java +++ b/src/main/java/eu/svjatoslav/inspector/java/RenderJavaInspect.java @@ -1,6 +1,6 @@ /* * JavaInspect - Utility to visualize java software - * Copyright (C) 2013-2015, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Copyright (C) 2013-2020, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu * * This program is free software; you can redistribute it and/or * modify it under the terms of version 3 of the GNU Lesser General Public License @@ -12,31 +12,18 @@ package eu.svjatoslav.inspector.java; import eu.svjatoslav.inspector.java.structure.ClassGraph; import eu.svjatoslav.inspector.java.structure.Utils; -import java.io.FileNotFoundException; - public class RenderJavaInspect { - private static void fullProjectExample() { - // Create graph - final ClassGraph graph = new ClassGraph(); - - // Recursively scan current directory for Java source code and attempt - // to detect class names from there to be added to the graph. - graph.addProject("."); - - // do not show single classes with no relationships on the graph - graph.hideOrphanedClasses(); - - // Produce SVG image titled "JavaInspect full project.png" to the - // user Desktop directory. - graph.generateGraph("JavaInspect full project"); - } - + /** + * Running this method via IDE will produce 2 files in project root directory: + * JavaInspect.svg (JavaInspect utility visualizes itself) and + * JavaInspect.dot (GraphViz dot file, for reference). + */ private static void handpickClassesExample() { /* * This example demonstrates generating of class graph from hand picked - * classes and visualizing GraphViz itself. - */ + * classes and visualizing GraphViz itself. + */ // Create graph final ClassGraph graph = new ClassGraph(); @@ -56,11 +43,8 @@ public class RenderJavaInspect { graph.generateGraph("JavaInspect"); } - public static void main(final String[] args) throws FileNotFoundException { + public static void main(final String[] args) { handpickClassesExample(); - - fullProjectExample(); - } }