From ba7a354efae7d49833c887cf147ac940c975a1fa Mon Sep 17 00:00:00 2001 From: Gegy Date: Wed, 30 Jan 2019 21:05:32 +0200 Subject: Remap sources (#106) * Source remapping beginnings * Fix navigation to remapped classes * Translate identifier info reference * Remap local variables with default names in source * Caching translator * Fix lack of highlighting for first opened class * Fix unicode variable names * Unicode checker shouldn't be checking just alphanumeric * Fix package tree being built from obf names * Don't index `this` as method call for method::reference * Apply proposed names * Fix source export issues * Replace unicode var names at bytecode level uniquely * Drop imports from editor source * Class selector fixes * Delta keep track of base mappings to enable lookup of old names * Optimize source remapping by remapping source with a StringBuffer instead of copying * Bump version --- src/main/java/cuchaz/enigma/config/Config.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/cuchaz/enigma/config/Config.java') diff --git a/src/main/java/cuchaz/enigma/config/Config.java b/src/main/java/cuchaz/enigma/config/Config.java index 55f867e..6f5a337 100644 --- a/src/main/java/cuchaz/enigma/config/Config.java +++ b/src/main/java/cuchaz/enigma/config/Config.java @@ -74,7 +74,6 @@ public class Config { config.proposedColorOutline = new AlphaColorEntry(0x000000, 0.15f); config.deobfuscatedColor = new AlphaColorEntry(0xDCFFDC, 1.0f); config.deobfuscatedColorOutline = new AlphaColorEntry(0x50A050, 1.0f); - config.otherColorOutline = new AlphaColorEntry(0xB4B4B4, 1.0f); config.editorBackground = 0xFFFFFF; config.highlightColor = 0x3333EE; config.caretColor = 0x000000; @@ -98,7 +97,6 @@ public class Config { config.deobfuscatedColorOutline = new AlphaColorEntry(0x50FA7B, 0.5f); config.proposedColor = new AlphaColorEntry(0x606366, 0.3f); config.proposedColorOutline = new AlphaColorEntry(0x606366, 0.5f); - config.otherColorOutline = new AlphaColorEntry(0xB4B4B4, 0.0f); config.editorBackground = 0x282A36; config.highlightColor = 0xFF79C6; config.caretColor = 0xF8F8F2; @@ -128,7 +126,6 @@ public class Config { public AlphaColorEntry proposedColorOutline; public AlphaColorEntry deobfuscatedColor; public AlphaColorEntry deobfuscatedColorOutline; - public AlphaColorEntry otherColorOutline; public Integer editorBackground; public Integer highlightColor; @@ -198,12 +195,14 @@ public class Config { } private static class IntSerializer implements JsonSerializer { + @Override public JsonElement serialize(Integer src, Type typeOfSrc, JsonSerializationContext context) { return new JsonPrimitive("#" + Integer.toHexString(src).toUpperCase()); } } private static class IntDeserializer implements JsonDeserializer { + @Override public Integer deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) { return (int) Long.parseLong(json.getAsString().replace("#", ""), 16); } -- cgit v1.2.3