├── .vscode └── launch.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── icon.png ├── icon.svg ├── package.json └── server ├── dg.jdt.ls.decompiler.cfr-0.0.3.jar ├── dg.jdt.ls.decompiler.common-0.0.3.jar ├── dg.jdt.ls.decompiler.fernflower-0.0.3.jar └── dg.jdt.ls.decompiler.procyon-0.0.3.jar /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | { 3 | "version": "0.1.0", 4 | "configurations": [ 5 | { 6 | "name": "Launch Extension", 7 | "type": "extensionHost", 8 | "request": "launch", 9 | "runtimeExecutable": "${execPath}", 10 | "args": ["--extensionDevelopmentPath=${workspaceRoot}" ], 11 | "stopOnEntry": false 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## 0.0.3 - February 25, 2022 4 | 5 | * Update to latest published decompilers 6 | 7 | ## 0.0.2 - February 22, 2018 8 | 9 | * Update decompiler jars to add internal caching 10 | 11 | ## 0.0.1 - October 13, 2017 12 | 13 | * Initial version 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Eclipse Public License - v 2.0 2 | 3 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE 4 | PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION 5 | OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 6 | 7 | 1. DEFINITIONS 8 | 9 | "Contribution" means: 10 | 11 | a) in the case of the initial Contributor, the initial content 12 | Distributed under this Agreement, and 13 | 14 | b) in the case of each subsequent Contributor: 15 | i) changes to the Program, and 16 | ii) additions to the Program; 17 | where such changes and/or additions to the Program originate from 18 | and are Distributed by that particular Contributor. A Contribution 19 | "originates" from a Contributor if it was added to the Program by 20 | such Contributor itself or anyone acting on such Contributor's behalf. 21 | Contributions do not include changes or additions to the Program that 22 | are not Modified Works. 23 | 24 | "Contributor" means any person or entity that Distributes the Program. 25 | 26 | "Licensed Patents" mean patent claims licensable by a Contributor which 27 | are necessarily infringed by the use or sale of its Contribution alone 28 | or when combined with the Program. 29 | 30 | "Program" means the Contributions Distributed in accordance with this 31 | Agreement. 32 | 33 | "Recipient" means anyone who receives the Program under this Agreement 34 | or any Secondary License (as applicable), including Contributors. 35 | 36 | "Derivative Works" shall mean any work, whether in Source Code or other 37 | form, that is based on (or derived from) the Program and for which the 38 | editorial revisions, annotations, elaborations, or other modifications 39 | represent, as a whole, an original work of authorship. 40 | 41 | "Modified Works" shall mean any work in Source Code or other form that 42 | results from an addition to, deletion from, or modification of the 43 | contents of the Program, including, for purposes of clarity any new file 44 | in Source Code form that contains any contents of the Program. Modified 45 | Works shall not include works that contain only declarations, 46 | interfaces, types, classes, structures, or files of the Program solely 47 | in each case in order to link to, bind by name, or subclass the Program 48 | or Modified Works thereof. 49 | 50 | "Distribute" means the acts of a) distributing or b) making available 51 | in any manner that enables the transfer of a copy. 52 | 53 | "Source Code" means the form of a Program preferred for making 54 | modifications, including but not limited to software source code, 55 | documentation source, and configuration files. 56 | 57 | "Secondary License" means either the GNU General Public License, 58 | Version 2.0, or any later versions of that license, including any 59 | exceptions or additional permissions as identified by the initial 60 | Contributor. 61 | 62 | 2. GRANT OF RIGHTS 63 | 64 | a) Subject to the terms of this Agreement, each Contributor hereby 65 | grants Recipient a non-exclusive, worldwide, royalty-free copyright 66 | license to reproduce, prepare Derivative Works of, publicly display, 67 | publicly perform, Distribute and sublicense the Contribution of such 68 | Contributor, if any, and such Derivative Works. 69 | 70 | b) Subject to the terms of this Agreement, each Contributor hereby 71 | grants Recipient a non-exclusive, worldwide, royalty-free patent 72 | license under Licensed Patents to make, use, sell, offer to sell, 73 | import and otherwise transfer the Contribution of such Contributor, 74 | if any, in Source Code or other form. This patent license shall 75 | apply to the combination of the Contribution and the Program if, at 76 | the time the Contribution is added by the Contributor, such addition 77 | of the Contribution causes such combination to be covered by the 78 | Licensed Patents. The patent license shall not apply to any other 79 | combinations which include the Contribution. No hardware per se is 80 | licensed hereunder. 81 | 82 | c) Recipient understands that although each Contributor grants the 83 | licenses to its Contributions set forth herein, no assurances are 84 | provided by any Contributor that the Program does not infringe the 85 | patent or other intellectual property rights of any other entity. 86 | Each Contributor disclaims any liability to Recipient for claims 87 | brought by any other entity based on infringement of intellectual 88 | property rights or otherwise. As a condition to exercising the 89 | rights and licenses granted hereunder, each Recipient hereby 90 | assumes sole responsibility to secure any other intellectual 91 | property rights needed, if any. For example, if a third party 92 | patent license is required to allow Recipient to Distribute the 93 | Program, it is Recipient's responsibility to acquire that license 94 | before distributing the Program. 95 | 96 | d) Each Contributor represents that to its knowledge it has 97 | sufficient copyright rights in its Contribution, if any, to grant 98 | the copyright license set forth in this Agreement. 99 | 100 | e) Notwithstanding the terms of any Secondary License, no 101 | Contributor makes additional grants to any Recipient (other than 102 | those set forth in this Agreement) as a result of such Recipient's 103 | receipt of the Program under the terms of a Secondary License 104 | (if permitted under the terms of Section 3). 105 | 106 | 3. REQUIREMENTS 107 | 108 | 3.1 If a Contributor Distributes the Program in any form, then: 109 | 110 | a) the Program must also be made available as Source Code, in 111 | accordance with section 3.2, and the Contributor must accompany 112 | the Program with a statement that the Source Code for the Program 113 | is available under this Agreement, and informs Recipients how to 114 | obtain it in a reasonable manner on or through a medium customarily 115 | used for software exchange; and 116 | 117 | b) the Contributor may Distribute the Program under a license 118 | different than this Agreement, provided that such license: 119 | i) effectively disclaims on behalf of all other Contributors all 120 | warranties and conditions, express and implied, including 121 | warranties or conditions of title and non-infringement, and 122 | implied warranties or conditions of merchantability and fitness 123 | for a particular purpose; 124 | 125 | ii) effectively excludes on behalf of all other Contributors all 126 | liability for damages, including direct, indirect, special, 127 | incidental and consequential damages, such as lost profits; 128 | 129 | iii) does not attempt to limit or alter the recipients' rights 130 | in the Source Code under section 3.2; and 131 | 132 | iv) requires any subsequent distribution of the Program by any 133 | party to be under a license that satisfies the requirements 134 | of this section 3. 135 | 136 | 3.2 When the Program is Distributed as Source Code: 137 | 138 | a) it must be made available under this Agreement, or if the 139 | Program (i) is combined with other material in a separate file or 140 | files made available under a Secondary License, and (ii) the initial 141 | Contributor attached to the Source Code the notice described in 142 | Exhibit A of this Agreement, then the Program may be made available 143 | under the terms of such Secondary Licenses, and 144 | 145 | b) a copy of this Agreement must be included with each copy of 146 | the Program. 147 | 148 | 3.3 Contributors may not remove or alter any copyright, patent, 149 | trademark, attribution notices, disclaimers of warranty, or limitations 150 | of liability ("notices") contained within the Program from any copy of 151 | the Program which they Distribute, provided that Contributors may add 152 | their own appropriate notices. 153 | 154 | 4. COMMERCIAL DISTRIBUTION 155 | 156 | Commercial distributors of software may accept certain responsibilities 157 | with respect to end users, business partners and the like. While this 158 | license is intended to facilitate the commercial use of the Program, 159 | the Contributor who includes the Program in a commercial product 160 | offering should do so in a manner which does not create potential 161 | liability for other Contributors. Therefore, if a Contributor includes 162 | the Program in a commercial product offering, such Contributor 163 | ("Commercial Contributor") hereby agrees to defend and indemnify every 164 | other Contributor ("Indemnified Contributor") against any losses, 165 | damages and costs (collectively "Losses") arising from claims, lawsuits 166 | and other legal actions brought by a third party against the Indemnified 167 | Contributor to the extent caused by the acts or omissions of such 168 | Commercial Contributor in connection with its distribution of the Program 169 | in a commercial product offering. The obligations in this section do not 170 | apply to any claims or Losses relating to any actual or alleged 171 | intellectual property infringement. In order to qualify, an Indemnified 172 | Contributor must: a) promptly notify the Commercial Contributor in 173 | writing of such claim, and b) allow the Commercial Contributor to control, 174 | and cooperate with the Commercial Contributor in, the defense and any 175 | related settlement negotiations. The Indemnified Contributor may 176 | participate in any such claim at its own expense. 177 | 178 | For example, a Contributor might include the Program in a commercial 179 | product offering, Product X. That Contributor is then a Commercial 180 | Contributor. If that Commercial Contributor then makes performance 181 | claims, or offers warranties related to Product X, those performance 182 | claims and warranties are such Commercial Contributor's responsibility 183 | alone. Under this section, the Commercial Contributor would have to 184 | defend claims against the other Contributors related to those performance 185 | claims and warranties, and if a court requires any other Contributor to 186 | pay any damages as a result, the Commercial Contributor must pay 187 | those damages. 188 | 189 | 5. NO WARRANTY 190 | 191 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 192 | PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" 193 | BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR 194 | IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF 195 | TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 196 | PURPOSE. Each Recipient is solely responsible for determining the 197 | appropriateness of using and distributing the Program and assumes all 198 | risks associated with its exercise of rights under this Agreement, 199 | including but not limited to the risks and costs of program errors, 200 | compliance with applicable laws, damage to or loss of data, programs 201 | or equipment, and unavailability or interruption of operations. 202 | 203 | 6. DISCLAIMER OF LIABILITY 204 | 205 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 206 | PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS 207 | SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 208 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST 209 | PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 210 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 211 | ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 212 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE 213 | POSSIBILITY OF SUCH DAMAGES. 214 | 215 | 7. GENERAL 216 | 217 | If any provision of this Agreement is invalid or unenforceable under 218 | applicable law, it shall not affect the validity or enforceability of 219 | the remainder of the terms of this Agreement, and without further 220 | action by the parties hereto, such provision shall be reformed to the 221 | minimum extent necessary to make such provision valid and enforceable. 222 | 223 | If Recipient institutes patent litigation against any entity 224 | (including a cross-claim or counterclaim in a lawsuit) alleging that the 225 | Program itself (excluding combinations of the Program with other software 226 | or hardware) infringes such Recipient's patent(s), then such Recipient's 227 | rights granted under Section 2(b) shall terminate as of the date such 228 | litigation is filed. 229 | 230 | All Recipient's rights under this Agreement shall terminate if it 231 | fails to comply with any of the material terms or conditions of this 232 | Agreement and does not cure such failure in a reasonable period of 233 | time after becoming aware of such noncompliance. If all Recipient's 234 | rights under this Agreement terminate, Recipient agrees to cease use 235 | and distribution of the Program as soon as reasonably practicable. 236 | However, Recipient's obligations under this Agreement and any licenses 237 | granted by Recipient relating to the Program shall continue and survive. 238 | 239 | Everyone is permitted to copy and distribute copies of this Agreement, 240 | but in order to avoid inconsistency the Agreement is copyrighted and 241 | may only be modified in the following manner. The Agreement Steward 242 | reserves the right to publish new versions (including revisions) of 243 | this Agreement from time to time. No one other than the Agreement 244 | Steward has the right to modify this Agreement. The Eclipse Foundation 245 | is the initial Agreement Steward. The Eclipse Foundation may assign the 246 | responsibility to serve as the Agreement Steward to a suitable separate 247 | entity. Each new version of the Agreement will be given a distinguishing 248 | version number. The Program (including Contributions) may always be 249 | Distributed subject to the version of the Agreement under which it was 250 | received. In addition, after a new version of the Agreement is published, 251 | Contributor may elect to Distribute the Program (including its 252 | Contributions) under the new version. 253 | 254 | Except as expressly stated in Sections 2(a) and 2(b) above, Recipient 255 | receives no rights or licenses to the intellectual property of any 256 | Contributor under this Agreement, whether expressly, by implication, 257 | estoppel or otherwise. All rights in the Program not expressly granted 258 | under this Agreement are reserved. Nothing in this Agreement is intended 259 | to be enforceable by any entity that is not a Contributor or Recipient. 260 | No third-party beneficiary rights are created under this Agreement. 261 | 262 | Exhibit A - Form of Secondary Licenses Notice 263 | 264 | "This Source Code may also be made available under the following 265 | Secondary Licenses when the conditions for such availability set forth 266 | in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), 267 | version(s), and exceptions or additional permissions here}." 268 | 269 | Simply including a copy of this Agreement, including this Exhibit A 270 | is not sufficient to license the Source Code under Secondary Licenses. 271 | 272 | If it is not possible or desirable to put the notice in a particular 273 | file, then You may include the notice in a location (such as a LICENSE 274 | file in a relevant directory) where a recipient would be likely to 275 | look for such a notice. 276 | 277 | You may add additional accurate notices of copyright ownership. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Decompiler for Java™ in Visual Studio Code 2 | 3 | This extension allows you to decompile Java class files. It requires [Language Support for Java™ by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java), version 0.12.0 or greater. 4 | 5 | To see the decompiler in action, right-click on a Java symbol for which you don't have the source code, and choose Go to Definition (or simply command/ctrl+click on the symbol). You will see the decompiled code. 6 | 7 | The Java source code is available in the repo. 8 | 9 | ## Requirements 10 | 11 | [Language Support for Java™ by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java), version 0.12.0 or greater. This extension does not work with older versions. 12 | 13 | ## Extension Settings 14 | 15 | You can use the following settings to customize the decompiler: 16 | 17 | * `java.contentProvider.preferred` (settings.json only): the ID of a decompiler to use. Currently, `fernflower`, `cfr` and `procyon` are supported. Defaults to `fernflower`. 18 | * `java.decompiler.[id]` (replace `[id]` with the ID of the decompiler you wish to configure): additional configuration to provide to the decompiler. The format depends on the chosen decompiler. Use the autocomplete functionality of Visual Studio Code's settings to view the possible options and their descriptions. 19 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dgileadi/vscode-java-decompiler/57691a5fdacbc67a8b606e34fb636fa89687430b/icon.png -------------------------------------------------------------------------------- /icon.svg: -------------------------------------------------------------------------------- 1 | 2 | File(IClassFile claer provider = new Byver = new ResultSaveger logger = new Dumonfig = new Configu nflower = new 147 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "java-decompiler", 3 | "displayName": "Decompiler for Java", 4 | "description": "Adds a decompiler for the Java Language Support extension.", 5 | "author": "David Gileadi", 6 | "icon": "icon.png", 7 | "version": "0.0.4", 8 | "license": "EPL-2.0", 9 | "publisher": "dgileadi", 10 | "engines": { 11 | "vscode": "^1.5.0" 12 | },"scripts": { 13 | "prepack": "vsce package", 14 | "publish": "vsce publish" 15 | }, 16 | "categories": [ 17 | "Programming Languages" 18 | ], 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/dgileadi/vscode-java-decompiler" 22 | }, 23 | "contributes": { 24 | "javaExtensions": [ 25 | "./server/dg.jdt.ls.decompiler.common-0.0.3.jar", 26 | "./server/dg.jdt.ls.decompiler.cfr-0.0.3.jar", 27 | "./server/dg.jdt.ls.decompiler.fernflower-0.0.3.jar", 28 | "./server/dg.jdt.ls.decompiler.procyon-0.0.3.jar" 29 | ], 30 | "configuration": { 31 | "type": "object", 32 | "title": "Java decompiler configuration", 33 | "properties": { 34 | "java.decompiler.fernflower": { 35 | "type": "object", 36 | "description": "Fernflower configuration", 37 | "properties": { 38 | "rbr": { 39 | "type": "boolean", 40 | "default": true, 41 | "description": "hide bridge methods" 42 | }, 43 | "rsy": { 44 | "type": "boolean", 45 | "default": true, 46 | "description": "hide synthetic class members" 47 | }, 48 | "din": { 49 | "type": "boolean", 50 | "default": true, 51 | "description": "decompile inner classes" 52 | }, 53 | "dc4": { 54 | "type": "boolean", 55 | "default": true, 56 | "description": "collapse 1.4 class references" 57 | }, 58 | "das": { 59 | "type": "boolean", 60 | "default": true, 61 | "description": "decompile assertions" 62 | }, 63 | "hes": { 64 | "type": "boolean", 65 | "default": true, 66 | "description": "hide empty super invocation" 67 | }, 68 | "hdc": { 69 | "type": "boolean", 70 | "default": true, 71 | "description": "hide empty default constructor" 72 | }, 73 | "dgs": { 74 | "type": "boolean", 75 | "default": true, 76 | "description": "decompile generic signatures" 77 | }, 78 | "ner": { 79 | "type": "boolean", 80 | "default": true, 81 | "description": "assume return not throwing exceptions" 82 | }, 83 | "esm": { 84 | "type": "boolean", 85 | "default": true, 86 | "description": "search for 'synchronized' ranges w/o monitorexit instruction (as generated by Kotlin and Scala)" 87 | }, 88 | "den": { 89 | "type": "boolean", 90 | "default": true, 91 | "description": "decompile enumerations" 92 | }, 93 | "rgn": { 94 | "type": "boolean", 95 | "default": true, 96 | "description": "remove getClass() invocation, when it is part of a qualified new statement" 97 | }, 98 | "lit": { 99 | "type": "boolean", 100 | "default": false, 101 | "description": "output numeric literals \"as-is\"" 102 | }, 103 | "asc": { 104 | "type": "boolean", 105 | "default": true, 106 | "description": "encode non-ASCII characters in string and character literals as Unicode escapes" 107 | }, 108 | "bto": { 109 | "type": "boolean", 110 | "default": true, 111 | "description": "interpret int 1 as boolean true (workaround to a compiler bug)" 112 | }, 113 | "nns": { 114 | "type": "boolean", 115 | "default": true, 116 | "description": "allow for not set synthetic attribute (workaround to a compiler bug)" 117 | }, 118 | "uto": { 119 | "type": "boolean", 120 | "default": true, 121 | "description": "consider nameless types as java.lang.Object (workaround to a compiler architecture flaw)" 122 | }, 123 | "udv": { 124 | "type": "boolean", 125 | "default": true, 126 | "description": "reconstruct variable names from debug information, if present" 127 | }, 128 | "ump": { 129 | "type": "boolean", 130 | "default": true, 131 | "description": "reconstruct method parameters" 132 | }, 133 | "rer": { 134 | "type": "boolean", 135 | "default": true, 136 | "description": "remove empty exception ranges" 137 | }, 138 | "fdi": { 139 | "type": "boolean", 140 | "default": true, 141 | "description": "de-inline finally structures" 142 | }, 143 | "mpm": { 144 | "type": "integer", 145 | "default": 0, 146 | "description": "maximum allowed processing time per decompiled method, in seconds. 0 means no upper limit" 147 | }, 148 | "ren": { 149 | "type": "boolean", 150 | "default": false, 151 | "description": "rename ambiguous (resp. obfuscated) classes and class elements" 152 | }, 153 | "urc": { 154 | "type": "string", 155 | "description": "full name of user-supplied class implementing IIdentifierRenamer. It is used to determine which class identifiers should be renamed and provides new identifier names (see \"Renaming identifiers\")" 156 | }, 157 | "inn": { 158 | "type": "boolean", 159 | "default": true, 160 | "description": "check for IntelliJ IDEA-specific @NotNull annotation and remove inserted code if found" 161 | }, 162 | "lac": { 163 | "type": "boolean", 164 | "default": false, 165 | "description": "decompile lambda expressions to anonymous classes" 166 | }, 167 | "nls": { 168 | "type": "boolean", 169 | "default": false, 170 | "description": "define new line character to be used for output. 0 - '\r\n' (Windows), 1 - '\n' (Unix), default is OS-dependent" 171 | }, 172 | "ind": { 173 | "type": "string", 174 | "description": "indentation string (default is 3 spaces)" 175 | }, 176 | "bsm": { 177 | "type": "boolean", 178 | "default": false, 179 | "description": "map bytecode offsets to source lines" 180 | }, 181 | "iib": { 182 | "type": "boolean", 183 | "default": false, 184 | "description": "continue decompiling in the presence of invalid bytecode" 185 | }, 186 | "vac": { 187 | "type": "boolean", 188 | "default": false, 189 | "description": "decode anonymous classes as local classes if they're detected to not actually be anonymous" 190 | }, 191 | "log": { 192 | "type": "string", 193 | "default": "INFO", 194 | "enum": [ 195 | "TRACE", 196 | "INFO", 197 | "WARN", 198 | "ERROR" 199 | ], 200 | "description": "a logging level, possible values are TRACE, INFO, WARN, ERROR" 201 | }, 202 | "ban": { 203 | "type": "string", 204 | "default": "", 205 | "description": "a banner to prepend to decompiled classes" 206 | } 207 | } 208 | }, 209 | "java.decompiler.cfr": { 210 | "type": "object", 211 | "description": "CFR configuration", 212 | "properties": { 213 | "stringbuffer": { 214 | "type": "boolean", 215 | "default": false, 216 | "description": "Convert new StringBuffer().append.append.append to string + string + string - see https://benf.org/other/cfr/stringbuilder-vs-concatenation.html. Default value only applies from JAVA_5." 217 | }, 218 | "stringbuilder": { 219 | "type": "boolean", 220 | "default": true, 221 | "description": "Convert new StringBuilder().append.append.append to string + string + string - see https://benf.org/other/cfr/stringbuilder-vs-concatenation.html. Default value only applies from JAVA_5." 222 | }, 223 | "stringconcat": { 224 | "type": "boolean", 225 | "default": true, 226 | "description": "Convert usages of StringConcatFactor to string + string + string - see https://benf.org/other/cfr/java9stringconcat.html. Default value only applies from JAVA_9." 227 | }, 228 | "decodeenumswitch": { 229 | "type": "boolean", 230 | "default": true, 231 | "description": "Re-sugar switch on enum - see https://benf.org/other/cfr/switch-on-enum.html. Default value only applies from JAVA_5." 232 | }, 233 | "sugarenums": { 234 | "type": "boolean", 235 | "default": true, 236 | "description": "Re-sugar enums - see https://benf.org/other/cfr/how-are-enums-implemented.html. Default value only applies from JAVA_5." 237 | }, 238 | "decodestringswitch": { 239 | "type": "boolean", 240 | "default": true, 241 | "description": "Re-sugar switch on String - see https://benf.org/other/cfr/java7switchonstring.html. Default value only applies from JAVA_7." 242 | }, 243 | "previewfeatures": { 244 | "type": "boolean", 245 | "default": true, 246 | "description": "Decompile preview features if class was compiled with 'javac --enable-preview'" 247 | }, 248 | "sealed": { 249 | "type": "boolean", 250 | "description": "Decompile 'sealed' constructs. Defaults to true from Java 18 on, and also on Java 16 and 17 if previewfeatures is true." 251 | }, 252 | "switchexpression": { 253 | "type": "boolean", 254 | "description": "Re-sugar switch expression. Defaults to true from Java 14 on, and also on Java 12 and 13 if previewfeatures is true." 255 | }, 256 | "recordtypes": { 257 | "type": "boolean", 258 | "description": "Re-sugar record types. Defaults to true from Java 16 on, and also on Java 14 and 15 if previewfeatures is true." 259 | }, 260 | "instanceofpattern": { 261 | "type": "boolean", 262 | "description": "Re-sugar instanceof pattern matches. Defaults to true from Java 16 on, and also on Java 14 and 15 if previewfeatures is true." 263 | }, 264 | "arrayiter": { 265 | "type": "boolean", 266 | "default": true, 267 | "description": "Re-sugar array based iteration. Default value only applies from JAVA_5." 268 | }, 269 | "collectioniter": { 270 | "type": "boolean", 271 | "default": true, 272 | "description": "Re-sugar collection based iteration. Default value only applies from JAVA_5." 273 | }, 274 | "tryresources": { 275 | "type": "boolean", 276 | "default": true, 277 | "description": "Reconstruct try-with-resources. Default value only applies from JAVA_7." 278 | }, 279 | "decodelambdas": { 280 | "type": "boolean", 281 | "default": true, 282 | "description": "Re-build lambda functions. Default value only applies from JAVA_8." 283 | }, 284 | "innerclasses": { 285 | "type": "boolean", 286 | "default": true, 287 | "description": "Decompile inner classes" 288 | }, 289 | "forbidmethodscopedclasses": { 290 | "type": "boolean", 291 | "default": false, 292 | "description": "Don't allow method scoped classes. Note - this will NOT be used as a fallback, it must be specified.\nIt will produce odd code." 293 | }, 294 | "forbidanonymousclasses": { 295 | "type": "boolean", 296 | "default": false, 297 | "description": "Don't allow anonymous classes. Note - this will NOT be used as a fallback, it must be specified.\nIt will produce odd code." 298 | }, 299 | "skipbatchinnerclasses": { 300 | "type": "boolean", 301 | "default": true, 302 | "description": "When processing many files, skip inner classes, as they will be processed as part of outer classes anyway. If false, you will see inner classes as separate entities also." 303 | }, 304 | "hideutf": { 305 | "type": "boolean", 306 | "default": true, 307 | "description": "Hide UTF8 characters - quote them instead of showing the raw characters" 308 | }, 309 | "hidelongstrings": { 310 | "type": "boolean", 311 | "default": false, 312 | "description": "Hide very long strings - useful if obfuscators have placed fake code in strings" 313 | }, 314 | "removeboilerplate": { 315 | "type": "boolean", 316 | "default": true, 317 | "description": "Remove boilderplate functions - constructor boilerplate, lambda deserialisation etc." 318 | }, 319 | "removeinnerclasssynthetics": { 320 | "type": "boolean", 321 | "default": true, 322 | "description": "Remove (where possible) implicit outer class references in inner classes" 323 | }, 324 | "relinkconst": { 325 | "type": "boolean", 326 | "default": true, 327 | "description": "Relink constants - if there is an inlined reference to a field, attempt to de-inline." 328 | }, 329 | "relinkconststring": { 330 | "type": "boolean", 331 | "default": true, 332 | "description": "Relink constant strings - if there is a local reference to a string which matches a static final, use the static final. If unspecified defaults to the value of relinkconst." 333 | }, 334 | "liftconstructorinit": { 335 | "type": "boolean", 336 | "default": true, 337 | "description": "Lift initialisation code common to all constructors into member initialisation" 338 | }, 339 | "removedeadmethods": { 340 | "type": "boolean", 341 | "default": true, 342 | "description": "Remove pointless methods - default constructor etc." 343 | }, 344 | "removebadgenerics": { 345 | "type": "boolean", 346 | "default": true, 347 | "description": "Hide generics where we've obviously got it wrong, and fallback to non-generic" 348 | }, 349 | "sugarasserts": { 350 | "type": "boolean", 351 | "default": true, 352 | "description": "Re-sugar assert calls" 353 | }, 354 | "sugarboxing": { 355 | "type": "boolean", 356 | "default": true, 357 | "description": "Where possible, remove pointless boxing wrappers" 358 | }, 359 | "sugarretrolambda": { 360 | "type": "boolean", 361 | "default": false, 362 | "description": "Where possible, resugar uses of retro lambda" 363 | }, 364 | "showversion": { 365 | "type": "boolean", 366 | "default": true, 367 | "description": "Show used CFR version in header (handy to turn off when regression testing)" 368 | }, 369 | "decodefinally": { 370 | "type": "boolean", 371 | "default": true, 372 | "description": "Re-sugar finally statements" 373 | }, 374 | "tidymonitors": { 375 | "type": "boolean", 376 | "default": true, 377 | "description": "Remove support code for monitors - e.g. catch blocks just to exit a monitor" 378 | }, 379 | "commentmonitors": { 380 | "type": "boolean", 381 | "default": false, 382 | "description": "Replace monitors with comments - useful if we're completely confused" 383 | }, 384 | "lenient": { 385 | "type": "boolean", 386 | "default": false, 387 | "description": "Be a bit more lenient in situations where we'd normally throw an exception" 388 | }, 389 | "dumpclasspath": { 390 | "type": "boolean", 391 | "default": false, 392 | "description": "Dump class path for debugging purposes" 393 | }, 394 | "comments": { 395 | "type": "boolean", 396 | "default": true, 397 | "description": "Output comments describing decompiler status, fallback flags etc." 398 | }, 399 | "forcetopsort": { 400 | "type": [ 401 | "boolean", 402 | "null" 403 | ], 404 | "default": null, 405 | "description": "Force basic block sorting. Usually not necessary for code emitted directly from javac, but required in the case of obfuscation (or dex2jar!). Will be enabled in recovery." 406 | }, 407 | "forceclassfilever": { 408 | "type": "string", 409 | "enum": [ 410 | "1.0", 411 | "1.2", 412 | "1.3", 413 | "1.4", 414 | "5", 415 | "6", 416 | "7", 417 | "8", 418 | "9", 419 | "10", 420 | "11", 421 | "12", 422 | "12", 423 | "13", 424 | "14", 425 | "14", 426 | "15", 427 | "16", 428 | "16", 429 | "17", 430 | "17", 431 | "18", 432 | "18" 433 | ], 434 | "default": null, 435 | "description": "Force the version of the classfile (and hence java) that classfiles are decompiled as. Normally detected from class files. --help forceclassfilever for details." 436 | }, 437 | "forloopaggcapture": { 438 | "type": [ 439 | "boolean", 440 | "null" 441 | ], 442 | "default": null, 443 | "description": "Allow for loops to aggressively roll mutations into update section, even if they don't appear to be involved with the predicate" 444 | }, 445 | "forcetopsortaggress": { 446 | "type": [ 447 | "boolean", 448 | "null" 449 | ], 450 | "default": null, 451 | "description": "Force extra aggressive topsort options" 452 | }, 453 | "forcetopsortnopull": { 454 | "type": [ 455 | "boolean", 456 | "null" 457 | ], 458 | "default": null, 459 | "description": "Force topsort not to pull try blocks" 460 | }, 461 | "forcecondpropagate": { 462 | "type": [ 463 | "boolean", 464 | "null" 465 | ], 466 | "default": null, 467 | "description": "Pull results of deterministic jumps back through some constant assignments" 468 | }, 469 | "reducecondscope": { 470 | "type": [ 471 | "boolean", 472 | "null" 473 | ], 474 | "default": null, 475 | "description": "Reduce the scope of conditionals, possibly generating more anonymous blocks" 476 | }, 477 | "forcereturningifs": { 478 | "type": [ 479 | "boolean", 480 | "null" 481 | ], 482 | "default": null, 483 | "description": "Move return up to jump site" 484 | }, 485 | "ignoreexceptionsalways": { 486 | "type": "boolean", 487 | "default": false, 488 | "description": "Drop exception information (WARNING : changes semantics, dangerous!)" 489 | }, 490 | "antiobf": { 491 | "type": "boolean", 492 | "default": false, 493 | "description": "Undo various obfuscations" 494 | }, 495 | "obfcontrol": { 496 | "type": "boolean", 497 | "default": false, 498 | "description": "Undo control flow obfuscation, if unspecified then defaults to the value of antiobf" 499 | }, 500 | "obfattr": { 501 | "type": "boolean", 502 | "default": false, 503 | "description": "Undo attribute obfuscation, if unspecified then defaults to the value of antiobf" 504 | }, 505 | "constobf": { 506 | "type": "boolean", 507 | "default": false, 508 | "description": "Undo constant obfuscation, if unspecified then defaults to the value of antiobf" 509 | }, 510 | "hidebridgemethods": { 511 | "type": "boolean", 512 | "default": true, 513 | "description": "Hide bridge methods, if unspecified then defaults to the negation of obfattr" 514 | }, 515 | "ignoreexceptions": { 516 | "type": "boolean", 517 | "default": false, 518 | "description": "Drop exception information if completely stuck (WARNING : changes semantics, dangerous!)" 519 | }, 520 | "forceexceptionprune": { 521 | "type": [ 522 | "boolean", 523 | "null" 524 | ], 525 | "default": null, 526 | "description": "Remove nested exception handlers if they don't change semantics" 527 | }, 528 | "aexagg": { 529 | "type": [ 530 | "boolean", 531 | "null" 532 | ], 533 | "default": null, 534 | "description": "Try to extend and merge exceptions more aggressively" 535 | }, 536 | "aexagg2": { 537 | "type": [ 538 | "boolean", 539 | "null" 540 | ], 541 | "default": null, 542 | "description": "Try to extend and merge exceptions more aggressively (may change semantics)" 543 | }, 544 | "recovertypeclash": { 545 | "type": [ 546 | "boolean", 547 | "null" 548 | ], 549 | "default": null, 550 | "description": "Split lifetimes where analysis caused type clash" 551 | }, 552 | "recovertypehints": { 553 | "type": [ 554 | "boolean", 555 | "null" 556 | ], 557 | "default": null, 558 | "description": "Recover type hints for iterators from first pass" 559 | }, 560 | "silent": { 561 | "type": "boolean", 562 | "default": false, 563 | "description": "Don't display state while decompiling" 564 | }, 565 | "recover": { 566 | "type": "boolean", 567 | "default": true, 568 | "description": "Allow more and more aggressive options to be set if decompilation fails" 569 | }, 570 | "eclipse": { 571 | "type": "boolean", 572 | "default": true, 573 | "description": "Enable transformations to handle Eclipse code better" 574 | }, 575 | "override": { 576 | "type": "boolean", 577 | "default": true, 578 | "description": "Generate @Override annotations (if method is seen to implement interface method, or override a base class method) Default value only applies from JAVA_6." 579 | }, 580 | "showinferrable": { 581 | "type": "boolean", 582 | "default": false, 583 | "description": "Decorate methods with explicit types if not implied by arguments. Default value only applies from JAVA_7." 584 | }, 585 | "help": { 586 | "type": [ 587 | "string", 588 | "null" 589 | ], 590 | "default": null, 591 | "description": "Show help for a given parameter" 592 | }, 593 | "allowcorrecting": { 594 | "type": "boolean", 595 | "default": true, 596 | "description": "Allow transformations which correct errors, potentially at the cost of altering emitted code behaviour. An example would be removing impossible (in java!) exception handling - if this has any effect, a warning will be emitted." 597 | }, 598 | "labelledblocks": { 599 | "type": "boolean", 600 | "default": true, 601 | "description": "Allow code to be emitted which uses labelled blocks, (handling odd forward gotos)" 602 | }, 603 | "j14classobj": { 604 | "type": "boolean", 605 | "default": false, 606 | "description": "Reverse java 1.4 class object construction. Default value only applies from JAVA_5." 607 | }, 608 | "hidelangimports": { 609 | "type": "boolean", 610 | "default": true, 611 | "description": "Hide imports from java.lang." 612 | }, 613 | "recpass": { 614 | "type": "integer", 615 | "default": 0, 616 | "description": "Decompile specifically with recovery options from pass #X. (really only useful for debugging)" 617 | }, 618 | "analyseas": { 619 | "type": "string", 620 | "enum": [ 621 | "DETECT", 622 | "JAR", 623 | "WAR", 624 | "CLASS" 625 | ], 626 | "default": null, 627 | "description": "Force file to be analysed as 'jar' or 'class'" 628 | }, 629 | "jarfilter": { 630 | "type": [ 631 | "string", 632 | "null" 633 | ], 634 | "default": null, 635 | "description": "Substring regex - analyse only classes where the fqn matches this pattern. (when analysing jar)" 636 | }, 637 | "rename": { 638 | "type": "boolean", 639 | "default": false, 640 | "description": "Synonym for 'renamedupmembers' + 'renameillegalidents' + 'renameenumidents'" 641 | }, 642 | "renamedupmembers": { 643 | "type": "boolean", 644 | "default": false, 645 | "description": "Rename ambiguous/duplicate fields. Note - this WILL break reflection based access, so is not automatically enabled. If unspecified then defaults to the value of rename." 646 | }, 647 | "renamesmallmembers": { 648 | "type": "integer", 649 | "default": 0, 650 | "description": "Rename small members. Note - this WILL break reflection based access, so is not automatically enabled." 651 | }, 652 | "renameillegalidents": { 653 | "type": "boolean", 654 | "default": false, 655 | "description": "Rename identifiers which are not valid java identifiers. Note - this WILL break reflection based access, so is not automatically enabled. If unspecified then defaults to the value of rename." 656 | }, 657 | "renameenumidents": { 658 | "type": "boolean", 659 | "default": false, 660 | "description": "Rename ENUM identifiers which do not match their 'expected' string names. Note - this WILL break reflection based access, so is not automatically enabled. If unspecified then defaults to the value of rename." 661 | }, 662 | "removedeadconditionals": { 663 | "type": [ 664 | "boolean", 665 | "null" 666 | ], 667 | "default": null, 668 | "description": "Remove code that can't be executed." 669 | }, 670 | "aggressivedoextension": { 671 | "type": [ 672 | "boolean", 673 | "null" 674 | ], 675 | "default": null, 676 | "description": "Fold impossible jumps into do loops with 'first' test" 677 | }, 678 | "aggressiveduff": { 679 | "type": [ 680 | "boolean", 681 | "null" 682 | ], 683 | "default": null, 684 | "description": "Fold duff device style switches with additional control." 685 | }, 686 | "aggressivedocopy": { 687 | "type": "integer", 688 | "default": 0, 689 | "description": "Clone code from impossible jumps into loops with 'first' test" 690 | }, 691 | "aggressivesizethreshold": { 692 | "type": "integer", 693 | "default": 13000, 694 | "description": "Opcode count at which to trigger aggressive reductions" 695 | }, 696 | "staticinitreturn": { 697 | "type": "boolean", 698 | "default": true, 699 | "description": "Try to remove return from static init" 700 | }, 701 | "usenametable": { 702 | "type": "boolean", 703 | "default": true, 704 | "description": "Use local variable name table if present" 705 | }, 706 | "methodname": { 707 | "type": [ 708 | "string", 709 | "null" 710 | ], 711 | "default": null, 712 | "description": "Name of method to analyse" 713 | }, 714 | "extraclasspath": { 715 | "type": [ 716 | "string", 717 | "null" 718 | ], 719 | "default": null, 720 | "description": "additional class path - classes in this classpath will be used if needed." 721 | }, 722 | "pullcodecase": { 723 | "type": "boolean", 724 | "default": false, 725 | "description": "Pull code into case statements agressively" 726 | }, 727 | "allowmalformedswitch": { 728 | "type": [ 729 | "boolean", 730 | "null" 731 | ], 732 | "default": null, 733 | "description": "Allow potentially malformed switch statements" 734 | }, 735 | "elidescala": { 736 | "type": "boolean", 737 | "default": false, 738 | "description": "Elide things which aren't helpful in scala output (serialVersionUID, @ScalaSignature)" 739 | }, 740 | "usesignatures": { 741 | "type": "boolean", 742 | "default": true, 743 | "description": "Use signatures in addition to descriptors (when they are not obviously incorrect)" 744 | }, 745 | "caseinsensitivefs": { 746 | "type": "boolean", 747 | "description": "Cope with case insensitive file systems by renaming colliding classes. Defaults to the system's case-insensitivity." 748 | }, 749 | "lomem": { 750 | "type": "boolean", 751 | "default": false, 752 | "description": "Be more agressive about uncaching in order to reduce memory footprint" 753 | }, 754 | "importfilter": { 755 | "type": [ 756 | "string", 757 | "null" 758 | ], 759 | "default": null, 760 | "description": "Substring regex - import classes only when fqn matches this pattern. (VNegate with !, eg !lang)" 761 | }, 762 | "obfuscationpath": { 763 | "type": [ 764 | "string", 765 | "null" 766 | ], 767 | "default": null, 768 | "description": "Path to obfuscation symbol remapping file" 769 | }, 770 | "trackbytecodeloc": { 771 | "type": "boolean", 772 | "default": false, 773 | "description": "Propagate bytecode location info." 774 | } 775 | } 776 | }, 777 | "java.decompiler.procyon": { 778 | "type": "object", 779 | "description": "Procyon configuration", 780 | "properties": { 781 | "mergeVariables": { 782 | "type": "boolean", 783 | "default": false, 784 | "description": "Attempt to merge as many variables as possible. This may lead to fewer declarations, but at the expense of inlining and useful naming. This feature is experimental and may be removed or become the standard behavior in future releases." 785 | }, 786 | "forceExplicitImports": { 787 | "type": "boolean", 788 | "default": false, 789 | "description": "Collapse multiple imports from the same package into a single wildcard import." 790 | }, 791 | "forceExplicitTypeArguments": { 792 | "type": "boolean", 793 | "default": false, 794 | "description": "Always print type arguments to generic methods." 795 | }, 796 | "retainRedundantCasts": { 797 | "type": "boolean", 798 | "default": false, 799 | "description": "Do not remove redundant explicit casts." 800 | }, 801 | "flattenSwitchBlocks": { 802 | "type": "boolean", 803 | "default": false, 804 | "description": "Drop the braces statements around switch sections when possible." 805 | }, 806 | "showSyntheticMembers": { 807 | "type": "boolean", 808 | "default": false, 809 | "description": "Show synthetic (compiler-generated) members." 810 | }, 811 | "excludeNestedTypes": { 812 | "type": "boolean", 813 | "default": false, 814 | "description": "Exclude nested types when decompiling their enclosing types." 815 | }, 816 | "showDebugLineNumbers": { 817 | "type": "boolean", 818 | "default": false, 819 | "description": "For debugging, show Java line numbers as inline comments (implies -ln; requires -o)." 820 | }, 821 | "retainPointlessSwitches": { 822 | "type": "boolean", 823 | "default": false, 824 | "description": "Do not lift the contents of switches having only a default label." 825 | }, 826 | "unicodeOutputEnabled": { 827 | "type": "boolean", 828 | "default": false, 829 | "description": "Enable Unicode output (printable non-ASCII characters will not be escaped)." 830 | }, 831 | "simplifyMemberReferences": { 832 | "type": "boolean", 833 | "default": false, 834 | "description": "Simplify type-qualified member references in Java output [EXPERIMENTAL]." 835 | }, 836 | "textBlockLineMinimum": { 837 | "type": "int", 838 | "default": 3, 839 | "description": "Specify the minimum number of line breaks before string literals are rendered as text blocksDefault is 3; set to 0 to disable text blocks." 840 | }, 841 | "forcedCompilerTarget": { 842 | "type": "string", 843 | "enum": [ 844 | "JDK1_1", 845 | "JDK1_2", 846 | "JDK1_3", 847 | "JDK1_4", 848 | "JDK1_5", 849 | "JDK1_6", 850 | "JDK1_7", 851 | "JDK1_8", 852 | "JDK9", 853 | "JDK10", 854 | "JDK11", 855 | "JDK12", 856 | "JDK13", 857 | "JDK14", 858 | "JDK15", 859 | "JDK16", 860 | "JDK17" 861 | ], 862 | "default": null, 863 | "description": "Explicitly specify the language version to decompile for, e.g., 1.7, 1.8, 8, 9, etc. [EXPERIMENTAL, INCOMPLETE]" 864 | }, 865 | "forceFullyQualifiedReferences": { 866 | "type": "boolean", 867 | "default": false, 868 | "description": "Force fully qualified type and member references in Java output." 869 | }, 870 | "disableForEachTransforms": { 871 | "type": "boolean", 872 | "default": false, 873 | "description": "Disable 'for each' loop transforms." 874 | } 875 | }, 876 | "default": null 877 | } 878 | } 879 | } 880 | }, 881 | "extensionDependencies": [ 882 | "redhat.java" 883 | ] 884 | } -------------------------------------------------------------------------------- /server/dg.jdt.ls.decompiler.cfr-0.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dgileadi/vscode-java-decompiler/57691a5fdacbc67a8b606e34fb636fa89687430b/server/dg.jdt.ls.decompiler.cfr-0.0.3.jar -------------------------------------------------------------------------------- /server/dg.jdt.ls.decompiler.common-0.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dgileadi/vscode-java-decompiler/57691a5fdacbc67a8b606e34fb636fa89687430b/server/dg.jdt.ls.decompiler.common-0.0.3.jar -------------------------------------------------------------------------------- /server/dg.jdt.ls.decompiler.fernflower-0.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dgileadi/vscode-java-decompiler/57691a5fdacbc67a8b606e34fb636fa89687430b/server/dg.jdt.ls.decompiler.fernflower-0.0.3.jar -------------------------------------------------------------------------------- /server/dg.jdt.ls.decompiler.procyon-0.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dgileadi/vscode-java-decompiler/57691a5fdacbc67a8b606e34fb636fa89687430b/server/dg.jdt.ls.decompiler.procyon-0.0.3.jar --------------------------------------------------------------------------------