diff options
| author | 2015-03-07 20:54:44 -0500 | |
|---|---|---|
| committer | 2015-03-07 20:54:44 -0500 | |
| commit | d1a041362a164e4469a4b725608c631bd0961c2e (patch) | |
| tree | 211903a263b5206dacab6ed2a99e40fadac8b08c /src/cuchaz/enigma/convert/MappingsConverter.java | |
| parent | match/unmatch button works (diff) | |
| download | enigma-fork-d1a041362a164e4469a4b725608c631bd0961c2e.tar.gz enigma-fork-d1a041362a164e4469a4b725608c631bd0961c2e.tar.xz enigma-fork-d1a041362a164e4469a4b725608c631bd0961c2e.zip | |
ui improvements
Diffstat (limited to 'src/cuchaz/enigma/convert/MappingsConverter.java')
| -rw-r--r-- | src/cuchaz/enigma/convert/MappingsConverter.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cuchaz/enigma/convert/MappingsConverter.java b/src/cuchaz/enigma/convert/MappingsConverter.java index aa067d4..f38723f 100644 --- a/src/cuchaz/enigma/convert/MappingsConverter.java +++ b/src/cuchaz/enigma/convert/MappingsConverter.java | |||
| @@ -45,11 +45,11 @@ public class MappingsConverter { | |||
| 45 | destIndex.indexJar(destJar, false); | 45 | destIndex.indexJar(destJar, false); |
| 46 | 46 | ||
| 47 | // compute the matching | 47 | // compute the matching |
| 48 | ClassMatching matching = computeMatching(sourceJar, sourceIndex, destJar, destIndex); | 48 | ClassMatching matching = computeMatching(sourceJar, sourceIndex, destJar, destIndex, null); |
| 49 | return new Matches(matching.matches()); | 49 | return new Matches(matching.matches()); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | public static ClassMatching computeMatching(JarFile sourceJar, JarIndex sourceIndex, JarFile destJar, JarIndex destIndex) { | 52 | public static ClassMatching computeMatching(JarFile sourceJar, JarIndex sourceIndex, JarFile destJar, JarIndex destIndex, BiMap<ClassEntry,ClassEntry> knownMatches) { |
| 53 | 53 | ||
| 54 | System.out.println("Iteratively matching classes"); | 54 | System.out.println("Iteratively matching classes"); |
| 55 | 55 | ||
| @@ -74,11 +74,15 @@ public class MappingsConverter { | |||
| 74 | new ClassIdentifier(destJar, destIndex, destNamer, useReferences) | 74 | new ClassIdentifier(destJar, destIndex, destNamer, useReferences) |
| 75 | ); | 75 | ); |
| 76 | 76 | ||
| 77 | if (knownMatches != null) { | ||
| 78 | matching.addKnownMatches(knownMatches); | ||
| 79 | } | ||
| 80 | |||
| 77 | if (lastMatching == null) { | 81 | if (lastMatching == null) { |
| 78 | // search all classes | 82 | // search all classes |
| 79 | matching.match(sourceIndex.getObfClassEntries(), destIndex.getObfClassEntries()); | 83 | matching.match(sourceIndex.getObfClassEntries(), destIndex.getObfClassEntries()); |
| 80 | } else { | 84 | } else { |
| 81 | // we already know about these matches | 85 | // we already know about these matches from last time |
| 82 | matching.addKnownMatches(lastMatching.uniqueMatches()); | 86 | matching.addKnownMatches(lastMatching.uniqueMatches()); |
| 83 | 87 | ||
| 84 | // search unmatched and ambiguously-matched classes | 88 | // search unmatched and ambiguously-matched classes |