master Changelog 8.0 === - 8.0.7 Fix extract for record components with varargs (#56) Update dependencies and Gradle 7.4.2 Bump docker java to 17 to support Java16Tests - 8.0.6 Set the master branch as the default branch to operate from. (#55) - 8.0.5 Add TeamCity setup (#54) - 8.0.4 Fix compact constructor extraction and improve record component range calculation (#53) - 8.0.3 Fix constructor names of local classes (#50) - 8.0.2 Support Java 17 and fix local classname bug (#49) - 8.0.1 Fix Srg2Source remapping var variables (#48) - 8.0.0 Update JDT to 3.26.0 and require Java 11 (#47) Support Java 16 Update tests for Java 11 changes Update pattern matching node traversal Switch to GradleUtils for git info Update ASM to 9.1 Requires Java 11 because JDT now requires it. 7.0 === - 7.0.16 JDT fixes and Gradle 6.9 (#46) - 7.0.15 Quick test to support basic records and pattern matching. These are java 16 features that will need a JDT update when ready. A re-work of the entire unit test suite is also on the TODO. I want to be able to test every JLS version/feature. - 7.0.14 Fix Forge maven location for jenkins. (#45) - 7.0.13 Update JDT and fix old forge maven links (#44) - 7.0.12 Fix NPEs in RangeApplier and sortImports crashing on package-infos (#43) Update MinecraftTest to support MCPConfigV2 - 7.0.11 Fix NPE when not using --guessLambdas option (#42) - 7.0.10 Cleanup JDT patching task, use implementation configuration (#41) - 7.0.9 Update Gradle to 6.8.3, fix JSR305 artifact - 7.0.8 Add explicit dependency on JSR305 artifact ModLauncher depends on this too, but listed in the runtime only scope - 7.0.7 Use implementation instead of compile configuration - 7.0.6 Use java toolchain instead of compatibility versions - 7.0.5 Update Gradle version to 6.8.3 - 7.0.4 Fix findRoot eaaarly exit on interfaces. - 7.0.3 Attempt to remap static import class names. - 7.0.2 Static initalisers are not - 7.0.1 Added Local variables to range files Standardized lambda method names Properly tracked static initalizers as methods Added TSRG2 support. Added some hacky processors to help translate fernflower decompiled code: Import Sorting: Sorts imports like FF does, useful for class renames. Lambda Methods Guessing: Uses unique IDs of parameters in SRG to map lambda arguments, only useful when in SRG names. Local Variable Guessing: Follows JAD variable naming that FF uses to change variables based on class name changes. These options are hacky and not really supported. Use at your own risk, it might work, it might break everything. Always make backups. TODO: Re-order inner classes. Fernflower writes classes in alphabetical order, and with class renaming this order can change. - 7.0.0 Make the mixin system optional --mixins to enable. Make mixin errors non-fatal --fatalmixins to make them fatal again. 5.0 === - 5.0.21 @Interface support, Skipped @Implements as it's just a wrapper. Basic @Overwrite support, does nothing with aliases field, Unsure if possible? - 5.0.20 @Accessor support - 5.0.19 Refactor Mixin code to be a bit more modular. - 5.0.18 Initial Mixin support. @Mixin, and @Shadow should be supported. See unit tests and comments for limitation. - 5.0.17 Enable most of our small tests. - 5.0.16 Update license to LGPL like the rest of Forge code. More fixes to output Method overrides are properly resolved Synthetic constructors get proper arguments added Console interface works now. Console interface will reload and dynamically patch needed classes if not in pre-patched jar. - 5.0.15 Rewrite RangeApply. - 5.0.14 Major refactor/clanup/rewrite - 5.0.13 Don't force new line at end of file - 5.0.12 Don't force new line at end of file - 5.0.11 Don't print referenced classes for local generic types. There is no good way to reference these local values as they essentially anon classes. - 5.0.10 Fix import processor in file with no imports. - 5.0.9 Better handle import lists with comments and spaces between imports. - 5.0.8 Keep all of our API in fatjar. - 5.0.7 Fix NPE with unqualified outputs. Shutup osgi's nls warnings. Allow --keepImports to be supplied without a value and default to true. But defaults to false if --keepImports is not passed in. - 5.0.6 Reimplemented keep imports option in range map - 5.0.5 Reimplemented keep imports option in range map - 5.0.4 Close output in RangeApplier when finished. - 5.0.3 Remove \r striping. - 5.0.2 Rewrite RangeApplier console tool. Update MCPTest to run Apply and compare against original SRG jar. Update tests to reflect qualified changes. - 5.0.1 Fix jenkins, as it does not have the javax.crypto extension. - 5.0.0 Major RangeExtractor refactor: Hid RangeExtractor, you should use RangeExtractorBuilder now for better compatibility. Changed RangeExtractor command line arguments, now uses JOptSimple and named arguments. Added --cfg argument to allow specifying extra arguments from a file. Rewrote MinecraftTest to use MCPConfig repo format instead of Forge. Used Proguard to shrink fatjar to save 7MB. Now properly use JDT API to batch the parsing of ASTs. To achieve this for InputSupplier's we need to ASM edit one of JDT's internals. If this ASM edit is not in place, we will fall back to the unbatched system, which produces the same result, just slower. We apply this ASM patch at build time for the fatjar. Doing so at runtime is on the TODO list. 4.2 === - 4.2.7 Fixed NPE when not using a log file. - 4.2.6 Publish sources artifact. - 4.2.5 Fix invalid import test, it's in internal names not code names. - 4.2.4 Include root directories in the classpath entries to better allow for dev time extraction. Prevent importing things from the default package. This will cause the class to compile, and is caused by something that requires a major re-write, so this is here for now. - 4.2.3 Fix imports being added for qualified names when unneeded. - 4.2.2 Fix issue with inner classes in srg file loading. - 4.2.1 Fix tsrg current class and support lists of strings. - 4.2.0 Update to J8, update all libraries. Add TSRG support. 4.1 === - 4.1.4 Update eclipse AST lib. Better java9 support. - 4.1.3 Fix index generator task. - 4.1.2 Add maven credentials to publish task. - 4.1.1 Fix Jenkinsfile casing. - 4.1.0 Convert to new JenkinsFile build service Bump version to 4.1 and new version sceme. Add fatjar distribution. 3.3 === - 3.3.29 Merge pull request #19 from Minecrell/remove-spoon Remove unused dependency on Spoon to prevent conflicts - 3.3.28 Merge pull request #17 from boq/local-type-fix Add support for local types (fix for #14 and #16) - 3.3.27 Merge pull request #21 from mezz/master Throw AssertionErrors instead of using System.exit(1) to help debugging - 3.3.26 Throw AssertionErrors instead of using System.exit(1) to help debugging - 3.3.25 Remove unused dependency on Spoon to prevent conflicts Srg2Source is shaded into ForgeGradle, and consequently the entirely unused Spoon library is also shaded. Other Gradle plugins cannot depend on newer versions of Spoon because ForgeGradle's copy will always conflict with them. - 3.3.24 Implement support for local types - 3.3.23 Add tests for anonymous and inner classes before changing anything - 3.3.22 Replace System.exit() with AssertionError throw in 'lib' part (not user programs) to simplify future debugging in environments like ForgeGradle. - 3.3.21 Properly handle package lines from SRG files. And fix issue with multiple empty lines as the end of files. Closes #13 - 3.3.20 Fix getting package name from file name starting with / - 3.3.19 Cleanup MinecraftTest. Point it at a setup Forge directory and it will test range extract and apply. If it passes the full cycle worked! - 3.3.18 Add Whitespace issue test for RangeApplier. - 3.3.17 Push line endings settings to use LF. - 3.3.16 Kill python, we dont need it anymore, its still in git history for reference. - 3.3.15 Make RangeMap public so we can run RangeApplier using in-memory range files. - 3.3.14 Make ExceptorFile public so we can run RangeApplier using in-memory exc files. - 3.3.13 Rework Import management functions. Sadly due to internal structure of S2S's extractor, we don't have information in inheratance or proper inner classes. So there are some false positives when it comes to a Subclass using a inner class of it's parent. - 3.3.12 Don't add imports for inner classes. - 3.3.11 Add option to RangeApplier to keep unused imports, useful for Forge patches to skip import diffs. - 3.3.10 Update test results. TODO: Find a fix for some duplicates. - 3.3.9 Fix some javadocs that errored. Remove a lot of minecraft specific references in code. Walk annotations and other extra segements we wernt walking before. Re-work the imports management to deal with extra imports from other things besides minecraft namespace. TODO: Add config option that will disabel unused import cleaning. - 3.3.8 Fix labda test on older JVMs - 3.3.7 Add caching support, feed in the last log and file that have not changed will use the old output. Good for large projects such as the MC code base so it doesn't have to rebuild all of the ASTs. - 3.3.6 Begin work on Minecraft bulk test in prep for spoon. Other minor changes. - 3.3.5 Remove resources for CB conversion, no longer needed/used. - 3.3.4 Remove jgit dep, it isn't needed? Closes #11 - 3.3.3 Cleanup some code and add test for package level annotations. May need more work for more complex annotations. - 3.3.2 Compute MD5 after standerdizing newlines. - 3.3.1 Update eclipse JDT library to 2016. Add mechanic to support Source level selctions. Add Lambda error test. Bumped version to 3.0 snapshot in prep for reworking major internal parts. {So we don't break existing users!} Fixes #9 - 3.3.0 Revert "Revert "accounted for classes defined in methods which have no names"" This reverts commit 61f5f4bcf7b3693867d5557a0b232583e5c1bfe8. OldPython ========= - OldPython.75 Revert "accounted for classes defined in methods which have no names" This reverts commit bc8718c2fe192f597ab9db7f263c90c2c38c4e98. - OldPython.74 accounted for classes defined in methods which have no names - OldPython.73 Additional generic test, and hoped fix for test - OldPython.72 Update wrapper to 2.7 - OldPython.71 Update build for maven deployment - OldPython.70 Fixed overriden generic method refernce printing. - OldPython.69 Add generic signature unit test. - OldPython.68 Bump version to not conflict with anything in use. Add JUint dependancy - OldPython.67 updated to ASM 5 - OldPython.66 Update to Guava 18.0 - OldPython.65 Protect against source files that have no types. - OldPython.64 Fix owner name on self-referencing anon-inner classes methods. - OldPython.63 why not read the packages... - OldPython.62 Repush proper bug fix Abrar killed -.- - OldPython.61 fixed inner class imports - OldPython.60 backwards compatibly fixed various NPEs and IOOBEs - OldPython.59 Handle QualifiedName visits in the walker, instead of outputting a entry for every peice of a qualified name. - OldPython.58 Small cleanup, remove some old useless comments. - OldPython.57 Properly detect the package for inner classes, to fix issue where a class would import it's own subclasses. - OldPython.56 Fix grabing of names from ClassMap with new fully qualified names. - OldPython.55 Put full names in class map so we can get fully qualified in code. - OldPython.54 really fixed the import issue - OldPython.53 apperantly fixed the import problem - OldPython.52 Don't spit out generic identifiers in RangeExtractor. - OldPython.51 Search override when printing method reference, but NOT parameters. Should solve issue of overrides not being reobfed AND the issue with Messed up MCP param names. - OldPython.50 Garentee that resolveOverrides doesn't return null unless fed null. Also actually use the value returned from resolveOverride... - OldPython.49 Don't fail if rangemap has extra files. - OldPython.48 Make directories for FolderSupplier. - OldPython.47 accounted for the possibility of a file not existing - OldPython.46 made things Iterable instead of Lists - OldPython.45 changed primaer/secondary exc system to just 1 list - OldPython.44 Make a child walker for Enums as well. - OldPython.43 Emit class name in fields that can't be resolved. - OldPython.42 Walk parent method parameters for inner classes to properly attribute parameter reference. - OldPython.41 Duplidate code cleanup, and fix parameters for unrenamed methods. - OldPython.40 Fix nested named classes. - OldPython.39 Don't resolve top method signatures. Cleans majority of paramater issues! - OldPython.38 Strip String and int from Enum constructors. - OldPython.37 Translate anon parameters to Object. - OldPython.36 accounted for non-static inner classes - OldPython.35 Translate exc lines, down to 76 diffs. - OldPython.34 Add anon class names to range extractor where it would not be found previously. - OldPython.33 Pretty up the output and sort the files, should provide more standard output. - OldPython.32 Fix index issue for ObfID, and translator for inner classes. - OldPython.31 Trim rangemap lines. - OldPython.30 Re-work RangeExtractor to use a nested Walker system instead of special casing classes. Needs work on method parameters. Cleaned output print format to reflect class format. Parsers should ignore all leading spaces. Print out field initalizer data, so we can pull out __OBFID values. - OldPython.29 Print out OBFID field values. - OldPython.28 Move parser creation outside, Small performance enhancement - OldPython.27 fixed exceptor file reading - OldPython.26 fixed inner class qualifying - OldPython.25 inner classes are still not perfect - OldPython.24 attempted to fix some issues with inner classes - OldPython.23 Fixed import glitches - OldPython.22 overhauled the RangeApplier API again - OldPython.21 converted it to use InputSUppliers - OldPython.20 revamped RangeExtractor to a better API - OldPython.19 fixed maven deployment - OldPython.18 Merge pull request #5 from AbrarSyed/master Lots of stuff - OldPython.17 polished and bumped version - OldPython.16 minor buildscript tweaks - OldPython.15 Created and implemented IO suppliers - OldPython.14 Completed optimization pass - OldPython.13 Ported RangeApplier to java - OldPython.12 got the right commons IO, + a CLI lib - OldPython.11 Package the java classes into our domain. - OldPython.10 Cleanup build script a bit, don't include the data in the published jar. Fixed license and authors. - OldPython.9 Merge pull request #3 from The-TTP-Project/master Basic gradling setup - OldPython.8 fixed, build's and creates eclipse workspace properly - OldPython.7 consolidated gitignores - OldPython.6 moved python temporarily - OldPython.5 updated versioning and maven - OldPython.4 fixing deps in gradle - OldPython.3 fixing imports - OldPython.2 rearranging for gradle - OldPython.1 setting up gradle's standard ignores - OldPython.0 No assets, downloading is bad mmkay! v3.0 ==== - v3.0.16 Add 1.6.2_01 data because those two name changes screw everything up! -.- - v3.0.15 1.6.3 data and ItemDye fix.. - v3.0.14 Add 1.6.2 and 1.6.2 data - v3.0.13 Change how subprocesses are run/read, and tell git to not use less, should help some commands stalling. - v3.0.12 Support unrenamed classes in imports. - v3.0.11 Detect the FML dir being for the incorrect version and re-set it if it is. Normalize the line endings to LF for the output source files. Fix bug in the kill_folder function - v3.0.10 Update data to 1.6.4. Haven't tested fully manual fixes, but it runs through now. - v3.0.9 Use FML's backup jar for cb2vanilla generation. Support for the new --fix-config argument to CodeFix Prevented some spam when creating patch files on files that have no base. New method of empting the output folder, should help when the OS locks the folder itself. Also don't create the binary zip if recompile/reobf failed. - v3.0.8 More detailed output in line for tracing. - v3.0.7 Support classes that are unmapped {typically 3rd party libraries} - v3.0.6 Support in-line commnets. - v3.0.5 Added: --non-fatal option to not prematurely exit if it can't find a fix. Added: --dry-run option to not write out the fixed files Added: --fix-config option to specify the property file containing manual fixes. Only one supported right now is BOUNCE see 1.6.4's folder for example. Added: New FixType Cast, will attept to place a explicit cast where needed. Fixes error in EntityAISit Fixed: bug where the same fix would be applied multiple times causing weird output. - v3.0.4 Update for Minecraft 1.5.2 - v3.0.3 Fix 1.5.1 FML source URL - v3.0.2 Update to SpecialSource 1.5 - v3.0.1 Copy from 1.5.1 - v3.0.0 Update for 3.0 release v3.0-pre ======== - v3.0-pre-203 Make errors in CodeFixer non-fatal. - v3.0-pre-202 Update for 1.5.1 - v3.0-pre-201 Copy fixes from 1.5 - v3.0-pre-200 Abort if cannot find data file for MC version - v3.0-pre-199 Skip empty commits - v3.0-pre-198 Revert "Fix intentional off-by-one error in readCommitLog" This reverts commit 23d9c56b9707fa5e374586a2e81c573a91abcd9e. - v3.0-pre-197 Use default commit metadata for initial commit - v3.0-pre-196 Fix intentional off-by-one error in readCommitLog - v3.0-pre-195 Use GitHub notation for referencing upstream commit in message - v3.0-pre-194 Add --startMessage for initial remapped commit message - v3.0-pre-193 Replace git pull with git fetch+reset to avoid unwanted merge - v3.0-pre-192 Strip trailing whitespace for difflib Python 2.6/7 interoperability - v3.0-pre-191 Absolutize paths, show runOutput command - v3.0-pre-190 Require --startCommit when not resuming - v3.0-pre-189 Add git 1.7.0.4 compatibility The '%B: raw body (unwrapped subject and body)' variable for git show --format is supported in 1.7.3.1 but not 1.7.0.4. Replace it with '%s%n%n%b"' (subject\n\nbody) since its supported everywhere. - v3.0-pre-188 Add --pushGit option - v3.0-pre-187 Add option parsing for mapbranch - v3.0-pre-186 Change --cb-dir --fml-dir defaults and only setup if directories do not exist Previously, specifying these options was required to not re-setup CB or FML. Now, they default to 'CraftBukkit' and 'fml' directories, and will only be setup if the directories do not exist. Makes for easier repeated manual invocation of this script. - v3.0-pre-185 Add FML source cleanup regexes (case clause whitespace fix), w/o jad-renaming - v3.0-pre-184 Give the CodeFixer tool more memory - v3.0-pre-183 Fix Python 2.6 compatibility in cleanup_var_names No dictionary comprehensions for you! - v3.0-pre-182 Backport to optparse from argparse for Python 2.6 compatibility - v3.0-pre-181 Fix Maven path again - v3.0-pre-180 Add possible Maven path for jenkins - v3.0-pre-179 Look for mvn in MAVEN_HOME - v3.0-pre-178 Revert "Add debugging to runRemap()" This reverts commit 0ad58a526e79ce0b9993b3ae66e3f0e48d3d8d18. - v3.0-pre-177 Add debugging to runRemap() - v3.0-pre-176 Require git repository as command-line argument to mapbranch.py Instead of hardcoding /tmp/MCPBukkit - v3.0-pre-175 Run remap-craftbukkit with Python sys.executable For better cross-platform compatibility - v3.0-pre-174 Create tools directory for initial setup - v3.0-pre-173 Skip archiving reobf if recompile disabled Fixes initial setup - v3.0-pre-172 Setup FML if --fml-dir directory does not exist - v3.0-pre-171 Remove generation of MCP rangemap No longer needed since we don't rename local variables with rangeapply (not needed anymore thanks to rename_vars, jad-style names in FML) - v3.0-pre-170 Skip first commit due to breaking API change - v3.0-pre-169 Attempt at not including NMS source in git - v3.0-pre-168 Add patches to git repo, instead of full remapped NMS source - v3.0-pre-167 Disable FML/MCP cleanup_source - CB variables already renamed jad-style - v3.0-pre-166 Remove rename_vars.py now that it is part of FML - v3.0-pre-165 Cleanup source cleanup There are three separate cleanup scripts: 1. MCP src_cleanup 2. FML/MCP cleanup_source 3. cleanup_var_names 4. whitespaceneutralizer - v3.0-pre-164 Update for CraftBukkit 1.5 - v3.0-pre-163 Copy from 1.4.7 - v3.0-pre-162 Disable /*was:*/ annotations in renamed OBC source At least during MCPC+ development, having the semiobfuscated CB names commented in the org.bukkit.craftbukkit source turned out to be more trouble than its worth (could not block comment /*..*/, decreases readability, etc.) - disabling for now. The original CB names can be found in the original CB repository if needed. - v3.0-pre-161 Continue remapping on uncompileable commits Required for https://github.com/Bukkit/CraftBukkit/commit/68a1a3592e613648c9f7744e1e559943db273993 Note the error is fixed in a subsequent commit - v3.0-pre-160 Add support for resuming commit remapping where you left off - v3.0-pre-159 Add option to skip archiving; working automated CB per-commit remapping Example output: https://github.com/agaricusb/MCPBukkit/commits/master - v3.0-pre-158 Adapt mapbranch.py for running with Srg2Source 3, take 1 - v3.0-pre-157 Fix reading version from pom.xml in CB repo - v3.0-pre-156 Copy from https://github.com/agaricusb/MinecraftRemapping/blob/606a37541b91bfbf0705b1592df17fafffb60f27/mapbranch.py - v3.0-pre-155 Read Minecraft version from CB pom.xml instead of command-line option - v3.0-pre-154 Download RangeExtractor - v3.0-pre-153 General minor cleanup - v3.0-pre-152 Update docs in preparation for Srg2Source 3.0 - v3.0-pre-151 Merge branch 'eclipse' Conflicts: python/rangeapply.py python/remap-craftbukkit.py python/srglib.py - v3.0-pre-150 Remove python/tools binaries Former-commit-id: e49471c31cf8b0321e15417a7ffaa9d4ce2e8cf0 - v3.0-pre-149 Remove eclipse/libs Former-commit-id: 0320433dc9ca1b3d387d64b8dba76533742f9ebd [formerly 2dd11f98b274e2fbcc0968cec9211f2aaa07236a] Former-commit-id: dffcb507cd5bafd1e59b36d7e130c32504eaf510 - v3.0-pre-148 No need to apply local var renaming (via MCP rangemap) for 1.5 Thanks to matching jad names (consistent with CB) in Forge 7.7.0: https://github.com/MinecraftForge/FML/commit/723c2d98eb40afeeeb68785bcfc2f075128c1eca - v3.0-pre-147 Add support for vanilla MCP (flat packages) joined.exc vs FML/MCP packaged.exc - v3.0-pre-146 Bundle all the resulting data as a nice directory, Zip of the obfusicated files, patch directroy, and Source without patched files. Former-commit-id: ebd425b40c52c4eaeb21d11dc9c965d1b3ee1759 [formerly 74070357d01fe39b3fad1d2a40c23f5a5d339f17] Former-commit-id: ef474dfb8fb931c5d4fe4b2de2411ab37ab764c5 - v3.0-pre-145 Libraries are eneded by RG Former-commit-id: 9fda775c0a3256d3e0478b2f135df758b8b5778d - v3.0-pre-144 It compiles now, Inaccessible methods will have a public bouncer method created instead of making them public directly. We compile the classes ourselves and then use MCP to reobfusicate. Former-commit-id: f16bb7cbc986b019bcd0ab46cedf3c4171c7a828 - v3.0-pre-143 Attempt to compile, I forgot I hardcoded it in fml to not allow it u.u Former-commit-id: c6885f33e45b1278181721095b9b3cb8aee2a7bf - v3.0-pre-142 Cleanup output of CodeFixer, Run it in the python, and generate patch files. Former-commit-id: e49bcae264ecdae71b93c316eb0b27f59a49af05 - v3.0-pre-141 Whops, need this Former-commit-id: 7eac13754384e69ffdfa00b66494a924024aeb06 - v3.0-pre-140 Fixup CodeCleaner, now actually applies the fixes properly. Should be compileable code as a result. Have no tried compiling though. ToDo: Write its interaction in the python, and add in refelection fixes. Former-commit-id: 501c94f09c43b7533795caf3308385fe96260ce6 - v3.0-pre-139 Gather all needed fixes. Former-commit-id: cc0928c9611c76aa18e99936939ede910a598cd0 - v3.0-pre-138 Beginning on some post-range-apply fixes. Former-commit-id: 38dde10256c3261805d6662206fa642db7c3f9dd - v3.0-pre-137 Specialcase the NBT.close/equals methods because those SHOULD NOT override Object methods -.- Former-commit-id: fd0442e0db4eff22b4876aee218fe8298950958c - v3.0-pre-136 Inhertance lookup, cleans up some compiler errors. Former-commit-id: 8926a995d0073fe607a135d29b10c5e06f7d51e2 - v3.0-pre-135 Fixed issue with inner classes, and missed getTileEntity rename, Also extract dependancies for CraftBukkit from maven, the liubs folder is nolonger needed in data. Former-commit-id: 5e1068bed24ab3e6e374420d5ae5fb7df312dc9d - v3.0-pre-134 Fix NPE Former-commit-id: 4e17d115a75b78579037093741fe36f6fb649102 - v3.0-pre-133 Fixed construtor issue, run fml's sourc cleanup over CB, and some manual srg and exc fixes. Seems this is the cleanest we're gunna get it. Former-commit-id: ac31411a5174a8acc7e26023a5c7d5a642d0c0b9 - v3.0-pre-132 Special cased BlockSapling.TreeGenerator, and added support for custom srg and exc files. Fixed a few signature changes that were missed. Former-commit-id: de21dc7a37649225714f2bb56861b3e6fdd43330 - v3.0-pre-131 Add in sample data folder Former-commit-id: f439001ec9f011911c78dee2cb5ef50ae56da441 - v3.0-pre-130 Attempt to resolve inherated methods. Former-commit-id: 4f22e546e92da5e97d65b2ecc09cf20ead215efe - v3.0-pre-129 Kill localvars from rangemap.. for science... Former-commit-id: 2d35f69b8ebdeda20e10e52ad91970f85d1e24ab - v3.0-pre-128 Fixed issue with rename_vars where it wold miss some. Former-commit-id: 425cf078075a9c651305c9324d67530edd0bbc03 - v3.0-pre-127 Cleanup local vars a bit more. Former-commit-id: b9941984a6d74ef4bc2ae4636bc8b58147bdbbb4 - v3.0-pre-126 Include rename_vars until FML includes it. Former-commit-id: dbff905e4b4bee6557f3de88b49c2e8342948201 - v3.0-pre-125 Kill off old intellij srg2source. Still in git history for note. Former-commit-id: e8cfdb7627bf906de5dd8ee9e36f2454504c60a8 - v3.0-pre-124 Now runs rangeapply, diffs are tiny, need to fix issues with local variables. Former-commit-id: 85d91656f8ec4780a55b2bc32d81e90b307345b6 - v3.0-pre-123 Updated SpecialSource, Tossed in compiled Eclipse RangeExtrctor, updated remap-craftbukkit.py for this, getting close! Former-commit-id: aff251271ad7d0435a2365c3b5f3026af27b090b - v3.0-pre-122 New script to clean outputed rangemaps. And make sure to erase some generic types. Still some diffs are off-by-one, for unknown reasons... But whatever. Former-commit-id: 157622bf392e05e9a4fd672791fa92c8b6974009 - v3.0-pre-121 Add option to dump sorted range map Useful for comparing two range maps. Example usage: py rangeapply.py --srcRoot ../../CraftBukkit/ --srcRangeMap ../../CraftBukkit/craftbukkit.rangemap --srgFiles /dev/null --dumpRenameMap false --dumpRangeMap true - v3.0-pre-120 More work on the walker, the bulk of things work fine, even better then the PSI walker! Still some issues. Former-commit-id: 32b93183f8dafea7f4ef342e39c9adb0f311d156 - v3.0-pre-119 Should only be the ones we care about now Former-commit-id: 0e8bcaf307bf088268d4f8b94521953d9c2dcf07 - v3.0-pre-118 Ported some to eclipse ast instead of intellij Former-commit-id: cdf38a61d5a2f15cc8b2878487cafe01064e786c - v3.0-pre-117 Fix serious typo in IDEA preflight - v3.0-pre-116 Add in slightly modified chain.py from MinecraftRemapping - v3.0-pre-115 More hackary, Srg2Source now ignores null references and we hope it isn't n.m.s related. - v3.0-pre-114 First stab at fully automating setup. - v3.0-pre-113 Preflight IDEA before doing the remap, to allow it to fully load any changes - v3.0-pre-112 Add retry and fallback to interactive mode when srg2source fails Usually because of unresolved symbols, can be fixed by reimporting the pom - v3.0-pre-111 Finish porting remainder of remap-craftbukkit.sh - v3.0-pre-110 Fixes for using portable IDEA and FML instead of mcp726-pkgd - v3.0-pre-109 Initial port to Python - v3.0-pre-108 Copy from remap-craftbukkit.sh - v3.0-pre-107 Update paths - v3.0-pre-106 Add complementary remapping scripts from https://github.com/agaricusb/MinecraftRemapping - v3.0-pre-105 Continue on null referents with templated method parameters, instead of aborting Allows extracting symbol range map from MCPC 1.4.6llows extracting symbol range map from MCPC 1.4.6 Bump version to 2.1 for this change - v3.0-pre-104 Update README for rangemap usage - v3.0-pre-103 Add ChangeLog for 2.0 - v3.0-pre-102 Update README for 2.0 - v3.0-pre-101 Rename project package to srg2source - v3.0-pre-100 Abort on unresolved symbols Previously, null references would merely cause a warning in the log. But it indicates the project is broken, so now the error is fatal, as it should be. Fail early, fail fast. - v3.0-pre-99 Batch mode: exit IDE when finished, without prompting for confirmation - v3.0-pre-98 Batch mode: analyze psi tree using an invokeLater() in projectOpened() This allows the srg2source-batchmode feature to correctly run when the IDE is opened. When the symbol extraction is complete, the IDE exits. - v3.0-pre-97 Add project listener to run on project open for batch mode Currently broken; the project is not fully initialized at this point. See http://devnet.jetbrains.net/thread/29030: """ The JUnitTestPlugin does not use Psi in projectOpened. It isn't possible. And yes I agree with you it would be nice to have a 2 phase initialization which intuitively would have been initComponent projectOpened However the problem here is the non-management of dependencies by IDEA component framework. The current component initialization mechanism doesn't have the information to manage dependencies so that the order in which components are initialized guarantees that on projectOpened() all dependent components are initialized completely. So you have to revert back to lazy initialization. If you need an active plugin maybe you could listen to commands, file events... Anyway I tried to stir up some discussion about it a few month ago to no avail (http://www.intellij.net/forums/thread.jsp?forum=23&thread=25434&message=458974&q=646570656e64656e6379#458974) So now I filed a formal request : http://www.intellij.net/tracker/idea/viewSCR?publicId=14726. You can vote for it. Jacques """ - v3.0-pre-96 Add stub for executing on IDE load, in preparation for batch mode - v3.0-pre-95 Exclude libraries from symbol extraction - v3.0-pre-94 Add new option to extract symbol map for all files in project - v3.0-pre-93 Factor out extract symbol range map for 'selected files' in preparation for an 'all files' mode - v3.0-pre-92 Write symbol range map to a .rangemap file, instead of only printing to stdout - v3.0-pre-91 Write ApplySrgAction logging to a log file in the project directory - v3.0-pre-90 Refactor ApplySrgAction logging - v3.0-pre-89 Use separate local variable index namespace for "added" code Variable declarations within "// xxx start" and "// xxx end" now start their index at 100 instead of 0, so that added code doesn't get its variables renamed. This avoids the "shifting" problem when new code is added in CraftBukkit, renumbering the local variables beneath the code. Reduces CB/MCP diff by 2802 lines (33598->30796), a pretty big win. - v3.0-pre-88 Refactor emitTypeQualifierRangeIfQualified Still a problem with missing package references on types in certain expressions.. specifically: new, instanceof, and casts. The package reference range is not emitted so rangeapply.py leaves the old net.minecraft.server reference, causing invalid package names. This causes the majority of the remaining 60 errors - see https://gist.github.com/4377736 (63 there, but 3 since fixed by https://github.com/agaricusb/MinecraftRemapping/blob/master/1.4.6/uncollide-cb2pkgmcp.srg) - v3.0-pre-87 Cleanup logging - v3.0-pre-86 Fix reference list parameter handling - now uses same type reference code Type parameters in class implements/extends or method throws now processed - v3.0-pre-85 Remove qualified type name hack, use proper getQualifier() method This allows emitTypeRange() to be refactored to take only a PsiJavaCodeReferenceElement, which appears more often than PsiTypeElements themselves. No functional changes. - v3.0-pre-84 Process inner classes - v3.0-pre-83 Emit package ranges for qualified class references - v3.0-pre-82 Process method throws list Down to 754 in CB. - v3.0-pre-81 Fix local variables declared in trycatch/foreach Fixes 415 errors in CB (1177->762) - v3.0-pre-80 Wrong catch parameter.. - v3.0-pre-79 Include PsiJavaCodeReferenceElement instead of PsiReferenceExpression This its superclass, and is much more general. Now instanceof, casts, and new expression references to classes are included. - v3.0-pre-78 Method return type Fixes 298 errors in CB (3,152 -> 2,989) - v3.0-pre-77 Implements list - v3.0-pre-76 Process 'extends' - v3.0-pre-75 'Extract symbol range map' action renamed; update version - v3.0-pre-74 Disable import range output - v3.0-pre-73 Include existing text at given text ranges, for a sanity check before substitution - v3.0-pre-72 Fix NPE on types without code reference elements - v3.0-pre-71 Switch symbol range map field separator to '|' - v3.0-pre-70 Switch to tab delimiters since types can contain commas But now spurious tabs are inserted, mysteriously but consistently: -@ src/main/java/net/minecraft/server/BlockCactus.java 1976 1977 param net.minecraft.server.BlockCactus d (Lnet/minecraft/server/World;III)Z k 3 +@ src/main/java/net/minecraft/server/BlockCactus.java 1976 1977 param net.minecraft.server.BlockCactus d (Lnet/minecraft/server/World;III)Z k 3 - v3.0-pre-69 Yet more refactoring SymbolRangeEmitter output Everything is written through private void internalEmit*Range methods now No functional changes (exact same output tested on NMS) - v3.0-pre-68 Remove useless javadoc params - v3.0-pre-67 Emit only 'base' types, descending into arrays and type parameters Only non-composite types are emitted; composites are broken down first. Differences: https://gist.github.com/4370749 - v3.0-pre-66 Recurse inside type parameters - v3.0-pre-65 Refactor all range printing into SymbolRangeEmitter Functionally identical to before except includes a consistency fix to emitted types on parameter ranges: -@,src/main/java/net/minecraft/server/Block.java,(18088,18096),class,net.minecraft.server.Block,Block,net.minecraft.server.Material,1 +@,src/main/java/net/minecraft/server/Block.java,(18088,18096),class,net.minecraft.server.Material Now all type reference ranges are printed in emitTypeRange(), and only include the type name, which is all that matters. - v3.0-pre-64 Add SymbolRangeEmitter to wrap range dumps, starting with package statement - v3.0-pre-63 Skip primitive types, and replace import/type ranges with class - v3.0-pre-62 Add filename to symbol range output - v3.0-pre-61 Recognize 'parameters' introduced by foreach/trycatch as local variable declarations - v3.0-pre-60 Track method parameter indices - v3.0-pre-59 Track local variable declaration indices - v3.0-pre-58 Fix NPE when various elements are null Hit when testing entire CB project, including libraries - rt.jar WrapperGenerator.class (compiled; PsiFile) - v3.0-pre-57 Refactor symbol reference walker - v3.0-pre-56 Don't forget class initializers - v3.0-pre-55 Generate method signatures - v3.0-pre-54 Walk initializers for references, too - v3.0-pre-53 Show symbol reference locations within method bodies - v3.0-pre-52 Show visited reference expressions - v3.0-pre-51 Working recursive walk - v3.0-pre-50 PsiRecursiveElementVisitor neither - v3.0-pre-49 Try with a PsiRecursiveElementWalkingVisitor.. but it doesn't descend into expressions? - v3.0-pre-48 Show field name, method name, and type text ranges - v3.0-pre-47 Show package statement, and text ranges of identifiers - v3.0-pre-46 Iterate imports - v3.0-pre-45 Get selected Java files from user, as a list of PsiJavaFile - v3.0-pre-44 Add 'experimental' apply srg action stub - v3.0-pre-43 Refactor srg loading - v3.0-pre-42 Allow renaming parameters in constructors In the .methodparams lists generated by MinecraftRemapping/parameter-map.py, constructors currently are represented by a method with the same name as the class (this is how they are found in Psi using findMethodByName), and a "void" return type, even though constructors don't actually have a return type. - v3.0-pre-41 RenamingMethodParametersList toString() - v3.0-pre-40 Remove .srg filename extension check - v3.0-pre-39 Use renameElement for parameter renamings - works - v3.0-pre-38 Call PsiParameter setName() in runWriteAction. This works, but only renames the parameters in the method definition, not any uses in the method body. - v3.0-pre-37 Move generatestubs to MinecraftRemappings/stubsforename.py - v3.0-pre-36 Beginning of method parameters list renaming Not currently working, PsiParameter setName() fails with: [ 36722] ERROR - plication.impl.ApplicationImpl - Assertion failed: Write access is allowed inside write-action only (see com.intellij.openapi.application.Application.runWriteAction()) - v3.0-pre-35 Add license (BSD) - v3.0-pre-34 Fix unneeded UI popups (remove preprocessUsages); fix typos - v3.0-pre-33 Show number of fields/methods/classes renamed after completion - v3.0-pre-32 Fix reversed field - v3.0-pre-31 Add initial README - v3.0-pre-30 Copy missing files from mc-dev - v3.0-pre-29 Move to generateStubFromJavap() - v3.0-pre-28 Improve stub generation, but still imperfect - doesn't call superconstructors - v3.0-pre-27 Write stubs to disk. Not yet completely compileable. - v3.0-pre-26 Use javap for generating a template of stubs for non-cb methods - v3.0-pre-25 Start of a script to read .srg to generate stubs for missing classes (mc-dev but not in craftbukkit) - v3.0-pre-24 Fix class package name separators (. instead of / where needed) - v3.0-pre-23 Load .srg into objects - v3.0-pre-22 Parse .srg files - v3.0-pre-21 Read file line-by-line - v3.0-pre-20 Disable renaming in comments - causes trouble with names like 'a' - v3.0-pre-19 Add file chooser dialog for .srg - v3.0-pre-18 Method renaming working - v3.0-pre-17 Build type signature code - v3.0-pre-16 Start of renameMethod() - list signature types - v3.0-pre-15 Fix renameField; add console debugging - v3.0-pre-14 Attempt at renameField - v3.0-pre-13 Change project name to ApplySrg2Source - v3.0-pre-12 Factor out renameClass(), and go both ways - v3.0-pre-11 Execute rename refactoring batch-style (non-interactive) - v3.0-pre-10 Run JavaRenameRefactoring test SampleClass -> SampleClass2, it works but is interactive (UI prompts for Cancel or Do Refactor) - v3.0-pre-9 Use JavaPsiFacade to findClass by name - v3.0-pre-8 Ignore .jar, out - v3.0-pre-7 Ignore workspace - v3.0-pre-6 Lookup PsiClass's using findChildrenOfType. Finds 481 clases in src - v3.0-pre-5 Show count of PsiElements in project directory - v3.0-pre-4 Add a stub Srg > Apply Srg menu, based on http://confluence.jetbrains.net/display/IDEADEV/Getting+Started+with+Plugin+Development - Creating an action - v3.0-pre-3 Use IntellJ IDEA SDK source as described on http://www.jetbrains.org/display/IJOS/Writing+Plug-ins - v3.0-pre-2 New blank IntellJ IDEA plugin ApplySrg2Source4IDEA - v3.0-pre-1 Attempt to import Eclipse's JDT org.eclipse.jdt.ui.refactoring.RenameSupport, but can't figure out how to find it