diff options
| author | 2019-01-30 21:05:32 +0200 | |
|---|---|---|
| committer | 2019-01-30 21:05:32 +0200 | |
| commit | ba7a354efae7d49833c887cf147ac940c975a1fa (patch) | |
| tree | 02e14fda81dd5984e24f2df392c57c6e829fc875 /src/main/java/cuchaz/enigma/config/Config.java | |
| parent | Rewrite the Jenkinsfile to use the new declarative pipeline syntax, lets hope... (diff) | |
| download | enigma-fork-ba7a354efae7d49833c887cf147ac940c975a1fa.tar.gz enigma-fork-ba7a354efae7d49833c887cf147ac940c975a1fa.tar.xz enigma-fork-ba7a354efae7d49833c887cf147ac940c975a1fa.zip | |
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
Diffstat (limited to 'src/main/java/cuchaz/enigma/config/Config.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/config/Config.java | 5 |
1 files changed, 2 insertions, 3 deletions
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 { | |||
| 74 | config.proposedColorOutline = new AlphaColorEntry(0x000000, 0.15f); | 74 | config.proposedColorOutline = new AlphaColorEntry(0x000000, 0.15f); |
| 75 | config.deobfuscatedColor = new AlphaColorEntry(0xDCFFDC, 1.0f); | 75 | config.deobfuscatedColor = new AlphaColorEntry(0xDCFFDC, 1.0f); |
| 76 | config.deobfuscatedColorOutline = new AlphaColorEntry(0x50A050, 1.0f); | 76 | config.deobfuscatedColorOutline = new AlphaColorEntry(0x50A050, 1.0f); |
| 77 | config.otherColorOutline = new AlphaColorEntry(0xB4B4B4, 1.0f); | ||
| 78 | config.editorBackground = 0xFFFFFF; | 77 | config.editorBackground = 0xFFFFFF; |
| 79 | config.highlightColor = 0x3333EE; | 78 | config.highlightColor = 0x3333EE; |
| 80 | config.caretColor = 0x000000; | 79 | config.caretColor = 0x000000; |
| @@ -98,7 +97,6 @@ public class Config { | |||
| 98 | config.deobfuscatedColorOutline = new AlphaColorEntry(0x50FA7B, 0.5f); | 97 | config.deobfuscatedColorOutline = new AlphaColorEntry(0x50FA7B, 0.5f); |
| 99 | config.proposedColor = new AlphaColorEntry(0x606366, 0.3f); | 98 | config.proposedColor = new AlphaColorEntry(0x606366, 0.3f); |
| 100 | config.proposedColorOutline = new AlphaColorEntry(0x606366, 0.5f); | 99 | config.proposedColorOutline = new AlphaColorEntry(0x606366, 0.5f); |
| 101 | config.otherColorOutline = new AlphaColorEntry(0xB4B4B4, 0.0f); | ||
| 102 | config.editorBackground = 0x282A36; | 100 | config.editorBackground = 0x282A36; |
| 103 | config.highlightColor = 0xFF79C6; | 101 | config.highlightColor = 0xFF79C6; |
| 104 | config.caretColor = 0xF8F8F2; | 102 | config.caretColor = 0xF8F8F2; |
| @@ -128,7 +126,6 @@ public class Config { | |||
| 128 | public AlphaColorEntry proposedColorOutline; | 126 | public AlphaColorEntry proposedColorOutline; |
| 129 | public AlphaColorEntry deobfuscatedColor; | 127 | public AlphaColorEntry deobfuscatedColor; |
| 130 | public AlphaColorEntry deobfuscatedColorOutline; | 128 | public AlphaColorEntry deobfuscatedColorOutline; |
| 131 | public AlphaColorEntry otherColorOutline; | ||
| 132 | 129 | ||
| 133 | public Integer editorBackground; | 130 | public Integer editorBackground; |
| 134 | public Integer highlightColor; | 131 | public Integer highlightColor; |
| @@ -198,12 +195,14 @@ public class Config { | |||
| 198 | } | 195 | } |
| 199 | 196 | ||
| 200 | private static class IntSerializer implements JsonSerializer<Integer> { | 197 | private static class IntSerializer implements JsonSerializer<Integer> { |
| 198 | @Override | ||
| 201 | public JsonElement serialize(Integer src, Type typeOfSrc, JsonSerializationContext context) { | 199 | public JsonElement serialize(Integer src, Type typeOfSrc, JsonSerializationContext context) { |
| 202 | return new JsonPrimitive("#" + Integer.toHexString(src).toUpperCase()); | 200 | return new JsonPrimitive("#" + Integer.toHexString(src).toUpperCase()); |
| 203 | } | 201 | } |
| 204 | } | 202 | } |
| 205 | 203 | ||
| 206 | private static class IntDeserializer implements JsonDeserializer<Integer> { | 204 | private static class IntDeserializer implements JsonDeserializer<Integer> { |
| 205 | @Override | ||
| 207 | public Integer deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) { | 206 | public Integer deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) { |
| 208 | return (int) Long.parseLong(json.getAsString().replace("#", ""), 16); | 207 | return (int) Long.parseLong(json.getAsString().replace("#", ""), 16); |
| 209 | } | 208 | } |