From 4a2fa09cacf11397bf00407edc2947c23967afeb Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Sun, 24 Dec 2017 15:20:17 +0200 Subject: [PATCH] Reorganized project. + Moved Demo project from test source directory to dedicated project directory. + Added SVG and PNG outputs as configurable options. + Migrated to java 8. --- .../src/main/java/com/myproject/Behavior.java | 10 ------ .../java/com/myproject/NumberTranslator.java | 8 ----- javainspect.iml | 17 +++++----- pom.xml | 8 ++--- .../inspector/java/{methods => }/Main.java | 7 ++-- .../inspector/java}/RenderJavaInspect.java | 9 ++--- .../inspector/java/methods/package-info.java | 3 +- .../inspector/java/structure/ClassGraph.java | 33 +++++++++++-------- .../java/structure/TargetImageType.java | 12 +++++++ .../java/structure/package-info.java | 16 +++++++++ .../structure/ObjectReturnedByMethod.java | 5 --- .../structure/ObjectVisibleAsClassField.java | 5 --- .../example/structure/SampleClass2.java | 5 --- .../example/structure/SampleEnum.java | 7 ---- usage examples/demo project/.gitignore | 2 ++ .../demo project/javainspect-demo.iml | 14 ++++++++ .../demo project}/pom.xml | 26 ++++++++++++--- .../example/RenderUsingReflection.java | 6 ++-- .../torender/ObjectReturnedByMethod.java | 5 +++ .../torender/ObjectVisibleAsClassField.java | 5 +++ .../example/torender}/SampleClass.java | 2 +- .../example/torender/SampleClass2.java | 5 +++ .../example/torender/SampleEnum.java | 7 ++++ .../example/torender}/SampleInterface.java | 2 +- .../example/torender}/SampleSuperClass.java | 2 +- .../tools/open with IntelliJ IDEA | 6 ++++ 26 files changed, 140 insertions(+), 87 deletions(-) delete mode 100644 example/src/main/java/com/myproject/Behavior.java delete mode 100644 example/src/main/java/com/myproject/NumberTranslator.java rename src/main/java/eu/svjatoslav/inspector/java/{methods => }/Main.java (80%) rename src/{test/java/eu/svjatoslav/inspector/java/structure/example => main/java/eu/svjatoslav/inspector/java}/RenderJavaInspect.java (83%) create mode 100644 src/main/java/eu/svjatoslav/inspector/java/structure/TargetImageType.java create mode 100755 src/main/java/eu/svjatoslav/inspector/java/structure/package-info.java delete mode 100755 src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/ObjectReturnedByMethod.java delete mode 100755 src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/ObjectVisibleAsClassField.java delete mode 100644 src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleClass2.java delete mode 100755 src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleEnum.java create mode 100644 usage examples/demo project/.gitignore create mode 100644 usage examples/demo project/javainspect-demo.iml rename {example => usage examples/demo project}/pom.xml (52%) rename src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderDemoClasses.java => usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/RenderUsingReflection.java (76%) create mode 100755 usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/ObjectReturnedByMethod.java create mode 100755 usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/ObjectVisibleAsClassField.java rename {src/test/java/eu/svjatoslav/inspector/java/structure/example/structure => usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender}/SampleClass.java (75%) create mode 100644 usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleClass2.java create mode 100755 usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleEnum.java rename {src/test/java/eu/svjatoslav/inspector/java/structure/example/structure => usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender}/SampleInterface.java (51%) rename {src/test/java/eu/svjatoslav/inspector/java/structure/example/structure => usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender}/SampleSuperClass.java (70%) create mode 100755 usage examples/demo project/tools/open with IntelliJ IDEA diff --git a/example/src/main/java/com/myproject/Behavior.java b/example/src/main/java/com/myproject/Behavior.java deleted file mode 100644 index d35ce27..0000000 --- a/example/src/main/java/com/myproject/Behavior.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.myproject; - -public interface Behavior { - - String translate(Object obj); - - default String serialize(Object obj) { - return obj.toString(); - } -} diff --git a/example/src/main/java/com/myproject/NumberTranslator.java b/example/src/main/java/com/myproject/NumberTranslator.java deleted file mode 100644 index b0cb6c4..0000000 --- a/example/src/main/java/com/myproject/NumberTranslator.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.myproject; - -public class NumberTranslator implements Behavior { - - public String translate(Object obj) { - return serialize(obj); - } -} diff --git a/javainspect.iml b/javainspect.iml index ea566de..a81dd61 100644 --- a/javainspect.iml +++ b/javainspect.iml @@ -1,15 +1,16 @@ - - - - - - - + + + + + + + + - + \ No newline at end of file diff --git a/pom.xml b/pom.xml index fbdb534..592064d 100644 --- a/pom.xml +++ b/pom.xml @@ -25,8 +25,8 @@ maven-compiler-plugin 2.3.2 - 1.6 - 1.6 + 1.8 + 1.8 UTF-8 @@ -85,7 +85,7 @@ - eu.svjatoslav.inspector.java.methods.Main + eu.svjatoslav.inspector.java.Main @@ -107,7 +107,7 @@ eu.svjatoslav svjatoslavcommons - 1.5 + 1.6 diff --git a/src/main/java/eu/svjatoslav/inspector/java/methods/Main.java b/src/main/java/eu/svjatoslav/inspector/java/Main.java similarity index 80% rename from src/main/java/eu/svjatoslav/inspector/java/methods/Main.java rename to src/main/java/eu/svjatoslav/inspector/java/Main.java index 7450c99..f57f787 100644 --- a/src/main/java/eu/svjatoslav/inspector/java/methods/Main.java +++ b/src/main/java/eu/svjatoslav/inspector/java/Main.java @@ -1,9 +1,8 @@ -package eu.svjatoslav.inspector.java.methods; +package eu.svjatoslav.inspector.java; import eu.svjatoslav.inspector.java.structure.ClassGraph; -import java.io.File; - +import static java.io.File.separator; import static java.lang.System.getProperty; public class Main { @@ -18,7 +17,7 @@ public class Main { String graphName = args[2]; ClassGraph cg = new ClassGraph(); - cg.setTargetDirectory(getProperty("user.dir") + File.separator); + cg.setTargetDirectoryPath(getProperty("user.dir") + separator); cg.addProject(projectDir); cg.whitelistClassPattern(packageGlob); diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java b/src/main/java/eu/svjatoslav/inspector/java/RenderJavaInspect.java similarity index 83% rename from src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java rename to src/main/java/eu/svjatoslav/inspector/java/RenderJavaInspect.java index 1f38883..c33c8a9 100755 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java +++ b/src/main/java/eu/svjatoslav/inspector/java/RenderJavaInspect.java @@ -7,7 +7,7 @@ * or later as published by the Free Software Foundation. */ -package eu.svjatoslav.inspector.java.structure.example; +package eu.svjatoslav.inspector.java; import eu.svjatoslav.inspector.java.structure.ClassGraph; import eu.svjatoslav.inspector.java.structure.Utils; @@ -24,13 +24,10 @@ public class RenderJavaInspect { // to detect class names from there to be added to the graph. graph.addProject("."); - // Blacklist example classes from being shown on the graph - graph.blacklistClassPattern("eu.svjatoslav.inspector.java.structure.example.*"); - // do not show single classes with no relationships on the graph graph.hideOrphanedClasses(); - // Produce bitmap image titled "JavaInspect full project.png" to the + // Produce SVG image titled "JavaInspect full project.png" to the // user Desktop directory. graph.generateGraph("JavaInspect full project"); } @@ -54,7 +51,7 @@ public class RenderJavaInspect { // Keep intermediary GraphViz DOT file for reference. graph.setKeepDotFile(true); - // Produce bitmap image titled "JavaInspect.png" to the user Desktop + // Produce SVG image titled "JavaInspect.svg" to the user Desktop // directory graph.generateGraph("JavaInspect"); } diff --git a/src/main/java/eu/svjatoslav/inspector/java/methods/package-info.java b/src/main/java/eu/svjatoslav/inspector/java/methods/package-info.java index 3897205..b18889c 100755 --- a/src/main/java/eu/svjatoslav/inspector/java/methods/package-info.java +++ b/src/main/java/eu/svjatoslav/inspector/java/methods/package-info.java @@ -12,7 +12,8 @@ package eu.svjatoslav.inspector.java.methods; /** * This package contains quickly hacked together Java language parser. * Goal is to start visualizing method call references and other things - * which are not easily readable at runtime via reflection. + * which are not easily readable at runtime via reflection but are available + * when parsing java source code directly. *

* Work in progress... *

diff --git a/src/main/java/eu/svjatoslav/inspector/java/structure/ClassGraph.java b/src/main/java/eu/svjatoslav/inspector/java/structure/ClassGraph.java index c6b6cbf..a4d9015 100755 --- a/src/main/java/eu/svjatoslav/inspector/java/structure/ClassGraph.java +++ b/src/main/java/eu/svjatoslav/inspector/java/structure/ClassGraph.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.Map; import static eu.svjatoslav.inspector.java.methods.JavaFile.UTF_8; +import static java.io.File.separator; public class ClassGraph { @@ -35,11 +36,13 @@ public class ClassGraph { private final List whitelistClassPatterns = new ArrayList(); - private String targetDirectory = CommonPathResolver.getDesktopDirectory() - .getAbsolutePath() + "/"; + private String targetDirectoryPath = CommonPathResolver.getDesktopDirectory() + .getAbsolutePath() + separator; private boolean keepDotFile; + TargetImageType targetImageType = TargetImageType.SVG; + public ClassGraph() { } @@ -84,6 +87,10 @@ public class ClassGraph { blacklistClassPatterns.add(pattern); } + public void setTargetImageType(TargetImageType targetImageType) { + this.targetImageType = targetImageType; + } + /** * @param resultFileName file name for the generated graph. File extension will be * added automatically. Existing file with the same name will be @@ -92,10 +99,8 @@ public class ClassGraph { public void generateGraph(final String resultFileName) { - final String dotFilePath = targetDirectory + resultFileName + ".dot"; - final String imageFilePath = targetDirectory + resultFileName + ".svg"; - - System.out.println("Dot file path:" + dotFilePath); + final String dotFilePath = targetDirectoryPath + resultFileName + ".dot"; + final String imageFilePath = targetDirectoryPath + resultFileName + "." + targetImageType.fileExtension; try { // write DOT file to disk @@ -106,16 +111,18 @@ public class ClassGraph { // execute GraphViz to visualize graph try { Runtime.getRuntime() - .exec(new String[]{"dot", "-Tsvg", dotFilePath, "-o", + .exec(new String[]{"dot", "-T" + targetImageType.fileExtension, dotFilePath, "-o", imageFilePath}).waitFor(); } catch (final InterruptedException ignored) { } if (!keepDotFile) // delete dot file - if (!new File(dotFilePath).delete()) throw new RuntimeException("Cannot delete file: " + dotFilePath); + if (!new File(dotFilePath).delete()) + throw new RuntimeException("Cannot delete file: " + dotFilePath); + } catch (final IOException e) { - System.err.println(e); + throw new RuntimeException("Unable to generate graph: " + e.getMessage(), e); } } @@ -196,11 +203,11 @@ public class ClassGraph { return this; } - public ClassGraph setTargetDirectory(String directoryPath) { - if (!directoryPath.endsWith("/")) - directoryPath += "/"; + public ClassGraph setTargetDirectoryPath(String directoryPath) { + if (!directoryPath.endsWith(separator)) + directoryPath += separator; - targetDirectory = directoryPath; + targetDirectoryPath = directoryPath; return this; } diff --git a/src/main/java/eu/svjatoslav/inspector/java/structure/TargetImageType.java b/src/main/java/eu/svjatoslav/inspector/java/structure/TargetImageType.java new file mode 100644 index 0000000..637724a --- /dev/null +++ b/src/main/java/eu/svjatoslav/inspector/java/structure/TargetImageType.java @@ -0,0 +1,12 @@ +package eu.svjatoslav.inspector.java.structure; + +public enum TargetImageType { + PNG("png"), + SVG("svg"); + + public final String fileExtension; + + TargetImageType(String fileExtension){ + this.fileExtension = fileExtension; + } +} diff --git a/src/main/java/eu/svjatoslav/inspector/java/structure/package-info.java b/src/main/java/eu/svjatoslav/inspector/java/structure/package-info.java new file mode 100755 index 0000000..eee827e --- /dev/null +++ b/src/main/java/eu/svjatoslav/inspector/java/structure/package-info.java @@ -0,0 +1,16 @@ +/* + * JavaInspect - Utility to visualize java software + * Copyright (C) 2013-2015, 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 + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.inspector.java.structure; + +/** + * This package contains mostly code that inspects java application by traversing + * class references using reflection at runtime. + */ + diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/ObjectReturnedByMethod.java b/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/ObjectReturnedByMethod.java deleted file mode 100755 index 3e507bb..0000000 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/ObjectReturnedByMethod.java +++ /dev/null @@ -1,5 +0,0 @@ -package eu.svjatoslav.inspector.java.structure.example.structure; - -public class ObjectReturnedByMethod { - -} diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/ObjectVisibleAsClassField.java b/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/ObjectVisibleAsClassField.java deleted file mode 100755 index c69a881..0000000 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/ObjectVisibleAsClassField.java +++ /dev/null @@ -1,5 +0,0 @@ -package eu.svjatoslav.inspector.java.structure.example.structure; - -public class ObjectVisibleAsClassField { - -} diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleClass2.java b/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleClass2.java deleted file mode 100644 index 83b5205..0000000 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleClass2.java +++ /dev/null @@ -1,5 +0,0 @@ -package eu.svjatoslav.inspector.java.structure.example.structure; - -public class SampleClass2 extends SampleSuperClass { - -} diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleEnum.java b/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleEnum.java deleted file mode 100755 index 05a3f80..0000000 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleEnum.java +++ /dev/null @@ -1,7 +0,0 @@ -package eu.svjatoslav.inspector.java.structure.example.structure; - -public enum SampleEnum { - - ONE, TWO, THREE, FOUR - -} diff --git a/usage examples/demo project/.gitignore b/usage examples/demo project/.gitignore new file mode 100644 index 0000000..2d513a0 --- /dev/null +++ b/usage examples/demo project/.gitignore @@ -0,0 +1,2 @@ +/.idea/ +/target/ diff --git a/usage examples/demo project/javainspect-demo.iml b/usage examples/demo project/javainspect-demo.iml new file mode 100644 index 0000000..42e85c2 --- /dev/null +++ b/usage examples/demo project/javainspect-demo.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example/pom.xml b/usage examples/demo project/pom.xml similarity index 52% rename from example/pom.xml rename to usage examples/demo project/pom.xml index e3d0312..faee7f6 100644 --- a/example/pom.xml +++ b/usage examples/demo project/pom.xml @@ -1,11 +1,11 @@ 4.0.0 - com.myproject - myproject - 0.0 + eu.svjatoslav + javainspect-demo + 1.0-SNAPSHOT jar - MyProject - MyProject + Java inspect demo + Demonstration project for Java inspect utility @@ -21,4 +21,20 @@ + + + + eu.svjatoslav + javainspect + 1.7-SNAPSHOT + + + + + + svjatoslav.eu + Svjatoslav repository + http://www2.svjatoslav.eu/maven/ + + diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderDemoClasses.java b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/RenderUsingReflection.java similarity index 76% rename from src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderDemoClasses.java rename to usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/RenderUsingReflection.java index 90aa480..df0ac1b 100755 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderDemoClasses.java +++ b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/RenderUsingReflection.java @@ -10,10 +10,10 @@ package eu.svjatoslav.inspector.java.structure.example; import eu.svjatoslav.inspector.java.structure.ClassGraph; -import eu.svjatoslav.inspector.java.structure.example.structure.SampleClass; -import eu.svjatoslav.inspector.java.structure.example.structure.SampleClass2; +import eu.svjatoslav.inspector.java.structure.example.torender.SampleClass; +import eu.svjatoslav.inspector.java.structure.example.torender.SampleClass2; -public class RenderDemoClasses { +public class RenderUsingReflection { public static void main(final String[] args) { diff --git a/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/ObjectReturnedByMethod.java b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/ObjectReturnedByMethod.java new file mode 100755 index 0000000..143ab77 --- /dev/null +++ b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/ObjectReturnedByMethod.java @@ -0,0 +1,5 @@ +package eu.svjatoslav.inspector.java.structure.example.torender; + +public class ObjectReturnedByMethod { + +} diff --git a/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/ObjectVisibleAsClassField.java b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/ObjectVisibleAsClassField.java new file mode 100755 index 0000000..db5b5cc --- /dev/null +++ b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/ObjectVisibleAsClassField.java @@ -0,0 +1,5 @@ +package eu.svjatoslav.inspector.java.structure.example.torender; + +public class ObjectVisibleAsClassField { + +} diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleClass.java b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleClass.java similarity index 75% rename from src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleClass.java rename to usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleClass.java index 9336717..9720c44 100755 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleClass.java +++ b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleClass.java @@ -1,4 +1,4 @@ -package eu.svjatoslav.inspector.java.structure.example.structure; +package eu.svjatoslav.inspector.java.structure.example.torender; public class SampleClass extends SampleSuperClass { diff --git a/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleClass2.java b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleClass2.java new file mode 100644 index 0000000..a2eba71 --- /dev/null +++ b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleClass2.java @@ -0,0 +1,5 @@ +package eu.svjatoslav.inspector.java.structure.example.torender; + +public class SampleClass2 extends SampleSuperClass { + +} diff --git a/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleEnum.java b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleEnum.java new file mode 100755 index 0000000..ee8bf9e --- /dev/null +++ b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleEnum.java @@ -0,0 +1,7 @@ +package eu.svjatoslav.inspector.java.structure.example.torender; + +public enum SampleEnum { + + ONE, TWO, THREE, FOUR + +} diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleInterface.java b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleInterface.java similarity index 51% rename from src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleInterface.java rename to usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleInterface.java index e9d6bc5..648327f 100755 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleInterface.java +++ b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleInterface.java @@ -1,4 +1,4 @@ -package eu.svjatoslav.inspector.java.structure.example.structure; +package eu.svjatoslav.inspector.java.structure.example.torender; public interface SampleInterface { SampleEnum getSomeValue(); diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleSuperClass.java b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleSuperClass.java similarity index 70% rename from src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleSuperClass.java rename to usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleSuperClass.java index 10de17e..9230509 100755 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/structure/SampleSuperClass.java +++ b/usage examples/demo project/src/main/java/eu/svjatoslav/inspector/java/structure/example/torender/SampleSuperClass.java @@ -1,4 +1,4 @@ -package eu.svjatoslav.inspector.java.structure.example.structure; +package eu.svjatoslav.inspector.java.structure.example.torender; public class SampleSuperClass implements SampleInterface { diff --git a/usage examples/demo project/tools/open with IntelliJ IDEA b/usage examples/demo project/tools/open with IntelliJ IDEA new file mode 100755 index 0000000..1f82875 --- /dev/null +++ b/usage examples/demo project/tools/open with IntelliJ IDEA @@ -0,0 +1,6 @@ +#!/bin/bash + +cd "${0%/*}" + +cd .. +idea . -- 2.20.1