@@ -204,10 +204,18 @@ index 464e41a3cd428e1883230bda55fa64172697d1c2..ac3997dc7910f7844b583699c532edfa
204204 }
205205 }
206206diff --git a/src/org/jetbrains/java/decompiler/main/decompiler/BaseDecompiler.java b/src/org/jetbrains/java/decompiler/main/decompiler/BaseDecompiler.java
207- index 7837939efab2b1caf023dc2f5b0a52659ce032bd..eb837996028dd156e8e79435118aa9dd018d644b 100644
207+ index 7837939efab2b1caf023dc2f5b0a52659ce032bd..879d6aa53be80974d6b432a6bdbb58526388362d 100644
208208--- a/src/org/jetbrains/java/decompiler/main/decompiler/BaseDecompiler.java
209209+++ b/src/org/jetbrains/java/decompiler/main/decompiler/BaseDecompiler.java
210- @@ -13,10 +13,15 @@ import java.util.Map;
210+ @@ -3,6 +3,7 @@ package org.jetbrains.java.decompiler.main.decompiler;
211+
212+ import org.jetbrains.java.decompiler.main.Fernflower;
213+ import org.jetbrains.java.decompiler.main.extern.IBytecodeProvider;
214+ + import org.jetbrains.java.decompiler.main.extern.IContextSource;
215+ import org.jetbrains.java.decompiler.main.extern.IFernflowerLogger;
216+ import org.jetbrains.java.decompiler.main.extern.IResultSaver;
217+
218+ @@ -13,14 +14,27 @@ import java.util.Map;
211219 public class BaseDecompiler {
212220 private final Fernflower engine;
213221
@@ -219,10 +227,22 @@ index 7837939efab2b1caf023dc2f5b0a52659ce032bd..eb837996028dd156e8e79435118aa9dd
219227+ public BaseDecompiler(IResultSaver saver, Map<String, Object> options, IFernflowerLogger logger) {
220228+ engine = new Fernflower(saver, options, logger);
221229+ }
230+ +
231+ + public void addSource(IContextSource source) {
232+ + engine.addSource(source);
233+ + }
222234+
223235 public void addSource(File source) {
224236 engine.addSource(source);
225237 }
238+
239+ + public void addLibrary(IContextSource library) {
240+ + engine.addLibrary(library);
241+ + }
242+ +
243+ public void addLibrary(File library) {
244+ engine.addLibrary(library);
245+ }
226246diff --git a/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java b/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java
227247index 3e939e4e5a39fce84d694a02e2e53ec486e50ba5..056ca56d6e598c97c07e19ea5a4038738328f284 100644
228248--- a/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java
@@ -637,7 +657,7 @@ index ba09aa17789940419bb4bf45bd1aaddda9189ca5..b72485100b9b25b1fe27966cc7b8b553
637657 stack.add(clParent);
638658 stackSubNodes.add(node);
639659diff --git a/src/org/jetbrains/java/decompiler/struct/ContextUnit.java b/src/org/jetbrains/java/decompiler/struct/ContextUnit.java
640- index 5e119e5030efab2bccc1bd96601075c081056339..1c6cf593d737a37c498a0ee40920a8c7e287a800 100644
660+ index 5e119e5030efab2bccc1bd96601075c081056339..0816efb081b72dc7ce704ea92a2503b83012854a 100644
641661--- a/src/org/jetbrains/java/decompiler/struct/ContextUnit.java
642662+++ b/src/org/jetbrains/java/decompiler/struct/ContextUnit.java
643663@@ -2,15 +2,13 @@
@@ -659,7 +679,7 @@ index 5e119e5030efab2bccc1bd96601075c081056339..1c6cf593d737a37c498a0ee40920a8c7
659679 import java.nio.charset.StandardCharsets;
660680 import java.util.ArrayList;
661681 import java.util.List;
662- @@ -18,221 +16,187 @@ import java.util.concurrent.ExecutionException;
682+ @@ -18,220 +16,186 @@ import java.util.concurrent.ExecutionException;
663683 import java.util.concurrent.ExecutorService;
664684 import java.util.concurrent.Executors;
665685 import java.util.concurrent.Future;
@@ -1016,13 +1036,11 @@ index 5e119e5030efab2bccc1bd96601075c081056339..1c6cf593d737a37c498a0ee40920a8c7
10161036- resultSaver.closeArchive(archivePath, filename);
10171037+ }
10181038 }
1019- - }
10201039+
10211040+ sink.close();
1022- + }
1041+ }
10231042
10241043 private static void waitForAll(List<Future<?>> futures) {
1025- for (Future<?> future : futures) {
10261044@@ -244,16 +208,19 @@ public class ContextUnit {
10271045 }
10281046 }
0 commit comments