OrnitheMC / enigma

A deobfuscation/remapping tool for Java bytecode, fork of cuchaz's Enigma.
GNU Lesser General Public License v3.0
9 stars 2 forks source link

Change names in javadocs when you change a mapping. #27

Open viktor40 opened 2 years ago

viktor40 commented 2 years ago

This is a separate issue for #6. This relates to the second bulletin of this issue. When changing a mapping the javadocs should also update automatically so links don't break and you don't have to manually change all the javadocs.

viktor40 commented 2 years ago

The second point seems the most troublesome at the moment. This will probably need some kind of indexing where when starting enigma, all javadocs are searched for links and indexed which methods or functions are linked. This way we won't need to look through everything each time a mapping is changed. Looking up the indexed methods should be fast enough so there is no noticeable additional lag when renaming a method or a class.

My current idea is a hashmap with the class like as a key net.minecraft.package.ClassName. Each class would then have another hashmap as it's value. It's keys then have the methods from this class that are linked in javadocs, the values are all the javadocs in which these methods are linked.

Please feel welcome to suggest a better datastructure to use or even a better way of indexing.