summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/analysis
diff options
context:
space:
mode:
authorGravatar liach2019-11-08 17:24:41 -0600
committerGravatar modmuss502019-11-08 23:24:41 +0000
commitb49e7eeb75837faeafb938a739cd2fa82594bcea (patch)
tree2c1b726c16556f78c660f4e044f9f2e5f0a88b45 /src/main/java/cuchaz/enigma/analysis
parentAdd stats generation (#177) (diff)
downloadenigma-fork-b49e7eeb75837faeafb938a739cd2fa82594bcea.tar.gz
enigma-fork-b49e7eeb75837faeafb938a739cd2fa82594bcea.tar.xz
enigma-fork-b49e7eeb75837faeafb938a739cd2fa82594bcea.zip
Tweak runemoro's stats generator to be compatible with multiple services (#178)
* Tweak runemoro's stats generator to be compatible with multiple services Signed-off-by: liach <liach@users.noreply.github.com> * Names can have $ in java Signed-off-by: liach <liach@users.noreply.github.com>
Diffstat (limited to 'src/main/java/cuchaz/enigma/analysis')
-rw-r--r--src/main/java/cuchaz/enigma/analysis/SourceIndex.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/main/java/cuchaz/enigma/analysis/SourceIndex.java b/src/main/java/cuchaz/enigma/analysis/SourceIndex.java
index ed12ce3..a800f43 100644
--- a/src/main/java/cuchaz/enigma/analysis/SourceIndex.java
+++ b/src/main/java/cuchaz/enigma/analysis/SourceIndex.java
@@ -16,7 +16,11 @@ import com.google.common.collect.Lists;
16import com.google.common.collect.Maps; 16import com.google.common.collect.Maps;
17import com.google.common.collect.Multimap; 17import com.google.common.collect.Multimap;
18import com.strobel.decompiler.languages.Region; 18import com.strobel.decompiler.languages.Region;
19import com.strobel.decompiler.languages.java.ast.*; 19import com.strobel.decompiler.languages.java.ast.AstNode;
20import com.strobel.decompiler.languages.java.ast.CompilationUnit;
21import com.strobel.decompiler.languages.java.ast.ConstructorDeclaration;
22import com.strobel.decompiler.languages.java.ast.Identifier;
23import com.strobel.decompiler.languages.java.ast.TypeDeclaration;
20import cuchaz.enigma.gui.SourceRemapper; 24import cuchaz.enigma.gui.SourceRemapper;
21import cuchaz.enigma.translation.mapping.EntryResolver; 25import cuchaz.enigma.translation.mapping.EntryResolver;
22import cuchaz.enigma.translation.mapping.ResolutionStrategy; 26import cuchaz.enigma.translation.mapping.ResolutionStrategy;
@@ -133,12 +137,12 @@ public class SourceIndex {
133 // DEBUG 137 // DEBUG
134 // System.out.println( String.format( "%s \"%s\" region: %s", node.getNodeType(), name, region ) ); 138 // System.out.println( String.format( "%s \"%s\" region: %s", node.getNodeType(), name, region ) );
135 139
136 // if the token has a $ in it, something's wrong. Ignore this token 140 // Tokens can have $ in name, even for top-level classes
137 if (name.lastIndexOf('$') >= 0 && this.ignoreBadTokens) { 141 //if (name.lastIndexOf('$') >= 0 && this.ignoreBadTokens) {
138 // DEBUG 142 // // DEBUG
139 System.err.println(String.format("WARNING: %s \"%s\" is probably a bad token. It was ignored", node.getNodeType(), name)); 143 // System.err.println(String.format("WARNING: %s \"%s\" is probably a bad token. It was ignored", node.getNodeType(), name));
140 return null; 144 // return null;
141 } 145 //}
142 146
143 return token; 147 return token;
144 } 148 }