Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,27 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.reflections</groupId>-->
<!-- <artifactId>reflections</artifactId>-->
Expand Down Expand Up @@ -47,4 +67,4 @@
<!-- <version>3.20.2</version>-->
<!-- </dependency>-->
</dependencies>
</project>
</project>
6 changes: 5 additions & 1 deletion src/main/java/org/lkop/minilib/ClassInsider.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ public void edit(Handler h) throws CannotCompileException {
@Override
public void edit(FieldAccess f) throws CannotCompileException {
System.out.println("FieldAccess of -> " + f.getClassName());
System.out.println("FieldAccess of -> " + f.getFieldName() + " " + f.getSignature() + " of class " + f.getClassName());
if(f.isStatic())
System.out.println("Static field at line : " + f.getLineNumber() + " Is reader : " + f.isReader() + " Is writer : " + f.isWriter());
String ss = f.getSignature();
String s2 = f.getFieldName();
int s3 = f.getLineNumber();
Expand Down Expand Up @@ -290,6 +293,7 @@ public void edit(ConstructorCall c) {
//Try searching method on upper level (anonymous classes only)
try {
one_time_methods.remove(one_time_methods.size() - 1);
if(class_pool.get(class_name).getSuperclass()!=null){
String superclass_name = class_pool.get(class_name).getSuperclass().getName();
new_node.resettingClassname(superclass_name);

Expand All @@ -300,7 +304,7 @@ public void edit(ConstructorCall c) {
}else{
List<BaseTreeElement> children = new_node.getFirstParent().getChildren();
children.remove(children.size() - 1);
}
}}
} catch (NotFoundException ex) {
ex.printStackTrace();
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/lkop/minilib/utils/ImageUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ private ImageUtils() {
}

public static void createGIF(String input_file_path) throws IOException, InterruptedException {
File input_file = new File(input_file_path);
ProcessBuilder pb = new ProcessBuilder("cmd.exe", "/c", "start dot -Tjpg " + input_file_path + " -o " + input_file.getParent() + "/" + Constants.OUTPUT_FILENAME + ".jpg");
/* File input_file = new File(input_file_path);
ProcessBuilder pb = new ProcessBuilder("cmd.exe", "/c", "start dot -Tjpg " + input_file_path + " -o " + input_file.getParent() + "/" + Constants.OUTPUT_FILENAME + ".jpg"); // Needs fixing for linux and mac
pb.redirectErrorStream(true);
Process process = pb.start();
System.out.println("Exit Code: " + process.waitFor());
System.out.println("Exit Code: " + process.waitFor());*/
}

}